@kubb/plugin-faker 4.12.6 → 4.12.8

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-DHqVCxvA.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-BLbVUXhX.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-DHqVCxvA.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-BLbVUXhX.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-DHqVCxvA.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-BLbVUXhX.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
  * ```
@@ -134,21 +134,21 @@ interface KubbEvents {
134
134
  */
135
135
  'hooks:end': [];
136
136
  /**
137
- * Emitted when a single hook execution starts.
138
- */
139
- 'hook:start': [command: string];
140
- /**
141
- * Emitted to execute a hook command (e.g., format or lint).
137
+ * Emitted when a single hook execution starts. (e.g., format or lint).
142
138
  * The callback should be invoked when the command completes.
143
139
  */
144
- 'hook:execute': [{
145
- command: string | URL;
140
+ 'hook:start': [{
141
+ id?: string;
142
+ command: string;
146
143
  args?: readonly string[];
147
- }, cb: () => void];
144
+ }];
148
145
  /**
149
146
  * Emitted when a single hook execution completes.
150
147
  */
151
- 'hook:end': [command: string];
148
+ 'hook:end': [{
149
+ id?: string;
150
+ command: string;
151
+ }];
152
152
  /**
153
153
  * Emitted when a new version of Kubb is available.
154
154
  */
@@ -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-BLbVUXhX.d.ts.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
  * ```
@@ -134,21 +134,21 @@ interface KubbEvents {
134
134
  */
135
135
  'hooks:end': [];
136
136
  /**
137
- * Emitted when a single hook execution starts.
138
- */
139
- 'hook:start': [command: string];
140
- /**
141
- * Emitted to execute a hook command (e.g., format or lint).
137
+ * Emitted when a single hook execution starts. (e.g., format or lint).
142
138
  * The callback should be invoked when the command completes.
143
139
  */
144
- 'hook:execute': [{
145
- command: string | URL;
140
+ 'hook:start': [{
141
+ id?: string;
142
+ command: string;
146
143
  args?: readonly string[];
147
- }, cb: () => void];
144
+ }];
148
145
  /**
149
146
  * Emitted when a single hook execution completes.
150
147
  */
151
- 'hook:end': [command: string];
148
+ 'hook:end': [{
149
+ id?: string;
150
+ command: string;
151
+ }];
152
152
  /**
153
153
  * Emitted when a new version of Kubb is available.
154
154
  */
@@ -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-DHqVCxvA.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-faker",
3
- "version": "4.12.6",
3
+ "version": "4.12.8",
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.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.4",
72
+ "@kubb/core": "4.12.8",
73
+ "@kubb/oas": "4.12.8",
74
+ "@kubb/plugin-oas": "4.12.8",
75
+ "@kubb/plugin-ts": "4.12.8"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=20"