@kubb/plugin-mcp 4.19.1 → 4.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Server-BolLh_dK.js.map +1 -1
- package/dist/Server-DblKyNZ0.cjs.map +1 -1
- package/dist/components.d.cts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/generators.d.cts +2 -2
- package/dist/generators.d.ts +2 -2
- package/dist/{index-Dkj8hJFT.d.cts → index-CGe1JmIp.d.cts} +5 -5
- package/dist/{index-DeJDaV3A.d.ts → index-D9FArzes.d.ts} +5 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{types-BmrdXe4i.d.cts → types-1i7hEdhc.d.cts} +2 -2
- package/dist/{types-f0xmO4e7.d.ts → types-BpFIHuV_.d.ts} +2 -2
- package/package.json +8 -8
- package/src/components/Server.tsx +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Server-BolLh_dK.js","names":[],"sources":["../src/components/Server.tsx"],"sourcesContent":["import { camelCase } from '@kubb/core/transformers'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { isNullable, isReference } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams, isOptional } from '@kubb/plugin-oas/utils'\nimport { Const, File, FunctionParams } from '@kubb/react-fabric'\nimport type {
|
|
1
|
+
{"version":3,"file":"Server-BolLh_dK.js","names":[],"sources":["../src/components/Server.tsx"],"sourcesContent":["import { camelCase } from '@kubb/core/transformers'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { isNullable, isReference } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams, isOptional } from '@kubb/plugin-oas/utils'\nimport { Const, File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n serverName: string\n serverVersion: string\n operations: Array<{\n tool: {\n name: string\n description: string\n }\n mcp: {\n name: string\n file: KubbFile.File\n }\n zod: {\n name: string\n file: KubbFile.File\n schemas: OperationSchemas\n }\n type: {\n schemas: OperationSchemas\n }\n }>\n}\n\ntype GetParamsProps = {\n schemas: OperationSchemas\n}\n\nfunction getParams({ schemas }: GetParamsProps) {\n const pathParams = getPathParams(schemas.pathParams, {\n typed: false,\n })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...Object.entries(pathParams).reduce((acc, [key, param]) => {\n if (param && schemas.pathParams?.name) {\n let suffix = '.shape'\n\n if (isNullable(schemas.pathParams.schema)) {\n if (isReference(schemas.pathParams)) {\n suffix = '.unwrap().schema.unwrap().shape'\n } else {\n suffix = '.unwrap().shape'\n }\n } else {\n if (isReference(schemas.pathParams)) {\n suffix = '.schema.shape'\n }\n }\n\n param.value = `${schemas.pathParams?.name}${suffix}['${key}']`\n }\n\n return {\n ...acc,\n [camelCase(key)]: param,\n }\n }, {}),\n data: schemas.request?.name\n ? {\n value: schemas.request?.name,\n optional: isOptional(schemas.request?.schema),\n }\n : undefined,\n params: schemas.queryParams?.name\n ? {\n value: schemas.queryParams?.name,\n optional: isOptional(schemas.queryParams?.schema),\n }\n : undefined,\n headers: schemas.headerParams?.name\n ? {\n value: schemas.headerParams?.name,\n optional: isOptional(schemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n })\n}\n\nexport function Server({ name, serverName, serverVersion, operations }: Props): FabricReactNode {\n return (\n <File.Source name={name} isExportable isIndexable>\n <Const name={'server'} export>\n {`\n new McpServer({\n name: '${serverName}',\n version: '${serverVersion}',\n})\n `}\n </Const>\n\n {operations\n .map(({ tool, mcp, zod }) => {\n const paramsClient = getParams({ schemas: zod.schemas })\n\n if (zod.schemas.request?.name || zod.schemas.headerParams?.name || zod.schemas.queryParams?.name || zod.schemas.pathParams?.name) {\n return `\nserver.tool(${JSON.stringify(tool.name)}, ${JSON.stringify(tool.description)}, ${paramsClient.toObjectValue()}, async (${paramsClient.toObject()}) => {\n return ${mcp.name}(${paramsClient.toObject()})\n})\n `\n }\n\n return `\nserver.tool(${JSON.stringify(tool.name)}, ${JSON.stringify(tool.description)}, async () => {\n return ${mcp.name}(${paramsClient.toObject()})\n})\n `\n })\n .filter(Boolean)}\n\n {`\nasync function startServer() {\n try {\n const transport = new StdioServerTransport()\n await server.connect(transport)\n\n } catch (error) {\n console.error('Failed to start server:', error)\n process.exit(1)\n }\n}\n\nstartServer()\n`}\n </File.Source>\n )\n}\n"],"mappings":";;;;;;;;AAoCA,SAAS,UAAU,EAAE,WAA2B;CAC9C,MAAM,aAAa,cAAc,QAAQ,YAAY,EACnD,OAAO,OACR,CAAC;AAEF,QAAO,eAAe,QAAQ,EAC5B,MAAM;EACJ,MAAM;EACN,UAAU;GACR,GAAG,OAAO,QAAQ,WAAW,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;AAC1D,QAAI,SAAS,QAAQ,YAAY,MAAM;KACrC,IAAI,SAAS;AAEb,SAAI,WAAW,QAAQ,WAAW,OAAO,CACvC,KAAI,YAAY,QAAQ,WAAW,CACjC,UAAS;SAET,UAAS;cAGP,YAAY,QAAQ,WAAW,CACjC,UAAS;AAIb,WAAM,QAAQ,GAAG,QAAQ,YAAY,OAAO,OAAO,IAAI,IAAI;;AAG7D,WAAO;KACL,GAAG;MACF,UAAU,IAAI,GAAG;KACnB;MACA,EAAE,CAAC;GACN,MAAM,QAAQ,SAAS,OACnB;IACE,OAAO,QAAQ,SAAS;IACxB,UAAU,WAAW,QAAQ,SAAS,OAAO;IAC9C,GACD;GACJ,QAAQ,QAAQ,aAAa,OACzB;IACE,OAAO,QAAQ,aAAa;IAC5B,UAAU,WAAW,QAAQ,aAAa,OAAO;IAClD,GACD;GACJ,SAAS,QAAQ,cAAc,OAC3B;IACE,OAAO,QAAQ,cAAc;IAC7B,UAAU,WAAW,QAAQ,cAAc,OAAO;IACnD,GACD;GACL;EACF,EACF,CAAC;;AAGJ,SAAgB,OAAO,EAAE,MAAM,YAAY,eAAe,cAAsC;AAC9F,QACE,qBAAC,KAAK;EAAa;EAAM;EAAa;;GACpC,oBAAC;IAAM,MAAM;IAAU;cACpB;;WAEE,WAAW;cACR,cAAc;;;KAGd;GAEP,WACE,KAAK,EAAE,MAAM,KAAK,UAAU;IAC3B,MAAM,eAAe,UAAU,EAAE,SAAS,IAAI,SAAS,CAAC;AAExD,QAAI,IAAI,QAAQ,SAAS,QAAQ,IAAI,QAAQ,cAAc,QAAQ,IAAI,QAAQ,aAAa,QAAQ,IAAI,QAAQ,YAAY,KAC1H,QAAO;cACL,KAAK,UAAU,KAAK,KAAK,CAAC,IAAI,KAAK,UAAU,KAAK,YAAY,CAAC,IAAI,aAAa,eAAe,CAAC,WAAW,aAAa,UAAU,CAAC;WACtI,IAAI,KAAK,GAAG,aAAa,UAAU,CAAC;;;AAKrC,WAAO;cACH,KAAK,UAAU,KAAK,KAAK,CAAC,IAAI,KAAK,UAAU,KAAK,YAAY,CAAC;WAClE,IAAI,KAAK,GAAG,aAAa,UAAU,CAAC;;;KAGrC,CACD,OAAO,QAAQ;GAEjB;;;;;;;;;;;;;;;GAcW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Server-DblKyNZ0.cjs","names":["FunctionParams","File","Const"],"sources":["../src/components/Server.tsx"],"sourcesContent":["import { camelCase } from '@kubb/core/transformers'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { isNullable, isReference } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams, isOptional } from '@kubb/plugin-oas/utils'\nimport { Const, File, FunctionParams } from '@kubb/react-fabric'\nimport type {
|
|
1
|
+
{"version":3,"file":"Server-DblKyNZ0.cjs","names":["FunctionParams","File","Const"],"sources":["../src/components/Server.tsx"],"sourcesContent":["import { camelCase } from '@kubb/core/transformers'\nimport type { KubbFile } from '@kubb/fabric-core/types'\nimport { isNullable, isReference } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams, isOptional } from '@kubb/plugin-oas/utils'\nimport { Const, File, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\n\ntype Props = {\n name: string\n serverName: string\n serverVersion: string\n operations: Array<{\n tool: {\n name: string\n description: string\n }\n mcp: {\n name: string\n file: KubbFile.File\n }\n zod: {\n name: string\n file: KubbFile.File\n schemas: OperationSchemas\n }\n type: {\n schemas: OperationSchemas\n }\n }>\n}\n\ntype GetParamsProps = {\n schemas: OperationSchemas\n}\n\nfunction getParams({ schemas }: GetParamsProps) {\n const pathParams = getPathParams(schemas.pathParams, {\n typed: false,\n })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...Object.entries(pathParams).reduce((acc, [key, param]) => {\n if (param && schemas.pathParams?.name) {\n let suffix = '.shape'\n\n if (isNullable(schemas.pathParams.schema)) {\n if (isReference(schemas.pathParams)) {\n suffix = '.unwrap().schema.unwrap().shape'\n } else {\n suffix = '.unwrap().shape'\n }\n } else {\n if (isReference(schemas.pathParams)) {\n suffix = '.schema.shape'\n }\n }\n\n param.value = `${schemas.pathParams?.name}${suffix}['${key}']`\n }\n\n return {\n ...acc,\n [camelCase(key)]: param,\n }\n }, {}),\n data: schemas.request?.name\n ? {\n value: schemas.request?.name,\n optional: isOptional(schemas.request?.schema),\n }\n : undefined,\n params: schemas.queryParams?.name\n ? {\n value: schemas.queryParams?.name,\n optional: isOptional(schemas.queryParams?.schema),\n }\n : undefined,\n headers: schemas.headerParams?.name\n ? {\n value: schemas.headerParams?.name,\n optional: isOptional(schemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n })\n}\n\nexport function Server({ name, serverName, serverVersion, operations }: Props): FabricReactNode {\n return (\n <File.Source name={name} isExportable isIndexable>\n <Const name={'server'} export>\n {`\n new McpServer({\n name: '${serverName}',\n version: '${serverVersion}',\n})\n `}\n </Const>\n\n {operations\n .map(({ tool, mcp, zod }) => {\n const paramsClient = getParams({ schemas: zod.schemas })\n\n if (zod.schemas.request?.name || zod.schemas.headerParams?.name || zod.schemas.queryParams?.name || zod.schemas.pathParams?.name) {\n return `\nserver.tool(${JSON.stringify(tool.name)}, ${JSON.stringify(tool.description)}, ${paramsClient.toObjectValue()}, async (${paramsClient.toObject()}) => {\n return ${mcp.name}(${paramsClient.toObject()})\n})\n `\n }\n\n return `\nserver.tool(${JSON.stringify(tool.name)}, ${JSON.stringify(tool.description)}, async () => {\n return ${mcp.name}(${paramsClient.toObject()})\n})\n `\n })\n .filter(Boolean)}\n\n {`\nasync function startServer() {\n try {\n const transport = new StdioServerTransport()\n await server.connect(transport)\n\n } catch (error) {\n console.error('Failed to start server:', error)\n process.exit(1)\n }\n}\n\nstartServer()\n`}\n </File.Source>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAS,UAAU,EAAE,WAA2B;CAC9C,MAAM,uDAA2B,QAAQ,YAAY,EACnD,OAAO,OACR,CAAC;AAEF,QAAOA,kCAAe,QAAQ,EAC5B,MAAM;EACJ,MAAM;EACN,UAAU;GACR,GAAG,OAAO,QAAQ,WAAW,CAAC,QAAQ,KAAK,CAAC,KAAK,WAAW;AAC1D,QAAI,SAAS,QAAQ,YAAY,MAAM;KACrC,IAAI,SAAS;AAEb,mCAAe,QAAQ,WAAW,OAAO,CACvC,gCAAgB,QAAQ,WAAW,CACjC,UAAS;SAET,UAAS;yCAGK,QAAQ,WAAW,CACjC,UAAS;AAIb,WAAM,QAAQ,GAAG,QAAQ,YAAY,OAAO,OAAO,IAAI,IAAI;;AAG7D,WAAO;KACL,GAAG;6CACQ,IAAI,GAAG;KACnB;MACA,EAAE,CAAC;GACN,MAAM,QAAQ,SAAS,OACnB;IACE,OAAO,QAAQ,SAAS;IACxB,iDAAqB,QAAQ,SAAS,OAAO;IAC9C,GACD;GACJ,QAAQ,QAAQ,aAAa,OACzB;IACE,OAAO,QAAQ,aAAa;IAC5B,iDAAqB,QAAQ,aAAa,OAAO;IAClD,GACD;GACJ,SAAS,QAAQ,cAAc,OAC3B;IACE,OAAO,QAAQ,cAAc;IAC7B,iDAAqB,QAAQ,cAAc,OAAO;IACnD,GACD;GACL;EACF,EACF,CAAC;;AAGJ,SAAgB,OAAO,EAAE,MAAM,YAAY,eAAe,cAAsC;AAC9F,QACE,yDAACC,wBAAK;EAAa;EAAM;EAAa;;GACpC,wDAACC;IAAM,MAAM;IAAU;cACpB;;WAEE,WAAW;cACR,cAAc;;;KAGd;GAEP,WACE,KAAK,EAAE,MAAM,KAAK,UAAU;IAC3B,MAAM,eAAe,UAAU,EAAE,SAAS,IAAI,SAAS,CAAC;AAExD,QAAI,IAAI,QAAQ,SAAS,QAAQ,IAAI,QAAQ,cAAc,QAAQ,IAAI,QAAQ,aAAa,QAAQ,IAAI,QAAQ,YAAY,KAC1H,QAAO;cACL,KAAK,UAAU,KAAK,KAAK,CAAC,IAAI,KAAK,UAAU,KAAK,YAAY,CAAC,IAAI,aAAa,eAAe,CAAC,WAAW,aAAa,UAAU,CAAC;WACtI,IAAI,KAAK,GAAG,aAAa,UAAU,CAAC;;;AAKrC,WAAO;cACH,KAAK,UAAU,KAAK,KAAK,CAAC,IAAI,KAAK,UAAU,KAAK,YAAY,CAAC;WAClE,IAAI,KAAK,GAAG,aAAa,UAAU,CAAC;;;KAGrC,CACD,OAAO,QAAQ;GAEjB;;;;;;;;;;;;;;;GAcW"}
|
package/dist/components.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as OperationSchemas, h as __name } from "./index-
|
|
1
|
+
import { a as OperationSchemas, h as __name } from "./index-CGe1JmIp.cjs";
|
|
2
2
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
3
|
-
import {
|
|
3
|
+
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Server.d.ts
|
|
6
6
|
type Props = {
|
|
@@ -31,7 +31,7 @@ declare function Server({
|
|
|
31
31
|
serverName,
|
|
32
32
|
serverVersion,
|
|
33
33
|
operations
|
|
34
|
-
}: Props):
|
|
34
|
+
}: Props): FabricReactNode;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { Server };
|
|
37
37
|
//# sourceMappingURL=components.d.cts.map
|
package/dist/components.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __name } from "./chunk-eQyhnF5A.js";
|
|
2
|
-
import { a as OperationSchemas } from "./index-
|
|
2
|
+
import { a as OperationSchemas } from "./index-D9FArzes.js";
|
|
3
3
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
4
|
-
import {
|
|
4
|
+
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Server.d.ts
|
|
7
7
|
type Props = {
|
|
@@ -32,7 +32,7 @@ declare function Server({
|
|
|
32
32
|
serverName,
|
|
33
33
|
serverVersion,
|
|
34
34
|
operations
|
|
35
|
-
}: Props):
|
|
35
|
+
}: Props): FabricReactNode;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { Server };
|
|
38
38
|
//# sourceMappingURL=components.d.ts.map
|
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-CGe1JmIp.cjs";
|
|
2
|
+
import { n as PluginMcp } from "./types-1i7hEdhc.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-D9FArzes.js";
|
|
3
|
+
import { n as PluginMcp } from "./types-BpFIHuV_.js";
|
|
4
4
|
|
|
5
5
|
//#region src/generators/mcpGenerator.d.ts
|
|
6
6
|
declare const mcpGenerator: ReactGenerator<PluginMcp>;
|
|
@@ -4,7 +4,7 @@ import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
|
4
4
|
import BaseOas from "oas";
|
|
5
5
|
import { Operation } from "oas/operation";
|
|
6
6
|
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
7
|
-
import {
|
|
7
|
+
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
8
8
|
|
|
9
9
|
//#region rolldown:runtime
|
|
10
10
|
//#endregion
|
|
@@ -1165,9 +1165,9 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
|
|
|
1165
1165
|
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
1166
1166
|
name: string;
|
|
1167
1167
|
type: 'react';
|
|
1168
|
-
Operations: (props: OperationsProps<TOptions>) =>
|
|
1169
|
-
Operation: (props: OperationProps<TOptions>) =>
|
|
1170
|
-
Schema: (props: SchemaProps<TOptions>) =>
|
|
1168
|
+
Operations: (props: OperationsProps<TOptions>) => FabricReactNode;
|
|
1169
|
+
Operation: (props: OperationProps<TOptions>) => FabricReactNode;
|
|
1170
|
+
Schema: (props: SchemaProps<TOptions>) => FabricReactNode;
|
|
1171
1171
|
};
|
|
1172
1172
|
//#endregion
|
|
1173
1173
|
//#region ../plugin-oas/src/generators/types.d.ts
|
|
@@ -1205,4 +1205,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
|
1205
1205
|
};
|
|
1206
1206
|
//#endregion
|
|
1207
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 };
|
|
1208
|
-
//# sourceMappingURL=index-
|
|
1208
|
+
//# sourceMappingURL=index-CGe1JmIp.d.cts.map
|
|
@@ -5,7 +5,7 @@ import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
|
5
5
|
import BaseOas from "oas";
|
|
6
6
|
import { Operation } from "oas/operation";
|
|
7
7
|
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
8
|
-
import {
|
|
8
|
+
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
9
9
|
|
|
10
10
|
//#region ../core/src/BaseGenerator.d.ts
|
|
11
11
|
/**
|
|
@@ -1164,9 +1164,9 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
|
|
|
1164
1164
|
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
1165
1165
|
name: string;
|
|
1166
1166
|
type: 'react';
|
|
1167
|
-
Operations: (props: OperationsProps<TOptions>) =>
|
|
1168
|
-
Operation: (props: OperationProps<TOptions>) =>
|
|
1169
|
-
Schema: (props: SchemaProps<TOptions>) =>
|
|
1167
|
+
Operations: (props: OperationsProps<TOptions>) => FabricReactNode;
|
|
1168
|
+
Operation: (props: OperationProps<TOptions>) => FabricReactNode;
|
|
1169
|
+
Schema: (props: SchemaProps<TOptions>) => FabricReactNode;
|
|
1170
1170
|
};
|
|
1171
1171
|
//#endregion
|
|
1172
1172
|
//#region ../plugin-oas/src/generators/types.d.ts
|
|
@@ -1204,4 +1204,4 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
|
1204
1204
|
};
|
|
1205
1205
|
//#endregion
|
|
1206
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 };
|
|
1207
|
-
//# sourceMappingURL=index-
|
|
1207
|
+
//# sourceMappingURL=index-D9FArzes.d.ts.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-CGe1JmIp.cjs";
|
|
2
|
+
import { n as PluginMcp, t as Options } from "./types-1i7hEdhc.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-D9FArzes.js";
|
|
3
|
+
import { n as PluginMcp, t as Options } from "./types-BpFIHuV_.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-CGe1JmIp.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-1i7hEdhc.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-D9FArzes.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-BpFIHuV_.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.20.0",
|
|
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.12.
|
|
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.
|
|
72
|
+
"@kubb/react-fabric": "0.12.7",
|
|
73
|
+
"@kubb/core": "4.20.0",
|
|
74
|
+
"@kubb/oas": "4.20.0",
|
|
75
|
+
"@kubb/plugin-client": "4.20.0",
|
|
76
|
+
"@kubb/plugin-oas": "4.20.0",
|
|
77
|
+
"@kubb/plugin-ts": "4.20.0",
|
|
78
|
+
"@kubb/plugin-zod": "4.20.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {},
|
|
81
81
|
"engines": {
|
|
@@ -4,7 +4,7 @@ import { isNullable, isReference } from '@kubb/oas'
|
|
|
4
4
|
import type { OperationSchemas } from '@kubb/plugin-oas'
|
|
5
5
|
import { getPathParams, isOptional } from '@kubb/plugin-oas/utils'
|
|
6
6
|
import { Const, File, FunctionParams } from '@kubb/react-fabric'
|
|
7
|
-
import type {
|
|
7
|
+
import type { FabricReactNode } from '@kubb/react-fabric/types'
|
|
8
8
|
|
|
9
9
|
type Props = {
|
|
10
10
|
name: string
|
|
@@ -90,7 +90,7 @@ function getParams({ schemas }: GetParamsProps) {
|
|
|
90
90
|
})
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
export function Server({ name, serverName, serverVersion, operations }: Props):
|
|
93
|
+
export function Server({ name, serverName, serverVersion, operations }: Props): FabricReactNode {
|
|
94
94
|
return (
|
|
95
95
|
<File.Source name={name} isExportable isIndexable>
|
|
96
96
|
<Const name={'server'} export>
|