@kubb/cli 5.0.0-beta.11 → 5.0.0-beta.13

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.
Files changed (35) hide show
  1. package/dist/{agent-DB8Fr0U8.cjs → agent-BeYTwPeX.cjs} +2 -2
  2. package/dist/{agent-DB8Fr0U8.cjs.map → agent-BeYTwPeX.cjs.map} +1 -1
  3. package/dist/{agent-DcsBatCv.js → agent-C75Hr-Ke.js} +2 -2
  4. package/dist/{agent-DcsBatCv.js.map → agent-C75Hr-Ke.js.map} +1 -1
  5. package/dist/{generate-DVe4vPXT.cjs → generate-BF3AjiUf.cjs} +2 -2
  6. package/dist/{generate-DVe4vPXT.cjs.map → generate-BF3AjiUf.cjs.map} +1 -1
  7. package/dist/{generate-dhgVXAZM.js → generate-CmWpaxKe.js} +2 -2
  8. package/dist/{generate-dhgVXAZM.js.map → generate-CmWpaxKe.js.map} +1 -1
  9. package/dist/index.cjs +6 -6
  10. package/dist/index.js +6 -6
  11. package/dist/{init-DDBAAtNw.cjs → init-0T26Xghs.cjs} +2 -2
  12. package/dist/{init-DDBAAtNw.cjs.map → init-0T26Xghs.cjs.map} +1 -1
  13. package/dist/{init-DalNYdKX.js → init-PsSoaB9c.js} +2 -2
  14. package/dist/{init-DalNYdKX.js.map → init-PsSoaB9c.js.map} +1 -1
  15. package/dist/{mcp-qo6oTY1b.js → mcp-Dfx8XKiP.js} +2 -2
  16. package/dist/{mcp-qo6oTY1b.js.map → mcp-Dfx8XKiP.js.map} +1 -1
  17. package/dist/{mcp-CjLC0gfa.cjs → mcp-hqkY4lKq.cjs} +2 -2
  18. package/dist/{mcp-CjLC0gfa.cjs.map → mcp-hqkY4lKq.cjs.map} +1 -1
  19. package/dist/{package-Dwr7GtJx.cjs → package-Cljxf8a3.cjs} +2 -2
  20. package/dist/package-Cljxf8a3.cjs.map +1 -0
  21. package/dist/package-DTbBkfHc.js +6 -0
  22. package/dist/package-DTbBkfHc.js.map +1 -0
  23. package/dist/{run-CdRxfPGM.js → run-34ctJY6B.js} +18 -10
  24. package/dist/{run-CdRxfPGM.js.map → run-34ctJY6B.js.map} +1 -1
  25. package/dist/{run-CqN9CaCO.cjs → run-N_c1Hr2j.cjs} +18 -10
  26. package/dist/{run-CqN9CaCO.cjs.map → run-N_c1Hr2j.cjs.map} +1 -1
  27. package/dist/{validate-D5HeJjHB.cjs → validate-Bbijcex8.cjs} +2 -2
  28. package/dist/{validate-D5HeJjHB.cjs.map → validate-Bbijcex8.cjs.map} +1 -1
  29. package/dist/{validate-C00u0BgS.js → validate-DU_icVNM.js} +2 -2
  30. package/dist/{validate-C00u0BgS.js.map → validate-DU_icVNM.js.map} +1 -1
  31. package/package.json +6 -6
  32. package/src/runners/generate/run.ts +15 -3
  33. package/dist/package-BS53bjcw.js +0 -6
  34. package/dist/package-BS53bjcw.js.map +0 -1
  35. package/dist/package-Dwr7GtJx.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  require("./chunk-ByKO4r7w.cjs");
2
2
  const require_define = require("./define-Bdn8j5VM.cjs");
3
- const require_package = require("./package-Dwr7GtJx.cjs");
3
+ const require_package = require("./package-Cljxf8a3.cjs");
4
4
  const require_constants = require("./constants-BINTA5VZ.cjs");
5
5
  //#region src/commands/agent/start.ts
