@kubb/cli 5.0.0-alpha.20 → 5.0.0-alpha.21

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 (36) hide show
  1. package/dist/{agent-BSYWyJsT.cjs → agent-Dd7uQlD3.cjs} +2 -2
  2. package/dist/{agent-BSYWyJsT.cjs.map → agent-Dd7uQlD3.cjs.map} +1 -1
  3. package/dist/{agent-twir_VZR.js → agent-TvIyrWHH.js} +2 -2
  4. package/dist/{agent-twir_VZR.js.map → agent-TvIyrWHH.js.map} +1 -1
  5. package/dist/{generate-D0kZqfuL.cjs → generate-8gBYPkBI.cjs} +2 -2
  6. package/dist/{generate-D0kZqfuL.cjs.map → generate-8gBYPkBI.cjs.map} +1 -1
  7. package/dist/{generate-aphAGUgm.js → generate-BjYMvMXy.js} +14 -3
  8. package/dist/{generate-aphAGUgm.js.map → generate-BjYMvMXy.js.map} +1 -1
  9. package/dist/{generate-Rcp3a_oB.cjs → generate-C1x42EUt.cjs} +14 -3
  10. package/dist/{generate-Rcp3a_oB.cjs.map → generate-C1x42EUt.cjs.map} +1 -1
  11. package/dist/{generate-Bem8MuCe.js → generate-CCKyB7yS.js} +2 -2
  12. package/dist/{generate-Bem8MuCe.js.map → generate-CCKyB7yS.js.map} +1 -1
  13. package/dist/index.cjs +6 -6
  14. package/dist/index.js +6 -6
  15. package/dist/{init-8SDh_pb0.js → init-C71oxvYR.js} +2 -2
  16. package/dist/{init-8SDh_pb0.js.map → init-C71oxvYR.js.map} +1 -1
  17. package/dist/{init-e8WVahrG.cjs → init-DnUVdLjN.cjs} +2 -2
  18. package/dist/{init-e8WVahrG.cjs.map → init-DnUVdLjN.cjs.map} +1 -1
  19. package/dist/{mcp-DVfEukVB.js → mcp-9R8F1uQc.js} +2 -2
  20. package/dist/{mcp-DVfEukVB.js.map → mcp-9R8F1uQc.js.map} +1 -1
  21. package/dist/{mcp-CX15K09_.cjs → mcp-DDX2VL5b.cjs} +2 -2
  22. package/dist/{mcp-CX15K09_.cjs.map → mcp-DDX2VL5b.cjs.map} +1 -1
  23. package/dist/{package-DcCkJTYU.cjs → package-CH6AW-ko.cjs} +2 -2
  24. package/dist/package-CH6AW-ko.cjs.map +1 -0
  25. package/dist/package-DTEuw2ZR.js +6 -0
  26. package/dist/package-DTEuw2ZR.js.map +1 -0
  27. package/dist/{validate-DneGZznw.js → validate-CT9EjxW0.js} +2 -2
  28. package/dist/{validate-DneGZznw.js.map → validate-CT9EjxW0.js.map} +1 -1
  29. package/dist/{validate-SXu2oA86.cjs → validate-D-Jv1vcb.cjs} +2 -2
  30. package/dist/{validate-SXu2oA86.cjs.map → validate-D-Jv1vcb.cjs.map} +1 -1
  31. package/package.json +5 -5
  32. package/src/runners/generate.ts +7 -0
  33. package/src/utils/getCosmiConfig.ts +6 -0
  34. package/dist/package-Bu9RKng0.js +0 -6
  35. package/dist/package-Bu9RKng0.js.map +0 -1
  36. package/dist/package-DcCkJTYU.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  require("./chunk-ByKO4r7w.cjs");
2
2
  const require_define = require("./define-Bdn8j5VM.cjs");
3
- const require_package = require("./package-DcCkJTYU.cjs");
3
+ const require_package = require("./package-CH6AW-ko.cjs");
4
4
  const require_constants = require("./constants-D0XHAHeZ.cjs");
5
5
  //#region src/commands/agent/start.ts
