@kubb/plugin-faker 4.12.5 → 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 PluginFaker } from "./types-Blj03WRB.cjs";
1
+ import { i as Schema, n as PluginFaker } from "./types-CD44APnc.cjs";
2
2
  import { KubbNode } from "@kubb/react-fabric/types";
3
3
 
4
4
  //#region src/components/Faker.d.ts
@@ -1,4 +1,4 @@
1
- import { i as Schema, n as PluginFaker } from "./types-B0uUNfYF.js";
1
+ import { i as Schema, n as PluginFaker } from "./types-Cy9W-7-6.js";
2
2
  import { KubbNode } from "@kubb/react-fabric/types";
3
3
 
4
4
  //#region src/components/Faker.d.ts
@@ -1,4 +1,4 @@
1
- import { n as PluginFaker, r as ReactGenerator } from "./types-Blj03WRB.cjs";
1
+ import { n as PluginFaker, r as ReactGenerator } from "./types-CD44APnc.cjs";
2
2
 
3
3
  //#region src/generators/fakerGenerator.d.ts
4
4
  declare const fakerGenerator: ReactGenerator<PluginFaker>;
@@ -1,4 +1,4 @@
1
- import { n as PluginFaker, r as ReactGenerator } from "./types-B0uUNfYF.js";
1
+ import { n as PluginFaker, r as ReactGenerator } from "./types-Cy9W-7-6.js";
2
2
 
3
3
  //#region src/generators/fakerGenerator.d.ts
4
4
  declare const fakerGenerator: ReactGenerator<PluginFaker>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-Blj03WRB.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-CD44APnc.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginFakerName = "plugin-faker";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-B0uUNfYF.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-Cy9W-7-6.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginFakerName = "plugin-faker";
@@ -65,7 +65,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
65
65
  * console.log('Starting Kubb generation')
66
66
  * })
67
67
  *
68
- * events.on('plugin:end', (plugin, duration) => {
68
+ * events.on('plugin:end', (plugin, { duration }) => {
69
69
  * console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
70
70
  * })
71
71
  * ```
@@ -211,8 +211,13 @@ interface KubbEvents {
211
211
  'plugin:start': [plugin: Plugin];
212
212
  /**
213
213
  * Emitted when a plugin completes execution.
214
+ * Duration in ms
214
215
  */
215
- 'plugin:end': [plugin: Plugin, duration: number];
216
+ 'plugin:end': [plugin: Plugin, meta: {
217
+ duration: number;
218
+ success: boolean;
219
+ error?: Error;
220
+ }];
216
221
  /**
217
222
  * Emitted when plugin hook progress tracking starts.
218
223
  * Contains the hook name and list of plugins to execute.
@@ -706,8 +711,11 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
706
711
  }
707
712
  //#endregion
708
713
  //#region ../plugin-oas/src/types.d.ts
714
+ type GetOasOptions = {
715
+ validate?: boolean;
716
+ };
709
717
  type Context$2 = {
710
- getOas(): Promise<Oas>;
718
+ getOas(options?: GetOasOptions): Promise<Oas>;
711
719
  getBaseURL(): Promise<string | undefined>;
712
720
  };
713
721
  declare global {
@@ -1255,4 +1263,4 @@ type ResolvedOptions = {
1255
1263
  type PluginFaker = PluginFactoryOptions<'plugin-faker', Options, ResolvedOptions, never, ResolvePathOptions>;
1256
1264
  //#endregion
1257
1265
  export { UserPluginWithLifeCycle as a, Schema as i, PluginFaker as n, ReactGenerator as r, Options as t };
1258
- //# sourceMappingURL=types-Blj03WRB.d.cts.map
1266
+ //# sourceMappingURL=types-CD44APnc.d.cts.map
@@ -65,7 +65,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
65
65
  * console.log('Starting Kubb generation')
66
66
  * })
67
67
  *
68
- * events.on('plugin:end', (plugin, duration) => {
68
+ * events.on('plugin:end', (plugin, { duration }) => {
69
69
  * console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
70
70
  * })
71
71
  * ```
@@ -211,8 +211,13 @@ interface KubbEvents {
211
211
  'plugin:start': [plugin: Plugin];
212
212
  /**
213
213
  * Emitted when a plugin completes execution.
214
+ * Duration in ms
214
215
  */
215
- 'plugin:end': [plugin: Plugin, duration: number];
216
+ 'plugin:end': [plugin: Plugin, meta: {
217
+ duration: number;
218
+ success: boolean;
219
+ error?: Error;
220
+ }];
216
221
  /**
217
222
  * Emitted when plugin hook progress tracking starts.
218
223
  * Contains the hook name and list of plugins to execute.
@@ -706,8 +711,11 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
706
711
  }
707
712
  //#endregion
708
713
  //#region ../plugin-oas/src/types.d.ts
714
+ type GetOasOptions = {
715
+ validate?: boolean;
716
+ };
709
717
  type Context$2 = {
710
- getOas(): Promise<Oas>;
718
+ getOas(options?: GetOasOptions): Promise<Oas>;
711
719
  getBaseURL(): Promise<string | undefined>;
712
720
  };
713
721
  declare global {
@@ -1255,4 +1263,4 @@ type ResolvedOptions = {
1255
1263
  type PluginFaker = PluginFactoryOptions<'plugin-faker', Options, ResolvedOptions, never, ResolvePathOptions>;
1256
1264
  //#endregion
1257
1265
  export { UserPluginWithLifeCycle as a, Schema as i, PluginFaker as n, ReactGenerator as r, Options as t };
1258
- //# sourceMappingURL=types-B0uUNfYF.d.ts.map
1266
+ //# sourceMappingURL=types-Cy9W-7-6.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-faker",
3
- "version": "4.12.5",
3
+ "version": "4.12.7",
4
4
  "description": "Faker.js data generator plugin for Kubb, creating realistic mock data from OpenAPI specifications for development and testing.",
5
5
  "keywords": [
6
6
  "faker",
@@ -68,11 +68,11 @@
68
68
  }
69
69
  ],
70
70
  "dependencies": {
71
- "@kubb/react-fabric": "0.7.1",
72
- "@kubb/core": "4.12.5",
73
- "@kubb/oas": "4.12.5",
74
- "@kubb/plugin-oas": "4.12.5",
75
- "@kubb/plugin-ts": "4.12.5"
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
  "engines": {
78
78
  "node": ">=20"