@kubb/cli 5.0.0-beta.48 → 5.0.0-beta.49

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 (40) hide show
  1. package/README.md +1 -0
  2. package/dist/{agent-BYnlBsqZ.cjs → agent-BKMdKAIJ.cjs} +2 -2
  3. package/dist/{agent-BYnlBsqZ.cjs.map → agent-BKMdKAIJ.cjs.map} +1 -1
  4. package/dist/{agent-CYBc11RP.js → agent-yMycIvOI.js} +2 -2
  5. package/dist/{agent-CYBc11RP.js.map → agent-yMycIvOI.js.map} +1 -1
  6. package/dist/{generate-Cqw6M7g8.cjs → generate-CNqETcDC.cjs} +9 -3
  7. package/dist/generate-CNqETcDC.cjs.map +1 -0
  8. package/dist/{generate-CbyirHOL.js → generate-Ua2_bX6F.js} +9 -3
  9. package/dist/generate-Ua2_bX6F.js.map +1 -0
  10. package/dist/index.cjs +6 -6
  11. package/dist/index.js +6 -6
  12. package/dist/{init-DfycKuKN.cjs → init-Ga1vvbKs.cjs} +2 -2
  13. package/dist/{init-DfycKuKN.cjs.map → init-Ga1vvbKs.cjs.map} +1 -1
  14. package/dist/{init-_MRpSIzw.js → init-o5XBcC-j.js} +2 -2
  15. package/dist/{init-_MRpSIzw.js.map → init-o5XBcC-j.js.map} +1 -1
  16. package/dist/{mcp-cYk1I4yU.js → mcp-B203R5_F.js} +2 -2
  17. package/dist/{mcp-cYk1I4yU.js.map → mcp-B203R5_F.js.map} +1 -1
  18. package/dist/{mcp-RQHxX4Ai.cjs → mcp-HfHC9cPg.cjs} +2 -2
  19. package/dist/{mcp-RQHxX4Ai.cjs.map → mcp-HfHC9cPg.cjs.map} +1 -1
  20. package/dist/{package-B1tVSlF-.cjs → package-BWUO2ZW7.cjs} +2 -2
  21. package/dist/package-BWUO2ZW7.cjs.map +1 -0
  22. package/dist/package-BxAq00xt.js +6 -0
  23. package/dist/package-BxAq00xt.js.map +1 -0
  24. package/dist/{run-jIKabvBf.cjs → run--SXpHhbu.cjs} +18 -10
  25. package/dist/{run-jIKabvBf.cjs.map → run--SXpHhbu.cjs.map} +1 -1
  26. package/dist/{run-D3_aG-Wf.js → run-CCXgjDTA.js} +18 -10
  27. package/dist/{run-D3_aG-Wf.js.map → run-CCXgjDTA.js.map} +1 -1
  28. package/dist/{validate-CWOUN0LD.cjs → validate-D6ReW7QT.cjs} +2 -2
  29. package/dist/{validate-CWOUN0LD.cjs.map → validate-D6ReW7QT.cjs.map} +1 -1
  30. package/dist/{validate-CLoQ_Fyp.js → validate-DM2F50zr.js} +2 -2
  31. package/dist/{validate-CLoQ_Fyp.js.map → validate-DM2F50zr.js.map} +1 -1
  32. package/package.json +6 -6
  33. package/src/commands/generate.ts +6 -0
  34. package/src/runners/generate/run.ts +3 -1
  35. package/src/runners/generate/utils.ts +12 -3
  36. package/dist/generate-CbyirHOL.js.map +0 -1
  37. package/dist/generate-Cqw6M7g8.cjs.map +0 -1
  38. package/dist/package-B1tVSlF-.cjs.map +0 -1
  39. package/dist/package-C3AMApgR.js +0 -6
  40. package/dist/package-C3AMApgR.js.map +0 -1
