@kubb/plugin-zod 4.12.6 → 4.12.7

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-CTssG5I6.cjs";
1
+ import { i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-BmqRD5L1.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-B3gAGpsj.js";
1
+ import { i as Schema, n as PluginZod, o as Operation, s as SchemaObject } from "./types-CTblj7a_.js";
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 { n as PluginZod, r as ReactGenerator } from "./types-CTssG5I6.cjs";
1
+ import { n as PluginZod, r as ReactGenerator } from "./types-BmqRD5L1.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-B3gAGpsj.js";
1
+ import { n as PluginZod, r as ReactGenerator } from "./types-CTblj7a_.js";
2
2
 
3
3
  //#region src/generators/operationsGenerator.d.ts
4
4
  declare const operationsGenerator: ReactGenerator<PluginZod>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-CTssG5I6.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-BmqRD5L1.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-B3gAGpsj.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginZod, t as Options } from "./types-CTblj7a_.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginZodName = "plugin-zod";
@@ -100,7 +100,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
100
100
  * console.log('Starting Kubb generation')
101
101
  * })
102
102
  *
103
- * events.on('plugin:end', (plugin, duration) => {
103
+ * events.on('plugin:end', (plugin, { duration }) => {
104
104
  * console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
105
105
  * })
106
106
  * ```
@@ -246,8 +246,13 @@ interface KubbEvents {
246
246
  'plugin:start': [plugin: Plugin];
247
247
  /**
248
248
  * Emitted when a plugin completes execution.
249
+ * Duration in ms
249
250
  */
250
- 'plugin:end': [plugin: Plugin, duration: number];
251
+ 'plugin:end': [plugin: Plugin, meta: {
252
+ duration: number;
253
+ success: boolean;
254
+ error?: Error;
255
+ }];
251
256
  /**
252
257
  * Emitted when plugin hook progress tracking starts.
253
258
  * Contains the hook name and list of plugins to execute.
@@ -923,8 +928,11 @@ type Schema = {
923
928
  } | SchemaKeywordMapper[keyof SchemaKeywordMapper];
924
929
  //#endregion
925
930
  //#region ../plugin-oas/src/types.d.ts
931
+ type GetOasOptions = {
932
+ validate?: boolean;
933
+ };
926
934
  type Context$2 = {
927
- getOas(): Promise<Oas>;
935
+ getOas(options?: GetOasOptions): Promise<Oas>;
928
936
  getBaseURL(): Promise<string | undefined>;
929
937
  };
930
938
  declare global {
@@ -1286,4 +1294,4 @@ type ResolvedOptions = {
1286
1294
  type PluginZod = PluginFactoryOptions<'plugin-zod', Options, ResolvedOptions, never, ResolvePathOptions>;
1287
1295
  //#endregion
1288
1296
  export { UserPluginWithLifeCycle as a, Schema as i, PluginZod as n, Operation$1 as o, ReactGenerator as r, SchemaObject$1 as s, Options as t };
1289
- //# sourceMappingURL=types-CTssG5I6.d.cts.map
1297
+ //# sourceMappingURL=types-BmqRD5L1.d.cts.map
@@ -100,7 +100,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
100
100
  * console.log('Starting Kubb generation')
101
101
  * })
102
102
  *
103
- * events.on('plugin:end', (plugin, duration) => {
103
+ * events.on('plugin:end', (plugin, { duration }) => {
104
104
  * console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
105
105
  * })
106
106
  * ```
@@ -246,8 +246,13 @@ interface KubbEvents {
246
246
  'plugin:start': [plugin: Plugin];
247
247
  /**
248
248
  * Emitted when a plugin completes execution.
249
+ * Duration in ms
249
250
  */
250
- 'plugin:end': [plugin: Plugin, duration: number];
251
+ 'plugin:end': [plugin: Plugin, meta: {
252
+ duration: number;
253
+ success: boolean;
254
+ error?: Error;
255
+ }];
251
256
  /**
252
257
  * Emitted when plugin hook progress tracking starts.
253
258
  * Contains the hook name and list of plugins to execute.
@@ -923,8 +928,11 @@ type Schema = {
923
928
  } | SchemaKeywordMapper[keyof SchemaKeywordMapper];
924
929
  //#endregion
925
930
  //#region ../plugin-oas/src/types.d.ts
931
+ type GetOasOptions = {
932
+ validate?: boolean;
933
+ };
926
934
  type Context$2 = {
927
- getOas(): Promise<Oas>;
935
+ getOas(options?: GetOasOptions): Promise<Oas>;
928
936
  getBaseURL(): Promise<string | undefined>;
929
937
  };
930
938
  declare global {
@@ -1286,4 +1294,4 @@ type ResolvedOptions = {
1286
1294
  type PluginZod = PluginFactoryOptions<'plugin-zod', Options, ResolvedOptions, never, ResolvePathOptions>;
1287
1295
  //#endregion
1288
1296
  export { UserPluginWithLifeCycle as a, Schema as i, PluginZod as n, Operation$1 as o, ReactGenerator as r, SchemaObject$1 as s, Options as t };
1289
- //# sourceMappingURL=types-B3gAGpsj.d.ts.map
1297
+ //# sourceMappingURL=types-CTblj7a_.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-zod",
3
- "version": "4.12.6",
3
+ "version": "4.12.7",
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",
@@ -68,15 +68,14 @@
68
68
  }
69
69
  ],
70
70
  "dependencies": {
71
- "@kubb/react-fabric": "0.7.1",
72
- "@kubb/core": "4.12.6",
73
- "@kubb/oas": "4.12.6",
74
- "@kubb/plugin-oas": "4.12.6",
75
- "@kubb/plugin-ts": "4.12.6"
71
+ "@kubb/react-fabric": "0.7.2",
72
+ "@kubb/core": "4.12.7",
73
+ "@kubb/oas": "4.12.7",
74
+ "@kubb/plugin-oas": "4.12.7",
75
+ "@kubb/plugin-ts": "4.12.7"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@asteasolutions/zod-to-openapi": "^8.2.0",
79
- "@hono/zod-openapi": "0.19.2",
80
79
  "zod": "^3.25.76"
81
80
  },
82
81
  "engines": {