@kubb/plugin-zod 4.10.0 → 4.10.1

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,4 +1,4 @@
1
- import { i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-DX8evdsR.cjs";
1
+ import { i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-DL8vhJwK.cjs";
2
2
  import { KubbFile } from "@kubb/fabric-core/types";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-COTxGHzo.js";
1
+ import { i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-BJRQY0iM.js";
2
2
  import { KubbFile } from "@kubb/fabric-core/types";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,3 @@
1
- require('./components-CwZBp5_M.cjs');
2
1
  const require_generators = require('./generators-CCF0NvKr.cjs');
3
2
 
4
3
  exports.operationsGenerator = require_generators.operationsGenerator;
@@ -1,4 +1,4 @@
1
- import { n as PluginZod, r as ReactGenerator } from "./types-DX8evdsR.cjs";
1
+ import { n as PluginZod, r as ReactGenerator } from "./types-DL8vhJwK.cjs";
2
2
 
3
3
  //#region src/generators/operationsGenerator.d.ts
4
4
  declare const operationsGenerator: ReactGenerator<PluginZod>;
@@ -1,4 +1,4 @@
1
- import { n as PluginZod, r as ReactGenerator } from "./types-COTxGHzo.js";
1
+ import { n as PluginZod, r as ReactGenerator } from "./types-BJRQY0iM.js";
2
2
 
3
3
  //#region src/generators/operationsGenerator.d.ts
4
4
  declare const operationsGenerator: ReactGenerator<PluginZod>;
@@ -1,4 +1,3 @@
1
- import "./components-BCKi8Hou.js";
2
1
  import { n as operationsGenerator, t as zodGenerator } from "./generators-uL_Da-pi.js";
3
2
 
4
3
  export { operationsGenerator, zodGenerator };
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-DX8evdsR.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-DL8vhJwK.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginZodName = "plugin-zod";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-COTxGHzo.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-BJRQY0iM.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginZodName = "plugin-zod";
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import "./components-BCKi8Hou.js";
2
1
  import { n as operationsGenerator, t as zodGenerator } from "./generators-uL_Da-pi.js";
3
2
  import path from "node:path";
4
3
  import { PackageManager, definePlugin, getBarrelFiles, getMode } from "@kubb/core";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["options","groupName: Group['name']","transformers"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode, PackageManager } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { OperationGenerator, pluginOasName, SchemaGenerator } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { operationsGenerator } from './generators'\nimport { zodGenerator } from './generators/zodGenerator.tsx'\nimport type { PluginZod } from './types.ts'\n\nexport const pluginZodName = 'plugin-zod' satisfies PluginZod['name']\n\nexport const pluginZod = definePlugin<PluginZod>((options) => {\n const {\n output = { path: 'zod', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dateType = 'string',\n unknownType = 'any',\n emptySchemaType = unknownType,\n typed = false,\n mapper = {},\n operations = false,\n mini = false,\n version = mini ? '4' : new PackageManager().isValidSync('zod', '>=4') ? '4' : '3',\n importPath = mini ? 'zod/mini' : version === '4' ? 'zod/v4' : 'zod',\n coercion = false,\n inferred = false,\n generators = [zodGenerator, operations ? operationsGenerator : undefined].filter(Boolean),\n wrapOutput = undefined,\n contentType,\n } = options\n\n const usedEnumNames = {}\n\n return {\n name: pluginZodName,\n options: {\n output,\n transformers,\n include,\n exclude,\n override,\n typed,\n dateType,\n unknownType,\n emptySchemaType,\n mapper,\n importPath,\n coercion,\n operations,\n inferred,\n group,\n wrapOutput,\n version,\n mini,\n usedEnumNames,\n },\n pre: [pluginOasName, typed ? pluginTsName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name, {\n suffix: type ? 'schema' : undefined,\n isFile: type === 'file',\n })\n\n if (type === 'type') {\n resolvedName = pascalCase(resolvedName)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n\n if (this.plugin.options.typed && this.plugin.options.version === '3') {\n // pre add bundled\n await this.addFile({\n baseName: 'ToZod.ts',\n path: path.resolve(root, '.kubb/ToZod.ts'),\n sources: [\n {\n name: 'ToZod',\n value: resolveModuleSource('@kubb/plugin-zod/templates/ToZod').source,\n },\n ],\n })\n }\n\n const schemaGenerator = new SchemaGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n include: undefined,\n override,\n mode,\n output: output.path,\n })\n\n const schemaFiles = await schemaGenerator.build(...generators)\n await this.upsertFile(...schemaFiles)\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const operationFiles = await operationGenerator.build(...generators)\n await this.upsertFile(...operationFiles)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;AAUA,MAAa,gBAAgB;AAE7B,MAAa,YAAY,cAAyB,YAAY;CAC5D,MAAM,EACJ,SAAS;EAAE,MAAM;EAAO,YAAY;EAAS,EAC7C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,+BAAe,EAAE,EACjB,WAAW,UACX,cAAc,OACd,kBAAkB,aAClB,QAAQ,OACR,SAAS,EAAE,EACX,aAAa,OACb,OAAO,OACP,UAAU,OAAO,MAAM,IAAI,gBAAgB,CAAC,YAAY,OAAO,MAAM,GAAG,MAAM,KAC9E,aAAa,OAAO,aAAa,YAAY,MAAM,WAAW,OAC9D,WAAW,OACX,WAAW,OACX,aAAa,CAAC,cAAc,aAAa,sBAAsB,OAAU,CAAC,OAAO,QAAQ,EACzF,aAAa,QACb,gBACE;AAIJ,QAAO;EACL,MAAM;EACN,SAAS;GACP;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;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K,QAAQ;IACjB,UAAU;IACV,MAAM,KAAK,QAAQ,MAAM,iBAAiB;IAC1C,SAAS,CACP;KACE,MAAM;KACN,OAAO,oBAAoB,mCAAmC,CAAC;KAChE,CACF;IACF,CAAC;GAeJ,MAAM,cAAc,MAZI,IAAI,gBAAgB,KAAK,OAAO,SAAS;IAC/D,QAAQ,KAAK;IACb;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb;IACA,SAAS;IACT;IACA;IACA,QAAQ,OAAO;IAChB,CAAC,CAEwC,MAAM,GAAG,WAAW;AAC9D,SAAM,KAAK,WAAW,GAAG,YAAY;GAcrC,MAAM,iBAAiB,MAZI,IAAI,mBAAmB,KAAK,OAAO,SAAS;IACrE,QAAQ,KAAK;IACb;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb;IACA;IACA;IACA;IACA;IACD,CAAC,CAE8C,MAAM,GAAG,WAAW;AACpE,SAAM,KAAK,WAAW,GAAG,eAAe;GAExC,MAAM,cAAc,MAAM,eAAe,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
1
+ {"version":3,"file":"index.js","names":["options","groupName: Group['name']","transformers"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode, PackageManager } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { OperationGenerator, pluginOasName, SchemaGenerator } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { operationsGenerator } from './generators'\nimport { zodGenerator } from './generators/zodGenerator.tsx'\nimport type { PluginZod } from './types.ts'\n\nexport const pluginZodName = 'plugin-zod' satisfies PluginZod['name']\n\nexport const pluginZod = definePlugin<PluginZod>((options) => {\n const {\n output = { path: 'zod', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dateType = 'string',\n unknownType = 'any',\n emptySchemaType = unknownType,\n typed = false,\n mapper = {},\n operations = false,\n mini = false,\n version = mini ? '4' : new PackageManager().isValidSync('zod', '>=4') ? '4' : '3',\n importPath = mini ? 'zod/mini' : version === '4' ? 'zod/v4' : 'zod',\n coercion = false,\n inferred = false,\n generators = [zodGenerator, operations ? operationsGenerator : undefined].filter(Boolean),\n wrapOutput = undefined,\n contentType,\n } = options\n\n const usedEnumNames = {}\n\n return {\n name: pluginZodName,\n options: {\n output,\n transformers,\n include,\n exclude,\n override,\n typed,\n dateType,\n unknownType,\n emptySchemaType,\n mapper,\n importPath,\n coercion,\n operations,\n inferred,\n group,\n wrapOutput,\n version,\n mini,\n usedEnumNames,\n },\n pre: [pluginOasName, typed ? pluginTsName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name, {\n suffix: type ? 'schema' : undefined,\n isFile: type === 'file',\n })\n\n if (type === 'type') {\n resolvedName = pascalCase(resolvedName)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n\n if (this.plugin.options.typed && this.plugin.options.version === '3') {\n // pre add bundled\n await this.addFile({\n baseName: 'ToZod.ts',\n path: path.resolve(root, '.kubb/ToZod.ts'),\n sources: [\n {\n name: 'ToZod',\n value: resolveModuleSource('@kubb/plugin-zod/templates/ToZod').source,\n },\n ],\n })\n }\n\n const schemaGenerator = new SchemaGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n include: undefined,\n override,\n mode,\n output: output.path,\n })\n\n const schemaFiles = await schemaGenerator.build(...generators)\n await this.upsertFile(...schemaFiles)\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const operationFiles = await operationGenerator.build(...generators)\n await this.upsertFile(...operationFiles)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;AAUA,MAAa,gBAAgB;AAE7B,MAAa,YAAY,cAAyB,YAAY;CAC5D,MAAM,EACJ,SAAS;EAAE,MAAM;EAAO,YAAY;EAAS,EAC7C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,+BAAe,EAAE,EACjB,WAAW,UACX,cAAc,OACd,kBAAkB,aAClB,QAAQ,OACR,SAAS,EAAE,EACX,aAAa,OACb,OAAO,OACP,UAAU,OAAO,MAAM,IAAI,gBAAgB,CAAC,YAAY,OAAO,MAAM,GAAG,MAAM,KAC9E,aAAa,OAAO,aAAa,YAAY,MAAM,WAAW,OAC9D,WAAW,OACX,WAAW,OACX,aAAa,CAAC,c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,OAAO,QAAQ,KAAK,QAAQ,MAAM,OAAO,KAAK,CAAC;GACrD,MAAM,MAAM,MAAM,KAAK,QAAQ;AAE/B,OAAI,KAAK,OAAO,QAAQ,SAAS,KAAK,OAAO,QAAQ,YAAY,IAE/D,OAAM,KAAK,QAAQ;IACjB,UAAU;IACV,MAAM,KAAK,QAAQ,MAAM,iBAAiB;IAC1C,SAAS,CACP;KACE,MAAM;KACN,OAAO,oBAAoB,mCAAmC,CAAC;KAChE,CACF;IACF,CAAC;GAeJ,MAAM,cAAc,MAZI,IAAI,gBAAgB,KAAK,OAAO,SAAS;IAC/D,QAAQ,KAAK;IACb;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb;IACA,SAAS;IACT;IACA;IACA,QAAQ,OAAO;IAChB,CAAC,CAEwC,MAAM,GAAG,WAAW;AAC9D,SAAM,KAAK,WAAW,GAAG,YAAY;GAcrC,MAAM,iBAAiB,MAZI,IAAI,mBAAmB,KAAK,OAAO,SAAS;IACrE,QAAQ,KAAK;IACb;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb;IACA;IACA;IACA;IACA;IACD,CAAC,CAE8C,MAAM,GAAG,WAAW;AACpE,SAAM,KAAK,WAAW,GAAG,eAAe;GAExC,MAAM,cAAc,MAAM,eAAe,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
@@ -17,7 +17,7 @@ type SchemaObject$1 = OasTypes.SchemaObject & {
17
17
  };
18
18
  //#endregion
19
19
  //#region ../oas/src/Oas.d.ts
20
- type Options$3 = {
20
+ type Options$2 = {
21
21
  contentType?: contentType;
22
22
  discriminator?: 'strict' | 'inherit';
23
23
  };
@@ -31,8 +31,8 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
31
31
  oas: TOAS | OASDocument | string;
32
32
  user?: User;
33
33
  });
34
- setOptions(options: Options$3): void;
35
- get options(): Options$3;
34
+ setOptions(options: Options$2): void;
35
+ get options(): Options$2;
36
36
  get($ref: string): any;
37
37
  getKey($ref: string): string | undefined;
38
38
  set($ref: string, value: unknown): false | undefined;
@@ -427,7 +427,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
427
427
  result: Result;
428
428
  plugin: Plugin;
429
429
  };
430
- type Options$2 = {
430
+ type Options$1 = {
431
431
  fabric: Fabric;
432
432
  logger: Logger;
433
433
  /**
@@ -453,8 +453,8 @@ declare class PluginManager {
453
453
  readonly config: Config;
454
454
  readonly executed: Array<Executer>;
455
455
  readonly logger: Logger;
456
- readonly options: Options$2;
457
- constructor(config: Config, options: Options$2);
456
+ readonly options: Options$1;
457
+ constructor(config: Config, options: Options$1);
458
458
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
459
459
  get plugins(): Array<Plugin>;
460
460
  getFile<TOptions = object>({
@@ -1006,7 +1006,7 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
1006
1006
  }
1007
1007
  //#endregion
1008
1008
  //#region src/types.d.ts
1009
- type Options$1 = {
1009
+ type Options = {
1010
1010
  /**
1011
1011
  * @default 'zod'
1012
1012
  */
@@ -1121,23 +1121,23 @@ type Options$1 = {
1121
1121
  };
1122
1122
  type ResolvedOptions = {
1123
1123
  output: Output<Oas>;
1124
- group: Options$1['group'];
1125
- override: NonNullable<Options$1['override']>;
1126
- transformers: NonNullable<Options$1['transformers']>;
1127
- dateType: NonNullable<Options$1['dateType']>;
1128
- unknownType: NonNullable<Options$1['unknownType']>;
1129
- emptySchemaType: NonNullable<Options$1['emptySchemaType']>;
1130
- typed: NonNullable<Options$1['typed']>;
1131
- inferred: NonNullable<Options$1['inferred']>;
1132
- mapper: NonNullable<Options$1['mapper']>;
1133
- importPath: NonNullable<Options$1['importPath']>;
1134
- coercion: NonNullable<Options$1['coercion']>;
1135
- operations: NonNullable<Options$1['operations']>;
1136
- wrapOutput: Options$1['wrapOutput'];
1137
- version: NonNullable<Options$1['version']>;
1138
- mini: NonNullable<Options$1['mini']>;
1124
+ group: Options['group'];
1125
+ override: NonNullable<Options['override']>;
1126
+ transformers: NonNullable<Options['transformers']>;
1127
+ dateType: NonNullable<Options['dateType']>;
1128
+ unknownType: NonNullable<Options['unknownType']>;
1129
+ emptySchemaType: NonNullable<Options['emptySchemaType']>;
1130
+ typed: NonNullable<Options['typed']>;
1131
+ inferred: NonNullable<Options['inferred']>;
1132
+ mapper: NonNullable<Options['mapper']>;
1133
+ importPath: NonNullable<Options['importPath']>;
1134
+ coercion: NonNullable<Options['coercion']>;
1135
+ operations: NonNullable<Options['operations']>;
1136
+ wrapOutput: Options['wrapOutput'];
1137
+ version: NonNullable<Options['version']>;
1138
+ mini: NonNullable<Options['mini']>;
1139
1139
  };
1140
- type PluginZod = PluginFactoryOptions<'plugin-zod', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1140
+ type PluginZod = PluginFactoryOptions<'plugin-zod', Options, ResolvedOptions, never, ResolvePathOptions>;
1141
1141
  //#endregion
1142
- export { UserPluginWithLifeCycle as a, Schema as i, PluginZod as n, Operation$1 as o, ReactGenerator as r, SchemaObject$1 as s, Options$1 as t };
1143
- //# sourceMappingURL=types-COTxGHzo.d.ts.map
1142
+ export { UserPluginWithLifeCycle as a, Schema as i, PluginZod as n, Operation$1 as o, ReactGenerator as r, SchemaObject$1 as s, Options as t };
1143
+ //# sourceMappingURL=types-BJRQY0iM.d.ts.map
@@ -17,7 +17,7 @@ type SchemaObject$1 = OasTypes.SchemaObject & {
17
17
  };
18
18
  //#endregion
19
19
  //#region ../oas/src/Oas.d.ts
20
- type Options$3 = {
20
+ type Options$2 = {
21
21
  contentType?: contentType;
22
22
  discriminator?: 'strict' | 'inherit';
23
23
  };
@@ -31,8 +31,8 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
31
31
  oas: TOAS | OASDocument | string;
32
32
  user?: User;
33
33
  });
34
- setOptions(options: Options$3): void;
35
- get options(): Options$3;
34
+ setOptions(options: Options$2): void;
35
+ get options(): Options$2;
36
36
  get($ref: string): any;
37
37
  getKey($ref: string): string | undefined;
38
38
  set($ref: string, value: unknown): false | undefined;
@@ -427,7 +427,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
427
427
  result: Result;
428
428
  plugin: Plugin;
429
429
  };
430
- type Options$2 = {
430
+ type Options$1 = {
431
431
  fabric: Fabric;
432
432
  logger: Logger;
433
433
  /**
@@ -453,8 +453,8 @@ declare class PluginManager {
453
453
  readonly config: Config;
454
454
  readonly executed: Array<Executer>;
455
455
  readonly logger: Logger;
456
- readonly options: Options$2;
457
- constructor(config: Config, options: Options$2);
456
+ readonly options: Options$1;
457
+ constructor(config: Config, options: Options$1);
458
458
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
459
459
  get plugins(): Array<Plugin>;
460
460
  getFile<TOptions = object>({
@@ -1006,7 +1006,7 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
1006
1006
  }
1007
1007
  //#endregion
1008
1008
  //#region src/types.d.ts
1009
- type Options$1 = {
1009
+ type Options = {
1010
1010
  /**
1011
1011
  * @default 'zod'
1012
1012
  */
@@ -1121,23 +1121,23 @@ type Options$1 = {
1121
1121
  };
1122
1122
  type ResolvedOptions = {
1123
1123
  output: Output<Oas>;
1124
- group: Options$1['group'];
1125
- override: NonNullable<Options$1['override']>;
1126
- transformers: NonNullable<Options$1['transformers']>;
1127
- dateType: NonNullable<Options$1['dateType']>;
1128
- unknownType: NonNullable<Options$1['unknownType']>;
1129
- emptySchemaType: NonNullable<Options$1['emptySchemaType']>;
1130
- typed: NonNullable<Options$1['typed']>;
1131
- inferred: NonNullable<Options$1['inferred']>;
1132
- mapper: NonNullable<Options$1['mapper']>;
1133
- importPath: NonNullable<Options$1['importPath']>;
1134
- coercion: NonNullable<Options$1['coercion']>;
1135
- operations: NonNullable<Options$1['operations']>;
1136
- wrapOutput: Options$1['wrapOutput'];
1137
- version: NonNullable<Options$1['version']>;
1138
- mini: NonNullable<Options$1['mini']>;
1124
+ group: Options['group'];
1125
+ override: NonNullable<Options['override']>;
1126
+ transformers: NonNullable<Options['transformers']>;
1127
+ dateType: NonNullable<Options['dateType']>;
1128
+ unknownType: NonNullable<Options['unknownType']>;
1129
+ emptySchemaType: NonNullable<Options['emptySchemaType']>;
1130
+ typed: NonNullable<Options['typed']>;
1131
+ inferred: NonNullable<Options['inferred']>;
1132
+ mapper: NonNullable<Options['mapper']>;
1133
+ importPath: NonNullable<Options['importPath']>;
1134
+ coercion: NonNullable<Options['coercion']>;
1135
+ operations: NonNullable<Options['operations']>;
1136
+ wrapOutput: Options['wrapOutput'];
1137
+ version: NonNullable<Options['version']>;
1138
+ mini: NonNullable<Options['mini']>;
1139
1139
  };
1140
- type PluginZod = PluginFactoryOptions<'plugin-zod', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1140
+ type PluginZod = PluginFactoryOptions<'plugin-zod', Options, ResolvedOptions, never, ResolvePathOptions>;
1141
1141
  //#endregion
1142
- export { UserPluginWithLifeCycle as a, Schema as i, PluginZod as n, Operation$1 as o, ReactGenerator as r, SchemaObject$1 as s, Options$1 as t };
1143
- //# sourceMappingURL=types-DX8evdsR.d.cts.map
1142
+ export { UserPluginWithLifeCycle as a, Schema as i, PluginZod as n, Operation$1 as o, ReactGenerator as r, SchemaObject$1 as s, Options as t };
1143
+ //# sourceMappingURL=types-DL8vhJwK.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-zod",
3
- "version": "4.10.0",
3
+ "version": "4.10.1",
4
4
  "description": "Zod schema generator plugin for Kubb, creating type-safe validation schemas from OpenAPI specifications for runtime data validation.",
5
5
  "keywords": [
6
6
  "zod",
@@ -69,16 +69,16 @@
69
69
  ],
70
70
  "dependencies": {
71
71
  "@kubb/react-fabric": "0.5.4",
72
- "@kubb/core": "4.10.0",
73
- "@kubb/oas": "4.10.0",
74
- "@kubb/plugin-oas": "4.10.0",
75
- "@kubb/plugin-ts": "4.10.0"
72
+ "@kubb/core": "4.10.1",
73
+ "@kubb/oas": "4.10.1",
74
+ "@kubb/plugin-oas": "4.10.1",
75
+ "@kubb/plugin-ts": "4.10.1"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@asteasolutions/zod-to-openapi": "^8.2.0",
79
79
  "@hono/zod-openapi": "0.19.2",
80
80
  "zod": "^3.25.76",
81
- "@kubb/plugin-oas": "4.10.0"
81
+ "@kubb/plugin-oas": "4.10.1"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=20"