6
6
  const command$1 = require_define.defineCommand({
@@ -55,4 +55,4 @@ const command = require_define.defineCommand({
55
55
  //#endregion
56
56
  exports.command = command;
57
57
 
58
- //# sourceMappingURL=agent-BSYWyJsT.cjs.map
58
+ //# sourceMappingURL=agent-Dd7uQlD3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-BSYWyJsT.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: 'Start the Agent server',\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n port: { type: 'string', description: `Port for the server (default: ${agentDefaults.port})`, short: 'p' },\n host: { type: 'string', description: 'Host for the server', default: agentDefaults.host },\n 'allow-write': {\n type: 'boolean',\n description: 'Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.',\n default: false,\n },\n 'allow-all': { type: 'boolean', description: 'Grant all permissions (implies --allow-write).', default: false },\n },\n async run({ values }) {\n const { runAgentStart } = await import('../../runners/agent.ts')\n\n await runAgentStart({\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: 'Manage the Kubb Agent server',\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;AAIA,MAAaA,YAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,SAAS;EACP,QAAQ;GAAE,MAAM;GAAU,aAAa;GAA2B,OAAO;GAAK;EAC9E,MAAM;GAAE,MAAM;GAAU,aAAa,iCAAiCC,kBAAAA,cAAc,KAAK;GAAI,OAAO;GAAK;EACzG,MAAM;GAAE,MAAM;GAAU,aAAa;GAAuB,SAASA,kBAAAA,cAAc;GAAM;EACzF,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACD,aAAa;GAAE,MAAM;GAAW,aAAa;GAAkD,SAAS;GAAO;EAChH;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,kBAAkB,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,uBAAA,CAAA;AAEhC,QAAM,cAAc;GAClB,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;GAChD,MAAM,OAAO;GACb,YAAY,OAAO;GACnB,YAAY,OAAO;GACnB,UAAU,OAAO;GACjB,SAAA,gBAAA;GACD,CAAC;;CAEL,CAAC;;;AC3BF,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,aAAa,CAACC,UAAa;CAC5B,CAAC"}
1
+ {"version":3,"file":"agent-Dd7uQlD3.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: 'Start the Agent server',\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n port: { type: 'string', description: `Port for the server (default: ${agentDefaults.port})`, short: 'p' },\n host: { type: 'string', description: 'Host for the server', default: agentDefaults.host },\n 'allow-write': {\n type: 'boolean',\n description: 'Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.',\n default: false,\n },\n 'allow-all': { type: 'boolean', description: 'Grant all permissions (implies --allow-write).', default: false },\n },\n async run({ values }) {\n const { runAgentStart } = await import('../../runners/agent.ts')\n\n await runAgentStart({\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: 'Manage the Kubb Agent server',\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;AAIA,MAAaA,YAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,SAAS;EACP,QAAQ;GAAE,MAAM;GAAU,aAAa;GAA2B,OAAO;GAAK;EAC9E,MAAM;GAAE,MAAM;GAAU,aAAa,iCAAiCC,kBAAAA,cAAc,KAAK;GAAI,OAAO;GAAK;EACzG,MAAM;GAAE,MAAM;GAAU,aAAa;GAAuB,SAASA,kBAAAA,cAAc;GAAM;EACzF,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACD,aAAa;GAAE,MAAM;GAAW,aAAa;GAAkD,SAAS;GAAO;EAChH;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,kBAAkB,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,uBAAA,CAAA;AAEhC,QAAM,cAAc;GAClB,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;GAChD,MAAM,OAAO;GACb,YAAY,OAAO;GACnB,YAAY,OAAO;GACnB,UAAU,OAAO;GACjB,SAAA,gBAAA;GACD,CAAC;;CAEL,CAAC;;;AC3BF,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,aAAa,CAACC,UAAa;CAC5B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import "./chunk--u3MIqq1.js";
2
2
  import { n as defineCommand } from "./define-Ctii4bel.js";
3
- import { t as version } from "./package-Bu9RKng0.js";
3
+ import { t as version } from "./package-DTEuw2ZR.js";
4
4
  import { o as agentDefaults } from "./constants-DJM9zCXm.js";
5
5
  //#endregion
6
6
  //#region src/commands/agent.ts
@@ -53,4 +53,4 @@ const command = defineCommand({
53
53
  //#endregion
54
54
  export { command };
55
55
 
56
- //# sourceMappingURL=agent-twir_VZR.js.map
56
+ //# sourceMappingURL=agent-TvIyrWHH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-twir_VZR.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: 'Start the Agent server',\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n port: { type: 'string', description: `Port for the server (default: ${agentDefaults.port})`, short: 'p' },\n host: { type: 'string', description: 'Host for the server', default: agentDefaults.host },\n 'allow-write': {\n type: 'boolean',\n description: 'Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.',\n default: false,\n },\n 'allow-all': { type: 'boolean', description: 'Grant all permissions (implies --allow-write).', default: false },\n },\n async run({ values }) {\n const { runAgentStart } = await import('../../runners/agent.ts')\n\n await runAgentStart({\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: 'Manage the Kubb Agent server',\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;;ACGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aAAa;CACb,aAAa,CDFQ,cAAc;EACnC,MAAM;EACN,aAAa;EACb,SAAS;GACP,QAAQ;IAAE,MAAM;IAAU,aAAa;IAA2B,OAAO;IAAK;GAC9E,MAAM;IAAE,MAAM;IAAU,aAAa,iCAAiC,cAAc,KAAK;IAAI,OAAO;IAAK;GACzG,MAAM;IAAE,MAAM;IAAU,aAAa;IAAuB,SAAS,cAAc;IAAM;GACzF,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACD,aAAa;IAAE,MAAM;IAAW,aAAa;IAAkD,SAAS;IAAO;GAChH;EACD,MAAM,IAAI,EAAE,UAAU;GACpB,MAAM,EAAE,kBAAkB,MAAM,OAAO;AAEvC,SAAM,cAAc;IAClB,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;IAChD,MAAM,OAAO;IACb,YAAY,OAAO;IACnB,YAAY,OAAO;IACnB,UAAU,OAAO;IACjB;IACD,CAAC;;EAEL,CAAC,CCxB2B;CAC5B,CAAC"}
1
+ {"version":3,"file":"agent-TvIyrWHH.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: 'Start the Agent server',\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n port: { type: 'string', description: `Port for the server (default: ${agentDefaults.port})`, short: 'p' },\n host: { type: 'string', description: 'Host for the server', default: agentDefaults.host },\n 'allow-write': {\n type: 'boolean',\n description: 'Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.',\n default: false,\n },\n 'allow-all': { type: 'boolean', description: 'Grant all permissions (implies --allow-write).', default: false },\n },\n async run({ values }) {\n const { runAgentStart } = await import('../../runners/agent.ts')\n\n await runAgentStart({\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: 'Manage the Kubb Agent server',\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;;ACGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aAAa;CACb,aAAa,CDFQ,cAAc;EACnC,MAAM;EACN,aAAa;EACb,SAAS;GACP,QAAQ;IAAE,MAAM;IAAU,aAAa;IAA2B,OAAO;IAAK;GAC9E,MAAM;IAAE,MAAM;IAAU,aAAa,iCAAiC,cAAc,KAAK;IAAI,OAAO;IAAK;GACzG,MAAM;IAAE,MAAM;IAAU,aAAa;IAAuB,SAAS,cAAc;IAAM;GACzF,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACD,aAAa;IAAE,MAAM;IAAW,aAAa;IAAkD,SAAS;IAAO;GAChH;EACD,MAAM,IAAI,EAAE,UAAU;GACpB,MAAM,EAAE,kBAAkB,MAAM,OAAO;AAEvC,SAAM,cAAc;IAClB,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;IAChD,MAAM,OAAO;IACb,YAAY,OAAO;IACnB,YAAY,OAAO;IACnB,UAAU,OAAO;IACjB;IACD,CAAC;;EAEL,CAAC,CCxB2B;CAC5B,CAAC"}
@@ -50,7 +50,7 @@ const command = require("./define-Bdn8j5VM.cjs").defineCommand({
50
50
  },
51
51
  async run({ values, positionals }) {
52
52
  const logLevel = values.debug ? "debug" : values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
53
- const { runGenerateCommand } = await Promise.resolve().then(() => require("./generate-Rcp3a_oB.cjs"));
53
+ const { runGenerateCommand } = await Promise.resolve().then(() => require("./generate-C1x42EUt.cjs"));
54
54
  await runGenerateCommand({
55
55
  input: positionals[0],
56
56
  configPath: values.config,
@@ -62,4 +62,4 @@ const command = require("./define-Bdn8j5VM.cjs").defineCommand({
62
62
  //#endregion
63
63
  exports.command = command;
64
64
 
65
- //# sourceMappingURL=generate-D0kZqfuL.cjs.map
65
+ //# sourceMappingURL=generate-8gBYPkBI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-D0kZqfuL.cjs","names":["defineCommand"],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\n\nexport const command = defineCommand({\n name: 'generate',\n description: \"[input] Generate files based on a 'kubb.config.ts' file\",\n arguments: ['[input]'],\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n logLevel: {\n type: 'string',\n description: 'Info, silent, verbose or debug',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose|debug',\n enum: ['silent', 'info', 'verbose', 'debug'],\n },\n watch: { type: 'boolean', description: 'Watch mode based on the input file', short: 'w', default: false },\n debug: { type: 'boolean', description: 'Override logLevel to debug', short: 'd', default: false },\n verbose: { type: 'boolean', description: 'Override logLevel to verbose', short: 'v', default: false },\n silent: { type: 'boolean', description: 'Override logLevel to silent', short: 's', default: false },\n },\n async run({ values, positionals }) {\n const logLevel = values.debug ? 'debug' : values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const { runGenerateCommand } = await import('../runners/generate.ts')\n\n await runGenerateCommand({ input: positionals[0], configPath: values.config, logLevel, watch: values.watch })\n },\n})\n"],"mappings":";;AAEA,MAAa,2CAAUA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,WAAW,CAAC,UAAU;CACtB,SAAS;EACP,QAAQ;GAAE,MAAM;GAAU,aAAa;GAA2B,OAAO;GAAK;EAC9E,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;IAAW;IAAQ;GAC7C;EACD,OAAO;GAAE,MAAM;GAAW,aAAa;GAAsC,OAAO;GAAK,SAAS;GAAO;EACzG,OAAO;GAAE,MAAM;GAAW,aAAa;GAA8B,OAAO;GAAK,SAAS;GAAO;EACjG,SAAS;GAAE,MAAM;GAAW,aAAa;GAAgC,OAAO;GAAK,SAAS;GAAO;EACrG,QAAQ;GAAE,MAAM;GAAW,aAAa;GAA+B,OAAO;GAAK,SAAS;GAAO;EACpG;CACD,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EACzG,MAAM,EAAE,uBAAuB,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,0BAAA,CAAA;AAErC,QAAM,mBAAmB;GAAE,OAAO,YAAY;GAAI,YAAY,OAAO;GAAQ;GAAU,OAAO,OAAO;GAAO,CAAC;;CAEhH,CAAC"}
1
+ {"version":3,"file":"generate-8gBYPkBI.cjs","names":["defineCommand"],"sources":["../src/commands/generate.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\n\nexport const command = defineCommand({\n name: 'generate',\n description: \"[input] Generate files based on a 'kubb.config.ts' file\",\n arguments: ['[input]'],\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n logLevel: {\n type: 'string',\n description: 'Info, silent, verbose or debug',\n short: 'l',\n default: 'info',\n hint: 'silent|info|verbose|debug',\n enum: ['silent', 'info', 'verbose', 'debug'],\n },\n watch: { type: 'boolean', description: 'Watch mode based on the input file', short: 'w', default: false },\n debug: { type: 'boolean', description: 'Override logLevel to debug', short: 'd', default: false },\n verbose: { type: 'boolean', description: 'Override logLevel to verbose', short: 'v', default: false },\n silent: { type: 'boolean', description: 'Override logLevel to silent', short: 's', default: false },\n },\n async run({ values, positionals }) {\n const logLevel = values.debug ? 'debug' : values.verbose ? 'verbose' : values.silent ? 'silent' : values.logLevel\n const { runGenerateCommand } = await import('../runners/generate.ts')\n\n await runGenerateCommand({ input: positionals[0], configPath: values.config, logLevel, watch: values.watch })\n },\n})\n"],"mappings":";;AAEA,MAAa,2CAAUA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,WAAW,CAAC,UAAU;CACtB,SAAS;EACP,QAAQ;GAAE,MAAM;GAAU,aAAa;GAA2B,OAAO;GAAK;EAC9E,UAAU;GACR,MAAM;GACN,aAAa;GACb,OAAO;GACP,SAAS;GACT,MAAM;GACN,MAAM;IAAC;IAAU;IAAQ;IAAW;IAAQ;GAC7C;EACD,OAAO;GAAE,MAAM;GAAW,aAAa;GAAsC,OAAO;GAAK,SAAS;GAAO;EACzG,OAAO;GAAE,MAAM;GAAW,aAAa;GAA8B,OAAO;GAAK,SAAS;GAAO;EACjG,SAAS;GAAE,MAAM;GAAW,aAAa;GAAgC,OAAO;GAAK,SAAS;GAAO;EACrG,QAAQ;GAAE,MAAM;GAAW,aAAa;GAA+B,OAAO;GAAK,SAAS;GAAO;EACpG;CACD,MAAM,IAAI,EAAE,QAAQ,eAAe;EACjC,MAAM,WAAW,OAAO,QAAQ,UAAU,OAAO,UAAU,YAAY,OAAO,SAAS,WAAW,OAAO;EACzG,MAAM,EAAE,uBAAuB,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,0BAAA,CAAA;AAErC,QAAM,mBAAmB;GAAE,OAAO,YAAY;GAAI,YAAY,OAAO;GAAQ;GAAU,OAAO,OAAO;GAAO,CAAC;;CAEhH,CAAC"}
@@ -2,7 +2,7 @@ import "./chunk--u3MIqq1.js";
2
2
  import { n as toCause, r as toError } from "./errors-CjPmyZHy.js";
3
3
  import { a as canUseTTY, i as executeIfOnline, o as isGitHubActions, r as sendTelemetry, t as buildTelemetryEvent } from "./telemetry-CBISr5w4.js";
4
4
  import { n as tokenize } from "./shell-DLzN4fRo.js";
5
- import { t as version } from "./package-Bu9RKng0.js";
5
+ import { t as version } from "./package-DTEuw2ZR.js";
6
6
  import { a as WATCHER_IGNORED_PATHS, i as SUMMARY_SEPARATOR, t as KUBB_NPM_PACKAGE_URL } from "./constants-DJM9zCXm.js";
7
7
  import { styleText } from "node:util";
8
8
  import { EventEmitter } from "node:events";
@@ -1303,10 +1303,14 @@ async function getCosmiConfig(moduleName, config) {
1303
1303
  `.${moduleName}rc.yaml`,
1304
1304
  `.${moduleName}rc.yml`,
1305
1305
  `.${moduleName}rc.ts`,
1306
+ `.${moduleName}rc.mts`,
1307
+ `.${moduleName}rc.cts`,
1306
1308
  `.${moduleName}rc.js`,
1307
1309
  `.${moduleName}rc.mjs`,
1308
1310
  `.${moduleName}rc.cjs`,
1309
1311
  `${moduleName}.config.ts`,
1312
+ `${moduleName}.config.mts`,
1313
+ `${moduleName}.config.cts`,
1310
1314
  `${moduleName}.config.js`,
1311
1315
  `${moduleName}.config.mjs`,
1312
1316
  `${moduleName}.config.cjs`
@@ -1322,7 +1326,11 @@ async function getCosmiConfig(moduleName, config) {
1322
1326
  }),
1323
1327
  ...searchPlaces
1324
1328
  ],
1325
- loaders: { ".ts": tsLoader }
1329
+ loaders: {
1330
+ ".ts": tsLoader,
1331
+ ".mts": tsLoader,
1332
+ ".cts": tsLoader
1333
+ }
1326
1334
  });
1327
1335
  try {
1328
1336
  result = config ? await explorer.load(config) : await explorer.search();
@@ -1361,6 +1369,7 @@ async function runToolPass({ toolValue, detect, toolMap, toolLabel, successPrefi
1361
1369
  await events.emit("info", `Auto-detected ${toolLabel}: ${styleText("dim", resolvedTool)}`);
1362
1370
  }
1363
1371
  }
1372
+ let toolError;
1364
1373
  if (resolvedTool && resolvedTool !== "auto" && resolvedTool in toolMap) {
1365
1374
  const toolConfig = toolMap[resolvedTool];
1366
1375
  try {
@@ -1391,9 +1400,11 @@ async function runToolPass({ toolValue, detect, toolMap, toolLabel, successPrefi
1391
1400
  const err = new Error(toolConfig.errorMessage);
1392
1401
  err.cause = caughtError;
1393
1402
  await events.emit("error", err);
1403
+ toolError = err;
1394
1404
  }
1395
1405
  }
1396
1406
  await onEnd();
1407
+ if (toolError) throw toolError;
1397
1408
  }
1398
1409
  async function generate({ input, config: userConfig, events, logLevel: logLevel$2 }) {
1399
1410
  const inputPath = input ?? ("path" in userConfig.input ? userConfig.input.path : void 0);
@@ -1555,4 +1566,4 @@ async function runGenerateCommand({ input, configPath, logLevel: logLevelKey, wa
1555
1566
  //#endregion
1556
1567
  export { runGenerateCommand };
1557
1568
 
1558
- //# sourceMappingURL=generate-aphAGUgm.js.map
1569
+ //# sourceMappingURL=generate-BjYMvMXy.js.map