@kubb/plugin-mcp 4.18.5 → 4.19.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.
@@ -1,4 +1,4 @@
1
- import { a as OperationSchemas, h as __name } from "./index-Ch4Sf8ld.cjs";
1
+ import { a as OperationSchemas, h as __name } from "./index-Bc9Bo5uU.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-CYNoGikR.js";
2
+ import { a as OperationSchemas } from "./index-BdZEAHoi.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-Ch4Sf8ld.cjs";
2
- import { n as PluginMcp } from "./types-DWlHEIRu.cjs";
1
+ import { h as __name, n as ReactGenerator } from "./index-Bc9Bo5uU.cjs";
2
+ import { n as PluginMcp } from "./types-ByF4lgWA.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-CYNoGikR.js";
3
- import { n as PluginMcp } from "./types-DT7ddZdA.js";
2
+ import { n as ReactGenerator } from "./index-BdZEAHoi.js";
3
+ import { n as PluginMcp } from "./types-Dni3cedL.js";
4
4
 
5
5
  //#region src/generators/mcpGenerator.d.ts
6
6
  declare const mcpGenerator: ReactGenerator<PluginMcp>;
@@ -584,7 +584,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
584
584
  result: Result;
585
585
  plugin: Plugin;
586
586
  };
587
- type Options$1 = {
587
+ type Options = {
588
588
  fabric: Fabric;
589
589
  events: AsyncEventEmitter<KubbEvents>;
590
590
  /**
@@ -602,8 +602,8 @@ type GetFileProps<TOptions = object> = {
602
602
  declare class PluginManager {
603
603
  #private;
604
604
  readonly config: Config;
605
- readonly options: Options$1;
606
- constructor(config: Config, options: Options$1);
605
+ readonly options: Options;
606
+ constructor(config: Config, options: Options);
607
607
  get events(): AsyncEventEmitter<KubbEvents>;
608
608
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
609
609
  get plugins(): Array<Plugin>;
@@ -707,16 +707,21 @@ type Operation$1 = Operation;
707
707
  type DiscriminatorObject$1 = DiscriminatorObject;
708
708
  //#endregion
709
709
  //#region ../oas/src/Oas.d.ts
710
- type Options = {
710
+ type OasOptions = {
711
711
  contentType?: contentType;
712
712
  discriminator?: 'strict' | 'inherit';
713
+ /**
714
+ * Resolve name collisions when schemas from different components share the same name (case-insensitive).
715
+ * @default false
716
+ */
717
+ collisionDetection?: boolean;
713
718
  };
714
719
  declare class Oas extends BaseOas {
715
720
  #private;
716
721
  document: Document;
717
722
  constructor(document: Document);
718
- setOptions(options: Options): void;
719
- get options(): Options;
723
+ setOptions(options: OasOptions): void;
724
+ get options(): OasOptions;
720
725
  get<T = unknown>($ref: string): T | null;
721
726
  getKey($ref: string): string | undefined;
722
727
  set($ref: string, value: unknown): false | undefined;
@@ -727,6 +732,18 @@ declare class Oas extends BaseOas {
727
732
  getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
728
733
  validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
729
734
  flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
735
+ /**
736
+ * Get schemas from OpenAPI components (schemas, responses, requestBodies).
737
+ * Returns schemas in dependency order along with name mapping for collision resolution.
738
+ */
739
+ getSchemas(options?: {
740
+ contentType?: contentType;
741
+ includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
742
+ collisionDetection?: boolean;
743
+ }): {
744
+ schemas: Record<string, SchemaObject$1>;
745
+ nameMapping: Map<string, string>;
746
+ };
730
747
  }
731
748
  //#endregion
732
749
  //#region ../plugin-oas/src/types.d.ts
@@ -1182,4 +1199,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
1182
1199
  };
1183
1200
  //#endregion
1184
1201
  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 };
1185
- //# sourceMappingURL=index-Ch4Sf8ld.d.cts.map
1202
+ //# sourceMappingURL=index-Bc9Bo5uU.d.cts.map
@@ -583,7 +583,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
583
583
  result: Result;
584
584
  plugin: Plugin;
585
585
  };
