@kubb/plugin-zod 5.0.0-alpha.32 → 5.0.0-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["File","Type","Const","File","Const","Type","File","File"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/string.ts","../../../internals/utils/src/object.ts","../../../internals/utils/src/regexp.ts","../src/components/Operations.tsx","../src/components/Zod.tsx","../src/constants.ts","../src/utils.ts","../src/printers/printerZod.ts","../src/printers/printerZodMini.ts","../src/generators/zodGenerator.tsx","../src/generators/zodGeneratorLegacy.tsx","../package.json","../src/resolvers/resolverZod.ts","../src/resolvers/resolverZodLegacy.ts","../src/presets.ts","../src/plugin.ts"],"sourcesContent":["type Options = {\n /**\n * When `true`, dot-separated segments are split on `.` and joined with `/` after casing.\n */\n isFile?: boolean\n /**\n * Text prepended before casing is applied.\n */\n prefix?: string\n /**\n * Text appended before casing is applied.\n */\n suffix?: string\n}\n\n/**\n * Shared implementation for camelCase and PascalCase conversion.\n * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)\n * and capitalizes each word according to `pascal`.\n *\n * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.\n */\nfunction toCamelOrPascal(text: string, pascal: boolean): string {\n const normalized = text\n .trim()\n .replace(/([a-z\\d])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .replace(/(\\d)([a-z])/g, '$1 $2')\n\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n *\n * Only splits on dots followed by a letter so that version numbers\n * embedded in operationIds (e.g. `v2025.0`) are kept intact.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split(/\\.(?=[a-zA-Z])/)\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n const processed = `${prefix} ${text} ${suffix}`.trim()\n return processed\n .replace(/([a-z])([A-Z])/g, '$1_$2')\n .replace(/[\\s\\-.]+/g, '_')\n .replace(/[^a-zA-Z0-9_]/g, '')\n .toLowerCase()\n .split('_')\n .filter(Boolean)\n .join('_')\n}\n\n/**\n * Converts `text` to SCREAMING_SNAKE_CASE.\n *\n * @example\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Strips a single matching pair of `\"...\"`, `'...'`, or `` `...` `` from both ends of `text`.\n * Returns the string unchanged when no balanced quote pair is found.\n *\n * @example\n * trimQuotes('\"hello\"') // 'hello'\n * trimQuotes('hello') // 'hello'\n */\nexport function trimQuotes(text: string): string {\n if (text.length >= 2) {\n const first = text[0]\n const last = text[text.length - 1]\n if ((first === '\"' && last === '\"') || (first === \"'\" && last === \"'\") || (first === '`' && last === '`')) {\n return text.slice(1, -1)\n }\n }\n return text\n}\n\n/**\n * Escapes characters that are not allowed inside JS string literals.\n * Handles quotes, backslashes, and Unicode line terminators (U+2028 / U+2029).\n *\n * @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4\n *\n * @example\n * ```ts\n * jsStringEscape('say \"hi\"\\nbye') // 'say \\\\\"hi\\\\\"\\\\nbye'\n * ```\n */\nexport function jsStringEscape(input: unknown): string {\n return `${input}`.replace(/[\"'\\\\\\n\\r\\u2028\\u2029]/g, (character) => {\n switch (character) {\n case '\"':\n case \"'\":\n case '\\\\':\n return `\\\\${character}`\n case '\\n':\n return '\\\\n'\n case '\\r':\n return '\\\\r'\n case '\\u2028':\n return '\\\\u2028'\n case '\\u2029':\n return '\\\\u2029'\n default:\n return ''\n }\n })\n}\n\n/**\n * Returns a masked version of a string, showing only the first and last few characters.\n * Useful for logging sensitive values (tokens, keys) without exposing the full value.\n *\n * @example\n * maskString('KUBB_STUDIO-abc123-xyz789') // 'KUBB_STUDIO-…789'\n */\nexport function maskString(value: string, start = 8, end = 4): string {\n if (value.length <= start + end) return value\n return `${value.slice(0, start)}…${value.slice(-end)}`\n}\n\n/**\n * Strips the file extension from a path or file name.\n * Only removes the last `.ext` segment when the dot is not part of a directory name.\n *\n * @example\n * trimExtName('petStore.ts') // 'petStore'\n * trimExtName('/src/models/pet.ts') // '/src/models/pet'\n * trimExtName('/project.v2/gen/pet.ts') // '/project.v2/gen/pet'\n * trimExtName('noExtension') // 'noExtension'\n */\nexport function trimExtName(text: string): string {\n const dotIndex = text.lastIndexOf('.')\n if (dotIndex > 0 && !text.includes('/', dotIndex)) {\n return text.slice(0, dotIndex)\n }\n return text\n}\n","import { trimQuotes } from './string.ts'\n\n/**\n * Serializes a primitive value to a JSON string literal, stripping any surrounding quote characters first.\n *\n * @example\n * stringify('hello') // '\"hello\"'\n * stringify('\"hello\"') // '\"hello\"'\n */\nexport function stringify(value: string | number | boolean | undefined): string {\n if (value === undefined || value === null) return '\"\"'\n return JSON.stringify(trimQuotes(value.toString()))\n}\n\n/**\n * Converts a plain object into a multiline key-value string suitable for embedding in generated code.\n * Nested objects are recursively stringified with indentation.\n *\n * @example\n * stringifyObject({ foo: 'bar', nested: { a: 1 } })\n * // 'foo: bar,\\nnested: {\\n a: 1\\n }'\n */\nexport function stringifyObject(value: Record<string, unknown>): string {\n const items = Object.entries(value)\n .map(([key, val]) => {\n if (val !== null && typeof val === 'object') {\n return `${key}: {\\n ${stringifyObject(val as Record<string, unknown>)}\\n }`\n }\n return `${key}: ${val}`\n })\n .filter(Boolean)\n return items.join(',\\n')\n}\n\n/**\n * Strips functions, symbols, and `undefined` values from plugin options for safe JSON transport.\n *\n * @example\n * ```ts\n * serializePluginOptions({ output: './src', onWrite: () => {} })\n * // { output: './src' } (function stripped)\n * ```\n */\nexport function serializePluginOptions<TOptions extends object>(options: TOptions): TOptions {\n if (options === null || options === undefined) return {} as TOptions\n if (typeof options !== 'object') return options\n if (Array.isArray(options)) return options.map(serializePluginOptions) as unknown as TOptions\n\n const serialized: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(options)) {\n if (typeof value === 'function' || typeof value === 'symbol' || value === undefined) continue\n serialized[key] = value !== null && typeof value === 'object' ? serializePluginOptions(value as object) : value\n }\n return serialized as TOptions\n}\n\n/**\n * Strips all `undefined` values from an object recursively by round-tripping through JSON.\n * Useful for clean inline snapshot assertions that only show fields with actual values.\n *\n * @example\n * toSnapshot({ kind: 'Schema', name: undefined, type: 'string' })\n * // { kind: 'Schema', type: 'string' }\n */\nexport function toSnapshot<T>(value: T): T {\n return JSON.parse(JSON.stringify(value))\n}\n\n/**\n * Converts a dot-notation path or string array into an optional-chaining accessor expression.\n *\n * @example\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // → \"lastPage?.['pagination']?.['next']?.['id']\"\n */\nexport function getNestedAccessor(param: string | string[], accessor: string): string | null {\n const parts = Array.isArray(param) ? param : param.split('.')\n if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) return null\n return `${accessor}?.['${`${parts.join(\"']?.['\")}']`}`\n}\n","import { trimQuotes } from './string.ts'\n\n/**\n * Converts a pattern string into a `new RegExp(...)` constructor call or a regex literal string.\n * Inline flags expressed as `^(?im)` prefixes are extracted and applied to the resulting expression.\n * Pass `null` as the second argument to emit a `/pattern/flags` literal instead.\n *\n * @example\n * toRegExpString('^(?im)foo') // → 'new RegExp(\"foo\", \"im\")'\n * toRegExpString('^(?im)foo', null) // → '/foo/im'\n */\nexport function toRegExpString(text: string, func: string | null = 'RegExp'): string {\n const raw = trimQuotes(text)\n\n const match = raw.match(/^\\^(\\(\\?([igmsuy]+)\\))/i)\n const replacementTarget = match?.[1] ?? ''\n const matchedFlags = match?.[2]\n const cleaned = raw\n .replace(/^\\\\?\\//, '')\n .replace(/\\\\?\\/$/, '')\n .replace(replacementTarget, '')\n\n const { source, flags } = new RegExp(cleaned, matchedFlags)\n\n if (func === null) return `/${source}/${flags}`\n\n return `new ${func}(${JSON.stringify(source)}${flags ? `, ${JSON.stringify(flags)}` : ''})`\n}\n","import { stringifyObject } from '@internals/utils'\nimport type { OperationNode } from '@kubb/ast/types'\nimport { Const, File, Type } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype SchemaNames = {\n request: string | undefined\n parameters: {\n path: string | undefined\n query: string | undefined\n header: string | undefined\n }\n responses: { default?: string } & Record<number | string, string>\n errors: Record<number | string, string>\n}\n\ntype Props = {\n name: string\n operations: Array<{ node: OperationNode; data: SchemaNames }>\n}\n\nexport function Operations({ name, operations }: Props): FabricReactNode {\n const operationsJSON = operations.reduce<Record<string, unknown>>(\n (prev, acc) => {\n prev[`\"${acc.node.operationId}\"`] = acc.data\n\n return prev\n },\n {} as Record<string, unknown>,\n )\n\n const pathsJSON = operations.reduce<Record<string, Record<string, string>>>((prev, acc) => {\n prev[`\"${acc.node.path}\"`] = {\n ...(prev[`\"${acc.node.path}\"`] ?? {}),\n [acc.node.method]: `operations[\"${acc.node.operationId}\"]`,\n }\n\n return prev\n }, {})\n\n return (\n <>\n <File.Source name=\"OperationSchema\" isExportable isIndexable>\n <Type name=\"OperationSchema\" export>{`{\n readonly request: z.ZodTypeAny | undefined;\n readonly parameters: {\n readonly path: z.ZodTypeAny | undefined;\n readonly query: z.ZodTypeAny | undefined;\n readonly header: z.ZodTypeAny | undefined;\n };\n readonly responses: {\n readonly [status: number]: z.ZodTypeAny;\n readonly default: z.ZodTypeAny;\n };\n readonly errors: {\n readonly [status: number]: z.ZodTypeAny;\n };\n}`}</Type>\n </File.Source>\n <File.Source name=\"OperationsMap\" isExportable isIndexable>\n <Type name=\"OperationsMap\" export>\n {'Record<string, OperationSchema>'}\n </Type>\n </File.Source>\n <File.Source name={name} isExportable isIndexable>\n <Const export name={name} asConst>\n {`{${stringifyObject(operationsJSON)}}`}\n </Const>\n </File.Source>\n <File.Source name={'paths'} isExportable isIndexable>\n <Const export name={'paths'} asConst>\n {`{${stringifyObject(pathsJSON)}}`}\n </Const>\n </File.Source>\n </>\n )\n}\n","import type { Printer } from '@kubb/ast'\nimport type { SchemaNode } from '@kubb/ast/types'\nimport { Const, File, Type } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PrinterZodFactory } from '../printers/printerZod.ts'\nimport type { PrinterZodMiniFactory } from '../printers/printerZodMini.ts'\n\ntype Props = {\n name: string\n node: SchemaNode\n /**\n * Pre-configured printer instance created by the generator.\n * The generator selects `printerZod` or `printerZodMini` based on the `mini` option,\n * then merges in any user-supplied `printer.nodes` overrides.\n */\n printer: Printer<PrinterZodFactory> | Printer<PrinterZodMiniFactory>\n inferTypeName?: string\n}\n\nexport function Zod({ name, node, printer, inferTypeName }: Props): FabricReactNode {\n const output = printer.print(node)\n\n if (!output) {\n return\n }\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Const export name={name}>\n {output}\n </Const>\n </File.Source>\n {inferTypeName && (\n <File.Source name={inferTypeName} isExportable isIndexable isTypeOnly>\n <Type export name={inferTypeName}>\n {`z.infer<typeof ${name}>`}\n </Type>\n </File.Source>\n )}\n </>\n )\n}\n","/**\n * Import paths that use a namespace import (`import * as z from '...'`).\n * All other import paths use a named import (`import { z } from '...'`).\n */\nexport const ZOD_NAMESPACE_IMPORTS = new Set(['zod', 'zod/mini'] as const)\n","import { stringify, toRegExpString } from '@internals/utils'\nimport { createProperty, createSchema, extractRefName } from '@kubb/ast'\nimport type { OperationNode, ParameterNode, SchemaNode } from '@kubb/ast/types'\nimport type { PluginZod, ResolverZod } from './types.ts'\n\n/**\n * Returns `true` when the given coercion option enables coercion for the specified type.\n */\nexport function shouldCoerce(coercion: PluginZod['resolvedOptions']['coercion'] | undefined, type: 'dates' | 'strings' | 'numbers'): boolean {\n if (coercion === undefined || coercion === false) return false\n if (coercion === true) return true\n\n return !!coercion[type]\n}\n\n/**\n * Collects all resolved schema names for an operation's parameters and responses\n * into a single lookup object, useful for building imports and type references.\n */\nexport function buildSchemaNames(node: OperationNode, { params, resolver }: { params: Array<ParameterNode>; resolver: ResolverZod }) {\n const pathParam = params.find((p) => p.in === 'path')\n const queryParam = params.find((p) => p.in === 'query')\n const headerParam = params.find((p) => p.in === 'header')\n\n const responses: Record<number | string, string> = {}\n const errors: Record<number | string, string> = {}\n\n for (const res of node.responses) {\n const name = resolver.resolveResponseStatusName(node, res.statusCode)\n const statusNum = Number(res.statusCode)\n\n if (!Number.isNaN(statusNum)) {\n responses[statusNum] = name\n if (statusNum >= 400) {\n errors[statusNum] = name\n }\n }\n }\n\n responses['default'] = resolver.resolveResponseName(node)\n\n return {\n request: node.requestBody?.schema ? resolver.resolveDataName(node) : undefined,\n parameters: {\n path: pathParam ? resolver.resolvePathParamsName(node, pathParam) : undefined,\n query: queryParam ? resolver.resolveQueryParamsName(node, queryParam) : undefined,\n header: headerParam ? resolver.resolveHeaderParamsName(node, headerParam) : undefined,\n },\n responses,\n errors,\n }\n}\n\n/**\n * Format a default value as a code-level literal.\n * Objects become `{}`, primitives become their string representation, strings are quoted.\n */\nexport function formatDefault(value: unknown): string {\n if (typeof value === 'string') return stringify(value)\n if (typeof value === 'object' && value !== null) return '{}'\n\n return String(value ?? '')\n}\n\n/**\n * Format a primitive enum/literal value.\n * Strings are quoted; numbers and booleans are emitted raw.\n */\nexport function formatLiteral(v: string | number | boolean): string {\n if (typeof v === 'string') return stringify(v)\n\n return String(v)\n}\n\nexport type NumericConstraints = {\n min?: number\n max?: number\n exclusiveMinimum?: number\n exclusiveMaximum?: number\n multipleOf?: number\n}\n\nexport type LengthConstraints = {\n min?: number\n max?: number\n pattern?: string\n}\n\nexport type ModifierOptions = {\n value: string\n nullable?: boolean\n optional?: boolean\n nullish?: boolean\n defaultValue?: unknown\n description?: string\n}\n\n/**\n * Build `.min()` / `.max()` / `.gt()` / `.lt()` constraint chains for numbers\n * using the standard chainable Zod v4 API.\n */\nexport function numberConstraints({ min, max, exclusiveMinimum, exclusiveMaximum, multipleOf }: NumericConstraints): string {\n return [\n min !== undefined ? `.min(${min})` : '',\n max !== undefined ? `.max(${max})` : '',\n exclusiveMinimum !== undefined ? `.gt(${exclusiveMinimum})` : '',\n exclusiveMaximum !== undefined ? `.lt(${exclusiveMaximum})` : '',\n multipleOf !== undefined ? `.multipleOf(${multipleOf})` : '',\n ].join('')\n}\n\n/**\n * Build `.min()` / `.max()` / `.regex()` chains for strings/arrays\n * using the standard chainable Zod v4 API.\n */\nexport function lengthConstraints({ min, max, pattern }: LengthConstraints): string {\n return [\n min !== undefined ? `.min(${min})` : '',\n max !== undefined ? `.max(${max})` : '',\n pattern !== undefined ? `.regex(${toRegExpString(pattern, null)})` : '',\n ].join('')\n}\n\n/**\n * Build `.check(z.minimum(), z.maximum())` for `zod/mini` numeric constraints.\n */\nexport function numberChecksMini({ min, max, exclusiveMinimum, exclusiveMaximum, multipleOf }: NumericConstraints): string {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minimum(${min})`)\n if (max !== undefined) checks.push(`z.maximum(${max})`)\n if (exclusiveMinimum !== undefined) checks.push(`z.minimum(${exclusiveMinimum}, { exclusive: true })`)\n if (exclusiveMaximum !== undefined) checks.push(`z.maximum(${exclusiveMaximum}, { exclusive: true })`)\n if (multipleOf !== undefined) checks.push(`z.multipleOf(${multipleOf})`)\n return checks.length ? `.check(${checks.join(', ')})` : ''\n}\n\n/**\n * Build `.check(z.minLength(), z.maxLength(), z.regex())` for `zod/mini` length constraints.\n */\nexport function lengthChecksMini({ min, max, pattern }: LengthConstraints): string {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minLength(${min})`)\n if (max !== undefined) checks.push(`z.maxLength(${max})`)\n if (pattern !== undefined) checks.push(`z.regex(${toRegExpString(pattern, null)})`)\n return checks.length ? `.check(${checks.join(', ')})` : ''\n}\n\n/**\n * Apply nullable / optional / nullish modifiers and an optional `.describe()` call\n * to a schema value string using the chainable Zod v4 API.\n */\nexport function applyModifiers({ value, nullable, optional, nullish, defaultValue, description }: ModifierOptions): string {\n let result = value\n if (nullish || (nullable && optional)) {\n result = `${result}.nullish()`\n } else if (optional) {\n result = `${result}.optional()`\n } else if (nullable) {\n result = `${result}.nullable()`\n }\n if (defaultValue !== undefined) {\n result = `${result}.default(${formatDefault(defaultValue)})`\n }\n if (description) {\n result = `${result}.describe(${stringify(description)})`\n }\n return result\n}\n\n/**\n * Apply nullable / optional / nullish modifiers using the functional `zod/mini` API\n * (`z.nullable()`, `z.optional()`, `z.nullish()`).\n */\nexport function applyMiniModifiers({ value, nullable, optional, nullish, defaultValue }: Omit<ModifierOptions, 'description'>): string {\n let result = value\n if (nullish) {\n result = `z.nullish(${result})`\n } else {\n if (nullable) {\n result = `z.nullable(${result})`\n }\n if (optional) {\n result = `z.optional(${result})`\n }\n }\n if (defaultValue !== undefined) {\n result = `z._default(${result}, ${formatDefault(defaultValue)})`\n }\n return result\n}\n\n/**\n * Returns true when the schema tree contains a self-referential `$ref`\n * whose resolved name matches `schemaName`.\n *\n * A `visited` set prevents infinite recursion on circular schema graphs.\n */\nexport function containsSelfRef(\n node: SchemaNode,\n { schemaName, resolver, visited = new Set() }: { schemaName: string; resolver: ResolverZod | undefined; visited?: Set<SchemaNode> },\n): boolean {\n if (visited.has(node)) return false\n visited.add(node)\n\n if (node.type === 'ref' && node.ref) {\n const rawName = extractRefName(node.ref) ?? node.name\n const resolved = rawName ? (resolver?.default(rawName, 'function') ?? rawName) : node.name\n return resolved === schemaName\n }\n if (node.type === 'object') {\n if (node.properties?.some((p) => containsSelfRef(p.schema, { schemaName, resolver, visited }))) return true\n if (node.additionalProperties && node.additionalProperties !== true) {\n return containsSelfRef(node.additionalProperties, { schemaName, resolver, visited })\n }\n return false\n }\n if (node.type === 'array' || node.type === 'tuple') {\n return node.items?.some((item) => containsSelfRef(item, { schemaName, resolver, visited })) ?? false\n }\n if (node.type === 'union' || node.type === 'intersection') {\n return node.members?.some((m) => containsSelfRef(m, { schemaName, resolver, visited })) ?? false\n }\n return false\n}\n\ntype BuildGroupedParamsSchemaOptions = {\n params: Array<ParameterNode>\n optional?: boolean\n}\n\n/**\n * Builds an `object` schema node grouping the given parameter nodes.\n * The `primitive: 'object'` marker ensures the Zod printer emits `z.object(…)` rather than a record.\n */\nexport function buildGroupedParamsSchema({ params, optional }: BuildGroupedParamsSchemaOptions): SchemaNode {\n return createSchema({\n type: 'object',\n optional,\n primitive: 'object',\n properties: params.map((param) =>\n createProperty({\n name: param.name,\n required: param.required,\n schema: param.schema,\n }),\n ),\n })\n}\n","import { stringify } from '@internals/utils'\nimport { createSchema, extractRefName, narrowSchema, syncSchemaRef } from '@kubb/ast'\nimport type { PrinterFactoryOptions, PrinterPartial } from '@kubb/core'\nimport { definePrinter } from '@kubb/core'\nimport type { PluginZod, ResolverZod } from '../types.ts'\nimport { applyModifiers, containsSelfRef, formatLiteral, lengthConstraints, numberConstraints, shouldCoerce } from '../utils.ts'\n\n/**\n * Partial map of node-type overrides for the Zod printer.\n *\n * Each key is a `SchemaType` string (e.g. `'date'`, `'string'`). The function\n * replaces the built-in handler for that node type. Use `this.transform` to\n * recurse into nested schema nodes, and `this.options` to read printer options.\n *\n * @example Override the `date` handler\n * ```ts\n * pluginZod({\n * printer: {\n * nodes: {\n * date(node) {\n * return 'z.string().date()'\n * },\n * },\n * },\n * })\n * ```\n */\nexport type PrinterZodNodes = PrinterPartial<string, PrinterZodOptions>\n\nexport type PrinterZodOptions = {\n coercion?: PluginZod['resolvedOptions']['coercion']\n guidType?: PluginZod['resolvedOptions']['guidType']\n wrapOutput?: PluginZod['resolvedOptions']['wrapOutput']\n resolver?: ResolverZod\n schemaName?: string\n /**\n * Property keys to exclude from the generated object schema via `.omit({ key: true })`.\n */\n keysToOmit?: Array<string>\n /**\n * Partial map of node-type overrides. Each entry replaces the built-in handler for that node type.\n */\n nodes?: PrinterZodNodes\n}\n\nexport type PrinterZodFactory = PrinterFactoryOptions<'zod', PrinterZodOptions, string, string>\n\n/**\n * Zod v4 printer built with `definePrinter`.\n *\n * Converts a `SchemaNode` AST into a **standard** Zod v4 code string\n * using the chainable method API (`.optional()`, `.nullable()`, etc.).\n *\n * For the `zod/mini` functional API, see {@link printerZodMini}.\n *\n * @example\n * ```ts\n * const printer = printerZod({ coercion: false })\n * const code = printer.print(stringSchemaNode) // \"z.string()\"\n * ```\n */\nexport const printerZod = definePrinter<PrinterZodFactory>((options) => {\n return {\n name: 'zod',\n options,\n nodes: {\n any: () => 'z.any()',\n unknown: () => 'z.unknown()',\n void: () => 'z.void()',\n never: () => 'z.never()',\n boolean: () => 'z.boolean()',\n null: () => 'z.null()',\n string(node) {\n const base = shouldCoerce(this.options.coercion, 'strings') ? 'z.coerce.string()' : 'z.string()'\n\n return `${base}${lengthConstraints(node)}`\n },\n number(node) {\n const base = shouldCoerce(this.options.coercion, 'numbers') ? 'z.coerce.number()' : 'z.number()'\n\n return `${base}${numberConstraints(node)}`\n },\n integer(node) {\n const base = shouldCoerce(this.options.coercion, 'numbers') ? 'z.coerce.number().int()' : 'z.int()'\n\n return `${base}${numberConstraints(node)}`\n },\n bigint() {\n return shouldCoerce(this.options.coercion, 'numbers') ? 'z.coerce.bigint()' : 'z.bigint()'\n },\n date(node) {\n if (node.representation === 'string') {\n return 'z.iso.date()'\n }\n\n return shouldCoerce(this.options.coercion, 'dates') ? 'z.coerce.date()' : 'z.date()'\n },\n datetime(node) {\n if (node.offset) return 'z.iso.datetime({ offset: true })'\n if (node.local) return 'z.iso.datetime({ local: true })'\n\n return 'z.iso.datetime()'\n },\n time(node) {\n if (node.representation === 'string') {\n return 'z.iso.time()'\n }\n\n return shouldCoerce(this.options.coercion, 'dates') ? 'z.coerce.date()' : 'z.date()'\n },\n uuid(node) {\n const base = this.options.guidType === 'guid' ? 'z.guid()' : 'z.uuid()'\n\n return `${base}${lengthConstraints(node)}`\n },\n email(node) {\n return `z.email()${lengthConstraints(node)}`\n },\n url(node) {\n return `z.url()${lengthConstraints(node)}`\n },\n ipv4: () => 'z.ipv4()',\n ipv6: () => 'z.ipv6()',\n blob: () => 'z.instanceof(File)',\n enum(node) {\n const values = node.namedEnumValues?.map((v) => v.value) ?? node.enumValues ?? []\n const nonNullValues = values.filter((v): v is string | number | boolean => v !== null)\n\n // asConst-style enum: use z.union([z.literal(…), …])\n if (node.namedEnumValues?.length) {\n const literals = nonNullValues.map((v) => `z.literal(${formatLiteral(v)})`)\n\n if (literals.length === 1) return literals[0]!\n return `z.union([${literals.join(', ')}])`\n }\n\n // Regular enum: use z.enum([…])\n return `z.enum([${nonNullValues.map(formatLiteral).join(', ')}])`\n },\n ref(node) {\n if (!node.name) return undefined\n const refName = node.ref ? (extractRefName(node.ref) ?? node.name) : node.name\n const resolvedName = node.ref ? (this.options.resolver?.default(refName, 'function') ?? refName) : node.name\n const isSelfRef = node.ref && this.options.schemaName != null && resolvedName === this.options.schemaName\n\n if (isSelfRef) {\n return `z.lazy(() => ${resolvedName})`\n }\n\n return resolvedName\n },\n object(node) {\n const properties = node.properties\n .map((prop) => {\n const { name: propName, schema } = prop\n\n const meta = syncSchemaRef(schema)\n\n const isNullable = meta.nullable\n const isOptional = schema.optional\n const isNullish = schema.nullish\n\n const hasSelfRef =\n this.options.schemaName != null && containsSelfRef(schema, { schemaName: this.options.schemaName, resolver: this.options.resolver })\n const baseOutput = this.transform(schema) ?? this.transform(createSchema({ type: 'unknown' }))!\n // Strip z.lazy() wrappers inside object getters — the getter itself provides deferred evaluation\n const resolvedOutput = hasSelfRef ? baseOutput.replaceAll(`z.lazy(() => ${this.options.schemaName})`, this.options.schemaName!) : baseOutput\n\n const wrappedOutput = this.options.wrapOutput ? this.options.wrapOutput({ output: resolvedOutput, schema }) || resolvedOutput : resolvedOutput\n\n const value = applyModifiers({\n value: wrappedOutput,\n nullable: isNullable,\n optional: isOptional,\n nullish: isNullish,\n defaultValue: meta.default,\n description: meta.description,\n })\n\n if (hasSelfRef) {\n return `get \"${propName}\"() { return ${value} }`\n }\n return `\"${propName}\": ${value}`\n })\n .join(',\\n ')\n\n let result = `z.object({\\n ${properties}\\n })`\n\n // Handle additionalProperties as .catchall() or .strict()\n if (node.additionalProperties && node.additionalProperties !== true) {\n const catchallType = this.transform(node.additionalProperties)\n if (catchallType) {\n result += `.catchall(${catchallType})`\n }\n } else if (node.additionalProperties === true) {\n result += `.catchall(${this.transform(createSchema({ type: 'unknown' }))})`\n } else if (node.additionalProperties === false) {\n result += '.strict()'\n }\n\n return result\n },\n array(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n const inner = items.join(', ') || this.transform(createSchema({ type: 'unknown' }))!\n let result = `z.array(${inner})${lengthConstraints(node)}`\n\n if (node.unique) {\n result += `.refine(items => new Set(items).size === items.length, { message: \"Array entries must be unique\" })`\n }\n\n return result\n },\n tuple(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n\n return `z.tuple([${items.join(', ')}])`\n },\n union(node) {\n const nodeMembers = node.members ?? []\n const members = nodeMembers.map((m) => this.transform(m)).filter(Boolean)\n if (members.length === 0) return ''\n if (members.length === 1) return members[0]!\n if (node.discriminatorPropertyName && !nodeMembers.some((m) => m.type === 'intersection')) {\n // z.discriminatedUnion requires ZodObject members; intersections (ZodIntersection) are not\n // assignable to $ZodDiscriminant, so fall back to z.union when any member is an intersection.\n return `z.discriminatedUnion(${stringify(node.discriminatorPropertyName)}, [${members.join(', ')}])`\n }\n\n return `z.union([${members.join(', ')}])`\n },\n intersection(node) {\n const members = node.members ?? []\n if (members.length === 0) return ''\n\n const [first, ...rest] = members\n if (!first) return ''\n\n let base = this.transform(first)\n if (!base) return ''\n\n for (const member of rest) {\n if (member.primitive === 'string') {\n const s = narrowSchema(member, 'string')\n const c = lengthConstraints(s ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'number' || member.primitive === 'integer') {\n const n = narrowSchema(member, 'number') ?? narrowSchema(member, 'integer')\n const c = numberConstraints(n ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'array') {\n const a = narrowSchema(member, 'array')\n const c = lengthConstraints(a ?? {})\n if (c) {\n base += c\n continue\n }\n }\n const transformed = this.transform(member)\n if (transformed) base = `${base}.and(${transformed})`\n }\n\n return base\n },\n ...options.nodes,\n },\n print(node) {\n const { keysToOmit } = this.options\n\n let base = this.transform(node)\n if (!base) return null\n\n const meta = syncSchemaRef(node)\n\n if (keysToOmit?.length && meta.primitive === 'object' && !(meta.type === 'union' && meta.discriminatorPropertyName)) {\n // Mirror printerTs `nonNullable: true`: when omitting keys, the resulting\n // schema is a new non-nullable object type — skip optional/nullable/nullish.\n // Discriminated unions (z.discriminatedUnion) do not support .omit(), so skip them.\n base = `${base}.omit({ ${keysToOmit.map((k) => `\"${k}\": true`).join(', ')} })`\n }\n\n return applyModifiers({\n value: base,\n nullable: meta.nullable,\n optional: meta.optional,\n nullish: meta.nullish,\n defaultValue: meta.default,\n description: meta.description,\n })\n },\n }\n})\n","import { stringify } from '@internals/utils'\nimport { createSchema, extractRefName, narrowSchema, syncSchemaRef } from '@kubb/ast'\nimport type { PrinterFactoryOptions, PrinterPartial } from '@kubb/core'\nimport { definePrinter } from '@kubb/core'\nimport type { PluginZod, ResolverZod } from '../types.ts'\nimport { applyMiniModifiers, containsSelfRef, formatLiteral, lengthChecksMini, numberChecksMini } from '../utils.ts'\n\n/**\n * Partial map of node-type overrides for the Zod Mini printer.\n *\n * Each key is a `SchemaType` string (e.g. `'date'`, `'string'`). The function\n * replaces the built-in handler for that node type. Use `this.transform` to\n * recurse into nested schema nodes, and `this.options` to read printer options.\n *\n * @example Override the `date` handler\n * ```ts\n * pluginZod({\n * mini: true,\n * printer: {\n * nodes: {\n * date(node) {\n * return 'z.iso.date()'\n * },\n * },\n * },\n * })\n * ```\n */\nexport type PrinterZodMiniNodes = PrinterPartial<string, PrinterZodMiniOptions>\n\nexport type PrinterZodMiniOptions = {\n guidType?: PluginZod['resolvedOptions']['guidType']\n wrapOutput?: PluginZod['resolvedOptions']['wrapOutput']\n resolver?: ResolverZod\n schemaName?: string\n /**\n * Property keys to exclude from the generated object schema via `.omit({ key: true })`.\n */\n keysToOmit?: Array<string>\n /**\n * Partial map of node-type overrides. Each entry replaces the built-in handler for that node type.\n */\n nodes?: PrinterZodMiniNodes\n}\n\nexport type PrinterZodMiniFactory = PrinterFactoryOptions<'zod-mini', PrinterZodMiniOptions, string, string>\n/**\n * Zod v4 **Mini** printer built with `definePrinter`.\n *\n * Converts a `SchemaNode` AST into a Zod v4 Mini code string using the\n * functional API (`z.optional(z.string())`) for better tree-shaking.\n *\n * For the standard chainable API, see {@link printerZod}.\n *\n * @example\n * ```ts\n * const printer = printerZodMini({})\n * const code = printer.print(optionalStringNode) // \"z.optional(z.string())\"\n * ```\n */\nexport const printerZodMini = definePrinter<PrinterZodMiniFactory>((options) => {\n return {\n name: 'zod-mini',\n options,\n nodes: {\n any: () => 'z.any()',\n unknown: () => 'z.unknown()',\n void: () => 'z.void()',\n never: () => 'z.never()',\n boolean: () => 'z.boolean()',\n null: () => 'z.null()',\n string(node) {\n return `z.string()${lengthChecksMini(node)}`\n },\n number(node) {\n return `z.number()${numberChecksMini(node)}`\n },\n integer(node) {\n return `z.int()${numberChecksMini(node)}`\n },\n bigint(node) {\n return `z.bigint()${numberChecksMini(node)}`\n },\n date(node) {\n if (node.representation === 'string') {\n return 'z.iso.date()'\n }\n\n return 'z.date()'\n },\n datetime() {\n // Mini mode: datetime validation via z.string() (z.iso.datetime not available in mini)\n return 'z.string()'\n },\n time(node) {\n if (node.representation === 'string') {\n return 'z.iso.time()'\n }\n\n return 'z.date()'\n },\n uuid(node) {\n const base = this.options.guidType === 'guid' ? 'z.guid()' : 'z.uuid()'\n\n return `${base}${lengthChecksMini(node)}`\n },\n email(node) {\n return `z.email()${lengthChecksMini(node)}`\n },\n url(node) {\n return `z.url()${lengthChecksMini(node)}`\n },\n ipv4: () => 'z.ipv4()',\n ipv6: () => 'z.ipv6()',\n blob: () => 'z.instanceof(File)',\n enum(node) {\n const values = node.namedEnumValues?.map((v) => v.value) ?? node.enumValues ?? []\n const nonNullValues = values.filter((v): v is string | number | boolean => v !== null)\n\n // asConst-style enum: use z.union([z.literal(…), …])\n if (node.namedEnumValues?.length) {\n const literals = nonNullValues.map((v) => `z.literal(${formatLiteral(v)})`)\n if (literals.length === 1) return literals[0]!\n return `z.union([${literals.join(', ')}])`\n }\n\n // Regular enum: use z.enum([…])\n return `z.enum([${nonNullValues.map(formatLiteral).join(', ')}])`\n },\n\n ref(node) {\n if (!node.name) return undefined\n const refName = node.ref ? (extractRefName(node.ref) ?? node.name) : node.name\n const resolvedName = node.ref ? (this.options.resolver?.default(refName, 'function') ?? refName) : node.name\n const isSelfRef = node.ref && this.options.schemaName != null && resolvedName === this.options.schemaName\n\n if (isSelfRef) {\n return `z.lazy(() => ${resolvedName})`\n }\n\n return resolvedName\n },\n object(node) {\n const properties = node.properties\n .map((prop) => {\n const { name: propName, schema } = prop\n\n const meta = syncSchemaRef(schema)\n\n const isNullable = meta.nullable\n const isOptional = schema.optional\n const isNullish = schema.nullish\n\n const hasSelfRef =\n this.options.schemaName != null && containsSelfRef(schema, { schemaName: this.options.schemaName, resolver: this.options.resolver })\n const baseOutput = this.transform(schema) ?? this.transform(createSchema({ type: 'unknown' }))!\n // Strip z.lazy() wrappers inside object getters — the getter itself provides deferred evaluation\n const resolvedOutput = hasSelfRef ? baseOutput.replaceAll(`z.lazy(() => ${this.options.schemaName})`, this.options.schemaName!) : baseOutput\n\n const wrappedOutput = this.options.wrapOutput ? this.options.wrapOutput({ output: resolvedOutput, schema }) || resolvedOutput : resolvedOutput\n\n const value = applyMiniModifiers({\n value: wrappedOutput,\n nullable: isNullable,\n optional: isOptional,\n nullish: isNullish,\n defaultValue: meta.default,\n })\n\n if (hasSelfRef) {\n return `get \"${propName}\"() { return ${value} }`\n }\n return `\"${propName}\": ${value}`\n })\n .join(',\\n ')\n\n return `z.object({\\n ${properties}\\n })`\n },\n array(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n const inner = items.join(', ') || this.transform(createSchema({ type: 'unknown' }))!\n let result = `z.array(${inner})${lengthChecksMini(node)}`\n\n if (node.unique) {\n result += `.refine(items => new Set(items).size === items.length, { message: \"Array entries must be unique\" })`\n }\n\n return result\n },\n tuple(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n\n return `z.tuple([${items.join(', ')}])`\n },\n union(node) {\n const nodeMembers = node.members ?? []\n const members = nodeMembers.map((m) => this.transform(m)).filter(Boolean)\n if (members.length === 0) return ''\n if (members.length === 1) return members[0]!\n if (node.discriminatorPropertyName && !nodeMembers.some((m) => m.type === 'intersection')) {\n // z.discriminatedUnion requires ZodObject members; intersections (ZodIntersection) are not\n // assignable to $ZodDiscriminant, so fall back to z.union when any member is an intersection.\n return `z.discriminatedUnion(${stringify(node.discriminatorPropertyName)}, [${members.join(', ')}])`\n }\n\n return `z.union([${members.join(', ')}])`\n },\n intersection(node) {\n const members = node.members ?? []\n if (members.length === 0) return ''\n\n const [first, ...rest] = members\n if (!first) return ''\n\n let base = this.transform(first)\n if (!base) return ''\n\n for (const member of rest) {\n if (member.primitive === 'string') {\n const s = narrowSchema(member, 'string')\n const c = lengthChecksMini(s ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'number' || member.primitive === 'integer') {\n const n = narrowSchema(member, 'number') ?? narrowSchema(member, 'integer')\n const c = numberChecksMini(n ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'array') {\n const a = narrowSchema(member, 'array')\n const c = lengthChecksMini(a ?? {})\n if (c) {\n base += c\n continue\n }\n }\n const transformed = this.transform(member)\n if (transformed) base = `z.intersection(${base}, ${transformed})`\n }\n\n return base\n },\n ...options.nodes,\n },\n print(node) {\n const { keysToOmit } = this.options\n\n let base = this.transform(node)\n if (!base) return null\n\n const meta = syncSchemaRef(node)\n\n if (keysToOmit?.length && meta.primitive === 'object' && !(meta.type === 'union' && meta.discriminatorPropertyName)) {\n // Mirror printerTs `nonNullable: true`: when omitting keys, the resulting\n // schema is a new non-nullable object type — skip optional/nullable/nullish.\n // Discriminated unions (z.discriminatedUnion) do not support .omit(), so skip them.\n base = `${base}.omit({ ${keysToOmit.map((k) => `\"${k}\": true`).join(', ')} })`\n }\n\n return applyMiniModifiers({\n value: base,\n nullable: meta.nullable,\n optional: meta.optional,\n nullish: meta.nullish,\n defaultValue: meta.default,\n })\n },\n }\n})\n","import { caseParams } from '@kubb/ast'\nimport type { SchemaNode } from '@kubb/ast/types'\nimport { defineGenerator } from '@kubb/core'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations.tsx'\nimport { Zod } from '../components/Zod.tsx'\nimport { ZOD_NAMESPACE_IMPORTS } from '../constants.ts'\nimport { printerZod } from '../printers/printerZod.ts'\nimport { printerZodMini } from '../printers/printerZodMini.ts'\nimport type { PluginZod } from '../types'\nimport { buildSchemaNames } from '../utils.ts'\n\nexport const zodGenerator = defineGenerator<PluginZod>({\n name: 'zod',\n schema(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, printer } = options\n\n if (!node.name) {\n return\n }\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const imports = adapter.getImports(node, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const meta = {\n name: resolver.resolveSchemaName(node.name),\n file: resolver.resolveFile({ name: node.name, extname: '.ts' }, { root, output, group }),\n } as const\n\n const inferTypeName = inferred ? resolver.resolveSchemaTypeName(node.name) : undefined\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {mode === 'split' && imports.map((imp) => <File.Import key={[node.name, imp.path].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n\n <Zod name={meta.name} node={node} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </File>\n )\n },\n operation(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, paramsCasing, printer } = options\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const params = caseParams(node.parameters, paramsCasing)\n\n const meta = {\n file: resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),\n } as const\n\n function renderSchemaEntry({ schema, name, keysToOmit }: { schema: SchemaNode | null; name: string; keysToOmit?: Array<string> }) {\n if (!schema) return null\n\n const inferTypeName = inferred ? resolver.resolveTypeName(name) : undefined\n\n const imports = adapter.getImports(schema, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n\n return (\n <>\n {mode === 'split' &&\n imports.map((imp) => <File.Import key={[name, imp.path, imp.name].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n <Zod name={name} node={schema} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </>\n )\n }\n\n const paramSchemas = params.map((param) => renderSchemaEntry({ schema: param.schema, name: resolver.resolveParamName(node, param) }))\n\n const responseSchemas = node.responses.map((res) =>\n renderSchemaEntry({\n schema: res.schema,\n name: resolver.resolveResponseStatusName(node, res.statusCode),\n keysToOmit: res.keysToOmit,\n }),\n )\n\n const requestSchema = node.requestBody?.schema\n ? renderSchemaEntry({\n schema: {\n ...node.requestBody.schema,\n description: node.requestBody.description ?? node.requestBody.schema.description,\n },\n name: resolver.resolveDataName(node),\n keysToOmit: node.requestBody.keysToOmit,\n })\n : null\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {paramSchemas}\n {responseSchemas}\n {requestSchema}\n </File>\n )\n },\n operations(nodes, options) {\n const { adapter, config, resolver, root } = this\n const { output, importPath, group, operations, paramsCasing } = options\n\n if (!operations) {\n return\n }\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const meta = {\n file: resolver.resolveFile({ name: 'operations', extname: '.ts' }, { root, output, group }),\n } as const\n\n const transformedOperations = nodes.map((node) => {\n const params = caseParams(node.parameters, paramsCasing)\n\n return {\n node,\n data: buildSchemaNames(node, { params, resolver }),\n }\n })\n\n const imports = transformedOperations.flatMap(({ node, data }) => {\n const names = [data.request, ...Object.values(data.responses), ...Object.values(data.parameters)].filter(Boolean) as string[]\n const opFile = resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group })\n\n return names.map((name) => <File.Import key={[name, opFile.path].join('-')} name={[name]} root={meta.file.path} path={opFile.path} />)\n })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import isTypeOnly name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {imports}\n <Operations name=\"operations\" operations={transformedOperations} />\n </File>\n )\n },\n})\n","import { caseParams, createProperty, createSchema } from '@kubb/ast'\nimport type { OperationNode, ParameterNode, SchemaNode } from '@kubb/ast/types'\nimport { defineGenerator } from '@kubb/core'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations.tsx'\nimport { Zod } from '../components/Zod.tsx'\nimport { ZOD_NAMESPACE_IMPORTS } from '../constants.ts'\nimport { printerZod } from '../printers/printerZod.ts'\nimport { printerZodMini } from '../printers/printerZodMini.ts'\nimport type { PluginZod, ResolverZod } from '../types'\n\ntype BuildGroupedParamsSchemaOptions = {\n params: Array<ParameterNode>\n}\n\nfunction buildGroupedParamsSchema({ params, optional }: BuildGroupedParamsSchemaOptions & { optional?: boolean }): SchemaNode {\n return createSchema({\n type: 'object',\n optional,\n primitive: 'object',\n properties: params.map((param) => {\n return createProperty({\n name: param.name,\n required: param.required,\n schema: param.schema,\n })\n }),\n })\n}\n\ntype BuildOperationSchemaOptions = {\n resolver: ResolverZod\n}\n\nfunction buildLegacyResponsesSchemaNode(node: OperationNode, { resolver }: BuildOperationSchemaOptions): SchemaNode | null {\n const isGet = node.method.toLowerCase() === 'get'\n const successResponses = node.responses.filter((res) => {\n const code = Number(res.statusCode)\n return !Number.isNaN(code) && code >= 200 && code < 300\n })\n const errorResponses = node.responses.filter((res) => res.statusCode === 'default' || Number(res.statusCode) >= 400)\n\n const responseSchema =\n successResponses.length > 0\n ? successResponses.length === 1\n ? createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, successResponses[0]!.statusCode) })\n : createSchema({\n type: 'union',\n members: successResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, res.statusCode) })),\n })\n : createSchema({ type: 'any' })\n\n const errorsSchema =\n errorResponses.length > 0\n ? errorResponses.length === 1\n ? createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, errorResponses[0]!.statusCode) })\n : createSchema({\n type: 'union',\n members: errorResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, res.statusCode) })),\n })\n : createSchema({ type: 'any' })\n\n const properties = [createProperty({ name: 'Response', required: true, schema: responseSchema })]\n\n if (!isGet && node.requestBody?.schema) {\n properties.push(\n createProperty({\n name: 'Request',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolveDataName(node) }),\n }),\n )\n }\n\n const queryParam = node.parameters.find((p) => p.in === 'query')\n if (queryParam) {\n properties.push(\n createProperty({\n name: 'QueryParams',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolveQueryParamsName(node, queryParam) }),\n }),\n )\n }\n\n const pathParam = node.parameters.find((p) => p.in === 'path')\n if (pathParam) {\n properties.push(\n createProperty({\n name: 'PathParams',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolvePathParamsName(node, pathParam) }),\n }),\n )\n }\n\n const headerParam = node.parameters.find((p) => p.in === 'header')\n if (headerParam) {\n properties.push(\n createProperty({\n name: 'HeaderParams',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolveHeaderParamsName(node, headerParam) }),\n }),\n )\n }\n\n properties.push(createProperty({ name: 'Errors', required: true, schema: errorsSchema }))\n\n return createSchema({ type: 'object', primitive: 'object', properties })\n}\n\nfunction buildLegacyResponseUnionSchemaNode(node: OperationNode, { resolver }: BuildOperationSchemaOptions): SchemaNode {\n const successResponses = node.responses.filter((res) => {\n const code = Number(res.statusCode)\n return !Number.isNaN(code) && code >= 200 && code < 300\n })\n\n if (successResponses.length === 0) {\n return createSchema({ type: 'any' })\n }\n\n if (successResponses.length === 1) {\n return createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, successResponses[0]!.statusCode) })\n }\n\n return createSchema({\n type: 'union',\n members: successResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, res.statusCode) })),\n })\n}\n\nfunction buildLegacySchemaNames(node: OperationNode, params: Array<ParameterNode>, resolver: ResolverZod) {\n const pathParam = params.find((p) => p.in === 'path')\n const queryParam = params.find((p) => p.in === 'query')\n const headerParam = params.find((p) => p.in === 'header')\n\n const responses: Record<number | string, string> = {}\n const errors: Record<number | string, string> = {}\n\n for (const res of node.responses) {\n const name = resolver.resolveResponseStatusName(node, res.statusCode)\n const statusNum = Number(res.statusCode)\n\n if (!Number.isNaN(statusNum)) {\n responses[statusNum] = name\n if (statusNum >= 400) {\n errors[statusNum] = name\n }\n }\n }\n\n responses['default'] = resolver.resolveResponseName(node)\n\n return {\n request: node.requestBody?.schema ? resolver.resolveDataName(node) : undefined,\n parameters: {\n path: pathParam ? resolver.resolvePathParamsName(node, pathParam) : undefined,\n query: queryParam ? resolver.resolveQueryParamsName(node, queryParam) : undefined,\n header: headerParam ? resolver.resolveHeaderParamsName(node, headerParam) : undefined,\n },\n responses,\n errors,\n }\n}\n\nexport const zodGeneratorLegacy = defineGenerator<PluginZod>({\n name: 'zod-legacy',\n schema(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, printer } = options\n\n if (!node.name) {\n return\n }\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const imports = adapter.getImports(node, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const inferTypeName = inferred ? resolver.resolveSchemaTypeName(node.name) : undefined\n\n const meta = {\n name: resolver.resolveSchemaName(node.name),\n file: resolver.resolveFile({ name: node.name, extname: '.ts' }, { root, output, group }),\n } as const\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {mode === 'split' && imports.map((imp) => <File.Import key={[node.name, imp.path].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n\n <Zod name={meta.name} node={node} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </File>\n )\n },\n operation(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, paramsCasing, printer } = options\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const params = caseParams(node.parameters, paramsCasing)\n\n const meta = {\n file: resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),\n } as const\n\n function renderSchemaEntry({ schema, name, keysToOmit }: { schema: SchemaNode | null; name: string; keysToOmit?: Array<string> }) {\n if (!schema) return null\n\n const inferTypeName = inferred ? resolver.resolveTypeName(name) : undefined\n\n const imports = adapter.getImports(schema, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n\n return (\n <>\n {mode === 'split' &&\n imports.map((imp) => <File.Import key={[name, imp.path, imp.name].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n <Zod name={name} node={schema} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </>\n )\n }\n\n const pathParams = params.filter((p) => p.in === 'path')\n const queryParams = params.filter((p) => p.in === 'query')\n const headerParams = params.filter((p) => p.in === 'header')\n\n const responseSchemas = node.responses.map((res) => {\n const responseName = resolver.resolveResponseStatusName(node, res.statusCode)\n return renderSchemaEntry({\n schema: {\n ...res.schema,\n description: res.description ?? res.schema.description,\n },\n name: responseName,\n keysToOmit: res.keysToOmit,\n })\n })\n\n const requestSchema = node.requestBody?.schema\n ? renderSchemaEntry({\n schema: {\n ...node.requestBody.schema,\n description: node.requestBody.description ?? node.requestBody.schema.description,\n },\n name: resolver.resolveDataName(node),\n keysToOmit: node.requestBody.keysToOmit,\n })\n : null\n\n const legacyParamTypes = [\n pathParams.length > 0\n ? renderSchemaEntry({\n schema: buildGroupedParamsSchema({ params: pathParams, optional: pathParams.every((p) => !p.required) }),\n name: resolver.resolvePathParamsName(node, pathParams[0]!),\n })\n : null,\n queryParams.length > 0\n ? renderSchemaEntry({\n schema: buildGroupedParamsSchema({ params: queryParams, optional: queryParams.every((p) => !p.required) }),\n name: resolver.resolveQueryParamsName(node, queryParams[0]!),\n })\n : null,\n headerParams.length > 0\n ? renderSchemaEntry({\n schema: buildGroupedParamsSchema({ params: headerParams, optional: headerParams.every((p) => !p.required) }),\n name: resolver.resolveHeaderParamsName(node, headerParams[0]!),\n })\n : null,\n ]\n\n const legacyResponsesSchema = renderSchemaEntry({\n schema: buildLegacyResponsesSchemaNode(node, { resolver }),\n name: resolver.resolveResponsesName(node),\n })\n\n const legacyResponseSchema = renderSchemaEntry({\n schema: buildLegacyResponseUnionSchemaNode(node, { resolver }),\n name: resolver.resolveResponseName(node),\n })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {legacyParamTypes}\n {responseSchemas}\n {requestSchema}\n {legacyResponseSchema}\n {legacyResponsesSchema}\n </File>\n )\n },\n operations(nodes, options) {\n const { adapter, config, resolver, root } = this\n const { output, importPath, group, operations, paramsCasing } = options\n\n if (!operations) {\n return\n }\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const meta = {\n file: resolver.resolveFile({ name: 'operations', extname: '.ts' }, { root, output, group }),\n } as const\n\n const transformedOperations = nodes.map((node) => {\n const params = caseParams(node.parameters, paramsCasing)\n\n return {\n node,\n data: buildLegacySchemaNames(node, params, resolver),\n }\n })\n\n const imports = transformedOperations.flatMap(({ node, data }) => {\n const names = [data.request, ...Object.values(data.responses), ...Object.values(data.parameters)].filter(Boolean) as string[]\n const opFile = resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group })\n\n return names.map((name) => <File.Import key={[name, opFile.path].join('-')} name={[name]} root={meta.file.path} path={opFile.path} />)\n })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import isTypeOnly name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {imports}\n <Operations name=\"operations\" operations={transformedOperations} />\n </File>\n )\n },\n})\n","","import { camelCase, pascalCase } from '@internals/utils'\nimport { defineResolver } from '@kubb/core'\nimport type { PluginZod } from '../types.ts'\n\n/**\n * Default resolver for `@kubb/plugin-zod`.\n *\n * Uses `camelCase` naming with a `Schema` suffix for function/type/const names.\n *\n * @example\n * ```ts\n * resolverZod.default('list pets', 'function') // → 'listPetsSchema'\n * resolverZod.default('Pet', 'file') // → 'pet'\n * resolverZod.resolveName('list pets') // → 'listPetsSchema'\n * ```\n */\nexport const resolverZod = defineResolver<PluginZod>(() => {\n return {\n name: 'default',\n pluginName: 'plugin-zod',\n default(name, type) {\n return camelCase(name, { isFile: type === 'file', suffix: type ? 'schema' : undefined })\n },\n resolveSchemaName(name) {\n return camelCase(name, { suffix: 'schema' })\n },\n resolveSchemaTypeName(name) {\n return pascalCase(name, { suffix: 'schema' })\n },\n resolveTypeName(name) {\n return pascalCase(name)\n },\n resolvePathName(name, type) {\n return this.default(name, type)\n },\n resolveParamName(node, param) {\n return this.resolveSchemaName(`${node.operationId} ${param.in} ${param.name}`)\n },\n resolveResponseStatusName(node, statusCode) {\n return this.resolveSchemaName(`${node.operationId} Status ${statusCode}`)\n },\n resolveDataName(node) {\n return this.resolveSchemaName(`${node.operationId} Data`)\n },\n resolveResponsesName(node) {\n return this.resolveSchemaName(`${node.operationId} Responses`)\n },\n resolveResponseName(node) {\n return this.resolveSchemaName(`${node.operationId} Response`)\n },\n resolvePathParamsName(node, param) {\n return this.resolveParamName(node, param)\n },\n resolveQueryParamsName(node, param) {\n return this.resolveParamName(node, param)\n },\n resolveHeaderParamsName(node, param) {\n return this.resolveParamName(node, param)\n },\n }\n})\n","import { defineResolver } from '@kubb/core'\nimport type { PluginZod } from '../types.ts'\nimport { resolverZod } from './resolverZod.ts'\n\n/**\n * Legacy resolver for `@kubb/plugin-zod` that reproduces the naming conventions\n * used in Kubb v4. Enable via `compatibilityPreset: 'kubbV4'`\n * (or by composing this resolver manually).\n *\n * Key differences from the default resolver:\n * - Response status types: `<operationId><StatusCode>Schema` (e.g. `createPets201Schema`) instead of `<operationId>Status201Schema`\n * - Default/error responses: `<operationId>ErrorSchema` instead of `<operationId>StatusDefaultSchema`\n * - Request body: `<operationId>MutationRequestSchema` (non-GET) / `<operationId>QueryRequestSchema` (GET)\n * - Combined responses type: `<operationId>MutationSchema` / `<operationId>QuerySchema`\n * - Response union: `<operationId>MutationResponseSchema` / `<operationId>QueryResponseSchema`\n *\n * @example\n * ```ts\n * import { resolverZodLegacy } from '@kubb/plugin-zod'\n *\n * resolverZodLegacy.resolveResponseStatusName(node, 201) // → 'createPets201Schema'\n * resolverZodLegacy.resolveResponseStatusName(node, 'default') // → 'createPetsErrorSchema'\n * resolverZodLegacy.resolveDataName(node) // → 'createPetsMutationRequestSchema' (POST)\n * resolverZodLegacy.resolveResponsesName(node) // → 'createPetsMutationSchema' (POST)\n * resolverZodLegacy.resolveResponseName(node) // → 'createPetsMutationResponseSchema' (POST)\n * ```\n */\nexport const resolverZodLegacy = defineResolver<PluginZod>(() => {\n return {\n ...resolverZod,\n pluginName: 'plugin-zod',\n resolveResponseStatusName(node, statusCode) {\n if (statusCode === 'default') {\n return this.resolveSchemaName(`${node.operationId} Error`)\n }\n return this.resolveSchemaName(`${node.operationId} ${statusCode}`)\n },\n resolveDataName(node) {\n const suffix = node.method === 'GET' ? 'QueryRequest' : 'MutationRequest'\n return this.resolveSchemaName(`${node.operationId} ${suffix}`)\n },\n resolveResponsesName(node) {\n const suffix = node.method === 'GET' ? 'Query' : 'Mutation'\n return this.resolveSchemaName(`${node.operationId} ${suffix}`)\n },\n resolveResponseName(node) {\n const suffix = node.method === 'GET' ? 'QueryResponse' : 'MutationResponse'\n return this.resolveSchemaName(`${node.operationId} ${suffix}`)\n },\n resolvePathParamsName(node, _param) {\n return this.resolveSchemaName(`${node.operationId} PathParams`)\n },\n resolveQueryParamsName(node, _param) {\n return this.resolveSchemaName(`${node.operationId} QueryParams`)\n },\n resolveHeaderParamsName(node, _param) {\n return this.resolveSchemaName(`${node.operationId} HeaderParams`)\n },\n }\n})\n","import { definePresets } from '@kubb/core'\nimport { zodGenerator } from './generators/zodGenerator.tsx'\nimport { zodGeneratorLegacy } from './generators/zodGeneratorLegacy.tsx'\nimport { printerZod } from './printers/printerZod.ts'\nimport { resolverZod } from './resolvers/resolverZod.ts'\nimport { resolverZodLegacy } from './resolvers/resolverZodLegacy.ts'\nimport type { ResolverZod } from './types.ts'\n\n/**\n * Built-in preset registry for `@kubb/plugin-zod`.\n *\n * - `default` — uses `resolverZod` and `zodGenerator` (current naming conventions).\n * - `kubbV4` — uses `resolverZodLegacy` and `zodGeneratorLegacy` (Kubb v4 naming conventions).\n *\n * Note: `printerZodMini` is selected at runtime by the generator when `mini: true` is set.\n */\nexport const presets = definePresets<ResolverZod>({\n default: {\n name: 'default',\n resolver: resolverZod,\n generators: [zodGenerator],\n printer: printerZod,\n },\n kubbV4: {\n name: 'kubbV4',\n resolver: resolverZodLegacy,\n generators: [zodGeneratorLegacy],\n printer: printerZod,\n },\n})\n","import { camelCase } from '@internals/utils'\nimport { createPlugin, type Group, getPreset, mergeGenerators } from '@kubb/core'\nimport { version } from '../package.json'\nimport { presets } from './presets.ts'\nimport type { PluginZod } from './types.ts'\n\n/**\n * Canonical plugin name for `@kubb/plugin-zod`, used to identify the plugin in driver lookups and warnings.\n */\nexport const pluginZodName = 'plugin-zod' satisfies PluginZod['name']\n\n/**\n * The `@kubb/plugin-zod` plugin factory.\n *\n * Generates Zod validation schemas from an OpenAPI/AST `RootNode`.\n * Walks schemas and operations, delegates rendering to the active generators,\n * and writes barrel files based on `output.barrelType`.\n *\n * @example\n * ```ts\n * import { pluginZod } from '@kubb/plugin-zod'\n *\n * export default defineConfig({\n * plugins: [pluginZod({ output: { path: 'zod' } })],\n * })\n * ```\n */\nexport const pluginZod = createPlugin<PluginZod>((options) => {\n const {\n output = { path: 'zod', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n dateType = 'string',\n typed = false,\n operations = false,\n mini = false,\n guidType = 'uuid',\n importPath = mini ? 'zod/mini' : 'zod',\n coercion = false,\n inferred = false,\n wrapOutput = undefined,\n paramsCasing,\n printer,\n compatibilityPreset = 'default',\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators = [],\n } = options\n\n const preset = getPreset({\n preset: compatibilityPreset,\n presets: presets,\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators,\n })\n\n const generators = preset.generators ?? []\n const mergedGenerator = mergeGenerators(generators)\n\n let resolveNameWarning = false\n let resolvePathWarning = false\n\n return {\n name: pluginZodName,\n version,\n get resolver() {\n return preset.resolver\n },\n get transformer() {\n return preset.transformer\n },\n get options() {\n return {\n output,\n exclude,\n include,\n override,\n group: group\n ? ({\n ...group,\n name: (ctx) => {\n if (group.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n },\n } satisfies Group)\n : undefined,\n dateType,\n typed,\n importPath,\n coercion,\n operations,\n inferred,\n guidType,\n mini,\n wrapOutput,\n paramsCasing,\n printer,\n }\n },\n resolvePath(baseName, pathMode, options) {\n if (!resolvePathWarning) {\n this.warn('Do not use resolvePath for pluginZod, use resolverZod.resolvePath instead')\n resolvePathWarning = true\n }\n\n return this.plugin.resolver.resolvePath(\n { baseName, pathMode, tag: options?.group?.tag, path: options?.group?.path },\n { root: this.root, output, group: this.plugin.options.group },\n )\n },\n resolveName(name, type) {\n if (!resolveNameWarning) {\n this.warn('Do not use resolveName for pluginZod, use resolverZod.default instead')\n resolveNameWarning = true\n }\n\n return this.plugin.resolver.default(name, type)\n },\n async schema(node, options) {\n return mergedGenerator.schema?.call(this, node, options)\n },\n async operation(node, options) {\n return mergedGenerator.operation?.call(this, node, options)\n },\n async operations(nodes, options) {\n return mergedGenerator.operations?.call(this, nodes, options)\n },\n async buildStart() {\n await this.openInStudio({ ast: true })\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,gBAAgB,MAAc,QAAyB;AAS9D,QARmB,KAChB,MAAM,CACN,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,yBAAyB,QAAQ,CACzC,QAAQ,gBAAgB,QAAQ,CAEV,MAAM,gBAAgB,CAAC,OAAO,QAAQ,CAG5D,KAAK,MAAM,MAAM;AAEhB,MADiB,KAAK,SAAS,KAAK,SAAS,KAAK,aAAa,CACjD,QAAO;AACrB,MAAI,MAAM,KAAK,CAAC,OAAQ,QAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;AAC3E,SAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;GACnD,CACD,KAAK,GAAG,CACR,QAAQ,iBAAiB,GAAG;;;;;;;;;;AAWjC,SAAS,iBAAiB,MAAc,eAAkE;CACxG,MAAM,QAAQ,KAAK,MAAM,iBAAiB;AAC1C,QAAO,MAAM,KAAK,MAAM,MAAM,cAAc,MAAM,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC,KAAK,IAAI;;;;;;;;;;AAWtF,SAAgB,UAAU,MAAc,EAAE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"index.cjs","names":["File","Type","Const","File","Const","Type","File","File"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/string.ts","../../../internals/utils/src/object.ts","../../../internals/utils/src/regexp.ts","../src/components/Operations.tsx","../src/components/Zod.tsx","../src/constants.ts","../src/utils.ts","../src/printers/printerZod.ts","../src/printers/printerZodMini.ts","../src/generators/zodGenerator.tsx","../src/generators/zodGeneratorLegacy.tsx","../package.json","../src/resolvers/resolverZod.ts","../src/resolvers/resolverZodLegacy.ts","../src/presets.ts","../src/plugin.ts"],"sourcesContent":["type Options = {\n /**\n * When `true`, dot-separated segments are split on `.` and joined with `/` after casing.\n */\n isFile?: boolean\n /**\n * Text prepended before casing is applied.\n */\n prefix?: string\n /**\n * Text appended before casing is applied.\n */\n suffix?: string\n}\n\n/**\n * Shared implementation for camelCase and PascalCase conversion.\n * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)\n * and capitalizes each word according to `pascal`.\n *\n * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.\n */\nfunction toCamelOrPascal(text: string, pascal: boolean): string {\n const normalized = text\n .trim()\n .replace(/([a-z\\d])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .replace(/(\\d)([a-z])/g, '$1 $2')\n\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n *\n * Only splits on dots followed by a letter so that version numbers\n * embedded in operationIds (e.g. `v2025.0`) are kept intact.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split(/\\.(?=[a-zA-Z])/)\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n const processed = `${prefix} ${text} ${suffix}`.trim()\n return processed\n .replace(/([a-z])([A-Z])/g, '$1_$2')\n .replace(/[\\s\\-.]+/g, '_')\n .replace(/[^a-zA-Z0-9_]/g, '')\n .toLowerCase()\n .split('_')\n .filter(Boolean)\n .join('_')\n}\n\n/**\n * Converts `text` to SCREAMING_SNAKE_CASE.\n *\n * @example\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * Strips a single matching pair of `\"...\"`, `'...'`, or `` `...` `` from both ends of `text`.\n * Returns the string unchanged when no balanced quote pair is found.\n *\n * @example\n * trimQuotes('\"hello\"') // 'hello'\n * trimQuotes('hello') // 'hello'\n */\nexport function trimQuotes(text: string): string {\n if (text.length >= 2) {\n const first = text[0]\n const last = text[text.length - 1]\n if ((first === '\"' && last === '\"') || (first === \"'\" && last === \"'\") || (first === '`' && last === '`')) {\n return text.slice(1, -1)\n }\n }\n return text\n}\n\n/**\n * Escapes characters that are not allowed inside JS string literals.\n * Handles quotes, backslashes, and Unicode line terminators (U+2028 / U+2029).\n *\n * @see http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.4\n *\n * @example\n * ```ts\n * jsStringEscape('say \"hi\"\\nbye') // 'say \\\\\"hi\\\\\"\\\\nbye'\n * ```\n */\nexport function jsStringEscape(input: unknown): string {\n return `${input}`.replace(/[\"'\\\\\\n\\r\\u2028\\u2029]/g, (character) => {\n switch (character) {\n case '\"':\n case \"'\":\n case '\\\\':\n return `\\\\${character}`\n case '\\n':\n return '\\\\n'\n case '\\r':\n return '\\\\r'\n case '\\u2028':\n return '\\\\u2028'\n case '\\u2029':\n return '\\\\u2029'\n default:\n return ''\n }\n })\n}\n\n/**\n * Returns a masked version of a string, showing only the first and last few characters.\n * Useful for logging sensitive values (tokens, keys) without exposing the full value.\n *\n * @example\n * maskString('KUBB_STUDIO-abc123-xyz789') // 'KUBB_STUDIO-…789'\n */\nexport function maskString(value: string, start = 8, end = 4): string {\n if (value.length <= start + end) return value\n return `${value.slice(0, start)}…${value.slice(-end)}`\n}\n\n/**\n * Strips the file extension from a path or file name.\n * Only removes the last `.ext` segment when the dot is not part of a directory name.\n *\n * @example\n * trimExtName('petStore.ts') // 'petStore'\n * trimExtName('/src/models/pet.ts') // '/src/models/pet'\n * trimExtName('/project.v2/gen/pet.ts') // '/project.v2/gen/pet'\n * trimExtName('noExtension') // 'noExtension'\n */\nexport function trimExtName(text: string): string {\n const dotIndex = text.lastIndexOf('.')\n if (dotIndex > 0 && !text.includes('/', dotIndex)) {\n return text.slice(0, dotIndex)\n }\n return text\n}\n","import { trimQuotes } from './string.ts'\n\n/**\n * Serializes a primitive value to a JSON string literal, stripping any surrounding quote characters first.\n *\n * @example\n * stringify('hello') // '\"hello\"'\n * stringify('\"hello\"') // '\"hello\"'\n */\nexport function stringify(value: string | number | boolean | undefined): string {\n if (value === undefined || value === null) return '\"\"'\n return JSON.stringify(trimQuotes(value.toString()))\n}\n\n/**\n * Converts a plain object into a multiline key-value string suitable for embedding in generated code.\n * Nested objects are recursively stringified with indentation.\n *\n * @example\n * stringifyObject({ foo: 'bar', nested: { a: 1 } })\n * // 'foo: bar,\\nnested: {\\n a: 1\\n }'\n */\nexport function stringifyObject(value: Record<string, unknown>): string {\n const items = Object.entries(value)\n .map(([key, val]) => {\n if (val !== null && typeof val === 'object') {\n return `${key}: {\\n ${stringifyObject(val as Record<string, unknown>)}\\n }`\n }\n return `${key}: ${val}`\n })\n .filter(Boolean)\n return items.join(',\\n')\n}\n\n/**\n * Strips functions, symbols, and `undefined` values from plugin options for safe JSON transport.\n *\n * @example\n * ```ts\n * serializePluginOptions({ output: './src', onWrite: () => {} })\n * // { output: './src' } (function stripped)\n * ```\n */\nexport function serializePluginOptions<TOptions extends object>(options: TOptions): TOptions {\n if (options === null || options === undefined) return {} as TOptions\n if (typeof options !== 'object') return options\n if (Array.isArray(options)) return options.map(serializePluginOptions) as unknown as TOptions\n\n const serialized: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(options)) {\n if (typeof value === 'function' || typeof value === 'symbol' || value === undefined) continue\n serialized[key] = value !== null && typeof value === 'object' ? serializePluginOptions(value as object) : value\n }\n return serialized as TOptions\n}\n\n/**\n * Strips all `undefined` values from an object recursively by round-tripping through JSON.\n * Useful for clean inline snapshot assertions that only show fields with actual values.\n *\n * @example\n * toSnapshot({ kind: 'Schema', name: undefined, type: 'string' })\n * // { kind: 'Schema', type: 'string' }\n */\nexport function toSnapshot<T>(value: T): T {\n return JSON.parse(JSON.stringify(value))\n}\n\n/**\n * Converts a dot-notation path or string array into an optional-chaining accessor expression.\n *\n * @example\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // → \"lastPage?.['pagination']?.['next']?.['id']\"\n */\nexport function getNestedAccessor(param: string | string[], accessor: string): string | null {\n const parts = Array.isArray(param) ? param : param.split('.')\n if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) return null\n return `${accessor}?.['${`${parts.join(\"']?.['\")}']`}`\n}\n","import { trimQuotes } from './string.ts'\n\n/**\n * Converts a pattern string into a `new RegExp(...)` constructor call or a regex literal string.\n * Inline flags expressed as `^(?im)` prefixes are extracted and applied to the resulting expression.\n * Pass `null` as the second argument to emit a `/pattern/flags` literal instead.\n *\n * @example\n * toRegExpString('^(?im)foo') // → 'new RegExp(\"foo\", \"im\")'\n * toRegExpString('^(?im)foo', null) // → '/foo/im'\n */\nexport function toRegExpString(text: string, func: string | null = 'RegExp'): string {\n const raw = trimQuotes(text)\n\n const match = raw.match(/^\\^(\\(\\?([igmsuy]+)\\))/i)\n const replacementTarget = match?.[1] ?? ''\n const matchedFlags = match?.[2]\n const cleaned = raw\n .replace(/^\\\\?\\//, '')\n .replace(/\\\\?\\/$/, '')\n .replace(replacementTarget, '')\n\n const { source, flags } = new RegExp(cleaned, matchedFlags)\n\n if (func === null) return `/${source}/${flags}`\n\n return `new ${func}(${JSON.stringify(source)}${flags ? `, ${JSON.stringify(flags)}` : ''})`\n}\n","import { stringifyObject } from '@internals/utils'\nimport type { OperationNode } from '@kubb/ast/types'\nimport { Const, File, Type } from '@kubb/renderer-jsx'\nimport type { KubbReactNode } from '@kubb/renderer-jsx/types'\n\ntype SchemaNames = {\n request: string | undefined\n parameters: {\n path: string | undefined\n query: string | undefined\n header: string | undefined\n }\n responses: { default?: string } & Record<number | string, string>\n errors: Record<number | string, string>\n}\n\ntype Props = {\n name: string\n operations: Array<{ node: OperationNode; data: SchemaNames }>\n}\n\nexport function Operations({ name, operations }: Props): KubbReactNode {\n const operationsJSON = operations.reduce<Record<string, unknown>>(\n (prev, acc) => {\n prev[`\"${acc.node.operationId}\"`] = acc.data\n\n return prev\n },\n {} as Record<string, unknown>,\n )\n\n const pathsJSON = operations.reduce<Record<string, Record<string, string>>>((prev, acc) => {\n prev[`\"${acc.node.path}\"`] = {\n ...(prev[`\"${acc.node.path}\"`] ?? {}),\n [acc.node.method]: `operations[\"${acc.node.operationId}\"]`,\n }\n\n return prev\n }, {})\n\n return (\n <>\n <File.Source name=\"OperationSchema\" isExportable isIndexable>\n <Type name=\"OperationSchema\" export>{`{\n readonly request: z.ZodTypeAny | undefined;\n readonly parameters: {\n readonly path: z.ZodTypeAny | undefined;\n readonly query: z.ZodTypeAny | undefined;\n readonly header: z.ZodTypeAny | undefined;\n };\n readonly responses: {\n readonly [status: number]: z.ZodTypeAny;\n readonly default: z.ZodTypeAny;\n };\n readonly errors: {\n readonly [status: number]: z.ZodTypeAny;\n };\n}`}</Type>\n </File.Source>\n <File.Source name=\"OperationsMap\" isExportable isIndexable>\n <Type name=\"OperationsMap\" export>\n {'Record<string, OperationSchema>'}\n </Type>\n </File.Source>\n <File.Source name={name} isExportable isIndexable>\n <Const export name={name} asConst>\n {`{${stringifyObject(operationsJSON)}}`}\n </Const>\n </File.Source>\n <File.Source name={'paths'} isExportable isIndexable>\n <Const export name={'paths'} asConst>\n {`{${stringifyObject(pathsJSON)}}`}\n </Const>\n </File.Source>\n </>\n )\n}\n","import type { Printer } from '@kubb/ast'\nimport type { SchemaNode } from '@kubb/ast/types'\nimport { Const, File, Type } from '@kubb/renderer-jsx'\nimport type { KubbReactNode } from '@kubb/renderer-jsx/types'\nimport type { PrinterZodFactory } from '../printers/printerZod.ts'\nimport type { PrinterZodMiniFactory } from '../printers/printerZodMini.ts'\n\ntype Props = {\n name: string\n node: SchemaNode\n /**\n * Pre-configured printer instance created by the generator.\n * The generator selects `printerZod` or `printerZodMini` based on the `mini` option,\n * then merges in any user-supplied `printer.nodes` overrides.\n */\n printer: Printer<PrinterZodFactory> | Printer<PrinterZodMiniFactory>\n inferTypeName?: string\n}\n\nexport function Zod({ name, node, printer, inferTypeName }: Props): KubbReactNode {\n const output = printer.print(node)\n\n if (!output) {\n return\n }\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Const export name={name}>\n {output}\n </Const>\n </File.Source>\n {inferTypeName && (\n <File.Source name={inferTypeName} isExportable isIndexable isTypeOnly>\n <Type export name={inferTypeName}>\n {`z.infer<typeof ${name}>`}\n </Type>\n </File.Source>\n )}\n </>\n )\n}\n","/**\n * Import paths that use a namespace import (`import * as z from '...'`).\n * All other import paths use a named import (`import { z } from '...'`).\n */\nexport const ZOD_NAMESPACE_IMPORTS = new Set(['zod', 'zod/mini'] as const)\n","import { stringify, toRegExpString } from '@internals/utils'\nimport { createProperty, createSchema, extractRefName } from '@kubb/ast'\nimport type { OperationNode, ParameterNode, SchemaNode } from '@kubb/ast/types'\nimport type { PluginZod, ResolverZod } from './types.ts'\n\n/**\n * Returns `true` when the given coercion option enables coercion for the specified type.\n */\nexport function shouldCoerce(coercion: PluginZod['resolvedOptions']['coercion'] | undefined, type: 'dates' | 'strings' | 'numbers'): boolean {\n if (coercion === undefined || coercion === false) return false\n if (coercion === true) return true\n\n return !!coercion[type]\n}\n\n/**\n * Collects all resolved schema names for an operation's parameters and responses\n * into a single lookup object, useful for building imports and type references.\n */\nexport function buildSchemaNames(node: OperationNode, { params, resolver }: { params: Array<ParameterNode>; resolver: ResolverZod }) {\n const pathParam = params.find((p) => p.in === 'path')\n const queryParam = params.find((p) => p.in === 'query')\n const headerParam = params.find((p) => p.in === 'header')\n\n const responses: Record<number | string, string> = {}\n const errors: Record<number | string, string> = {}\n\n for (const res of node.responses) {\n const name = resolver.resolveResponseStatusName(node, res.statusCode)\n const statusNum = Number(res.statusCode)\n\n if (!Number.isNaN(statusNum)) {\n responses[statusNum] = name\n if (statusNum >= 400) {\n errors[statusNum] = name\n }\n }\n }\n\n responses['default'] = resolver.resolveResponseName(node)\n\n return {\n request: node.requestBody?.schema ? resolver.resolveDataName(node) : undefined,\n parameters: {\n path: pathParam ? resolver.resolvePathParamsName(node, pathParam) : undefined,\n query: queryParam ? resolver.resolveQueryParamsName(node, queryParam) : undefined,\n header: headerParam ? resolver.resolveHeaderParamsName(node, headerParam) : undefined,\n },\n responses,\n errors,\n }\n}\n\n/**\n * Format a default value as a code-level literal.\n * Objects become `{}`, primitives become their string representation, strings are quoted.\n */\nexport function formatDefault(value: unknown): string {\n if (typeof value === 'string') return stringify(value)\n if (typeof value === 'object' && value !== null) return '{}'\n\n return String(value ?? '')\n}\n\n/**\n * Format a primitive enum/literal value.\n * Strings are quoted; numbers and booleans are emitted raw.\n */\nexport function formatLiteral(v: string | number | boolean): string {\n if (typeof v === 'string') return stringify(v)\n\n return String(v)\n}\n\nexport type NumericConstraints = {\n min?: number\n max?: number\n exclusiveMinimum?: number\n exclusiveMaximum?: number\n multipleOf?: number\n}\n\nexport type LengthConstraints = {\n min?: number\n max?: number\n pattern?: string\n}\n\nexport type ModifierOptions = {\n value: string\n nullable?: boolean\n optional?: boolean\n nullish?: boolean\n defaultValue?: unknown\n description?: string\n}\n\n/**\n * Build `.min()` / `.max()` / `.gt()` / `.lt()` constraint chains for numbers\n * using the standard chainable Zod v4 API.\n */\nexport function numberConstraints({ min, max, exclusiveMinimum, exclusiveMaximum, multipleOf }: NumericConstraints): string {\n return [\n min !== undefined ? `.min(${min})` : '',\n max !== undefined ? `.max(${max})` : '',\n exclusiveMinimum !== undefined ? `.gt(${exclusiveMinimum})` : '',\n exclusiveMaximum !== undefined ? `.lt(${exclusiveMaximum})` : '',\n multipleOf !== undefined ? `.multipleOf(${multipleOf})` : '',\n ].join('')\n}\n\n/**\n * Build `.min()` / `.max()` / `.regex()` chains for strings/arrays\n * using the standard chainable Zod v4 API.\n */\nexport function lengthConstraints({ min, max, pattern }: LengthConstraints): string {\n return [\n min !== undefined ? `.min(${min})` : '',\n max !== undefined ? `.max(${max})` : '',\n pattern !== undefined ? `.regex(${toRegExpString(pattern, null)})` : '',\n ].join('')\n}\n\n/**\n * Build `.check(z.minimum(), z.maximum())` for `zod/mini` numeric constraints.\n */\nexport function numberChecksMini({ min, max, exclusiveMinimum, exclusiveMaximum, multipleOf }: NumericConstraints): string {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minimum(${min})`)\n if (max !== undefined) checks.push(`z.maximum(${max})`)\n if (exclusiveMinimum !== undefined) checks.push(`z.minimum(${exclusiveMinimum}, { exclusive: true })`)\n if (exclusiveMaximum !== undefined) checks.push(`z.maximum(${exclusiveMaximum}, { exclusive: true })`)\n if (multipleOf !== undefined) checks.push(`z.multipleOf(${multipleOf})`)\n return checks.length ? `.check(${checks.join(', ')})` : ''\n}\n\n/**\n * Build `.check(z.minLength(), z.maxLength(), z.regex())` for `zod/mini` length constraints.\n */\nexport function lengthChecksMini({ min, max, pattern }: LengthConstraints): string {\n const checks: string[] = []\n if (min !== undefined) checks.push(`z.minLength(${min})`)\n if (max !== undefined) checks.push(`z.maxLength(${max})`)\n if (pattern !== undefined) checks.push(`z.regex(${toRegExpString(pattern, null)})`)\n return checks.length ? `.check(${checks.join(', ')})` : ''\n}\n\n/**\n * Apply nullable / optional / nullish modifiers and an optional `.describe()` call\n * to a schema value string using the chainable Zod v4 API.\n */\nexport function applyModifiers({ value, nullable, optional, nullish, defaultValue, description }: ModifierOptions): string {\n let result = value\n if (nullish || (nullable && optional)) {\n result = `${result}.nullish()`\n } else if (optional) {\n result = `${result}.optional()`\n } else if (nullable) {\n result = `${result}.nullable()`\n }\n if (defaultValue !== undefined) {\n result = `${result}.default(${formatDefault(defaultValue)})`\n }\n if (description) {\n result = `${result}.describe(${stringify(description)})`\n }\n return result\n}\n\n/**\n * Apply nullable / optional / nullish modifiers using the functional `zod/mini` API\n * (`z.nullable()`, `z.optional()`, `z.nullish()`).\n */\nexport function applyMiniModifiers({ value, nullable, optional, nullish, defaultValue }: Omit<ModifierOptions, 'description'>): string {\n let result = value\n if (nullish) {\n result = `z.nullish(${result})`\n } else {\n if (nullable) {\n result = `z.nullable(${result})`\n }\n if (optional) {\n result = `z.optional(${result})`\n }\n }\n if (defaultValue !== undefined) {\n result = `z._default(${result}, ${formatDefault(defaultValue)})`\n }\n return result\n}\n\n/**\n * Returns true when the schema tree contains a self-referential `$ref`\n * whose resolved name matches `schemaName`.\n *\n * A `visited` set prevents infinite recursion on circular schema graphs.\n */\nexport function containsSelfRef(\n node: SchemaNode,\n { schemaName, resolver, visited = new Set() }: { schemaName: string; resolver: ResolverZod | undefined; visited?: Set<SchemaNode> },\n): boolean {\n if (visited.has(node)) return false\n visited.add(node)\n\n if (node.type === 'ref' && node.ref) {\n const rawName = extractRefName(node.ref) ?? node.name\n const resolved = rawName ? (resolver?.default(rawName, 'function') ?? rawName) : node.name\n return resolved === schemaName\n }\n if (node.type === 'object') {\n if (node.properties?.some((p) => containsSelfRef(p.schema, { schemaName, resolver, visited }))) return true\n if (node.additionalProperties && node.additionalProperties !== true) {\n return containsSelfRef(node.additionalProperties, { schemaName, resolver, visited })\n }\n return false\n }\n if (node.type === 'array' || node.type === 'tuple') {\n return node.items?.some((item) => containsSelfRef(item, { schemaName, resolver, visited })) ?? false\n }\n if (node.type === 'union' || node.type === 'intersection') {\n return node.members?.some((m) => containsSelfRef(m, { schemaName, resolver, visited })) ?? false\n }\n return false\n}\n\ntype BuildGroupedParamsSchemaOptions = {\n params: Array<ParameterNode>\n optional?: boolean\n}\n\n/**\n * Builds an `object` schema node grouping the given parameter nodes.\n * The `primitive: 'object'` marker ensures the Zod printer emits `z.object(…)` rather than a record.\n */\nexport function buildGroupedParamsSchema({ params, optional }: BuildGroupedParamsSchemaOptions): SchemaNode {\n return createSchema({\n type: 'object',\n optional,\n primitive: 'object',\n properties: params.map((param) =>\n createProperty({\n name: param.name,\n required: param.required,\n schema: param.schema,\n }),\n ),\n })\n}\n","import { stringify } from '@internals/utils'\nimport { createSchema, extractRefName, narrowSchema, syncSchemaRef } from '@kubb/ast'\nimport type { PrinterFactoryOptions, PrinterPartial } from '@kubb/core'\nimport { definePrinter } from '@kubb/core'\nimport type { PluginZod, ResolverZod } from '../types.ts'\nimport { applyModifiers, containsSelfRef, formatLiteral, lengthConstraints, numberConstraints, shouldCoerce } from '../utils.ts'\n\n/**\n * Partial map of node-type overrides for the Zod printer.\n *\n * Each key is a `SchemaType` string (e.g. `'date'`, `'string'`). The function\n * replaces the built-in handler for that node type. Use `this.transform` to\n * recurse into nested schema nodes, and `this.options` to read printer options.\n *\n * @example Override the `date` handler\n * ```ts\n * pluginZod({\n * printer: {\n * nodes: {\n * date(node) {\n * return 'z.string().date()'\n * },\n * },\n * },\n * })\n * ```\n */\nexport type PrinterZodNodes = PrinterPartial<string, PrinterZodOptions>\n\nexport type PrinterZodOptions = {\n coercion?: PluginZod['resolvedOptions']['coercion']\n guidType?: PluginZod['resolvedOptions']['guidType']\n wrapOutput?: PluginZod['resolvedOptions']['wrapOutput']\n resolver?: ResolverZod\n schemaName?: string\n /**\n * Property keys to exclude from the generated object schema via `.omit({ key: true })`.\n */\n keysToOmit?: Array<string>\n /**\n * Partial map of node-type overrides. Each entry replaces the built-in handler for that node type.\n */\n nodes?: PrinterZodNodes\n}\n\nexport type PrinterZodFactory = PrinterFactoryOptions<'zod', PrinterZodOptions, string, string>\n\n/**\n * Zod v4 printer built with `definePrinter`.\n *\n * Converts a `SchemaNode` AST into a **standard** Zod v4 code string\n * using the chainable method API (`.optional()`, `.nullable()`, etc.).\n *\n * For the `zod/mini` functional API, see {@link printerZodMini}.\n *\n * @example\n * ```ts\n * const printer = printerZod({ coercion: false })\n * const code = printer.print(stringSchemaNode) // \"z.string()\"\n * ```\n */\nexport const printerZod = definePrinter<PrinterZodFactory>((options) => {\n return {\n name: 'zod',\n options,\n nodes: {\n any: () => 'z.any()',\n unknown: () => 'z.unknown()',\n void: () => 'z.void()',\n never: () => 'z.never()',\n boolean: () => 'z.boolean()',\n null: () => 'z.null()',\n string(node) {\n const base = shouldCoerce(this.options.coercion, 'strings') ? 'z.coerce.string()' : 'z.string()'\n\n return `${base}${lengthConstraints(node)}`\n },\n number(node) {\n const base = shouldCoerce(this.options.coercion, 'numbers') ? 'z.coerce.number()' : 'z.number()'\n\n return `${base}${numberConstraints(node)}`\n },\n integer(node) {\n const base = shouldCoerce(this.options.coercion, 'numbers') ? 'z.coerce.number().int()' : 'z.int()'\n\n return `${base}${numberConstraints(node)}`\n },\n bigint() {\n return shouldCoerce(this.options.coercion, 'numbers') ? 'z.coerce.bigint()' : 'z.bigint()'\n },\n date(node) {\n if (node.representation === 'string') {\n return 'z.iso.date()'\n }\n\n return shouldCoerce(this.options.coercion, 'dates') ? 'z.coerce.date()' : 'z.date()'\n },\n datetime(node) {\n if (node.offset) return 'z.iso.datetime({ offset: true })'\n if (node.local) return 'z.iso.datetime({ local: true })'\n\n return 'z.iso.datetime()'\n },\n time(node) {\n if (node.representation === 'string') {\n return 'z.iso.time()'\n }\n\n return shouldCoerce(this.options.coercion, 'dates') ? 'z.coerce.date()' : 'z.date()'\n },\n uuid(node) {\n const base = this.options.guidType === 'guid' ? 'z.guid()' : 'z.uuid()'\n\n return `${base}${lengthConstraints(node)}`\n },\n email(node) {\n return `z.email()${lengthConstraints(node)}`\n },\n url(node) {\n return `z.url()${lengthConstraints(node)}`\n },\n ipv4: () => 'z.ipv4()',\n ipv6: () => 'z.ipv6()',\n blob: () => 'z.instanceof(File)',\n enum(node) {\n const values = node.namedEnumValues?.map((v) => v.value) ?? node.enumValues ?? []\n const nonNullValues = values.filter((v): v is string | number | boolean => v !== null)\n\n // asConst-style enum: use z.union([z.literal(…), …])\n if (node.namedEnumValues?.length) {\n const literals = nonNullValues.map((v) => `z.literal(${formatLiteral(v)})`)\n\n if (literals.length === 1) return literals[0]!\n return `z.union([${literals.join(', ')}])`\n }\n\n // Regular enum: use z.enum([…])\n return `z.enum([${nonNullValues.map(formatLiteral).join(', ')}])`\n },\n ref(node) {\n if (!node.name) return undefined\n const refName = node.ref ? (extractRefName(node.ref) ?? node.name) : node.name\n const resolvedName = node.ref ? (this.options.resolver?.default(refName, 'function') ?? refName) : node.name\n const isSelfRef = node.ref && this.options.schemaName != null && resolvedName === this.options.schemaName\n\n if (isSelfRef) {\n return `z.lazy(() => ${resolvedName})`\n }\n\n return resolvedName\n },\n object(node) {\n const properties = node.properties\n .map((prop) => {\n const { name: propName, schema } = prop\n\n const meta = syncSchemaRef(schema)\n\n const isNullable = meta.nullable\n const isOptional = schema.optional\n const isNullish = schema.nullish\n\n const hasSelfRef =\n this.options.schemaName != null && containsSelfRef(schema, { schemaName: this.options.schemaName, resolver: this.options.resolver })\n const baseOutput = this.transform(schema) ?? this.transform(createSchema({ type: 'unknown' }))!\n // Strip z.lazy() wrappers inside object getters — the getter itself provides deferred evaluation\n const resolvedOutput = hasSelfRef ? baseOutput.replaceAll(`z.lazy(() => ${this.options.schemaName})`, this.options.schemaName!) : baseOutput\n\n const wrappedOutput = this.options.wrapOutput ? this.options.wrapOutput({ output: resolvedOutput, schema }) || resolvedOutput : resolvedOutput\n\n const value = applyModifiers({\n value: wrappedOutput,\n nullable: isNullable,\n optional: isOptional,\n nullish: isNullish,\n defaultValue: meta.default,\n description: meta.description,\n })\n\n if (hasSelfRef) {\n return `get \"${propName}\"() { return ${value} }`\n }\n return `\"${propName}\": ${value}`\n })\n .join(',\\n ')\n\n let result = `z.object({\\n ${properties}\\n })`\n\n // Handle additionalProperties as .catchall() or .strict()\n if (node.additionalProperties && node.additionalProperties !== true) {\n const catchallType = this.transform(node.additionalProperties)\n if (catchallType) {\n result += `.catchall(${catchallType})`\n }\n } else if (node.additionalProperties === true) {\n result += `.catchall(${this.transform(createSchema({ type: 'unknown' }))})`\n } else if (node.additionalProperties === false) {\n result += '.strict()'\n }\n\n return result\n },\n array(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n const inner = items.join(', ') || this.transform(createSchema({ type: 'unknown' }))!\n let result = `z.array(${inner})${lengthConstraints(node)}`\n\n if (node.unique) {\n result += `.refine(items => new Set(items).size === items.length, { message: \"Array entries must be unique\" })`\n }\n\n return result\n },\n tuple(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n\n return `z.tuple([${items.join(', ')}])`\n },\n union(node) {\n const nodeMembers = node.members ?? []\n const members = nodeMembers.map((m) => this.transform(m)).filter(Boolean)\n if (members.length === 0) return ''\n if (members.length === 1) return members[0]!\n if (node.discriminatorPropertyName && !nodeMembers.some((m) => m.type === 'intersection')) {\n // z.discriminatedUnion requires ZodObject members; intersections (ZodIntersection) are not\n // assignable to $ZodDiscriminant, so fall back to z.union when any member is an intersection.\n return `z.discriminatedUnion(${stringify(node.discriminatorPropertyName)}, [${members.join(', ')}])`\n }\n\n return `z.union([${members.join(', ')}])`\n },\n intersection(node) {\n const members = node.members ?? []\n if (members.length === 0) return ''\n\n const [first, ...rest] = members\n if (!first) return ''\n\n let base = this.transform(first)\n if (!base) return ''\n\n for (const member of rest) {\n if (member.primitive === 'string') {\n const s = narrowSchema(member, 'string')\n const c = lengthConstraints(s ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'number' || member.primitive === 'integer') {\n const n = narrowSchema(member, 'number') ?? narrowSchema(member, 'integer')\n const c = numberConstraints(n ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'array') {\n const a = narrowSchema(member, 'array')\n const c = lengthConstraints(a ?? {})\n if (c) {\n base += c\n continue\n }\n }\n const transformed = this.transform(member)\n if (transformed) base = `${base}.and(${transformed})`\n }\n\n return base\n },\n ...options.nodes,\n },\n print(node) {\n const { keysToOmit } = this.options\n\n let base = this.transform(node)\n if (!base) return null\n\n const meta = syncSchemaRef(node)\n\n if (keysToOmit?.length && meta.primitive === 'object' && !(meta.type === 'union' && meta.discriminatorPropertyName)) {\n // Mirror printerTs `nonNullable: true`: when omitting keys, the resulting\n // schema is a new non-nullable object type — skip optional/nullable/nullish.\n // Discriminated unions (z.discriminatedUnion) do not support .omit(), so skip them.\n base = `${base}.omit({ ${keysToOmit.map((k) => `\"${k}\": true`).join(', ')} })`\n }\n\n return applyModifiers({\n value: base,\n nullable: meta.nullable,\n optional: meta.optional,\n nullish: meta.nullish,\n defaultValue: meta.default,\n description: meta.description,\n })\n },\n }\n})\n","import { stringify } from '@internals/utils'\nimport { createSchema, extractRefName, narrowSchema, syncSchemaRef } from '@kubb/ast'\nimport type { PrinterFactoryOptions, PrinterPartial } from '@kubb/core'\nimport { definePrinter } from '@kubb/core'\nimport type { PluginZod, ResolverZod } from '../types.ts'\nimport { applyMiniModifiers, containsSelfRef, formatLiteral, lengthChecksMini, numberChecksMini } from '../utils.ts'\n\n/**\n * Partial map of node-type overrides for the Zod Mini printer.\n *\n * Each key is a `SchemaType` string (e.g. `'date'`, `'string'`). The function\n * replaces the built-in handler for that node type. Use `this.transform` to\n * recurse into nested schema nodes, and `this.options` to read printer options.\n *\n * @example Override the `date` handler\n * ```ts\n * pluginZod({\n * mini: true,\n * printer: {\n * nodes: {\n * date(node) {\n * return 'z.iso.date()'\n * },\n * },\n * },\n * })\n * ```\n */\nexport type PrinterZodMiniNodes = PrinterPartial<string, PrinterZodMiniOptions>\n\nexport type PrinterZodMiniOptions = {\n guidType?: PluginZod['resolvedOptions']['guidType']\n wrapOutput?: PluginZod['resolvedOptions']['wrapOutput']\n resolver?: ResolverZod\n schemaName?: string\n /**\n * Property keys to exclude from the generated object schema via `.omit({ key: true })`.\n */\n keysToOmit?: Array<string>\n /**\n * Partial map of node-type overrides. Each entry replaces the built-in handler for that node type.\n */\n nodes?: PrinterZodMiniNodes\n}\n\nexport type PrinterZodMiniFactory = PrinterFactoryOptions<'zod-mini', PrinterZodMiniOptions, string, string>\n/**\n * Zod v4 **Mini** printer built with `definePrinter`.\n *\n * Converts a `SchemaNode` AST into a Zod v4 Mini code string using the\n * functional API (`z.optional(z.string())`) for better tree-shaking.\n *\n * For the standard chainable API, see {@link printerZod}.\n *\n * @example\n * ```ts\n * const printer = printerZodMini({})\n * const code = printer.print(optionalStringNode) // \"z.optional(z.string())\"\n * ```\n */\nexport const printerZodMini = definePrinter<PrinterZodMiniFactory>((options) => {\n return {\n name: 'zod-mini',\n options,\n nodes: {\n any: () => 'z.any()',\n unknown: () => 'z.unknown()',\n void: () => 'z.void()',\n never: () => 'z.never()',\n boolean: () => 'z.boolean()',\n null: () => 'z.null()',\n string(node) {\n return `z.string()${lengthChecksMini(node)}`\n },\n number(node) {\n return `z.number()${numberChecksMini(node)}`\n },\n integer(node) {\n return `z.int()${numberChecksMini(node)}`\n },\n bigint(node) {\n return `z.bigint()${numberChecksMini(node)}`\n },\n date(node) {\n if (node.representation === 'string') {\n return 'z.iso.date()'\n }\n\n return 'z.date()'\n },\n datetime() {\n // Mini mode: datetime validation via z.string() (z.iso.datetime not available in mini)\n return 'z.string()'\n },\n time(node) {\n if (node.representation === 'string') {\n return 'z.iso.time()'\n }\n\n return 'z.date()'\n },\n uuid(node) {\n const base = this.options.guidType === 'guid' ? 'z.guid()' : 'z.uuid()'\n\n return `${base}${lengthChecksMini(node)}`\n },\n email(node) {\n return `z.email()${lengthChecksMini(node)}`\n },\n url(node) {\n return `z.url()${lengthChecksMini(node)}`\n },\n ipv4: () => 'z.ipv4()',\n ipv6: () => 'z.ipv6()',\n blob: () => 'z.instanceof(File)',\n enum(node) {\n const values = node.namedEnumValues?.map((v) => v.value) ?? node.enumValues ?? []\n const nonNullValues = values.filter((v): v is string | number | boolean => v !== null)\n\n // asConst-style enum: use z.union([z.literal(…), …])\n if (node.namedEnumValues?.length) {\n const literals = nonNullValues.map((v) => `z.literal(${formatLiteral(v)})`)\n if (literals.length === 1) return literals[0]!\n return `z.union([${literals.join(', ')}])`\n }\n\n // Regular enum: use z.enum([…])\n return `z.enum([${nonNullValues.map(formatLiteral).join(', ')}])`\n },\n\n ref(node) {\n if (!node.name) return undefined\n const refName = node.ref ? (extractRefName(node.ref) ?? node.name) : node.name\n const resolvedName = node.ref ? (this.options.resolver?.default(refName, 'function') ?? refName) : node.name\n const isSelfRef = node.ref && this.options.schemaName != null && resolvedName === this.options.schemaName\n\n if (isSelfRef) {\n return `z.lazy(() => ${resolvedName})`\n }\n\n return resolvedName\n },\n object(node) {\n const properties = node.properties\n .map((prop) => {\n const { name: propName, schema } = prop\n\n const meta = syncSchemaRef(schema)\n\n const isNullable = meta.nullable\n const isOptional = schema.optional\n const isNullish = schema.nullish\n\n const hasSelfRef =\n this.options.schemaName != null && containsSelfRef(schema, { schemaName: this.options.schemaName, resolver: this.options.resolver })\n const baseOutput = this.transform(schema) ?? this.transform(createSchema({ type: 'unknown' }))!\n // Strip z.lazy() wrappers inside object getters — the getter itself provides deferred evaluation\n const resolvedOutput = hasSelfRef ? baseOutput.replaceAll(`z.lazy(() => ${this.options.schemaName})`, this.options.schemaName!) : baseOutput\n\n const wrappedOutput = this.options.wrapOutput ? this.options.wrapOutput({ output: resolvedOutput, schema }) || resolvedOutput : resolvedOutput\n\n const value = applyMiniModifiers({\n value: wrappedOutput,\n nullable: isNullable,\n optional: isOptional,\n nullish: isNullish,\n defaultValue: meta.default,\n })\n\n if (hasSelfRef) {\n return `get \"${propName}\"() { return ${value} }`\n }\n return `\"${propName}\": ${value}`\n })\n .join(',\\n ')\n\n return `z.object({\\n ${properties}\\n })`\n },\n array(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n const inner = items.join(', ') || this.transform(createSchema({ type: 'unknown' }))!\n let result = `z.array(${inner})${lengthChecksMini(node)}`\n\n if (node.unique) {\n result += `.refine(items => new Set(items).size === items.length, { message: \"Array entries must be unique\" })`\n }\n\n return result\n },\n tuple(node) {\n const items = (node.items ?? []).map((item) => this.transform(item)).filter(Boolean)\n\n return `z.tuple([${items.join(', ')}])`\n },\n union(node) {\n const nodeMembers = node.members ?? []\n const members = nodeMembers.map((m) => this.transform(m)).filter(Boolean)\n if (members.length === 0) return ''\n if (members.length === 1) return members[0]!\n if (node.discriminatorPropertyName && !nodeMembers.some((m) => m.type === 'intersection')) {\n // z.discriminatedUnion requires ZodObject members; intersections (ZodIntersection) are not\n // assignable to $ZodDiscriminant, so fall back to z.union when any member is an intersection.\n return `z.discriminatedUnion(${stringify(node.discriminatorPropertyName)}, [${members.join(', ')}])`\n }\n\n return `z.union([${members.join(', ')}])`\n },\n intersection(node) {\n const members = node.members ?? []\n if (members.length === 0) return ''\n\n const [first, ...rest] = members\n if (!first) return ''\n\n let base = this.transform(first)\n if (!base) return ''\n\n for (const member of rest) {\n if (member.primitive === 'string') {\n const s = narrowSchema(member, 'string')\n const c = lengthChecksMini(s ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'number' || member.primitive === 'integer') {\n const n = narrowSchema(member, 'number') ?? narrowSchema(member, 'integer')\n const c = numberChecksMini(n ?? {})\n if (c) {\n base += c\n continue\n }\n } else if (member.primitive === 'array') {\n const a = narrowSchema(member, 'array')\n const c = lengthChecksMini(a ?? {})\n if (c) {\n base += c\n continue\n }\n }\n const transformed = this.transform(member)\n if (transformed) base = `z.intersection(${base}, ${transformed})`\n }\n\n return base\n },\n ...options.nodes,\n },\n print(node) {\n const { keysToOmit } = this.options\n\n let base = this.transform(node)\n if (!base) return null\n\n const meta = syncSchemaRef(node)\n\n if (keysToOmit?.length && meta.primitive === 'object' && !(meta.type === 'union' && meta.discriminatorPropertyName)) {\n // Mirror printerTs `nonNullable: true`: when omitting keys, the resulting\n // schema is a new non-nullable object type — skip optional/nullable/nullish.\n // Discriminated unions (z.discriminatedUnion) do not support .omit(), so skip them.\n base = `${base}.omit({ ${keysToOmit.map((k) => `\"${k}\": true`).join(', ')} })`\n }\n\n return applyMiniModifiers({\n value: base,\n nullable: meta.nullable,\n optional: meta.optional,\n nullish: meta.nullish,\n defaultValue: meta.default,\n })\n },\n }\n})\n","import { caseParams } from '@kubb/ast'\nimport type { SchemaNode } from '@kubb/ast/types'\nimport { defineGenerator } from '@kubb/core'\nimport { File } from '@kubb/renderer-jsx'\nimport { Operations } from '../components/Operations.tsx'\nimport { Zod } from '../components/Zod.tsx'\nimport { ZOD_NAMESPACE_IMPORTS } from '../constants.ts'\nimport { printerZod } from '../printers/printerZod.ts'\nimport { printerZodMini } from '../printers/printerZodMini.ts'\nimport type { PluginZod } from '../types'\nimport { buildSchemaNames } from '../utils.ts'\n\nexport const zodGenerator = defineGenerator<PluginZod>({\n name: 'zod',\n schema(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, printer } = options\n\n if (!node.name) {\n return\n }\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const imports = adapter.getImports(node, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const meta = {\n name: resolver.resolveSchemaName(node.name),\n file: resolver.resolveFile({ name: node.name, extname: '.ts' }, { root, output, group }),\n } as const\n\n const inferTypeName = inferred ? resolver.resolveSchemaTypeName(node.name) : undefined\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {mode === 'split' && imports.map((imp) => <File.Import key={[node.name, imp.path].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n\n <Zod name={meta.name} node={node} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </File>\n )\n },\n operation(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, paramsCasing, printer } = options\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const params = caseParams(node.parameters, paramsCasing)\n\n const meta = {\n file: resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),\n } as const\n\n function renderSchemaEntry({ schema, name, keysToOmit }: { schema: SchemaNode | null; name: string; keysToOmit?: Array<string> }) {\n if (!schema) return null\n\n const inferTypeName = inferred ? resolver.resolveTypeName(name) : undefined\n\n const imports = adapter.getImports(schema, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n\n return (\n <>\n {mode === 'split' &&\n imports.map((imp) => <File.Import key={[name, imp.path, imp.name].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n <Zod name={name} node={schema} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </>\n )\n }\n\n const paramSchemas = params.map((param) => renderSchemaEntry({ schema: param.schema, name: resolver.resolveParamName(node, param) }))\n\n const responseSchemas = node.responses.map((res) =>\n renderSchemaEntry({\n schema: res.schema,\n name: resolver.resolveResponseStatusName(node, res.statusCode),\n keysToOmit: res.keysToOmit,\n }),\n )\n\n const requestSchema = node.requestBody?.schema\n ? renderSchemaEntry({\n schema: {\n ...node.requestBody.schema,\n description: node.requestBody.description ?? node.requestBody.schema.description,\n },\n name: resolver.resolveDataName(node),\n keysToOmit: node.requestBody.keysToOmit,\n })\n : null\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {paramSchemas}\n {responseSchemas}\n {requestSchema}\n </File>\n )\n },\n operations(nodes, options) {\n const { adapter, config, resolver, root } = this\n const { output, importPath, group, operations, paramsCasing } = options\n\n if (!operations) {\n return\n }\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const meta = {\n file: resolver.resolveFile({ name: 'operations', extname: '.ts' }, { root, output, group }),\n } as const\n\n const transformedOperations = nodes.map((node) => {\n const params = caseParams(node.parameters, paramsCasing)\n\n return {\n node,\n data: buildSchemaNames(node, { params, resolver }),\n }\n })\n\n const imports = transformedOperations.flatMap(({ node, data }) => {\n const names = [data.request, ...Object.values(data.responses), ...Object.values(data.parameters)].filter(Boolean) as string[]\n const opFile = resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group })\n\n return names.map((name) => <File.Import key={[name, opFile.path].join('-')} name={[name]} root={meta.file.path} path={opFile.path} />)\n })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import isTypeOnly name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {imports}\n <Operations name=\"operations\" operations={transformedOperations} />\n </File>\n )\n },\n})\n","import { caseParams, createProperty, createSchema } from '@kubb/ast'\nimport type { OperationNode, ParameterNode, SchemaNode } from '@kubb/ast/types'\nimport { defineGenerator } from '@kubb/core'\nimport { File } from '@kubb/renderer-jsx'\nimport { Operations } from '../components/Operations.tsx'\nimport { Zod } from '../components/Zod.tsx'\nimport { ZOD_NAMESPACE_IMPORTS } from '../constants.ts'\nimport { printerZod } from '../printers/printerZod.ts'\nimport { printerZodMini } from '../printers/printerZodMini.ts'\nimport type { PluginZod, ResolverZod } from '../types'\n\ntype BuildGroupedParamsSchemaOptions = {\n params: Array<ParameterNode>\n}\n\nfunction buildGroupedParamsSchema({ params, optional }: BuildGroupedParamsSchemaOptions & { optional?: boolean }): SchemaNode {\n return createSchema({\n type: 'object',\n optional,\n primitive: 'object',\n properties: params.map((param) => {\n return createProperty({\n name: param.name,\n required: param.required,\n schema: param.schema,\n })\n }),\n })\n}\n\ntype BuildOperationSchemaOptions = {\n resolver: ResolverZod\n}\n\nfunction buildLegacyResponsesSchemaNode(node: OperationNode, { resolver }: BuildOperationSchemaOptions): SchemaNode | null {\n const isGet = node.method.toLowerCase() === 'get'\n const successResponses = node.responses.filter((res) => {\n const code = Number(res.statusCode)\n return !Number.isNaN(code) && code >= 200 && code < 300\n })\n const errorResponses = node.responses.filter((res) => res.statusCode === 'default' || Number(res.statusCode) >= 400)\n\n const responseSchema =\n successResponses.length > 0\n ? successResponses.length === 1\n ? createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, successResponses[0]!.statusCode) })\n : createSchema({\n type: 'union',\n members: successResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, res.statusCode) })),\n })\n : createSchema({ type: 'any' })\n\n const errorsSchema =\n errorResponses.length > 0\n ? errorResponses.length === 1\n ? createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, errorResponses[0]!.statusCode) })\n : createSchema({\n type: 'union',\n members: errorResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, res.statusCode) })),\n })\n : createSchema({ type: 'any' })\n\n const properties = [createProperty({ name: 'Response', required: true, schema: responseSchema })]\n\n if (!isGet && node.requestBody?.schema) {\n properties.push(\n createProperty({\n name: 'Request',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolveDataName(node) }),\n }),\n )\n }\n\n const queryParam = node.parameters.find((p) => p.in === 'query')\n if (queryParam) {\n properties.push(\n createProperty({\n name: 'QueryParams',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolveQueryParamsName(node, queryParam) }),\n }),\n )\n }\n\n const pathParam = node.parameters.find((p) => p.in === 'path')\n if (pathParam) {\n properties.push(\n createProperty({\n name: 'PathParams',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolvePathParamsName(node, pathParam) }),\n }),\n )\n }\n\n const headerParam = node.parameters.find((p) => p.in === 'header')\n if (headerParam) {\n properties.push(\n createProperty({\n name: 'HeaderParams',\n required: true,\n schema: createSchema({ type: 'ref', name: resolver.resolveHeaderParamsName(node, headerParam) }),\n }),\n )\n }\n\n properties.push(createProperty({ name: 'Errors', required: true, schema: errorsSchema }))\n\n return createSchema({ type: 'object', primitive: 'object', properties })\n}\n\nfunction buildLegacyResponseUnionSchemaNode(node: OperationNode, { resolver }: BuildOperationSchemaOptions): SchemaNode {\n const successResponses = node.responses.filter((res) => {\n const code = Number(res.statusCode)\n return !Number.isNaN(code) && code >= 200 && code < 300\n })\n\n if (successResponses.length === 0) {\n return createSchema({ type: 'any' })\n }\n\n if (successResponses.length === 1) {\n return createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, successResponses[0]!.statusCode) })\n }\n\n return createSchema({\n type: 'union',\n members: successResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusName(node, res.statusCode) })),\n })\n}\n\nfunction buildLegacySchemaNames(node: OperationNode, params: Array<ParameterNode>, resolver: ResolverZod) {\n const pathParam = params.find((p) => p.in === 'path')\n const queryParam = params.find((p) => p.in === 'query')\n const headerParam = params.find((p) => p.in === 'header')\n\n const responses: Record<number | string, string> = {}\n const errors: Record<number | string, string> = {}\n\n for (const res of node.responses) {\n const name = resolver.resolveResponseStatusName(node, res.statusCode)\n const statusNum = Number(res.statusCode)\n\n if (!Number.isNaN(statusNum)) {\n responses[statusNum] = name\n if (statusNum >= 400) {\n errors[statusNum] = name\n }\n }\n }\n\n responses['default'] = resolver.resolveResponseName(node)\n\n return {\n request: node.requestBody?.schema ? resolver.resolveDataName(node) : undefined,\n parameters: {\n path: pathParam ? resolver.resolvePathParamsName(node, pathParam) : undefined,\n query: queryParam ? resolver.resolveQueryParamsName(node, queryParam) : undefined,\n header: headerParam ? resolver.resolveHeaderParamsName(node, headerParam) : undefined,\n },\n responses,\n errors,\n }\n}\n\nexport const zodGeneratorLegacy = defineGenerator<PluginZod>({\n name: 'zod-legacy',\n schema(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, printer } = options\n\n if (!node.name) {\n return\n }\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const imports = adapter.getImports(node, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const inferTypeName = inferred ? resolver.resolveSchemaTypeName(node.name) : undefined\n\n const meta = {\n name: resolver.resolveSchemaName(node.name),\n file: resolver.resolveFile({ name: node.name, extname: '.ts' }, { root, output, group }),\n } as const\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: meta.name, nodes: printer?.nodes })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {mode === 'split' && imports.map((imp) => <File.Import key={[node.name, imp.path].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n\n <Zod name={meta.name} node={node} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </File>\n )\n },\n operation(node, options) {\n const { adapter, config, resolver, root } = this\n const { output, coercion, guidType, mini, wrapOutput, inferred, importPath, group, paramsCasing, printer } = options\n\n const mode = this.getMode(output)\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const params = caseParams(node.parameters, paramsCasing)\n\n const meta = {\n file: resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),\n } as const\n\n function renderSchemaEntry({ schema, name, keysToOmit }: { schema: SchemaNode | null; name: string; keysToOmit?: Array<string> }) {\n if (!schema) return null\n\n const inferTypeName = inferred ? resolver.resolveTypeName(name) : undefined\n\n const imports = adapter.getImports(schema, (schemaName) => ({\n name: resolver.resolveSchemaName(schemaName),\n path: resolver.resolveFile({ name: schemaName, extname: '.ts' }, { root, output, group }).path,\n }))\n\n const schemaPrinter = mini\n ? printerZodMini({ guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n : printerZod({ coercion, guidType, wrapOutput, resolver, schemaName: name, keysToOmit, nodes: printer?.nodes })\n\n return (\n <>\n {mode === 'split' &&\n imports.map((imp) => <File.Import key={[name, imp.path, imp.name].join('-')} root={meta.file.path} path={imp.path} name={imp.name} />)}\n <Zod name={name} node={schema} printer={schemaPrinter} inferTypeName={inferTypeName} />\n </>\n )\n }\n\n const pathParams = params.filter((p) => p.in === 'path')\n const queryParams = params.filter((p) => p.in === 'query')\n const headerParams = params.filter((p) => p.in === 'header')\n\n const responseSchemas = node.responses.map((res) => {\n const responseName = resolver.resolveResponseStatusName(node, res.statusCode)\n return renderSchemaEntry({\n schema: {\n ...res.schema,\n description: res.description ?? res.schema.description,\n },\n name: responseName,\n keysToOmit: res.keysToOmit,\n })\n })\n\n const requestSchema = node.requestBody?.schema\n ? renderSchemaEntry({\n schema: {\n ...node.requestBody.schema,\n description: node.requestBody.description ?? node.requestBody.schema.description,\n },\n name: resolver.resolveDataName(node),\n keysToOmit: node.requestBody.keysToOmit,\n })\n : null\n\n const legacyParamTypes = [\n pathParams.length > 0\n ? renderSchemaEntry({\n schema: buildGroupedParamsSchema({ params: pathParams, optional: pathParams.every((p) => !p.required) }),\n name: resolver.resolvePathParamsName(node, pathParams[0]!),\n })\n : null,\n queryParams.length > 0\n ? renderSchemaEntry({\n schema: buildGroupedParamsSchema({ params: queryParams, optional: queryParams.every((p) => !p.required) }),\n name: resolver.resolveQueryParamsName(node, queryParams[0]!),\n })\n : null,\n headerParams.length > 0\n ? renderSchemaEntry({\n schema: buildGroupedParamsSchema({ params: headerParams, optional: headerParams.every((p) => !p.required) }),\n name: resolver.resolveHeaderParamsName(node, headerParams[0]!),\n })\n : null,\n ]\n\n const legacyResponsesSchema = renderSchemaEntry({\n schema: buildLegacyResponsesSchemaNode(node, { resolver }),\n name: resolver.resolveResponsesName(node),\n })\n\n const legacyResponseSchema = renderSchemaEntry({\n schema: buildLegacyResponseUnionSchemaNode(node, { resolver }),\n name: resolver.resolveResponseName(node),\n })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {legacyParamTypes}\n {responseSchemas}\n {requestSchema}\n {legacyResponseSchema}\n {legacyResponsesSchema}\n </File>\n )\n },\n operations(nodes, options) {\n const { adapter, config, resolver, root } = this\n const { output, importPath, group, operations, paramsCasing } = options\n\n if (!operations) {\n return\n }\n const isZodImport = ZOD_NAMESPACE_IMPORTS.has(importPath as 'zod' | 'zod/mini')\n\n const meta = {\n file: resolver.resolveFile({ name: 'operations', extname: '.ts' }, { root, output, group }),\n } as const\n\n const transformedOperations = nodes.map((node) => {\n const params = caseParams(node.parameters, paramsCasing)\n\n return {\n node,\n data: buildLegacySchemaNames(node, params, resolver),\n }\n })\n\n const imports = transformedOperations.flatMap(({ node, data }) => {\n const names = [data.request, ...Object.values(data.responses), ...Object.values(data.parameters)].filter(Boolean) as string[]\n const opFile = resolver.resolveFile({ name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group })\n\n return names.map((name) => <File.Import key={[name, opFile.path].join('-')} name={[name]} root={meta.file.path} path={opFile.path} />)\n })\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(adapter.inputNode, { output, config })}\n footer={resolver.resolveFooter(adapter.inputNode, { output, config })}\n >\n <File.Import isTypeOnly name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {imports}\n <Operations name=\"operations\" operations={transformedOperations} />\n </File>\n )\n },\n})\n","","import { camelCase, pascalCase } from '@internals/utils'\nimport { defineResolver } from '@kubb/core'\nimport type { PluginZod } from '../types.ts'\n\n/**\n * Default resolver for `@kubb/plugin-zod`.\n *\n * Uses `camelCase` naming with a `Schema` suffix for function/type/const names.\n *\n * @example\n * ```ts\n * resolverZod.default('list pets', 'function') // → 'listPetsSchema'\n * resolverZod.default('Pet', 'file') // → 'pet'\n * resolverZod.resolveName('list pets') // → 'listPetsSchema'\n * ```\n */\nexport const resolverZod = defineResolver<PluginZod>(() => {\n return {\n name: 'default',\n pluginName: 'plugin-zod',\n default(name, type) {\n return camelCase(name, { isFile: type === 'file', suffix: type ? 'schema' : undefined })\n },\n resolveSchemaName(name) {\n return camelCase(name, { suffix: 'schema' })\n },\n resolveSchemaTypeName(name) {\n return pascalCase(name, { suffix: 'schema' })\n },\n resolveTypeName(name) {\n return pascalCase(name)\n },\n resolvePathName(name, type) {\n return this.default(name, type)\n },\n resolveParamName(node, param) {\n return this.resolveSchemaName(`${node.operationId} ${param.in} ${param.name}`)\n },\n resolveResponseStatusName(node, statusCode) {\n return this.resolveSchemaName(`${node.operationId} Status ${statusCode}`)\n },\n resolveDataName(node) {\n return this.resolveSchemaName(`${node.operationId} Data`)\n },\n resolveResponsesName(node) {\n return this.resolveSchemaName(`${node.operationId} Responses`)\n },\n resolveResponseName(node) {\n return this.resolveSchemaName(`${node.operationId} Response`)\n },\n resolvePathParamsName(node, param) {\n return this.resolveParamName(node, param)\n },\n resolveQueryParamsName(node, param) {\n return this.resolveParamName(node, param)\n },\n resolveHeaderParamsName(node, param) {\n return this.resolveParamName(node, param)\n },\n }\n})\n","import { defineResolver } from '@kubb/core'\nimport type { PluginZod } from '../types.ts'\nimport { resolverZod } from './resolverZod.ts'\n\n/**\n * Legacy resolver for `@kubb/plugin-zod` that reproduces the naming conventions\n * used in Kubb v4. Enable via `compatibilityPreset: 'kubbV4'`\n * (or by composing this resolver manually).\n *\n * Key differences from the default resolver:\n * - Response status types: `<operationId><StatusCode>Schema` (e.g. `createPets201Schema`) instead of `<operationId>Status201Schema`\n * - Default/error responses: `<operationId>ErrorSchema` instead of `<operationId>StatusDefaultSchema`\n * - Request body: `<operationId>MutationRequestSchema` (non-GET) / `<operationId>QueryRequestSchema` (GET)\n * - Combined responses type: `<operationId>MutationSchema` / `<operationId>QuerySchema`\n * - Response union: `<operationId>MutationResponseSchema` / `<operationId>QueryResponseSchema`\n *\n * @example\n * ```ts\n * import { resolverZodLegacy } from '@kubb/plugin-zod'\n *\n * resolverZodLegacy.resolveResponseStatusName(node, 201) // → 'createPets201Schema'\n * resolverZodLegacy.resolveResponseStatusName(node, 'default') // → 'createPetsErrorSchema'\n * resolverZodLegacy.resolveDataName(node) // → 'createPetsMutationRequestSchema' (POST)\n * resolverZodLegacy.resolveResponsesName(node) // → 'createPetsMutationSchema' (POST)\n * resolverZodLegacy.resolveResponseName(node) // → 'createPetsMutationResponseSchema' (POST)\n * ```\n */\nexport const resolverZodLegacy = defineResolver<PluginZod>(() => {\n return {\n ...resolverZod,\n pluginName: 'plugin-zod',\n resolveResponseStatusName(node, statusCode) {\n if (statusCode === 'default') {\n return this.resolveSchemaName(`${node.operationId} Error`)\n }\n return this.resolveSchemaName(`${node.operationId} ${statusCode}`)\n },\n resolveDataName(node) {\n const suffix = node.method === 'GET' ? 'QueryRequest' : 'MutationRequest'\n return this.resolveSchemaName(`${node.operationId} ${suffix}`)\n },\n resolveResponsesName(node) {\n const suffix = node.method === 'GET' ? 'Query' : 'Mutation'\n return this.resolveSchemaName(`${node.operationId} ${suffix}`)\n },\n resolveResponseName(node) {\n const suffix = node.method === 'GET' ? 'QueryResponse' : 'MutationResponse'\n return this.resolveSchemaName(`${node.operationId} ${suffix}`)\n },\n resolvePathParamsName(node, _param) {\n return this.resolveSchemaName(`${node.operationId} PathParams`)\n },\n resolveQueryParamsName(node, _param) {\n return this.resolveSchemaName(`${node.operationId} QueryParams`)\n },\n resolveHeaderParamsName(node, _param) {\n return this.resolveSchemaName(`${node.operationId} HeaderParams`)\n },\n }\n})\n","import { definePresets } from '@kubb/core'\nimport { zodGenerator } from './generators/zodGenerator.tsx'\nimport { zodGeneratorLegacy } from './generators/zodGeneratorLegacy.tsx'\nimport { printerZod } from './printers/printerZod.ts'\nimport { resolverZod } from './resolvers/resolverZod.ts'\nimport { resolverZodLegacy } from './resolvers/resolverZodLegacy.ts'\nimport type { ResolverZod } from './types.ts'\n\n/**\n * Built-in preset registry for `@kubb/plugin-zod`.\n *\n * - `default` — uses `resolverZod` and `zodGenerator` (current naming conventions).\n * - `kubbV4` — uses `resolverZodLegacy` and `zodGeneratorLegacy` (Kubb v4 naming conventions).\n *\n * Note: `printerZodMini` is selected at runtime by the generator when `mini: true` is set.\n */\nexport const presets = definePresets<ResolverZod>({\n default: {\n name: 'default',\n resolver: resolverZod,\n generators: [zodGenerator],\n printer: printerZod,\n },\n kubbV4: {\n name: 'kubbV4',\n resolver: resolverZodLegacy,\n generators: [zodGeneratorLegacy],\n printer: printerZod,\n },\n})\n","import { camelCase } from '@internals/utils'\nimport { createPlugin, type Group, getPreset, mergeGenerators } from '@kubb/core'\nimport { version } from '../package.json'\nimport { presets } from './presets.ts'\nimport type { PluginZod } from './types.ts'\n\n/**\n * Canonical plugin name for `@kubb/plugin-zod`, used to identify the plugin in driver lookups and warnings.\n */\nexport const pluginZodName = 'plugin-zod' satisfies PluginZod['name']\n\n/**\n * The `@kubb/plugin-zod` plugin factory.\n *\n * Generates Zod validation schemas from an OpenAPI/AST `RootNode`.\n * Walks schemas and operations, delegates rendering to the active generators,\n * and writes barrel files based on `output.barrelType`.\n *\n * @example\n * ```ts\n * import { pluginZod } from '@kubb/plugin-zod'\n *\n * export default defineConfig({\n * plugins: [pluginZod({ output: { path: 'zod' } })],\n * })\n * ```\n */\nexport const pluginZod = createPlugin<PluginZod>((options) => {\n const {\n output = { path: 'zod', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n dateType = 'string',\n typed = false,\n operations = false,\n mini = false,\n guidType = 'uuid',\n importPath = mini ? 'zod/mini' : 'zod',\n coercion = false,\n inferred = false,\n wrapOutput = undefined,\n paramsCasing,\n printer,\n compatibilityPreset = 'default',\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators = [],\n } = options\n\n const preset = getPreset({\n preset: compatibilityPreset,\n presets: presets,\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators,\n })\n\n const generators = preset.generators ?? []\n const mergedGenerator = mergeGenerators(generators)\n\n let resolveNameWarning = false\n let resolvePathWarning = false\n\n return {\n name: pluginZodName,\n version,\n get resolver() {\n return preset.resolver\n },\n get transformer() {\n return preset.transformer\n },\n get options() {\n return {\n output,\n exclude,\n include,\n override,\n group: group\n ? ({\n ...group,\n name: (ctx) => {\n if (group.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n },\n } satisfies Group)\n : undefined,\n dateType,\n typed,\n importPath,\n coercion,\n operations,\n inferred,\n guidType,\n mini,\n wrapOutput,\n paramsCasing,\n printer,\n }\n },\n resolvePath(baseName, pathMode, options) {\n if (!resolvePathWarning) {\n this.warn('Do not use resolvePath for pluginZod, use resolverZod.resolvePath instead')\n resolvePathWarning = true\n }\n\n return this.plugin.resolver.resolvePath(\n { baseName, pathMode, tag: options?.group?.tag, path: options?.group?.path },\n { root: this.root, output, group: this.plugin.options.group },\n )\n },\n resolveName(name, type) {\n if (!resolveNameWarning) {\n this.warn('Do not use resolveName for pluginZod, use resolverZod.default instead')\n resolveNameWarning = true\n }\n\n return this.plugin.resolver.default(name, type)\n },\n async schema(node, options) {\n return mergedGenerator.schema?.call(this, node, options)\n },\n async operation(node, options) {\n return mergedGenerator.operation?.call(this, node, options)\n },\n async operations(nodes, options) {\n return mergedGenerator.operations?.call(this, nodes, options)\n },\n async buildStart() {\n await this.openInStudio({ ast: true })\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,gBAAgB,MAAc,QAAyB;AAS9D,QARmB,KAChB,MAAM,CACN,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,yBAAyB,QAAQ,CACzC,QAAQ,gBAAgB,QAAQ,CAEV,MAAM,gBAAgB,CAAC,OAAO,QAAQ,CAG5D,KAAK,MAAM,MAAM;AAEhB,MADiB,KAAK,SAAS,KAAK,SAAS,KAAK,aAAa,CACjD,QAAO;AACrB,MAAI,MAAM,KAAK,CAAC,OAAQ,QAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;AAC3E,SAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;GACnD,CACD,KAAK,GAAG,CACR,QAAQ,iBAAiB,GAAG;;;;;;;;;;AAWjC,SAAS,iBAAiB,MAAc,eAAkE;CACxG,MAAM,QAAQ,KAAK,MAAM,iBAAiB;AAC1C,QAAO,MAAM,KAAK,MAAM,MAAM,cAAc,MAAM,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC,KAAK,IAAI;;;;;;;;;;AAWtF,SAAgB,UAAU,MAAc,EAAE,QAAQ,SAAS,IAAI,SAAS,OAAgB,EAAE,EAAU;AAClG,KAAI,OACF,QAAO,iBAAiB,OAAO,MAAM,WAAW,UAAU,MAAM,SAAS;EAAE;EAAQ;EAAQ,GAAG,EAA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AAChB,UAAO,OAAO;;EAEhB,IAAI,UAAU;AACZ,UAAO;IACL;IACA;IACA;IACA;IACA,OAAO,QACF;KACC,GAAG;KACH,OAAO,QAAQ;AACb,UAAI,MAAM,SAAS,OACjB,QAAO,GAAG,IAAI,MAAM,MAAM,IAAI,CAAC;AAEjC,aAAO,GAAG,UAAU,IAAI,MAAM,CAAC;;KAElC,GACD,KAAA;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD;;EAEH,YAAY,UAAU,UAAU,SAAS;AACvC,OAAI,CAAC,oBAAoB;AACvB,SAAK,KAAK,4EAA4E;AACtF,yBAAqB;;AAGvB,UAAO,KAAK,OAAO,SAAS,YAC1B;IAAE;IAAU;IAAU,KAAK,SAAS,OAAO;IAAK,MAAM,SAAS,OAAO;IAAM,EAC5E;IAAE,MAAM,KAAK;IAAM;IAAQ,OAAO,KAAK,OAAO,QAAQ;IAAO,CAC9D;;EAEH,YAAY,MAAM,MAAM;AACtB,OAAI,CAAC,oBAAoB;AACvB,SAAK,KAAK,wEAAwE;AAClF,yBAAqB;;AAGvB,UAAO,KAAK,OAAO,SAAS,QAAQ,MAAM,KAAK;;EAEjD,MAAM,OAAO,MAAM,SAAS;AAC1B,UAAO,gBAAgB,QAAQ,KAAK,MAAM,MAAM,QAAQ;;EAE1D,MAAM,UAAU,MAAM,SAAS;AAC7B,UAAO,gBAAgB,WAAW,KAAK,MAAM,MAAM,QAAQ;;EAE7D,MAAM,WAAW,OAAO,SAAS;AAC/B,UAAO,gBAAgB,YAAY,KAAK,MAAM,OAAO,QAAQ;;EAE/D,MAAM,aAAa;AACjB,SAAM,KAAK,aAAa,EAAE,KAAK,MAAM,CAAC;;EAEzC;EACD"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./chunk--u3MIqq1.js";
2
2
  import { caseParams, createProperty, createSchema, extractRefName, narrowSchema, syncSchemaRef } from "@kubb/ast";
3
3
  import { createPlugin, defineGenerator, definePresets, definePrinter, defineResolver, getPreset, mergeGenerators } from "@kubb/core";
4
- import { Const, File, Type } from "@kubb/react-fabric";
5
- import { Fragment, jsx, jsxs } from "@kubb/react-fabric/jsx-runtime";
4
+ import { Const, File, Type } from "@kubb/renderer-jsx";
5
+ import { Fragment, jsx, jsxs } from "@kubb/renderer-jsx/jsx-runtime";
6
6
  //#region ../../internals/utils/src/casing.ts
7
7
  /**
8
8
  * Shared implementation for camelCase and PascalCase conversion.
@@ -1431,7 +1431,7 @@ const zodGeneratorLegacy = defineGenerator({
1431
1431
  });
1432
1432
  //#endregion
1433
1433
  //#region package.json
1434
- var version = "5.0.0-alpha.32";
1434
+ var version = "5.0.0-alpha.33";
1435
1435
  //#endregion
1436
1436
  //#region src/resolvers/resolverZod.ts
1437
1437
  /**