@kubb/plugin-msw 4.12.6 → 4.12.7
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-CH9QiCej.d.cts → index-AR1cnPb-.d.ts} +9 -4
- package/dist/{index-pe4_JZ3K.d.ts → index-CD-P877N.d.cts} +9 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{types-CZnA5aRm.d.cts → types-BKLGq6H-.d.cts} +6 -3
- package/dist/{types-CSdstWCA.d.ts → types-DvsA1uW0.d.ts} +6 -3
- package/package.json +7 -7
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-CD-P877N.cjs";
|
|
2
|
+
import { n as PluginMsw, r as ReactGenerator } from "./types-BKLGq6H-.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-AR1cnPb-.js";
|
|
2
|
+
import { n as PluginMsw, r as ReactGenerator } from "./types-DvsA1uW0.js";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/handlersGenerator.d.ts
|
|
5
5
|
declare const handlersGenerator: ReactGenerator<PluginMsw>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
1
2
|
import * as OasTypes from "oas/types";
|
|
2
3
|
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
3
4
|
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
@@ -5,7 +6,6 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
5
6
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
6
7
|
import BaseOas from "oas";
|
|
7
8
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
8
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
9
9
|
|
|
10
10
|
//#region ../oas/src/types.d.ts
|
|
11
11
|
type contentType = 'application/json' | (string & {});
|
|
@@ -99,7 +99,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
|
|
|
99
99
|
* console.log('Starting Kubb generation')
|
|
100
100
|
* })
|
|
101
101
|
*
|
|
102
|
-
* events.on('plugin:end', (plugin, duration) => {
|
|
102
|
+
* events.on('plugin:end', (plugin, { duration }) => {
|
|
103
103
|
* console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
|
|
104
104
|
* })
|
|
105
105
|
* ```
|
|
@@ -245,8 +245,13 @@ interface KubbEvents {
|
|
|
245
245
|
'plugin:start': [plugin: Plugin];
|
|
246
246
|
/**
|
|
247
247
|
* Emitted when a plugin completes execution.
|
|
248
|
+
* Duration in ms
|
|
248
249
|
*/
|
|
249
|
-
'plugin:end': [plugin: Plugin,
|
|
250
|
+
'plugin:end': [plugin: Plugin, meta: {
|
|
251
|
+
duration: number;
|
|
252
|
+
success: boolean;
|
|
253
|
+
error?: Error;
|
|
254
|
+
}];
|
|
250
255
|
/**
|
|
251
256
|
* Emitted when plugin hook progress tracking starts.
|
|
252
257
|
* Contains the hook name and list of plugins to execute.
|
|
@@ -705,4 +710,4 @@ type FileMetaBase = {
|
|
|
705
710
|
};
|
|
706
711
|
//#endregion
|
|
707
712
|
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 };
|
|
708
|
-
//# sourceMappingURL=index-
|
|
713
|
+
//# sourceMappingURL=index-AR1cnPb-.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
2
1
|
import * as OasTypes from "oas/types";
|
|
3
2
|
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
4
3
|
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
@@ -6,6 +5,7 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
6
5
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
7
6
|
import BaseOas from "oas";
|
|
8
7
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
8
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
9
9
|
|
|
10
10
|
//#region ../oas/src/types.d.ts
|
|
11
11
|
type contentType = 'application/json' | (string & {});
|
|
@@ -99,7 +99,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
|
|
|
99
99
|
* console.log('Starting Kubb generation')
|
|
100
100
|
* })
|
|
101
101
|
*
|
|
102
|
-
* events.on('plugin:end', (plugin, duration) => {
|
|
102
|
+
* events.on('plugin:end', (plugin, { duration }) => {
|
|
103
103
|
* console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
|
|
104
104
|
* })
|
|
105
105
|
* ```
|
|
@@ -245,8 +245,13 @@ interface KubbEvents {
|
|
|
245
245
|
'plugin:start': [plugin: Plugin];
|
|
246
246
|
/**
|
|
247
247
|
* Emitted when a plugin completes execution.
|
|
248
|
+
* Duration in ms
|
|
248
249
|
*/
|
|
249
|
-
'plugin:end': [plugin: Plugin,
|
|
250
|
+
'plugin:end': [plugin: Plugin, meta: {
|
|
251
|
+
duration: number;
|
|
252
|
+
success: boolean;
|
|
253
|
+
error?: Error;
|
|
254
|
+
}];
|
|
250
255
|
/**
|
|
251
256
|
* Emitted when plugin hook progress tracking starts.
|
|
252
257
|
* Contains the hook name and list of plugins to execute.
|
|
@@ -705,4 +710,4 @@ type FileMetaBase = {
|
|
|
705
710
|
};
|
|
706
711
|
//#endregion
|
|
707
712
|
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 };
|
|
708
|
-
//# sourceMappingURL=index-
|
|
713
|
+
//# sourceMappingURL=index-CD-P877N.d.cts.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-CD-P877N.cjs";
|
|
2
|
+
import { n as PluginMsw, t as Options } from "./types-BKLGq6H-.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-AR1cnPb-.js";
|
|
2
|
+
import { n as PluginMsw, t as Options } from "./types-DvsA1uW0.js";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin.d.ts
|
|
5
5
|
declare const pluginMswName = "plugin-msw";
|
|
@@ -1,11 +1,14 @@
|
|
|
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-CD-P877N.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";
|
|
5
5
|
|
|
6
6
|
//#region ../plugin-oas/src/types.d.ts
|
|
7
|
+
type GetOasOptions = {
|
|
8
|
+
validate?: boolean;
|
|
9
|
+
};
|
|
7
10
|
type Context$2 = {
|
|
8
|
-
getOas(): Promise<Oas>;
|
|
11
|
+
getOas(options?: GetOasOptions): Promise<Oas>;
|
|
9
12
|
getBaseURL(): Promise<string | undefined>;
|
|
10
13
|
};
|
|
11
14
|
declare global {
|
|
@@ -510,4 +513,4 @@ type ResolvedOptions = {
|
|
|
510
513
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
511
514
|
//#endregion
|
|
512
515
|
export { PluginMsw as n, ReactGenerator as r, Options as t };
|
|
513
|
-
//# sourceMappingURL=types-
|
|
516
|
+
//# sourceMappingURL=types-BKLGq6H-.d.cts.map
|
|
@@ -1,11 +1,14 @@
|
|
|
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-AR1cnPb-.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";
|
|
5
5
|
|
|
6
6
|
//#region ../plugin-oas/src/types.d.ts
|
|
7
|
+
type GetOasOptions = {
|
|
8
|
+
validate?: boolean;
|
|
9
|
+
};
|
|
7
10
|
type Context$2 = {
|
|
8
|
-
getOas(): Promise<Oas>;
|
|
11
|
+
getOas(options?: GetOasOptions): Promise<Oas>;
|
|
9
12
|
getBaseURL(): Promise<string | undefined>;
|
|
10
13
|
};
|
|
11
14
|
declare global {
|
|
@@ -510,4 +513,4 @@ type ResolvedOptions = {
|
|
|
510
513
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
511
514
|
//#endregion
|
|
512
515
|
export { PluginMsw as n, ReactGenerator as r, Options as t };
|
|
513
|
-
//# sourceMappingURL=types-
|
|
516
|
+
//# sourceMappingURL=types-DvsA1uW0.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-msw",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.7",
|
|
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",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@kubb/react-fabric": "0.7.
|
|
77
|
-
"@kubb/core": "4.12.
|
|
78
|
-
"@kubb/oas": "4.12.
|
|
79
|
-
"@kubb/plugin-faker": "4.12.
|
|
80
|
-
"@kubb/plugin-oas": "4.12.
|
|
81
|
-
"@kubb/plugin-ts": "4.12.
|
|
76
|
+
"@kubb/react-fabric": "0.7.2",
|
|
77
|
+
"@kubb/core": "4.12.7",
|
|
78
|
+
"@kubb/oas": "4.12.7",
|
|
79
|
+
"@kubb/plugin-faker": "4.12.7",
|
|
80
|
+
"@kubb/plugin-oas": "4.12.7",
|
|
81
|
+
"@kubb/plugin-ts": "4.12.7"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {},
|
|
84
84
|
"engines": {
|