diff --git a/packages/next-safe-action/src/action-builder.ts b/packages/next-safe-action/src/action-builder.ts index ef6863c6..113c76d0 100644 --- a/packages/next-safe-action/src/action-builder.ts +++ b/packages/next-safe-action/src/action-builder.ts @@ -1,7 +1,7 @@ import { isNotFoundError } from "next/dist/client/components/not-found.js"; import { isRedirectError } from "next/dist/client/components/redirect.js"; import type {} from "zod"; -import type { Infer, InferArray, InferIn, InferInArray, Schema, ValidationAdapter } from "./adapters.types"; +import type { Infer, InferArray, InferIn, InferInArray, Schema, ValidationAdapter } from "./adapters/types"; import type { MiddlewareFn, MiddlewareResult, diff --git a/packages/next-safe-action/src/adapters.types.ts b/packages/next-safe-action/src/adapters/types.ts similarity index 100% rename from packages/next-safe-action/src/adapters.types.ts rename to packages/next-safe-action/src/adapters/types.ts diff --git a/packages/next-safe-action/src/adapters/valibot.ts b/packages/next-safe-action/src/adapters/valibot.ts index a89dfdff..8d48a8cd 100644 --- a/packages/next-safe-action/src/adapters/valibot.ts +++ b/packages/next-safe-action/src/adapters/valibot.ts @@ -1,7 +1,7 @@ // Code courtesy of https://github.com/decs/typeschema/blob/main/packages/valibot/src/validation.ts import { getDotPath, safeParseAsync, type GenericSchema, type GenericSchemaAsync } from "valibot"; -import type { IfInstalled, Infer, ValidationAdapter } from "../adapters.types"; +import type { IfInstalled, Infer, ValidationAdapter } from "./types"; class ValibotAdapter implements ValidationAdapter { async validate>(schema: S, data: unknown) { diff --git a/packages/next-safe-action/src/adapters/yup.ts b/packages/next-safe-action/src/adapters/yup.ts index 00c17547..edb3dee1 100644 --- a/packages/next-safe-action/src/adapters/yup.ts +++ b/packages/next-safe-action/src/adapters/yup.ts @@ -2,7 +2,7 @@ import type { Schema as YupSchema } from "yup"; import { ValidationError } from "yup"; -import type { IfInstalled, Infer, ValidationAdapter, ValidationIssue } from "../adapters.types"; +import type { IfInstalled, Infer, ValidationAdapter, ValidationIssue } from "./types"; class YupAdapter implements ValidationAdapter { async validate>(schema: S, data: unknown) { diff --git a/packages/next-safe-action/src/adapters/zod.ts b/packages/next-safe-action/src/adapters/zod.ts index 9f07674b..f41c0d01 100644 --- a/packages/next-safe-action/src/adapters/zod.ts +++ b/packages/next-safe-action/src/adapters/zod.ts @@ -1,7 +1,7 @@ // https://github.com/decs/typeschema/blob/main/packages/zod/src/validation.ts import type { z } from "zod"; -import type { IfInstalled, Infer, ValidationAdapter } from "../adapters.types"; +import type { IfInstalled, Infer, ValidationAdapter } from "./types"; export type ZodSchema = z.ZodType; diff --git a/packages/next-safe-action/src/hooks-utils.ts b/packages/next-safe-action/src/hooks-utils.ts index 7909c5f6..c1190ab0 100644 --- a/packages/next-safe-action/src/hooks-utils.ts +++ b/packages/next-safe-action/src/hooks-utils.ts @@ -1,7 +1,7 @@ import * as React from "react"; import {} from "react/experimental"; import type {} from "zod"; -import type { InferIn, Schema } from "./adapters.types"; +import type { InferIn, Schema } from "./adapters/types"; import type { HookActionStatus, HookCallbacks, HookResult } from "./hooks.types"; export const getActionStatus = < diff --git a/packages/next-safe-action/src/hooks.ts b/packages/next-safe-action/src/hooks.ts index 64a183fd..bfef56e6 100644 --- a/packages/next-safe-action/src/hooks.ts +++ b/packages/next-safe-action/src/hooks.ts @@ -6,7 +6,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import {} from "react/experimental"; import type {} from "zod"; -import type { InferIn, Schema } from "./adapters.types"; +import type { InferIn, Schema } from "./adapters/types"; import { getActionShorthandStatusObject, getActionStatus, useActionCallbacks } from "./hooks-utils"; import type { HookCallbacks, HookResult, HookSafeActionFn } from "./hooks.types"; import { isError } from "./utils"; diff --git a/packages/next-safe-action/src/hooks.types.ts b/packages/next-safe-action/src/hooks.types.ts index ed6dbf95..f285d5d5 100644 --- a/packages/next-safe-action/src/hooks.types.ts +++ b/packages/next-safe-action/src/hooks.types.ts @@ -1,4 +1,4 @@ -import type { InferIn, Schema } from "./adapters.types"; +import type { InferIn, Schema } from "./adapters/types"; import type { SafeActionResult } from "./index.types"; import type { MaybePromise, Prettify } from "./utils.types"; diff --git a/packages/next-safe-action/src/index.ts b/packages/next-safe-action/src/index.ts index dae2d3f6..1b777c18 100644 --- a/packages/next-safe-action/src/index.ts +++ b/packages/next-safe-action/src/index.ts @@ -1,4 +1,4 @@ -import type { Infer, Schema } from "./adapters.types"; +import type { Infer, Schema } from "./adapters/types"; import type { DVES, SafeActionClientOpts } from "./index.types"; import { SafeActionClient } from "./safe-action-client"; import { DEFAULT_SERVER_ERROR_MESSAGE } from "./utils"; diff --git a/packages/next-safe-action/src/index.types.ts b/packages/next-safe-action/src/index.types.ts index 75ba6318..ce0fb6b0 100644 --- a/packages/next-safe-action/src/index.types.ts +++ b/packages/next-safe-action/src/index.types.ts @@ -1,4 +1,4 @@ -import type { Infer, InferArray, InferIn, InferInArray, Schema, ValidationAdapter } from "./adapters.types"; +import type { Infer, InferArray, InferIn, InferInArray, Schema, ValidationAdapter } from "./adapters/types"; import type { MaybePromise, Prettify } from "./utils.types"; import type { BindArgsValidationErrors, ValidationErrors } from "./validation-errors.types"; diff --git a/packages/next-safe-action/src/safe-action-client.ts b/packages/next-safe-action/src/safe-action-client.ts index 851e2ba3..f0938437 100644 --- a/packages/next-safe-action/src/safe-action-client.ts +++ b/packages/next-safe-action/src/safe-action-client.ts @@ -1,6 +1,6 @@ import type {} from "zod"; import { actionBuilder } from "./action-builder"; -import type { Infer, Schema, ValidationAdapter } from "./adapters.types"; +import type { Infer, Schema, ValidationAdapter } from "./adapters/types"; import type { DVES, MiddlewareFn, diff --git a/packages/next-safe-action/src/stateful-hooks.ts b/packages/next-safe-action/src/stateful-hooks.ts index 66957340..7cc27398 100644 --- a/packages/next-safe-action/src/stateful-hooks.ts +++ b/packages/next-safe-action/src/stateful-hooks.ts @@ -4,7 +4,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import {} from "react/experimental"; import type {} from "zod"; -import type { InferIn, Schema } from "./adapters.types"; +import type { InferIn, Schema } from "./adapters/types"; import { getActionShorthandStatusObject, getActionStatus, useActionCallbacks } from "./hooks-utils"; import type { HookCallbacks, HookSafeStateActionFn } from "./hooks.types"; /** diff --git a/packages/next-safe-action/src/validation-errors.ts b/packages/next-safe-action/src/validation-errors.ts index a9fa13ed..2252cc18 100644 --- a/packages/next-safe-action/src/validation-errors.ts +++ b/packages/next-safe-action/src/validation-errors.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */ -import type { Schema } from "./adapters.types"; +import type { Schema } from "./adapters/types"; import type { FlattenedBindArgsValidationErrors, FlattenedValidationErrors, diff --git a/packages/next-safe-action/src/validation-errors.types.ts b/packages/next-safe-action/src/validation-errors.types.ts index c2962270..9288800f 100644 --- a/packages/next-safe-action/src/validation-errors.types.ts +++ b/packages/next-safe-action/src/validation-errors.types.ts @@ -1,4 +1,4 @@ -import type { Infer, Schema } from "./adapters.types"; +import type { Infer, Schema } from "./adapters/types"; import type { Prettify } from "./utils.types"; export type ValidationIssue = {