586
- type Options$1 = {
586
+ type Options = {
587
587
  fabric: Fabric;
588
588
  events: AsyncEventEmitter<KubbEvents>;
589
589
  /**
@@ -601,8 +601,8 @@ type GetFileProps<TOptions = object> = {
601
601
  declare class PluginManager {
602
602
  #private;
603
603
  readonly config: Config;
604
- readonly options: Options$1;
605
- constructor(config: Config, options: Options$1);
604
+ readonly options: Options;
605
+ constructor(config: Config, options: Options);
606
606
  get events(): AsyncEventEmitter<KubbEvents>;
607
607
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
608
608
  get plugins(): Array<Plugin>;
@@ -706,16 +706,21 @@ type Operation$1 = Operation;
706
706
  type DiscriminatorObject$1 = DiscriminatorObject;
707
707
  //#endregion
708
708
  //#region ../oas/src/Oas.d.ts
709
- type Options = {
709
+ type OasOptions = {
710
710
  contentType?: contentType;
711
711
  discriminator?: 'strict' | 'inherit';
712
+ /**
713
+ * Resolve name collisions when schemas from different components share the same name (case-insensitive).
714
+ * @default false
715
+ */
716
+ collisionDetection?: boolean;
712
717
  };
713
718
  declare class Oas extends BaseOas {
714
719
  #private;
715
720
  document: Document;
716
721
  constructor(document: Document);
717
- setOptions(options: Options): void;
718
- get options(): Options;
722
+ setOptions(options: OasOptions): void;
723
+ get options(): OasOptions;
719
724
  get<T = unknown>($ref: string): T | null;
720
725
  getKey($ref: string): string | undefined;
721
726
  set($ref: string, value: unknown): false | undefined;
@@ -726,6 +731,18 @@ declare class Oas extends BaseOas {
726
731
  getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
727
732
  validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
728
733
  flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
734
+ /**
735
+ * Get schemas from OpenAPI components (schemas, responses, requestBodies).
736
+ * Returns schemas in dependency order along with name mapping for collision resolution.
737
+ */
738
+ getSchemas(options?: {
739
+ contentType?: contentType;
740
+ includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
741
+ collisionDetection?: boolean;
742
+ }): {
743
+ schemas: Record<string, SchemaObject$1>;
744
+ nameMapping: Map<string, string>;
745
+ };
729
746
  }
730
747
  //#endregion
731
748
  //#region ../plugin-oas/src/types.d.ts
@@ -1181,4 +1198,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
1181
1198
  };
1182
1199
  //#endregion
1183
1200
  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 };
1184
- //# sourceMappingURL=index-CYNoGikR.d.ts.map
1201
+ //# sourceMappingURL=index-BdZEAHoi.d.ts.map
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { h as __name, m as UserPluginWithLifeCycle } from "./index-Ch4Sf8ld.cjs";
2
- import { n as PluginMcp, t as Options } from "./types-DWlHEIRu.cjs";
1
+ import { h as __name, m as UserPluginWithLifeCycle } from "./index-Bc9Bo5uU.cjs";
2
+ import { n as PluginMcp, t as Options } from "./types-ByF4lgWA.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-CYNoGikR.js";
3
- import { n as PluginMcp, t as Options } from "./types-DT7ddZdA.js";
2
+ import { m as UserPluginWithLifeCycle } from "./index-BdZEAHoi.js";
3
+ import { n as PluginMcp, t as Options } from "./types-Dni3cedL.js";
4
4
 
5
5
  //#region src/plugin.d.ts
6
6
  declare const pluginMcpName = "plugin-mcp";
@@ -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-Ch4Sf8ld.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-Bc9Bo5uU.cjs";
2
2
 
3
3
  //#region ../plugin-client/src/types.d.ts
4
4
 
@@ -183,4 +183,4 @@ type ResolvedOptions = {
183
183
  type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
184
184
  //#endregion
185
185
  export { PluginMcp as n, Options as t };
186
- //# sourceMappingURL=types-DWlHEIRu.d.cts.map
186
+ //# sourceMappingURL=types-ByF4lgWA.d.cts.map
@@ -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-CYNoGikR.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-BdZEAHoi.js";
3
3
 
4
4
  //#region ../plugin-client/src/types.d.ts
5
5
  type Options$1 = {
@@ -183,4 +183,4 @@ type ResolvedOptions = {
183
183
  type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>;
184
184
  //#endregion
185
185
  export { PluginMcp as n, Options as t };
186
- //# sourceMappingURL=types-DT7ddZdA.d.ts.map
186
+ //# sourceMappingURL=types-Dni3cedL.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-mcp",
3
- "version": "4.18.5",
3
+ "version": "4.19.0",
4
4
  "description": "Generator mcp",
5
5
  "keywords": [
6
6
  "typescript",
@@ -70,12 +70,12 @@
70
70
  ],
71
71
  "dependencies": {
72
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"
73
+ "@kubb/core": "4.19.0",
74
+ "@kubb/oas": "4.19.0",
75
+ "@kubb/plugin-client": "4.19.0",
76
+ "@kubb/plugin-oas": "4.19.0",
77
+ "@kubb/plugin-ts": "4.19.0",
78
+ "@kubb/plugin-zod": "4.19.0"
79
79
  },
80
80
  "devDependencies": {},
81
81
  "engines": {