@orval/mcp 8.0.0-rc.4 → 8.0.0-rc.6

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/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  ### Code Generation
13
13
 
14
- `orval` is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in `yaml` or `json` formats.
14
+ `orval` generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in `yaml` or `json` formats.
15
15
 
16
16
  `Generate`, `valid`, `cache` and `mock` in your React, Vue, Svelte and Angular applications all with your OpenAPI specification.
17
17
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { camel, generateMutatorImports, getFileInfo, getFullRoute, jsDoc, pascal, upath } from "@orval/core";
1
+ import { camel, generateMutatorImports, getFileInfo, getFullRoute, isObject, jsDoc, jsStringEscape, pascal, upath } from "@orval/core";
2
2
  import { generateClient, generateFetchHeader } from "@orval/fetch";
3
3
  import { generateZod } from "@orval/zod";
4
4
 
@@ -10,13 +10,16 @@ const getHeader = (option, info) => {
10
10
  };
11
11
  const getMcpHeader = ({ verbOptions, output }) => {
12
12
  const targetInfo = getFileInfo(output.target);
13
- const schemaInfo = getFileInfo(output.schemas);
14
- const relativeSchemaImportPath = output.schemas ? upath.relativeSafe(targetInfo.dirname, schemaInfo.dirname) : "./" + targetInfo.filename + ".schemas";
13
+ const schemasPath = isObject(output.schemas) ? output.schemas.path : output.schemas;
14
+ const schemaInfo = schemasPath ? getFileInfo(schemasPath) : void 0;
15
+ const isZodSchemaOutput = isObject(output.schemas) && output.schemas.type === "zod";
16
+ const basePath = schemaInfo?.dirname;
17
+ const relativeSchemaImportPath = basePath ? isZodSchemaOutput && output.indexFiles ? upath.relativeSafe(targetInfo.dirname, upath.joinSafe(basePath, "index.zod")) : upath.relativeSafe(targetInfo.dirname, basePath) : "./" + targetInfo.filename + ".schemas";
15
18
  return [`import {\n ${new Set(Object.values(verbOptions).flatMap((verbOption) => {
16
19
  const imports = [];
17
20
  const pascalOperationName = pascal(verbOption.operationName);
18
21
  if (verbOption.queryParams) imports.push(`${pascalOperationName}Params`);
19
- if (verbOption.body.definition) imports.push(`${pascalOperationName}Body`);
22
+ if (verbOption.body.imports[0]?.name) imports.push(verbOption.body.imports[0]?.name);
20
23
  return imports;
21
24
  })).values().toArray().join(",\n ")}\n} from '${relativeSchemaImportPath}';
22
25
  `, `import {\n ${new Set(Object.values(verbOptions).flatMap((verbOption) => verbOption.operationName)).values().toArray().join(",\n ")}\n} from './http-client';
@@ -79,9 +82,9 @@ const generateServer = (verbOptions, output, context) => {
79
82
  },` : "";
80
83
  return `
81
84
  server.tool(
82
- '${verbOption.operationName}',
83
- '${verbOption.summary}',${inputSchemaImplementation ? `\n${inputSchemaImplementation}` : ""}
84
- ${verbOption.operationName}Handler
85
+ '${jsStringEscape(verbOption.operationName)}',
86
+ '${jsStringEscape(verbOption.summary)}',${inputSchemaImplementation ? `\n${inputSchemaImplementation}` : ""}
87
+ ${jsStringEscape(verbOption.operationName)}Handler
85
88
  );`;
86
89
  }).join("\n");
