@kubb/plugin-mcp 3.16.2 → 3.16.4
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/OperationGenerator-BMJ9Szu5.d.cts +1111 -0
- package/dist/OperationGenerator-D1X1O_-A.d.ts +1111 -0
- package/dist/Server-BX80OVzu.js +90 -0
- package/dist/Server-BX80OVzu.js.map +1 -0
- package/dist/Server-Bh-nULhJ.cjs +124 -0
- package/dist/Server-Bh-nULhJ.cjs.map +1 -0
- package/dist/components.cjs +2 -11
- package/dist/components.d.cts +31 -25
- package/dist/components.d.ts +31 -25
- package/dist/components.js +3 -3
- package/dist/generators-CFdUB1k-.js +225 -0
- package/dist/generators-CFdUB1k-.js.map +1 -0
- package/dist/generators-UZiEnnoX.cjs +236 -0
- package/dist/generators-UZiEnnoX.cjs.map +1 -0
- package/dist/generators.cjs +4 -16
- package/dist/generators.d.cts +9 -9
- package/dist/generators.d.ts +9 -9
- package/dist/generators.js +4 -4
- package/dist/index.cjs +82 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +82 -95
- package/dist/index.js.map +1 -1
- package/dist/types-DLgrsgaK.d.ts +168 -0
- package/dist/types-Dg5mHzgC.d.cts +168 -0
- package/package.json +20 -35
- package/dist/chunk-JTYWPGT3.js +0 -178
- package/dist/chunk-JTYWPGT3.js.map +0 -1
- package/dist/chunk-MTZE6GGJ.cjs +0 -181
- package/dist/chunk-MTZE6GGJ.cjs.map +0 -1
- package/dist/chunk-ODMTYF4L.cjs +0 -97
- package/dist/chunk-ODMTYF4L.cjs.map +0 -1
- package/dist/chunk-YP4TIQ5F.js +0 -95
- package/dist/chunk-YP4TIQ5F.js.map +0 -1
- package/dist/components.cjs.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/generators.cjs.map +0 -1
- package/dist/generators.js.map +0 -1
- package/dist/types-B4DlUSkU.d.cts +0 -54
- package/dist/types-B4DlUSkU.d.ts +0 -54
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
const require_Server = require('./Server-Bh-nULhJ.cjs');
|
|
2
|
+
const __kubb_plugin_oas = require_Server.__toESM(require("@kubb/plugin-oas"));
|
|
3
|
+
const __kubb_plugin_ts = require_Server.__toESM(require("@kubb/plugin-ts"));
|
|
4
|
+
const __kubb_plugin_oas_hooks = require_Server.__toESM(require("@kubb/plugin-oas/hooks"));
|
|
5
|
+
const __kubb_plugin_oas_utils = require_Server.__toESM(require("@kubb/plugin-oas/utils"));
|
|
6
|
+
const __kubb_react = require_Server.__toESM(require("@kubb/react"));
|
|
7
|
+
const __kubb_plugin_client_components = require_Server.__toESM(require("@kubb/plugin-client/components"));
|
|
8
|
+
const __kubb_react_jsx_runtime = require_Server.__toESM(require("@kubb/react/jsx-runtime"));
|
|
9
|
+
const __kubb_plugin_zod = require_Server.__toESM(require("@kubb/plugin-zod"));
|
|
10
|
+
|
|
11
|
+
//#region src/generators/mcpGenerator.tsx
|
|
12
|
+
const mcpGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
13
|
+
name: "mcp",
|
|
14
|
+
Operation({ operation }) {
|
|
15
|
+
const { plugin: { options } } = (0, __kubb_react.useApp)();
|
|
16
|
+
const oas = (0, __kubb_plugin_oas_hooks.useOas)();
|
|
17
|
+
const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
|
|
18
|
+
const mcp = {
|
|
19
|
+
name: getName(operation, {
|
|
20
|
+
type: "function",
|
|
21
|
+
suffix: "handler"
|
|
22
|
+
}),
|
|
23
|
+
file: getFile(operation)
|
|
24
|
+
};
|
|
25
|
+
const type = {
|
|
26
|
+
file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
|
|
27
|
+
schemas: getSchemas(operation, {
|
|
28
|
+
pluginKey: [__kubb_plugin_ts.pluginTsName],
|
|
29
|
+
type: "type"
|
|
30
|
+
})
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react.File, {
|
|
33
|
+
baseName: mcp.file.baseName,
|
|
34
|
+
path: mcp.file.path,
|
|
35
|
+
meta: mcp.file.meta,
|
|
36
|
+
banner: (0, __kubb_plugin_oas_utils.getBanner)({
|
|
37
|
+
oas,
|
|
38
|
+
output: options.output
|
|
39
|
+
}),
|
|
40
|
+
footer: (0, __kubb_plugin_oas_utils.getFooter)({
|
|
41
|
+
oas,
|
|
42
|
+
output: options.output
|
|
43
|
+
}),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
46
|
+
name: ["CallToolResult"],
|
|
47
|
+
path: "@modelcontextprotocol/sdk/types",
|
|
48
|
+
isTypeOnly: true
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
51
|
+
name: "fetch",
|
|
52
|
+
path: options.client.importPath
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
55
|
+
name: ["RequestConfig", "ResponseErrorConfig"],
|
|
56
|
+
path: options.client.importPath,
|
|
57
|
+
isTypeOnly: true
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
60
|
+
name: [
|
|
61
|
+
type.schemas.request?.name,
|
|
62
|
+
type.schemas.response.name,
|
|
63
|
+
type.schemas.pathParams?.name,
|
|
64
|
+
type.schemas.queryParams?.name,
|
|
65
|
+
type.schemas.headerParams?.name,
|
|
66
|
+
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
67
|
+
].filter(Boolean),
|
|
68
|
+
root: mcp.file.path,
|
|
69
|
+
path: type.file.path,
|
|
70
|
+
isTypeOnly: true
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_plugin_client_components.Client, {
|
|
73
|
+
name: mcp.name,
|
|
74
|
+
isConfigurable: false,
|
|
75
|
+
returnType: "Promise<CallToolResult>",
|
|
76
|
+
baseURL: options.client.baseURL,
|
|
77
|
+
operation,
|
|
78
|
+
typeSchemas: type.schemas,
|
|
79
|
+
zodSchemas: void 0,
|
|
80
|
+
dataReturnType: options.client.dataReturnType,
|
|
81
|
+
paramsType: "object",
|
|
82
|
+
paramsCasing: "camelcase",
|
|
83
|
+
pathParamsType: "object",
|
|
84
|
+
parser: "client",
|
|
85
|
+
children: [options.client.dataReturnType === "data" && `return {
|
|
86
|
+
content: [
|
|
87
|
+
{
|
|
88
|
+
type: 'text',
|
|
89
|
+
text: JSON.stringify(res.data)
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}`, options.client.dataReturnType === "full" && `return {
|
|
93
|
+
content: [
|
|
94
|
+
{
|
|
95
|
+
type: 'text',
|
|
96
|
+
text: JSON.stringify(res)
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}`]
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/generators/serverGenerator.tsx
|
|
108
|
+
const serverGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
109
|
+
name: "operations",
|
|
110
|
+
Operations({ operations, options }) {
|
|
111
|
+
const { pluginManager, plugin } = (0, __kubb_react.useApp)();
|
|
112
|
+
const oas = (0, __kubb_plugin_oas_hooks.useOas)();
|
|
113
|
+
const { getFile, getName, getSchemas } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
|
|
114
|
+
const name = "server";
|
|
115
|
+
const file = pluginManager.getFile({
|
|
116
|
+
name,
|
|
117
|
+
extname: ".ts",
|
|
118
|
+
pluginKey: plugin.key
|
|
119
|
+
});
|
|
120
|
+
const jsonFile = pluginManager.getFile({
|
|
121
|
+
name: ".mcp",
|
|
122
|
+
extname: ".json",
|
|
123
|
+
pluginKey: plugin.key
|
|
124
|
+
});
|
|
125
|
+
const operationsMapped = operations.map((operation) => {
|
|
126
|
+
return {
|
|
127
|
+
tool: {
|
|
128
|
+
name: operation.getOperationId() || operation.getSummary() || `${operation.method.toUpperCase()} ${operation.path}`,
|
|
129
|
+
description: operation.getDescription() || `Make a ${operation.method.toUpperCase()} request to ${operation.path}`
|
|
130
|
+
},
|
|
131
|
+
mcp: {
|
|
132
|
+
name: getName(operation, {
|
|
133
|
+
type: "function",
|
|
134
|
+
suffix: "handler"
|
|
135
|
+
}),
|
|
136
|
+
file: getFile(operation)
|
|
137
|
+
},
|
|
138
|
+
zod: {
|
|
139
|
+
name: getName(operation, {
|
|
140
|
+
type: "function",
|
|
141
|
+
pluginKey: [__kubb_plugin_zod.pluginZodName]
|
|
142
|
+
}),
|
|
143
|
+
schemas: getSchemas(operation, {
|
|
144
|
+
pluginKey: [__kubb_plugin_zod.pluginZodName],
|
|
145
|
+
type: "function"
|
|
146
|
+
}),
|
|
147
|
+
file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] })
|
|
148
|
+
},
|
|
149
|
+
type: { schemas: getSchemas(operation, {
|
|
150
|
+
pluginKey: [__kubb_plugin_ts.pluginTsName],
|
|
151
|
+
type: "type"
|
|
152
|
+
}) }
|
|
153
|
+
};
|
|
154
|
+
});
|
|
155
|
+
const imports = operationsMapped.flatMap(({ mcp, zod }) => {
|
|
156
|
+
return [/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
157
|
+
name: [mcp.name],
|
|
158
|
+
root: file.path,
|
|
159
|
+
path: mcp.file.path
|
|
160
|
+
}, mcp.name), /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
161
|
+
name: [
|
|
162
|
+
zod.schemas.request?.name,
|
|
163
|
+
zod.schemas.pathParams?.name,
|
|
164
|
+
zod.schemas.queryParams?.name,
|
|
165
|
+
zod.schemas.headerParams?.name
|
|
166
|
+
].filter(Boolean),
|
|
167
|
+
root: file.path,
|
|
168
|
+
path: zod.file.path
|
|
169
|
+
}, zod.name)];
|
|
170
|
+
});
|
|
171
|
+
return /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react.File, {
|
|
172
|
+
baseName: file.baseName,
|
|
173
|
+
path: file.path,
|
|
174
|
+
meta: file.meta,
|
|
175
|
+
banner: (0, __kubb_plugin_oas_utils.getBanner)({
|
|
176
|
+
oas,
|
|
177
|
+
output: options.output,
|
|
178
|
+
config: pluginManager.config
|
|
179
|
+
}),
|
|
180
|
+
footer: (0, __kubb_plugin_oas_utils.getFooter)({
|
|
181
|
+
oas,
|
|
182
|
+
output: options.output
|
|
183
|
+
}),
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
186
|
+
name: ["McpServer"],
|
|
187
|
+
path: "@modelcontextprotocol/sdk/server/mcp"
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
|
|
190
|
+
name: ["StdioServerTransport"],
|
|
191
|
+
path: "@modelcontextprotocol/sdk/server/stdio"
|
|
192
|
+
}),
|
|
193
|
+
imports,
|
|
194
|
+
/* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(require_Server.Server, {
|
|
195
|
+
name,
|
|
196
|
+
serverName: oas.api.info?.title,
|
|
197
|
+
serverVersion: oas.getVersion(),
|
|
198
|
+
operations: operationsMapped
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
}), /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File, {
|
|
202
|
+
baseName: jsonFile.baseName,
|
|
203
|
+
path: jsonFile.path,
|
|
204
|
+
meta: jsonFile.meta,
|
|
205
|
+
children: /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Source, {
|
|
206
|
+
name,
|
|
207
|
+
children: `
|
|
208
|
+
{
|
|
209
|
+
"mcpServers": {
|
|
210
|
+
"${oas.api.info?.title || "server"}": {
|
|
211
|
+
"type": "stdio",
|
|
212
|
+
"command": "npx",
|
|
213
|
+
"args": ["tsx", "${file.path}"]
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`
|
|
218
|
+
})
|
|
219
|
+
})] });
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
//#endregion
|
|
224
|
+
Object.defineProperty(exports, 'mcpGenerator', {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function () {
|
|
227
|
+
return mcpGenerator;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
Object.defineProperty(exports, 'serverGenerator', {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function () {
|
|
233
|
+
return serverGenerator;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
//# sourceMappingURL=generators-UZiEnnoX.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-UZiEnnoX.cjs","names":["pluginTsName","File","Client","pluginZodName","pluginTsName","File","Server"],"sources":["../src/generators/mcpGenerator.tsx","../src/generators/serverGenerator.tsx"],"sourcesContent":["import { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, useApp } from '@kubb/react'\nimport type { PluginMcp } from '../types'\nimport { Client } from '@kubb/plugin-client/components'\n\nexport const mcpGenerator = createReactGenerator<PluginMcp>({\n name: 'mcp',\n Operation({ operation }) {\n const {\n plugin: { options },\n } = useApp<PluginMcp>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const mcp = {\n name: getName(operation, { type: 'function', suffix: 'handler' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n return (\n <File\n baseName={mcp.file.baseName}\n path={mcp.file.path}\n meta={mcp.file.meta}\n banner={getBanner({ oas, output: options.output })}\n footer={getFooter({ oas, output: options.output })}\n >\n <File.Import name={['CallToolResult']} path={'@modelcontextprotocol/sdk/types'} isTypeOnly />\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mcp.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Client\n name={mcp.name}\n isConfigurable={false}\n returnType={'Promise<CallToolResult>'}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={undefined}\n dataReturnType={options.client.dataReturnType}\n paramsType={'object'}\n paramsCasing={'camelcase'}\n pathParamsType={'object'}\n parser={'client'}\n >\n {options.client.dataReturnType === 'data' &&\n `return {\n content: [\n {\n type: 'text',\n text: JSON.stringify(res.data)\n }\n ]\n }`}\n {options.client.dataReturnType === 'full' &&\n `return {\n content: [\n {\n type: 'text',\n text: JSON.stringify(res)\n }\n ]\n }`}\n </Client>\n </File>\n )\n },\n})\n","import { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, useApp } from '@kubb/react'\nimport { Server } from '../components/Server'\nimport type { PluginMcp } from '../types'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { pluginTsName } from '@kubb/plugin-ts'\n\nexport const serverGenerator = createReactGenerator<PluginMcp>({\n name: 'operations',\n Operations({ operations, options }) {\n const { pluginManager, plugin } = useApp<PluginMcp>()\n const oas = useOas()\n const { getFile, getName, getSchemas } = useOperationManager()\n\n const name = 'server'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey: plugin.key })\n\n const jsonFile = pluginManager.getFile({ name: '.mcp', extname: '.json', pluginKey: plugin.key })\n\n const operationsMapped = operations.map((operation) => {\n return {\n tool: {\n name: operation.getOperationId() || operation.getSummary() || `${operation.method.toUpperCase()} ${operation.path}`,\n description: operation.getDescription() || `Make a ${operation.method.toUpperCase()} request to ${operation.path}`,\n },\n mcp: {\n name: getName(operation, {\n type: 'function',\n suffix: 'handler',\n }),\n file: getFile(operation),\n },\n zod: {\n name: getName(operation, {\n type: 'function',\n pluginKey: [pluginZodName],\n }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n },\n type: {\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n },\n }\n })\n\n const imports = operationsMapped.flatMap(({ mcp, zod }) => {\n return [\n <File.Import key={mcp.name} name={[mcp.name]} root={file.path} path={mcp.file.path} />,\n <File.Import\n key={zod.name}\n name={[zod.schemas.request?.name, zod.schemas.pathParams?.name, zod.schemas.queryParams?.name, zod.schemas.headerParams?.name].filter(Boolean)}\n root={file.path}\n path={zod.file.path}\n />,\n ]\n })\n\n return (\n <>\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output, config: pluginManager.config })}\n footer={getFooter({ oas, output: options.output })}\n >\n <File.Import name={['McpServer']} path={'@modelcontextprotocol/sdk/server/mcp'} />\n <File.Import name={['StdioServerTransport']} path={'@modelcontextprotocol/sdk/server/stdio'} />\n\n {imports}\n <Server name={name} serverName={oas.api.info?.title} serverVersion={oas.getVersion()} operations={operationsMapped} />\n </File>\n\n <File baseName={jsonFile.baseName} path={jsonFile.path} meta={jsonFile.meta}>\n <File.Source name={name}>\n {`\n {\n \"mcpServers\": {\n \"${oas.api.info?.title || 'server'}\": {\n \"type\": \"stdio\",\n \"command\": \"npx\",\n \"args\": [\"tsx\", \"${file.path}\"]\n }\n }\n }\n `}\n </File.Source>\n </File>\n </>\n )\n },\n})\n"],"mappings":"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"}
|
package/dist/generators.cjs
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
'
|
|
1
|
+
require('./Server-Bh-nULhJ.cjs');
|
|
2
|
+
const require_generators = require('./generators-UZiEnnoX.cjs');
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "mcpGenerator", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function () { return chunkMTZE6GGJ_cjs.mcpGenerator; }
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "serverGenerator", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return chunkMTZE6GGJ_cjs.serverGenerator; }
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=generators.cjs.map
|
|
17
|
-
//# sourceMappingURL=generators.cjs.map
|
|
4
|
+
exports.mcpGenerator = require_generators.mcpGenerator;
|
|
5
|
+
exports.serverGenerator = require_generators.serverGenerator;
|
package/dist/generators.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '@kubb/core';
|
|
4
|
-
import '@kubb/oas';
|
|
5
|
-
import '@kubb/plugin-client';
|
|
6
|
-
|
|
7
|
-
declare const mcpGenerator: _kubb_plugin_oas.Generator<PluginMcp>;
|
|
8
|
-
|
|
9
|
-
declare const serverGenerator: _kubb_plugin_oas.Generator<PluginMcp>;
|
|
1
|
+
import { Generator } from "./OperationGenerator-BMJ9Szu5.cjs";
|
|
2
|
+
import { PluginMcp } from "./types-Dg5mHzgC.cjs";
|
|
10
3
|
|
|
4
|
+
//#region src/generators/mcpGenerator.d.ts
|
|
5
|
+
declare const mcpGenerator: Generator<PluginMcp>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/generators/serverGenerator.d.ts
|
|
8
|
+
declare const serverGenerator: Generator<PluginMcp>;
|
|
9
|
+
//#endregion
|
|
11
10
|
export { mcpGenerator, serverGenerator };
|
|
11
|
+
//# sourceMappingURL=generators.d.cts.map
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '@kubb/core';
|
|
4
|
-
import '@kubb/oas';
|
|
5
|
-
import '@kubb/plugin-client';
|
|
6
|
-
|
|
7
|
-
declare const mcpGenerator: _kubb_plugin_oas.Generator<PluginMcp>;
|
|
8
|
-
|
|
9
|
-
declare const serverGenerator: _kubb_plugin_oas.Generator<PluginMcp>;
|
|
1
|
+
import { Generator } from "./OperationGenerator-D1X1O_-A.js";
|
|
2
|
+
import { PluginMcp } from "./types-DLgrsgaK.js";
|
|
10
3
|
|
|
4
|
+
//#region src/generators/mcpGenerator.d.ts
|
|
5
|
+
declare const mcpGenerator: Generator<PluginMcp>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/generators/serverGenerator.d.ts
|
|
8
|
+
declare const serverGenerator: Generator<PluginMcp>;
|
|
9
|
+
//#endregion
|
|
11
10
|
export { mcpGenerator, serverGenerator };
|
|
11
|
+
//# sourceMappingURL=generators.d.ts.map
|
package/dist/generators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { mcpGenerator, serverGenerator } from "./generators-CFdUB1k-.js";
|
|
2
|
+
import "./Server-BX80OVzu.js";
|
|
3
|
+
|
|
4
|
+
export { mcpGenerator, serverGenerator };
|
package/dist/index.cjs
CHANGED
|
@@ -1,107 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
const require_Server = require('./Server-Bh-nULhJ.cjs');
|
|
2
|
+
const require_generators = require('./generators-UZiEnnoX.cjs');
|
|
3
|
+
const node_path = require_Server.__toESM(require("node:path"));
|
|
4
|
+
const __kubb_core = require_Server.__toESM(require("@kubb/core"));
|
|
5
|
+
const __kubb_core_transformers = require_Server.__toESM(require("@kubb/core/transformers"));
|
|
6
|
+
const __kubb_plugin_oas = require_Server.__toESM(require("@kubb/plugin-oas"));
|
|
7
|
+
const __kubb_plugin_ts = require_Server.__toESM(require("@kubb/plugin-ts"));
|
|
8
|
+
const __kubb_plugin_zod = require_Server.__toESM(require("@kubb/plugin-zod"));
|
|
2
9
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const root = path__default.default.resolve(this.config.root, this.config.output.path);
|
|
77
|
-
const mode = core.FileManager.getMode(path__default.default.resolve(root, output.path));
|
|
78
|
-
const operationGenerator = new pluginOas.OperationGenerator(this.plugin.options, {
|
|
79
|
-
oas,
|
|
80
|
-
pluginManager: this.pluginManager,
|
|
81
|
-
plugin: this.plugin,
|
|
82
|
-
contentType,
|
|
83
|
-
exclude,
|
|
84
|
-
include,
|
|
85
|
-
override,
|
|
86
|
-
mode
|
|
87
|
-
});
|
|
88
|
-
const files = await operationGenerator.build(...generators);
|
|
89
|
-
await this.addFile(...files);
|
|
90
|
-
const barrelFiles = await this.fileManager.getBarrelFiles({
|
|
91
|
-
type: output.barrelType ?? "named",
|
|
92
|
-
root,
|
|
93
|
-
output,
|
|
94
|
-
meta: {
|
|
95
|
-
pluginKey: this.plugin.key
|
|
96
|
-
},
|
|
97
|
-
logger: this.logger
|
|
98
|
-
});
|
|
99
|
-
await this.addFile(...barrelFiles);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
10
|
+
//#region src/plugin.ts
|
|
11
|
+
const pluginMcpName = "plugin-mcp";
|
|
12
|
+
const pluginMcp = (0, __kubb_core.createPlugin)((options) => {
|
|
13
|
+
const { output = {
|
|
14
|
+
path: "mcp",
|
|
15
|
+
barrelType: "named"
|
|
16
|
+
}, group, exclude = [], include, override = [], transformers = {}, generators = [require_generators.mcpGenerator, require_generators.serverGenerator].filter(Boolean), contentType } = options;
|
|
17
|
+
return {
|
|
18
|
+
name: pluginMcpName,
|
|
19
|
+
options: {
|
|
20
|
+
output,
|
|
21
|
+
group,
|
|
22
|
+
client: {
|
|
23
|
+
importPath: "@kubb/plugin-client/clients/axios",
|
|
24
|
+
dataReturnType: "data",
|
|
25
|
+
...options.client
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
pre: [
|
|
29
|
+
__kubb_plugin_oas.pluginOasName,
|
|
30
|
+
__kubb_plugin_ts.pluginTsName,
|
|
31
|
+
__kubb_plugin_zod.pluginZodName
|
|
32
|
+
].filter(Boolean),
|
|
33
|
+
resolvePath(baseName, pathMode, options$1) {
|
|
34
|
+
const root = node_path.default.resolve(this.config.root, this.config.output.path);
|
|
35
|
+
const mode = pathMode ?? __kubb_core.FileManager.getMode(node_path.default.resolve(root, output.path));
|
|
36
|
+
if (mode === "single")
|
|
37
|
+
/**
|
|
38
|
+
* when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend
|
|
39
|
+
* Other plugins then need to call addOrAppend instead of just add from the fileManager class
|
|
40
|
+
*/
|
|
41
|
+
return node_path.default.resolve(root, output.path);
|
|
42
|
+
if (group && (options$1?.group?.path || options$1?.group?.tag)) {
|
|
43
|
+
const groupName = group?.name ? group.name : (ctx) => {
|
|
44
|
+
if (group?.type === "path") return `${ctx.group.split("/")[1]}`;
|
|
45
|
+
return `${(0, __kubb_core_transformers.camelCase)(ctx.group)}Requests`;
|
|
46
|
+
};
|
|
47
|
+
return node_path.default.resolve(root, output.path, groupName({ group: group.type === "path" ? options$1.group.path : options$1.group.tag }), baseName);
|
|
48
|
+
}
|
|
49
|
+
return node_path.default.resolve(root, output.path, baseName);
|
|
50
|
+
},
|
|
51
|
+
resolveName(name, type) {
|
|
52
|
+
const resolvedName = (0, __kubb_core_transformers.camelCase)(name, { isFile: type === "file" });
|
|
53
|
+
if (type) return transformers?.name?.(resolvedName, type) || resolvedName;
|
|
54
|
+
return resolvedName;
|
|
55
|
+
},
|
|
56
|
+
async buildStart() {
|
|
57
|
+
const [swaggerPlugin] = __kubb_core.PluginManager.getDependedPlugins(this.plugins, [__kubb_plugin_oas.pluginOasName]);
|
|
58
|
+
const oas = await swaggerPlugin.context.getOas();
|
|
59
|
+
const root = node_path.default.resolve(this.config.root, this.config.output.path);
|
|
60
|
+
const mode = __kubb_core.FileManager.getMode(node_path.default.resolve(root, output.path));
|
|
61
|
+
const operationGenerator = new __kubb_plugin_oas.OperationGenerator(this.plugin.options, {
|
|
62
|
+
oas,
|
|
63
|
+
pluginManager: this.pluginManager,
|
|
64
|
+
plugin: this.plugin,
|
|
65
|
+
contentType,
|
|
66
|
+
exclude,
|
|
67
|
+
include,
|
|
68
|
+
override,
|
|
69
|
+
mode
|
|
70
|
+
});
|
|
71
|
+
const files = await operationGenerator.build(...generators);
|
|
72
|
+
await this.addFile(...files);
|
|
73
|
+
const barrelFiles = await this.fileManager.getBarrelFiles({
|
|
74
|
+
type: output.barrelType ?? "named",
|
|
75
|
+
root,
|
|
76
|
+
output,
|
|
77
|
+
meta: { pluginKey: this.plugin.key },
|
|
78
|
+
logger: this.logger
|
|
79
|
+
});
|
|
80
|
+
await this.addFile(...barrelFiles);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
102
83
|
});
|
|
103
84
|
|
|
85
|
+
//#endregion
|
|
104
86
|
exports.pluginMcp = pluginMcp;
|
|
105
87
|
exports.pluginMcpName = pluginMcpName;
|
|
106
|
-
//# sourceMappingURL=index.cjs.map
|
|
107
88
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["mcpGenerator","serverGenerator","pluginOasName","pluginTsName","pluginZodName","options","path","FileManager","groupName: Group['name']","PluginManager","OperationGenerator"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\n\nimport { FileManager, type Group, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase } from '@kubb/core/transformers'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas as SwaggerPluginOptions } from '@kubb/plugin-oas'\nimport { mcpGenerator, serverGenerator } from './generators'\nimport type { PluginMcp } from './types.ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\n\nexport const pluginMcpName = 'plugin-mcp' satisfies PluginMcp['name']\n\nexport const pluginMcp = createPlugin<PluginMcp>((options) => {\n const {\n output = { path: 'mcp', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n generators = [mcpGenerator, serverGenerator].filter(Boolean),\n contentType,\n } = options\n\n return {\n name: pluginMcpName,\n options: {\n output,\n group,\n client: {\n importPath: '@kubb/plugin-client/clients/axios',\n dataReturnType: 'data',\n ...options.client,\n },\n },\n pre: [pluginOasName, pluginTsName, pluginZodName].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Requests`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n const resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async buildStart() {\n const [swaggerPlugin]: [Plugin<SwaggerPluginOptions>] = PluginManager.getDependedPlugins<SwaggerPluginOptions>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.addFile(...files)\n\n const barrelFiles = await this.fileManager.getBarrelFiles({\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;AAaA,MAAa,gBAAgB;AAE7B,MAAa,0CAAoC,CAAC,YAAY;CAC5D,MAAM,EACJ,SAAS;EAAE,MAAM;EAAO,YAAY;CAAS,GAC7C,OACA,UAAU,CAAE,GACZ,SACA,WAAW,CAAE,GACb,eAAe,CAAE,GACjB,aAAa,CAACA,iCAAcC,kCAAgB,EAAC,OAAO,QAAQ,EAC5D,aACD,GAAG;AAEJ,QAAO;EACL,MAAM;EACN,SAAS;GACP;GACA;GACA,QAAQ;IACN,YAAY;IACZ,gBAAgB;IAChB,GAAG,QAAQ;GACZ;EACF;EACD,KAAK;GAACC;GAAeC;GAAcC;EAAc,EAAC,OAAO,QAAQ;EACjE,YAAY,UAAU,UAAUC,WAAS;GACvC,MAAM,OAAOC,kBAAK,QAAQ,KAAK,OAAO,MAAM,KAAK,OAAO,OAAO,KAAK;GACpE,MAAM,OAAO,YAAYC,wBAAY,QAAQD,kBAAK,QAAQ,MAAM,OAAO,KAAK,CAAC;AAE7E,OAAI,SAAS;;;;;AAKX,UAAOA,kBAAK,QAAQ,MAAM,OAAO,KAAK;AAGxC,OAAI,UAAUD,WAAS,OAAO,QAAQA,WAAS,OAAO,MAAM;IAC1D,MAAMG,YAA2B,OAAO,OACpC,MAAM,OACN,CAAC,QAAQ;AACP,SAAI,OAAO,SAAS,OAClB,QAAO,GAAG,IAAI,MAAM,MAAM,IAAI,CAAC,IAAI;AAErC,YAAO,2CAAa,IAAI,MAAM,CAAC,QAAQ,CAAC;IACzC;AAEL,WAAOF,kBAAK,QACV,MACA,OAAO,MACP,UAAU,EACR,OAAO,MAAM,SAAS,SAASD,UAAQ,MAAM,OAAQA,UAAQ,MAAM,IACpE,EAAC,EACF,SACD;GACF;AAED,UAAOC,kBAAK,QAAQ,MAAM,OAAO,MAAM,SAAS;EACjD;EACD,YAAY,MAAM,MAAM;GACtB,MAAM,uDAAyB,MAAM,EACnC,QAAQ,SAAS,OAClB,EAAC;AAEF,OAAI,KACF,QAAO,cAAc,OAAO,cAAc,KAAK,IAAI;AAGrD,UAAO;EACR;EACD,MAAM,aAAa;GACjB,MAAM,CAAC,cAA8C,GAAGG,0BAAc,mBAAyC,KAAK,SAAS,CAACP,+BAAc,EAAC;GAE7I,MAAM,MAAM,MAAM,cAAc,QAAQ,QAAQ;GAChD,MAAM,OAAOI,kBAAK,QAAQ,KAAK,OAAO,MAAM,KAAK,OAAO,OAAO,KAAK;GACpE,MAAM,OAAOC,wBAAY,QAAQD,kBAAK,QAAQ,MAAM,OAAO,KAAK,CAAC;GAEjE,MAAM,qBAAqB,IAAII,qCAAmB,KAAK,OAAO,SAAS;IACrE;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb;IACA;IACA;IACA;IACA;GACD;GAED,MAAM,QAAQ,MAAM,mBAAmB,MAAM,GAAG,WAAW;GAC3D,MAAM,KAAK,QAAQ,GAAG,MAAM;GAE5B,MAAM,cAAc,MAAM,KAAK,YAAY,eAAe;IACxD,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,IACxB;IACD,QAAQ,KAAK;GACd,EAAC;GAEF,MAAM,KAAK,QAAQ,GAAG,YAAY;EACnC;CACF;AACF,EAAC"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '@kubb/oas';
|
|
4
|
-
import '@kubb/plugin-oas';
|
|
5
|
-
import '@kubb/plugin-client';
|
|
1
|
+
import { UserPluginWithLifeCycle } from "./OperationGenerator-BMJ9Szu5.cjs";
|
|
2
|
+
import { Options, PluginMcp } from "./types-Dg5mHzgC.cjs";
|
|
6
3
|
|
|
4
|
+
//#region src/plugin.d.ts
|
|
7
5
|
declare const pluginMcpName = "plugin-mcp";
|
|
8
|
-
declare const pluginMcp: (options?: Options | undefined) =>
|
|
9
|
-
|
|
10
|
-
export { PluginMcp, pluginMcp, pluginMcpName };
|
|
6
|
+
declare const pluginMcp: (options?: Options | undefined) => UserPluginWithLifeCycle<PluginMcp>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type PluginMcp, pluginMcp, pluginMcpName };
|
|
9
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '@kubb/oas';
|
|
4
|
-
import '@kubb/plugin-oas';
|
|
5
|
-
import '@kubb/plugin-client';
|
|
1
|
+
import { UserPluginWithLifeCycle } from "./OperationGenerator-D1X1O_-A.js";
|
|
2
|
+
import { Options, PluginMcp } from "./types-DLgrsgaK.js";
|
|
6
3
|
|
|
4
|
+
//#region src/plugin.d.ts
|
|
7
5
|
declare const pluginMcpName = "plugin-mcp";
|
|
8
|
-
declare const pluginMcp: (options?: Options | undefined) =>
|
|
9
|
-
|
|
10
|
-
export { PluginMcp, pluginMcp, pluginMcpName };
|
|
6
|
+
declare const pluginMcp: (options?: Options | undefined) => UserPluginWithLifeCycle<PluginMcp>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type PluginMcp, pluginMcp, pluginMcpName };
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|