@kubb/cli 5.0.0-beta.42 → 5.0.0-beta.43

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 (43) hide show
  1. package/dist/{agent-BumEm07_.cjs → agent-BlA4rwk-.cjs} +2 -2
  2. package/dist/{agent-BumEm07_.cjs.map → agent-BlA4rwk-.cjs.map} +1 -1
  3. package/dist/{agent-gLdUEJW4.js → agent-D5KE3rTb.js} +2 -2
  4. package/dist/{agent-gLdUEJW4.js.map → agent-D5KE3rTb.js.map} +1 -1
  5. package/dist/{generate-Bi4BSF56.cjs → generate-Cihgx4Et.cjs} +2 -2
  6. package/dist/{generate-Bi4BSF56.cjs.map → generate-Cihgx4Et.cjs.map} +1 -1
  7. package/dist/{generate-CUxL5Jcs.js → generate-DOsSBmox.js} +2 -2
  8. package/dist/{generate-CUxL5Jcs.js.map → generate-DOsSBmox.js.map} +1 -1
  9. package/dist/index.cjs +6 -6
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.js +6 -6
  12. package/dist/index.js.map +1 -1
  13. package/dist/{init-3HTDWMFe.js → init-BF-Xal5G.js} +2 -2
  14. package/dist/{init-3HTDWMFe.js.map → init-BF-Xal5G.js.map} +1 -1
  15. package/dist/{init-C8CwBts1.cjs → init-T3lduN-g.cjs} +2 -2
  16. package/dist/{init-C8CwBts1.cjs.map → init-T3lduN-g.cjs.map} +1 -1
  17. package/dist/{mcp-fY6xSxpb.js → mcp-DXvucahU.js} +2 -2
  18. package/dist/{mcp-fY6xSxpb.js.map → mcp-DXvucahU.js.map} +1 -1
  19. package/dist/{mcp-DbzlupRr.cjs → mcp-yDDShwhP.cjs} +2 -2
  20. package/dist/{mcp-DbzlupRr.cjs.map → mcp-yDDShwhP.cjs.map} +1 -1
  21. package/dist/package-BWFTbdhT.js +6 -0
  22. package/dist/package-BWFTbdhT.js.map +1 -0
  23. package/dist/{package-DE-_IDOs.cjs → package-NriPMd0D.cjs} +2 -2
  24. package/dist/package-NriPMd0D.cjs.map +1 -0
  25. package/dist/run-B1Bc6OVr.cjs.map +1 -1
  26. package/dist/run-CZC17tSi.cjs.map +1 -1
  27. package/dist/run-CkTpemme.cjs.map +1 -1
  28. package/dist/run-Cl4SrSob.cjs.map +1 -1
  29. package/dist/run-CvEVkbIx.js.map +1 -1
  30. package/dist/{run-DeQ7UlYB.js → run-DYd4gTwK.js} +3 -3
  31. package/dist/{run-DeQ7UlYB.js.map → run-DYd4gTwK.js.map} +1 -1
  32. package/dist/{run-D4WAzrjB.cjs → run-DgvG7nAl.cjs} +3 -3
  33. package/dist/{run-D4WAzrjB.cjs.map → run-DgvG7nAl.cjs.map} +1 -1
  34. package/dist/shell-BrqyJdB7.js.map +1 -1
  35. package/dist/shell-Lh-vLWwH.cjs.map +1 -1
  36. package/dist/{validate-BO5yaxys.js → validate-BpE8mzfU.js} +2 -2
  37. package/dist/{validate-BO5yaxys.js.map → validate-BpE8mzfU.js.map} +1 -1
  38. package/dist/{validate-Uw_LUtUk.cjs → validate-z4RBsNxc.cjs} +2 -2
  39. package/dist/{validate-Uw_LUtUk.cjs.map → validate-z4RBsNxc.cjs.map} +1 -1
  40. package/package.json +9 -16
  41. package/dist/package-CXq9vu7l.js +0 -6
  42. package/dist/package-CXq9vu7l.js.map +0 -1
  43. package/dist/package-DE-_IDOs.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  require("./chunk-Bx3C2hgW.cjs");
2
2
  const require_define = require("./define-C4AB3POr.cjs");