6
6
  const command$1 = require_define.defineCommand({
@@ -67,4 +67,4 @@ const command = require_define.defineCommand({
67
67
  //#endregion
68
68
  exports.command = command;
69
69
 
70
- //# sourceMappingURL=agent-DB8Fr0U8.cjs.map
70
+ //# sourceMappingURL=agent-BeYTwPeX.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-DB8Fr0U8.cjs","names":["command","defineCommand","agentDefaults","defineCommand","startCommand"],"sources":["../src/commands/agent/start.ts","../src/commands/agent.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../../package.json'\nimport { agentDefaults } from '../../constants.ts'\n\nexport const command = defineCommand({\n name: 'start',\n description:\n 'Start the Kubb Agent HTTP server. Exposes a REST API that accepts a kubb.config.ts patch and returns generated code as a stream. Use --allow-write to also write files to disk.',\n examples: ['kubb agent start', 'kubb agent start --port 4000', 'kubb agent start --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config file',\n short: 'c',\n },\n port: {\n type: 'string',\n description: 'Port the HTTP server listens on',\n short: 'p',\n default: agentDefaults.port,\n },\n host: {\n type: 'string',\n description: 'Hostname the HTTP server binds to',\n default: agentDefaults.host,\n },\n 'allow-write': {\n type: 'boolean',\n description: 'Write generated files to the filesystem. When omitted, output is streamed only and no files are written.',\n default: false,\n },\n 'allow-all': {\n type: 'boolean',\n description: 'Grant all permissions (implies --allow-write).',\n default: false,\n },\n },\n async run({ values }) {\n const { run } = await import('../../runners/agent/run.ts')\n\n await run({\n port: values.port !== undefined ? values.port : undefined,\n host: values.host,\n configPath: values.config,\n allowWrite: values['allow-write'],\n allowAll: values['allow-all'],\n version,\n })\n },\n})\n","import { defineCommand } from '@internals/utils'\nimport { command as startCommand } from './agent/start.ts'\n\nexport const command = defineCommand({\n name: 'agent',\n description:\n 'Manage the Kubb Agent — an HTTP server that lets AI agents trigger code generation programmatically via a REST API. Useful when an AI workflow needs to generate code without direct CLI access.',\n examples: ['kubb agent start', 'kubb agent start --port 4000 --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;AAIA,MAAaA,YAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAAgC;EAAkC;EAAyD;CAC1J,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACR;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAASC,kBAAAA,cAAc;GACxB;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAASA,kBAAAA,cAAc;GACxB;EACD,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACD,aAAa;GACX,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;GAChD,MAAM,OAAO;GACb,YAAY,OAAO;GACnB,YAAY,OAAO;GACnB,UAAU,OAAO;GACjB,SAAA,gBAAA;GACD,CAAC;;CAEL,CAAC;;;AC9CF,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAA8C;EAAyD;CACtI,aAAa,CAACC,UAAa;CAC5B,CAAC"}
1
+ {"version":3,"file":"agent-BeYTwPeX.cjs","names":["command","defineCommand","agentDefaults","defineCommand","startCommand"],"sources":["../src/commands/agent/start.ts","../src/commands/agent.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../../package.json'\nimport { agentDefaults } from '../../constants.ts'\n\nexport const command = defineCommand({\n name: 'start',\n description:\n 'Start the Kubb Agent HTTP server. Exposes a REST API that accepts a kubb.config.ts patch and returns generated code as a stream. Use --allow-write to also write files to disk.',\n examples: ['kubb agent start', 'kubb agent start --port 4000', 'kubb agent start --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config file',\n short: 'c',\n },\n port: {\n type: 'string',\n description: 'Port the HTTP server listens on',\n short: 'p',\n default: agentDefaults.port,\n },\n host: {\n type: 'string',\n description: 'Hostname the HTTP server binds to',\n default: agentDefaults.host,\n },\n 'allow-write': {\n type: 'boolean',\n description: 'Write generated files to the filesystem. When omitted, output is streamed only and no files are written.',\n default: false,\n },\n 'allow-all': {\n type: 'boolean',\n description: 'Grant all permissions (implies --allow-write).',\n default: false,\n },\n },\n async run({ values }) {\n const { run } = await import('../../runners/agent/run.ts')\n\n await run({\n port: values.port !== undefined ? values.port : undefined,\n host: values.host,\n configPath: values.config,\n allowWrite: values['allow-write'],\n allowAll: values['allow-all'],\n version,\n })\n },\n})\n","import { defineCommand } from '@internals/utils'\nimport { command as startCommand } from './agent/start.ts'\n\nexport const command = defineCommand({\n name: 'agent',\n description:\n 'Manage the Kubb Agent — an HTTP server that lets AI agents trigger code generation programmatically via a REST API. Useful when an AI workflow needs to generate code without direct CLI access.',\n examples: ['kubb agent start', 'kubb agent start --port 4000 --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;AAIA,MAAaA,YAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAAgC;EAAkC;EAAyD;CAC1J,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACR;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAASC,kBAAAA,cAAc;GACxB;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAASA,kBAAAA,cAAc;GACxB;EACD,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACD,aAAa;GACX,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;GAChD,MAAM,OAAO;GACb,YAAY,OAAO;GACnB,YAAY,OAAO;GACnB,UAAU,OAAO;GACjB,SAAA,gBAAA;GACD,CAAC;;CAEL,CAAC;;;AC9CF,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAA8C;EAAyD;CACtI,aAAa,CAACC,UAAa;CAC5B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk-BvFE5Tac.js";
2
2
  import { n as defineCommand } from "./define-m_fp-Aqm.js";
3
- import { t as version } from "./package-BS53bjcw.js";
3
+ import { t as version } from "./package-DTbBkfHc.js";
4
4
  import { o as agentDefaults } from "./constants-B2JTeRBb.js";
5
5
  //#endregion
6
6
  //#region src/commands/agent.ts
@@ -65,4 +65,4 @@ const command = defineCommand({
65
65
  //#endregion
66
66
  export { command };
67
67
 
68
- //# sourceMappingURL=agent-DcsBatCv.js.map
68
+ //# sourceMappingURL=agent-C75Hr-Ke.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-DcsBatCv.js","names":["command","startCommand"],"sources":["../src/commands/agent/start.ts","../src/commands/agent.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../../package.json'\nimport { agentDefaults } from '../../constants.ts'\n\nexport const command = defineCommand({\n name: 'start',\n description:\n 'Start the Kubb Agent HTTP server. Exposes a REST API that accepts a kubb.config.ts patch and returns generated code as a stream. Use --allow-write to also write files to disk.',\n examples: ['kubb agent start', 'kubb agent start --port 4000', 'kubb agent start --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config file',\n short: 'c',\n },\n port: {\n type: 'string',\n description: 'Port the HTTP server listens on',\n short: 'p',\n default: agentDefaults.port,\n },\n host: {\n type: 'string',\n description: 'Hostname the HTTP server binds to',\n default: agentDefaults.host,\n },\n 'allow-write': {\n type: 'boolean',\n description: 'Write generated files to the filesystem. When omitted, output is streamed only and no files are written.',\n default: false,\n },\n 'allow-all': {\n type: 'boolean',\n description: 'Grant all permissions (implies --allow-write).',\n default: false,\n },\n },\n async run({ values }) {\n const { run } = await import('../../runners/agent/run.ts')\n\n await run({\n port: values.port !== undefined ? values.port : undefined,\n host: values.host,\n configPath: values.config,\n allowWrite: values['allow-write'],\n allowAll: values['allow-all'],\n version,\n })\n },\n})\n","import { defineCommand } from '@internals/utils'\nimport { command as startCommand } from './agent/start.ts'\n\nexport const command = defineCommand({\n name: 'agent',\n description:\n 'Manage the Kubb Agent — an HTTP server that lets AI agents trigger code generation programmatically via a REST API. Useful when an AI workflow needs to generate code without direct CLI access.',\n examples: ['kubb agent start', 'kubb agent start --port 4000 --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;;ACGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAA8C;EAAyD;CACtI,aAAa,CDJQ,cAAc;EACnC,MAAM;EACN,aACE;EACF,UAAU;GAAC;GAAoB;GAAgC;GAAkC;GAAyD;EAC1J,SAAS;GACP,QAAQ;IACN,MAAM;IACN,aAAa;IACb,OAAO;IACR;GACD,MAAM;IACJ,MAAM;IACN,aAAa;IACb,OAAO;IACP,SAAS,cAAc;IACxB;GACD,MAAM;IACJ,MAAM;IACN,aAAa;IACb,SAAS,cAAc;IACxB;GACD,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACD,aAAa;IACX,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACF;EACD,MAAM,IAAI,EAAE,UAAU;GACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;GAE7B,MAAM,IAAI;IACR,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;IAChD,MAAM,OAAO;IACb,YAAY,OAAO;IACnB,YAAY,OAAO;IACnB,UAAU,OAAO;IACjB;IACD,CAAC;;EAEL,CCzCeC,CAAa;CAC5B,CAAC"}
1
+ {"version":3,"file":"agent-C75Hr-Ke.js","names":["command","startCommand"],"sources":["../src/commands/agent/start.ts","../src/commands/agent.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../../package.json'\nimport { agentDefaults } from '../../constants.ts'\n\nexport const command = defineCommand({\n name: 'start',\n description:\n 'Start the Kubb Agent HTTP server. Exposes a REST API that accepts a kubb.config.ts patch and returns generated code as a stream. Use --allow-write to also write files to disk.',\n examples: ['kubb agent start', 'kubb agent start --port 4000', 'kubb agent start --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config file',\n short: 'c',\n },\n port: {\n type: 'string',\n description: 'Port the HTTP server listens on',\n short: 'p',\n default: agentDefaults.port,\n },\n host: {\n type: 'string',\n description: 'Hostname the HTTP server binds to',\n default: agentDefaults.host,\n },\n 'allow-write': {\n type: 'boolean',\n description: 'Write generated files to the filesystem. When omitted, output is streamed only and no files are written.',\n default: false,\n },\n 'allow-all': {\n type: 'boolean',\n description: 'Grant all permissions (implies --allow-write).',\n default: false,\n },\n },\n async run({ values }) {\n const { run } = await import('../../runners/agent/run.ts')\n\n await run({\n port: values.port !== undefined ? values.port : undefined,\n host: values.host,\n configPath: values.config,\n allowWrite: values['allow-write'],\n allowAll: values['allow-all'],\n version,\n })\n },\n})\n","import { defineCommand } from '@internals/utils'\nimport { command as startCommand } from './agent/start.ts'\n\nexport const command = defineCommand({\n name: 'agent',\n description:\n 'Manage the Kubb Agent — an HTTP server that lets AI agents trigger code generation programmatically via a REST API. Useful when an AI workflow needs to generate code without direct CLI access.',\n examples: ['kubb agent start', 'kubb agent start --port 4000 --allow-write', 'kubb agent start --config ./kubb.config.ts --allow-all'],\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;;ACGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAA8C;EAAyD;CACtI,aAAa,CDJQ,cAAc;EACnC,MAAM;EACN,aACE;EACF,UAAU;GAAC;GAAoB;GAAgC;GAAkC;GAAyD;EAC1J,SAAS;GACP,QAAQ;IACN,MAAM;IACN,aAAa;IACb,OAAO;IACR;GACD,MAAM;IACJ,MAAM;IACN,aAAa;IACb,OAAO;IACP,SAAS,cAAc;IACxB;GACD,MAAM;IACJ,MAAM;IACN,aAAa;IACb,SAAS,cAAc;IACxB;GACD,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACD,aAAa;IACX,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACF;EACD,MAAM,IAAI,EAAE,UAAU;GACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;GAE7B,MAAM,IAAI;IACR,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;IAChD,MAAM,OAAO;IACb,YAAY,OAAO;IACnB,YAAY,OAAO;IACnB,UAAU,OAAO;IACjB;IACD,CAAC;;EAEL,CCzCeC,CAAa;CAC5B,CAAC"}
@@ -56,7 +56,7 @@ const command = require("./define-Bdn8j5VM.cjs").defineCommand({
56
56
  },
57
57
  async run({ values, positionals }) {
58
58
  const logLevel = values.debug ? "debug" : values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
59
- const { run } = await Promise.resolve().then(() => require("./run-CqN9CaCO.cjs"));
59
+ const { run } = await Promise.resolve().then(() => require("./run-N_c1Hr2j.cjs"));
60
60
  await run({
61
61
  input: positionals[0],
62
62
  configPath: values.config,
@@ -68,4 +68,4 @@ const command = require("./define-Bdn8j5VM.cjs").defineCommand({
68
68
  //#endregion
69
69
  exports.command = command;
70
70
 
71
- //# sourceMappingURL=generate-DVe4vPXT.cjs.map
71
+ //# sourceMappingURL=generate-BF3AjiUf.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-DVe4vPXT.cjs","names":["defineCommand"],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\n\nexport const command = defineCommand({\n name: 'generate',\n description:\n 'Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.',\n arguments: ['[input]'],\n examples: ['kubb generate', 'kubb generate ./openapi.yaml', 'kubb generate --config kubb.config.ts', 'kubb generate --watch'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n logLevel: {\n type: 'string',\n description: 'Info, silent, verbose or debug',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose|debug',\n enum: ['silent', 'info', 'verbose', 'debug'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\n default: false,\n },\n debug: {\n type: 'boolean',\n description: 'Override logLevel to debug',\n short: 'd',\n default: false,\n },\n verbose: {\n type: 'boolean',\n description: 'Override logLevel to verbose',\n short: 'v',\n default: false,\n },\n silent: {\n type: 'boolean',\n description: 'Override logLevel to silent',\n short: 's',\n default: false,\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.debug ? 'debug' : values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const { run } = await import('../runners/generate/run.ts')\n\n await run({\n input: positionals[0],\n configPath: values.config,\n logLevel,\n watch: values.watch,\n })\n },\n})\n"],"mappings":";;AAEA,MAAa,0CAAUA,CAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,UAAU;CACtB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;EAAwB;CAC7H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACR;EACD,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;IAAW;IAAQ;GAC7C;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EACzG,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACf,CAAC;;CAEL,CAAC"}
1
+ {"version":3,"file":"generate-BF3AjiUf.cjs","names":["defineCommand"],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\n\nexport const command = defineCommand({\n name: 'generate',\n description:\n 'Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.',\n arguments: ['[input]'],\n examples: ['kubb generate', 'kubb generate ./openapi.yaml', 'kubb generate --config kubb.config.ts', 'kubb generate --watch'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n logLevel: {\n type: 'string',\n description: 'Info, silent, verbose or debug',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose|debug',\n enum: ['silent', 'info', 'verbose', 'debug'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\n default: false,\n },\n debug: {\n type: 'boolean',\n description: 'Override logLevel to debug',\n short: 'd',\n default: false,\n },\n verbose: {\n type: 'boolean',\n description: 'Override logLevel to verbose',\n short: 'v',\n default: false,\n },\n silent: {\n type: 'boolean',\n description: 'Override logLevel to silent',\n short: 's',\n default: false,\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.debug ? 'debug' : values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const { run } = await import('../runners/generate/run.ts')\n\n await run({\n input: positionals[0],\n configPath: values.config,\n logLevel,\n watch: values.watch,\n })\n },\n})\n"],"mappings":";;AAEA,MAAa,0CAAUA,CAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,UAAU;CACtB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;EAAwB;CAC7H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACR;EACD,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;IAAW;IAAQ;GAC7C;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EACzG,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACf,CAAC;;CAEL,CAAC"}
@@ -57,7 +57,7 @@ const command = defineCommand({
57
57
  },
58
58
  async run({ values, positionals }) {
59
59
  const logLevel = values.debug ? "debug" : values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
60
- const { run } = await import("./run-CdRxfPGM.js");
60
+ const { run } = await import("./run-34ctJY6B.js");
61
61
  await run({
62
62
  input: positionals[0],
63
63
  configPath: values.config,
@@ -69,4 +69,4 @@ const command = defineCommand({
69
69
  //#endregion
70
70
  export { command };
71
71
 
72
- //# sourceMappingURL=generate-dhgVXAZM.js.map
72
+ //# sourceMappingURL=generate-CmWpaxKe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-dhgVXAZM.js","names":[],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\n\nexport const command = defineCommand({\n name: 'generate',\n description:\n 'Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.',\n arguments: ['[input]'],\n examples: ['kubb generate', 'kubb generate ./openapi.yaml', 'kubb generate --config kubb.config.ts', 'kubb generate --watch'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n logLevel: {\n type: 'string',\n description: 'Info, silent, verbose or debug',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose|debug',\n enum: ['silent', 'info', 'verbose', 'debug'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\n default: false,\n },\n debug: {\n type: 'boolean',\n description: 'Override logLevel to debug',\n short: 'd',\n default: false,\n },\n verbose: {\n type: 'boolean',\n description: 'Override logLevel to verbose',\n short: 'v',\n default: false,\n },\n silent: {\n type: 'boolean',\n description: 'Override logLevel to silent',\n short: 's',\n default: false,\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.debug ? 'debug' : values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const { run } = await import('../runners/generate/run.ts')\n\n await run({\n input: positionals[0],\n configPath: values.config,\n logLevel,\n watch: values.watch,\n })\n },\n})\n"],"mappings":";;;AAEA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,UAAU;CACtB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;EAAwB;CAC7H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACR;EACD,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;IAAW;IAAQ;GAC7C;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EACzG,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACf,CAAC;;CAEL,CAAC"}
1
+ {"version":3,"file":"generate-CmWpaxKe.js","names":[],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\n\nexport const command = defineCommand({\n name: 'generate',\n description:\n 'Generate TypeScript types, API clients, React Query hooks, Zod schemas, and more from an OpenAPI specification. Reads kubb.config.ts by default. Pass an OpenAPI file path as the first argument to override the input without editing the config.',\n arguments: ['[input]'],\n examples: ['kubb generate', 'kubb generate ./openapi.yaml', 'kubb generate --config kubb.config.ts', 'kubb generate --watch'],\n options: {\n config: {\n type: 'string',\n description: 'Path to the Kubb config',\n short: 'c',\n },\n logLevel: {\n type: 'string',\n description: 'Info, silent, verbose or debug',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose|debug',\n enum: ['silent', 'info', 'verbose', 'debug'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\n default: false,\n },\n debug: {\n type: 'boolean',\n description: 'Override logLevel to debug',\n short: 'd',\n default: false,\n },\n verbose: {\n type: 'boolean',\n description: 'Override logLevel to verbose',\n short: 'v',\n default: false,\n },\n silent: {\n type: 'boolean',\n description: 'Override logLevel to silent',\n short: 's',\n default: false,\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.debug ? 'debug' : values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const { run } = await import('../runners/generate/run.ts')\n\n await run({\n input: positionals[0],\n configPath: values.config,\n logLevel,\n watch: values.watch,\n })\n },\n})\n"],"mappings":";;;AAEA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,UAAU;CACtB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;EAAwB;CAC7H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACR;EACD,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;IAAW;IAAQ;GAC7C;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EACzG,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACf,CAAC;;CAEL,CAAC"}
package/dist/index.cjs CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./chunk-ByKO4r7w.cjs");
3
3
  const require_define = require("./define-Bdn8j5VM.cjs");
4
4
  const require_telemetry = require("./telemetry-B2iWkY5e.cjs");
5
- const require_package = require("./package-Dwr7GtJx.cjs");
5
+ const require_package = require("./package-Cljxf8a3.cjs");
6
6
  const require_constants = require("./constants-BINTA5VZ.cjs");
7
7
  let node_util = require("node:util");
8
8
  //#region ../../internals/utils/src/cli/schema.ts
@@ -254,11 +254,11 @@ function shouldShowTelemetryNotice(argv) {
254
254
  }
255
255
  async function run(argv = process.argv) {
256
256
  if (shouldShowTelemetryNotice(argv)) console.log(`${(0, node_util.styleText)("yellow", "Notice:")} Kubb collects anonymous telemetry data to help improve the tool. No personal data or file contents are collected. \nTo disable, set ${(0, node_util.styleText)("cyan", "KUBB_DISABLE_TELEMETRY=1")}.\n`);
257
- const { command: generateCommand } = await Promise.resolve().then(() => require("./generate-DVe4vPXT.cjs"));
258
- const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-D5HeJjHB.cjs"));
259
- const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-CjLC0gfa.cjs"));
260
- const { command: agentCommand } = await Promise.resolve().then(() => require("./agent-DB8Fr0U8.cjs"));
261
- const { command: initCommand } = await Promise.resolve().then(() => require("./init-DDBAAtNw.cjs"));
257
+ const { command: generateCommand } = await Promise.resolve().then(() => require("./generate-BF3AjiUf.cjs"));
258
+ const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-Bbijcex8.cjs"));
259
+ const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-hqkY4lKq.cjs"));
260
+ const { command: agentCommand } = await Promise.resolve().then(() => require("./agent-BeYTwPeX.cjs"));
261
+ const { command: initCommand } = await Promise.resolve().then(() => require("./init-0T26Xghs.cjs"));
262
262
  await cli.run([
263
263
  generateCommand,
264
264
  validateCommand,
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./chunk-BvFE5Tac.js";
2
2
  import { t as defineCLIAdapter } from "./define-m_fp-Aqm.js";
3
3
  import { n as isTelemetryDisabled } from "./telemetry-BkektVz6.js";
4
- import { t as version } from "./package-BS53bjcw.js";
4
+ import { t as version } from "./package-DTbBkfHc.js";
5
5
  import { r as QUIET_FLAGS } from "./constants-B2JTeRBb.js";
6
6
  import { parseArgs, styleText } from "node:util";
7
7
  //#region ../../internals/utils/src/cli/schema.ts
@@ -253,11 +253,11 @@ function shouldShowTelemetryNotice(argv) {
253
253
  }
254
254
  async function run(argv = process.argv) {
255
255
  if (shouldShowTelemetryNotice(argv)) console.log(`${styleText("yellow", "Notice:")} Kubb collects anonymous telemetry data to help improve the tool. No personal data or file contents are collected. \nTo disable, set ${styleText("cyan", "KUBB_DISABLE_TELEMETRY=1")}.\n`);
256
- const { command: generateCommand } = await import("./generate-dhgVXAZM.js");
257
- const { command: validateCommand } = await import("./validate-C00u0BgS.js");
258
- const { command: mcpCommand } = await import("./mcp-qo6oTY1b.js");
259
- const { command: agentCommand } = await import("./agent-DcsBatCv.js");
260
- const { command: initCommand } = await import("./init-DalNYdKX.js");
256
+ const { command: generateCommand } = await import("./generate-CmWpaxKe.js");
257
+ const { command: validateCommand } = await import("./validate-DU_icVNM.js");
258
+ const { command: mcpCommand } = await import("./mcp-Dfx8XKiP.js");
259
+ const { command: agentCommand } = await import("./agent-C75Hr-Ke.js");
260
+ const { command: initCommand } = await import("./init-PsSoaB9c.js");
261
261
  await cli.run([
262
262
  generateCommand,
263
263
  validateCommand,
@@ -1,6 +1,6 @@
1
1
  require("./chunk-ByKO4r7w.cjs");
2
2
  const require_define = require("./define-Bdn8j5VM.cjs");
3
- const require_package = require("./package-Dwr7GtJx.cjs");
3
+ const require_package = require("./package-Cljxf8a3.cjs");
4
4
  //#region src/commands/init.ts
5
5
  const command = require_define.defineCommand({
6
6
  name: "init",
@@ -50,4 +50,4 @@ const command = require_define.defineCommand({
50
50
  //#endregion
51
51
  exports.command = command;
52
52
 
53
- //# sourceMappingURL=init-DDBAAtNw.cjs.map
53
+ //# sourceMappingURL=init-0T26Xghs.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-DDBAAtNw.cjs","names":["defineCommand"],"sources":["../src/commands/init.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'init',\n description:\n 'Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.',\n examples: [\n 'kubb init',\n 'kubb init --yes',\n 'kubb init --input ./openapi.yaml --output ./src/gen --plugins plugin-ts,plugin-zod',\n 'kubb init --plugins plugin-ts,plugin-client,plugin-react-query',\n ],\n options: {\n yes: {\n type: 'boolean',\n description: 'Skip prompts and use default options',\n short: 'y',\n default: false,\n },\n input: {\n type: 'string',\n description: 'Path to the OpenAPI specification',\n short: 'i',\n hint: 'path',\n },\n output: {\n type: 'string',\n description: 'Output directory for generated files',\n short: 'o',\n hint: 'path',\n },\n plugins: {\n type: 'string',\n description:\n 'Comma-separated list of plugins to use (plugin-ts, plugin-client, plugin-react-query, plugin-vue-query, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-mcp, plugin-redoc)',\n hint: 'plugin-ts,plugin-zod,...',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/init/run.ts')\n\n await run({\n yes: values.yes,\n version,\n input: values.input,\n output: values.output,\n plugins: values.plugins,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAUA,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;GACP;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,KAAK,OAAO;GACZ,SAAA,gBAAA;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;GACjB,CAAC;;CAEL,CAAC"}
1
+ {"version":3,"file":"init-0T26Xghs.cjs","names":["defineCommand"],"sources":["../src/commands/init.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'init',\n description:\n 'Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.',\n examples: [\n 'kubb init',\n 'kubb init --yes',\n 'kubb init --input ./openapi.yaml --output ./src/gen --plugins plugin-ts,plugin-zod',\n 'kubb init --plugins plugin-ts,plugin-client,plugin-react-query',\n ],\n options: {\n yes: {\n type: 'boolean',\n description: 'Skip prompts and use default options',\n short: 'y',\n default: false,\n },\n input: {\n type: 'string',\n description: 'Path to the OpenAPI specification',\n short: 'i',\n hint: 'path',\n },\n output: {\n type: 'string',\n description: 'Output directory for generated files',\n short: 'o',\n hint: 'path',\n },\n plugins: {\n type: 'string',\n description:\n 'Comma-separated list of plugins to use (plugin-ts, plugin-client, plugin-react-query, plugin-vue-query, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-mcp, plugin-redoc)',\n hint: 'plugin-ts,plugin-zod,...',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/init/run.ts')\n\n await run({\n yes: values.yes,\n version,\n input: values.input,\n output: values.output,\n plugins: values.plugins,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAUA,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;GACP;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,KAAK,OAAO;GACZ,SAAA,gBAAA;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;GACjB,CAAC;;CAEL,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk-BvFE5Tac.js";
2
2
  import { n as defineCommand } from "./define-m_fp-Aqm.js";
3
- import { t as version } from "./package-BS53bjcw.js";
3
+ import { t as version } from "./package-DTbBkfHc.js";
4
4
  //#region src/commands/init.ts
5
5
  const command = defineCommand({
6
6
  name: "init",
@@ -50,4 +50,4 @@ const command = defineCommand({
50
50
  //#endregion
51
51
  export { command };
52
52
 
53
- //# sourceMappingURL=init-DalNYdKX.js.map
53
+ //# sourceMappingURL=init-PsSoaB9c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-DalNYdKX.js","names":[],"sources":["../src/commands/init.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'init',\n description:\n 'Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.',\n examples: [\n 'kubb init',\n 'kubb init --yes',\n 'kubb init --input ./openapi.yaml --output ./src/gen --plugins plugin-ts,plugin-zod',\n 'kubb init --plugins plugin-ts,plugin-client,plugin-react-query',\n ],\n options: {\n yes: {\n type: 'boolean',\n description: 'Skip prompts and use default options',\n short: 'y',\n default: false,\n },\n input: {\n type: 'string',\n description: 'Path to the OpenAPI specification',\n short: 'i',\n hint: 'path',\n },\n output: {\n type: 'string',\n description: 'Output directory for generated files',\n short: 'o',\n hint: 'path',\n },\n plugins: {\n type: 'string',\n description:\n 'Comma-separated list of plugins to use (plugin-ts, plugin-client, plugin-react-query, plugin-vue-query, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-mcp, plugin-redoc)',\n hint: 'plugin-ts,plugin-zod,...',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/init/run.ts')\n\n await run({\n yes: values.yes,\n version,\n input: values.input,\n output: values.output,\n plugins: values.plugins,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;GACP;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,KAAK,OAAO;GACZ;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;GACjB,CAAC;;CAEL,CAAC"}
1
+ {"version":3,"file":"init-PsSoaB9c.js","names":[],"sources":["../src/commands/init.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'init',\n description:\n 'Scaffold a kubb.config.ts and install plugins for code generation from an OpenAPI spec. Run without flags for interactive setup, or pass --input, --output, and --plugins to skip the prompts.',\n examples: [\n 'kubb init',\n 'kubb init --yes',\n 'kubb init --input ./openapi.yaml --output ./src/gen --plugins plugin-ts,plugin-zod',\n 'kubb init --plugins plugin-ts,plugin-client,plugin-react-query',\n ],\n options: {\n yes: {\n type: 'boolean',\n description: 'Skip prompts and use default options',\n short: 'y',\n default: false,\n },\n input: {\n type: 'string',\n description: 'Path to the OpenAPI specification',\n short: 'i',\n hint: 'path',\n },\n output: {\n type: 'string',\n description: 'Output directory for generated files',\n short: 'o',\n hint: 'path',\n },\n plugins: {\n type: 'string',\n description:\n 'Comma-separated list of plugins to use (plugin-ts, plugin-client, plugin-react-query, plugin-vue-query, plugin-zod, plugin-faker, plugin-msw, plugin-cypress, plugin-mcp, plugin-redoc)',\n hint: 'plugin-ts,plugin-zod,...',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/init/run.ts')\n\n await run({\n yes: values.yes,\n version,\n input: values.input,\n output: values.output,\n plugins: values.plugins,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACV;EACD,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;GACP;EACD,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;GACP;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,KAAK,OAAO;GACZ;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;GACjB,CAAC;;CAEL,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk-BvFE5Tac.js";
2
2
  import { n as defineCommand } from "./define-m_fp-Aqm.js";
3
- import { t as version } from "./package-BS53bjcw.js";
3
+ import { t as version } from "./package-DTbBkfHc.js";
4
4
  //#region src/commands/mcp.ts
5
5
  const command = defineCommand({
6
6
  name: "mcp",
@@ -36,4 +36,4 @@ const command = defineCommand({
36
36
  //#endregion
37
37
  export { command };
38
38
 
39
- //# sourceMappingURL=mcp-qo6oTY1b.js.map
39
+ //# sourceMappingURL=mcp-Dfx8XKiP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-qo6oTY1b.js","names":[],"sources":["../src/commands/mcp.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'mcp',\n description:\n 'Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.',\n examples: [\n 'kubb mcp',\n 'kubb mcp --port 3001',\n '# Then add to your MCP client config:',\n '# { \"mcpServers\": { \"kubb\": { \"command\": \"npx\", \"args\": [\"kubb\", \"mcp\"] } } }',\n ],\n options: {\n port: {\n type: 'string',\n short: 'p',\n description: 'Port for HTTP MCP server (omit for stdio)',\n hint: 'number',\n },\n host: {\n type: 'string',\n description: 'Hostname to bind to (HTTP mode only)',\n default: 'localhost',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/mcp/run.ts')\n\n await run({\n version,\n port: values.port,\n host: values.host,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;GACP;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR;GACA,MAAM,OAAO;GACb,MAAM,OAAO;GACd,CAAC;;CAEL,CAAC"}
1
+ {"version":3,"file":"mcp-Dfx8XKiP.js","names":[],"sources":["../src/commands/mcp.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'mcp',\n description:\n 'Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.',\n examples: [\n 'kubb mcp',\n 'kubb mcp --port 3001',\n '# Then add to your MCP client config:',\n '# { \"mcpServers\": { \"kubb\": { \"command\": \"npx\", \"args\": [\"kubb\", \"mcp\"] } } }',\n ],\n options: {\n port: {\n type: 'string',\n short: 'p',\n description: 'Port for HTTP MCP server (omit for stdio)',\n hint: 'number',\n },\n host: {\n type: 'string',\n description: 'Hostname to bind to (HTTP mode only)',\n default: 'localhost',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/mcp/run.ts')\n\n await run({\n version,\n port: values.port,\n host: values.host,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;GACP;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR;GACA,MAAM,OAAO;GACb,MAAM,OAAO;GACd,CAAC;;CAEL,CAAC"}
@@ -1,6 +1,6 @@
1
1
  require("./chunk-ByKO4r7w.cjs");
2
2
  const require_define = require("./define-Bdn8j5VM.cjs");
3
- const require_package = require("./package-Dwr7GtJx.cjs");
3
+ const require_package = require("./package-Cljxf8a3.cjs");
4
4
  //#region src/commands/mcp.ts
5
5
  const command = require_define.defineCommand({
6
6
  name: "mcp",
@@ -36,4 +36,4 @@ const command = require_define.defineCommand({
36
36
  //#endregion
37
37
  exports.command = command;
38
38
 
39
- //# sourceMappingURL=mcp-CjLC0gfa.cjs.map
39
+ //# sourceMappingURL=mcp-hqkY4lKq.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-CjLC0gfa.cjs","names":["defineCommand"],"sources":["../src/commands/mcp.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'mcp',\n description:\n 'Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.',\n examples: [\n 'kubb mcp',\n 'kubb mcp --port 3001',\n '# Then add to your MCP client config:',\n '# { \"mcpServers\": { \"kubb\": { \"command\": \"npx\", \"args\": [\"kubb\", \"mcp\"] } } }',\n ],\n options: {\n port: {\n type: 'string',\n short: 'p',\n description: 'Port for HTTP MCP server (omit for stdio)',\n hint: 'number',\n },\n host: {\n type: 'string',\n description: 'Hostname to bind to (HTTP mode only)',\n default: 'localhost',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/mcp/run.ts')\n\n await run({\n version,\n port: values.port,\n host: values.host,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAUA,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;GACP;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,SAAA,gBAAA;GACA,MAAM,OAAO;GACb,MAAM,OAAO;GACd,CAAC;;CAEL,CAAC"}
1
+ {"version":3,"file":"mcp-hqkY4lKq.cjs","names":["defineCommand"],"sources":["../src/commands/mcp.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../package.json'\n\nexport const command = defineCommand({\n name: 'mcp',\n description:\n 'Start a Model Context Protocol (MCP) server that exposes Kubb code generation as tools for AI assistants. Once running, configure your AI client (Claude, Cursor, Windsurf, etc.) to connect to it — the assistant can then call kubb generate directly without leaving the chat.',\n examples: [\n 'kubb mcp',\n 'kubb mcp --port 3001',\n '# Then add to your MCP client config:',\n '# { \"mcpServers\": { \"kubb\": { \"command\": \"npx\", \"args\": [\"kubb\", \"mcp\"] } } }',\n ],\n options: {\n port: {\n type: 'string',\n short: 'p',\n description: 'Port for HTTP MCP server (omit for stdio)',\n hint: 'number',\n },\n host: {\n type: 'string',\n description: 'Hostname to bind to (HTTP mode only)',\n default: 'localhost',\n },\n },\n async run({ values }) {\n const { run } = await import('../runners/mcp/run.ts')\n\n await run({\n version,\n port: values.port,\n host: values.host,\n })\n },\n})\n"],"mappings":";;;;AAGA,MAAa,UAAUA,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EACR;EACA;EACA;EACA;EACD;CACD,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;GACP;EACD,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACF;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,SAAA,gBAAA;GACA,MAAM,OAAO;GACb,MAAM,OAAO;GACd,CAAC;;CAEL,CAAC"}
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "5.0.0-beta.11";
2
+ var version = "5.0.0-beta.13";
3
3
  //#endregion
4
4
  Object.defineProperty(exports, "version", {
5
5
  enumerable: true,
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "version", {
8
8
  }
9
9
  });
10
10
 
11
- //# sourceMappingURL=package-Dwr7GtJx.cjs.map
11
+ //# sourceMappingURL=package-Cljxf8a3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-Cljxf8a3.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,6 @@
1
+ //#region package.json
2
+ var version = "5.0.0-beta.13";
3
+ //#endregion
4
+ export { version as t };
5
+
6
+ //# sourceMappingURL=package-DTbBkfHc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-DTbBkfHc.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -2,7 +2,7 @@ import "./chunk-BvFE5Tac.js";
2
2
  import { n as toCause, r as toError } from "./errors-CINO1EIv.js";
3
3
  import { a as canUseTTY, i as executeIfOnline, o as isGitHubActions, r as sendTelemetry, t as buildTelemetryEvent } from "./telemetry-BkektVz6.js";
4
4
  import { n as tokenize } from "./shell-CN6DNqeC.js";
5
- import { t as version } from "./package-BS53bjcw.js";
5
+ import { t as version } from "./package-DTbBkfHc.js";
6
6
  import { a as WATCHER_IGNORED_PATHS, i as SUMMARY_SEPARATOR, t as KUBB_NPM_PACKAGE_URL } from "./constants-B2JTeRBb.js";
7
7
  import { styleText } from "node:util";
8
8
  import { EventEmitter } from "node:events";
@@ -1610,7 +1610,7 @@ async function generate(options) {
1610
1610
  pluginTimings: logLevel$2 >= logLevel.verbose ? pluginTimings : void 0
1611
1611
  });
1612
1612
  await reportTelemetry("failed");
1613
- process$1.exit(1);
1613
+ return false;
1614
1614
  }
1615
1615
  await hooks.emit("kubb:success", {
1616
1616
  message: "Generation succeeded",
@@ -1665,6 +1665,7 @@ async function generate(options) {
1665
1665
  pluginTimings
1666
1666
  });
1667
1667
  await reportTelemetry("success");
1668
+ return true;
1668
1669
  }
1669
1670
  async function checkForUpdate(hooks) {
1670
1671
  await executeIfOnline(async () => {
@@ -1703,6 +1704,7 @@ async function run({ input, configPath, logLevel: logLevelKey, watch }) {
1703
1704
  });
1704
1705
  await hooks.emit("kubb:config:end", { configs });
1705
1706
  await hooks.emit("kubb:lifecycle:start", { version });
1707
+ let anyFailed = false;
1706
1708
  for (const config of configs) if (isInputPath(config) && watch) await startWatcher([input || config.input.path], async (paths) => {
1707
1709
  hooks.removeAll();
1708
1710
  await generate({
@@ -1717,14 +1719,20 @@ async function run({ input, configPath, logLevel: logLevelKey, watch }) {
1717
1719
  info: (msg) => clack.log.info(msg),
1718
1720
  error: (msg) => clack.log.error(msg)
1719
1721
  });
1720
- else await generate({
1721
- input,
1722
- config,
1723
- logLevel: logLevel$3,
1724
- hooks,
1725
- makeSink
1726
- });
1722
+ else try {
1723
+ if (!await generate({
1724
+ input,
1725
+ config,
1726
+ logLevel: logLevel$3,
1727
+ hooks,
1728
+ makeSink
1729
+ })) anyFailed = true;
1730
+ } catch (configError) {
1731
+ await hooks.emit("kubb:error", { error: toError(configError) });
1732
+ anyFailed = true;
1733
+ }
1727
1734
  await hooks.emit("kubb:lifecycle:end");
1735
+ if (anyFailed) process$1.exit(1);
1728
1736
  } catch (error) {
1729
1737
  await hooks.emit("kubb:error", { error: toError(error) });
1730
1738
  process$1.exit(1);
@@ -1733,4 +1741,4 @@ async function run({ input, configPath, logLevel: logLevelKey, watch }) {
1733
1741
  //#endregion
1734
1742
  export { run };
1735
1743
 
1736
- //# sourceMappingURL=run-CdRxfPGM.js.map
1744
+ //# sourceMappingURL=run-34ctJY6B.js.map