@kubb/plugin-mcp 4.18.5 → 4.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/generators.d.cts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/{index-CYNoGikR.d.ts → index-DeJDaV3A.d.ts} +30 -7
- package/dist/{index-Ch4Sf8ld.d.cts → index-Dkj8hJFT.d.cts} +30 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{types-DWlHEIRu.d.cts → types-BmrdXe4i.d.cts} +2 -2
- package/dist/{types-DT7ddZdA.d.ts → types-f0xmO4e7.d.ts} +2 -2
- package/package.json +7 -7
package/dist/components.d.cts
CHANGED
package/dist/components.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-eQyhnF5A.js";
|
|
2
|
-
import { a as OperationSchemas } from "./index-
|
|
2
|
+
import { a as OperationSchemas } from "./index-DeJDaV3A.js";
|
|
3
3
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
4
4
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
5
5
|
|
package/dist/generators.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as __name, n as ReactGenerator } from "./index-
|
|
2
|
-
import { n as PluginMcp } from "./types-
|
|
1
|
+
import { h as __name, n as ReactGenerator } from "./index-Dkj8hJFT.cjs";
|
|
2
|
+
import { n as PluginMcp } from "./types-BmrdXe4i.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/generators/mcpGenerator.d.ts
|
|
5
5
|
declare const mcpGenerator: ReactGenerator<PluginMcp>;
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-eQyhnF5A.js";
|
|
2
|
-
import { n as ReactGenerator } from "./index-
|
|
3
|
-
import { n as PluginMcp } from "./types-
|
|
2
|
+
import { n as ReactGenerator } from "./index-DeJDaV3A.js";
|
|
3
|
+
import { n as PluginMcp } from "./types-f0xmO4e7.js";
|
|
4
4
|
|
|
5
5
|
//#region src/generators/mcpGenerator.d.ts
|
|
6
6
|
declare const mcpGenerator: ReactGenerator<PluginMcp>;
|
|
@@ -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
|
|
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
|
|
605
|
-
constructor(config: Config, options: Options
|
|
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
|
|
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:
|
|
718
|
-
get 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
|
|
@@ -1101,6 +1118,11 @@ type SchemaGeneratorOptions = {
|
|
|
1101
1118
|
emptySchemaType: 'any' | 'unknown' | 'void';
|
|
1102
1119
|
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
|
|
1103
1120
|
enumSuffix?: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* @deprecated Will be removed in v5. Use `collisionDetection: true` instead to prevent enum name collisions.
|
|
1123
|
+
* When `collisionDetection` is enabled, the rootName-based approach eliminates the need for numeric suffixes.
|
|
1124
|
+
* @internal
|
|
1125
|
+
*/
|
|
1104
1126
|
usedEnumNames?: Record<string, number>;
|
|
1105
1127
|
mapper?: Record<string, string>;
|
|
1106
1128
|
typed?: boolean;
|
|
@@ -1121,6 +1143,7 @@ type SchemaProps$1 = {
|
|
|
1121
1143
|
schema: SchemaObject$1 | null;
|
|
1122
1144
|
name: string | null;
|
|
1123
1145
|
parentName: string | null;
|
|
1146
|
+
rootName?: string | null;
|
|
1124
1147
|
};
|
|
1125
1148
|
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
1126
1149
|
#private;
|
|
@@ -1181,4 +1204,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
|
1181
1204
|
};
|
|
1182
1205
|
//#endregion
|
|
1183
1206
|
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-
|
|
1207
|
+
//# sourceMappingURL=index-DeJDaV3A.d.ts.map
|
|
@@ -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
|
|
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
|
|
606
|
-
constructor(config: Config, options: Options
|
|
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
|
|
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:
|
|
719
|
-
get 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
|
|
@@ -1102,6 +1119,11 @@ type SchemaGeneratorOptions = {
|
|
|
1102
1119
|
emptySchemaType: 'any' | 'unknown' | 'void';
|
|
1103
1120
|
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
|
|
1104
1121
|
enumSuffix?: string;
|
|
1122
|
+
/**
|
|
1123
|
+
* @deprecated Will be removed in v5. Use `collisionDetection: true` instead to prevent enum name collisions.
|
|
1124
|
+
* When `collisionDetection` is enabled, the rootName-based approach eliminates the need for numeric suffixes.
|
|
1125
|
+
* @internal
|
|
1126
|
+
*/
|
|
1105
1127
|
usedEnumNames?: Record<string, number>;
|
|
1106
1128
|
mapper?: Record<string, string>;
|
|
1107
1129
|
typed?: boolean;
|
|
@@ -1122,6 +1144,7 @@ type SchemaProps$1 = {
|
|
|
1122
1144
|
schema: SchemaObject$1 | null;
|
|
1123
1145
|
name: string | null;
|
|
1124
1146
|
parentName: string | null;
|
|
1147
|
+
rootName?: string | null;
|
|
1125
1148
|
};
|
|
1126
1149
|
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
1127
1150
|
#private;
|
|
@@ -1182,4 +1205,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
|
1182
1205
|
};
|
|
1183
1206
|
//#endregion
|
|
1184
1207
|
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-
|
|
1208
|
+
//# sourceMappingURL=index-Dkj8hJFT.d.cts.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as __name, m as UserPluginWithLifeCycle } from "./index-
|
|
2
|
-
import { n as PluginMcp, t as Options } from "./types-
|
|
1
|
+
import { h as __name, m as UserPluginWithLifeCycle } from "./index-Dkj8hJFT.cjs";
|
|
2
|
+
import { n as PluginMcp, t as Options } from "./types-BmrdXe4i.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-
|
|
3
|
-
import { n as PluginMcp, t as Options } from "./types-
|
|
2
|
+
import { m as UserPluginWithLifeCycle } from "./index-DeJDaV3A.js";
|
|
3
|
+
import { n as PluginMcp, t as Options } from "./types-f0xmO4e7.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-
|
|
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-Dkj8hJFT.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-
|
|
186
|
+
//# sourceMappingURL=types-BmrdXe4i.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-
|
|
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-DeJDaV3A.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-
|
|
186
|
+
//# sourceMappingURL=types-f0xmO4e7.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-mcp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.1",
|
|
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.
|
|
74
|
-
"@kubb/oas": "4.
|
|
75
|
-
"@kubb/plugin-client": "4.
|
|
76
|
-
"@kubb/plugin-oas": "4.
|
|
77
|
-
"@kubb/plugin-ts": "4.
|
|
78
|
-
"@kubb/plugin-zod": "4.
|
|
73
|
+
"@kubb/core": "4.19.1",
|
|
74
|
+
"@kubb/oas": "4.19.1",
|
|
75
|
+
"@kubb/plugin-client": "4.19.1",
|
|
76
|
+
"@kubb/plugin-oas": "4.19.1",
|
|
77
|
+
"@kubb/plugin-ts": "4.19.1",
|
|
78
|
+
"@kubb/plugin-zod": "4.19.1"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {},
|
|
81
81
|
"engines": {
|