@kubb/plugin-msw 4.13.1 → 4.14.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 { h as Operation } from "./index-DmEumN-A.cjs";
1
+ import { h as Operation } from "./index-DQ_gP-zu.cjs";
2
2
  import { KubbNode } from "@kubb/react-fabric/types";
3
3
 
4
4
  //#region src/components/Handlers.d.ts
@@ -1,4 +1,4 @@
1
- import { h as Operation } from "./index-DyKQmS3O.js";
1
+ import { h as Operation } from "./index-BC25ub0a.js";
2
2
  import { KubbNode } from "@kubb/react-fabric/types";
3
3
 
4
4
  //#region src/components/Handlers.d.ts
@@ -1,5 +1,5 @@
1
- import "./index-DmEumN-A.cjs";
2
- import { n as PluginMsw, r as ReactGenerator } from "./types-Dn-8Uh5H.cjs";
1
+ import "./index-DQ_gP-zu.cjs";
2
+ import { n as PluginMsw, r as ReactGenerator } from "./types-BxbkrRzL.cjs";
3
3
 
4
4
  //#region src/generators/handlersGenerator.d.ts
5
5
  declare const handlersGenerator: ReactGenerator<PluginMsw>;
@@ -1,5 +1,5 @@
1
- import "./index-DyKQmS3O.js";
2
- import { n as PluginMsw, r as ReactGenerator } from "./types-DurUxj3b.js";
1
+ import "./index-BC25ub0a.js";
2
+ import { n as PluginMsw, r as ReactGenerator } from "./types-B7KpvM6o.js";
3
3
 
4
4
  //#region src/generators/handlersGenerator.d.ts
5
5
  declare const handlersGenerator: ReactGenerator<PluginMsw>;
@@ -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
 
8
8
  //#region ../oas/src/types.d.ts
9
9
  type contentType = 'application/json' | (string & {});
@@ -180,6 +180,8 @@ interface KubbEvents {
180
180
  id?: string;
181
181
  command: string;
182
182
  args?: readonly string[];
183
+ success: boolean;
184
+ error: Error | null;
183
185
  }];
184
186
  /**
185
187
  * Emitted when a new version of Kubb is available.
@@ -710,4 +712,4 @@ type FileMetaBase = {
710
712
  };
711
713
  //#endregion
712
714
  export { contentType as _, Output as a, ResolveNameParams as c, KubbEvents as d, BaseGenerator as f, SchemaObject$1 as g, Operation$1 as h, Group as i, UserPluginWithLifeCycle as l, HttpMethod as m, PluginManager as n, Plugin as o, Oas as p, Config as r, PluginFactoryOptions as s, FileMetaBase as t, AsyncEventEmitter as u };
713
- //# sourceMappingURL=index-DmEumN-A.d.cts.map
715
+ //# sourceMappingURL=index-BC25ub0a.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
 
8
8
  //#region ../oas/src/types.d.ts
9
9
  type contentType = 'application/json' | (string & {});
@@ -180,6 +180,8 @@ interface KubbEvents {
180
180
  id?: string;
181
181
  command: string;
182
182
  args?: readonly string[];
183
+ success: boolean;
184
+ error: Error | null;
183
185
  }];
184
186
  /**
185
187
  * Emitted when a new version of Kubb is available.
@@ -710,4 +712,4 @@ type FileMetaBase = {
710
712
  };
711
713
  //#endregion
712
714
  export { contentType as _, Output as a, ResolveNameParams as c, KubbEvents as d, BaseGenerator as f, SchemaObject$1 as g, Operation$1 as h, Group as i, UserPluginWithLifeCycle as l, HttpMethod as m, PluginManager as n, Plugin as o, Oas as p, Config as r, PluginFactoryOptions as s, FileMetaBase as t, AsyncEventEmitter as u };
713
- //# sourceMappingURL=index-DyKQmS3O.d.ts.map
715
+ //# sourceMappingURL=index-DQ_gP-zu.d.cts.map
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { l as UserPluginWithLifeCycle } from "./index-DmEumN-A.cjs";
2
- import { n as PluginMsw, t as Options } from "./types-Dn-8Uh5H.cjs";
1
+ import { l as UserPluginWithLifeCycle } from "./index-DQ_gP-zu.cjs";
2
+ import { n as PluginMsw, t as Options } from "./types-BxbkrRzL.cjs";
3
3
 
4
4
  //#region src/plugin.d.ts
5
5
  declare const pluginMswName = "plugin-msw";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { l as UserPluginWithLifeCycle } from "./index-DyKQmS3O.js";
2
- import { n as PluginMsw, t as Options } from "./types-DurUxj3b.js";
1
+ import { l as UserPluginWithLifeCycle } from "./index-BC25ub0a.js";
2
+ import { n as PluginMsw, t as Options } from "./types-B7KpvM6o.js";
3
3
 
4
4
  //#region src/plugin.d.ts
5
5
  declare const pluginMswName = "plugin-msw";
@@ -1,7 +1,7 @@
1
- import { _ as contentType, a as Output, c as ResolveNameParams, d as KubbEvents, f as BaseGenerator, g as SchemaObject, h as Operation, i as Group, m as HttpMethod, n as PluginManager, o as Plugin, p as Oas, r as Config, s as PluginFactoryOptions, t as FileMetaBase, u as AsyncEventEmitter } from "./index-DmEumN-A.cjs";
1
+ import { _ as contentType, a as Output, c as ResolveNameParams, d as KubbEvents, f as BaseGenerator, g as SchemaObject, h as Operation, i as Group, m as HttpMethod, n as PluginManager, o as Plugin, p as Oas, r as Config, s as PluginFactoryOptions, t as FileMetaBase, u as AsyncEventEmitter } from "./index-BC25ub0a.js";
2
+ import { Fabric } from "@kubb/react-fabric";
2
3
  import { KubbNode } from "@kubb/react-fabric/types";
3
4
  import { KubbFile } from "@kubb/fabric-core/types";
4
- import { Fabric } from "@kubb/react-fabric";
5
5
 
6
6
  //#region ../plugin-oas/src/types.d.ts
7
7
  type GetOasOptions = {
@@ -118,6 +118,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
118
118
  */
