@kubb/plugin-mcp 4.18.3 → 4.18.5

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.
@@ -1,4 +1,4 @@
1
- import { a as OperationSchemas, h as __name } from "./index-8d6sbZie.cjs";
1
+ import { a as OperationSchemas, h as __name } from "./index-Ch4Sf8ld.cjs";
2
2
  import { KubbFile } from "@kubb/fabric-core/types";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-eQyhnF5A.js";
2
- import { a as OperationSchemas } from "./index-DWomaFfM.js";
2
+ import { a as OperationSchemas } from "./index-CYNoGikR.js";
3
3
  import { KubbFile } from "@kubb/fabric-core/types";
4
4
  import { KubbNode } from "@kubb/react-fabric/types";
5
5
 
@@ -1,5 +1,5 @@
1
- import { h as __name, n as ReactGenerator } from "./index-8d6sbZie.cjs";
2
- import { n as PluginMcp } from "./types-rrRvPMcS.cjs";
1
+ import { h as __name, n as ReactGenerator } from "./index-Ch4Sf8ld.cjs";
2
+ import { n as PluginMcp } from "./types-DWlHEIRu.cjs";
3
3
 
4
4
  //#region src/generators/mcpGenerator.d.ts
5
5
  declare const mcpGenerator: ReactGenerator<PluginMcp>;
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk-eQyhnF5A.js";
2
- import { n as ReactGenerator } from "./index-DWomaFfM.js";
3
- import { n as PluginMcp } from "./types-DtXy5niO.js";
2
+ import { n as ReactGenerator } from "./index-CYNoGikR.js";
3
+ import { n as PluginMcp } from "./types-DT7ddZdA.js";
4
4
 
5
5
  //#region src/generators/mcpGenerator.d.ts
6
6
  declare const mcpGenerator: ReactGenerator<PluginMcp>;
