@kubb/plugin-msw 4.19.0 → 4.19.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,5 +1,5 @@
1
1
  import { v as __name } from "./index-B4gKt7dm.cjs";
2
- import { n as PluginMsw, r as ReactGenerator } from "./types-BKj4cTq4.cjs";
2
+ import { n as PluginMsw, r as ReactGenerator } from "./types-BvhOEuZ8.cjs";
3
3
 
4
4
  //#region src/generators/handlersGenerator.d.ts
5
5
  declare const handlersGenerator: ReactGenerator<PluginMsw>;
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk-eQyhnF5A.js";
2
2
  import "./index-Cdqo2P0B.js";
3
- import { n as PluginMsw, r as ReactGenerator } from "./types-DlVj7qjw.js";
3
+ import { n as PluginMsw, r as ReactGenerator } from "./types-CBM4UWNM.js";
4
4
 
5
5
  //#region src/generators/handlersGenerator.d.ts
6
6
  declare const handlersGenerator: ReactGenerator<PluginMsw>;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { l as UserPluginWithLifeCycle, v as __name } from "./index-B4gKt7dm.cjs";
2
- import { n as PluginMsw, t as Options } from "./types-BKj4cTq4.cjs";
2
+ import { n as PluginMsw, t as Options } from "./types-BvhOEuZ8.cjs";
3
3
 
4
4
  //#region src/plugin.d.ts
5
5
  declare const pluginMswName = "plugin-msw";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk-eQyhnF5A.js";
2
2
  import { l as UserPluginWithLifeCycle } from "./index-Cdqo2P0B.js";
3
- import { n as PluginMsw, t as Options } from "./types-DlVj7qjw.js";
3
+ import { n as PluginMsw, t as Options } from "./types-CBM4UWNM.js";
4
4
 
5
5
  //#region src/plugin.d.ts
6
6
  declare const pluginMswName = "plugin-msw";
@@ -376,6 +376,11 @@ type SchemaGeneratorOptions = {
376
376
  emptySchemaType: 'any' | 'unknown' | 'void';
377
377
  enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
378
378
  enumSuffix?: string;
379
+ /**
380
+ * @deprecated Will be removed in v5. Use `collisionDetection: true` instead to prevent enum name collisions.
381
+ * When `collisionDetection` is enabled, the rootName-based approach eliminates the need for numeric suffixes.
382
+ * @internal
383
+ */
379
384
  usedEnumNames?: Record<string, number>;
380
385
  mapper?: Record<string, string>;
381
386
  typed?: boolean;
@@ -396,6 +401,7 @@ type SchemaProps$1 = {
396
401
  schema: SchemaObject | null;
397
402
  name: string | null;
398
403
  parentName: string | null;
404
+ rootName?: string | null;
399
405
  };
400
406
  declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
401
407
  #private;
@@ -516,4 +522,4 @@ type ResolvedOptions = {
516
522
  type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
517
523
  //#endregion
518
524
  export { PluginMsw as n, ReactGenerator as r, Options as t };
519
- //# sourceMappingURL=types-BKj4cTq4.d.cts.map
525
+ //# sourceMappingURL=types-BvhOEuZ8.d.cts.map
@@ -377,6 +377,11 @@ type SchemaGeneratorOptions = {
377
377
  emptySchemaType: 'any' | 'unknown' | 'void';
378
378
  enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
379
379
  enumSuffix?: string;
380
+ /**
381
+ * @deprecated Will be removed in v5. Use `collisionDetection: true` instead to prevent enum name collisions.
382
+ * When `collisionDetection` is enabled, the rootName-based approach eliminates the need for numeric suffixes.
383
+ * @internal
384
+ */
380
385
  usedEnumNames?: Record<string, number>;
381
386
  mapper?: Record<string, string>;
382
387
  typed?: boolean;
@@ -397,6 +402,7 @@ type SchemaProps$1 = {
397
402
  schema: SchemaObject | null;
398
403
  name: string | null;
399
404
  parentName: string | null;
405
+ rootName?: string | null;
400
406
  };
401
407
  declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
402
408
  #private;
@@ -517,4 +523,4 @@ type ResolvedOptions = {
517
523
  type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
518
524
  //#endregion
519
525
  export { PluginMsw as n, ReactGenerator as r, Options as t };
520
- //# sourceMappingURL=types-DlVj7qjw.d.ts.map
526
+ //# sourceMappingURL=types-CBM4UWNM.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-msw",
3
- "version": "4.19.0",
3
+ "version": "4.19.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.12.4",
77
- "@kubb/core": "4.19.0",
78
- "@kubb/oas": "4.19.0",
79
- "@kubb/plugin-faker": "4.19.0",
80
- "@kubb/plugin-oas": "4.19.0",
81
- "@kubb/plugin-ts": "4.19.0"
77
+ "@kubb/core": "4.19.1",
78
+ "@kubb/oas": "4.19.1",
79
+ "@kubb/plugin-faker": "4.19.1",
80
+ "@kubb/plugin-oas": "4.19.1",
81
+ "@kubb/plugin-ts": "4.19.1"
82
82
  },
83
83
  "devDependencies": {},
84
84
  "engines": {