119
119
  plugin: Plugin<TPluginOptions>;
120
120
  mode: KubbFile.Mode;
121
+ UNSTABLE_NAMING?: true;
121
122
  };
122
123
  declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
123
124
  #private;
@@ -372,7 +373,7 @@ type SchemaGeneratorOptions = {
372
373
  dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
373
374
  unknownType: 'any' | 'unknown' | 'void';
374
375
  emptySchemaType: 'any' | 'unknown' | 'void';
375
- enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal';
376
+ enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
376
377
  enumSuffix?: string;
377
378
  usedEnumNames?: Record<string, number>;
378
379
  mapper?: Record<string, string>;
@@ -514,4 +515,4 @@ type ResolvedOptions = {
514
515
  type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
515
516
  //#endregion
516
517
  export { PluginMsw as n, ReactGenerator as r, Options as t };
517
- //# sourceMappingURL=types-Dn-8Uh5H.d.cts.map
518
+ //# sourceMappingURL=types-B7KpvM6o.d.ts.map
@@ -1,7 +1,7 @@
1
- import { _ as contentType, a as Output, c as ResolveNameParams, d as KubbEvents, f as BaseGenerator, g as SchemaObject, h as Operation, i as Group, m as HttpMethod, n as PluginManager, o as Plugin, p as Oas, r as Config, s as PluginFactoryOptions, t as FileMetaBase, u as AsyncEventEmitter } from "./index-DyKQmS3O.js";
2
- import { Fabric } from "@kubb/react-fabric";
1
+ import { _ as contentType, a as Output, c as ResolveNameParams, d as KubbEvents, f as BaseGenerator, g as SchemaObject, h as Operation, i as Group, m as HttpMethod, n as PluginManager, o as Plugin, p as Oas, r as Config, s as PluginFactoryOptions, t as FileMetaBase, u as AsyncEventEmitter } from "./index-DQ_gP-zu.cjs";
3
2
  import { KubbNode } from "@kubb/react-fabric/types";
4
3
  import { KubbFile } from "@kubb/fabric-core/types";
4
+ import { Fabric } from "@kubb/react-fabric";
5
5
 
6
6
  //#region ../plugin-oas/src/types.d.ts
7
7
  type GetOasOptions = {
@@ -118,6 +118,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
118
118
  */
119
119
  plugin: Plugin<TPluginOptions>;
120
120
  mode: KubbFile.Mode;
121
+ UNSTABLE_NAMING?: true;
121
122
  };
122
123
  declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
123
124
  #private;
@@ -372,7 +373,7 @@ type SchemaGeneratorOptions = {
372
373
  dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
373
374
  unknownType: 'any' | 'unknown' | 'void';
374
375
  emptySchemaType: 'any' | 'unknown' | 'void';
375
- enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal';
376
+ enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
376
377
  enumSuffix?: string;
377
378
  usedEnumNames?: Record<string, number>;
378
379
  mapper?: Record<string, string>;
@@ -514,4 +515,4 @@ type ResolvedOptions = {
514
515
  type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
515
516
  //#endregion
516
517
  export { PluginMsw as n, ReactGenerator as r, Options as t };
517
- //# sourceMappingURL=types-DurUxj3b.d.ts.map
518
+ //# sourceMappingURL=types-BxbkrRzL.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-msw",
3
- "version": "4.13.1",
3
+ "version": "4.14.1",
4
4
  "description": "Mock Service Worker (MSW) handlers generator plugin for Kubb, creating API mocks from OpenAPI specifications for frontend development and testing.",
5
5
  "keywords": [
6
6
  "msw",
@@ -74,11 +74,11 @@
74
74
  ],
75
75
  "dependencies": {
76
76
  "@kubb/react-fabric": "0.9.2",
77
- "@kubb/core": "4.13.1",
78
- "@kubb/oas": "4.13.1",
79
- "@kubb/plugin-faker": "4.13.1",
80
- "@kubb/plugin-oas": "4.13.1",
81
- "@kubb/plugin-ts": "4.13.1"
77
+ "@kubb/core": "4.14.1",
78
+ "@kubb/oas": "4.14.1",
79
+ "@kubb/plugin-faker": "4.14.1",
80
+ "@kubb/plugin-oas": "4.14.1",
81
+ "@kubb/plugin-ts": "4.14.1"
82
82
  },
83
83
  "devDependencies": {},
84
84
  "engines": {