@kubb/mcp 4.11.3 → 4.12.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/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- const require_src = require('./src-D-wHMffz.cjs');
1
+ const require_src = require('./src-DyIlQ-4P.cjs');
2
2
 
3
3
  exports.startServer = require_src.startServer;
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as startServer } from "./src-UsG-rjQQ.js";
1
+ import { t as startServer } from "./src-Bz5jtvvs.js";
2
2
 
3
3
  export { startServer };
package/dist/server.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_src = require('./src-D-wHMffz.cjs');
1
+ const require_src = require('./src-DyIlQ-4P.cjs');
2
2
 
3
3
  //#region src/server.ts
4
4
  require_src.startServer();
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as startServer } from "./src-UsG-rjQQ.js";
1
+ import { t as startServer } from "./src-Bz5jtvvs.js";
2
2
 
3
3
  //#region src/server.ts
4
4
  startServer();
@@ -3,13 +3,14 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { z } from "zod";
5
5
  import { safeBuild } from "@kubb/core";
6
+ import { AsyncEventEmitter } from "@kubb/core/utils";
6
7
  import { pluginOas } from "@kubb/plugin-oas";
7
8
  import { pluginReactQuery } from "@kubb/plugin-react-query";
8
9
  import { pluginTs } from "@kubb/plugin-ts";
9
10
  import { FileProcessor, createFile } from "@kubb/react-fabric";
10
11
 
11
12
  //#region package.json
12
- var version = "4.11.3";
13
+ var version = "4.12.1";
13
14
 
14
15
  //#endregion
15
16
  //#region src/schemas/generateSchema.ts
@@ -54,7 +55,10 @@ async function generate({ plugin, openApi, operationId }) {
54
55
  },
55
56
  plugins
56
57
  };
