@kubb/plugin-oas 0.0.0-canary-20251028131922 → 0.0.0-canary-20251103125929

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.
Files changed (107) hide show
  1. package/dist/{SchemaGenerator-DzVHk6OP.cjs → SchemaGenerator-B8Reay1m.cjs} +114 -16
  2. package/dist/SchemaGenerator-B8Reay1m.cjs.map +1 -0
  3. package/dist/{SchemaGenerator-7wBwdv8G.js → SchemaGenerator-ChoBQWm5.js} +93 -15
  4. package/dist/SchemaGenerator-ChoBQWm5.js.map +1 -0
  5. package/dist/{SchemaMapper-DoL-a6qq.cjs → SchemaMapper-BUV8vhg0.cjs} +1 -1
  6. package/dist/SchemaMapper-BUV8vhg0.cjs.map +1 -0
  7. package/dist/{SchemaMapper-CqBW0VOy.d.ts → SchemaMapper-CX7sIIuZ.d.cts} +5 -118
  8. package/dist/{SchemaMapper-Cx4X1al6.js → SchemaMapper-D30tqRoX.js} +1 -1
  9. package/dist/SchemaMapper-D30tqRoX.js.map +1 -0
  10. package/dist/{SchemaMapper-MiRB5_Zp.d.cts → SchemaMapper-m5TKynWt.d.ts} +5 -118
  11. package/dist/{OperationGenerator-BZPWkxw4.d.ts → createGenerator-DlSlv4sR.d.ts} +130 -182
  12. package/dist/{OperationGenerator-CJTAer7l.d.cts → createGenerator-PIseu7v9.d.cts} +131 -183
  13. package/dist/{generators-C61FxVIj.js → generators-CJDEf8Kn.js} +6 -6
  14. package/dist/generators-CJDEf8Kn.js.map +1 -0
  15. package/dist/{generators-B27La9Vd.cjs → generators-udGOxdUV.cjs} +6 -6
  16. package/dist/generators-udGOxdUV.cjs.map +1 -0
  17. package/dist/generators.cjs +2 -7
  18. package/dist/generators.d.cts +8 -3
  19. package/dist/generators.d.ts +8 -3
  20. package/dist/generators.js +3 -5
  21. package/dist/{getFooter-D5MdeUVv.js → getFooter-CV73pVXj.js} +2 -2
  22. package/dist/{getFooter-D5MdeUVv.js.map → getFooter-CV73pVXj.js.map} +1 -1
  23. package/dist/{getFooter-CwjCW4h5.cjs → getFooter-DPh4lxBH.cjs} +3 -3
  24. package/dist/{getFooter-CwjCW4h5.cjs.map → getFooter-DPh4lxBH.cjs.map} +1 -1
  25. package/dist/{getSchemas-DY8s2CSl.cjs → getSchemas-CP_YS4_2.cjs} +1 -1
  26. package/dist/getSchemas-CP_YS4_2.cjs.map +1 -0
  27. package/dist/{getSchemas-Bdg6n9Qk.js → getSchemas-CTi8zYew.js} +1 -1
  28. package/dist/getSchemas-CTi8zYew.js.map +1 -0
  29. package/dist/hooks.cjs +6 -47
  30. package/dist/hooks.cjs.map +1 -1
  31. package/dist/hooks.d.cts +11 -45
  32. package/dist/hooks.d.ts +11 -45
  33. package/dist/hooks.js +8 -46
  34. package/dist/hooks.js.map +1 -1
  35. package/dist/index.cjs +37 -32
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +58 -3
  38. package/dist/index.d.ts +58 -3
  39. package/dist/index.js +32 -24
  40. package/dist/index.js.map +1 -1
  41. package/dist/mocks.cjs +1 -1
  42. package/dist/mocks.d.cts +1 -1
  43. package/dist/mocks.d.ts +1 -1
  44. package/dist/mocks.js +1 -1
  45. package/dist/{parseFromConfig-CqiiLCPe.js → parseFromConfig-BkUoWC2U.js} +1 -1
  46. package/dist/parseFromConfig-BkUoWC2U.js.map +1 -0
  47. package/dist/{parseFromConfig-RR31a98-.cjs → parseFromConfig-EjsCZ0-8.cjs} +1 -1
  48. package/dist/parseFromConfig-EjsCZ0-8.cjs.map +1 -0
  49. package/dist/utils.cjs +3 -3
  50. package/dist/utils.cjs.map +1 -1
  51. package/dist/utils.d.cts +24 -24
  52. package/dist/utils.d.ts +24 -24
  53. package/dist/utils.js +3 -3
  54. package/dist/utils.js.map +1 -1
  55. package/package.json +14 -17
  56. package/src/OperationGenerator.ts +27 -14
  57. package/src/SchemaGenerator.ts +19 -11
  58. package/src/SchemaMapper.ts +1 -1
  59. package/src/generators/createGenerator.ts +1 -1
  60. package/src/generators/index.ts +0 -1
  61. package/src/generators/jsonGenerator.ts +4 -4
  62. package/src/generators/types.ts +13 -14
  63. package/src/hooks/index.ts +1 -4
  64. package/src/hooks/useOas.ts +5 -11
  65. package/src/hooks/useOperationManager.ts +3 -5
  66. package/src/hooks/useSchemaManager.ts +1 -1
  67. package/src/index.ts +1 -1
  68. package/src/types.ts +1 -1
  69. package/src/utils/getBanner.ts +1 -1
  70. package/src/utils/getParams.ts +1 -2
  71. package/src/utils/getSchemaFactory.ts +1 -2
  72. package/src/utils/getSchemas.ts +1 -1
  73. package/src/utils/index.ts +3 -4
  74. package/src/utils/parseFromConfig.ts +2 -6
  75. package/src/utils.tsx +101 -0
  76. package/dist/Oas-BzrQ6RGC.cjs +0 -80
  77. package/dist/Oas-BzrQ6RGC.cjs.map +0 -1
  78. package/dist/Oas-CIeHKOo0.js +0 -60
  79. package/dist/Oas-CIeHKOo0.js.map +0 -1
  80. package/dist/Schema-CjraJhJi.d.ts +0 -38
  81. package/dist/Schema-zcZF0UIp.d.cts +0 -38
  82. package/dist/SchemaGenerator-7wBwdv8G.js.map +0 -1
  83. package/dist/SchemaGenerator-DzVHk6OP.cjs.map +0 -1
  84. package/dist/SchemaMapper-Cx4X1al6.js.map +0 -1
  85. package/dist/SchemaMapper-DoL-a6qq.cjs.map +0 -1
  86. package/dist/components.cjs +0 -5
  87. package/dist/components.d.cts +0 -42
  88. package/dist/components.d.ts +0 -42
  89. package/dist/components.js +0 -3
  90. package/dist/generators-B27La9Vd.cjs.map +0 -1
  91. package/dist/generators-C61FxVIj.js.map +0 -1
  92. package/dist/getSchemas-Bdg6n9Qk.js.map +0 -1
  93. package/dist/getSchemas-DY8s2CSl.cjs.map +0 -1
  94. package/dist/parseFromConfig-CqiiLCPe.js.map +0 -1
  95. package/dist/parseFromConfig-RR31a98-.cjs.map +0 -1
  96. package/dist/utils-BnkB1ikY.js +0 -99
  97. package/dist/utils-BnkB1ikY.js.map +0 -1
  98. package/dist/utils-nzdccPlU.cjs +0 -119
  99. package/dist/utils-nzdccPlU.cjs.map +0 -1
  100. package/src/components/Oas.tsx +0 -35
  101. package/src/components/Operation.tsx +0 -20
  102. package/src/components/Schema.tsx +0 -38
  103. package/src/components/index.ts +0 -3
  104. package/src/generators/utils.tsx +0 -114
  105. package/src/hooks/useOperation.ts +0 -18
  106. package/src/hooks/useOperations.ts +0 -40
  107. package/src/hooks/useSchema.ts +0 -16
