@kubb/plugin-msw 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.
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/generators.d.cts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/{index-DQ_gP-zu.d.cts → index-BKi86a7m.d.cts} +13 -1
- package/dist/{index-BC25ub0a.d.ts → index-DsObfYme.d.ts} +13 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{types-BxbkrRzL.d.cts → types-C-42E1Jz.d.cts} +3 -2
- package/dist/{types-B7KpvM6o.d.ts → types-DjFMooWJ.d.ts} +3 -2
- package/package.json +6 -6
package/dist/components.d.cts
CHANGED
package/dist/components.d.ts
CHANGED
package/dist/generators.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { n as PluginMsw, r as ReactGenerator } from "./types-
|
|
1
|
+
import "./index-BKi86a7m.cjs";
|
|
2
|
+
import { n as PluginMsw, r as ReactGenerator } from "./types-C-42E1Jz.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/handlersGenerator.d.ts
|
|
5
5
|
declare const handlersGenerator: ReactGenerator<PluginMsw>;
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { n as PluginMsw, r as ReactGenerator } from "./types-
|
|
1
|
+
import "./index-DsObfYme.js";
|
|
2
|
+
import { n as PluginMsw, r as ReactGenerator } from "./types-DjFMooWJ.js";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/handlersGenerator.d.ts
|
|
5
5
|
declare const handlersGenerator: ReactGenerator<PluginMsw>;
|
|
@@ -390,6 +390,13 @@ type Config<TInput = Input> = {
|
|
|
390
390
|
* @default 'simple'
|
|
391
391
|
*/
|
|
392
392
|
defaultBanner?: 'simple' | 'full' | false;
|
|
393
|
+
/**
|
|
394
|
+
* Whether to override existing external files if they already exist.
|
|
395
|
+
* When setting the option in the global configuration, all plugins inherit the same behavior by default.
|
|
396
|
+
* However, all plugins also have an `output.override` option, which can be used to override the behavior for a specific plugin.
|
|
397
|
+
* @default false
|
|
398
|
+
*/
|
|
399
|
+
override?: boolean;
|
|
393
400
|
};
|
|
394
401
|
/**
|
|
395
402
|
* An array of Kubb plugins that will be used in the generation.
|
|
@@ -577,6 +584,11 @@ type Output<TOptions> = {
|
|
|
577
584
|
* Add a footer text in the beginning of every file
|
|
578
585
|
*/
|
|
579
586
|
footer?: string | ((options: TOptions) => string);
|
|
587
|
+
/**
|
|
588
|
+
* Whether to override existing external files if they already exist.
|
|
589
|
+
* @default false
|
|
590
|
+
*/
|
|
591
|
+
override?: boolean;
|
|
580
592
|
};
|
|
581
593
|
type GroupContext = {
|
|
582
594
|
group: string;
|
|
@@ -712,4 +724,4 @@ type FileMetaBase = {
|
|
|
712
724
|
};
|
|
713
725
|
//#endregion
|
|
714
726
|
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 };
|
|
715
|
-
//# sourceMappingURL=index-
|
|
727
|
+
//# sourceMappingURL=index-BKi86a7m.d.cts.map
|
|
@@ -390,6 +390,13 @@ type Config<TInput = Input> = {
|
|
|
390
390
|
* @default 'simple'
|
|
391
391
|
*/
|
|
392
392
|
defaultBanner?: 'simple' | 'full' | false;
|
|
393
|
+
/**
|
|
394
|
+
* Whether to override existing external files if they already exist.
|
|
395
|
+
* When setting the option in the global configuration, all plugins inherit the same behavior by default.
|
|
396
|
+
* However, all plugins also have an `output.override` option, which can be used to override the behavior for a specific plugin.
|
|
397
|
+
* @default false
|
|
398
|
+
*/
|
|
399
|
+
override?: boolean;
|
|
393
400
|
};
|
|
394
401
|
/**
|
|
395
402
|
* An array of Kubb plugins that will be used in the generation.
|
|
@@ -577,6 +584,11 @@ type Output<TOptions> = {
|
|
|
577
584
|
* Add a footer text in the beginning of every file
|
|
578
585
|
*/
|
|
579
586
|
footer?: string | ((options: TOptions) => string);
|
|
587
|
+
/**
|
|
588
|
+
* Whether to override existing external files if they already exist.
|
|
589
|
+
* @default false
|
|
590
|
+
*/
|
|
591
|
+
override?: boolean;
|
|
580
592
|
};
|
|
581
593
|
type GroupContext = {
|
|
582
594
|
group: string;
|
|
@@ -712,4 +724,4 @@ type FileMetaBase = {
|
|
|
712
724
|
};
|
|
713
725
|
//#endregion
|
|
714
726
|
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 };
|
|
715
|
-
//# sourceMappingURL=index-
|
|
727
|
+
//# sourceMappingURL=index-DsObfYme.d.ts.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as UserPluginWithLifeCycle } from "./index-
|
|
2
|
-
import { n as PluginMsw, t as Options } from "./types-
|
|
1
|
+
import { l as UserPluginWithLifeCycle } from "./index-BKi86a7m.cjs";
|
|
2
|
+
import { n as PluginMsw, t as Options } from "./types-C-42E1Jz.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-
|
|
2
|
-
import { n as PluginMsw, t as Options } from "./types-
|
|
1
|
+
import { l as UserPluginWithLifeCycle } from "./index-DsObfYme.js";
|
|
2
|
+
import { n as PluginMsw, t as Options } from "./types-DjFMooWJ.js";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin.d.ts
|
|
5
5
|
declare const pluginMswName = "plugin-msw";
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-BKi86a7m.cjs";
|
|
2
2
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
3
3
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
4
4
|
import { Fabric } from "@kubb/react-fabric";
|
|
@@ -122,6 +122,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
|
122
122
|
};
|
|
123
123
|
declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
|
|
124
124
|
#private;
|
|
125
|
+
getOptions(operation: Operation, method: HttpMethod): Partial<TPluginOptions['resolvedOptions']>;
|
|
125
126
|
getSchemas(operation: Operation, {
|
|
126
127
|
resolveName
|
|
127
128
|
}?: {
|
|
@@ -515,4 +516,4 @@ type ResolvedOptions = {
|
|
|
515
516
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
516
517
|
//#endregion
|
|
517
518
|
export { PluginMsw as n, ReactGenerator as r, Options as t };
|
|
518
|
-
//# sourceMappingURL=types-
|
|
519
|
+
//# sourceMappingURL=types-C-42E1Jz.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DsObfYme.js";
|
|
2
2
|
import { Fabric } from "@kubb/react-fabric";
|
|
3
3
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
4
4
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
@@ -122,6 +122,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
|
122
122
|
};
|
|
123
123
|
declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
|
|
124
124
|
#private;
|
|
125
|
+
getOptions(operation: Operation, method: HttpMethod): Partial<TPluginOptions['resolvedOptions']>;
|
|
125
126
|
getSchemas(operation: Operation, {
|
|
126
127
|
resolveName
|
|
127
128
|
}?: {
|
|
@@ -515,4 +516,4 @@ type ResolvedOptions = {
|
|
|
515
516
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
516
517
|
//#endregion
|
|
517
518
|
export { PluginMsw as n, ReactGenerator as r, Options as t };
|
|
518
|
-
//# sourceMappingURL=types-
|
|
519
|
+
//# sourceMappingURL=types-DjFMooWJ.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-msw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
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.
|
|
78
|
-
"@kubb/oas": "4.
|
|
79
|
-
"@kubb/plugin-faker": "4.
|
|
80
|
-
"@kubb/plugin-oas": "4.
|
|
81
|
-
"@kubb/plugin-ts": "4.
|
|
77
|
+
"@kubb/core": "4.15.0",
|
|
78
|
+
"@kubb/oas": "4.15.0",
|
|
79
|
+
"@kubb/plugin-faker": "4.15.0",
|
|
80
|
+
"@kubb/plugin-oas": "4.15.0",
|
|
81
|
+
"@kubb/plugin-ts": "4.15.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {},
|
|
84
84
|
"engines": {
|