@kubb/plugin-msw 4.12.10 → 4.12.11
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-BxrZCazk.d.ts → index-1BLErTHB.d.cts} +19 -23
- package/dist/{index-CfuomfBr.d.cts → index-BTzTv3qO.d.ts} +19 -23
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{types-Cze0i6DC.d.ts → types-By9Z224I.d.cts} +7 -7
- package/dist/{types-BY4-yFqe.d.cts → types-D98l2Yc_.d.ts} +7 -7
- 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-1BLErTHB.cjs";
|
|
2
|
+
import { n as PluginMsw, r as ReactGenerator } from "./types-By9Z224I.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-BTzTv3qO.js";
|
|
2
|
+
import { n as PluginMsw, r as ReactGenerator } from "./types-D98l2Yc_.js";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/handlersGenerator.d.ts
|
|
5
5
|
declare const handlersGenerator: ReactGenerator<PluginMsw>;
|
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
2
|
-
import * as OasTypes from "oas/types";
|
|
3
|
-
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
4
|
-
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
5
|
-
import { OpenAPIV3 } from "openapi-types";
|
|
6
1
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
7
2
|
import BaseOas from "oas";
|
|
3
|
+
import { Operation } from "oas/operation";
|
|
4
|
+
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
8
5
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
6
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
9
7
|
|
|
10
8
|
//#region ../oas/src/types.d.ts
|
|
11
9
|
type contentType = 'application/json' | (string & {});
|
|
12
|
-
type SchemaObject$1 =
|
|
10
|
+
type SchemaObject$1 = SchemaObject & {
|
|
13
11
|
'x-nullable'?: boolean;
|
|
14
12
|
$ref?: string;
|
|
15
13
|
};
|
|
14
|
+
type HttpMethod = HttpMethods;
|
|
15
|
+
type Document = OASDocument;
|
|
16
|
+
type Operation$1 = Operation;
|
|
17
|
+
type DiscriminatorObject$1 = DiscriminatorObject;
|
|
16
18
|
//#endregion
|
|
17
19
|
//#region ../oas/src/Oas.d.ts
|
|
18
20
|
type Options$1 = {
|
|
19
21
|
contentType?: contentType;
|
|
20
22
|
discriminator?: 'strict' | 'inherit';
|
|
21
23
|
};
|
|
22
|
-
declare class Oas
|
|
24
|
+
declare class Oas extends BaseOas {
|
|
23
25
|
#private;
|
|
24
|
-
document:
|
|
25
|
-
constructor(
|
|
26
|
-
oas,
|
|
27
|
-
user
|
|
28
|
-
}: {
|
|
29
|
-
oas: TOAS | OASDocument | string;
|
|
30
|
-
user?: User;
|
|
31
|
-
});
|
|
26
|
+
document: Document;
|
|
27
|
+
constructor(document: Document);
|
|
32
28
|
setOptions(options: Options$1): void;
|
|
33
29
|
get options(): Options$1;
|
|
34
|
-
get($ref: string):
|
|
30
|
+
get<T = unknown>($ref: string): T | null;
|
|
35
31
|
getKey($ref: string): string | undefined;
|
|
36
32
|
set($ref: string, value: unknown): false | undefined;
|
|
37
|
-
getDiscriminator(schema:
|
|
38
|
-
dereferenceWithRef(schema?:
|
|
39
|
-
getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
|
|
40
|
-
getRequestSchema(operation: Operation): SchemaObject | undefined;
|
|
41
|
-
getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
|
|
33
|
+
getDiscriminator(schema: SchemaObject$1 | null): DiscriminatorObject$1 | null;
|
|
34
|
+
dereferenceWithRef<T = unknown>(schema?: T): T;
|
|
35
|
+
getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
|
|
36
|
+
getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
|
|
37
|
+
getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
|
|
42
38
|
valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
|
|
43
|
-
flattenSchema(schema
|
|
39
|
+
flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
|
|
44
40
|
}
|
|
45
41
|
//#endregion
|
|
46
42
|
//#region ../core/src/BaseGenerator.d.ts
|
|
@@ -711,4 +707,4 @@ type FileMetaBase = {
|
|
|
711
707
|
};
|
|
712
708
|
//#endregion
|
|
713
709
|
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 };
|
|
714
|
-
//# sourceMappingURL=index-
|
|
710
|
+
//# sourceMappingURL=index-1BLErTHB.d.cts.map
|
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
3
|
-
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
4
|
-
import { OpenAPIV3 } from "openapi-types";
|
|
1
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
5
2
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
6
3
|
import BaseOas from "oas";
|
|
4
|
+
import { Operation } from "oas/operation";
|
|
5
|
+
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
7
6
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
8
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
9
7
|
|
|
10
8
|
//#region ../oas/src/types.d.ts
|
|
11
9
|
type contentType = 'application/json' | (string & {});
|
|
12
|
-
type SchemaObject$1 =
|
|
10
|
+
type SchemaObject$1 = SchemaObject & {
|
|
13
11
|
'x-nullable'?: boolean;
|
|
14
12
|
$ref?: string;
|
|
15
13
|
};
|
|
14
|
+
type HttpMethod = HttpMethods;
|
|
15
|
+
type Document = OASDocument;
|
|
16
|
+
type Operation$1 = Operation;
|
|
17
|
+
type DiscriminatorObject$1 = DiscriminatorObject;
|
|
16
18
|
//#endregion
|
|
17
19
|
//#region ../oas/src/Oas.d.ts
|
|
18
20
|
type Options$1 = {
|
|
19
21
|
contentType?: contentType;
|
|
20
22
|
discriminator?: 'strict' | 'inherit';
|
|
21
23
|
};
|
|
22
|
-
declare class Oas
|
|
24
|
+
declare class Oas extends BaseOas {
|
|
23
25
|
#private;
|
|
24
|
-
document:
|
|
25
|
-
constructor(
|
|
26
|
-
oas,
|
|
27
|
-
user
|
|
28
|
-
}: {
|
|
29
|
-
oas: TOAS | OASDocument | string;
|
|
30
|
-
user?: User;
|
|
31
|
-
});
|
|
26
|
+
document: Document;
|
|
27
|
+
constructor(document: Document);
|
|
32
28
|
setOptions(options: Options$1): void;
|
|
33
29
|
get options(): Options$1;
|
|
34
|
-
get($ref: string):
|
|
30
|
+
get<T = unknown>($ref: string): T | null;
|
|
35
31
|
getKey($ref: string): string | undefined;
|
|
36
32
|
set($ref: string, value: unknown): false | undefined;
|
|
37
|
-
getDiscriminator(schema:
|
|
38
|
-
dereferenceWithRef(schema?:
|
|
39
|
-
getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
|
|
40
|
-
getRequestSchema(operation: Operation): SchemaObject | undefined;
|
|
41
|
-
getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
|
|
33
|
+
getDiscriminator(schema: SchemaObject$1 | null): DiscriminatorObject$1 | null;
|
|
34
|
+
dereferenceWithRef<T = unknown>(schema?: T): T;
|
|
35
|
+
getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
|
|
36
|
+
getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
|
|
37
|
+
getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
|
|
42
38
|
valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
|
|
43
|
-
flattenSchema(schema
|
|
39
|
+
flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
|
|
44
40
|
}
|
|
45
41
|
//#endregion
|
|
46
42
|
//#region ../core/src/BaseGenerator.d.ts
|
|
@@ -711,4 +707,4 @@ type FileMetaBase = {
|
|
|
711
707
|
};
|
|
712
708
|
//#endregion
|
|
713
709
|
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 };
|
|
714
|
-
//# sourceMappingURL=index-
|
|
710
|
+
//# sourceMappingURL=index-BTzTv3qO.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-1BLErTHB.cjs";
|
|
2
|
+
import { n as PluginMsw, t as Options } from "./types-By9Z224I.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-BTzTv3qO.js";
|
|
2
|
+
import { n as PluginMsw, t as Options } from "./types-D98l2Yc_.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-
|
|
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-1BLErTHB.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 = {
|
|
@@ -387,13 +387,13 @@ type SchemaGeneratorOptions = {
|
|
|
387
387
|
* TODO TODO add docs
|
|
388
388
|
* @beta
|
|
389
389
|
*/
|
|
390
|
-
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Schema
|
|
390
|
+
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
|
|
391
391
|
};
|
|
392
392
|
};
|
|
393
393
|
type SchemaProps$1 = {
|
|
394
|
-
|
|
395
|
-
name
|
|
396
|
-
parentName
|
|
394
|
+
schema: SchemaObject | null;
|
|
395
|
+
name: string | null;
|
|
396
|
+
parentName: string | null;
|
|
397
397
|
};
|
|
398
398
|
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
399
399
|
#private;
|
|
@@ -514,4 +514,4 @@ type ResolvedOptions = {
|
|
|
514
514
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
515
515
|
//#endregion
|
|
516
516
|
export { PluginMsw as n, ReactGenerator as r, Options as t };
|
|
517
|
-
//# sourceMappingURL=types-
|
|
517
|
+
//# sourceMappingURL=types-By9Z224I.d.cts.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-
|
|
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-BTzTv3qO.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 = {
|
|
@@ -387,13 +387,13 @@ type SchemaGeneratorOptions = {
|
|
|
387
387
|
* TODO TODO add docs
|
|
388
388
|
* @beta
|
|
389
389
|
*/
|
|
390
|
-
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Schema
|
|
390
|
+
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
|
|
391
391
|
};
|
|
392
392
|
};
|
|
393
393
|
type SchemaProps$1 = {
|
|
394
|
-
|
|
395
|
-
name
|
|
396
|
-
parentName
|
|
394
|
+
schema: SchemaObject | null;
|
|
395
|
+
name: string | null;
|
|
396
|
+
parentName: string | null;
|
|
397
397
|
};
|
|
398
398
|
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
399
399
|
#private;
|
|
@@ -514,4 +514,4 @@ type ResolvedOptions = {
|
|
|
514
514
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
515
515
|
//#endregion
|
|
516
516
|
export { PluginMsw as n, ReactGenerator as r, Options as t };
|
|
517
|
-
//# sourceMappingURL=types-
|
|
517
|
+
//# sourceMappingURL=types-D98l2Yc_.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.11",
|
|
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.7.4",
|
|
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.
|
|
77
|
+
"@kubb/core": "4.12.11",
|
|
78
|
+
"@kubb/oas": "4.12.11",
|
|
79
|
+
"@kubb/plugin-faker": "4.12.11",
|
|
80
|
+
"@kubb/plugin-oas": "4.12.11",
|
|
81
|
+
"@kubb/plugin-ts": "4.12.11"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {},
|
|
84
84
|
"engines": {
|