@kubb/plugin-cypress 4.14.1 → 4.15.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 OperationSchemas, n as PluginCypress, o as HttpMethod } from "./types-B-ORSp3Q.cjs";
1
+ import { i as OperationSchemas, n as PluginCypress, o as HttpMethod } from "./types-ntEGZPoG.cjs";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { i as OperationSchemas, n as PluginCypress, o as HttpMethod } from "./types-BXxBUIdp.js";
1
+ import { i as OperationSchemas, n as PluginCypress, o as HttpMethod } from "./types-BadxcM8-.js";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { n as PluginCypress, r as ReactGenerator } from "./types-B-ORSp3Q.cjs";
1
+ import { n as PluginCypress, r as ReactGenerator } from "./types-ntEGZPoG.cjs";
2
2
 
3
3
  //#region src/generators/cypressGenerator.d.ts
4
4
  declare const cypressGenerator: ReactGenerator<PluginCypress>;
@@ -1,4 +1,4 @@
1
- import { n as PluginCypress, r as ReactGenerator } from "./types-BXxBUIdp.js";
1
+ import { n as PluginCypress, r as ReactGenerator } from "./types-BadxcM8-.js";
2
2
 
3
3
  //#region src/generators/cypressGenerator.d.ts
4
4
  declare const cypressGenerator: ReactGenerator<PluginCypress>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginCypress, t as Options } from "./types-B-ORSp3Q.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginCypress, t as Options } from "./types-ntEGZPoG.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginCypressName = "plugin-cypress";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginCypress, t as Options } from "./types-BXxBUIdp.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginCypress, t as Options } from "./types-BadxcM8-.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginCypressName = "plugin-cypress";
@@ -1,9 +1,9 @@
1
+ import { Fabric } from "@kubb/react-fabric";
1
2
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
2
3
  import BaseOas from "oas";
3
4
  import { Operation } from "oas/operation";
4
5
  import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
5
6
  import { KubbFile } from "@kubb/fabric-core/types";
6
- import { Fabric } from "@kubb/react-fabric";
7
7
  import { KubbNode } from "@kubb/react-fabric/types";
8
8
 
9
9
  //#region ../oas/src/types.d.ts
@@ -391,6 +391,13 @@ type Config<TInput = Input> = {
391
391
  * @default 'simple'
392
392
  */
393
393
  defaultBanner?: 'simple' | 'full' | false;
394
+ /**
395
+ * Whether to override existing external files if they already exist.
396
+ * When setting the option in the global configuration, all plugins inherit the same behavior by default.
397
+ * However, all plugins also have an `output.override` option, which can be used to override the behavior for a specific plugin.
398
+ * @default false
399
+ */
400
+ override?: boolean;
394
401
  };
395
402
  /**
396
403
  * An array of Kubb plugins that will be used in the generation.
@@ -578,6 +585,11 @@ type Output<TOptions> = {
578
585
  * Add a footer text in the beginning of every file
579
586
  */
580
587
  footer?: string | ((options: TOptions) => string);
588
+ /**
589
+ * Whether to override existing external files if they already exist.
590
+ * @default false
591
+ */
592
+ override?: boolean;
581
593
  };
582
594
  type GroupContext = {
583
595
  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
  }?: {
@@ -1241,4 +1254,4 @@ type ResolvedOptions = {
1241
1254
  type PluginCypress = PluginFactoryOptions<'plugin-cypress', Options, ResolvedOptions, never, ResolvePathOptions>;
1242
1255
  //#endregion
1243
1256
  export { UserPluginWithLifeCycle as a, OperationSchemas as i, PluginCypress as n, HttpMethod as o, ReactGenerator as r, Options as t };
1244
- //# sourceMappingURL=types-B-ORSp3Q.d.cts.map
1257
+ //# sourceMappingURL=types-BadxcM8-.d.ts.map
@@ -1,9 +1,9 @@
1
- import { Fabric } from "@kubb/react-fabric";
2
1
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
3
2
  import BaseOas from "oas";
4
3
  import { Operation } from "oas/operation";
5
4
  import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
6
5
  import { KubbFile } from "@kubb/fabric-core/types";
6
+ import { Fabric } from "@kubb/react-fabric";
7
7
  import { KubbNode } from "@kubb/react-fabric/types";
8
8
 
9
9
  //#region ../oas/src/types.d.ts
@@ -391,6 +391,13 @@ type Config<TInput = Input> = {
391
391
  * @default 'simple'
392
392
  */
393
393
  defaultBanner?: 'simple' | 'full' | false;
394
+ /**
395
+ * Whether to override existing external files if they already exist.
396
+ * When setting the option in the global configuration, all plugins inherit the same behavior by default.
397
+ * However, all plugins also have an `output.override` option, which can be used to override the behavior for a specific plugin.
398
+ * @default false
399
+ */
400
+ override?: boolean;
394
401
  };
395
402
  /**
396
403
  * An array of Kubb plugins that will be used in the generation.
@@ -578,6 +585,11 @@ type Output<TOptions> = {
578
585
  * Add a footer text in the beginning of every file
579
586
  */
580
587
  footer?: string | ((options: TOptions) => string);
588
+ /**
589
+ * Whether to override existing external files if they already exist.
590
+ * @default false
591
+ */
592
+ override?: boolean;
581
593
  };
582
594
  type GroupContext = {
583
595
  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
  }?: {
@@ -1241,4 +1254,4 @@ type ResolvedOptions = {
1241
1254
  type PluginCypress = PluginFactoryOptions<'plugin-cypress', Options, ResolvedOptions, never, ResolvePathOptions>;
1242
1255
  //#endregion
1243
1256
  export { UserPluginWithLifeCycle as a, OperationSchemas as i, PluginCypress as n, HttpMethod as o, ReactGenerator as r, Options as t };
1244
- //# sourceMappingURL=types-BXxBUIdp.d.ts.map
1257
+ //# sourceMappingURL=types-ntEGZPoG.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-cypress",
3
- "version": "4.14.1",
3
+ "version": "4.15.1",
4
4
  "description": "Cypress test generator plugin for Kubb, creating end-to-end tests from OpenAPI specifications for automated API testing.",
5
5
  "keywords": [
6
6
  "cypress",
@@ -75,10 +75,10 @@
75
75
  ],
76
76
  "dependencies": {
77
77
  "@kubb/react-fabric": "0.9.2",
78
- "@kubb/core": "4.14.1",
79
- "@kubb/oas": "4.14.1",
80
- "@kubb/plugin-oas": "4.14.1",
81
- "@kubb/plugin-ts": "4.14.1"
78
+ "@kubb/core": "4.15.1",
79
+ "@kubb/oas": "4.15.1",
80
+ "@kubb/plugin-oas": "4.15.1",
81
+ "@kubb/plugin-ts": "4.15.1"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=20"