57
- const { fabric, error } = await safeBuild({ config: definedConfig });
58
+ const { fabric, error } = await safeBuild({
59
+ config: definedConfig,
60
+ events: new AsyncEventEmitter()
61
+ });
58
62
  if (error) return {
59
63
  content: [{
60
64
  type: "text",
@@ -103,4 +107,4 @@ async function startServer() {
103
107
 
104
108
  //#endregion
105
109
  export { startServer as t };
106
- //# sourceMappingURL=src-UsG-rjQQ.js.map
110
+ //# sourceMappingURL=src-Bz5jtvvs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-Bz5jtvvs.js","names":["definedConfig: Config"],"sources":["../package.json","../src/schemas/generateSchema.ts","../src/tools/generate.ts","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@kubb/mcp\",\n \"version\": \"4.12.1\",\n \"description\": \"Generator MCP\",\n \"keywords\": [\n \"typescript\",\n \"plugins\",\n \"kubb\",\n \"codegen\",\n \"MCP\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/kubb-labs/kubb.git\",\n \"directory\": \"packages/mcp\"\n },\n \"license\": \"MIT\",\n \"author\": \"stijnvanhulle\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.cjs\",\n \"import\": \"./dist/index.js\"\n },\n \"./server\": {\n \"require\": \"./dist/server.cjs\",\n \"import\": \"./dist/server.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"typesVersions\": {\n \"*\": {\n \"server\": [\n \"./dist/server.d.ts\"\n ]\n }\n },\n \"files\": [\n \"src\",\n \"dist\",\n \"!/**/**.test.**\",\n \"!/**/__tests__/**\"\n ],\n \"size-limit\": [\n {\n \"path\": \"./dist/*.js\",\n \"limit\": \"510 KiB\",\n \"gzip\": true\n }\n ],\n \"scripts\": {\n \"build\": \"tsdown && size-limit\",\n \"start:mcp\": \"bun --watch ./src/server.ts\",\n \"debug:mcp\": \"npx -y @modelcontextprotocol/inspector node ./dist/server.js\",\n \"clean\": \"npx rimraf ./dist\",\n \"lint\": \"bun biome lint .\",\n \"lint:fix\": \"bun biome lint --fix --unsafe .\",\n \"release\": \"pnpm publish --no-git-check\",\n \"release:canary\": \"bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check\",\n \"start\": \"tsdown --watch\",\n \"test\": \"vitest --passWithNoTests\",\n \"typecheck\": \"tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false\"\n },\n \"dependencies\": {\n \"@kubb/core\": \"workspace:*\",\n \"@kubb/plugin-client\": \"workspace:*\",\n \"@kubb/plugin-cypress\": \"workspace:*\",\n \"@kubb/plugin-faker\": \"workspace:*\",\n \"@kubb/plugin-mcp\": \"workspace:*\",\n \"@kubb/plugin-msw\": \"workspace:*\",\n \"@kubb/plugin-oas\": \"workspace:*\",\n \"@kubb/plugin-react-query\": \"workspace:*\",\n \"@kubb/plugin-redoc\": \"workspace:*\",\n \"@kubb/plugin-swr\": \"workspace:*\",\n \"@kubb/plugin-ts\": \"workspace:*\",\n \"@kubb/plugin-zod\": \"workspace:*\",\n \"@kubb/react-fabric\": \"catalog:\",\n \"@modelcontextprotocol/sdk\": \"1.21.1\",\n \"zod\": \"^3.25.76\"\n },\n \"peerDependencies\": {\n \"@kubb/react-fabric\": \"0.7.0\"\n },\n \"devDependencies\": {\n \"@kubb/plugin-oas\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n }\n}\n","import { z } from 'zod'\n\nexport const generateSchema = z.object({\n openApi: z.string().default('https://petstore.swagger.io/v2/swagger.json').describe('OpenAPI/Swagger spec'),\n plugin: z.enum(['typescript', 'react-query']).describe('Plugin to use'),\n operationId: z.string().nullable().optional().describe('Which operationId should be used'),\n // schemaName: z.string().nullable().optional().describe('Which schema should be used'),\n})\n","import { type Config, type KubbEvents, type Plugin, safeBuild } from '@kubb/core'\nimport { AsyncEventEmitter } from '@kubb/core/utils'\nimport { type Include, pluginOas } from '@kubb/plugin-oas'\nimport { pluginReactQuery } from '@kubb/plugin-react-query'\nimport { pluginTs } from '@kubb/plugin-ts'\nimport { createFile, FileProcessor } from '@kubb/react-fabric'\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.d.ts'\nimport type { z } from 'zod'\nimport type { generateSchema } from '../schemas/generateSchema.ts'\n\nexport async function generate({ plugin, openApi, operationId }: z.infer<typeof generateSchema>): Promise<CallToolResult> {\n try {\n const include = [\n operationId\n ? {\n type: 'operationId',\n pattern: operationId,\n }\n : undefined,\n ].filter(Boolean) as Include[]\n\n const plugins = [\n pluginOas({ validate: false, generators: [] }),\n pluginTs({\n output: {\n path: 'typescript.ts',\n },\n generators: plugin === 'typescript' ? undefined : [],\n include,\n }),\n pluginReactQuery({\n output: {\n path: 'react-query.ts',\n },\n generators: plugin === 'react-query' ? undefined : [],\n include,\n }),\n ].filter(Boolean) as Plugin[]\n\n const fileProcessor = new FileProcessor()\n const definedConfig: Config = {\n root: process.cwd(),\n input: {\n data: openApi,\n },\n output: {\n path: './',\n write: false,\n barrelType: 'named',\n },\n plugins,\n }\n\n const { fabric, error } = await safeBuild({\n config: definedConfig,\n events: new AsyncEventEmitter<KubbEvents>(),\n })\n\n if (error) {\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n\n const promises = fabric.files.map(async (file) => {\n return fileProcessor.parse(createFile(file))\n })\n\n const sources = await Promise.all(promises)\n\n return {\n content: [\n // {\n // type: 'resource',\n // resource: {}\n // },\n {\n type: 'text',\n text: `Config: ${JSON.stringify(definedConfig, null, 2)}`,\n },\n {\n type: 'text',\n text: `Files: ${JSON.stringify(sources, null, 2)}`,\n },\n ],\n }\n } catch (e) {\n const error = e as Error\n\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n}\n","import process from 'node:process'\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'\nimport { version } from '../package.json'\nimport { generateSchema } from './schemas/generateSchema.ts'\nimport { generate } from './tools/generate.ts'\n\nexport async function startServer() {\n try {\n const transport = new StdioServerTransport()\n const server = new McpServer({\n name: 'Kubb',\n version,\n })\n\n server.tool('generate', 'generate an openAPI spec to a code snippet', generateSchema.shape, generate)\n\n await server.connect(transport)\n } catch (error) {\n console.error('Failed to start server:', error)\n process.exit(1)\n }\n}\n"],"mappings":";;;;;;;;;;;;cAEa;;;;ACAb,MAAa,iBAAiB,EAAE,OAAO;CACrC,SAAS,EAAE,QAAQ,CAAC,QAAQ,8CAA8C,CAAC,SAAS,uBAAuB;CAC3G,QAAQ,EAAE,KAAK,CAAC,cAAc,cAAc,CAAC,CAAC,SAAS,gBAAgB;CACvE,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,mCAAmC;CAE3F,CAAC;;;;ACGF,eAAsB,SAAS,EAAE,QAAQ,SAAS,eAAwE;AACxH,KAAI;EACF,MAAM,UAAU,CACd,cACI;GACE,MAAM;GACN,SAAS;GACV,GACD,OACL,CAAC,OAAO,QAAQ;EAEjB,MAAM,UAAU;GACd,UAAU;IAAE,UAAU;IAAO,YAAY,EAAE;IAAE,CAAC;GAC9C,SAAS;IACP,QAAQ,EACN,MAAM,iBACP;IACD,YAAY,WAAW,eAAe,SAAY,EAAE;IACpD;IACD,CAAC;GACF,iBAAiB;IACf,QAAQ,EACN,MAAM,kBACP;IACD,YAAY,WAAW,gBAAgB,SAAY,EAAE;IACrD;IACD,CAAC;GACH,CAAC,OAAO,QAAQ;EAEjB,MAAM,gBAAgB,IAAI,eAAe;EACzC,MAAMA,gBAAwB;GAC5B,MAAM,QAAQ,KAAK;GACnB,OAAO,EACL,MAAM,SACP;GACD,QAAQ;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACb;GACD;GACD;EAED,MAAM,EAAE,QAAQ,UAAU,MAAM,UAAU;GACxC,QAAQ;GACR,QAAQ,IAAI,mBAA+B;GAC5C,CAAC;AAEF,MAAI,MACF,QAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MAAM,MAAM;IACb,CACF;GACD,SAAS;GACV;EAGH,MAAM,WAAW,OAAO,MAAM,IAAI,OAAO,SAAS;AAChD,UAAO,cAAc,MAAM,WAAW,KAAK,CAAC;IAC5C;EAEF,MAAM,UAAU,MAAM,QAAQ,IAAI,SAAS;AAE3C,SAAO,EACL,SAAS,CAKP;GACE,MAAM;GACN,MAAM,WAAW,KAAK,UAAU,eAAe,MAAM,EAAE;GACxD,EACD;GACE,MAAM;GACN,MAAM,UAAU,KAAK,UAAU,SAAS,MAAM,EAAE;GACjD,CACF,EACF;UACM,GAAG;AAGV,SAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MANQ,EAMI;IACb,CACF;GACD,SAAS;GACV;;;;;;AChGL,eAAsB,cAAc;AAClC,KAAI;EACF,MAAM,YAAY,IAAI,sBAAsB;EAC5C,MAAM,SAAS,IAAI,UAAU;GAC3B,MAAM;GACN;GACD,CAAC;AAEF,SAAO,KAAK,YAAY,8CAA8C,eAAe,OAAO,SAAS;AAErG,QAAM,OAAO,QAAQ,UAAU;UACxB,OAAO;AACd,UAAQ,MAAM,2BAA2B,MAAM;AAC/C,YAAQ,KAAK,EAAE"}
@@ -31,13 +31,14 @@ let __modelcontextprotocol_sdk_server_mcp_js = require("@modelcontextprotocol/sd
31
31
  let __modelcontextprotocol_sdk_server_stdio_js = require("@modelcontextprotocol/sdk/server/stdio.js");
32
32
  let zod = require("zod");
33
33
  let __kubb_core = require("@kubb/core");
34
+ let __kubb_core_utils = require("@kubb/core/utils");
34
35
  let __kubb_plugin_oas = require("@kubb/plugin-oas");
35
36
  let __kubb_plugin_react_query = require("@kubb/plugin-react-query");
36
37
  let __kubb_plugin_ts = require("@kubb/plugin-ts");
37
38
  let __kubb_react_fabric = require("@kubb/react-fabric");
38
39
 
39
40
  //#region package.json
40
- var version = "4.11.3";
41
+ var version = "4.12.1";
41
42
 
42
43
  //#endregion
43
44
  //#region src/schemas/generateSchema.ts
@@ -82,7 +83,10 @@ async function generate({ plugin, openApi, operationId }) {
82
83
  },
83
84
  plugins
84
85
  };
85
- const { fabric, error } = await (0, __kubb_core.safeBuild)({ config: definedConfig });
86
+ const { fabric, error } = await (0, __kubb_core.safeBuild)({
87
+ config: definedConfig,
88
+ events: new __kubb_core_utils.AsyncEventEmitter()
89
+ });
86
90
  if (error) return {
87
91
  content: [{
88
92
  type: "text",
@@ -136,4 +140,4 @@ Object.defineProperty(exports, 'startServer', {
136
140
  return startServer;
137
141
  }
138
142
  });
139
- //# sourceMappingURL=src-D-wHMffz.cjs.map
143
+ //# sourceMappingURL=src-DyIlQ-4P.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-DyIlQ-4P.cjs","names":["z","FileProcessor","definedConfig: Config","AsyncEventEmitter","StdioServerTransport","McpServer"],"sources":["../package.json","../src/schemas/generateSchema.ts","../src/tools/generate.ts","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@kubb/mcp\",\n \"version\": \"4.12.1\",\n \"description\": \"Generator MCP\",\n \"keywords\": [\n \"typescript\",\n \"plugins\",\n \"kubb\",\n \"codegen\",\n \"MCP\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/kubb-labs/kubb.git\",\n \"directory\": \"packages/mcp\"\n },\n \"license\": \"MIT\",\n \"author\": \"stijnvanhulle\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.cjs\",\n \"import\": \"./dist/index.js\"\n },\n \"./server\": {\n \"require\": \"./dist/server.cjs\",\n \"import\": \"./dist/server.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"typesVersions\": {\n \"*\": {\n \"server\": [\n \"./dist/server.d.ts\"\n ]\n }\n },\n \"files\": [\n \"src\",\n \"dist\",\n \"!/**/**.test.**\",\n \"!/**/__tests__/**\"\n ],\n \"size-limit\": [\n {\n \"path\": \"./dist/*.js\",\n \"limit\": \"510 KiB\",\n \"gzip\": true\n }\n ],\n \"scripts\": {\n \"build\": \"tsdown && size-limit\",\n \"start:mcp\": \"bun --watch ./src/server.ts\",\n \"debug:mcp\": \"npx -y @modelcontextprotocol/inspector node ./dist/server.js\",\n \"clean\": \"npx rimraf ./dist\",\n \"lint\": \"bun biome lint .\",\n \"lint:fix\": \"bun biome lint --fix --unsafe .\",\n \"release\": \"pnpm publish --no-git-check\",\n \"release:canary\": \"bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check\",\n \"start\": \"tsdown --watch\",\n \"test\": \"vitest --passWithNoTests\",\n \"typecheck\": \"tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false\"\n },\n \"dependencies\": {\n \"@kubb/core\": \"workspace:*\",\n \"@kubb/plugin-client\": \"workspace:*\",\n \"@kubb/plugin-cypress\": \"workspace:*\",\n \"@kubb/plugin-faker\": \"workspace:*\",\n \"@kubb/plugin-mcp\": \"workspace:*\",\n \"@kubb/plugin-msw\": \"workspace:*\",\n \"@kubb/plugin-oas\": \"workspace:*\",\n \"@kubb/plugin-react-query\": \"workspace:*\",\n \"@kubb/plugin-redoc\": \"workspace:*\",\n \"@kubb/plugin-swr\": \"workspace:*\",\n \"@kubb/plugin-ts\": \"workspace:*\",\n \"@kubb/plugin-zod\": \"workspace:*\",\n \"@kubb/react-fabric\": \"catalog:\",\n \"@modelcontextprotocol/sdk\": \"1.21.1\",\n \"zod\": \"^3.25.76\"\n },\n \"peerDependencies\": {\n \"@kubb/react-fabric\": \"0.7.0\"\n },\n \"devDependencies\": {\n \"@kubb/plugin-oas\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n }\n}\n","import { z } from 'zod'\n\nexport const generateSchema = z.object({\n openApi: z.string().default('https://petstore.swagger.io/v2/swagger.json').describe('OpenAPI/Swagger spec'),\n plugin: z.enum(['typescript', 'react-query']).describe('Plugin to use'),\n operationId: z.string().nullable().optional().describe('Which operationId should be used'),\n // schemaName: z.string().nullable().optional().describe('Which schema should be used'),\n})\n","import { type Config, type KubbEvents, type Plugin, safeBuild } from '@kubb/core'\nimport { AsyncEventEmitter } from '@kubb/core/utils'\nimport { type Include, pluginOas } from '@kubb/plugin-oas'\nimport { pluginReactQuery } from '@kubb/plugin-react-query'\nimport { pluginTs } from '@kubb/plugin-ts'\nimport { createFile, FileProcessor } from '@kubb/react-fabric'\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.d.ts'\nimport type { z } from 'zod'\nimport type { generateSchema } from '../schemas/generateSchema.ts'\n\nexport async function generate({ plugin, openApi, operationId }: z.infer<typeof generateSchema>): Promise<CallToolResult> {\n try {\n const include = [\n operationId\n ? {\n type: 'operationId',\n pattern: operationId,\n }\n : undefined,\n ].filter(Boolean) as Include[]\n\n const plugins = [\n pluginOas({ validate: false, generators: [] }),\n pluginTs({\n output: {\n path: 'typescript.ts',\n },\n generators: plugin === 'typescript' ? undefined : [],\n include,\n }),\n pluginReactQuery({\n output: {\n path: 'react-query.ts',\n },\n generators: plugin === 'react-query' ? undefined : [],\n include,\n }),\n ].filter(Boolean) as Plugin[]\n\n const fileProcessor = new FileProcessor()\n const definedConfig: Config = {\n root: process.cwd(),\n input: {\n data: openApi,\n },\n output: {\n path: './',\n write: false,\n barrelType: 'named',\n },\n plugins,\n }\n\n const { fabric, error } = await safeBuild({\n config: definedConfig,\n events: new AsyncEventEmitter<KubbEvents>(),\n })\n\n if (error) {\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n\n const promises = fabric.files.map(async (file) => {\n return fileProcessor.parse(createFile(file))\n })\n\n const sources = await Promise.all(promises)\n\n return {\n content: [\n // {\n // type: 'resource',\n // resource: {}\n // },\n {\n type: 'text',\n text: `Config: ${JSON.stringify(definedConfig, null, 2)}`,\n },\n {\n type: 'text',\n text: `Files: ${JSON.stringify(sources, null, 2)}`,\n },\n ],\n }\n } catch (e) {\n const error = e as Error\n\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n}\n","import process from 'node:process'\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'\nimport { version } from '../package.json'\nimport { generateSchema } from './schemas/generateSchema.ts'\nimport { generate } from './tools/generate.ts'\n\nexport async function startServer() {\n try {\n const transport = new StdioServerTransport()\n const server = new McpServer({\n name: 'Kubb',\n version,\n })\n\n server.tool('generate', 'generate an openAPI spec to a code snippet', generateSchema.shape, generate)\n\n await server.connect(transport)\n } catch (error) {\n console.error('Failed to start server:', error)\n process.exit(1)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEa;;;;ACAb,MAAa,iBAAiBA,MAAE,OAAO;CACrC,SAASA,MAAE,QAAQ,CAAC,QAAQ,8CAA8C,CAAC,SAAS,uBAAuB;CAC3G,QAAQA,MAAE,KAAK,CAAC,cAAc,cAAc,CAAC,CAAC,SAAS,gBAAgB;CACvE,aAAaA,MAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,mCAAmC;CAE3F,CAAC;;;;ACGF,eAAsB,SAAS,EAAE,QAAQ,SAAS,eAAwE;AACxH,KAAI;EACF,MAAM,UAAU,CACd,cACI;GACE,MAAM;GACN,SAAS;GACV,GACD,OACL,CAAC,OAAO,QAAQ;EAEjB,MAAM,UAAU;oCACJ;IAAE,UAAU;IAAO,YAAY,EAAE;IAAE,CAAC;kCACrC;IACP,QAAQ,EACN,MAAM,iBACP;IACD,YAAY,WAAW,eAAe,SAAY,EAAE;IACpD;IACD,CAAC;mDACe;IACf,QAAQ,EACN,MAAM,kBACP;IACD,YAAY,WAAW,gBAAgB,SAAY,EAAE;IACrD;IACD,CAAC;GACH,CAAC,OAAO,QAAQ;EAEjB,MAAM,gBAAgB,IAAIC,mCAAe;EACzC,MAAMC,gBAAwB;GAC5B,MAAM,QAAQ,KAAK;GACnB,OAAO,EACL,MAAM,SACP;GACD,QAAQ;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACb;GACD;GACD;EAED,MAAM,EAAE,QAAQ,UAAU,iCAAgB;GACxC,QAAQ;GACR,QAAQ,IAAIC,qCAA+B;GAC5C,CAAC;AAEF,MAAI,MACF,QAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MAAM,MAAM;IACb,CACF;GACD,SAAS;GACV;EAGH,MAAM,WAAW,OAAO,MAAM,IAAI,OAAO,SAAS;AAChD,UAAO,cAAc,0CAAiB,KAAK,CAAC;IAC5C;EAEF,MAAM,UAAU,MAAM,QAAQ,IAAI,SAAS;AAE3C,SAAO,EACL,SAAS,CAKP;GACE,MAAM;GACN,MAAM,WAAW,KAAK,UAAU,eAAe,MAAM,EAAE;GACxD,EACD;GACE,MAAM;GACN,MAAM,UAAU,KAAK,UAAU,SAAS,MAAM,EAAE;GACjD,CACF,EACF;UACM,GAAG;AAGV,SAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MANQ,EAMI;IACb,CACF;GACD,SAAS;GACV;;;;;;AChGL,eAAsB,cAAc;AAClC,KAAI;EACF,MAAM,YAAY,IAAIC,iEAAsB;EAC5C,MAAM,SAAS,IAAIC,mDAAU;GAC3B,MAAM;GACN;GACD,CAAC;AAEF,SAAO,KAAK,YAAY,8CAA8C,eAAe,OAAO,SAAS;AAErG,QAAM,OAAO,QAAQ,UAAU;UACxB,OAAO;AACd,UAAQ,MAAM,2BAA2B,MAAM;AAC/C,uBAAQ,KAAK,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/mcp",
3
- "version": "4.11.3",
3
+ "version": "4.12.1",
4
4
  "description": "Generator MCP",
5
5
  "keywords": [
6
6
  "typescript",
@@ -53,27 +53,27 @@
53
53
  }
54
54
  ],
55
55
  "dependencies": {
56
- "@kubb/react-fabric": "0.5.4",
56
+ "@kubb/react-fabric": "0.7.0",
57
57
  "@modelcontextprotocol/sdk": "1.21.1",
58
58
  "zod": "^3.25.76",
59
- "@kubb/core": "4.11.3",
60
- "@kubb/plugin-client": "4.11.3",
61
- "@kubb/plugin-cypress": "4.11.3",
62
- "@kubb/plugin-faker": "4.11.3",
63
- "@kubb/plugin-mcp": "4.11.3",
64
- "@kubb/plugin-msw": "4.11.3",
65
- "@kubb/plugin-oas": "4.11.3",
66
- "@kubb/plugin-react-query": "4.11.3",
67
- "@kubb/plugin-redoc": "4.11.3",
68
- "@kubb/plugin-swr": "4.11.3",
69
- "@kubb/plugin-ts": "4.11.3",
70
- "@kubb/plugin-zod": "4.11.3"
59
+ "@kubb/core": "4.12.1",
60
+ "@kubb/plugin-client": "4.12.1",
61
+ "@kubb/plugin-cypress": "4.12.1",
62
+ "@kubb/plugin-faker": "4.12.1",
63
+ "@kubb/plugin-mcp": "4.12.1",
64
+ "@kubb/plugin-msw": "4.12.1",
65
+ "@kubb/plugin-oas": "4.12.1",
66
+ "@kubb/plugin-react-query": "4.12.1",
67
+ "@kubb/plugin-redoc": "4.12.1",
68
+ "@kubb/plugin-swr": "4.12.1",
69
+ "@kubb/plugin-ts": "4.12.1",
70
+ "@kubb/plugin-zod": "4.12.1"
71
71
  },
72
72
  "peerDependencies": {
73
- "@kubb/react-fabric": "0.5.4"
73
+ "@kubb/react-fabric": "0.7.0"
74
74
  },
75
75
  "devDependencies": {
76
- "@kubb/plugin-oas": "4.11.3"
76
+ "@kubb/plugin-oas": "4.12.1"
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=20"
@@ -1,4 +1,5 @@
1
- import { type Config, type Plugin, safeBuild } from '@kubb/core'
1
+ import { type Config, type KubbEvents, type Plugin, safeBuild } from '@kubb/core'
2
+ import { AsyncEventEmitter } from '@kubb/core/utils'
2
3
  import { type Include, pluginOas } from '@kubb/plugin-oas'
3
4
  import { pluginReactQuery } from '@kubb/plugin-react-query'
4
5
  import { pluginTs } from '@kubb/plugin-ts'
@@ -52,6 +53,7 @@ export async function generate({ plugin, openApi, operationId }: z.infer<typeof
52
53
 
53
54
  const { fabric, error } = await safeBuild({
54
55
  config: definedConfig,
56
+ events: new AsyncEventEmitter<KubbEvents>(),
55
57
  })
56
58
 
57
59
  if (error) {
@@ -1 +0,0 @@
1
- {"version":3,"file":"src-D-wHMffz.cjs","names":["z","FileProcessor","definedConfig: Config","StdioServerTransport","McpServer"],"sources":["../package.json","../src/schemas/generateSchema.ts","../src/tools/generate.ts","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@kubb/mcp\",\n \"version\": \"4.11.3\",\n \"description\": \"Generator MCP\",\n \"keywords\": [\n \"typescript\",\n \"plugins\",\n \"kubb\",\n \"codegen\",\n \"MCP\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/kubb-labs/kubb.git\",\n \"directory\": \"packages/mcp\"\n },\n \"license\": \"MIT\",\n \"author\": \"stijnvanhulle\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.cjs\",\n \"import\": \"./dist/index.js\"\n },\n \"./server\": {\n \"require\": \"./dist/server.cjs\",\n \"import\": \"./dist/server.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"typesVersions\": {\n \"*\": {\n \"server\": [\n \"./dist/server.d.ts\"\n ]\n }\n },\n \"files\": [\n \"src\",\n \"dist\",\n \"!/**/**.test.**\",\n \"!/**/__tests__/**\"\n ],\n \"size-limit\": [\n {\n \"path\": \"./dist/*.js\",\n \"limit\": \"510 KiB\",\n \"gzip\": true\n }\n ],\n \"scripts\": {\n \"build\": \"tsdown && size-limit\",\n \"start:mcp\": \"bun --watch ./src/server.ts\",\n \"debug:mcp\": \"npx -y @modelcontextprotocol/inspector node ./dist/server.js\",\n \"clean\": \"npx rimraf ./dist\",\n \"lint\": \"bun biome lint .\",\n \"lint:fix\": \"bun biome lint --fix --unsafe .\",\n \"release\": \"pnpm publish --no-git-check\",\n \"release:canary\": \"bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check\",\n \"start\": \"tsdown --watch\",\n \"test\": \"vitest --passWithNoTests\",\n \"typecheck\": \"tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false\"\n },\n \"dependencies\": {\n \"@kubb/core\": \"workspace:*\",\n \"@kubb/plugin-client\": \"workspace:*\",\n \"@kubb/plugin-cypress\": \"workspace:*\",\n \"@kubb/plugin-faker\": \"workspace:*\",\n \"@kubb/plugin-mcp\": \"workspace:*\",\n \"@kubb/plugin-msw\": \"workspace:*\",\n \"@kubb/plugin-oas\": \"workspace:*\",\n \"@kubb/plugin-react-query\": \"workspace:*\",\n \"@kubb/plugin-redoc\": \"workspace:*\",\n \"@kubb/plugin-swr\": \"workspace:*\",\n \"@kubb/plugin-ts\": \"workspace:*\",\n \"@kubb/plugin-zod\": \"workspace:*\",\n \"@kubb/react-fabric\": \"catalog:\",\n \"@modelcontextprotocol/sdk\": \"1.21.1\",\n \"zod\": \"^3.25.76\"\n },\n \"peerDependencies\": {\n \"@kubb/react-fabric\": \"0.5.4\"\n },\n \"devDependencies\": {\n \"@kubb/plugin-oas\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n }\n}\n","import { z } from 'zod'\n\nexport const generateSchema = z.object({\n openApi: z.string().default('https://petstore.swagger.io/v2/swagger.json').describe('OpenAPI/Swagger spec'),\n plugin: z.enum(['typescript', 'react-query']).describe('Plugin to use'),\n operationId: z.string().nullable().optional().describe('Which operationId should be used'),\n // schemaName: z.string().nullable().optional().describe('Which schema should be used'),\n})\n","import { type Config, type Plugin, safeBuild } from '@kubb/core'\nimport { type Include, pluginOas } from '@kubb/plugin-oas'\nimport { pluginReactQuery } from '@kubb/plugin-react-query'\nimport { pluginTs } from '@kubb/plugin-ts'\nimport { createFile, FileProcessor } from '@kubb/react-fabric'\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.d.ts'\nimport type { z } from 'zod'\nimport type { generateSchema } from '../schemas/generateSchema.ts'\n\nexport async function generate({ plugin, openApi, operationId }: z.infer<typeof generateSchema>): Promise<CallToolResult> {\n try {\n const include = [\n operationId\n ? {\n type: 'operationId',\n pattern: operationId,\n }\n : undefined,\n ].filter(Boolean) as Include[]\n\n const plugins = [\n pluginOas({ validate: false, generators: [] }),\n pluginTs({\n output: {\n path: 'typescript.ts',\n },\n generators: plugin === 'typescript' ? undefined : [],\n include,\n }),\n pluginReactQuery({\n output: {\n path: 'react-query.ts',\n },\n generators: plugin === 'react-query' ? undefined : [],\n include,\n }),\n ].filter(Boolean) as Plugin[]\n\n const fileProcessor = new FileProcessor()\n const definedConfig: Config = {\n root: process.cwd(),\n input: {\n data: openApi,\n },\n output: {\n path: './',\n write: false,\n barrelType: 'named',\n },\n plugins,\n }\n\n const { fabric, error } = await safeBuild({\n config: definedConfig,\n })\n\n if (error) {\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n\n const promises = fabric.files.map(async (file) => {\n return fileProcessor.parse(createFile(file))\n })\n\n const sources = await Promise.all(promises)\n\n return {\n content: [\n // {\n // type: 'resource',\n // resource: {}\n // },\n {\n type: 'text',\n text: `Config: ${JSON.stringify(definedConfig, null, 2)}`,\n },\n {\n type: 'text',\n text: `Files: ${JSON.stringify(sources, null, 2)}`,\n },\n ],\n }\n } catch (e) {\n const error = e as Error\n\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n}\n","import process from 'node:process'\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'\nimport { version } from '../package.json'\nimport { generateSchema } from './schemas/generateSchema.ts'\nimport { generate } from './tools/generate.ts'\n\nexport async function startServer() {\n try {\n const transport = new StdioServerTransport()\n const server = new McpServer({\n name: 'Kubb',\n version,\n })\n\n server.tool('generate', 'generate an openAPI spec to a code snippet', generateSchema.shape, generate)\n\n await server.connect(transport)\n } catch (error) {\n console.error('Failed to start server:', error)\n process.exit(1)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEa;;;;ACAb,MAAa,iBAAiBA,MAAE,OAAO;CACrC,SAASA,MAAE,QAAQ,CAAC,QAAQ,8CAA8C,CAAC,SAAS,uBAAuB;CAC3G,QAAQA,MAAE,KAAK,CAAC,cAAc,cAAc,CAAC,CAAC,SAAS,gBAAgB;CACvE,aAAaA,MAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,mCAAmC;CAE3F,CAAC;;;;ACEF,eAAsB,SAAS,EAAE,QAAQ,SAAS,eAAwE;AACxH,KAAI;EACF,MAAM,UAAU,CACd,cACI;GACE,MAAM;GACN,SAAS;GACV,GACD,OACL,CAAC,OAAO,QAAQ;EAEjB,MAAM,UAAU;oCACJ;IAAE,UAAU;IAAO,YAAY,EAAE;IAAE,CAAC;kCACrC;IACP,QAAQ,EACN,MAAM,iBACP;IACD,YAAY,WAAW,eAAe,SAAY,EAAE;IACpD;IACD,CAAC;mDACe;IACf,QAAQ,EACN,MAAM,kBACP;IACD,YAAY,WAAW,gBAAgB,SAAY,EAAE;IACrD;IACD,CAAC;GACH,CAAC,OAAO,QAAQ;EAEjB,MAAM,gBAAgB,IAAIC,mCAAe;EACzC,MAAMC,gBAAwB;GAC5B,MAAM,QAAQ,KAAK;GACnB,OAAO,EACL,MAAM,SACP;GACD,QAAQ;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACb;GACD;GACD;EAED,MAAM,EAAE,QAAQ,UAAU,iCAAgB,EACxC,QAAQ,eACT,CAAC;AAEF,MAAI,MACF,QAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MAAM,MAAM;IACb,CACF;GACD,SAAS;GACV;EAGH,MAAM,WAAW,OAAO,MAAM,IAAI,OAAO,SAAS;AAChD,UAAO,cAAc,0CAAiB,KAAK,CAAC;IAC5C;EAEF,MAAM,UAAU,MAAM,QAAQ,IAAI,SAAS;AAE3C,SAAO,EACL,SAAS,CAKP;GACE,MAAM;GACN,MAAM,WAAW,KAAK,UAAU,eAAe,MAAM,EAAE;GACxD,EACD;GACE,MAAM;GACN,MAAM,UAAU,KAAK,UAAU,SAAS,MAAM,EAAE;GACjD,CACF,EACF;UACM,GAAG;AAGV,SAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MANQ,EAMI;IACb,CACF;GACD,SAAS;GACV;;;;;;AC9FL,eAAsB,cAAc;AAClC,KAAI;EACF,MAAM,YAAY,IAAIC,iEAAsB;EAC5C,MAAM,SAAS,IAAIC,mDAAU;GAC3B,MAAM;GACN;GACD,CAAC;AAEF,SAAO,KAAK,YAAY,8CAA8C,eAAe,OAAO,SAAS;AAErG,QAAM,OAAO,QAAQ,UAAU;UACxB,OAAO;AACd,UAAQ,MAAM,2BAA2B,MAAM;AAC/C,uBAAQ,KAAK,EAAE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"src-UsG-rjQQ.js","names":["definedConfig: Config"],"sources":["../package.json","../src/schemas/generateSchema.ts","../src/tools/generate.ts","../src/index.ts"],"sourcesContent":["{\n \"name\": \"@kubb/mcp\",\n \"version\": \"4.11.3\",\n \"description\": \"Generator MCP\",\n \"keywords\": [\n \"typescript\",\n \"plugins\",\n \"kubb\",\n \"codegen\",\n \"MCP\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/kubb-labs/kubb.git\",\n \"directory\": \"packages/mcp\"\n },\n \"license\": \"MIT\",\n \"author\": \"stijnvanhulle\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.cjs\",\n \"import\": \"./dist/index.js\"\n },\n \"./server\": {\n \"require\": \"./dist/server.cjs\",\n \"import\": \"./dist/server.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"typesVersions\": {\n \"*\": {\n \"server\": [\n \"./dist/server.d.ts\"\n ]\n }\n },\n \"files\": [\n \"src\",\n \"dist\",\n \"!/**/**.test.**\",\n \"!/**/__tests__/**\"\n ],\n \"size-limit\": [\n {\n \"path\": \"./dist/*.js\",\n \"limit\": \"510 KiB\",\n \"gzip\": true\n }\n ],\n \"scripts\": {\n \"build\": \"tsdown && size-limit\",\n \"start:mcp\": \"bun --watch ./src/server.ts\",\n \"debug:mcp\": \"npx -y @modelcontextprotocol/inspector node ./dist/server.js\",\n \"clean\": \"npx rimraf ./dist\",\n \"lint\": \"bun biome lint .\",\n \"lint:fix\": \"bun biome lint --fix --unsafe .\",\n \"release\": \"pnpm publish --no-git-check\",\n \"release:canary\": \"bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check\",\n \"start\": \"tsdown --watch\",\n \"test\": \"vitest --passWithNoTests\",\n \"typecheck\": \"tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false\"\n },\n \"dependencies\": {\n \"@kubb/core\": \"workspace:*\",\n \"@kubb/plugin-client\": \"workspace:*\",\n \"@kubb/plugin-cypress\": \"workspace:*\",\n \"@kubb/plugin-faker\": \"workspace:*\",\n \"@kubb/plugin-mcp\": \"workspace:*\",\n \"@kubb/plugin-msw\": \"workspace:*\",\n \"@kubb/plugin-oas\": \"workspace:*\",\n \"@kubb/plugin-react-query\": \"workspace:*\",\n \"@kubb/plugin-redoc\": \"workspace:*\",\n \"@kubb/plugin-swr\": \"workspace:*\",\n \"@kubb/plugin-ts\": \"workspace:*\",\n \"@kubb/plugin-zod\": \"workspace:*\",\n \"@kubb/react-fabric\": \"catalog:\",\n \"@modelcontextprotocol/sdk\": \"1.21.1\",\n \"zod\": \"^3.25.76\"\n },\n \"peerDependencies\": {\n \"@kubb/react-fabric\": \"0.5.4\"\n },\n \"devDependencies\": {\n \"@kubb/plugin-oas\": \"workspace:*\"\n },\n \"engines\": {\n \"node\": \">=20\"\n },\n \"publishConfig\": {\n \"access\": \"public\",\n \"registry\": \"https://registry.npmjs.org/\"\n }\n}\n","import { z } from 'zod'\n\nexport const generateSchema = z.object({\n openApi: z.string().default('https://petstore.swagger.io/v2/swagger.json').describe('OpenAPI/Swagger spec'),\n plugin: z.enum(['typescript', 'react-query']).describe('Plugin to use'),\n operationId: z.string().nullable().optional().describe('Which operationId should be used'),\n // schemaName: z.string().nullable().optional().describe('Which schema should be used'),\n})\n","import { type Config, type Plugin, safeBuild } from '@kubb/core'\nimport { type Include, pluginOas } from '@kubb/plugin-oas'\nimport { pluginReactQuery } from '@kubb/plugin-react-query'\nimport { pluginTs } from '@kubb/plugin-ts'\nimport { createFile, FileProcessor } from '@kubb/react-fabric'\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.d.ts'\nimport type { z } from 'zod'\nimport type { generateSchema } from '../schemas/generateSchema.ts'\n\nexport async function generate({ plugin, openApi, operationId }: z.infer<typeof generateSchema>): Promise<CallToolResult> {\n try {\n const include = [\n operationId\n ? {\n type: 'operationId',\n pattern: operationId,\n }\n : undefined,\n ].filter(Boolean) as Include[]\n\n const plugins = [\n pluginOas({ validate: false, generators: [] }),\n pluginTs({\n output: {\n path: 'typescript.ts',\n },\n generators: plugin === 'typescript' ? undefined : [],\n include,\n }),\n pluginReactQuery({\n output: {\n path: 'react-query.ts',\n },\n generators: plugin === 'react-query' ? undefined : [],\n include,\n }),\n ].filter(Boolean) as Plugin[]\n\n const fileProcessor = new FileProcessor()\n const definedConfig: Config = {\n root: process.cwd(),\n input: {\n data: openApi,\n },\n output: {\n path: './',\n write: false,\n barrelType: 'named',\n },\n plugins,\n }\n\n const { fabric, error } = await safeBuild({\n config: definedConfig,\n })\n\n if (error) {\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n\n const promises = fabric.files.map(async (file) => {\n return fileProcessor.parse(createFile(file))\n })\n\n const sources = await Promise.all(promises)\n\n return {\n content: [\n // {\n // type: 'resource',\n // resource: {}\n // },\n {\n type: 'text',\n text: `Config: ${JSON.stringify(definedConfig, null, 2)}`,\n },\n {\n type: 'text',\n text: `Files: ${JSON.stringify(sources, null, 2)}`,\n },\n ],\n }\n } catch (e) {\n const error = e as Error\n\n return {\n content: [\n {\n type: 'text',\n text: error.message,\n },\n ],\n isError: true,\n }\n }\n}\n","import process from 'node:process'\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'\nimport { version } from '../package.json'\nimport { generateSchema } from './schemas/generateSchema.ts'\nimport { generate } from './tools/generate.ts'\n\nexport async function startServer() {\n try {\n const transport = new StdioServerTransport()\n const server = new McpServer({\n name: 'Kubb',\n version,\n })\n\n server.tool('generate', 'generate an openAPI spec to a code snippet', generateSchema.shape, generate)\n\n await server.connect(transport)\n } catch (error) {\n console.error('Failed to start server:', error)\n process.exit(1)\n }\n}\n"],"mappings":";;;;;;;;;;;cAEa;;;;ACAb,MAAa,iBAAiB,EAAE,OAAO;CACrC,SAAS,EAAE,QAAQ,CAAC,QAAQ,8CAA8C,CAAC,SAAS,uBAAuB;CAC3G,QAAQ,EAAE,KAAK,CAAC,cAAc,cAAc,CAAC,CAAC,SAAS,gBAAgB;CACvE,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,mCAAmC;CAE3F,CAAC;;;;ACEF,eAAsB,SAAS,EAAE,QAAQ,SAAS,eAAwE;AACxH,KAAI;EACF,MAAM,UAAU,CACd,cACI;GACE,MAAM;GACN,SAAS;GACV,GACD,OACL,CAAC,OAAO,QAAQ;EAEjB,MAAM,UAAU;GACd,UAAU;IAAE,UAAU;IAAO,YAAY,EAAE;IAAE,CAAC;GAC9C,SAAS;IACP,QAAQ,EACN,MAAM,iBACP;IACD,YAAY,WAAW,eAAe,SAAY,EAAE;IACpD;IACD,CAAC;GACF,iBAAiB;IACf,QAAQ,EACN,MAAM,kBACP;IACD,YAAY,WAAW,gBAAgB,SAAY,EAAE;IACrD;IACD,CAAC;GACH,CAAC,OAAO,QAAQ;EAEjB,MAAM,gBAAgB,IAAI,eAAe;EACzC,MAAMA,gBAAwB;GAC5B,MAAM,QAAQ,KAAK;GACnB,OAAO,EACL,MAAM,SACP;GACD,QAAQ;IACN,MAAM;IACN,OAAO;IACP,YAAY;IACb;GACD;GACD;EAED,MAAM,EAAE,QAAQ,UAAU,MAAM,UAAU,EACxC,QAAQ,eACT,CAAC;AAEF,MAAI,MACF,QAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MAAM,MAAM;IACb,CACF;GACD,SAAS;GACV;EAGH,MAAM,WAAW,OAAO,MAAM,IAAI,OAAO,SAAS;AAChD,UAAO,cAAc,MAAM,WAAW,KAAK,CAAC;IAC5C;EAEF,MAAM,UAAU,MAAM,QAAQ,IAAI,SAAS;AAE3C,SAAO,EACL,SAAS,CAKP;GACE,MAAM;GACN,MAAM,WAAW,KAAK,UAAU,eAAe,MAAM,EAAE;GACxD,EACD;GACE,MAAM;GACN,MAAM,UAAU,KAAK,UAAU,SAAS,MAAM,EAAE;GACjD,CACF,EACF;UACM,GAAG;AAGV,SAAO;GACL,SAAS,CACP;IACE,MAAM;IACN,MANQ,EAMI;IACb,CACF;GACD,SAAS;GACV;;;;;;AC9FL,eAAsB,cAAc;AAClC,KAAI;EACF,MAAM,YAAY,IAAI,sBAAsB;EAC5C,MAAM,SAAS,IAAI,UAAU;GAC3B,MAAM;GACN;GACD,CAAC;AAEF,SAAO,KAAK,YAAY,8CAA8C,eAAe,OAAO,SAAS;AAErG,QAAM,OAAO,QAAQ,UAAU;UACxB,OAAO;AACd,UAAQ,MAAM,2BAA2B,MAAM;AAC/C,YAAQ,KAAK,EAAE"}