@@ -1,4 +1,7 @@
1
- import { d as File, g as ResolvedFile, h as Path, i as SchemaKeywordMapper, l as BaseName, m as OptionalPath, p as Mode, t as Schema, u as Extname } from "./SchemaMapper-MiRB5_Zp.cjs";
1
+ import { i as SchemaKeywordMapper, t as Schema } from "./SchemaMapper-CX7sIIuZ.cjs";
2
+ import { KubbFile } from "@kubb/fabric-core/types";
3
+ import { Fabric, FileManager } from "@kubb/react-fabric";
4
+ import { ConsolaInstance, LogLevel } from "consola";
2
5
  import * as OasTypes from "oas/types";
3
6
  import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
4
7
  import { Operation, Operation as Operation$1 } from "oas/operation";
@@ -6,44 +9,7 @@ import { OpenAPIV3, OpenAPIV3 as OpenAPIV3$1, OpenAPIV3_1 } from "openapi-types"
6
9
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
7
10
  import BaseOas from "oas";
8
11
  import { KubbNode } from "@kubb/react-fabric/types";
9
- import { Fabric, FileManager } from "@kubb/react-fabric";
10
- import { ConsolaInstance, LogLevel } from "consola";
11
12
 
12
- //#region ../oas/src/types.d.ts
13
- type contentType = 'application/json' | (string & {});
14
- type SchemaObject$1 = OasTypes.SchemaObject & {
15
- 'x-nullable'?: boolean;
16
- $ref?: string;
17
- };
18
- //#endregion
19
- //#region ../oas/src/Oas.d.ts
20
- type Options$3 = {
21
- contentType?: contentType;
22
- discriminator?: 'strict' | 'inherit';
23
- };
24
- declare class Oas<const TOAS = unknown> extends BaseOas {
25
- #private;
26
- document: TOAS;
27
- constructor({
28
- oas,
29
- user
30
- }: {
31
- oas: TOAS | OASDocument | string;
32
- user?: User;
33
- });
34
- setOptions(options: Options$3): void;
35
- get options(): Options$3;
36
- get($ref: string): any;
37
- getKey($ref: string): string | undefined;
38
- set($ref: string, value: unknown): false | undefined;
39
- getDiscriminator(schema: OasTypes.SchemaObject): OpenAPIV3.DiscriminatorObject | undefined;
40
- dereferenceWithRef(schema?: unknown): any;
41
- getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
42
- getRequestSchema(operation: Operation): SchemaObject | undefined;
43
- getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
44
- valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
45
- }
46
- //#endregion
47
13
  //#region ../core/src/BaseGenerator.d.ts
48
14
  /**
49
15
  * Abstract class that contains the building blocks for plugins to create their own Generator
@@ -181,7 +147,7 @@ type Config<TInput = Input> = {
181
147
  * Override the extension to the generated imports and exports, by default each plugin will add an extension
182
148
  * @default { '.ts': '.ts'}
183
149
  */
184
- extension?: Record<Extname, Extname | ''>;
150
+ extension?: Record<KubbFile.Extname, KubbFile.Extname | ''>;
185
151
  /**
186
152
  * Specify how `index.ts` files should be created. You can also disable the generation of barrel files here. While each plugin has its own `barrelType` option, this setting controls the creation of the root barrel file, such as` src/gen/index.ts`.
187
153
  * @default 'named'
@@ -312,7 +278,7 @@ type PluginLifecycle<TOptions extends PluginFactoryOptions = PluginFactoryOption
312
278
  * @type hookFirst
313
279
  * @example ('./Pet.ts', './src/gen/') => '/src/gen/Pet.ts'
314
280
  */
315
- resolvePath?: (this: PluginContext<TOptions>, baseName: BaseName, mode?: Mode, options?: TOptions['resolvePathOptions']) => OptionalPath;
281
+ resolvePath?: (this: PluginContext<TOptions>, baseName: KubbFile.BaseName, mode?: KubbFile.Mode, options?: TOptions['resolvePathOptions']) => KubbFile.OptionalPath;
316
282
  /**
317
283
  * Resolve to a name based on a string.
318
284
  * Useful when converting to PascalCase or camelCase.
@@ -330,8 +296,8 @@ type PluginLifecycleHooks = keyof PluginLifecycle;
330
296
  type PluginParameter<H extends PluginLifecycleHooks> = Parameters<Required<PluginLifecycle>[H]>;
331
297
  type ResolvePathParams<TOptions = object> = {
332
298
  pluginKey?: Plugin['key'];
333
- baseName: BaseName;
334
- mode?: Mode;
299
+ baseName: KubbFile.BaseName;
300
+ mode?: KubbFile.Mode;
335
301
  /**
336
302
  * Options to be passed to 'resolvePath' 3th parameter
337
303
  */