3
- const require_package = require("./package-DE-_IDOs.cjs");
3
+ const require_package = require("./package-NriPMd0D.cjs");
4
4
  const require_constants = require("./constants-BtmponZ3.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-BumEm07_.cjs.map
70
+ //# sourceMappingURL=agent-BlA4rwk-.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-BumEm07_.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;CAAwD;CACzJ,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAASC,kBAAAA,cAAc;EACzB;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAASA,kBAAAA,cAAc;EACzB;EACA,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,aAAa;GACX,MAAM;GACN,aAAa;GACb,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,oBAAA,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;EACF,CAAC;CACH;AACF,CAAC;;;AC9CD,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAA8C;CAAwD;CACrI,aAAa,CAACC,SAAY;AAC5B,CAAC"}
1
+ {"version":3,"file":"agent-BlA4rwk-.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;CAAwD;CACzJ,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAASC,kBAAAA,cAAc;EACzB;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAASA,kBAAAA,cAAc;EACzB;EACA,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;EACX;EACA,aAAa;GACX,MAAM;GACN,aAAa;GACb,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,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;EACF,CAAC;CACH;AACF,CAAC;;;AC9CD,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,UAAU;EAAC;EAAoB;EAA8C;CAAwD;CACrI,aAAa,CAACC,SAAY;AAC5B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk-CRm0XQPb.js";
2
2
  import { n as defineCommand } from "./define-DNG1U8ha.js";
3
- import { t as version } from "./package-CXq9vu7l.js";
3
+ import { t as version } from "./package-BWFTbdhT.js";
4
4
  import { i as agentDefaults } from "./constants-84a47qA-.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-gLdUEJW4.js.map
68
+ //# sourceMappingURL=agent-D5KE3rTb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-gLdUEJW4.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;CAAwD;CACrI,aAAa,CDJQ,cAAc;EACnC,MAAM;EACN,aACE;EACF,UAAU;GAAC;GAAoB;GAAgC;GAAkC;EAAwD;EACzJ,SAAS;GACP,QAAQ;IACN,MAAM;IACN,aAAa;IACb,OAAO;GACT;GACA,MAAM;IACJ,MAAM;IACN,aAAa;IACb,OAAO;IACP,SAAS,cAAc;GACzB;GACA,MAAM;IACJ,MAAM;IACN,aAAa;IACb,SAAS,cAAc;GACzB;GACA,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;GACX;GACA,aAAa;IACX,MAAM;IACN,aAAa;IACb,SAAS;GACX;EACF;EACA,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;GACF,CAAC;EACH;CACF,CCzCgBC,CAAY;AAC5B,CAAC"}
1
+ {"version":3,"file":"agent-D5KE3rTb.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;CAAwD;CACrI,aAAa,CDJQ,cAAc;EACnC,MAAM;EACN,aACE;EACF,UAAU;GAAC;GAAoB;GAAgC;GAAkC;EAAwD;EACzJ,SAAS;GACP,QAAQ;IACN,MAAM;IACN,aAAa;IACb,OAAO;GACT;GACA,MAAM;IACJ,MAAM;IACN,aAAa;IACb,OAAO;IACP,SAAS,cAAc;GACzB;GACA,MAAM;IACJ,MAAM;IACN,aAAa;IACb,SAAS,cAAc;GACzB;GACA,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;GACX;GACA,aAAa;IACX,MAAM;IACN,aAAa;IACb,SAAS;GACX;EACF;EACA,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;GACF,CAAC;EACH;CACF,CCzCgBC,CAAY;AAC5B,CAAC"}
@@ -60,7 +60,7 @@ const command = require("./define-C4AB3POr.cjs").defineCommand({
60
60
  async run({ values, positionals }) {
61
61
  const logLevel = values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
62
62
  const reporters = values.reporter?.split(",").map((name) => name.trim()).filter(Boolean);
63
- const { run } = await Promise.resolve().then(() => require("./run-D4WAzrjB.cjs"));
63
+ const { run } = await Promise.resolve().then(() => require("./run-DgvG7nAl.cjs"));
64
64
  await run({
65
65
  input: positionals[0],
66
66
  configPath: values.config,
@@ -73,4 +73,4 @@ const command = require("./define-C4AB3POr.cjs").defineCommand({
73
73
  //#endregion
74
74
  exports.command = command;
75
75
 
76
- //# sourceMappingURL=generate-Bi4BSF56.cjs.map
76
+ //# sourceMappingURL=generate-Cihgx4Et.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-Bi4BSF56.cjs","names":["defineCommand"],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport type { ReporterName } from '@kubb/core'\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 or verbose',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose',\n enum: ['silent', 'info', 'verbose'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\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 reporter: {\n type: 'string',\n description: 'Reporters that render the run, comma-separated. Overrides config.reporters',\n hint: 'cli|json|file',\n enum: ['cli', 'json', 'file'],\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const reporters = values.reporter\n ?.split(',')\n .map((name) => name.trim())\n .filter(Boolean) as Array<ReporterName> | undefined\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 reporters,\n })\n },\n})\n"],"mappings":";;AAGA,MAAa,yCAAUA,EAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,SAAS;CACrB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;CAAuB;CAC5H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;GAAS;EACpC;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;IAAC;IAAO;IAAQ;GAAM;EAC9B;CACF;CACA,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EAChF,MAAM,YAAY,OAAO,UACrB,MAAM,GAAG,EACV,KAAK,SAAS,KAAK,KAAK,CAAC,EACzB,OAAO,OAAO;EACjB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACd;EACF,CAAC;CACH;AACF,CAAC"}
1
+ {"version":3,"file":"generate-Cihgx4Et.cjs","names":["defineCommand"],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport type { ReporterName } from '@kubb/core'\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 or verbose',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose',\n enum: ['silent', 'info', 'verbose'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\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 reporter: {\n type: 'string',\n description: 'Reporters that render the run, comma-separated. Overrides config.reporters',\n hint: 'cli|json|file',\n enum: ['cli', 'json', 'file'],\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const reporters = values.reporter\n ?.split(',')\n .map((name) => name.trim())\n .filter(Boolean) as Array<ReporterName> | undefined\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 reporters,\n })\n },\n})\n"],"mappings":";;AAGA,MAAa,yCAAUA,CAAAA,CAAAA,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,SAAS;CACrB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;CAAuB;CAC5H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;GAAS;EACpC;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;IAAC;IAAO;IAAQ;GAAM;EAC9B;CACF;CACA,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EAChF,MAAM,YAAY,OAAO,UACrB,MAAM,GAAG,CAAC,CACX,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO;EACjB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACd;EACF,CAAC;CACH;AACF,CAAC"}
@@ -61,7 +61,7 @@ const command = defineCommand({
61
61
  async run({ values, positionals }) {
62
62
  const logLevel = values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
63
63
  const reporters = values.reporter?.split(",").map((name) => name.trim()).filter(Boolean);
64
- const { run } = await import("./run-DeQ7UlYB.js");
64
+ const { run } = await import("./run-DYd4gTwK.js");
65
65
  await run({
66
66
  input: positionals[0],
67
67
  configPath: values.config,
@@ -74,4 +74,4 @@ const command = defineCommand({
74
74
  //#endregion
75
75
  export { command };
76
76
 
77
- //# sourceMappingURL=generate-CUxL5Jcs.js.map
77
+ //# sourceMappingURL=generate-DOsSBmox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-CUxL5Jcs.js","names":[],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport type { ReporterName } from '@kubb/core'\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 or verbose',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose',\n enum: ['silent', 'info', 'verbose'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\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 reporter: {\n type: 'string',\n description: 'Reporters that render the run, comma-separated. Overrides config.reporters',\n hint: 'cli|json|file',\n enum: ['cli', 'json', 'file'],\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const reporters = values.reporter\n ?.split(',')\n .map((name) => name.trim())\n .filter(Boolean) as Array<ReporterName> | undefined\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 reporters,\n })\n },\n})\n"],"mappings":";;;AAGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,SAAS;CACrB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;CAAuB;CAC5H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;GAAS;EACpC;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;IAAC;IAAO;IAAQ;GAAM;EAC9B;CACF;CACA,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EAChF,MAAM,YAAY,OAAO,UACrB,MAAM,GAAG,EACV,KAAK,SAAS,KAAK,KAAK,CAAC,EACzB,OAAO,OAAO;EACjB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACd;EACF,CAAC;CACH;AACF,CAAC"}
1
+ {"version":3,"file":"generate-DOsSBmox.js","names":[],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport type { ReporterName } from '@kubb/core'\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 or verbose',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose',\n enum: ['silent', 'info', 'verbose'],\n },\n watch: {\n type: 'boolean',\n description: 'Watch mode based on the input file',\n short: 'w',\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 reporter: {\n type: 'string',\n description: 'Reporters that render the run, comma-separated. Overrides config.reporters',\n hint: 'cli|json|file',\n enum: ['cli', 'json', 'file'],\n },\n },\n async run({ values, positionals }) {\n const logLevel = values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const reporters = values.reporter\n ?.split(',')\n .map((name) => name.trim())\n .filter(Boolean) as Array<ReporterName> | undefined\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 reporters,\n })\n },\n})\n"],"mappings":";;;AAGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aACE;CACF,WAAW,CAAC,SAAS;CACrB,UAAU;EAAC;EAAiB;EAAgC;EAAyC;CAAuB;CAC5H,SAAS;EACP,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;GAAS;EACpC;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,UAAU;GACR,MAAM;GACN,aAAa;GACb,MAAM;GACN,MAAM;IAAC;IAAO;IAAQ;GAAM;EAC9B;CACF;CACA,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EAChF,MAAM,YAAY,OAAO,UACrB,MAAM,GAAG,CAAC,CACX,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAC1B,OAAO,OAAO;EACjB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR,OAAO,YAAY;GACnB,YAAY,OAAO;GACnB;GACA,OAAO,OAAO;GACd;EACF,CAAC;CACH;AACF,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./chunk-Bx3C2hgW.cjs");
3
3
  const require_define = require("./define-C4AB3POr.cjs");
4
- const require_package = require("./package-DE-_IDOs.cjs");
4
+ const require_package = require("./package-NriPMd0D.cjs");
5
5
  const require_constants = require("./constants-BtmponZ3.cjs");
6
6
  let node_util = require("node:util");
7
7
  let _kubb_core = require("@kubb/core");
@@ -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-Bi4BSF56.cjs"));
258
- const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-Uw_LUtUk.cjs"));
259
- const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-DbzlupRr.cjs"));
260
- const { command: agentCommand } = await Promise.resolve().then(() => require("./agent-BumEm07_.cjs"));
261
- const { command: initCommand } = await Promise.resolve().then(() => require("./init-C8CwBts1.cjs"));
257
+ const { command: generateCommand } = await Promise.resolve().then(() => require("./generate-Cihgx4Et.cjs"));
258
+ const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-z4RBsNxc.cjs"));
259
+ const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-yDDShwhP.cjs"));
260
+ const { command: agentCommand } = await Promise.resolve().then(() => require("./agent-BlA4rwk-.cjs"));
261
+ const { command: initCommand } = await Promise.resolve().then(() => require("./init-T3lduN-g.cjs"));
262
262
  await cli.run([
263
263
  generateCommand,
264
264
  validateCommand,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["defineCLIAdapter","Telemetry","QUIET_FLAGS"],"sources":["../../../internals/utils/src/cli/schema.ts","../../../internals/utils/src/cli/help.ts","../../../internals/utils/src/cli/adapters/nodeAdapter.ts","../../../internals/utils/src/cli/parse.ts","../../../internals/utils/src/isFlag.ts","../src/index.ts"],"sourcesContent":["import type { CommandDefinition, CommandSchema, OptionDefinition, OptionSchema } from './types.ts'\n\n/**\n * Serializes `CommandDefinition[]` to a plain, JSON-serializable structure.\n * Use to expose CLI capabilities to AI agents or MCP tools.\n *\n * @example\n * ```ts\n * getCommandSchema([generateCommand, agentCommand])\n * // [{ name: 'generate', options: [...], subCommands: [] }, ...]\n * ```\n */\nexport function getCommandSchema(defs: CommandDefinition[]): CommandSchema[] {\n return defs.map(serializeCommand)\n}\n\nfunction serializeCommand(def: CommandDefinition): CommandSchema {\n return {\n name: def.name,\n description: def.description,\n arguments: def.arguments,\n ...(def.examples?.length ? { examples: def.examples } : {}),\n options: serializeOptions(def.options ?? {}),\n subCommands: def.subCommands ? def.subCommands.map(serializeCommand) : [],\n }\n}\n\nfunction serializeOptions(options: Record<string, OptionDefinition>): OptionSchema[] {\n return Object.entries(options).map(([name, opt]) => {\n const shortPart = opt.short ? `-${opt.short}, ` : ''\n const valuePart = opt.type === 'string' ? ` <${opt.hint ?? name}>` : ''\n const flags = `${shortPart}--${name}${valuePart}`\n\n return {\n name,\n flags,\n type: opt.type,\n description: opt.description,\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n ...(opt.hint ? { hint: opt.hint } : {}),\n ...(opt.enum ? { enum: opt.enum } : {}),\n ...(opt.required ? { required: opt.required } : {}),\n }\n })\n}\n","import { styleText } from 'node:util'\nimport { getCommandSchema } from './schema.ts'\nimport type { CommandDefinition, OptionSchema } from './types.ts'\n\n/** Prints formatted help output for `def` using its `CommandDefinition`.\n *\n * @example\n * ```ts\n * renderHelp({ name: 'generate', description: 'Generate client code' })\n * // prints Usage: generate [options] ...\n * ```\n */\nexport function renderHelp(def: CommandDefinition, parentName?: string): void {\n const schema = getCommandSchema([def])[0]!\n\n const programName = parentName ? `${parentName} ${schema.name}` : schema.name\n\n const argsPart = schema.arguments?.length ? ` ${schema.arguments.join(' ')}` : ''\n const subCmdPart = schema.subCommands.length ? ' <command>' : ''\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName}${argsPart}${subCmdPart} [options]\\n`)\n\n if (schema.description) {\n console.log(` ${schema.description}\\n`)\n }\n\n if (schema.subCommands.length) {\n console.log(styleText('bold', 'Commands:'))\n for (const sub of schema.subCommands) {\n console.log(` ${styleText('cyan', sub.name.padEnd(16))}${sub.description}`)\n }\n console.log()\n }\n\n const options: OptionSchema[] = [\n ...schema.options,\n {\n name: 'help',\n flags: '-h, --help',\n type: 'boolean' as const,\n description: 'Show help',\n },\n ]\n\n console.log(styleText('bold', 'Options:'))\n for (const opt of options) {\n const flags = styleText('cyan', opt.flags.padEnd(30))\n const defaultPart = opt.default !== undefined ? styleText('dim', ` (default: ${opt.default})`) : ''\n console.log(` ${flags}${opt.description}${defaultPart}`)\n }\n console.log()\n\n if (schema.examples?.length) {\n console.log(styleText('bold', 'Examples:'))\n for (const ex of schema.examples) {\n console.log(` ${styleText('dim', ex)}`)\n }\n console.log()\n }\n}\n","import { parseArgs, styleText } from 'node:util'\nimport { defineCLIAdapter } from '../define.ts'\nimport { renderHelp } from '../help.ts'\nimport type { CommandDefinition, OptionType, ParsedArgs, RunOptions } from '../types.ts'\n\ntype ParseOption = {\n type: OptionType\n short?: string\n default?: string | boolean\n}\ntype ParseOptions = Record<string, ParseOption>\n\nfunction buildParseOptions(def: CommandDefinition): ParseOptions {\n const result: ParseOptions = {\n help: { type: 'boolean', short: 'h' },\n }\n\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n result[name] = {\n type: opt.type,\n ...(opt.short ? { short: opt.short } : {}),\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n }\n }\n\n return result\n}\n\nasync function runCommand(def: CommandDefinition, argv: string[], parentName?: string): Promise<void> {\n const parseOptions = buildParseOptions(def)\n\n let parsed: ParsedArgs\n try {\n const result = parseArgs({\n args: argv,\n options: parseOptions,\n allowPositionals: true,\n strict: false,\n })\n parsed = {\n values: result.values as ParsedArgs['values'],\n positionals: result.positionals,\n }\n } catch {\n renderHelp(def, parentName)\n process.exit(1)\n }\n\n if (parsed.values['help']) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n // Validate required options before running the command\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n if (opt.required && parsed.values[name] === undefined) {\n console.error(styleText('red', `Error: --${name} is required`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n }\n\n if (!def.run) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n try {\n await def.run(parsed)\n } catch (err) {\n console.error(styleText('red', `Error: ${err instanceof Error ? err.message : String(err)}`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n}\n\nfunction printRootHelp(programName: string, version: string, defs: CommandDefinition[]): void {\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName} <command> [options]\\n`)\n console.log(` Kubb v${version} — Generate TypeScript types, API clients, React Query hooks,`)\n console.log(` Zod schemas, and more from an OpenAPI specification.\\n`)\n console.log(` Quick start: ${styleText('cyan', `${programName} init`)} to scaffold a config, then ${styleText('cyan', `${programName} generate`)} to run.\\n`)\n console.log(styleText('bold', 'Commands:'))\n for (const def of defs) {\n console.log(` ${styleText('cyan', def.name.padEnd(16))}${def.description}`)\n }\n console.log()\n console.log(styleText('bold', 'Options:'))\n console.log(` ${styleText('cyan', '-v, --version'.padEnd(30))}Show version number`)\n console.log(` ${styleText('cyan', '-h, --help'.padEnd(30))}Show help`)\n console.log()\n console.log(`Run ${styleText('cyan', `${programName} <command> --help`)} for command-specific help.\\n`)\n}\n\n/**\n * CLI adapter using `node:util parseArgs`. No external dependencies.\n */\nexport const nodeAdapter = defineCLIAdapter({\n renderHelp(def: CommandDefinition, parentName?: string): void {\n renderHelp(def, parentName)\n },\n\n async run(defs: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void> {\n const { programName, defaultCommandName, version } = opts\n\n // Strip the leading executable + script entries when process.argv is passed directly.\n // Handles Node.js (/usr/bin/node), Bun (/usr/local/bin/bun), Deno, tsx, etc.\n // All runtime executable paths contain a path separator; bare command names do not.\n const firstArgIsExecutablePath = (argv[0]?.includes('/') || argv[0]?.includes('\\\\')) ?? false\n const args = argv.length >= 2 && firstArgIsExecutablePath ? argv.slice(2) : argv\n\n if (args[0] === '--version' || args[0] === '-v') {\n console.log(version)\n process.exit(0)\n }\n\n if (args[0] === '--help' || args[0] === '-h') {\n printRootHelp(programName, version, defs)\n process.exit(0)\n }\n\n if (args.length === 0) {\n const defaultDef = defs.find((d) => d.name === defaultCommandName)\n if (defaultDef?.run) {\n await runCommand(defaultDef, [], programName)\n } else {\n printRootHelp(programName, version, defs)\n }\n return\n }\n\n const [first, ...rest] = args\n const isKnownSubcommand = defs.some((d) => d.name === first)\n\n let def: CommandDefinition | undefined\n let commandArgv: string[]\n let parentName: string | undefined\n\n if (isKnownSubcommand) {\n def = defs.find((d) => d.name === first)\n commandArgv = rest\n parentName = programName\n } else {\n def = defs.find((d) => d.name === defaultCommandName)\n commandArgv = args\n parentName = programName\n }\n\n if (!def) {\n console.error(`Unknown command: ${first}`)\n printRootHelp(programName, version, defs)\n process.exit(1)\n }\n\n if (def.subCommands?.length) {\n const [subName, ...subRest] = commandArgv\n const subDef = def.subCommands.find((s) => s.name === subName)\n\n if (subName === '--help' || subName === '-h') {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n if (!subDef) {\n renderHelp(def, parentName)\n process.exit(subName ? 1 : 0)\n }\n\n await runCommand(subDef, subRest, `${parentName} ${def.name}`)\n return\n }\n\n await runCommand(def, commandArgv, parentName)\n },\n})\n","import { nodeAdapter } from './adapters/nodeAdapter.ts'\nimport type { CLIAdapter, CommandDefinition, RunOptions } from './types.ts'\n\n/**\n * Creates a CLI runner bound to a specific adapter.\n *\n * @default nodeAdapter (Node.js `node:util parseArgs`)\n *\n * @example\n * ```ts\n * await createCLI().run(commands, process.argv.slice(2), {\n * programName: 'kubb',\n * defaultCommandName: 'generate',\n * version: '5.0.0',\n * })\n * ```\n */\nexport function createCLI(options?: { adapter?: CLIAdapter }): {\n run(commands: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void>\n} {\n const adapter = options?.adapter ?? nodeAdapter\n\n return {\n run(commands, argv, opts) {\n return adapter.run(commands, argv, opts)\n },\n }\n}\n","/**\n * Type guard that confirms `value` is a member of `set`. Avoids type assertions with `Set<T extends string>`.\n */\nexport function isFlag<T extends string>(set: ReadonlySet<T>, value: string): value is T {\n for (const flag of set) {\n if (flag === value) return true\n }\n return false\n}\n","import { styleText } from 'node:util'\nimport { createCLI, isFlag } from '@internals/utils'\nimport { Telemetry } from '@kubb/core'\nimport { version } from '../package.json'\nimport { QUIET_FLAGS } from './constants.ts'\n\nconst cli = createCLI()\n\nfunction shouldShowTelemetryNotice(argv: Array<string>): boolean {\n if (Telemetry.isDisabled()) {\n return false\n }\n\n // Skip when the user is just asking for help or version info\n if (argv.some((arg) => isFlag(QUIET_FLAGS, arg))) {\n return false\n }\n\n // Skip in non-interactive / scripting contexts\n if (!process.stdout.isTTY) {\n return false\n }\n\n return true\n}\n\nexport async function run(argv: Array<string> = process.argv): Promise<void> {\n if (shouldShowTelemetryNotice(argv)) {\n console.log(\n `${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`,\n )\n }\n\n const { command: generateCommand } = await import('./commands/generate.ts')\n const { command: validateCommand } = await import('./commands/validate.ts')\n const { command: mcpCommand } = await import('./commands/mcp.ts')\n const { command: agentCommand } = await import('./commands/agent.ts')\n const { command: initCommand } = await import('./commands/init.ts')\n\n await cli.run([generateCommand, validateCommand, mcpCommand, agentCommand, initCommand], argv, {\n programName: 'kubb',\n defaultCommandName: 'generate',\n version,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,SAAgB,iBAAiB,MAA4C;CAC3E,OAAO,KAAK,IAAI,gBAAgB;AAClC;AAEA,SAAS,iBAAiB,KAAuC;CAC/D,OAAO;EACL,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,WAAW,IAAI;EACf,GAAI,IAAI,UAAU,SAAS,EAAE,UAAU,IAAI,SAAS,IAAI,CAAC;EACzD,SAAS,iBAAiB,IAAI,WAAW,CAAC,CAAC;EAC3C,aAAa,IAAI,cAAc,IAAI,YAAY,IAAI,gBAAgB,IAAI,CAAC;CAC1E;AACF;AAEA,SAAS,iBAAiB,SAA2D;CACnF,OAAO,OAAO,QAAQ,OAAO,EAAE,KAAK,CAAC,MAAM,SAAS;EAKlD,O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qB;CAC3E,IAAI,0BAA0B,IAAI,GAChC,QAAQ,IACN,IAAA,GAAA,UAAA,WAAa,UAAU,SAAS,EAAE,wIAAA,GAAA,UAAA,WAAiJ,QAAQ,0BAA0B,EAAE,IACzN;CAGF,MAAM,EAAE,SAAS,oBAAoB,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,yBAAA,CAAA;CAC3C,MAAM,EAAE,SAAS,oBAAoB,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,yBAAA,CAAA;CAC3C,MAAM,EAAE,SAAS,eAAe,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,oBAAA,CAAA;CACtC,MAAM,EAAE,SAAS,iBAAiB,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,sBAAA,CAAA;CACxC,MAAM,EAAE,SAAS,gBAAgB,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,qBAAA,CAAA;CAEvC,MAAM,IAAI,IAAI;EAAC;EAAiB;EAAiB;EAAY;EAAc;CAAW,GAAG,MAAM;EAC7F,aAAa;EACb,oBAAoB;EACpB,SAAA,gBAAA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"index.cjs","names":["defineCLIAdapter","Telemetry","QUIET_FLAGS"],"sources":["../../../internals/utils/src/cli/schema.ts","../../../internals/utils/src/cli/help.ts","../../../internals/utils/src/cli/adapters/nodeAdapter.ts","../../../internals/utils/src/cli/parse.ts","../../../internals/utils/src/isFlag.ts","../src/index.ts"],"sourcesContent":["import type { CommandDefinition, CommandSchema, OptionDefinition, OptionSchema } from './types.ts'\n\n/**\n * Serializes `CommandDefinition[]` to a plain, JSON-serializable structure.\n * Use to expose CLI capabilities to AI agents or MCP tools.\n *\n * @example\n * ```ts\n * getCommandSchema([generateCommand, agentCommand])\n * // [{ name: 'generate', options: [...], subCommands: [] }, ...]\n * ```\n */\nexport function getCommandSchema(defs: CommandDefinition[]): CommandSchema[] {\n return defs.map(serializeCommand)\n}\n\nfunction serializeCommand(def: CommandDefinition): CommandSchema {\n return {\n name: def.name,\n description: def.description,\n arguments: def.arguments,\n ...(def.examples?.length ? { examples: def.examples } : {}),\n options: serializeOptions(def.options ?? {}),\n subCommands: def.subCommands ? def.subCommands.map(serializeCommand) : [],\n }\n}\n\nfunction serializeOptions(options: Record<string, OptionDefinition>): OptionSchema[] {\n return Object.entries(options).map(([name, opt]) => {\n const shortPart = opt.short ? `-${opt.short}, ` : ''\n const valuePart = opt.type === 'string' ? ` <${opt.hint ?? name}>` : ''\n const flags = `${shortPart}--${name}${valuePart}`\n\n return {\n name,\n flags,\n type: opt.type,\n description: opt.description,\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n ...(opt.hint ? { hint: opt.hint } : {}),\n ...(opt.enum ? { enum: opt.enum } : {}),\n ...(opt.required ? { required: opt.required } : {}),\n }\n })\n}\n","import { styleText } from 'node:util'\nimport { getCommandSchema } from './schema.ts'\nimport type { CommandDefinition, OptionSchema } from './types.ts'\n\n/** Prints formatted help output for `def` using its `CommandDefinition`.\n *\n * @example\n * ```ts\n * renderHelp({ name: 'generate', description: 'Generate client code' })\n * // prints Usage: generate [options] ...\n * ```\n */\nexport function renderHelp(def: CommandDefinition, parentName?: string): void {\n const schema = getCommandSchema([def])[0]!\n\n const programName = parentName ? `${parentName} ${schema.name}` : schema.name\n\n const argsPart = schema.arguments?.length ? ` ${schema.arguments.join(' ')}` : ''\n const subCmdPart = schema.subCommands.length ? ' <command>' : ''\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName}${argsPart}${subCmdPart} [options]\\n`)\n\n if (schema.description) {\n console.log(` ${schema.description}\\n`)\n }\n\n if (schema.subCommands.length) {\n console.log(styleText('bold', 'Commands:'))\n for (const sub of schema.subCommands) {\n console.log(` ${styleText('cyan', sub.name.padEnd(16))}${sub.description}`)\n }\n console.log()\n }\n\n const options: OptionSchema[] = [\n ...schema.options,\n {\n name: 'help',\n flags: '-h, --help',\n type: 'boolean' as const,\n description: 'Show help',\n },\n ]\n\n console.log(styleText('bold', 'Options:'))\n for (const opt of options) {\n const flags = styleText('cyan', opt.flags.padEnd(30))\n const defaultPart = opt.default !== undefined ? styleText('dim', ` (default: ${opt.default})`) : ''\n console.log(` ${flags}${opt.description}${defaultPart}`)\n }\n console.log()\n\n if (schema.examples?.length) {\n console.log(styleText('bold', 'Examples:'))\n for (const ex of schema.examples) {\n console.log(` ${styleText('dim', ex)}`)\n }\n console.log()\n }\n}\n","import { parseArgs, styleText } from 'node:util'\nimport { defineCLIAdapter } from '../define.ts'\nimport { renderHelp } from '../help.ts'\nimport type { CommandDefinition, OptionType, ParsedArgs, RunOptions } from '../types.ts'\n\ntype ParseOption = {\n type: OptionType\n short?: string\n default?: string | boolean\n}\ntype ParseOptions = Record<string, ParseOption>\n\nfunction buildParseOptions(def: CommandDefinition): ParseOptions {\n const result: ParseOptions = {\n help: { type: 'boolean', short: 'h' },\n }\n\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n result[name] = {\n type: opt.type,\n ...(opt.short ? { short: opt.short } : {}),\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n }\n }\n\n return result\n}\n\nasync function runCommand(def: CommandDefinition, argv: string[], parentName?: string): Promise<void> {\n const parseOptions = buildParseOptions(def)\n\n let parsed: ParsedArgs\n try {\n const result = parseArgs({\n args: argv,\n options: parseOptions,\n allowPositionals: true,\n strict: false,\n })\n parsed = {\n values: result.values as ParsedArgs['values'],\n positionals: result.positionals,\n }\n } catch {\n renderHelp(def, parentName)\n process.exit(1)\n }\n\n if (parsed.values['help']) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n // Validate required options before running the command\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n if (opt.required && parsed.values[name] === undefined) {\n console.error(styleText('red', `Error: --${name} is required`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n }\n\n if (!def.run) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n try {\n await def.run(parsed)\n } catch (err) {\n console.error(styleText('red', `Error: ${err instanceof Error ? err.message : String(err)}`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n}\n\nfunction printRootHelp(programName: string, version: string, defs: CommandDefinition[]): void {\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName} <command> [options]\\n`)\n console.log(` Kubb v${version} — Generate TypeScript types, API clients, React Query hooks,`)\n console.log(` Zod schemas, and more from an OpenAPI specification.\\n`)\n console.log(` Quick start: ${styleText('cyan', `${programName} init`)} to scaffold a config, then ${styleText('cyan', `${programName} generate`)} to run.\\n`)\n console.log(styleText('bold', 'Commands:'))\n for (const def of defs) {\n console.log(` ${styleText('cyan', def.name.padEnd(16))}${def.description}`)\n }\n console.log()\n console.log(styleText('bold', 'Options:'))\n console.log(` ${styleText('cyan', '-v, --version'.padEnd(30))}Show version number`)\n console.log(` ${styleText('cyan', '-h, --help'.padEnd(30))}Show help`)\n console.log()\n console.log(`Run ${styleText('cyan', `${programName} <command> --help`)} for command-specific help.\\n`)\n}\n\n/**\n * CLI adapter using `node:util parseArgs`. No external dependencies.\n */\nexport const nodeAdapter = defineCLIAdapter({\n renderHelp(def: CommandDefinition, parentName?: string): void {\n renderHelp(def, parentName)\n },\n\n async run(defs: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void> {\n const { programName, defaultCommandName, version } = opts\n\n // Strip the leading executable + script entries when process.argv is passed directly.\n // Handles Node.js (/usr/bin/node), Bun (/usr/local/bin/bun), Deno, tsx, etc.\n // All runtime executable paths contain a path separator; bare command names do not.\n const firstArgIsExecutablePath = (argv[0]?.includes('/') || argv[0]?.includes('\\\\')) ?? false\n const args = argv.length >= 2 && firstArgIsExecutablePath ? argv.slice(2) : argv\n\n if (args[0] === '--version' || args[0] === '-v') {\n console.log(version)\n process.exit(0)\n }\n\n if (args[0] === '--help' || args[0] === '-h') {\n printRootHelp(programName, version, defs)\n process.exit(0)\n }\n\n if (args.length === 0) {\n const defaultDef = defs.find((d) => d.name === defaultCommandName)\n if (defaultDef?.run) {\n await runCommand(defaultDef, [], programName)\n } else {\n printRootHelp(programName, version, defs)\n }\n return\n }\n\n const [first, ...rest] = args\n const isKnownSubcommand = defs.some((d) => d.name === first)\n\n let def: CommandDefinition | undefined\n let commandArgv: string[]\n let parentName: string | undefined\n\n if (isKnownSubcommand) {\n def = defs.find((d) => d.name === first)\n commandArgv = rest\n parentName = programName\n } else {\n def = defs.find((d) => d.name === defaultCommandName)\n commandArgv = args\n parentName = programName\n }\n\n if (!def) {\n console.error(`Unknown command: ${first}`)\n printRootHelp(programName, version, defs)\n process.exit(1)\n }\n\n if (def.subCommands?.length) {\n const [subName, ...subRest] = commandArgv\n const subDef = def.subCommands.find((s) => s.name === subName)\n\n if (subName === '--help' || subName === '-h') {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n if (!subDef) {\n renderHelp(def, parentName)\n process.exit(subName ? 1 : 0)\n }\n\n await runCommand(subDef, subRest, `${parentName} ${def.name}`)\n return\n }\n\n await runCommand(def, commandArgv, parentName)\n },\n})\n","import { nodeAdapter } from './adapters/nodeAdapter.ts'\nimport type { CLIAdapter, CommandDefinition, RunOptions } from './types.ts'\n\n/**\n * Creates a CLI runner bound to a specific adapter.\n *\n * @default nodeAdapter (Node.js `node:util parseArgs`)\n *\n * @example\n * ```ts\n * await createCLI().run(commands, process.argv.slice(2), {\n * programName: 'kubb',\n * defaultCommandName: 'generate',\n * version: '5.0.0',\n * })\n * ```\n */\nexport function createCLI(options?: { adapter?: CLIAdapter }): {\n run(commands: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void>\n} {\n const adapter = options?.adapter ?? nodeAdapter\n\n return {\n run(commands, argv, opts) {\n return adapter.run(commands, argv, opts)\n },\n }\n}\n","/**\n * Type guard that confirms `value` is a member of `set`. Avoids type assertions with `Set<T extends string>`.\n */\nexport function isFlag<T extends string>(set: ReadonlySet<T>, value: string): value is T {\n for (const flag of set) {\n if (flag === value) return true\n }\n return false\n}\n","import { styleText } from 'node:util'\nimport { createCLI, isFlag } from '@internals/utils'\nimport { Telemetry } from '@kubb/core'\nimport { version } from '../package.json'\nimport { QUIET_FLAGS } from './constants.ts'\n\nconst cli = createCLI()\n\nfunction shouldShowTelemetryNotice(argv: Array<string>): boolean {\n if (Telemetry.isDisabled()) {\n return false\n }\n\n // Skip when the user is just asking for help or version info\n if (argv.some((arg) => isFlag(QUIET_FLAGS, arg))) {\n return false\n }\n\n // Skip in non-interactive / scripting contexts\n if (!process.stdout.isTTY) {\n return false\n }\n\n return true\n}\n\nexport async function run(argv: Array<string> = process.argv): Promise<void> {\n if (shouldShowTelemetryNotice(argv)) {\n console.log(\n `${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`,\n )\n }\n\n const { command: generateCommand } = await import('./commands/generate.ts')\n const { command: validateCommand } = await import('./commands/validate.ts')\n const { command: mcpCommand } = await import('./commands/mcp.ts')\n const { command: agentCommand } = await import('./commands/agent.ts')\n const { command: initCommand } = await import('./commands/init.ts')\n\n await cli.run([generateCommand, validateCommand, mcpCommand, agentCommand, initCommand], argv, {\n programName: 'kubb',\n defaultCommandName: 'generate',\n version,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,SAAgB,iBAAiB,MAA4C;CAC3E,OAAO,KAAK,IAAI,gBAAgB;AAClC;AAEA,SAAS,iBAAiB,KAAuC;CAC/D,OAAO;EACL,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,WAAW,IAAI;EACf,GAAI,IAAI,UAAU,SAAS,EAAE,UAAU,IAAI,SAAS,IAAI,CAAC;EACzD,SAAS,iBAAiB,IAAI,WAAW,CAAC,CAAC;EAC3C,aAAa,IAAI,cAAc,IAAI,YAAY,IAAI,gBAAgB,IAAI,CAAC;CAC1E;AACF;AAEA,SAAS,iBAAiB,SAA2D;CACnF,OAAO,OAAO,QAAQ,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS;EAKlD,OAAO;GACL;GACA,OAAA,GANgB,IA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AC7C,OAAO;CAIT,IAAI,CAAC,QAAQ,OAAO,OAClB,OAAO;CAGT,OAAO;AACT;AAEA,eAAsB,IAAI,OAAsB,QAAQ,MAAqB;CAC3E,IAAI,0BAA0B,IAAI,GAChC,QAAQ,IACN,IAAA,GAAA,UAAA,UAAA,CAAa,UAAU,SAAS,EAAE,wIAAA,GAAA,UAAA,UAAA,CAAiJ,QAAQ,0BAA0B,EAAE,IACzN;CAGF,MAAM,EAAE,SAAS,oBAAoB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,yBAAA,CAAA;CAC3C,MAAM,EAAE,SAAS,oBAAoB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,yBAAA,CAAA;CAC3C,MAAM,EAAE,SAAS,eAAe,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;CACtC,MAAM,EAAE,SAAS,iBAAiB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,sBAAA,CAAA;CACxC,MAAM,EAAE,SAAS,gBAAgB,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,qBAAA,CAAA;CAEvC,MAAM,IAAI,IAAI;EAAC;EAAiB;EAAiB;EAAY;EAAc;CAAW,GAAG,MAAM;EAC7F,aAAa;EACb,oBAAoB;EACpB,SAAA,gBAAA;CACF,CAAC;AACH"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./chunk-CRm0XQPb.js";
2
2
  import { t as defineCLIAdapter } from "./define-DNG1U8ha.js";
3
- import { t as version } from "./package-CXq9vu7l.js";
3
+ import { t as version } from "./package-BWFTbdhT.js";
4
4
  import { n as QUIET_FLAGS } from "./constants-84a47qA-.js";
5
5
  import { parseArgs, styleText } from "node:util";
6
6
  import { Telemetry } from "@kubb/core";
@@ -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-CUxL5Jcs.js");
257
- const { command: validateCommand } = await import("./validate-BO5yaxys.js");
258
- const { command: mcpCommand } = await import("./mcp-fY6xSxpb.js");
259
- const { command: agentCommand } = await import("./agent-gLdUEJW4.js");
260
- const { command: initCommand } = await import("./init-3HTDWMFe.js");
256
+ const { command: generateCommand } = await import("./generate-DOsSBmox.js");
257
+ const { command: validateCommand } = await import("./validate-BpE8mzfU.js");
258
+ const { command: mcpCommand } = await import("./mcp-DXvucahU.js");
259
+ const { command: agentCommand } = await import("./agent-D5KE3rTb.js");
260
+ const { command: initCommand } = await import("./init-BF-Xal5G.js");
261
261
  await cli.run([
262
262
  generateCommand,
263
263
  validateCommand,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../internals/utils/src/cli/schema.ts","../../../internals/utils/src/cli/help.ts","../../../internals/utils/src/cli/adapters/nodeAdapter.ts","../../../internals/utils/src/cli/parse.ts","../../../internals/utils/src/isFlag.ts","../src/index.ts"],"sourcesContent":["import type { CommandDefinition, CommandSchema, OptionDefinition, OptionSchema } from './types.ts'\n\n/**\n * Serializes `CommandDefinition[]` to a plain, JSON-serializable structure.\n * Use to expose CLI capabilities to AI agents or MCP tools.\n *\n * @example\n * ```ts\n * getCommandSchema([generateCommand, agentCommand])\n * // [{ name: 'generate', options: [...], subCommands: [] }, ...]\n * ```\n */\nexport function getCommandSchema(defs: CommandDefinition[]): CommandSchema[] {\n return defs.map(serializeCommand)\n}\n\nfunction serializeCommand(def: CommandDefinition): CommandSchema {\n return {\n name: def.name,\n description: def.description,\n arguments: def.arguments,\n ...(def.examples?.length ? { examples: def.examples } : {}),\n options: serializeOptions(def.options ?? {}),\n subCommands: def.subCommands ? def.subCommands.map(serializeCommand) : [],\n }\n}\n\nfunction serializeOptions(options: Record<string, OptionDefinition>): OptionSchema[] {\n return Object.entries(options).map(([name, opt]) => {\n const shortPart = opt.short ? `-${opt.short}, ` : ''\n const valuePart = opt.type === 'string' ? ` <${opt.hint ?? name}>` : ''\n const flags = `${shortPart}--${name}${valuePart}`\n\n return {\n name,\n flags,\n type: opt.type,\n description: opt.description,\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n ...(opt.hint ? { hint: opt.hint } : {}),\n ...(opt.enum ? { enum: opt.enum } : {}),\n ...(opt.required ? { required: opt.required } : {}),\n }\n })\n}\n","import { styleText } from 'node:util'\nimport { getCommandSchema } from './schema.ts'\nimport type { CommandDefinition, OptionSchema } from './types.ts'\n\n/** Prints formatted help output for `def` using its `CommandDefinition`.\n *\n * @example\n * ```ts\n * renderHelp({ name: 'generate', description: 'Generate client code' })\n * // prints Usage: generate [options] ...\n * ```\n */\nexport function renderHelp(def: CommandDefinition, parentName?: string): void {\n const schema = getCommandSchema([def])[0]!\n\n const programName = parentName ? `${parentName} ${schema.name}` : schema.name\n\n const argsPart = schema.arguments?.length ? ` ${schema.arguments.join(' ')}` : ''\n const subCmdPart = schema.subCommands.length ? ' <command>' : ''\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName}${argsPart}${subCmdPart} [options]\\n`)\n\n if (schema.description) {\n console.log(` ${schema.description}\\n`)\n }\n\n if (schema.subCommands.length) {\n console.log(styleText('bold', 'Commands:'))\n for (const sub of schema.subCommands) {\n console.log(` ${styleText('cyan', sub.name.padEnd(16))}${sub.description}`)\n }\n console.log()\n }\n\n const options: OptionSchema[] = [\n ...schema.options,\n {\n name: 'help',\n flags: '-h, --help',\n type: 'boolean' as const,\n description: 'Show help',\n },\n ]\n\n console.log(styleText('bold', 'Options:'))\n for (const opt of options) {\n const flags = styleText('cyan', opt.flags.padEnd(30))\n const defaultPart = opt.default !== undefined ? styleText('dim', ` (default: ${opt.default})`) : ''\n console.log(` ${flags}${opt.description}${defaultPart}`)\n }\n console.log()\n\n if (schema.examples?.length) {\n console.log(styleText('bold', 'Examples:'))\n for (const ex of schema.examples) {\n console.log(` ${styleText('dim', ex)}`)\n }\n console.log()\n }\n}\n","import { parseArgs, styleText } from 'node:util'\nimport { defineCLIAdapter } from '../define.ts'\nimport { renderHelp } from '../help.ts'\nimport type { CommandDefinition, OptionType, ParsedArgs, RunOptions } from '../types.ts'\n\ntype ParseOption = {\n type: OptionType\n short?: string\n default?: string | boolean\n}\ntype ParseOptions = Record<string, ParseOption>\n\nfunction buildParseOptions(def: CommandDefinition): ParseOptions {\n const result: ParseOptions = {\n help: { type: 'boolean', short: 'h' },\n }\n\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n result[name] = {\n type: opt.type,\n ...(opt.short ? { short: opt.short } : {}),\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n }\n }\n\n return result\n}\n\nasync function runCommand(def: CommandDefinition, argv: string[], parentName?: string): Promise<void> {\n const parseOptions = buildParseOptions(def)\n\n let parsed: ParsedArgs\n try {\n const result = parseArgs({\n args: argv,\n options: parseOptions,\n allowPositionals: true,\n strict: false,\n })\n parsed = {\n values: result.values as ParsedArgs['values'],\n positionals: result.positionals,\n }\n } catch {\n renderHelp(def, parentName)\n process.exit(1)\n }\n\n if (parsed.values['help']) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n // Validate required options before running the command\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n if (opt.required && parsed.values[name] === undefined) {\n console.error(styleText('red', `Error: --${name} is required`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n }\n\n if (!def.run) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n try {\n await def.run(parsed)\n } catch (err) {\n console.error(styleText('red', `Error: ${err instanceof Error ? err.message : String(err)}`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n}\n\nfunction printRootHelp(programName: string, version: string, defs: CommandDefinition[]): void {\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName} <command> [options]\\n`)\n console.log(` Kubb v${version} — Generate TypeScript types, API clients, React Query hooks,`)\n console.log(` Zod schemas, and more from an OpenAPI specification.\\n`)\n console.log(` Quick start: ${styleText('cyan', `${programName} init`)} to scaffold a config, then ${styleText('cyan', `${programName} generate`)} to run.\\n`)\n console.log(styleText('bold', 'Commands:'))\n for (const def of defs) {\n console.log(` ${styleText('cyan', def.name.padEnd(16))}${def.description}`)\n }\n console.log()\n console.log(styleText('bold', 'Options:'))\n console.log(` ${styleText('cyan', '-v, --version'.padEnd(30))}Show version number`)\n console.log(` ${styleText('cyan', '-h, --help'.padEnd(30))}Show help`)\n console.log()\n console.log(`Run ${styleText('cyan', `${programName} <command> --help`)} for command-specific help.\\n`)\n}\n\n/**\n * CLI adapter using `node:util parseArgs`. No external dependencies.\n */\nexport const nodeAdapter = defineCLIAdapter({\n renderHelp(def: CommandDefinition, parentName?: string): void {\n renderHelp(def, parentName)\n },\n\n async run(defs: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void> {\n const { programName, defaultCommandName, version } = opts\n\n // Strip the leading executable + script entries when process.argv is passed directly.\n // Handles Node.js (/usr/bin/node), Bun (/usr/local/bin/bun), Deno, tsx, etc.\n // All runtime executable paths contain a path separator; bare command names do not.\n const firstArgIsExecutablePath = (argv[0]?.includes('/') || argv[0]?.includes('\\\\')) ?? false\n const args = argv.length >= 2 && firstArgIsExecutablePath ? argv.slice(2) : argv\n\n if (args[0] === '--version' || args[0] === '-v') {\n console.log(version)\n process.exit(0)\n }\n\n if (args[0] === '--help' || args[0] === '-h') {\n printRootHelp(programName, version, defs)\n process.exit(0)\n }\n\n if (args.length === 0) {\n const defaultDef = defs.find((d) => d.name === defaultCommandName)\n if (defaultDef?.run) {\n await runCommand(defaultDef, [], programName)\n } else {\n printRootHelp(programName, version, defs)\n }\n return\n }\n\n const [first, ...rest] = args\n const isKnownSubcommand = defs.some((d) => d.name === first)\n\n let def: CommandDefinition | undefined\n let commandArgv: string[]\n let parentName: string | undefined\n\n if (isKnownSubcommand) {\n def = defs.find((d) => d.name === first)\n commandArgv = rest\n parentName = programName\n } else {\n def = defs.find((d) => d.name === defaultCommandName)\n commandArgv = args\n parentName = programName\n }\n\n if (!def) {\n console.error(`Unknown command: ${first}`)\n printRootHelp(programName, version, defs)\n process.exit(1)\n }\n\n if (def.subCommands?.length) {\n const [subName, ...subRest] = commandArgv\n const subDef = def.subCommands.find((s) => s.name === subName)\n\n if (subName === '--help' || subName === '-h') {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n if (!subDef) {\n renderHelp(def, parentName)\n process.exit(subName ? 1 : 0)\n }\n\n await runCommand(subDef, subRest, `${parentName} ${def.name}`)\n return\n }\n\n await runCommand(def, commandArgv, parentName)\n },\n})\n","import { nodeAdapter } from './adapters/nodeAdapter.ts'\nimport type { CLIAdapter, CommandDefinition, RunOptions } from './types.ts'\n\n/**\n * Creates a CLI runner bound to a specific adapter.\n *\n * @default nodeAdapter (Node.js `node:util parseArgs`)\n *\n * @example\n * ```ts\n * await createCLI().run(commands, process.argv.slice(2), {\n * programName: 'kubb',\n * defaultCommandName: 'generate',\n * version: '5.0.0',\n * })\n * ```\n */\nexport function createCLI(options?: { adapter?: CLIAdapter }): {\n run(commands: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void>\n} {\n const adapter = options?.adapter ?? nodeAdapter\n\n return {\n run(commands, argv, opts) {\n return adapter.run(commands, argv, opts)\n },\n }\n}\n","/**\n * Type guard that confirms `value` is a member of `set`. Avoids type assertions with `Set<T extends string>`.\n */\nexport function isFlag<T extends string>(set: ReadonlySet<T>, value: string): value is T {\n for (const flag of set) {\n if (flag === value) return true\n }\n return false\n}\n","import { styleText } from 'node:util'\nimport { createCLI, isFlag } from '@internals/utils'\nimport { Telemetry } from '@kubb/core'\nimport { version } from '../package.json'\nimport { QUIET_FLAGS } from './constants.ts'\n\nconst cli = createCLI()\n\nfunction shouldShowTelemetryNotice(argv: Array<string>): boolean {\n if (Telemetry.isDisabled()) {\n return false\n }\n\n // Skip when the user is just asking for help or version info\n if (argv.some((arg) => isFlag(QUIET_FLAGS, arg))) {\n return false\n }\n\n // Skip in non-interactive / scripting contexts\n if (!process.stdout.isTTY) {\n return false\n }\n\n return true\n}\n\nexport async function run(argv: Array<string> = process.argv): Promise<void> {\n if (shouldShowTelemetryNotice(argv)) {\n console.log(\n `${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`,\n )\n }\n\n const { command: generateCommand } = await import('./commands/generate.ts')\n const { command: validateCommand } = await import('./commands/validate.ts')\n const { command: mcpCommand } = await import('./commands/mcp.ts')\n const { command: agentCommand } = await import('./commands/agent.ts')\n const { command: initCommand } = await import('./commands/init.ts')\n\n await cli.run([generateCommand, validateCommand, mcpCommand, agentCommand, initCommand], argv, {\n programName: 'kubb',\n defaultCommandName: 'generate',\n version,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,SAAgB,iBAAiB,MAA4C;CAC3E,OAAO,KAAK,IAAI,gBAAgB;AAClC;AAEA,SAAS,iBAAiB,KAAuC;CAC/D,OAAO;EACL,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,WAAW,IAAI;EACf,GAAI,IAAI,UAAU,SAAS,EAAE,UAAU,IAAI,SAAS,IAAI,CAAC;EACzD,SAAS,iBAAiB,IAAI,WAAW,CAAC,CAAC;EAC3C,aAAa,IAAI,cAAc,IAAI,YAAY,IAAI,gBAAgB,IAAI,CAAC;CAC1E;AACF;AAEA,SAAS,iBAAiB,SAA2D;CACnF,OAAO,OAAO,QAAQ,OAAO,EAAE,KAAK,CAAC,MAAM,SAAS;EAKlD,OAAO;GACL;GACA,OAAA,GANgB,IAAI,QAAQ,IAAI,IAAI,MAAM,MAAM,GAEvB,IAAI,OADb,IAAI,SAAS,WAAW,KAAK,IAAI,QAAQ,KAAK,KAAK;GAMnE,MAAM,IAAI;GACV,aAAa,IAAI;GACjB,GA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pB;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../internals/utils/src/cli/schema.ts","../../../internals/utils/src/cli/help.ts","../../../internals/utils/src/cli/adapters/nodeAdapter.ts","../../../internals/utils/src/cli/parse.ts","../../../internals/utils/src/isFlag.ts","../src/index.ts"],"sourcesContent":["import type { CommandDefinition, CommandSchema, OptionDefinition, OptionSchema } from './types.ts'\n\n/**\n * Serializes `CommandDefinition[]` to a plain, JSON-serializable structure.\n * Use to expose CLI capabilities to AI agents or MCP tools.\n *\n * @example\n * ```ts\n * getCommandSchema([generateCommand, agentCommand])\n * // [{ name: 'generate', options: [...], subCommands: [] }, ...]\n * ```\n */\nexport function getCommandSchema(defs: CommandDefinition[]): CommandSchema[] {\n return defs.map(serializeCommand)\n}\n\nfunction serializeCommand(def: CommandDefinition): CommandSchema {\n return {\n name: def.name,\n description: def.description,\n arguments: def.arguments,\n ...(def.examples?.length ? { examples: def.examples } : {}),\n options: serializeOptions(def.options ?? {}),\n subCommands: def.subCommands ? def.subCommands.map(serializeCommand) : [],\n }\n}\n\nfunction serializeOptions(options: Record<string, OptionDefinition>): OptionSchema[] {\n return Object.entries(options).map(([name, opt]) => {\n const shortPart = opt.short ? `-${opt.short}, ` : ''\n const valuePart = opt.type === 'string' ? ` <${opt.hint ?? name}>` : ''\n const flags = `${shortPart}--${name}${valuePart}`\n\n return {\n name,\n flags,\n type: opt.type,\n description: opt.description,\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n ...(opt.hint ? { hint: opt.hint } : {}),\n ...(opt.enum ? { enum: opt.enum } : {}),\n ...(opt.required ? { required: opt.required } : {}),\n }\n })\n}\n","import { styleText } from 'node:util'\nimport { getCommandSchema } from './schema.ts'\nimport type { CommandDefinition, OptionSchema } from './types.ts'\n\n/** Prints formatted help output for `def` using its `CommandDefinition`.\n *\n * @example\n * ```ts\n * renderHelp({ name: 'generate', description: 'Generate client code' })\n * // prints Usage: generate [options] ...\n * ```\n */\nexport function renderHelp(def: CommandDefinition, parentName?: string): void {\n const schema = getCommandSchema([def])[0]!\n\n const programName = parentName ? `${parentName} ${schema.name}` : schema.name\n\n const argsPart = schema.arguments?.length ? ` ${schema.arguments.join(' ')}` : ''\n const subCmdPart = schema.subCommands.length ? ' <command>' : ''\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName}${argsPart}${subCmdPart} [options]\\n`)\n\n if (schema.description) {\n console.log(` ${schema.description}\\n`)\n }\n\n if (schema.subCommands.length) {\n console.log(styleText('bold', 'Commands:'))\n for (const sub of schema.subCommands) {\n console.log(` ${styleText('cyan', sub.name.padEnd(16))}${sub.description}`)\n }\n console.log()\n }\n\n const options: OptionSchema[] = [\n ...schema.options,\n {\n name: 'help',\n flags: '-h, --help',\n type: 'boolean' as const,\n description: 'Show help',\n },\n ]\n\n console.log(styleText('bold', 'Options:'))\n for (const opt of options) {\n const flags = styleText('cyan', opt.flags.padEnd(30))\n const defaultPart = opt.default !== undefined ? styleText('dim', ` (default: ${opt.default})`) : ''\n console.log(` ${flags}${opt.description}${defaultPart}`)\n }\n console.log()\n\n if (schema.examples?.length) {\n console.log(styleText('bold', 'Examples:'))\n for (const ex of schema.examples) {\n console.log(` ${styleText('dim', ex)}`)\n }\n console.log()\n }\n}\n","import { parseArgs, styleText } from 'node:util'\nimport { defineCLIAdapter } from '../define.ts'\nimport { renderHelp } from '../help.ts'\nimport type { CommandDefinition, OptionType, ParsedArgs, RunOptions } from '../types.ts'\n\ntype ParseOption = {\n type: OptionType\n short?: string\n default?: string | boolean\n}\ntype ParseOptions = Record<string, ParseOption>\n\nfunction buildParseOptions(def: CommandDefinition): ParseOptions {\n const result: ParseOptions = {\n help: { type: 'boolean', short: 'h' },\n }\n\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n result[name] = {\n type: opt.type,\n ...(opt.short ? { short: opt.short } : {}),\n ...(opt.default !== undefined ? { default: opt.default } : {}),\n }\n }\n\n return result\n}\n\nasync function runCommand(def: CommandDefinition, argv: string[], parentName?: string): Promise<void> {\n const parseOptions = buildParseOptions(def)\n\n let parsed: ParsedArgs\n try {\n const result = parseArgs({\n args: argv,\n options: parseOptions,\n allowPositionals: true,\n strict: false,\n })\n parsed = {\n values: result.values as ParsedArgs['values'],\n positionals: result.positionals,\n }\n } catch {\n renderHelp(def, parentName)\n process.exit(1)\n }\n\n if (parsed.values['help']) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n // Validate required options before running the command\n for (const [name, opt] of Object.entries(def.options ?? {})) {\n if (opt.required && parsed.values[name] === undefined) {\n console.error(styleText('red', `Error: --${name} is required`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n }\n\n if (!def.run) {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n try {\n await def.run(parsed)\n } catch (err) {\n console.error(styleText('red', `Error: ${err instanceof Error ? err.message : String(err)}`))\n renderHelp(def, parentName)\n process.exit(1)\n }\n}\n\nfunction printRootHelp(programName: string, version: string, defs: CommandDefinition[]): void {\n console.log(`\\n${styleText('bold', 'Usage:')} ${programName} <command> [options]\\n`)\n console.log(` Kubb v${version} — Generate TypeScript types, API clients, React Query hooks,`)\n console.log(` Zod schemas, and more from an OpenAPI specification.\\n`)\n console.log(` Quick start: ${styleText('cyan', `${programName} init`)} to scaffold a config, then ${styleText('cyan', `${programName} generate`)} to run.\\n`)\n console.log(styleText('bold', 'Commands:'))\n for (const def of defs) {\n console.log(` ${styleText('cyan', def.name.padEnd(16))}${def.description}`)\n }\n console.log()\n console.log(styleText('bold', 'Options:'))\n console.log(` ${styleText('cyan', '-v, --version'.padEnd(30))}Show version number`)\n console.log(` ${styleText('cyan', '-h, --help'.padEnd(30))}Show help`)\n console.log()\n console.log(`Run ${styleText('cyan', `${programName} <command> --help`)} for command-specific help.\\n`)\n}\n\n/**\n * CLI adapter using `node:util parseArgs`. No external dependencies.\n */\nexport const nodeAdapter = defineCLIAdapter({\n renderHelp(def: CommandDefinition, parentName?: string): void {\n renderHelp(def, parentName)\n },\n\n async run(defs: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void> {\n const { programName, defaultCommandName, version } = opts\n\n // Strip the leading executable + script entries when process.argv is passed directly.\n // Handles Node.js (/usr/bin/node), Bun (/usr/local/bin/bun), Deno, tsx, etc.\n // All runtime executable paths contain a path separator; bare command names do not.\n const firstArgIsExecutablePath = (argv[0]?.includes('/') || argv[0]?.includes('\\\\')) ?? false\n const args = argv.length >= 2 && firstArgIsExecutablePath ? argv.slice(2) : argv\n\n if (args[0] === '--version' || args[0] === '-v') {\n console.log(version)\n process.exit(0)\n }\n\n if (args[0] === '--help' || args[0] === '-h') {\n printRootHelp(programName, version, defs)\n process.exit(0)\n }\n\n if (args.length === 0) {\n const defaultDef = defs.find((d) => d.name === defaultCommandName)\n if (defaultDef?.run) {\n await runCommand(defaultDef, [], programName)\n } else {\n printRootHelp(programName, version, defs)\n }\n return\n }\n\n const [first, ...rest] = args\n const isKnownSubcommand = defs.some((d) => d.name === first)\n\n let def: CommandDefinition | undefined\n let commandArgv: string[]\n let parentName: string | undefined\n\n if (isKnownSubcommand) {\n def = defs.find((d) => d.name === first)\n commandArgv = rest\n parentName = programName\n } else {\n def = defs.find((d) => d.name === defaultCommandName)\n commandArgv = args\n parentName = programName\n }\n\n if (!def) {\n console.error(`Unknown command: ${first}`)\n printRootHelp(programName, version, defs)\n process.exit(1)\n }\n\n if (def.subCommands?.length) {\n const [subName, ...subRest] = commandArgv\n const subDef = def.subCommands.find((s) => s.name === subName)\n\n if (subName === '--help' || subName === '-h') {\n renderHelp(def, parentName)\n process.exit(0)\n }\n\n if (!subDef) {\n renderHelp(def, parentName)\n process.exit(subName ? 1 : 0)\n }\n\n await runCommand(subDef, subRest, `${parentName} ${def.name}`)\n return\n }\n\n await runCommand(def, commandArgv, parentName)\n },\n})\n","import { nodeAdapter } from './adapters/nodeAdapter.ts'\nimport type { CLIAdapter, CommandDefinition, RunOptions } from './types.ts'\n\n/**\n * Creates a CLI runner bound to a specific adapter.\n *\n * @default nodeAdapter (Node.js `node:util parseArgs`)\n *\n * @example\n * ```ts\n * await createCLI().run(commands, process.argv.slice(2), {\n * programName: 'kubb',\n * defaultCommandName: 'generate',\n * version: '5.0.0',\n * })\n * ```\n */\nexport function createCLI(options?: { adapter?: CLIAdapter }): {\n run(commands: CommandDefinition[], argv: string[], opts: RunOptions): Promise<void>\n} {\n const adapter = options?.adapter ?? nodeAdapter\n\n return {\n run(commands, argv, opts) {\n return adapter.run(commands, argv, opts)\n },\n }\n}\n","/**\n * Type guard that confirms `value` is a member of `set`. Avoids type assertions with `Set<T extends string>`.\n */\nexport function isFlag<T extends string>(set: ReadonlySet<T>, value: string): value is T {\n for (const flag of set) {\n if (flag === value) return true\n }\n return false\n}\n","import { styleText } from 'node:util'\nimport { createCLI, isFlag } from '@internals/utils'\nimport { Telemetry } from '@kubb/core'\nimport { version } from '../package.json'\nimport { QUIET_FLAGS } from './constants.ts'\n\nconst cli = createCLI()\n\nfunction shouldShowTelemetryNotice(argv: Array<string>): boolean {\n if (Telemetry.isDisabled()) {\n return false\n }\n\n // Skip when the user is just asking for help or version info\n if (argv.some((arg) => isFlag(QUIET_FLAGS, arg))) {\n return false\n }\n\n // Skip in non-interactive / scripting contexts\n if (!process.stdout.isTTY) {\n return false\n }\n\n return true\n}\n\nexport async function run(argv: Array<string> = process.argv): Promise<void> {\n if (shouldShowTelemetryNotice(argv)) {\n console.log(\n `${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`,\n )\n }\n\n const { command: generateCommand } = await import('./commands/generate.ts')\n const { command: validateCommand } = await import('./commands/validate.ts')\n const { command: mcpCommand } = await import('./commands/mcp.ts')\n const { command: agentCommand } = await import('./commands/agent.ts')\n const { command: initCommand } = await import('./commands/init.ts')\n\n await cli.run([generateCommand, validateCommand, mcpCommand, agentCommand, initCommand], argv, {\n programName: 'kubb',\n defaultCommandName: 'generate',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UAAU;AAEtB,SAAS,0BAA0B,MAA8B;CAC/D,IAAI,UAAU,WAAW,GACvB,OAAO;CAIT,IAAI,KAAK,MAAM,QAAQ,OAAO,aAAa,GAAG,CAAC,GAC7C,OAAO;CAIT,IAAI,CAAC,QAAQ,OAAO,OAClB,OAAO;CAGT,OAAO;AACT;AAEA,eAAsB,IAAI,OAAsB,QAAQ,MAAqB;CAC3E,IAAI,0BAA0B,IAAI,GAChC,QAAQ,IACN,GAAG,UAAU,UAAU,SAAS,EAAE,uIAAuI,UAAU,QAAQ,0BAA0B,EAAE,IACzN;CAGF,MAAM,EAAE,SAAS,oBAAoB,MAAM,OAAO;CAClD,MAAM,EAAE,SAAS,oBAAoB,MAAM,OAAO;CAClD,MAAM,EAAE,SAAS,eAAe,MAAM,OAAO;CAC7C,MAAM,EAAE,SAAS,iBAAiB,MAAM,OAAO;CAC/C,MAAM,EAAE,SAAS,gBAAgB,MAAM,OAAO;CAE9C,MAAM,IAAI,IAAI;EAAC;EAAiB;EAAiB;EAAY;EAAc;CAAW,GAAG,MAAM;EAC7F,aAAa;EACb,oBAAoB;EACpB;CACF,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk-CRm0XQPb.js";
2
2
  import { n as defineCommand } from "./define-DNG1U8ha.js";
3
- import { t as version } from "./package-CXq9vu7l.js";
3
+ import { t as version } from "./package-BWFTbdhT.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-3HTDWMFe.js.map
53
+ //# sourceMappingURL=init-BF-Xal5G.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-3HTDWMFe.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;CACF;CACA,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;CACA,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;EAClB,CAAC;CACH;AACF,CAAC"}
1
+ {"version":3,"file":"init-BF-Xal5G.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;CACF;CACA,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;CACA,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;EAClB,CAAC;CACH;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  require("./chunk-Bx3C2hgW.cjs");
2
2
  const require_define = require("./define-C4AB3POr.cjs");
3
- const require_package = require("./package-DE-_IDOs.cjs");
3
+ const require_package = require("./package-NriPMd0D.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-C8CwBts1.cjs.map
53
+ //# sourceMappingURL=init-T3lduN-g.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-C8CwBts1.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;CACF;CACA,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,KAAK,OAAO;GACZ,SAAA,gBAAA;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;EAClB,CAAC;CACH;AACF,CAAC"}
1
+ {"version":3,"file":"init-T3lduN-g.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;CACF;CACA,SAAS;EACP,KAAK;GACH,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;EACX;EACA,OAAO;GACL,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,QAAQ;GACN,MAAM;GACN,aAAa;GACb,OAAO;GACP,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,KAAK,OAAO;GACZ,SAAA,gBAAA;GACA,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,SAAS,OAAO;EAClB,CAAC;CACH;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk-CRm0XQPb.js";
2
2
  import { n as defineCommand } from "./define-DNG1U8ha.js";
3
- import { t as version } from "./package-CXq9vu7l.js";
3
+ import { t as version } from "./package-BWFTbdhT.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-fY6xSxpb.js.map
39
+ //# sourceMappingURL=mcp-DXvucahU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-fY6xSxpb.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;CACF;CACA,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;EACR;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR;GACA,MAAM,OAAO;GACb,MAAM,OAAO;EACf,CAAC;CACH;AACF,CAAC"}
1
+ {"version":3,"file":"mcp-DXvucahU.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;CACF;CACA,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;EACR;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAM,OAAO;EAE7B,MAAM,IAAI;GACR;GACA,MAAM,OAAO;GACb,MAAM,OAAO;EACf,CAAC;CACH;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  require("./chunk-Bx3C2hgW.cjs");
2
2
  const require_define = require("./define-C4AB3POr.cjs");
3
- const require_package = require("./package-DE-_IDOs.cjs");
3
+ const require_package = require("./package-NriPMd0D.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-DbzlupRr.cjs.map
39
+ //# sourceMappingURL=mcp-yDDShwhP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-DbzlupRr.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;CACF;CACA,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;EACR;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,EAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,SAAA,gBAAA;GACA,MAAM,OAAO;GACb,MAAM,OAAO;EACf,CAAC;CACH;AACF,CAAC"}
1
+ {"version":3,"file":"mcp-yDDShwhP.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;CACF;CACA,SAAS;EACP,MAAM;GACJ,MAAM;GACN,OAAO;GACP,aAAa;GACb,MAAM;EACR;EACA,MAAM;GACJ,MAAM;GACN,aAAa;GACb,SAAS;EACX;CACF;CACA,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,QAAQ,MAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAM,oBAAA,CAAA;EAEtB,MAAM,IAAI;GACR,SAAA,gBAAA;GACA,MAAM,OAAO;GACb,MAAM,OAAO;EACf,CAAC;CACH;AACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ //#region package.json
2
+ var version = "5.0.0-beta.43";
3
+ //#endregion
4
+ export { version as t };
5
+
6
+ //# sourceMappingURL=package-BWFTbdhT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-BWFTbdhT.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "5.0.0-beta.42";
2
+ var version = "5.0.0-beta.43";
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-DE-_IDOs.cjs.map
11
+ //# sourceMappingURL=package-NriPMd0D.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-NriPMd0D.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}