@@ -305,7 +305,7 @@ type Config<TInput = Input> = {
305
305
  input: TInput;
306
306
  output: {
307
307
  /**
308
- * The path where all generated files will be exported.
308
+ * The path where all generated files receives exported.
309
309
  * This can be an absolute path or a path relative to the specified root option.
310
310
  */
311
311
  path: string;
@@ -320,41 +320,39 @@ type Config<TInput = Input> = {
320
320
  write?: boolean;
321
321
  /**
322
322
  * Specifies the formatting tool to be used.
323
- * @default prettier
324
- *
325
- * Possible values:
326
- * - 'auto': Automatically detects and uses biome or prettier (in that order of preference).
327
- * - 'prettier': Uses Prettier for code formatting.
328
- * - 'biome': Uses Biome for code formatting.
329
- *
323
+ * - 'auto' automatically detects and uses biome or prettier (in that order of preference).
324
+ * - 'prettier' uses Prettier for code formatting.
325
+ * - 'biome' uses Biome for code formatting.
326
+ * - 'oxfmt' uses Oxfmt for code formatting.
327
+ * - false disables code formatting.
328
+ * @default 'prettier'
330
329
  */
331
330
  format?: 'auto' | 'prettier' | 'biome' | 'oxfmt' | false;
332
331
  /**
333
332
  * Specifies the linter that should be used to analyze the code.
334
- * The accepted values indicate different linting tools.
335
- *
336
- * Possible values:
337
- * - 'auto': Automatically detects and uses biome, oxlint, or eslint (in that order of preference).
338
- * - 'eslint': Represents the use of ESLint, a widely used JavaScript linter.
339
- * - 'biome': Represents the Biome linter, a modern tool for code scanning.
340
- * - 'oxlint': Represents the Oxlint tool for linting purposes.
341
- *
333
+ * - 'auto' automatically detects and uses biome, oxlint, or eslint (in that order of preference).
334
+ * - 'eslint' uses ESLint for linting.
335
+ * - 'biome' uses Biome for linting.
336
+ * - 'oxlint' uses Oxlint for linting.
337
+ * - false disables linting.
338
+ * @default 'auto'
342
339
  */
343
340
  lint?: 'auto' | 'eslint' | 'biome' | 'oxlint' | false;
344
341
  /**
345
- * Override the extension to the generated imports and exports, by default each plugin will add an extension
342
+ * Overrides the extension for generated imports and exports. By default, each plugin adds an extension.
346
343
  * @default { '.ts': '.ts'}
347
344
  */
348
345
  extension?: Record<KubbFile.Extname, KubbFile.Extname | ''>;
349
346
  /**
350
- * 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`.
347
+ * Configures how `index.ts` files are created, including disabling barrel file generation. Each plugin has its own `barrelType` option; this setting controls the root barrel file (e.g., `src/gen/index.ts`).
351
348
  * @default 'named'
352
349
  */
353
350
  barrelType?: Exclude<BarrelType, 'propagate'> | false;
354
351
  /**
355
- * Add a default banner to the beginning of every generated file. This makes it clear that the file was generated by Kubb.
356
- * - 'simple': will only add banner with link to Kubb
357
- * - 'full': will add source, title, description and the OpenAPI version used
352
+ * Adds a default banner to the start of every generated file indicating it was generated by Kubb.
353
+ * - 'simple' adds banner with link to Kubb.
354
+ * - 'full' adds source, title, description, and OpenAPI version.
355
+ * - false disables banner generation.
358
356
  * @default 'simple'
359
357
  */
360
358
  defaultBanner?: 'simple' | 'full' | false;
@@ -367,17 +365,17 @@ type Config<TInput = Input> = {
367
365
  override?: boolean;
368
366
  };
369
367
  /**
370
- * An array of Kubb plugins that will be used in the generation.
368
+ * An array of Kubb plugins that used in the generation.
371
369
  * Each plugin may include additional configurable options(defined in the plugin itself).
372
- * If a plugin depends on another plugin, an error will be returned if the required dependency is missing. See pre for more details.
370
+ * If a plugin depends on another plugin, an error is returned if the required dependency is missing. See pre for more details.
373
371
  */
374
372
  plugins?: Array<Plugin>;
375
373
  /**
376
- * Hooks that will be called when a specific action is triggered in Kubb.
374
+ * Hooks triggered when a specific action occurs in Kubb.
377
375
  */
378
376
  hooks?: {
379
377
  /**
380
- * Hook that will be triggered at the end of all executions.
378
+ * Hook that triggers at the end of all executions.
381
379
  * Useful for running Prettier or ESLint to format/lint your code.
382
380
  */
383
381
  done?: string | Array<string>;
@@ -406,7 +404,7 @@ TContext = any,
406
404
  TResolvePathOptions extends object = object> = {
407
405
  name: TName;
408
406
  /**
409
- * Same behaviour like what has been done with `QueryKey` in `@tanstack/react-query`
407
+ * Same behavior like what has been done with `QueryKey` in `@tanstack/react-query`
410
408
  */
411
409
  key: PluginKey<TName | string>;
412
410
  options: TOptions;
@@ -427,12 +425,12 @@ type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> =
427
425
  */
428
426
  options: TOptions['resolvedOptions'];
429
427
  /**
430
- * 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.
428
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
431
429
  * Can be used to validate dependent plugins.
432
430
  */
433
431
  pre?: Array<string>;
434
432
  /**
435
- * 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.
433
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
436
434
  */
437
435
  post?: Array<string>;
438
436
  inject?: (this: PluginContext<TOptions>, context: PluginContext<TOptions>) => TOptions['context'];
@@ -450,12 +448,12 @@ type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
450
448
  */
451
449
  key: TOptions['key'];
452
450
  /**
453
- * 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.
451
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
454
452
  * Can be used to validate dependent plugins.
455
453
  */
456
454
  pre?: Array<string>;
457
455
  /**
458
- * 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.
456
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
459
457
  */
460
458
  post?: Array<string>;
461
459
  /**
@@ -505,10 +503,12 @@ type ResolveNameParams = {
505
503
  name: string;
506
504
  pluginKey?: Plugin['key'];
507
505
  /**
508
- * `file` will be used to customize the name of the created file(use of camelCase)
509
- * `function` can be used to customize the exported functions(use of camelCase)
510
- * `type` is a special type for TypeScript(use of PascalCase)
511
- * `const` can be used for variables(use of camelCase)
506
+ * Specifies the type of entity being named.
507
+ * - 'file' customizes the name of the created file (uses camelCase).
508
+ * - 'function' customizes the exported function names (uses camelCase).
509
+ * - 'type' customizes TypeScript types (uses PascalCase).
510
+ * - 'const' customizes variable names (uses camelCase).
511
+ * @default undefined
512
512
  */
513
513
  type?: 'file' | 'function' | 'type' | 'const';
514
514
  };
@@ -563,11 +563,14 @@ type GroupContext = {
563
563
  };
564
564
  type Group = {
565
565
  /**
566
- * Define a type where to group the files on
566
+ * Defines the type where to group the files.
567
+ * - 'tag' groups files by OpenAPI tags.
568
+ * - 'path' groups files by OpenAPI paths.
569
+ * @default undefined
567
570
  */
568
571
  type: 'tag' | 'path';
569
572
  /**
570
- * Return the name of a group based on the group name, this will be used for the file and name generation
573
+ * Return the name of a group based on the group name, this used for the file and name generation
571
574
  */
572
575
  name?: (context: GroupContext) => string;
573
576
  };
@@ -639,7 +642,7 @@ declare class PluginManager {
639
642
  parameters: PluginParameter<H>;
640
643
  }): Array<ReturnType<ParseResult<H>>> | null;
641
644
  /**
642
- * First non-null result stops and will return it's value.
645
+ * Returns the first non-null result.
643
646
  */
644
647
  hookFirst<H extends PluginLifecycleHooks>({
645
648
  hookName,
@@ -651,7 +654,7 @@ declare class PluginManager {
651
654
  skipped?: ReadonlySet<Plugin> | null;
652
655
  }): Promise<SafeParseResult<H>>;
653
656
  /**
654
- * First non-null result stops and will return it's value.
657
+ * Returns the first non-null result.
655
658
  */
656
659
  hookFirstSync<H extends PluginLifecycleHooks>({
657
660
  hookName,
@@ -663,15 +666,15 @@ declare class PluginManager {
663
666
  skipped?: ReadonlySet<Plugin> | null;
664
667
  }): SafeParseResult<H>;
665
668
  /**
666
- * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
669
+ * Runs all plugins in parallel based on `this.plugin` order and `pre`/`post` settings.
667
670
  */
668
- hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
671
+ hookParallel<H extends PluginLifecycleHooks, TOutput = void>({
669
672
  hookName,
670
673
  parameters
671
674
  }: {
672
675
  hookName: H;
673
676
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
674
- }): Promise<Awaited<TOuput>[]>;
677
+ }): Promise<Awaited<TOutput>[]>;
675
678
  /**
676
679
  * Chains plugins
677
680
  */
@@ -721,7 +724,7 @@ declare class Oas extends BaseOas {
721
724
  getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
722
725
  getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
723
726
  getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
724
- valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
727
+ validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
725
728
  flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
726
729
  }
727
730
  //#endregion
@@ -974,8 +977,8 @@ type SchemaKeywordMapper = {
974
977
  */
975
978
  path: KubbFile.Path;
976
979
  /**
977
- * When true `File.Import` will be used.
978
- * When false a reference will be used inside the current file.
980
+ * When true `File.Import` is used.
981
+ * When false a reference is used inside the current file.
979
982
  */
980
983
  isImportable: boolean;
981
984
  };
@@ -1107,7 +1110,7 @@ type SchemaGeneratorOptions = {
1107
1110
  */
1108
1111
  name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
1109
1112
  /**
1110
- * Receive schema and name(propertName) and return FakerMeta array
1113
+ * Receive schema and name(propertyName) and return FakerMeta array
1111
1114
  * TODO TODO add docs
1112
1115
  * @beta
1113
1116
  */
@@ -1178,4 +1181,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
1178
1181
  };
1179
1182
  //#endregion
1180
1183
  export { OperationSchemas as a, Oas as c, Output as d, PluginFactoryOptions as f, Include as i, contentType as l, UserPluginWithLifeCycle as m, ReactGenerator as n, Override as o, ResolveNameParams as p, Exclude$1 as r, ResolvePathOptions as s, Generator as t, Group as u };
1181
- //# sourceMappingURL=index-DWomaFfM.d.ts.map
1184
+ //# sourceMappingURL=index-CYNoGikR.d.ts.map
@@ -306,7 +306,7 @@ type Config<TInput = Input> = {
306
306
  input: TInput;
307
307
  output: {
308
308
  /**
309
- * The path where all generated files will be exported.
309
+ * The path where all generated files receives exported.
310
310
  * This can be an absolute path or a path relative to the specified root option.
311
311
  */
312
312
  path: string;
@@ -321,41 +321,39 @@ type Config<TInput = Input> = {
321
321
  write?: boolean;
322
322
  /**
323
323
  * Specifies the formatting tool to be used.
324
- * @default prettier
325
- *
326
- * Possible values:
327
- * - 'auto': Automatically detects and uses biome or prettier (in that order of preference).
328
- * - 'prettier': Uses Prettier for code formatting.
329
- * - 'biome': Uses Biome for code formatting.
330
- *
324
+ * - 'auto' automatically detects and uses biome or prettier (in that order of preference).
325
+ * - 'prettier' uses Prettier for code formatting.
326
+ * - 'biome' uses Biome for code formatting.
327
+ * - 'oxfmt' uses Oxfmt for code formatting.
328
+ * - false disables code formatting.
329
+ * @default 'prettier'
331
330
  */
332
331
  format?: 'auto' | 'prettier' | 'biome' | 'oxfmt' | false;
333
332
  /**
334
333
  * Specifies the linter that should be used to analyze the code.
335
- * The accepted values indicate different linting tools.
336
- *
337
- * Possible values:
338
- * - 'auto': Automatically detects and uses biome, oxlint, or eslint (in that order of preference).
339
- * - 'eslint': Represents the use of ESLint, a widely used JavaScript linter.
340
- * - 'biome': Represents the Biome linter, a modern tool for code scanning.
341
- * - 'oxlint': Represents the Oxlint tool for linting purposes.
342
- *
334
+ * - 'auto' automatically detects and uses biome, oxlint, or eslint (in that order of preference).
335
+ * - 'eslint' uses ESLint for linting.
336
+ * - 'biome' uses Biome for linting.
337
+ * - 'oxlint' uses Oxlint for linting.
338
+ * - false disables linting.
339
+ * @default 'auto'
343
340
  */
344
341
  lint?: 'auto' | 'eslint' | 'biome' | 'oxlint' | false;
345
342
  /**
346
- * Override the extension to the generated imports and exports, by default each plugin will add an extension
343
+ * Overrides the extension for generated imports and exports. By default, each plugin adds an extension.
347
344
  * @default { '.ts': '.ts'}
348
345
  */
349
346
  extension?: Record<KubbFile.Extname, KubbFile.Extname | ''>;
350
347
  /**
351
- * 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`.
348
+ * Configures how `index.ts` files are created, including disabling barrel file generation. Each plugin has its own `barrelType` option; this setting controls the root barrel file (e.g., `src/gen/index.ts`).
352
349
  * @default 'named'
353
350
  */
354
351
  barrelType?: Exclude<BarrelType, 'propagate'> | false;
355
352
  /**
356
- * Add a default banner to the beginning of every generated file. This makes it clear that the file was generated by Kubb.
357
- * - 'simple': will only add banner with link to Kubb
358
- * - 'full': will add source, title, description and the OpenAPI version used
353
+ * Adds a default banner to the start of every generated file indicating it was generated by Kubb.
354
+ * - 'simple' adds banner with link to Kubb.
355
+ * - 'full' adds source, title, description, and OpenAPI version.
356
+ * - false disables banner generation.
359
357
  * @default 'simple'
360
358
  */
361
359
  defaultBanner?: 'simple' | 'full' | false;
@@ -368,17 +366,17 @@ type Config<TInput = Input> = {
368
366
  override?: boolean;
369
367
  };
370
368
  /**
371
- * An array of Kubb plugins that will be used in the generation.
369
+ * An array of Kubb plugins that used in the generation.
372
370
  * Each plugin may include additional configurable options(defined in the plugin itself).
373
- * If a plugin depends on another plugin, an error will be returned if the required dependency is missing. See pre for more details.
371
+ * If a plugin depends on another plugin, an error is returned if the required dependency is missing. See pre for more details.
374
372
  */
375
373
  plugins?: Array<Plugin>;
376
374
  /**
377
- * Hooks that will be called when a specific action is triggered in Kubb.
375
+ * Hooks triggered when a specific action occurs in Kubb.
378
376
  */
379
377
  hooks?: {
380
378
  /**
381
- * Hook that will be triggered at the end of all executions.
379
+ * Hook that triggers at the end of all executions.
382
380
  * Useful for running Prettier or ESLint to format/lint your code.
383
381
  */
384
382
  done?: string | Array<string>;
@@ -407,7 +405,7 @@ TContext = any,
407
405
  TResolvePathOptions extends object = object> = {
408
406
  name: TName;
409
407
  /**
410
- * Same behaviour like what has been done with `QueryKey` in `@tanstack/react-query`
408
+ * Same behavior like what has been done with `QueryKey` in `@tanstack/react-query`
411
409
  */
412
410
  key: PluginKey<TName | string>;
413
411
  options: TOptions;
@@ -428,12 +426,12 @@ type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> =
428
426
  */
429
427
  options: TOptions['resolvedOptions'];
430
428
  /**
431
- * 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.
429
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
432
430
  * Can be used to validate dependent plugins.
433
431
  */
434
432
  pre?: Array<string>;
435
433
  /**
436
- * 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.
434
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
437
435
  */
438
436
  post?: Array<string>;
439
437
  inject?: (this: PluginContext<TOptions>, context: PluginContext<TOptions>) => TOptions['context'];
@@ -451,12 +449,12 @@ type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
451
449
  */
452
450
  key: TOptions['key'];
453
451
  /**
454
- * 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.
452
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
455
453
  * Can be used to validate dependent plugins.
456
454
  */
457
455
  pre?: Array<string>;
458
456
  /**
459
- * 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.
457
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
460
458
  */
461
459
  post?: Array<string>;
462
460
  /**
@@ -506,10 +504,12 @@ type ResolveNameParams = {
506
504
  name: string;
507
505
  pluginKey?: Plugin['key'];
508
506
  /**
509
- * `file` will be used to customize the name of the created file(use of camelCase)
510
- * `function` can be used to customize the exported functions(use of camelCase)
511
- * `type` is a special type for TypeScript(use of PascalCase)
512
- * `const` can be used for variables(use of camelCase)
507
+ * Specifies the type of entity being named.
508
+ * - 'file' customizes the name of the created file (uses camelCase).
509
+ * - 'function' customizes the exported function names (uses camelCase).
510
+ * - 'type' customizes TypeScript types (uses PascalCase).
511
+ * - 'const' customizes variable names (uses camelCase).
512
+ * @default undefined
513
513
  */
514
514
  type?: 'file' | 'function' | 'type' | 'const';
515
515
  };
@@ -564,11 +564,14 @@ type GroupContext = {
564
564
  };
565
565
  type Group = {
566
566
  /**
567
- * Define a type where to group the files on
567
+ * Defines the type where to group the files.
568
+ * - 'tag' groups files by OpenAPI tags.
569
+ * - 'path' groups files by OpenAPI paths.
570
+ * @default undefined
568
571
  */
569
572
  type: 'tag' | 'path';
570
573
  /**
571
- * Return the name of a group based on the group name, this will be used for the file and name generation
574
+ * Return the name of a group based on the group name, this used for the file and name generation
572
575
  */
573
576
  name?: (context: GroupContext) => string;
574
577
  };
@@ -640,7 +643,7 @@ declare class PluginManager {
640
643
  parameters: PluginParameter<H>;
641
644
  }): Array<ReturnType<ParseResult<H>>> | null;
642
645
  /**
643
- * First non-null result stops and will return it's value.
646
+ * Returns the first non-null result.
644
647
  */
645
648
  hookFirst<H extends PluginLifecycleHooks>({
646
649
  hookName,
@@ -652,7 +655,7 @@ declare class PluginManager {
652
655
  skipped?: ReadonlySet<Plugin> | null;
653
656
  }): Promise<SafeParseResult<H>>;
654
657
  /**
655
- * First non-null result stops and will return it's value.
658
+ * Returns the first non-null result.
656
659
  */
657
660
  hookFirstSync<H extends PluginLifecycleHooks>({
658
661
  hookName,
@@ -664,15 +667,15 @@ declare class PluginManager {
664
667
  skipped?: ReadonlySet<Plugin> | null;
665
668
  }): SafeParseResult<H>;
666
669
  /**
667
- * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
670
+ * Runs all plugins in parallel based on `this.plugin` order and `pre`/`post` settings.
668
671
  */
669
- hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
672
+ hookParallel<H extends PluginLifecycleHooks, TOutput = void>({
670
673
  hookName,
671
674
  parameters
672
675
  }: {
673
676
  hookName: H;
674
677
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
675
- }): Promise<Awaited<TOuput>[]>;
678
+ }): Promise<Awaited<TOutput>[]>;
676
679
  /**
677
680
  * Chains plugins
678
681
  */
@@ -722,7 +725,7 @@ declare class Oas extends BaseOas {
722
725
  getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
723
726
  getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
724
727
  getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
725
- valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
728
+ validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
726
729
  flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
727
730
  }
728
731
  //#endregion
@@ -975,8 +978,8 @@ type SchemaKeywordMapper = {
975
978
  */
976
979
  path: KubbFile.Path;
977
980
  /**
978
- * When true `File.Import` will be used.
979
- * When false a reference will be used inside the current file.
981
+ * When true `File.Import` is used.
982
+ * When false a reference is used inside the current file.
980
983
  */
981
984
  isImportable: boolean;
982
985
  };
@@ -1108,7 +1111,7 @@ type SchemaGeneratorOptions = {
1108
1111
  */
1109
1112
  name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
1110
1113
  /**
1111
- * Receive schema and name(propertName) and return FakerMeta array
1114
+ * Receive schema and name(propertyName) and return FakerMeta array
1112
1115
  * TODO TODO add docs
1113
1116
  * @beta
1114
1117
  */
@@ -1179,4 +1182,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
1179
1182
  };
1180
1183
  //#endregion
1181
1184
  export { OperationSchemas as a, Oas as c, Output as d, PluginFactoryOptions as f, __name as h, Include as i, contentType as l, UserPluginWithLifeCycle as m, ReactGenerator as n, Override as o, ResolveNameParams as p, Exclude$1 as r, ResolvePathOptions as s, Generator as t, Group as u };
1182
- //# sourceMappingURL=index-8d6sbZie.d.cts.map
1185
+ //# sourceMappingURL=index-Ch4Sf8ld.d.cts.map
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { h as __name, m as UserPluginWithLifeCycle } from "./index-8d6sbZie.cjs";
2
- import { n as PluginMcp, t as Options } from "./types-rrRvPMcS.cjs";
1
+ import { h as __name, m as UserPluginWithLifeCycle } from "./index-Ch4Sf8ld.cjs";
2
+ import { n as PluginMcp, t as Options } from "./types-DWlHEIRu.cjs";
3
3
 
4
4
  //#region src/plugin.d.ts
5
5
  declare const pluginMcpName = "plugin-mcp";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk-eQyhnF5A.js";
2
- import { m as UserPluginWithLifeCycle } from "./index-DWomaFfM.js";
3
- import { n as PluginMcp, t as Options } from "./types-DtXy5niO.js";
2
+ import { m as UserPluginWithLifeCycle } from "./index-CYNoGikR.js";
3
+ import { n as PluginMcp, t as Options } from "./types-DT7ddZdA.js";
4
4
 
5
5
  //#region src/plugin.d.ts
6
6
  declare const pluginMcpName = "plugin-mcp";
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-eQyhnF5A.js";
2
- import { c as Oas, d as Output, f as PluginFactoryOptions, i as Include, l as contentType, o as Override, p as ResolveNameParams, r as Exclude, s as ResolvePathOptions, t as Generator, u as Group } from "./index-DWomaFfM.js";
2
+ import { c as Oas, d as Output, f as PluginFactoryOptions, i as Include, l as contentType, o as Override, p as ResolveNameParams, r as Exclude, s as ResolvePathOptions, t as Generator, u as Group } from "./index-CYNoGikR.js";
3
3
 
4
4
  //#region ../plugin-client/src/types.d.ts
5
5
  type Options$1 = {
@@ -10,7 +10,7 @@ type Options$1 = {
10
10
  output?: Output<Oas>;
11
11
  /**
12
12
  * Define which contentType should be used.
13
- * By default, the first JSON valid mediaType will be used
13
+ * By default, the first JSON valid mediaType is used
14
14
  */
15
15
  contentType?: contentType;
16
16
  /**
@@ -35,16 +35,17 @@ type Options$1 = {
35
35
  */
36
36
  operations?: boolean;
37
37
  /**
38
- * Export urls that are used by operation x
39
- * `export` will make them part of your barrel file
40
- * false will not make them exportable
38
+ * Export urls that are used by operation x.
39
+ * - 'export' makes them part of your barrel file.
40
+ * - false does not make them exportable.
41
+ * @default false
41
42
  * @example getGetPetByIdUrl
42
43
  */
43
44
  urlType?: 'export' | false;
44
45
  /**
45
- * Path to the client import path that will be used to do the API calls.
46
- * It will be used as `import client from '${client.importPath}'`.
47
- * It allows both relative and absolute path but be aware that we will not change the path.
46
+ * Client import path for API calls.
47
+ * Used as `import client from '${client.importPath}'`.
48
+ * Accepts relative and absolute paths; path changes are not performed.
48
49
  */
49
50
  importPath?: string;
50
51
  /**
@@ -52,49 +53,50 @@ type Options$1 = {
52
53
  */
53
54
  baseURL?: string;
54
55
  /**
55
- * ReturnType that will be used when calling the client.
56
- * - 'data' will return ResponseConfig[data].
57
- * - 'full' will return ResponseConfig.
56
+ * ReturnType that is used when calling the client.
57
+ * - 'data' returns ResponseConfig[data].
58
+ * - 'full' returns ResponseConfig.
58
59
  * @default 'data'
59
60
  */
60
61
  dataReturnType?: 'data' | 'full';
61
62
  /**
62
63
  * How to style your params, by default no casing is applied
63
- * - 'camelcase' will use camelcase for the params names
64
+ * - 'camelcase' uses camelcase for the params names
64
65
  */
65
66
  paramsCasing?: 'camelcase';
66
67
  /**
67
- * How to pass your params
68
- * - 'object' will return the params and pathParams as an object.
69
- * - 'inline' will return the params as comma separated params.
68
+ * How to pass your params.
69
+ * - 'object' returns the params and pathParams as an object.
70
+ * - 'inline' returns the params as comma separated params.
70
71
  * @default 'inline'
71
72
  */
72
73
  paramsType?: 'object' | 'inline';
73
74
  /**
74
75
  * How to pass your pathParams.
75
- * - 'object' will return the pathParams as an object.
76
- * - 'inline' will return the pathParams as comma separated params.
76
+ * - 'object' returns the pathParams as an object.
77
+ * - 'inline' returns the pathParams as comma separated params.
77
78
  * @default 'inline'
78
79
  */
79
80
  pathParamsType?: 'object' | 'inline';
80
81
  /**
81
- * Which parser can be used before returning the data
82
- * - 'zod' will use `@kubb/plugin-zod` to parse the data.
82
+ * Which parser can be used before returning the data.
83
+ * - 'client' returns the data as-is from the client.
84
+ * - 'zod' uses @kubb/plugin-zod to parse the data.
83
85
  * @default 'client'
84
86
  */
85
87
  parser?: 'client' | 'zod';
86
88
  /**
87
- * Which client should be used to do the HTTP calls
88
- * - 'axios' will use `@kubb/plugin-client/templates/axios` to fetch data.
89
- * - 'fetch' will use `@kubb/plugin-client/templates/fetch` to fetch data.
89
+ * Which client should be used to do the HTTP calls.
90
+ * - 'axios' uses axios client for HTTP requests.
91
+ * - 'fetch' uses native fetch API for HTTP requests.
90
92
  * @default 'axios'
91
93
  */
92
94
  client?: 'axios' | 'fetch';
93
95
  /**
94
- * How to generate the client code
95
- * - 'function' will generate standalone functions for each operation.
96
- * - 'class' will generate a class with methods for each operation.
97
- * - 'staticClass' will generate a class with static methods for each operation.
96
+ * How to generate the client code.
97
+ * - 'function' generates standalone functions for each operation.
98
+ * - 'class' generates a class with methods for each operation.
99
+ * - 'staticClass' generates a class with static methods for each operation.
98
100
  * @default 'function'
99
101
  */
100
102
  clientType?: 'function' | 'class' | 'staticClass';
@@ -102,7 +104,7 @@ type Options$1 = {
102
104
  * Bundle the selected client into the generated `.kubb` directory.
103
105
  * When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
104
106
  * @default false
105
- * In version 5 of Kubb this will be by default true
107
+ * In version 5 of Kubb this is by default true
106
108
  */
107
109
  bundle?: boolean;
108
110
  transformers?: {
@@ -142,7 +144,7 @@ type Options = {
142
144
  output?: Output<Oas>;
143
145
  /**
144
146
  * Define which contentType should be used.
145
- * By default, the first JSON valid mediaType will be used
147
+ * By default, the first JSON valid mediaType is used
146
148
  */
147
149
  contentType?: contentType;
148
150
  client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>;
@@ -181,4 +183,4 @@ type ResolvedOptions = {
181
183
  type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
182
184
  //#endregion
183
185
  export { PluginMcp as n, Options as t };
184
- //# sourceMappingURL=types-DtXy5niO.d.ts.map
186
+ //# sourceMappingURL=types-DT7ddZdA.d.ts.map
@@ -1,4 +1,4 @@
1
- import { c as Oas, d as Output, f as PluginFactoryOptions, h as __name, i as Include, l as contentType, o as Override, p as ResolveNameParams, r as Exclude, s as ResolvePathOptions, t as Generator, u as Group } from "./index-8d6sbZie.cjs";
1
+ import { c as Oas, d as Output, f as PluginFactoryOptions, h as __name, i as Include, l as contentType, o as Override, p as ResolveNameParams, r as Exclude, s as ResolvePathOptions, t as Generator, u as Group } from "./index-Ch4Sf8ld.cjs";
2
2
 
3
3
  //#region ../plugin-client/src/types.d.ts
4
4
 
@@ -10,7 +10,7 @@ type Options$1 = {
10
10
  output?: Output<Oas>;
11
11
  /**
12
12
  * Define which contentType should be used.
13
- * By default, the first JSON valid mediaType will be used
13
+ * By default, the first JSON valid mediaType is used
14
14
  */
15
15
  contentType?: contentType;
16
16
  /**
@@ -35,16 +35,17 @@ type Options$1 = {
35
35
  */
36
36
  operations?: boolean;
37
37
  /**
38
- * Export urls that are used by operation x
39
- * `export` will make them part of your barrel file
40
- * false will not make them exportable
38
+ * Export urls that are used by operation x.
39
+ * - 'export' makes them part of your barrel file.
40
+ * - false does not make them exportable.
41
+ * @default false
41
42
  * @example getGetPetByIdUrl
42
43
  */
43
44
  urlType?: 'export' | false;
44
45
  /**
45
- * Path to the client import path that will be used to do the API calls.
46
- * It will be used as `import client from '${client.importPath}'`.
47
- * It allows both relative and absolute path but be aware that we will not change the path.
46
+ * Client import path for API calls.
47
+ * Used as `import client from '${client.importPath}'`.
48
+ * Accepts relative and absolute paths; path changes are not performed.
48
49
  */
49
50
  importPath?: string;
50
51
  /**
@@ -52,49 +53,50 @@ type Options$1 = {
52
53
  */
53
54
  baseURL?: string;
54
55
  /**
55
- * ReturnType that will be used when calling the client.
56
- * - 'data' will return ResponseConfig[data].
57
- * - 'full' will return ResponseConfig.
56
+ * ReturnType that is used when calling the client.
57
+ * - 'data' returns ResponseConfig[data].
58
+ * - 'full' returns ResponseConfig.
58
59
  * @default 'data'
59
60
  */
60
61
  dataReturnType?: 'data' | 'full';
61
62
  /**
62
63
  * How to style your params, by default no casing is applied
63
- * - 'camelcase' will use camelcase for the params names
64
+ * - 'camelcase' uses camelcase for the params names
64
65
  */
65
66
  paramsCasing?: 'camelcase';
66
67
  /**
67
- * How to pass your params
68
- * - 'object' will return the params and pathParams as an object.
69
- * - 'inline' will return the params as comma separated params.
68
+ * How to pass your params.
69
+ * - 'object' returns the params and pathParams as an object.
70
+ * - 'inline' returns the params as comma separated params.
70
71
  * @default 'inline'
71
72
  */
72
73
  paramsType?: 'object' | 'inline';
73
74
  /**
74
75
  * How to pass your pathParams.
75
- * - 'object' will return the pathParams as an object.
76
- * - 'inline' will return the pathParams as comma separated params.
76
+ * - 'object' returns the pathParams as an object.
77
+ * - 'inline' returns the pathParams as comma separated params.
77
78
  * @default 'inline'
78
79
  */
79
80
  pathParamsType?: 'object' | 'inline';
80
81
  /**
81
- * Which parser can be used before returning the data
82
- * - 'zod' will use `@kubb/plugin-zod` to parse the data.
82
+ * Which parser can be used before returning the data.
83
+ * - 'client' returns the data as-is from the client.
84
+ * - 'zod' uses @kubb/plugin-zod to parse the data.
83
85
  * @default 'client'
84
86
  */
85
87
  parser?: 'client' | 'zod';
86
88
  /**
87
- * Which client should be used to do the HTTP calls
88
- * - 'axios' will use `@kubb/plugin-client/templates/axios` to fetch data.
89
- * - 'fetch' will use `@kubb/plugin-client/templates/fetch` to fetch data.
89
+ * Which client should be used to do the HTTP calls.
90
+ * - 'axios' uses axios client for HTTP requests.
91
+ * - 'fetch' uses native fetch API for HTTP requests.
90
92
  * @default 'axios'
91
93
  */
92
94
  client?: 'axios' | 'fetch';
93
95
  /**
94
- * How to generate the client code
95
- * - 'function' will generate standalone functions for each operation.
96
- * - 'class' will generate a class with methods for each operation.
97
- * - 'staticClass' will generate a class with static methods for each operation.
96
+ * How to generate the client code.
97
+ * - 'function' generates standalone functions for each operation.
98
+ * - 'class' generates a class with methods for each operation.
99
+ * - 'staticClass' generates a class with static methods for each operation.
98
100
  * @default 'function'
99
101
  */
100
102
  clientType?: 'function' | 'class' | 'staticClass';
@@ -102,7 +104,7 @@ type Options$1 = {
102
104
  * Bundle the selected client into the generated `.kubb` directory.
103
105
  * When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
104
106
  * @default false
105
- * In version 5 of Kubb this will be by default true
107
+ * In version 5 of Kubb this is by default true
106
108
  */
107
109
  bundle?: boolean;
108
110
  transformers?: {
@@ -142,7 +144,7 @@ type Options = {
142
144
  output?: Output<Oas>;
143
145
  /**
144
146
  * Define which contentType should be used.
145
- * By default, the first JSON valid mediaType will be used
147
+ * By default, the first JSON valid mediaType is used
146
148
  */
147
149
  contentType?: contentType;
148
150
  client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>;
@@ -181,4 +183,4 @@ type ResolvedOptions = {
181
183
  type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
182
184
  //#endregion
183
185
  export { PluginMcp as n, Options as t };
184
- //# sourceMappingURL=types-rrRvPMcS.d.cts.map
186
+ //# sourceMappingURL=types-DWlHEIRu.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-mcp",
3
- "version": "4.18.3",
3
+ "version": "4.18.5",
4
4
  "description": "Generator mcp",
5
5
  "keywords": [
6
6
  "typescript",
@@ -69,13 +69,13 @@
69
69
  }
70
70
  ],
71
71
  "dependencies": {
72
- "@kubb/react-fabric": "0.11.8",
73
- "@kubb/core": "4.18.3",
74
- "@kubb/oas": "4.18.3",
75
- "@kubb/plugin-client": "4.18.3",
76
- "@kubb/plugin-oas": "4.18.3",
77
- "@kubb/plugin-ts": "4.18.3",
78
- "@kubb/plugin-zod": "4.18.3"
72
+ "@kubb/react-fabric": "0.12.4",
73
+ "@kubb/core": "4.18.5",
74
+ "@kubb/oas": "4.18.5",
75
+ "@kubb/plugin-client": "4.18.5",
76
+ "@kubb/plugin-oas": "4.18.5",
77
+ "@kubb/plugin-ts": "4.18.5",
78
+ "@kubb/plugin-zod": "4.18.5"
79
79
  },
80
80
  "devDependencies": {},
81
81
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "mcpServers": {
3
- "Swagger Petstore": {
3
+ "Swagger PetStore": {
4
4
  "type": "stdio",
5
5
  "command": "npx",
6
6
  "args": ["tsx", "server.ts"]
@@ -7,7 +7,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio'
7
7
  import { listPetsHandler, listPetsQueryParams, createPetsHandler, createPetsMutationRequest, showPetByIdHandler, showPetByIdPathParams } from './showPetById'
8
8
 
9
9
  export const server = new McpServer({
10
- name: 'Swagger Petstore',
10
+ name: 'Swagger PetStore',
11
11
  version: '3.0.0',
12
12
  })
13
13
 
package/src/types.ts CHANGED
@@ -13,7 +13,7 @@ export type Options = {
13
13
  output?: Output<Oas>
14
14
  /**
15
15
  * Define which contentType should be used.
16
- * By default, the first JSON valid mediaType will be used
16
+ * By default, the first JSON valid mediaType is used
17
17
  */
18
18
  contentType?: contentType
19
19
  client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>