87
90
  const importToolSchemasImplementation = `import {\n${Object.values(verbOptions).flatMap((verbOption) => {
@@ -157,7 +160,10 @@ const generateHttpClientFiles = async (verbOptions, output, context) => {
157
160
  }, output.client, output);
158
161
  }));
159
162
  const clientImplementation = clients.map((client) => client.implementation).join("\n");
160
- const relativeSchemasPath = output.schemas ? upath.relativeSafe(dirname, getFileInfo(output.schemas).dirname) : "./" + filename + ".schemas";
163
+ const isZodSchemaOutput = isObject(output.schemas) && output.schemas.type === "zod";
164
+ const schemasPath = isObject(output.schemas) ? output.schemas.path : output.schemas;
165
+ const basePath = schemasPath ? getFileInfo(schemasPath).dirname : void 0;
166
+ const relativeSchemasPath = basePath ? isZodSchemaOutput && output.indexFiles ? upath.relativeSafe(dirname, upath.joinSafe(basePath, "index.zod")) : upath.relativeSafe(dirname, basePath) : "./" + filename + ".schemas";
161
167
  const importNames = clients.flatMap((client) => client.imports).map((imp) => imp.name);
162
168
  return [{
163
169
  content: [
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["getMcpHeader: ClientHeaderBuilder","generateMcp: ClientBuilder","generateExtraFiles: ClientExtraFilesBuilder","mcpClientBuilder: ClientGeneratorsBuilder"],"sources":["../src/index.ts"],"sourcesContent":["import {\n camel,\n type ClientBuilder,\n type ClientExtraFilesBuilder,\n type ClientGeneratorsBuilder,\n type ClientHeaderBuilder,\n type ContextSpec,\n generateMutatorImports,\n type GeneratorVerbOptions,\n getFileInfo,\n getFullRoute,\n jsDoc,\n type NormalizedOutputOptions,\n type OpenApiInfoObject,\n pascal,\n upath,\n} from '@orval/core';\nimport { generateClient, generateFetchHeader } from '@orval/fetch';\nimport { generateZod } from '@orval/zod';\n\nconst getHeader = (\n option: false | ((info: OpenApiInfoObject) => string | string[]),\n info: OpenApiInfoObject,\n): string => {\n if (!option) {\n return '';\n }\n\n const header = option(info);\n\n return Array.isArray(header) ? jsDoc({ description: header }) : header;\n};\n\nexport const getMcpHeader: ClientHeaderBuilder = ({ verbOptions, output }) => {\n const targetInfo = getFileInfo(output.target);\n const schemaInfo = getFileInfo(output.schemas);\n\n const relativeSchemaImportPath = output.schemas\n ? upath.relativeSafe(targetInfo.dirname, schemaInfo.dirname)\n : './' + targetInfo.filename + '.schemas';\n\n const importSchemaNames = new Set(\n Object.values(verbOptions).flatMap((verbOption) => {\n const imports = [];\n const pascalOperationName = pascal(verbOption.operationName);\n\n if (verbOption.queryParams) {\n imports.push(`${pascalOperationName}Params`);\n }\n\n if (verbOption.body.definition) {\n imports.push(`${pascalOperationName}Body`);\n }\n\n return imports;\n }),\n )\n .values()\n .toArray();\n\n const importSchemasImplementation = `import {\\n ${importSchemaNames.join(\n ',\\n ',\n )}\\n} from '${relativeSchemaImportPath}';\n`;\n\n const relativeFetchClientPath = './http-client';\n const importFetchClientNames = new Set(\n Object.values(verbOptions).flatMap(\n (verbOption) => verbOption.operationName,\n ),\n )\n .values()\n .toArray();\n\n const importFetchClientImplementation = `import {\\n ${importFetchClientNames.join(\n ',\\n ',\n )}\\n} from '${relativeFetchClientPath}';\n `;\n\n const content = [\n importSchemasImplementation,\n importFetchClientImplementation,\n ].join('\\n');\n\n return content + '\\n';\n};\n\nexport const generateMcp: ClientBuilder = (verbOptions) => {\n const handlerArgsTypes = [];\n const pathParamsType = verbOptions.params\n .map((param) => {\n const paramName = param.name.split(': ')[0];\n const paramType = param.implementation.split(': ')[1];\n return ` ${paramName}: ${paramType}`;\n })\n .join(',\\n');\n if (pathParamsType) {\n handlerArgsTypes.push(` pathParams: {\\n${pathParamsType}\\n };`);\n }\n if (verbOptions.queryParams) {\n handlerArgsTypes.push(\n ` queryParams: ${verbOptions.queryParams.schema.name};`,\n );\n }\n if (verbOptions.body.definition) {\n handlerArgsTypes.push(` bodyParams: ${verbOptions.body.definition};`);\n }\n\n const handlerArgsName = `${verbOptions.operationName}Args`;\n const handlerArgsImplementation =\n handlerArgsTypes.length > 0\n ? `\nexport type ${handlerArgsName} = {\n${handlerArgsTypes.join('\\n')}\n}\n`\n : '';\n\n const fetchParams = [];\n if (verbOptions.params.length > 0) {\n const pathParamsArgs = verbOptions.params\n .map((param) => {\n const paramName = param.name.split(': ')[0];\n\n return `args.pathParams.${paramName}`;\n })\n .join(', ');\n\n fetchParams.push(pathParamsArgs);\n }\n if (verbOptions.body.definition) fetchParams.push(`args.bodyParams`);\n if (verbOptions.queryParams) fetchParams.push(`args.queryParams`);\n\n const handlerName = `${verbOptions.operationName}Handler`;\n const handlerImplementation = `\nexport const ${handlerName} = async (${handlerArgsTypes.length > 0 ? `args: ${handlerArgsName}` : ''}) => {\n const res = await ${verbOptions.operationName}(${fetchParams.join(', ')});\n\n return {\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify(res),\n },\n ],\n };\n};`;\n\n const handlersImplementation = [\n handlerArgsImplementation,\n handlerImplementation,\n ].join('');\n\n return {\n implementation: handlersImplementation ? `${handlersImplementation}\\n` : '',\n imports: [],\n };\n};\n\nexport const generateServer = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n const info = context.spec.info;\n const { extension, dirname } = getFileInfo(output.target);\n const serverPath = upath.join(dirname, `server${extension}`);\n const header = getHeader(output.override.header, info);\n\n const toolImplementations = Object.values(verbOptions)\n .map((verbOption) => {\n const pascalOperationName = pascal(verbOption.operationName);\n const inputSchemaTypes = [];\n if (verbOption.params.length > 0)\n inputSchemaTypes.push(` pathParams: ${pascalOperationName}Params`);\n if (verbOption.queryParams)\n inputSchemaTypes.push(\n ` queryParams: ${pascalOperationName}QueryParams`,\n );\n if (verbOption.body.definition)\n inputSchemaTypes.push(` bodyParams: ${pascalOperationName}Body`);\n\n const inputSchemaImplementation =\n inputSchemaTypes.length > 0\n ? ` {\n ${inputSchemaTypes.join(',\\n ')}\n },`\n : '';\n\n const toolImplementation = `\nserver.tool(\n '${verbOption.operationName}',\n '${verbOption.summary}',${inputSchemaImplementation ? `\\n${inputSchemaImplementation}` : ''}\n ${verbOption.operationName}Handler\n);`;\n\n return toolImplementation;\n })\n .join('\\n');\n\n const importToolSchemas = Object.values(verbOptions)\n .flatMap((verbOption) => {\n const imports = [];\n\n const pascalOperationName = pascal(verbOption.operationName);\n\n if (verbOption.headers) imports.push(` ${pascalOperationName}Header`);\n if (verbOption.params.length > 0)\n imports.push(` ${pascalOperationName}Params`);\n if (verbOption.queryParams)\n imports.push(` ${pascalOperationName}QueryParams`);\n if (verbOption.body.definition)\n imports.push(` ${pascalOperationName}Body`);\n\n return imports;\n })\n .join(',\\n');\n const importToolSchemasImplementation = `import {\\n${importToolSchemas}\\n} from './tool-schemas.zod';`;\n\n const importHandlers = Object.values(verbOptions)\n .filter((verbOption) =>\n toolImplementations.includes(`${verbOption.operationName}Handler`),\n )\n .map((verbOption) => ` ${verbOption.operationName}Handler`)\n .join(`,\\n`);\n const importHandlersImplementation = `import {\\n${importHandlers}\\n} from './handlers';`;\n\n const importDependenciesImplementation = `import {\n McpServer\n} from '@modelcontextprotocol/sdk/server/mcp.js';\n \nimport {\n StdioServerTransport\n} from '@modelcontextprotocol/sdk/server/stdio.js'; \n`;\n const newMcpServerImplementation = `\nconst server = new McpServer({\n name: '${camel(info.title)}Server',\n version: '1.0.0',\n});\n`;\n const serverConnectImplementation = `\nconst transport = new StdioServerTransport();\n\nserver.connect(transport).then(() => {\n console.error('MCP server running on stdio');\n}).catch(console.error);\n`;\n\n const content = [\n header,\n importDependenciesImplementation,\n importHandlersImplementation,\n importToolSchemasImplementation,\n newMcpServerImplementation,\n toolImplementations,\n serverConnectImplementation,\n ].join('\\n');\n\n return [\n {\n content,\n path: serverPath,\n },\n ];\n};\n\nconst generateZodFiles = async (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n const { extension, dirname } = getFileInfo(output.target);\n\n const header = getHeader(output.override.header, context.spec.info);\n\n const zods = await Promise.all(\n Object.values(verbOptions).map(async (verbOption) =>\n generateZod(\n verbOption,\n {\n route: verbOption.route,\n pathRoute: verbOption.pathRoute,\n override: output.override,\n context,\n mock: output.mock,\n output: output.target,\n },\n output.client,\n ),\n ),\n );\n\n const allMutators = new Map(\n zods.flatMap((z) => z.mutators ?? []).map((m) => [m.name, m]),\n )\n .values()\n .toArray();\n\n const mutatorsImports = generateMutatorImports({\n mutators: allMutators,\n });\n\n let content = `${header}import { z as zod } from 'zod';\\n${mutatorsImports}\\n`;\n\n const zodPath = upath.join(dirname, `tool-schemas.zod${extension}`);\n\n content += zods.map((zod) => zod.implementation).join('\\n');\n\n return [\n {\n content,\n path: zodPath,\n },\n ];\n};\n\nconst generateHttpClientFiles = async (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n const { extension, dirname, filename } = getFileInfo(output.target);\n\n const header = getHeader(output.override.header, context.spec.info);\n\n const clients = await Promise.all(\n Object.values(verbOptions).map(async (verbOption) => {\n const fullRoute = getFullRoute(\n verbOption.route,\n context.spec.servers,\n output.baseUrl,\n );\n\n const options = {\n route: fullRoute,\n pathRoute: verbOption.pathRoute,\n override: output.override,\n context,\n mock: output.mock,\n output: output.target,\n };\n\n return generateClient(verbOption, options, output.client, output);\n }),\n );\n\n const clientImplementation = clients\n .map((client) => client.implementation)\n .join('\\n');\n\n const relativeSchemasPath = output.schemas\n ? upath.relativeSafe(dirname, getFileInfo(output.schemas).dirname)\n : './' + filename + '.schemas';\n\n const importNames = clients\n .flatMap((client) => client.imports)\n .map((imp) => imp.name);\n const uniqueImportNames = new Set(importNames).values().toArray();\n\n const importImplementation = `import { ${uniqueImportNames.join(\n ',\\n',\n )} } from '${relativeSchemasPath}';`;\n\n const fetchHeader = generateFetchHeader({\n title: '',\n isRequestOptions: false,\n isMutator: false,\n noFunction: false,\n isGlobalMutator: false,\n provideIn: false,\n hasAwaitedType: false,\n output,\n verbOptions,\n clientImplementation,\n });\n\n const content = [\n header,\n importImplementation,\n fetchHeader,\n clientImplementation,\n ].join('\\n');\n const outputPath = upath.join(dirname, `http-client${extension}`);\n\n return [\n {\n content,\n path: outputPath,\n },\n ];\n};\n\nexport const generateExtraFiles: ClientExtraFilesBuilder = async (\n verbOptions,\n output,\n context,\n) => {\n const server = generateServer(verbOptions, output, context);\n const [zods, httpClients] = await Promise.all([\n generateZodFiles(verbOptions, output, context),\n generateHttpClientFiles(verbOptions, output, context),\n ]);\n\n return [...server, ...zods, ...httpClients];\n};\n\nconst mcpClientBuilder: ClientGeneratorsBuilder = {\n client: generateMcp,\n header: getMcpHeader,\n extraFiles: generateExtraFiles,\n};\n\nexport const builder = () => () => mcpClientBuilder;\n\nexport default builder;\n"],"mappings":";;;;;AAoBA,MAAM,aACJ,QACA,SACW;AACX,KAAI,CAAC,OACH,QAAO;CAGT,MAAM,SAAS,OAAO,KAAK;AAE3B,QAAO,MAAM,QAA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AAC,SAAS,CAEN,KACzD,MACD,CAAC,WAAW,oBAAoB;GAEb,oBAAoB;IACtC,OAAO;IACP,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,iBAAiB;IACjB,WAAW;IACX,gBAAgB;IAChB;IACA;IACA;IACD,CAAC;GAMA;GACD,CAAC,KAAK,KAAK;EAMR,MALe,MAAM,KAAK,SAAS,cAAc,YAAY;EAM9D,CACF;;AAGH,MAAaC,qBAA8C,OACzD,aACA,QACA,YACG;CACH,MAAM,SAAS,eAAe,aAAa,QAAQ,QAAQ;CAC3D,MAAM,CAAC,MAAM,eAAe,MAAM,QAAQ,IAAI,CAC5C,iBAAiB,aAAa,QAAQ,QAAQ,EAC9C,wBAAwB,aAAa,QAAQ,QAAQ,CACtD,CAAC;AAEF,QAAO;EAAC,GAAG;EAAQ,GAAG;EAAM,GAAG;EAAY;;AAG7C,MAAMC,mBAA4C;CAChD,QAAQ;CACR,QAAQ;CACR,YAAY;CACb;AAED,MAAa,sBAAsB;AAEnC,kBAAe"}
1
+ {"version":3,"file":"index.mjs","names":["getMcpHeader: ClientHeaderBuilder","generateMcp: ClientBuilder","generateExtraFiles: ClientExtraFilesBuilder","mcpClientBuilder: ClientGeneratorsBuilder"],"sources":["../src/index.ts"],"sourcesContent":["import {\n camel,\n type ClientBuilder,\n type ClientExtraFilesBuilder,\n type ClientGeneratorsBuilder,\n type ClientHeaderBuilder,\n type ContextSpec,\n generateMutatorImports,\n type GeneratorVerbOptions,\n getFileInfo,\n getFullRoute,\n isObject,\n jsDoc,\n jsStringEscape,\n type NormalizedOutputOptions,\n type OpenApiInfoObject,\n pascal,\n upath,\n} from '@orval/core';\nimport { generateClient, generateFetchHeader } from '@orval/fetch';\nimport { generateZod } from '@orval/zod';\n\nconst getHeader = (\n option: false | ((info: OpenApiInfoObject) => string | string[]),\n info: OpenApiInfoObject,\n): string => {\n if (!option) {\n return '';\n }\n\n const header = option(info);\n\n return Array.isArray(header) ? jsDoc({ description: header }) : header;\n};\n\nexport const getMcpHeader: ClientHeaderBuilder = ({ verbOptions, output }) => {\n const targetInfo = getFileInfo(output.target);\n const schemasPath = isObject(output.schemas)\n ? output.schemas.path\n : output.schemas;\n const schemaInfo = schemasPath ? getFileInfo(schemasPath) : undefined;\n\n const isZodSchemaOutput =\n isObject(output.schemas) && output.schemas.type === 'zod';\n const basePath = schemaInfo?.dirname;\n const relativeSchemaImportPath = basePath\n ? isZodSchemaOutput && output.indexFiles\n ? upath.relativeSafe(\n targetInfo.dirname,\n upath.joinSafe(basePath, 'index.zod'),\n )\n : upath.relativeSafe(targetInfo.dirname, basePath)\n : './' + targetInfo.filename + '.schemas';\n\n const importSchemaNames = new Set(\n Object.values(verbOptions).flatMap((verbOption) => {\n const imports = [];\n const pascalOperationName = pascal(verbOption.operationName);\n\n if (verbOption.queryParams) {\n imports.push(`${pascalOperationName}Params`);\n }\n\n if (verbOption.body.imports[0]?.name) {\n imports.push(verbOption.body.imports[0]?.name);\n }\n\n return imports;\n }),\n )\n .values()\n .toArray();\n\n const importSchemasImplementation = `import {\\n ${importSchemaNames.join(\n ',\\n ',\n )}\\n} from '${relativeSchemaImportPath}';\n`;\n\n const relativeFetchClientPath = './http-client';\n const importFetchClientNames = new Set(\n Object.values(verbOptions).flatMap(\n (verbOption) => verbOption.operationName,\n ),\n )\n .values()\n .toArray();\n\n const importFetchClientImplementation = `import {\\n ${importFetchClientNames.join(\n ',\\n ',\n )}\\n} from '${relativeFetchClientPath}';\n `;\n\n const content = [\n importSchemasImplementation,\n importFetchClientImplementation,\n ].join('\\n');\n\n return content + '\\n';\n};\n\nexport const generateMcp: ClientBuilder = (verbOptions) => {\n const handlerArgsTypes = [];\n const pathParamsType = verbOptions.params\n .map((param) => {\n const paramName = param.name.split(': ')[0];\n const paramType = param.implementation.split(': ')[1];\n return ` ${paramName}: ${paramType}`;\n })\n .join(',\\n');\n if (pathParamsType) {\n handlerArgsTypes.push(` pathParams: {\\n${pathParamsType}\\n };`);\n }\n if (verbOptions.queryParams) {\n handlerArgsTypes.push(\n ` queryParams: ${verbOptions.queryParams.schema.name};`,\n );\n }\n if (verbOptions.body.definition) {\n handlerArgsTypes.push(` bodyParams: ${verbOptions.body.definition};`);\n }\n\n const handlerArgsName = `${verbOptions.operationName}Args`;\n const handlerArgsImplementation =\n handlerArgsTypes.length > 0\n ? `\nexport type ${handlerArgsName} = {\n${handlerArgsTypes.join('\\n')}\n}\n`\n : '';\n\n const fetchParams = [];\n if (verbOptions.params.length > 0) {\n const pathParamsArgs = verbOptions.params\n .map((param) => {\n const paramName = param.name.split(': ')[0];\n\n return `args.pathParams.${paramName}`;\n })\n .join(', ');\n\n fetchParams.push(pathParamsArgs);\n }\n if (verbOptions.body.definition) fetchParams.push(`args.bodyParams`);\n if (verbOptions.queryParams) fetchParams.push(`args.queryParams`);\n\n const handlerName = `${verbOptions.operationName}Handler`;\n const handlerImplementation = `\nexport const ${handlerName} = async (${handlerArgsTypes.length > 0 ? `args: ${handlerArgsName}` : ''}) => {\n const res = await ${verbOptions.operationName}(${fetchParams.join(', ')});\n\n return {\n content: [\n {\n type: 'text' as const,\n text: JSON.stringify(res),\n },\n ],\n };\n};`;\n\n const handlersImplementation = [\n handlerArgsImplementation,\n handlerImplementation,\n ].join('');\n\n return {\n implementation: handlersImplementation ? `${handlersImplementation}\\n` : '',\n imports: [],\n };\n};\n\nexport const generateServer = (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n const info = context.spec.info;\n const { extension, dirname } = getFileInfo(output.target);\n const serverPath = upath.join(dirname, `server${extension}`);\n const header = getHeader(output.override.header, info);\n\n const toolImplementations = Object.values(verbOptions)\n .map((verbOption) => {\n const pascalOperationName = pascal(verbOption.operationName);\n const inputSchemaTypes = [];\n if (verbOption.params.length > 0)\n inputSchemaTypes.push(` pathParams: ${pascalOperationName}Params`);\n if (verbOption.queryParams)\n inputSchemaTypes.push(\n ` queryParams: ${pascalOperationName}QueryParams`,\n );\n if (verbOption.body.definition)\n inputSchemaTypes.push(` bodyParams: ${pascalOperationName}Body`);\n\n const inputSchemaImplementation =\n inputSchemaTypes.length > 0\n ? ` {\n ${inputSchemaTypes.join(',\\n ')}\n },`\n : '';\n\n const toolImplementation = `\nserver.tool(\n '${jsStringEscape(verbOption.operationName)}',\n '${jsStringEscape(verbOption.summary)}',${inputSchemaImplementation ? `\\n${inputSchemaImplementation}` : ''}\n ${jsStringEscape(verbOption.operationName)}Handler\n);`;\n\n return toolImplementation;\n })\n .join('\\n');\n\n const importToolSchemas = Object.values(verbOptions)\n .flatMap((verbOption) => {\n const imports = [];\n\n const pascalOperationName = pascal(verbOption.operationName);\n\n if (verbOption.headers) imports.push(` ${pascalOperationName}Header`);\n if (verbOption.params.length > 0)\n imports.push(` ${pascalOperationName}Params`);\n if (verbOption.queryParams)\n imports.push(` ${pascalOperationName}QueryParams`);\n if (verbOption.body.definition)\n imports.push(` ${pascalOperationName}Body`);\n\n return imports;\n })\n .join(',\\n');\n const importToolSchemasImplementation = `import {\\n${importToolSchemas}\\n} from './tool-schemas.zod';`;\n\n const importHandlers = Object.values(verbOptions)\n .filter((verbOption) =>\n toolImplementations.includes(`${verbOption.operationName}Handler`),\n )\n .map((verbOption) => ` ${verbOption.operationName}Handler`)\n .join(`,\\n`);\n const importHandlersImplementation = `import {\\n${importHandlers}\\n} from './handlers';`;\n\n const importDependenciesImplementation = `import {\n McpServer\n} from '@modelcontextprotocol/sdk/server/mcp.js';\n \nimport {\n StdioServerTransport\n} from '@modelcontextprotocol/sdk/server/stdio.js'; \n`;\n const newMcpServerImplementation = `\nconst server = new McpServer({\n name: '${camel(info.title)}Server',\n version: '1.0.0',\n});\n`;\n const serverConnectImplementation = `\nconst transport = new StdioServerTransport();\n\nserver.connect(transport).then(() => {\n console.error('MCP server running on stdio');\n}).catch(console.error);\n`;\n\n const content = [\n header,\n importDependenciesImplementation,\n importHandlersImplementation,\n importToolSchemasImplementation,\n newMcpServerImplementation,\n toolImplementations,\n serverConnectImplementation,\n ].join('\\n');\n\n return [\n {\n content,\n path: serverPath,\n },\n ];\n};\n\nconst generateZodFiles = async (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n const { extension, dirname } = getFileInfo(output.target);\n\n const header = getHeader(output.override.header, context.spec.info);\n\n const zods = await Promise.all(\n Object.values(verbOptions).map(async (verbOption) =>\n generateZod(\n verbOption,\n {\n route: verbOption.route,\n pathRoute: verbOption.pathRoute,\n override: output.override,\n context,\n mock: output.mock,\n output: output.target,\n },\n output.client,\n ),\n ),\n );\n\n const allMutators = new Map(\n zods.flatMap((z) => z.mutators ?? []).map((m) => [m.name, m]),\n )\n .values()\n .toArray();\n\n const mutatorsImports = generateMutatorImports({\n mutators: allMutators,\n });\n\n let content = `${header}import { z as zod } from 'zod';\\n${mutatorsImports}\\n`;\n\n const zodPath = upath.join(dirname, `tool-schemas.zod${extension}`);\n\n content += zods.map((zod) => zod.implementation).join('\\n');\n\n return [\n {\n content,\n path: zodPath,\n },\n ];\n};\n\nconst generateHttpClientFiles = async (\n verbOptions: Record<string, GeneratorVerbOptions>,\n output: NormalizedOutputOptions,\n context: ContextSpec,\n) => {\n const { extension, dirname, filename } = getFileInfo(output.target);\n\n const header = getHeader(output.override.header, context.spec.info);\n\n const clients = await Promise.all(\n Object.values(verbOptions).map(async (verbOption) => {\n const fullRoute = getFullRoute(\n verbOption.route,\n context.spec.servers,\n output.baseUrl,\n );\n\n const options = {\n route: fullRoute,\n pathRoute: verbOption.pathRoute,\n override: output.override,\n context,\n mock: output.mock,\n output: output.target,\n };\n\n return generateClient(verbOption, options, output.client, output);\n }),\n );\n\n const clientImplementation = clients\n .map((client) => client.implementation)\n .join('\\n');\n\n const isZodSchemaOutput =\n isObject(output.schemas) && output.schemas.type === 'zod';\n const schemasPath = isObject(output.schemas)\n ? output.schemas.path\n : output.schemas;\n const basePath = schemasPath ? getFileInfo(schemasPath).dirname : undefined;\n const relativeSchemasPath = basePath\n ? isZodSchemaOutput && output.indexFiles\n ? upath.relativeSafe(dirname, upath.joinSafe(basePath, 'index.zod'))\n : upath.relativeSafe(dirname, basePath)\n : './' + filename + '.schemas';\n\n const importNames = clients\n .flatMap((client) => client.imports)\n .map((imp) => imp.name);\n const uniqueImportNames = new Set(importNames).values().toArray();\n\n const importImplementation = `import { ${uniqueImportNames.join(\n ',\\n',\n )} } from '${relativeSchemasPath}';`;\n\n const fetchHeader = generateFetchHeader({\n title: '',\n isRequestOptions: false,\n isMutator: false,\n noFunction: false,\n isGlobalMutator: false,\n provideIn: false,\n hasAwaitedType: false,\n output,\n verbOptions,\n clientImplementation,\n });\n\n const content = [\n header,\n importImplementation,\n fetchHeader,\n clientImplementation,\n ].join('\\n');\n const outputPath = upath.join(dirname, `http-client${extension}`);\n\n return [\n {\n content,\n path: outputPath,\n },\n ];\n};\n\nexport const generateExtraFiles: ClientExtraFilesBuilder = async (\n verbOptions,\n output,\n context,\n) => {\n const server = generateServer(verbOptions, output, context);\n const [zods, httpClients] = await Promise.all([\n generateZodFiles(verbOptions, output, context),\n generateHttpClientFiles(verbOptions, output, context),\n ]);\n\n return [...server, ...zods, ...httpClients];\n};\n\nconst mcpClientBuilder: ClientGeneratorsBuilder = {\n client: generateMcp,\n header: getMcpHeader,\n extraFiles: generateExtraFiles,\n};\n\nexport const builder = () => () => mcpClientBuilder;\n\nexport default builder;\n"],"mappings":";;;;;AAsBA,MAAM,aACJ,QACA,SACW;AACX,KAAI,CAAC,OACH,QAAO;CAGT,MAAM,SAAS,OAAO,KAAK;AAE3B,QAAO,MAAM,QAAQ,OAAO,GAAG,MAAM,EAAE,aAAa,QAAQ,CAAC,GAAG;;AAGlE,MAAaA,gBAAqC,EAAE,aAAa,aAAa;CAC5E,MAAM,aAAa,YAAY,OAAO,OAAO;CAC7C,MAAM,cAAc,SAAS,OAAO,QAAQ,GACxC,OAAO,QAAQ,OACf,OAAO;CACX,MAAM,aAAa,cAAc,YAAY,YA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B,OAAO,aAC1B,MAAM,aAAa,SAAS,MAAM,SAAS,UAAU,YAAY,CAAC,GAClE,MAAM,aAAa,SAAS,SAAS,GACvC,OAAO,WAAW;CAEtB,MAAM,cAAc,QACjB,SAAS,WAAW,OAAO,QAAQ,CACnC,KAAK,QAAQ,IAAI,KAAK;AA4BzB,QAAO,CACL;EACE,SAVY;GACd;GAlB2B,YAFH,IAAI,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAEN,KACzD,MACD,CAAC,WAAW,oBAAoB;GAEb,oBAAoB;IACtC,OAAO;IACP,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,iBAAiB;IACjB,WAAW;IACX,gBAAgB;IAChB;IACA;IACA;IACD,CAAC;GAMA;GACD,CAAC,KAAK,KAAK;EAMR,MALe,MAAM,KAAK,SAAS,cAAc,YAAY;EAM9D,CACF;;AAGH,MAAaC,qBAA8C,OACzD,aACA,QACA,YACG;CACH,MAAM,SAAS,eAAe,aAAa,QAAQ,QAAQ;CAC3D,MAAM,CAAC,MAAM,eAAe,MAAM,QAAQ,IAAI,CAC5C,iBAAiB,aAAa,QAAQ,QAAQ,EAC9C,wBAAwB,aAAa,QAAQ,QAAQ,CACtD,CAAC;AAEF,QAAO;EAAC,GAAG;EAAQ,GAAG;EAAM,GAAG;EAAY;;AAG7C,MAAMC,mBAA4C;CAChD,QAAQ;CACR,QAAQ;CACR,YAAY;CACb;AAED,MAAa,sBAAsB;AAEnC,kBAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orval/mcp",
3
- "version": "8.0.0-rc.4",
3
+ "version": "8.0.0-rc.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -22,15 +22,15 @@
22
22
  "nuke": "rimraf .turbo dist node_modules"
23
23
  },
24
24
  "dependencies": {
25
- "@orval/core": "8.0.0-rc.4",
26
- "@orval/fetch": "8.0.0-rc.4",
27
- "@orval/zod": "8.0.0-rc.4"
25
+ "@orval/core": "8.0.0-rc.6",
26
+ "@orval/fetch": "8.0.0-rc.6",
27
+ "@orval/zod": "8.0.0-rc.6"
28
28
  },
29
29
  "devDependencies": {
30
- "eslint": "9.39.1",
31
- "rimraf": "6.1.0",
32
- "tsdown": "0.16.4",
30
+ "eslint": "9.39.2",
31
+ "rimraf": "6.1.2",
32
+ "tsdown": "0.18.2",
33
33
  "typescript": "5.9.3"
34
34
  },
35
- "stableVersion": "8.0.0-rc.4"
35
+ "stableVersion": "8.0.0-rc.5"
36
36
  }