@kubb/plugin-msw 4.1.3 → 4.2.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/README.md +18 -16
- package/dist/{components-Bcz4mvn3.cjs → components-CULOceYX.cjs} +34 -1
- package/dist/components-CULOceYX.cjs.map +1 -0
- package/dist/{components-Ba13vW1_.js → components-DcRndqwD.js} +29 -2
- package/dist/components-DcRndqwD.js.map +1 -0
- package/dist/components.cjs +3 -2
- package/dist/components.d.cts +21 -8
- package/dist/components.d.ts +21 -8
- package/dist/components.js +2 -2
- package/dist/{generators-DgwpklSC.cjs → generators-CPaZGj9Z.cjs} +29 -5
- package/dist/generators-CPaZGj9Z.cjs.map +1 -0
- package/dist/{generators-lMP39igU.js → generators-DY8aHf0H.js} +30 -7
- package/dist/generators-DY8aHf0H.js.map +1 -0
- package/dist/generators.cjs +2 -2
- package/dist/generators.d.cts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/generators.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{types-BOMj2hjt.d.ts → types-8ZXwr93_.d.cts} +2 -2
- package/dist/{types-BdC96j80.d.ts → types-B0eas7Yy.d.ts} +70 -70
- package/dist/{types-DYAniEBx.d.cts → types-IbHKcY02.d.ts} +2 -2
- package/dist/{types-DLxzBV0T.d.cts → types-eHiK8Pi0.d.cts} +70 -70
- package/package.json +8 -10
- package/src/components/Handlers.tsx +1 -2
- package/src/components/Mock.tsx +1 -2
- package/src/components/MockWithFaker.tsx +1 -2
- package/src/components/Response.tsx +42 -0
- package/src/components/index.ts +1 -0
- package/src/generators/__snapshots__/createPet.ts +6 -0
- package/src/generators/__snapshots__/createPetFaker.ts +6 -0
- package/src/generators/__snapshots__/getPets.ts +15 -0
- package/src/generators/__snapshots__/getPetsFaker.ts +15 -0
- package/src/generators/__snapshots__/showPetById.ts +9 -0
- package/src/generators/handlersGenerator.tsx +5 -2
- package/src/generators/mswGenerator.tsx +37 -8
- package/dist/components-Ba13vW1_.js.map +0 -1
- package/dist/components-Bcz4mvn3.cjs.map +0 -1
- package/dist/generators-DgwpklSC.cjs.map +0 -1
- package/dist/generators-lMP39igU.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as contentType, i as SchemaObject$1, n as OasTypes, r as Operation$1, t as HttpMethod } from "./types-IbHKcY02.js";
|
|
2
2
|
import { OASDocument, SchemaObject, User } from "oas/types";
|
|
3
3
|
import { Operation } from "oas/operation";
|
|
4
4
|
import { OpenAPIV3 } from "openapi-types";
|
|
@@ -39,17 +39,17 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
|
|
|
39
39
|
* Abstract class that contains the building blocks for plugins to create their own Generator
|
|
40
40
|
* @link idea based on https://github.com/colinhacks/zod/blob/master/src/types.ts#L137
|
|
41
41
|
*/
|
|
42
|
-
declare abstract class BaseGenerator<TOptions = unknown, TContext = unknown> {
|
|
42
|
+
declare abstract class BaseGenerator<TOptions$1 = unknown, TContext = unknown> {
|
|
43
43
|
#private;
|
|
44
|
-
constructor(options?: TOptions, context?: TContext);
|
|
45
|
-
get options(): TOptions;
|
|
44
|
+
constructor(options?: TOptions$1, context?: TContext);
|
|
45
|
+
get options(): TOptions$1;
|
|
46
46
|
get context(): TContext;
|
|
47
|
-
set options(options: TOptions);
|
|
47
|
+
set options(options: TOptions$1);
|
|
48
48
|
abstract build(...params: unknown[]): unknown;
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region ../core/src/fs/types.d.ts
|
|
52
|
-
type BasePath<T extends string = string> = `${T}/`;
|
|
52
|
+
type BasePath<T$1 extends string = string> = `${T$1}/`;
|
|
53
53
|
type Import = {
|
|
54
54
|
/**
|
|
55
55
|
* Import name to be used
|
|
@@ -123,7 +123,7 @@ type BaseName = `${string}.${string}`;
|
|
|
123
123
|
* Path will be full qualified path to a specified file
|
|
124
124
|
*/
|
|
125
125
|
type Path = string;
|
|
126
|
-
type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
|
|
126
|
+
type AdvancedPath<T$1 extends BaseName = BaseName> = `${BasePath}${T$1}`;
|
|
127
127
|
type OptionalPath = Path | undefined | null;
|
|
128
128
|
type File<TMeta extends object = object> = {
|
|
129
129
|
/**
|
|
@@ -212,9 +212,9 @@ type Logger = {
|
|
|
212
212
|
};
|
|
213
213
|
//#endregion
|
|
214
214
|
//#region ../core/src/utils/types.d.ts
|
|
215
|
-
type PossiblePromise<T> = Promise<T> | T;
|
|
216
|
-
type ArrayWithLength<T extends number, U extends any[] = []> = U['length'] extends T ? U : ArrayWithLength<T, [true, ...U]>;
|
|
217
|
-
type GreaterThan<T extends number, U extends number> = ArrayWithLength<U> extends [...ArrayWithLength<T>, ...infer _] ? false : true;
|
|
215
|
+
type PossiblePromise<T$1> = Promise<T$1> | T$1;
|
|
216
|
+
type ArrayWithLength<T$1 extends number, U extends any[] = []> = U['length'] extends T$1 ? U : ArrayWithLength<T$1, [true, ...U]>;
|
|
217
|
+
type GreaterThan<T$1 extends number, U extends number> = ArrayWithLength<U> extends [...ArrayWithLength<T$1>, ...infer _] ? false : true;
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region ../core/src/types.d.ts
|
|
220
220
|
type InputPath = {
|
|
@@ -327,11 +327,11 @@ TName extends string = string,
|
|
|
327
327
|
/**
|
|
328
328
|
* Options of the plugin.
|
|
329
329
|
*/
|
|
330
|
-
TOptions extends object = object,
|
|
330
|
+
TOptions$1 extends object = object,
|
|
331
331
|
/**
|
|
332
332
|
* Options of the plugin that can be used later on, see `options` inside your plugin config.
|
|
333
333
|
*/
|
|
334
|
-
TResolvedOptions extends object = TOptions,
|
|
334
|
+
TResolvedOptions extends object = TOptions$1,
|
|
335
335
|
/**
|
|
336
336
|
* Context that you want to expose to other plugins.
|
|
337
337
|
*/
|
|
@@ -345,23 +345,23 @@ TResolvePathOptions extends object = object> = {
|
|
|
345
345
|
* Same behaviour like what has been done with `QueryKey` in `@tanstack/react-query`
|
|
346
346
|
*/
|
|
347
347
|
key: PluginKey<TName | string>;
|
|
348
|
-
options: TOptions;
|
|
348
|
+
options: TOptions$1;
|
|
349
349
|
resolvedOptions: TResolvedOptions;
|
|
350
350
|
context: TContext;
|
|
351
351
|
resolvePathOptions: TResolvePathOptions;
|
|
352
352
|
};
|
|
353
353
|
type PluginKey<TName> = [name: TName, identifier?: string | number];
|
|
354
|
-
type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
354
|
+
type UserPlugin<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
355
355
|
/**
|
|
356
356
|
* Unique name used for the plugin
|
|
357
357
|
* The name of the plugin follows the format scope:foo-bar or foo-bar, adding scope: can avoid naming conflicts with other plugins.
|
|
358
358
|
* @example @kubb/typescript
|
|
359
359
|
*/
|
|
360
|
-
name: TOptions['name'];
|
|
360
|
+
name: TOptions$1['name'];
|
|
361
361
|
/**
|
|
362
362
|
* Options set for a specific plugin(see kubb.config.js), passthrough of options.
|
|
363
363
|
*/
|
|
364
|
-
options: TOptions['resolvedOptions'];
|
|
364
|
+
options: TOptions$1['resolvedOptions'];
|
|
365
365
|
/**
|
|
366
366
|
* Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
|
|
367
367
|
* Can be used to validate dependent plugins.
|
|
@@ -371,23 +371,23 @@ type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> =
|
|
|
371
371
|
* Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin will be executed before these plugins.
|
|
372
372
|
*/
|
|
373
373
|
post?: Array<string>;
|
|
374
|
-
} & (TOptions['context'] extends never ? {
|
|
374
|
+
} & (TOptions$1['context'] extends never ? {
|
|
375
375
|
context?: never;
|
|
376
376
|
} : {
|
|
377
|
-
context: (this: TOptions['name'] extends 'core' ? null : Omit<PluginContext<TOptions>, 'addFile'>) => TOptions['context'];
|
|
377
|
+
context: (this: TOptions$1['name'] extends 'core' ? null : Omit<PluginContext<TOptions$1>, 'addFile'>) => TOptions$1['context'];
|
|
378
378
|
});
|
|
379
|
-
type UserPluginWithLifeCycle<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = UserPlugin<TOptions> & PluginLifecycle<TOptions>;
|
|
380
|
-
type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
379
|
+
type UserPluginWithLifeCycle<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = UserPlugin<TOptions$1> & PluginLifecycle<TOptions$1>;
|
|
380
|
+
type Plugin<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
381
381
|
/**
|
|
382
382
|
* Unique name used for the plugin
|
|
383
383
|
* @example @kubb/typescript
|
|
384
384
|
*/
|
|
385
|
-
name: TOptions['name'];
|
|
385
|
+
name: TOptions$1['name'];
|
|
386
386
|
/**
|
|
387
387
|
* Internal key used when a developer uses more than one of the same plugin
|
|
388
388
|
* @private
|
|
389
389
|
*/
|
|
390
|
-
key: TOptions['key'];
|
|
390
|
+
key: TOptions$1['key'];
|
|
391
391
|
/**
|
|
392
392
|
* Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
|
|
393
393
|
* Can be used to validate dependent plugins.
|
|
@@ -400,49 +400,49 @@ type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
|
400
400
|
/**
|
|
401
401
|
* Options set for a specific plugin(see kubb.config.js), passthrough of options.
|
|
402
402
|
*/
|
|
403
|
-
options: TOptions['resolvedOptions'];
|
|
404
|
-
} & (TOptions['context'] extends never ? {
|
|
403
|
+
options: TOptions$1['resolvedOptions'];
|
|
404
|
+
} & (TOptions$1['context'] extends never ? {
|
|
405
405
|
context?: never;
|
|
406
406
|
} : {
|
|
407
|
-
context: TOptions['context'];
|
|
407
|
+
context: TOptions$1['context'];
|
|
408
408
|
});
|
|
409
|
-
type PluginWithLifeCycle<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = Plugin<TOptions> & PluginLifecycle<TOptions>;
|
|
410
|
-
type PluginLifecycle<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
409
|
+
type PluginWithLifeCycle<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = Plugin<TOptions$1> & PluginLifecycle<TOptions$1>;
|
|
410
|
+
type PluginLifecycle<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
411
411
|
/**
|
|
412
412
|
* Start of the lifecycle of a plugin.
|
|
413
413
|
* @type hookParallel
|
|
414
414
|
*/
|
|
415
|
-
buildStart?: (this: PluginContext<TOptions>, Config: Config) => PossiblePromise<void>;
|
|
415
|
+
buildStart?: (this: PluginContext<TOptions$1>, Config: Config) => PossiblePromise<void>;
|
|
416
416
|
/**
|
|
417
417
|
* Resolve to a Path based on a baseName(example: `./Pet.ts`) and directory(example: `./models`).
|
|
418
418
|
* Options can als be included.
|
|
419
419
|
* @type hookFirst
|
|
420
420
|
* @example ('./Pet.ts', './src/gen/') => '/src/gen/Pet.ts'
|
|
421
421
|
*/
|
|
422
|
-
resolvePath?: (this: PluginContext<TOptions>, baseName: BaseName, mode?: Mode, options?: TOptions['resolvePathOptions']) => OptionalPath;
|
|
422
|
+
resolvePath?: (this: PluginContext<TOptions$1>, baseName: BaseName, mode?: Mode, options?: TOptions$1['resolvePathOptions']) => OptionalPath;
|
|
423
423
|
/**
|
|
424
424
|
* Resolve to a name based on a string.
|
|
425
425
|
* Useful when converting to PascalCase or camelCase.
|
|
426
426
|
* @type hookFirst
|
|
427
427
|
* @example ('pet') => 'Pet'
|
|
428
428
|
*/
|
|
429
|
-
resolveName?: (this: PluginContext<TOptions>, name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
429
|
+
resolveName?: (this: PluginContext<TOptions$1>, name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
430
430
|
/**
|
|
431
431
|
* End of the plugin lifecycle.
|
|
432
432
|
* @type hookParallel
|
|
433
433
|
*/
|
|
434
|
-
buildEnd?: (this: PluginContext<TOptions>) => PossiblePromise<void>;
|
|
434
|
+
buildEnd?: (this: PluginContext<TOptions$1>) => PossiblePromise<void>;
|
|
435
435
|
};
|
|
436
436
|
type PluginLifecycleHooks = keyof PluginLifecycle;
|
|
437
|
-
type PluginParameter<H extends PluginLifecycleHooks> = Parameters<Required<PluginLifecycle>[H]>;
|
|
438
|
-
type ResolvePathParams<TOptions = object> = {
|
|
437
|
+
type PluginParameter<H$1 extends PluginLifecycleHooks> = Parameters<Required<PluginLifecycle>[H$1]>;
|
|
438
|
+
type ResolvePathParams<TOptions$1 = object> = {
|
|
439
439
|
pluginKey?: Plugin['key'];
|
|
440
440
|
baseName: BaseName;
|
|
441
441
|
mode?: Mode;
|
|
442
442
|
/**
|
|
443
443
|
* Options to be passed to 'resolvePath' 3th parameter
|
|
444
444
|
*/
|
|
445
|
-
options?: TOptions;
|
|
445
|
+
options?: TOptions$1;
|
|
446
446
|
};
|
|
447
447
|
type ResolveNameParams = {
|
|
448
448
|
name: string;
|
|
@@ -455,12 +455,12 @@ type ResolveNameParams = {
|
|
|
455
455
|
*/
|
|
456
456
|
type?: 'file' | 'function' | 'type' | 'const';
|
|
457
457
|
};
|
|
458
|
-
type PluginContext<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
458
|
+
type PluginContext<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
459
459
|
config: Config;
|
|
460
460
|
fileManager: FileManager;
|
|
461
461
|
pluginManager: PluginManager;
|
|
462
462
|
addFile: (...file: Array<File>) => Promise<Array<ResolvedFile>>;
|
|
463
|
-
resolvePath: (params: ResolvePathParams<TOptions['resolvePathOptions']>) => OptionalPath;
|
|
463
|
+
resolvePath: (params: ResolvePathParams<TOptions$1['resolvePathOptions']>) => OptionalPath;
|
|
464
464
|
resolveName: (params: ResolveNameParams) => string;
|
|
465
465
|
logger: Logger;
|
|
466
466
|
/**
|
|
@@ -470,12 +470,12 @@ type PluginContext<TOptions extends PluginFactoryOptions = PluginFactoryOptions>
|
|
|
470
470
|
/**
|
|
471
471
|
* Current plugin
|
|
472
472
|
*/
|
|
473
|
-
plugin: Plugin<TOptions>;
|
|
473
|
+
plugin: Plugin<TOptions$1>;
|
|
474
474
|
};
|
|
475
475
|
/**
|
|
476
476
|
* Specify the export location for the files and define the behavior of the output
|
|
477
477
|
*/
|
|
478
|
-
type Output<TOptions> = {
|
|
478
|
+
type Output<TOptions$1> = {
|
|
479
479
|
/**
|
|
480
480
|
* Path to the output folder or file that will contain the generated code
|
|
481
481
|
*/
|
|
@@ -488,11 +488,11 @@ type Output<TOptions> = {
|
|
|
488
488
|
/**
|
|
489
489
|
* Add a banner text in the beginning of every file
|
|
490
490
|
*/
|
|
491
|
-
banner?: string | ((options: TOptions) => string);
|
|
491
|
+
banner?: string | ((options: TOptions$1) => string);
|
|
492
492
|
/**
|
|
493
493
|
* Add a footer text in the beginning of every file
|
|
494
494
|
*/
|
|
495
|
-
footer?: string | ((options: TOptions) => string);
|
|
495
|
+
footer?: string | ((options: TOptions$1) => string);
|
|
496
496
|
};
|
|
497
497
|
type GroupContext = {
|
|
498
498
|
group: string;
|
|
@@ -512,7 +512,7 @@ type Group = {
|
|
|
512
512
|
type FileMetaBase = {
|
|
513
513
|
pluginKey?: Plugin['key'];
|
|
514
514
|
};
|
|
515
|
-
type AddResult<T extends Array<File>> = Promise<Awaited<GreaterThan<T['length'], 1> extends true ? Promise<ResolvedFile[]> : Promise<ResolvedFile>>>;
|
|
515
|
+
type AddResult<T$1 extends Array<File>> = Promise<Awaited<GreaterThan<T$1['length'], 1> extends true ? Promise<ResolvedFile[]> : Promise<ResolvedFile>>>;
|
|
516
516
|
type AddIndexesProps = {
|
|
517
517
|
type: BarrelType | false | undefined;
|
|
518
518
|
/**
|
|
@@ -565,16 +565,16 @@ declare class FileManager {
|
|
|
565
565
|
//#region ../core/src/PluginManager.d.ts
|
|
566
566
|
type RequiredPluginLifecycle = Required<PluginLifecycle>;
|
|
567
567
|
type Strategy = 'hookFirst' | 'hookForPlugin' | 'hookParallel' | 'hookSeq';
|
|
568
|
-
type Executer<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
|
|
568
|
+
type Executer<H$1 extends PluginLifecycleHooks = PluginLifecycleHooks> = {
|
|
569
569
|
message: string;
|
|
570
570
|
strategy: Strategy;
|
|
571
|
-
hookName: H;
|
|
571
|
+
hookName: H$1;
|
|
572
572
|
plugin: Plugin;
|
|
573
573
|
parameters?: unknown[] | undefined;
|
|
574
574
|
output?: unknown;
|
|
575
575
|
};
|
|
576
|
-
type ParseResult<H extends PluginLifecycleHooks> = RequiredPluginLifecycle[H];
|
|
577
|
-
type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H>>> = {
|
|
576
|
+
type ParseResult<H$1 extends PluginLifecycleHooks> = RequiredPluginLifecycle[H$1];
|
|
577
|
+
type SafeParseResult<H$1 extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H$1>>> = {
|
|
578
578
|
result: Result;
|
|
579
579
|
plugin: Plugin;
|
|
580
580
|
};
|
|
@@ -590,12 +590,12 @@ type Events = {
|
|
|
590
590
|
executed: [executer: Executer];
|
|
591
591
|
error: [error: Error];
|
|
592
592
|
};
|
|
593
|
-
type GetFileProps<TOptions = object> = {
|
|
593
|
+
type GetFileProps<TOptions$1 = object> = {
|
|
594
594
|
name: string;
|
|
595
595
|
mode?: Mode;
|
|
596
596
|
extname: Extname;
|
|
597
597
|
pluginKey: Plugin['key'];
|
|
598
|
-
options?: TOptions;
|
|
598
|
+
options?: TOptions$1;
|
|
599
599
|
};
|
|
600
600
|
declare class PluginManager {
|
|
601
601
|
#private;
|
|
@@ -1001,12 +1001,12 @@ type ByContentType = {
|
|
|
1001
1001
|
};
|
|
1002
1002
|
type Exclude$1 = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
1003
1003
|
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
1004
|
-
type Override<TOptions> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
1005
|
-
options: Partial<TOptions>;
|
|
1004
|
+
type Override<TOptions$1> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
1005
|
+
options: Partial<TOptions$1>;
|
|
1006
1006
|
};
|
|
1007
1007
|
//#endregion
|
|
1008
1008
|
//#region ../plugin-oas/src/SchemaGenerator.d.ts
|
|
1009
|
-
type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
1009
|
+
type Context$1<TOptions$1, TPluginOptions extends PluginFactoryOptions> = {
|
|
1010
1010
|
oas: Oas;
|
|
1011
1011
|
pluginManager: PluginManager;
|
|
1012
1012
|
/**
|
|
@@ -1015,7 +1015,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
|
1015
1015
|
plugin: Plugin<TPluginOptions>;
|
|
1016
1016
|
mode: Mode;
|
|
1017
1017
|
include?: Array<'schemas' | 'responses' | 'requestBodies'>;
|
|
1018
|
-
override: Array<Override<TOptions>> | undefined;
|
|
1018
|
+
override: Array<Override<TOptions$1>> | undefined;
|
|
1019
1019
|
contentType?: contentType;
|
|
1020
1020
|
output?: string;
|
|
1021
1021
|
};
|
|
@@ -1046,7 +1046,7 @@ type SchemaProps$1 = {
|
|
|
1046
1046
|
name?: string;
|
|
1047
1047
|
parentName?: string;
|
|
1048
1048
|
};
|
|
1049
|
-
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context$1<TOptions, TPluginOptions>> {
|
|
1049
|
+
declare class SchemaGenerator<TOptions$1 extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions$1, Context$1<TOptions$1, TPluginOptions>> {
|
|
1050
1050
|
#private;
|
|
1051
1051
|
refs: Refs;
|
|
1052
1052
|
/**
|
|
@@ -1065,39 +1065,39 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
|
|
|
1065
1065
|
}
|
|
1066
1066
|
//#endregion
|
|
1067
1067
|
//#region ../plugin-oas/src/generator.d.ts
|
|
1068
|
-
type OperationsProps<TOptions extends PluginFactoryOptions> = {
|
|
1069
|
-
instance: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
1070
|
-
options: TOptions['resolvedOptions'];
|
|
1068
|
+
type OperationsProps<TOptions$1 extends PluginFactoryOptions> = {
|
|
1069
|
+
instance: Omit<OperationGenerator<TOptions$1>, 'build'>;
|
|
1070
|
+
options: TOptions$1['resolvedOptions'];
|
|
1071
1071
|
operations: Array<Operation$1>;
|
|
1072
1072
|
};
|
|
1073
|
-
type OperationProps<TOptions extends PluginFactoryOptions> = {
|
|
1074
|
-
instance: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
1075
|
-
options: TOptions['resolvedOptions'];
|
|
1073
|
+
type OperationProps<TOptions$1 extends PluginFactoryOptions> = {
|
|
1074
|
+
instance: Omit<OperationGenerator<TOptions$1>, 'build'>;
|
|
1075
|
+
options: TOptions$1['resolvedOptions'];
|
|
1076
1076
|
operation: Operation$1;
|
|
1077
1077
|
};
|
|
1078
|
-
type SchemaProps<TOptions extends PluginFactoryOptions> = {
|
|
1079
|
-
instance: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
|
|
1080
|
-
options: TOptions['resolvedOptions'];
|
|
1078
|
+
type SchemaProps<TOptions$1 extends PluginFactoryOptions> = {
|
|
1079
|
+
instance: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions$1>, 'build'>;
|
|
1080
|
+
options: TOptions$1['resolvedOptions'];
|
|
1081
1081
|
schema: {
|
|
1082
1082
|
name: string;
|
|
1083
1083
|
tree: Array<Schema>;
|
|
1084
1084
|
value: SchemaObject$1;
|
|
1085
1085
|
};
|
|
1086
1086
|
};
|
|
1087
|
-
type GeneratorOptions<TOptions extends PluginFactoryOptions> = {
|
|
1087
|
+
type GeneratorOptions<TOptions$1 extends PluginFactoryOptions> = {
|
|
1088
1088
|
name: string;
|
|
1089
|
-
operations?: (this: GeneratorOptions<TOptions>, props: OperationsProps<TOptions>) => Promise<File[]>;
|
|
1090
|
-
operation?: (this: GeneratorOptions<TOptions>, props: OperationProps<TOptions>) => Promise<File[]>;
|
|
1091
|
-
schema?: (this: GeneratorOptions<TOptions>, props: SchemaProps<TOptions>) => Promise<File[]>;
|
|
1089
|
+
operations?: (this: GeneratorOptions<TOptions$1>, props: OperationsProps<TOptions$1>) => Promise<File[]>;
|
|
1090
|
+
operation?: (this: GeneratorOptions<TOptions$1>, props: OperationProps<TOptions$1>) => Promise<File[]>;
|
|
1091
|
+
schema?: (this: GeneratorOptions<TOptions$1>, props: SchemaProps<TOptions$1>) => Promise<File[]>;
|
|
1092
1092
|
};
|
|
1093
|
-
type Generator<TOptions extends PluginFactoryOptions> = GeneratorOptions<TOptions>;
|
|
1093
|
+
type Generator<TOptions$1 extends PluginFactoryOptions> = GeneratorOptions<TOptions$1>;
|
|
1094
1094
|
//#endregion
|
|
1095
1095
|
//#region ../plugin-oas/src/OperationGenerator.d.ts
|
|
1096
|
-
type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
1096
|
+
type Context<TOptions$1, TPluginOptions extends PluginFactoryOptions> = {
|
|
1097
1097
|
oas: Oas;
|
|
1098
1098
|
exclude: Array<Exclude$1> | undefined;
|
|
1099
1099
|
include: Array<Include> | undefined;
|
|
1100
|
-
override: Array<Override<TOptions>> | undefined;
|
|
1100
|
+
override: Array<Override<TOptions$1>> | undefined;
|
|
1101
1101
|
contentType: contentType | undefined;
|
|
1102
1102
|
pluginManager: PluginManager;
|
|
1103
1103
|
/**
|
|
@@ -1181,5 +1181,5 @@ type ResolvedOptions = {
|
|
|
1181
1181
|
};
|
|
1182
1182
|
type PluginMsw = PluginFactoryOptions<'plugin-msw', Options$1, ResolvedOptions, never, ResolvePathOptions>;
|
|
1183
1183
|
//#endregion
|
|
1184
|
-
export { Generator, Options$1 as
|
|
1185
|
-
//# sourceMappingURL=types-
|
|
1184
|
+
export { UserPluginWithLifeCycle as i, PluginMsw as n, Generator as r, Options$1 as t };
|
|
1185
|
+
//# sourceMappingURL=types-B0eas7Yy.d.ts.map
|
|
@@ -9,5 +9,5 @@ type SchemaObject$1 = OasTypes.SchemaObject & {
|
|
|
9
9
|
$ref?: string;
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
-
//# sourceMappingURL=types-
|
|
12
|
+
export { contentType as a, SchemaObject$1 as i, OasTypes as n, Operation$1 as r, HttpMethod as t };
|
|
13
|
+
//# sourceMappingURL=types-IbHKcY02.d.ts.map
|