@@ -356,8 +322,8 @@ type PluginContext<TOptions extends PluginFactoryOptions = PluginFactoryOptions>
356
322
  */
357
323
  fileManager: FileManager;
358
324
  pluginManager: PluginManager;
359
- addFile: (...file: Array<File>) => Promise<Array<ResolvedFile>>;
360
- resolvePath: (params: ResolvePathParams<TOptions['resolvePathOptions']>) => OptionalPath;
325
+ addFile: (...file: Array<KubbFile.File>) => Promise<Array<KubbFile.ResolvedFile>>;
326
+ resolvePath: (params: ResolvePathParams<TOptions['resolvePathOptions']>) => KubbFile.OptionalPath;
361
327
  resolveName: (params: ResolveNameParams) => string;
362
328
  logger: Logger;
363
329
  /**
@@ -421,7 +387,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
421
387
  result: Result;
422
388
  plugin: Plugin;
423
389
  };
424
- type Options$2 = {
390
+ type Options$3 = {
425
391
  fabric: Fabric;
426
392
  logger: Logger;
427
393
  /**
@@ -436,8 +402,8 @@ type Events = {
436
402
  };
437
403
  type GetFileProps<TOptions = object> = {
438
404
  name: string;
439
- mode?: Mode;
440
- extname: Extname;
405
+ mode?: KubbFile.Mode;
406
+ extname: KubbFile.Extname;
441
407
  pluginKey: Plugin['key'];
442
408
  options?: TOptions;
443
409
  };
@@ -448,18 +414,18 @@ declare class PluginManager {
448
414
  readonly config: Config;
449
415
  readonly executed: Array<Executer>;
450
416
  readonly logger: Logger;
451
- readonly options: Options$2;
452
- constructor(config: Config, options: Options$2);
417
+ readonly options: Options$3;
418
+ constructor(config: Config, options: Options$3);
453
419
  getFile<TOptions = object>({
454
420
  name,
455
421
  mode,
456
422
  extname,
457
423
  pluginKey,
458
424
  options
459
- }: GetFileProps<TOptions>): File<{
425
+ }: GetFileProps<TOptions>): KubbFile.File<{
460
426
  pluginKey: Plugin['key'];
461
427
  }>;
462
- resolvePath: <TOptions = object>(params: ResolvePathParams<TOptions>) => OptionalPath;
428
+ resolvePath: <TOptions = object>(params: ResolvePathParams<TOptions>) => KubbFile.OptionalPath;
463
429
  resolveName: (params: ResolveNameParams) => string;
464
430
  /**
465
431
  * Instead of calling `pluginManager.events.on` you can use `pluginManager.on`. This one also has better types.
@@ -556,44 +522,40 @@ type FileMetaBase = {
556
522
  pluginKey?: Plugin['key'];
557
523
  };
558
524
  //#endregion
559
- //#region src/generators/createGenerator.d.ts
560
- type UserGenerator$1<TOptions extends PluginFactoryOptions> = {
561
- name: string;
562
- operations?: (props: OperationsProps<TOptions>) => Promise<File[]>;
563
- operation?: (props: OperationProps<TOptions>) => Promise<File[]>;
564
- schema?: (props: SchemaProps<TOptions>) => Promise<File[]>;
565
- };
566
- type CoreGenerator<TOptions extends PluginFactoryOptions> = {
567
- name: string;
568
- type: 'core';
569
- operations: (props: OperationsProps<TOptions>) => Promise<File[]>;
570
- operation: (props: OperationProps<TOptions>) => Promise<File[]>;
571
- schema: (props: SchemaProps<TOptions>) => Promise<File[]>;
525
+ //#region ../oas/src/types.d.ts
526
+ type contentType = 'application/json' | (string & {});
527
+ type SchemaObject$1 = OasTypes.SchemaObject & {
528
+ 'x-nullable'?: boolean;
529
+ $ref?: string;
572
530
  };
573
- declare function createGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator$1<TOptions>): CoreGenerator<TOptions>;
574
531
  //#endregion
575
- //#region src/generators/createReactGenerator.d.ts
576
- type UserGenerator<TOptions extends PluginFactoryOptions> = {
577
- name: string;
578
- Operations?: (props: OperationsProps<TOptions>) => KubbNode;
579
- Operation?: (props: OperationProps<TOptions>) => KubbNode;
580
- Schema?: (props: SchemaProps<TOptions>) => KubbNode;
581
- };
582
- type ReactGenerator<TOptions extends PluginFactoryOptions> = {
583
- name: string;
584
- type: 'react';
585
- Operations: (props: OperationsProps<TOptions>) => KubbNode;
586
- Operation: (props: OperationProps<TOptions>) => KubbNode;
587
- Schema: (props: SchemaProps<TOptions>) => KubbNode;
532
+ //#region ../oas/src/Oas.d.ts
533
+ type Options$2 = {
534
+ contentType?: contentType;
535
+ discriminator?: 'strict' | 'inherit';
588
536
  };
589
- /****
590
- * Creates a generator that uses React component functions to generate files for OpenAPI operations and schemas.
591
- *
592
- * The returned generator exposes async methods for generating files from operations, a single operation, or a schema, using the corresponding React components if provided. If a component is not defined, the method returns an empty array.
593
- *
594
- * @returns A generator object with async methods for operations, operation, and schema file generation.
595
- */
596
- declare function createReactGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): ReactGenerator<TOptions>;
537
+ declare class Oas<const TOAS = unknown> extends BaseOas {
538
+ #private;
539
+ document: TOAS;
540
+ constructor({
541
+ oas,
542
+ user
543
+ }: {
544
+ oas: TOAS | OASDocument | string;
545
+ user?: User;
546
+ });
547
+ setOptions(options: Options$2): void;
548
+ get options(): Options$2;
549
+ get($ref: string): any;
550
+ getKey($ref: string): string | undefined;
551
+ set($ref: string, value: unknown): false | undefined;
552
+ getDiscriminator(schema: OasTypes.SchemaObject): OpenAPIV3.DiscriminatorObject | undefined;
553
+ dereferenceWithRef(schema?: unknown): any;
554
+ getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
555
+ getRequestSchema(operation: Operation): SchemaObject | undefined;
556
+ getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
557
+ valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
558
+ }
597
559
  //#endregion