package/README.md CHANGED
@@ -111,6 +111,7 @@ npx kubb generate
111
111
  | `--verbose` | `-v` | boolean | `false` | Override log level to `verbose` |
112
112
  | `--silent` | `-s` | boolean | `false` | Override log level to `silent` |
113
113
  | `--reporter <names>` | | string | `cli` | Reporters that render the run, comma-separated: `cli`, `json`, `file`. Overrides `config.reporters` |
114
+ | `--no-cache` | | boolean | `false` | Disable the incremental build cache and regenerate everything |
114
115
 
115
116
  #### Examples
116
117
 
@@ -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-B1tVSlF-.cjs");
3
+ const require_package = require("./package-BWUO2ZW7.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-BYnlBsqZ.cjs.map
70
+ //# sourceMappingURL=agent-BKMdKAIJ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-BYnlBsqZ.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
+ {"version":3,"file":"agent-BKMdKAIJ.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-C3AMApgR.js";
3
+ import { t as version } from "./package-BxAq00xt.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-CYBc11RP.js.map
68
+ //# sourceMappingURL=agent-yMycIvOI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-CYBc11RP.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-yMycIvOI.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"}
@@ -55,22 +55,28 @@ const command = require("./define-C4AB3POr.cjs").defineCommand({
55
55
  "json",
56
56
  "file"
57
57
  ]
58
+ },
59
+ "no-cache": {
60
+ type: "boolean",
61
+ description: "Disable the incremental build cache and force a full regeneration",
62
+ default: false
58
63
  }
59
64
  },
60
65
  async run({ values, positionals }) {
61
66
  const logLevel = values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
62
67
  const reporters = values.reporter?.split(",").map((name) => name.trim()).filter(Boolean);
63
- const { run } = await Promise.resolve().then(() => require("./run-jIKabvBf.cjs"));
68
+ const { run } = await Promise.resolve().then(() => require("./run--SXpHhbu.cjs"));
64
69
  await run({
65
70
  input: positionals[0],
66
71
  configPath: values.config,
67
72
  logLevel,
68
73
  watch: values.watch,
69
- reporters
74
+ reporters,
75
+ noCache: values["no-cache"]
70
76
  });
71
77
  }
72
78
  });
73
79
  //#endregion
74
80
  exports.command = command;
75
81
 
76
- //# sourceMappingURL=generate-Cqw6M7g8.cjs.map
82
+ //# sourceMappingURL=generate-CNqETcDC.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-CNqETcDC.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 'no-cache': {\n type: 'boolean',\n description: 'Disable the incremental build cache and force a full regeneration',\n default: false,\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 noCache: values['no-cache'],\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;EACA,YAAY;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACX;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;GACA,SAAS,OAAO;EAClB,CAAC;CACH;AACF,CAAC"}
@@ -56,22 +56,28 @@ const command = defineCommand({
56
56
  "json",
57
57
  "file"
58
58
  ]
59
+ },
60
+ "no-cache": {
61
+ type: "boolean",
62
+ description: "Disable the incremental build cache and force a full regeneration",
63
+ default: false
59
64
  }
60
65
  },
61
66
  async run({ values, positionals }) {
62
67
  const logLevel = values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
63
68
  const reporters = values.reporter?.split(",").map((name) => name.trim()).filter(Boolean);
64
- const { run } = await import("./run-D3_aG-Wf.js");
69
+ const { run } = await import("./run-CCXgjDTA.js");
65
70
  await run({
66
71
  input: positionals[0],
67
72
  configPath: values.config,
68
73
  logLevel,
69
74
  watch: values.watch,
70
- reporters
75
+ reporters,
76
+ noCache: values["no-cache"]
71
77
  });
72
78
  }
73
79
  });
74
80
  //#endregion
75
81
  export { command };
76
82
 
