@kubb/cli 5.0.0-alpha.20 → 5.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-BSYWyJsT.cjs → agent-BjqSlGbL.cjs} +2 -2
- package/dist/{agent-BSYWyJsT.cjs.map → agent-BjqSlGbL.cjs.map} +1 -1
- package/dist/{agent-twir_VZR.js → agent-ByY8fLIu.js} +2 -2
- package/dist/{agent-twir_VZR.js.map → agent-ByY8fLIu.js.map} +1 -1
- package/dist/{generate-Bem8MuCe.js → generate-BHvqTDgW.js} +2 -2
- package/dist/{generate-Bem8MuCe.js.map → generate-BHvqTDgW.js.map} +1 -1
- package/dist/{generate-aphAGUgm.js → generate-BTVEOK9g.js} +14 -3
- package/dist/{generate-aphAGUgm.js.map → generate-BTVEOK9g.js.map} +1 -1
- package/dist/{generate-D0kZqfuL.cjs → generate-CkPcBmkL.cjs} +2 -2
- package/dist/{generate-D0kZqfuL.cjs.map → generate-CkPcBmkL.cjs.map} +1 -1
- package/dist/{generate-Rcp3a_oB.cjs → generate-DkG9KuxZ.cjs} +14 -3
- package/dist/{generate-Rcp3a_oB.cjs.map → generate-DkG9KuxZ.cjs.map} +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/dist/{init-e8WVahrG.cjs → init-Bkv77Gv8.cjs} +2 -2
- package/dist/{init-e8WVahrG.cjs.map → init-Bkv77Gv8.cjs.map} +1 -1
- package/dist/{init-8SDh_pb0.js → init-FyESRw3w.js} +2 -2
- package/dist/{init-8SDh_pb0.js.map → init-FyESRw3w.js.map} +1 -1
- package/dist/{mcp-CX15K09_.cjs → mcp-DDCZenwU.cjs} +2 -2
- package/dist/{mcp-CX15K09_.cjs.map → mcp-DDCZenwU.cjs.map} +1 -1
- package/dist/{mcp-DVfEukVB.js → mcp-Eu8cB1JK.js} +2 -2
- package/dist/{mcp-DVfEukVB.js.map → mcp-Eu8cB1JK.js.map} +1 -1
- package/dist/package-8ywu_5ep.js +6 -0
- package/dist/package-8ywu_5ep.js.map +1 -0
- package/dist/{package-DcCkJTYU.cjs → package-LkCLfON3.cjs} +2 -2
- package/dist/package-LkCLfON3.cjs.map +1 -0
- package/dist/{validate-SXu2oA86.cjs → validate-BX1hYvQp.cjs} +2 -2
- package/dist/{validate-SXu2oA86.cjs.map → validate-BX1hYvQp.cjs.map} +1 -1
- package/dist/{validate-DneGZznw.js → validate-Db4bLgOT.js} +2 -2
- package/dist/{validate-DneGZznw.js.map → validate-Db4bLgOT.js.map} +1 -1
- package/package.json +5 -5
- package/src/runners/generate.ts +7 -0
- package/src/utils/getCosmiConfig.ts +6 -0
- package/dist/package-Bu9RKng0.js +0 -6
- package/dist/package-Bu9RKng0.js.map +0 -1
- 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-
|
|
3
|
+
const require_package = require("./package-LkCLfON3.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-
|
|
58
|
+
//# sourceMappingURL=agent-BjqSlGbL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-
|
|
1
|
+
{"version":3,"file":"agent-BjqSlGbL.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-
|
|
3
|
+
import { t as version } from "./package-8ywu_5ep.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-
|
|
56
|
+
//# sourceMappingURL=agent-ByY8fLIu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-
|
|
1
|
+
{"version":3,"file":"agent-ByY8fLIu.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"}
|
|
@@ -51,7 +51,7 @@ const command = defineCommand({
|
|
|
51
51
|
},
|
|
52
52
|
async run({ values, positionals }) {
|
|
53
53
|
const logLevel = values.debug ? "debug" : values.verbose ? "verbose" : values.silent ? "silent" : values.logLevel;
|
|
54
|
-
const { runGenerateCommand } = await import("./generate-
|
|
54
|
+
const { runGenerateCommand } = await import("./generate-BTVEOK9g.js");
|
|
55
55
|
await runGenerateCommand({
|
|
56
56
|
input: positionals[0],
|
|
57
57
|
configPath: values.config,
|
|
@@ -63,4 +63,4 @@ const command = defineCommand({
|
|
|
63
63
|
//#endregion
|
|
64
64
|
export { command };
|
|
65
65
|
|
|
66
|
-
//# sourceMappingURL=generate-
|
|
66
|
+
//# sourceMappingURL=generate-BHvqTDgW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-
|
|
1
|
+
{"version":3,"file":"generate-BHvqTDgW.js","names":[],"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,UAAU,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,MAAM,OAAO;AAE5C,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-
|
|
5
|
+
import { t as version } from "./package-8ywu_5ep.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: {
|
|
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-
|
|
1569
|
+
//# sourceMappingURL=generate-BTVEOK9g.js.map
|