598
560
  //#region src/types.d.ts
599
561
  type ResolvePathOptions = {
@@ -668,7 +630,7 @@ type Options$1 = {
668
630
  type Ref = {
669
631
  propertyName: string;
670
632
  originalName: string;
671
- path: OptionalPath;
633
+ path: KubbFile.OptionalPath;
672
634
  pluginKey?: Plugin['key'];
673
635
  };
674
636
  type Refs = Record<string, Ref>;
@@ -677,8 +639,8 @@ type Resolver = {
677
639
  * Original name or name resolved by `resolveName({ name: operation?.getOperationId() as string, pluginName })`
678
640
  */
679
641
  name: string;
680
- baseName: BaseName;
681
- path: Path;
642
+ baseName: KubbFile.BaseName;
643
+ path: KubbFile.Path;
682
644
  };
683
645
  type OperationSchema = {
684
646
  /**
@@ -747,13 +709,41 @@ type ResolvedOptions = Options$1 & {
747
709
  };
748
710
  type PluginOas = PluginFactoryOptions<'plugin-oas', Options$1, ResolvedOptions, API, ResolvePathOptions>;
749
711
  //#endregion
750
- //#region src/generators/jsonGenerator.d.ts
751
- declare const jsonGenerator: CoreGenerator<PluginOas>;
712
+ //#region src/OperationGenerator.d.ts
713
+ type OperationMethodResult<TFileMeta extends FileMetaBase> = Promise<KubbFile.File<TFileMeta> | Array<KubbFile.File<TFileMeta>> | null>;
714
+ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
715
+ fabric: Fabric;
716
+ oas: Oas;
717
+ exclude: Array<Exclude$1> | undefined;
718
+ include: Array<Include> | undefined;
719
+ override: Array<Override<TOptions>> | undefined;
720
+ contentType: contentType | undefined;
721
+ pluginManager: PluginManager;
722
+ /**
723
+ * Current plugin
724
+ */
725
+ plugin: Plugin<TPluginOptions>;
726
+ mode: KubbFile.Mode;
727
+ };
728
+ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
729
+ #private;
730
+ getSchemas(operation: Operation$1, {
731
+ resolveName
732
+ }?: {
733
+ resolveName?: (name: string) => string;
734
+ }): OperationSchemas;
735
+ getOperations(): Promise<Array<{
736
+ path: string;
737
+ method: HttpMethod;
738
+ operation: Operation$1;
739
+ }>>;
740
+ build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
741
+ }
752
742
  //#endregion
753
743
  //#region src/SchemaGenerator.d.ts
754
744
  type GetSchemaGeneratorOptions<T extends SchemaGenerator<any, any, any>> = T extends SchemaGenerator<infer Options, any, any> ? Options : never;
755
- type SchemaMethodResult<TFileMeta extends FileMetaBase> = Promise<File<TFileMeta> | Array<File<TFileMeta>> | null>;
756
- type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
745
+ type SchemaMethodResult<TFileMeta extends FileMetaBase> = Promise<KubbFile.File<TFileMeta> | Array<KubbFile.File<TFileMeta>> | null>;
746
+ type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
757
747
  fabric: Fabric;
758
748
  oas: Oas;
759
749
  pluginManager: PluginManager;
@@ -761,7 +751,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
761
751
  * Current plugin
762
752
  */
763
753
  plugin: Plugin<TPluginOptions>;
764
- mode: Mode;
754
+ mode: KubbFile.Mode;
765
755
  include?: Array<'schemas' | 'responses' | 'requestBodies'>;
766
756
  override: Array<Override<TOptions>> | undefined;
767
757
  contentType?: contentType;
@@ -795,7 +785,7 @@ type SchemaProps$1 = {
795
785
  name?: string;
796
786
  parentName?: string;
797
787
  };
798
- declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context$1<TOptions, TPluginOptions>> {
788
+ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
799
789
  #private;
800
790
  refs: Refs;
801
791
  /**
@@ -810,76 +800,49 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
810
800
  static findInObject<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
811
801
  static find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
812
802
  static combineObjects(tree: Schema[] | undefined): Schema[];
813
- build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<File<TFileMeta>>>;
803
+ build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
814
804
  }
815
805
  //#endregion
816
- //#region src/generators/utils.d.ts
817
- type BuildOperationsOptions<TOptions extends PluginFactoryOptions> = {
818
- fabric: Fabric;
819
- generator: ReactGenerator<any>;
820
- /**
821
- * @deprecated
822
- */
823
- instance: Omit<OperationGenerator<TOptions>, 'build'>;
824
- options: TOptions['resolvedOptions'];
825
- };
826
- declare function buildOperations<TOptions extends PluginFactoryOptions>(operations: Array<Operation$1>, {
827
- fabric,
828
- options,
829
- instance,
830
- generator
831
- }: BuildOperationsOptions<TOptions>): Promise<void>;
832
- type BuildOperationOptions<TOptions extends PluginFactoryOptions> = BuildOperationsOptions<TOptions>;
833
- declare function buildOperation<TOptions extends PluginFactoryOptions>(operation: Operation$1, {
834
- fabric,
835
- options,
836
- instance,
837
- generator
838
- }: BuildOperationOptions<TOptions>): Promise<void>;
839
- type BuildSchemaOptions<TOptions extends PluginFactoryOptions> = {
840
- fabric: Fabric;
841
- generator: ReactGenerator<any>;
842
- /**
843
- * @deprecated
844
- */
845
- instance: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
846
- options: TOptions['resolvedOptions'];
806
+ //#region src/generators/createReactGenerator.d.ts
807
+ type UserGenerator$1<TOptions extends PluginFactoryOptions> = {
808
+ name: string;
809
+ Operations?: (props: OperationsProps<TOptions>) => KubbNode;
810
+ Operation?: (props: OperationProps<TOptions>) => KubbNode;
811
+ Schema?: (props: SchemaProps<TOptions>) => KubbNode;
847
812
  };
848
- declare function buildSchema<TOptions extends PluginFactoryOptions>(schema: {
813
+ type ReactGenerator<TOptions extends PluginFactoryOptions> = {
849
814
  name: string;
850
- tree: Array<Schema>;
851
- value: SchemaObject$1;
852
- }, {
853
- fabric,
854
- options,
855
- instance,
856
- generator
857
- }: BuildSchemaOptions<TOptions>): Promise<void>;
858
- //#endregion
859
- //#region src/plugin.d.ts
860
- declare const pluginOasName = "plugin-oas";
861
- declare const pluginOas: (options?: Options$1 | undefined) => UserPluginWithLifeCycle<PluginOas>;
815
+ type: 'react';
816
+ Operations: (props: OperationsProps<TOptions>) => KubbNode;
817
+ Operation: (props: OperationProps<TOptions>) => KubbNode;
818
+ Schema: (props: SchemaProps<TOptions>) => KubbNode;
819
+ };
820
+ /****
821
+ * Creates a generator that uses React component functions to generate files for OpenAPI operations and schemas.
822
+ *
823
+ * The returned generator exposes async methods for generating files from operations, a single operation, or a schema, using the corresponding React components if provided. If a component is not defined, the method returns an empty array.
824
+ *
825
+ * @returns A generator object with async methods for operations, operation, and schema file generation.
826
+ */
827
+ declare function createReactGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator$1<TOptions>): ReactGenerator<TOptions>;
862
828
  //#endregion
863
829
  //#region src/generators/types.d.ts
864
830
  type OperationsProps<TOptions extends PluginFactoryOptions> = {
865
- /**
866
- * @deprecated
867
- */
868
- instance: Omit<OperationGenerator<TOptions>, 'build'>;
869
- options: TOptions['resolvedOptions'];
831
+ config: Config;
832
+ generator: Omit<OperationGenerator<TOptions>, 'build'>;
833
+ plugin: Plugin<TOptions>;
870
834
  operations: Array<Operation$1>;
871
835
  };
872
836
  type OperationProps<TOptions extends PluginFactoryOptions> = {
873
- /**
874
- * @deprecated
875
- */
876
- instance: Omit<OperationGenerator<TOptions>, 'build'>;
877
- options: TOptions['resolvedOptions'];
837
+ config: Config;
838
+ generator: Omit<OperationGenerator<TOptions>, 'build'>;
839
+ plugin: Plugin<TOptions>;
878
840
  operation: Operation$1;
879
841
  };
880
842
  type SchemaProps<TOptions extends PluginFactoryOptions> = {
881
- instance: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
882
- options: TOptions['resolvedOptions'];
843
+ config: Config;
844
+ generator: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
845
+ plugin: Plugin<TOptions>;
883
846
  schema: {
884
847
  name: string;
885
848
  tree: Array<Schema>;
@@ -888,36 +851,21 @@ type SchemaProps<TOptions extends PluginFactoryOptions> = {
888
851
  };
889
852
  type Generator<TOptions extends PluginFactoryOptions> = CoreGenerator<TOptions> | ReactGenerator<TOptions>;
890
853
  //#endregion
891
- //#region src/OperationGenerator.d.ts
892
- type OperationMethodResult<TFileMeta extends FileMetaBase> = Promise<File<TFileMeta> | Array<File<TFileMeta>> | null>;
893
- type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
894
- fabric: Fabric;
895
- oas: Oas;
896
- exclude: Array<Exclude$1> | undefined;
897
- include: Array<Include> | undefined;
898
- override: Array<Override<TOptions>> | undefined;
899
- contentType: contentType | undefined;
900
- pluginManager: PluginManager;
901
- /**
902
- * Current plugin
903
- */
904
- plugin: Plugin<TPluginOptions>;
905
- mode: Mode;
854
+ //#region src/generators/createGenerator.d.ts
855
+ type UserGenerator<TOptions extends PluginFactoryOptions> = {
856
+ name: string;
857
+ operations?: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
858
+ operation?: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
859
+ schema?: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>;
906
860
  };
907
- declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context<TPluginOptions['resolvedOptions'], TPluginOptions>> {
908
- #private;
909
- getSchemas(operation: Operation$1, {
910
- resolveName
911
- }?: {
912
- resolveName?: (name: string) => string;
913
- }): OperationSchemas;
914
- getOperations(): Promise<Array<{
915
- path: string;
916
- method: HttpMethod;
917
- operation: Operation$1;
918
- }>>;
919
- build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<File<TFileMeta>>>;
920
- }
861
+ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
862
+ name: string;
863
+ type: 'core';
864
+ operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
865
+ operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
866
+ schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>;
867
+ };
868
+ declare function createGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): CoreGenerator<TOptions>;
921
869
  //#endregion
922
- export { Config as A, SchemaObject$1 as B, Ref as C, createReactGenerator as D, Resolver as E, HttpMethod as F, OasTypes as I, OpenAPIV3$1 as L, Plugin as M, ResolveNameParams as N, createGenerator as O, Oas as P, OpenAPIV3_1 as R, PluginOas as S, ResolvePathOptions as T, contentType as V, Include as _, pluginOasName as a, Options$1 as b, buildSchema as c, SchemaGeneratorBuildOptions as d, SchemaGeneratorOptions as f, Exclude$1 as g, API as h, pluginOas as i, Output as j, FileMetaBase as k, GetSchemaGeneratorOptions as l, jsonGenerator as m, OperationMethodResult as n, buildOperation as o, SchemaMethodResult as p, Generator as r, buildOperations as s, OperationGenerator as t, SchemaGenerator as u, OperationSchema as v, Refs as w, Override as x, OperationSchemas as y, Operation$1 as z };
923
- //# sourceMappingURL=OperationGenerator-CJTAer7l.d.cts.map
870
+ export { SchemaObject$1 as A, ResolvePathOptions as C, OpenAPIV3$1 as D, OasTypes as E, Plugin as F, PluginFactoryOptions as I, ResolveNameParams as L, FileMetaBase as M, Config as N, OpenAPIV3_1 as O, Output as P, UserPluginWithLifeCycle as R, Refs as S, Oas as T, OperationSchemas as _, createReactGenerator as a, PluginOas as b, SchemaGeneratorBuildOptions as c, OperationGenerator as d, OperationMethodResult as f, OperationSchema as g, Include as h, ReactGenerator as i, contentType as j, Operation$1 as k, SchemaGeneratorOptions as l, Exclude$1 as m, createGenerator as n, GetSchemaGeneratorOptions as o, API as p, Generator as r, SchemaGenerator as s, CoreGenerator as t, SchemaMethodResult as u, Options$1 as v, Resolver as w, Ref as x, Override as y };
871
+ //# sourceMappingURL=createGenerator-PIseu7v9.d.cts.map
@@ -1,4 +1,4 @@
1
- import { n as getBanner, t as getFooter } from "./getFooter-D5MdeUVv.js";
1
+ import { n as getBanner, t as getFooter } from "./getFooter-CV73pVXj.js";
2
2
  import { camelCase } from "@kubb/core/transformers";
3
3
 
4
4
  //#region src/generators/createGenerator.ts
@@ -47,8 +47,8 @@ function createReactGenerator(generator) {
47
47
  //#region src/generators/jsonGenerator.ts
48
48
  const jsonGenerator = createGenerator({
49
49
  name: "plugin-oas",
50
- async schema({ schema, instance }) {
51
- const { pluginManager, plugin } = instance.context;
50
+ async schema({ schema, generator }) {
51
+ const { pluginManager, plugin } = generator.context;
52
52
  return [{
53
53
  ...pluginManager.getFile({
54
54
  name: camelCase(schema.name),
@@ -63,12 +63,12 @@ const jsonGenerator = createGenerator({
63
63
  value: JSON.stringify(schema.value)
64
64
  }],
65
65
  banner: getBanner({
66
- oas: instance.context.oas,
66
+ oas: generator.context.oas,
67
67
  output: plugin.options.output,
68
68
  config: pluginManager.config
69
69
  }),
70
70
  format: getFooter({
71
- oas: instance.context.oas,
71
+ oas: generator.context.oas,
72
72
  output: plugin.options.output
73
73
  })
74
74
  }];
@@ -77,4 +77,4 @@ const jsonGenerator = createGenerator({
77
77
 
78
78
  //#endregion
79
79
  export { createReactGenerator as n, createGenerator as r, jsonGenerator as t };
80
- //# sourceMappingURL=generators-C61FxVIj.js.map
80
+ //# sourceMappingURL=generators-CJDEf8Kn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-CJDEf8Kn.js","names":[],"sources":["../src/generators/createGenerator.ts","../src/generators/createReactGenerator.ts","../src/generators/jsonGenerator.ts"],"sourcesContent":["import type { PluginFactoryOptions } from '@kubb/core'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { OperationProps, OperationsProps, SchemaProps } from './types.ts'\n\ntype UserGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n operations?: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>\n operation?: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>\n schema?: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>\n}\n\nexport type CoreGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n type: 'core'\n operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>\n operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>\n schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>\n}\n\nexport function createGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): CoreGenerator<TOptions> {\n return {\n type: 'core',\n async operations() {\n return []\n },\n async operation() {\n return []\n },\n async schema() {\n return []\n },\n ...generator,\n }\n}\n","import type { PluginFactoryOptions } from '@kubb/core'\nimport type { KubbNode } from '@kubb/react-fabric/types'\nimport type { OperationProps, OperationsProps, SchemaProps } from './types.ts'\n\ntype UserGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n Operations?: (props: OperationsProps<TOptions>) => KubbNode\n Operation?: (props: OperationProps<TOptions>) => KubbNode\n Schema?: (props: SchemaProps<TOptions>) => KubbNode\n}\n\nexport type ReactGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n type: 'react'\n Operations: (props: OperationsProps<TOptions>) => KubbNode\n Operation: (props: OperationProps<TOptions>) => KubbNode\n Schema: (props: SchemaProps<TOptions>) => KubbNode\n}\n\n/****\n * Creates a generator that uses React component functions to generate files for OpenAPI operations and schemas.\n *\n * The returned generator exposes async methods for generating files from operations, a single operation, or a schema, using the corresponding React components if provided. If a component is not defined, the method returns an empty array.\n *\n * @returns A generator object with async methods for operations, operation, and schema file generation.\n */\nexport function createReactGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): ReactGenerator<TOptions> {\n return {\n type: 'react',\n Operations() {\n return null\n },\n Operation() {\n return null\n },\n Schema() {\n return null\n },\n ...generator,\n }\n}\n","import { camelCase } from '@kubb/core/transformers'\nimport type { PluginOas } from '../types.ts'\nimport { getBanner } from '../utils/getBanner.ts'\nimport { getFooter } from '../utils/getFooter.ts'\nimport { createGenerator } from './createGenerator.ts'\n\nexport const jsonGenerator = createGenerator<PluginOas>({\n name: 'plugin-oas',\n async schema({ schema, generator }) {\n const { pluginManager, plugin } = generator.context\n const file = pluginManager.getFile({\n name: camelCase(schema.name),\n extname: '.json',\n mode: 'split',\n pluginKey: plugin.key,\n })\n\n return [\n {\n ...file,\n sources: [\n {\n name: camelCase(schema.name),\n isExportable: false,\n isIndexable: false,\n value: JSON.stringify(schema.value),\n },\n ],\n banner: getBanner({\n oas: generator.context.oas,\n output: plugin.options.output,\n config: pluginManager.config,\n }),\n format: getFooter({ oas: generator.context.oas, output: plugin.options.output }),\n },\n ]\n },\n})\n"],"mappings":";;;;AAmBA,SAAgB,gBAAuD,WAA6D;AAClI,QAAO;EACL,MAAM;EACN,MAAM,aAAa;AACjB,UAAO,EAAE;;EAEX,MAAM,YAAY;AAChB,UAAO,EAAE;;EAEX,MAAM,SAAS;AACb,UAAO,EAAE;;EAEX,GAAG;EACJ;;;;;;;;;;;;ACNH,SAAgB,qBAA4D,WAA8D;AACxI,QAAO;EACL,MAAM;EACN,aAAa;AACX,UAAO;;EAET,YAAY;AACV,UAAO;;EAET,SAAS;AACP,UAAO;;EAET,GAAG;EACJ;;;;;ACjCH,MAAa,gBAAgB,gBAA2B;CACtD,MAAM;CACN,MAAM,OAAO,EAAE,QAAQ,aAAa;EAClC,MAAM,EAAE,eAAe,WAAW,UAAU;AAQ5C,SAAO,CACL;GACE,GATS,cAAc,QAAQ;IACjC,MAAM,UAAU,OAAO,KAAK;IAC5B,SAAS;IACT,MAAM;IACN,WAAW,OAAO;IACnB,CAAC;GAKE,SAAS,CACP;IACE,MAAM,UAAU,OAAO,KAAK;IAC5B,cAAc;IACd,aAAa;IACb,OAAO,KAAK,UAAU,OAAO,MAAM;IACpC,CACF;GACD,QAAQ,UAAU;IAChB,KAAK,UAAU,QAAQ;IACvB,QAAQ,OAAO,QAAQ;IACvB,QAAQ,cAAc;IACvB,CAAC;GACF,QAAQ,UAAU;IAAE,KAAK,UAAU,QAAQ;IAAK,QAAQ,OAAO,QAAQ;IAAQ,CAAC;GACjF,CACF;;CAEJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const require_getFooter = require('./getFooter-CwjCW4h5.cjs');
2
+ const require_getFooter = require('./getFooter-DPh4lxBH.cjs');
3
3
  let __kubb_core_transformers = require("@kubb/core/transformers");
4
4
  __kubb_core_transformers = require_chunk.__toESM(__kubb_core_transformers);
5
5
 
@@ -49,8 +49,8 @@ function createReactGenerator(generator) {
49
49
  //#region src/generators/jsonGenerator.ts
50
50
  const jsonGenerator = createGenerator({
51
51
  name: "plugin-oas",
52
- async schema({ schema, instance }) {
53
- const { pluginManager, plugin } = instance.context;
52
+ async schema({ schema, generator }) {
53
+ const { pluginManager, plugin } = generator.context;
54
54
  return [{
55
55
  ...pluginManager.getFile({
56
56
  name: (0, __kubb_core_transformers.camelCase)(schema.name),
@@ -65,12 +65,12 @@ const jsonGenerator = createGenerator({
65
65
  value: JSON.stringify(schema.value)
66
66
  }],
67
67
  banner: require_getFooter.getBanner({
68
- oas: instance.context.oas,
68
+ oas: generator.context.oas,
69
69
  output: plugin.options.output,
70
70
  config: pluginManager.config
71
71
  }),
72
72
  format: require_getFooter.getFooter({
73
- oas: instance.context.oas,
73
+ oas: generator.context.oas,
74
74
  output: plugin.options.output
75
75
  })
76
76
  }];
@@ -96,4 +96,4 @@ Object.defineProperty(exports, 'jsonGenerator', {
96
96
  return jsonGenerator;
97
97
  }
98
98
  });
99
- //# sourceMappingURL=generators-B27La9Vd.cjs.map
99
+ //# sourceMappingURL=generators-udGOxdUV.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-udGOxdUV.cjs","names":["getBanner","getFooter"],"sources":["../src/generators/createGenerator.ts","../src/generators/createReactGenerator.ts","../src/generators/jsonGenerator.ts"],"sourcesContent":["import type { PluginFactoryOptions } from '@kubb/core'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport type { OperationProps, OperationsProps, SchemaProps } from './types.ts'\n\ntype UserGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n operations?: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>\n operation?: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>\n schema?: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>\n}\n\nexport type CoreGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n type: 'core'\n operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>\n operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>\n schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>\n}\n\nexport function createGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): CoreGenerator<TOptions> {\n return {\n type: 'core',\n async operations() {\n return []\n },\n async operation() {\n return []\n },\n async schema() {\n return []\n },\n ...generator,\n }\n}\n","import type { PluginFactoryOptions } from '@kubb/core'\nimport type { KubbNode } from '@kubb/react-fabric/types'\nimport type { OperationProps, OperationsProps, SchemaProps } from './types.ts'\n\ntype UserGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n Operations?: (props: OperationsProps<TOptions>) => KubbNode\n Operation?: (props: OperationProps<TOptions>) => KubbNode\n Schema?: (props: SchemaProps<TOptions>) => KubbNode\n}\n\nexport type ReactGenerator<TOptions extends PluginFactoryOptions> = {\n name: string\n type: 'react'\n Operations: (props: OperationsProps<TOptions>) => KubbNode\n Operation: (props: OperationProps<TOptions>) => KubbNode\n Schema: (props: SchemaProps<TOptions>) => KubbNode\n}\n\n/****\n * Creates a generator that uses React component functions to generate files for OpenAPI operations and schemas.\n *\n * The returned generator exposes async methods for generating files from operations, a single operation, or a schema, using the corresponding React components if provided. If a component is not defined, the method returns an empty array.\n *\n * @returns A generator object with async methods for operations, operation, and schema file generation.\n */\nexport function createReactGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): ReactGenerator<TOptions> {\n return {\n type: 'react',\n Operations() {\n return null\n },\n Operation() {\n return null\n },\n Schema() {\n return null\n },\n ...generator,\n }\n}\n","import { camelCase } from '@kubb/core/transformers'\nimport type { PluginOas } from '../types.ts'\nimport { getBanner } from '../utils/getBanner.ts'\nimport { getFooter } from '../utils/getFooter.ts'\nimport { createGenerator } from './createGenerator.ts'\n\nexport const jsonGenerator = createGenerator<PluginOas>({\n name: 'plugin-oas',\n async schema({ schema, generator }) {\n const { pluginManager, plugin } = generator.context\n const file = pluginManager.getFile({\n name: camelCase(schema.name),\n extname: '.json',\n mode: 'split',\n pluginKey: plugin.key,\n })\n\n return [\n {\n ...file,\n sources: [\n {\n name: camelCase(schema.name),\n isExportable: false,\n isIndexable: false,\n value: JSON.stringify(schema.value),\n },\n ],\n banner: getBanner({\n oas: generator.context.oas,\n output: plugin.options.output,\n config: pluginManager.config,\n }),\n format: getFooter({ oas: generator.context.oas, output: plugin.options.output }),\n },\n ]\n },\n})\n"],"mappings":";;;;;;AAmBA,SAAgB,gBAAuD,WAA6D;AAClI,QAAO;EACL,MAAM;EACN,MAAM,aAAa;AACjB,UAAO,EAAE;;EAEX,MAAM,YAAY;AAChB,UAAO,EAAE;;EAEX,MAAM,SAAS;AACb,UAAO,EAAE;;EAEX,GAAG;EACJ;;;;;;;;;;;;ACNH,SAAgB,qBAA4D,WAA8D;AACxI,QAAO;EACL,MAAM;EACN,aAAa;AACX,UAAO;;EAET,YAAY;AACV,UAAO;;EAET,SAAS;AACP,UAAO;;EAET,GAAG;EACJ;;;;;ACjCH,MAAa,gBAAgB,gBAA2B;CACtD,MAAM;CACN,MAAM,OAAO,EAAE,QAAQ,aAAa;EAClC,MAAM,EAAE,eAAe,WAAW,UAAU;AAQ5C,SAAO,CACL;GACE,GATS,cAAc,QAAQ;IACjC,8CAAgB,OAAO,KAAK;IAC5B,SAAS;IACT,MAAM;IACN,WAAW,OAAO;IACnB,CAAC;GAKE,SAAS,CACP;IACE,8CAAgB,OAAO,KAAK;IAC5B,cAAc;IACd,aAAa;IACb,OAAO,KAAK,UAAU,OAAO,MAAM;IACpC,CACF;GACD,QAAQA,4BAAU;IAChB,KAAK,UAAU,QAAQ;IACvB,QAAQ,OAAO,QAAQ;IACvB,QAAQ,cAAc;IACvB,CAAC;GACF,QAAQC,4BAAU;IAAE,KAAK,UAAU,QAAQ;IAAK,QAAQ,OAAO,QAAQ;IAAQ,CAAC;GACjF,CACF;;CAEJ,CAAC"}
@@ -1,11 +1,6 @@
1
- const require_generators = require('./generators-B27La9Vd.cjs');
2
- require('./getFooter-CwjCW4h5.cjs');
3
- require('./Oas-BzrQ6RGC.cjs');
4
- const require_utils = require('./utils-nzdccPlU.cjs');
1
+ const require_generators = require('./generators-udGOxdUV.cjs');
2
+ require('./getFooter-DPh4lxBH.cjs');
5
3
 
6
- exports.buildOperation = require_utils.buildOperation;
7
- exports.buildOperations = require_utils.buildOperations;
8
- exports.buildSchema = require_utils.buildSchema;
9
4
  exports.createGenerator = require_generators.createGenerator;
10
5
  exports.createReactGenerator = require_generators.createReactGenerator;
11
6
  exports.jsonGenerator = require_generators.jsonGenerator;
@@ -1,3 +1,8 @@
1
- import { D as createReactGenerator, O as createGenerator, c as buildSchema, m as jsonGenerator, o as buildOperation, r as Generator, s as buildOperations } from "./OperationGenerator-CJTAer7l.cjs";
2
- import "./SchemaMapper-MiRB5_Zp.cjs";
3
- export { Generator, buildOperation, buildOperations, buildSchema, createGenerator, createReactGenerator, jsonGenerator };
1
+ import { a as createReactGenerator, b as PluginOas, n as createGenerator, r as Generator, t as CoreGenerator } from "./createGenerator-PIseu7v9.cjs";
2
+ import "./SchemaMapper-CX7sIIuZ.cjs";
3
+
4
+ //#region src/generators/jsonGenerator.d.ts
5
+ declare const jsonGenerator: CoreGenerator<PluginOas>;
6
+ //#endregion
7
+ export { type Generator, createGenerator, createReactGenerator, jsonGenerator };
8
+ //# sourceMappingURL=generators.d.cts.map
@@ -1,3 +1,8 @@
1
- import { D as createReactGenerator, O as createGenerator, c as buildSchema, m as jsonGenerator, o as buildOperation, r as Generator, s as buildOperations } from "./OperationGenerator-BZPWkxw4.js";
2
- import "./SchemaMapper-CqBW0VOy.js";
3
- export { Generator, buildOperation, buildOperations, buildSchema, createGenerator, createReactGenerator, jsonGenerator };
1
+ import { a as createReactGenerator, b as PluginOas, n as createGenerator, r as Generator, t as CoreGenerator } from "./createGenerator-DlSlv4sR.js";
2
+ import "./SchemaMapper-m5TKynWt.js";
3
+
4
+ //#region src/generators/jsonGenerator.d.ts
5
+ declare const jsonGenerator: CoreGenerator<PluginOas>;
6
+ //#endregion
7
+ export { type Generator, createGenerator, createReactGenerator, jsonGenerator };
8
+ //# sourceMappingURL=generators.d.ts.map
@@ -1,6 +1,4 @@
1
- import { n as createReactGenerator, r as createGenerator, t as jsonGenerator } from "./generators-C61FxVIj.js";
2
- import "./getFooter-D5MdeUVv.js";
3
- import "./Oas-CIeHKOo0.js";
4
- import { n as buildOperations, r as buildSchema, t as buildOperation } from "./utils-BnkB1ikY.js";
1
+ import { n as createReactGenerator, r as createGenerator, t as jsonGenerator } from "./generators-CJDEf8Kn.js";
2
+ import "./getFooter-CV73pVXj.js";
5
3
 
6
- export { buildOperation, buildOperations, buildSchema, createGenerator, createReactGenerator, jsonGenerator };
4
+ export { createGenerator, createReactGenerator, jsonGenerator };
@@ -1,5 +1,5 @@
1
- import { isFunction } from "remeda";
2
1
  import path from "node:path";
2
+ import { isFunction } from "remeda";
3
3
 
4
4
  //#region src/utils/getBanner.ts
5
5
  /**
@@ -55,4 +55,4 @@ function getFooter({ output, oas }) {
55
55
 
56
56
  //#endregion
57
57
  export { getBanner as n, getFooter as t };
58
- //# sourceMappingURL=getFooter-D5MdeUVv.js.map
58
+ //# sourceMappingURL=getFooter-CV73pVXj.js.map