77
- //# sourceMappingURL=generate-CbyirHOL.js.map
83
+ //# sourceMappingURL=generate-Ua2_bX6F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-Ua2_bX6F.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 'no-cache': {\n type: 'boolean',\n description: 'Disable the incremental build cache and force a full regeneration',\n default: false,\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 noCache: values['no-cache'],\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;EACA,YAAY;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACX;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;GACA,SAAS,OAAO;EAClB,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-B1tVSlF-.cjs");
4
+ const require_package = require("./package-BWUO2ZW7.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-Cqw6M7g8.cjs"));
258
- const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-CWOUN0LD.cjs"));
259
- const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-RQHxX4Ai.cjs"));
260
- const { command: agentCommand } = await Promise.resolve().then(() => require("./agent-BYnlBsqZ.cjs"));
261
- const { command: initCommand } = await Promise.resolve().then(() => require("./init-DfycKuKN.cjs"));
257
+ const { command: generateCommand } = await Promise.resolve().then(() => require("./generate-CNqETcDC.cjs"));
258
+ const { command: validateCommand } = await Promise.resolve().then(() => require("./validate-D6ReW7QT.cjs"));
259
+ const { command: mcpCommand } = await Promise.resolve().then(() => require("./mcp-HfHC9cPg.cjs"));
260
+ const { command: agentCommand } = await Promise.resolve().then(() => require("./agent-BKMdKAIJ.cjs"));
261
+ const { command: initCommand } = await Promise.resolve().then(() => require("./init-Ga1vvbKs.cjs"));
262
262
  await cli.run([
263
263
  generateCommand,
264
264
  validateCommand,
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-C3AMApgR.js";
3
+ import { t as version } from "./package-BxAq00xt.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-CbyirHOL.js");
257
- const { command: validateCommand } = await import("./validate-CLoQ_Fyp.js");
258
- const { command: mcpCommand } = await import("./mcp-cYk1I4yU.js");
259
- const { command: agentCommand } = await import("./agent-CYBc11RP.js");
260
- const { command: initCommand } = await import("./init-_MRpSIzw.js");
256
+ const { command: generateCommand } = await import("./generate-Ua2_bX6F.js");
257
+ const { command: validateCommand } = await import("./validate-DM2F50zr.js");
258
+ const { command: mcpCommand } = await import("./mcp-B203R5_F.js");
259
+ const { command: agentCommand } = await import("./agent-yMycIvOI.js");
260
+ const { command: initCommand } = await import("./init-o5XBcC-j.js");
261
261
  await cli.run([
262
262
  generateCommand,
263
263
  validateCommand,
@@ -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-B1tVSlF-.cjs");
3
+ const require_package = require("./package-BWUO2ZW7.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-DfycKuKN.cjs.map
53
+ //# sourceMappingURL=init-Ga1vvbKs.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-DfycKuKN.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
+ {"version":3,"file":"init-Ga1vvbKs.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-C3AMApgR.js";
3
+ import { t as version } from "./package-BxAq00xt.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-_MRpSIzw.js.map
53
+ //# sourceMappingURL=init-o5XBcC-j.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init-_MRpSIzw.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-o5XBcC-j.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
  import "./chunk-CRm0XQPb.js";
2
2
  import { n as defineCommand } from "./define-DNG1U8ha.js";
3
- import { t as version } from "./package-C3AMApgR.js";
3
+ import { t as version } from "./package-BxAq00xt.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-cYk1I4yU.js.map
39
+ //# sourceMappingURL=mcp-B203R5_F.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-cYk1I4yU.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-B203R5_F.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-B1tVSlF-.cjs");
3
+ const require_package = require("./package-BWUO2ZW7.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-RQHxX4Ai.cjs.map
39
+ //# sourceMappingURL=mcp-HfHC9cPg.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-RQHxX4Ai.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"}
1
+ {"version":3,"file":"mcp-HfHC9cPg.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"}
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "5.0.0-beta.48";
2
+ var version = "5.0.0-beta.49";
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-B1tVSlF-.cjs.map
11
+ //# sourceMappingURL=package-BWUO2ZW7.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-BWUO2ZW7.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,6 @@
1
+ //#region package.json
2
+ var version = "5.0.0-beta.49";
3
+ //#endregion
4
+ export { version as t };
5
+
6
+ //# sourceMappingURL=package-BxAq00xt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-BxAq00xt.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Bx3C2hgW.cjs");
2
2
  const require_errors = require("./errors-DykI11xo.cjs");
3
3
  const require_shell = require("./shell-Lh-vLWwH.cjs");
4
- const require_package = require("./package-B1tVSlF-.cjs");
4
+ const require_package = require("./package-BWUO2ZW7.cjs");
5
5
  const require_constants = require("./constants-BtmponZ3.cjs");
6
6
  let node_util = require("node:util");
7
7
  let node_events = require("node:events");
@@ -1105,22 +1105,29 @@ async function getCosmiConfig(configFile) {
1105
1105
  * Discovers the Kubb config via cosmiconfig and resolves it into a normalized array of configs.
1106
1106
  * Every config in the result is guaranteed to have a `plugins` array.
1107
1107
  */
1108
- async function getConfigs({ configPath, input, watch, logLevel }) {
1108
+ async function getConfigs({ configPath, input, watch, logLevel, noCache }) {
1109
1109
  const result = await getCosmiConfig(configPath);
1110
1110
  const cli = {
1111
1111
  config: configPath,
1112
1112
  input,
1113
1113
  watch,
1114
- logLevel
1114
+ logLevel,
1115
+ noCache
1115
1116
  };
1116
1117
  const resolved = await (typeof result.config === "function" ? result.config(cli) : result.config);
1117
1118
  const userConfigs = Array.isArray(resolved) ? resolved : [resolved];
1118
1119
  return {
1119
1120
  configPath: result.filepath,
1120
- configs: userConfigs.map((item) => ({
1121
- ...item,
1122
- plugins: item.plugins ?? []
1123
- }))
1121
+ configs: userConfigs.map((item) => {
1122
+ const config = {
1123
+ ...item,
1124
+ plugins: item.plugins ?? []
1125
+ };
1126
+ return noCache ? {
1127
+ ...config,
1128
+ cache: void 0
1129
+ } : config;
1130
+ })
1124
1131
  };
1125
1132
  }
1126
1133
  /**
@@ -1434,7 +1441,7 @@ async function checkForUpdate(hooks) {
1434
1441
  * Loads configs, sets up the selected reporters (CLI `--reporter` overrides `config.reporters`),
1435
1442
  * checks for a newer version, and calls `generate` for each config entry.
1436
1443
  */
1437
- async function run({ input, configPath, logLevel: logLevelKey, watch, reporters: cliReporters }) {
1444
+ async function run({ input, configPath, logLevel: logLevelKey, watch, reporters: cliReporters, noCache }) {
1438
1445
  const logLevel = _kubb_core.logLevel[logLevelKey] ?? _kubb_core.logLevel.info;
1439
1446
  const hooks = new AsyncEventEmitter();
1440
1447
  let configs;
@@ -1444,7 +1451,8 @@ async function run({ input, configPath, logLevel: logLevelKey, watch, reporters:
1444
1451
  configPath,
1445
1452
  input,
1446
1453
  watch,
1447
- logLevel: logLevelKey
1454
+ logLevel: logLevelKey,
1455
+ noCache
1448
1456
  });
1449
1457
  configs = loaded.configs;
1450
1458
  resolvedConfigPath = loaded.configPath;
@@ -1509,4 +1517,4 @@ async function run({ input, configPath, logLevel: logLevelKey, watch, reporters:
1509
1517
  //#endregion
1510
1518
  exports.run = run;
1511
1519
 
1512
- //# sourceMappingURL=run-jIKabvBf.cjs.map
1520
+ //# sourceMappingURL=run--SXpHhbu.cjs.map