@kubb/plugin-faker 4.14.1 → 4.15.0

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-BQi5y4EE.cjs";
1
+ import { i as Schema, n as PluginFaker } from "./types-DVGuKJH8.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-Bq55eKp_.js";
1
+ import { i as Schema, n as PluginFaker } from "./types-CPMdGdN5.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-BQi5y4EE.cjs";
1
+ import { n as PluginFaker, r as ReactGenerator } from "./types-DVGuKJH8.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-Bq55eKp_.js";
1
+ import { n as PluginFaker, r as ReactGenerator } from "./types-CPMdGdN5.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-BQi5y4EE.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-DVGuKJH8.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-Bq55eKp_.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-CPMdGdN5.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginFakerName = "plugin-faker";
@@ -1,5 +1,5 @@
1
- import { KubbFile } from "@kubb/fabric-core/types";
2
1
  import { Fabric } from "@kubb/react-fabric";
2
+ import { KubbFile } from "@kubb/fabric-core/types";
3
3
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
4
4
  import BaseOas from "oas";
5
5
  import { Operation } from "oas/operation";
@@ -357,6 +357,13 @@ type Config<TInput = Input> = {
357
357
  * @default 'simple'
358
358
  */
359
359
  defaultBanner?: 'simple' | 'full' | false;
360
+ /**
361
+ * Whether to override existing external files if they already exist.
362
+ * When setting the option in the global configuration, all plugins inherit the same behavior by default.
363
+ * However, all plugins also have an `output.override` option, which can be used to override the behavior for a specific plugin.
364
+ * @default false
365
+ */
366
+ override?: boolean;
360
367
  };
361
368
  /**
362
369
  * An array of Kubb plugins that will be used in the generation.
@@ -544,6 +551,11 @@ type Output<TOptions> = {
544
551
  * Add a footer text in the beginning of every file
545
552
  */
546
553
  footer?: string | ((options: TOptions) => string);
554
+ /**
555
+ * Whether to override existing external files if they already exist.
556
+ * @default false
557
+ */
558
+ override?: boolean;
547
559
  };
548
560
  type GroupContext = {
549
561
  group: string;
@@ -831,6 +843,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
831
843
  };
832
844
  declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
833
845
  #private;
846
+ getOptions(operation: Operation$1, method: HttpMethod): Partial<TPluginOptions['resolvedOptions']>;
834
847
  getSchemas(operation: Operation$1, {
835
848
  resolveName
836
849
  }?: {
@@ -1267,4 +1280,4 @@ type ResolvedOptions = {
1267
1280
  type PluginFaker = PluginFactoryOptions<'plugin-faker', Options, ResolvedOptions, never, ResolvePathOptions>;
1268
1281
  //#endregion
1269
1282
  export { UserPluginWithLifeCycle as a, Schema as i, PluginFaker as n, ReactGenerator as r, Options as t };
1270
- //# sourceMappingURL=types-BQi5y4EE.d.cts.map
1283
+ //# sourceMappingURL=types-CPMdGdN5.d.ts.map
@@ -1,5 +1,5 @@
1
- import { Fabric } from "@kubb/react-fabric";
2
1
  import { KubbFile } from "@kubb/fabric-core/types";
2
+ import { Fabric } from "@kubb/react-fabric";
3
3
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
4
4
  import BaseOas from "oas";
5
5
  import { Operation } from "oas/operation";
@@ -357,6 +357,13 @@ type Config<TInput = Input> = {
357
357
  * @default 'simple'
358
358
  */
359
359
  defaultBanner?: 'simple' | 'full' | false;
360
+ /**
361
+ * Whether to override existing external files if they already exist.
362
+ * When setting the option in the global configuration, all plugins inherit the same behavior by default.
363
+ * However, all plugins also have an `output.override` option, which can be used to override the behavior for a specific plugin.
364
+ * @default false
365
+ */
366
+ override?: boolean;
360
367
  };
361
368
  /**
362
369
  * An array of Kubb plugins that will be used in the generation.
@@ -544,6 +551,11 @@ type Output<TOptions> = {
544
551
  * Add a footer text in the beginning of every file
545
552
  */
546
553
  footer?: string | ((options: TOptions) => string);
554
+ /**
555
+ * Whether to override existing external files if they already exist.
556
+ * @default false
557
+ */
558
+ override?: boolean;
547
559
  };
548
560
  type GroupContext = {
549
561
  group: string;
@@ -831,6 +843,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
831
843
  };
832
844
  declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
833
845
  #private;
846
+ getOptions(operation: Operation$1, method: HttpMethod): Partial<TPluginOptions['resolvedOptions']>;
834
847
  getSchemas(operation: Operation$1, {
835
848
  resolveName
836
849
  }?: {
@@ -1267,4 +1280,4 @@ type ResolvedOptions = {
1267
1280
  type PluginFaker = PluginFactoryOptions<'plugin-faker', Options, ResolvedOptions, never, ResolvePathOptions>;
1268
1281
  //#endregion
1269
1282
  export { UserPluginWithLifeCycle as a, Schema as i, PluginFaker as n, ReactGenerator as r, Options as t };
1270
- //# sourceMappingURL=types-Bq55eKp_.d.ts.map
1283
+ //# sourceMappingURL=types-DVGuKJH8.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-faker",
3
- "version": "4.14.1",
3
+ "version": "4.15.0",
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",
@@ -69,10 +69,10 @@
69
69
  ],
70
70
  "dependencies": {
71
71
  "@kubb/react-fabric": "0.9.2",
72
- "@kubb/core": "4.14.1",
73
- "@kubb/oas": "4.14.1",
74
- "@kubb/plugin-oas": "4.14.1",
75
- "@kubb/plugin-ts": "4.14.1"
72
+ "@kubb/core": "4.15.0",
73
+ "@kubb/oas": "4.15.0",
74
+ "@kubb/plugin-oas": "4.15.0",
75
+ "@kubb/plugin-ts": "4.15.0"
76
76
  },
77
77
  "engines": {
78
78
  "node": ">=20"