@kubb/cli 5.12.0 → 5.12.2

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 (65) hide show
  1. package/README.md +2 -0
  2. package/dist/{Telemetry-B8mC2nqp.js → Telemetry-BhoWyCRu.js} +2 -2
  3. package/dist/{Telemetry-B8mC2nqp.js.map → Telemetry-BhoWyCRu.js.map} +1 -1
  4. package/dist/{Telemetry-Gl2uIT4u.cjs → Telemetry-C7v3wFNp.cjs} +2 -2
  5. package/dist/{Telemetry-Gl2uIT4u.cjs.map → Telemetry-C7v3wFNp.cjs.map} +1 -1
  6. package/dist/{background-Bi46Uzf1.cjs → background-BCDVfX30.cjs} +2 -2
  7. package/dist/{background-Bi46Uzf1.cjs.map → background-BCDVfX30.cjs.map} +1 -1
  8. package/dist/{background-D7b5cDs_.js → background-BLkaGx4A.js} +1 -1
  9. package/dist/{background-DyD2KqN5.js → background-CUF-snCU.js} +2 -2
  10. package/dist/{background-DyD2KqN5.js.map → background-CUF-snCU.js.map} +1 -1
  11. package/dist/credentials-CZK6zPLv.js.map +1 -1
  12. package/dist/credentials-DDaKqtJn.cjs.map +1 -1
  13. package/dist/index.cjs +32 -19
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +32 -19
  16. package/dist/index.js.map +1 -1
  17. package/dist/{registry-Cw2X7I3b.js → registry-BUPuJlgX.js} +3 -3
  18. package/dist/{registry-Cw2X7I3b.js.map → registry-BUPuJlgX.js.map} +1 -1
  19. package/dist/{registry-BnkCWWeX.cjs → registry-Cl-wgD7H.cjs} +3 -3
  20. package/dist/{registry-BnkCWWeX.cjs.map → registry-Cl-wgD7H.cjs.map} +1 -1
  21. package/dist/{reporters-lJQRYc6c.cjs → reporters-DkBWh4sD.cjs} +4 -4
  22. package/dist/{reporters-lJQRYc6c.cjs.map → reporters-DkBWh4sD.cjs.map} +1 -1
  23. package/dist/{reporters-BReH227e.js → reporters-DzAzRAlM.js} +4 -4
  24. package/dist/{reporters-BReH227e.js.map → reporters-DzAzRAlM.js.map} +1 -1
  25. package/dist/{run-8KLWLcEf.cjs → run-9uoP-2Xh.cjs} +4 -4
  26. package/dist/{run-8KLWLcEf.cjs.map → run-9uoP-2Xh.cjs.map} +1 -1
  27. package/dist/{run-Cd6W_RNN.js → run-BJXDoxOJ.js} +6 -6
  28. package/dist/{run-Cd6W_RNN.js.map → run-BJXDoxOJ.js.map} +1 -1
  29. package/dist/{run-05nazgoj.js → run-BWT7PtHZ.js} +4 -4
  30. package/dist/{run-05nazgoj.js.map → run-BWT7PtHZ.js.map} +1 -1
  31. package/dist/{run-ChGaCan5.js → run-BcTgwks6.js} +19 -7
  32. package/dist/run-BcTgwks6.js.map +1 -0
  33. package/dist/{run-BDLWu55k.cjs → run-CK19O5v2.cjs} +6 -6
  34. package/dist/{run-BDLWu55k.cjs.map → run-CK19O5v2.cjs.map} +1 -1
  35. package/dist/{run-CIE_og50.js → run-CioQPR0t.js} +2 -2
  36. package/dist/{run-CIE_og50.js.map → run-CioQPR0t.js.map} +1 -1
  37. package/dist/{run-CORf5LJQ.js → run-DklXr_kO.js} +1 -1
  38. package/dist/{run-Czt1mbNa.cjs → run-DqFL5SMR.cjs} +2 -2
  39. package/dist/{run-Czt1mbNa.cjs.map → run-DqFL5SMR.cjs.map} +1 -1
  40. package/dist/{run-CLJnncEi.cjs → run-T82Jef8b.cjs} +19 -7
  41. package/dist/run-T82Jef8b.cjs.map +1 -0
  42. package/dist/{snapshot-DcLGxpoM.cjs → snapshot-D5HiDktY.cjs} +6 -6
  43. package/dist/{snapshot-DcLGxpoM.cjs.map → snapshot-D5HiDktY.cjs.map} +1 -1
  44. package/dist/{snapshot-CYfGZRlq.js → snapshot-DLPs2buj.js} +6 -6
  45. package/dist/{snapshot-CYfGZRlq.js.map → snapshot-DLPs2buj.js.map} +1 -1
  46. package/dist/{status-DrA1XG77.cjs → status-BFMmzCfD.cjs} +3 -3
  47. package/dist/{status-DrA1XG77.cjs.map → status-BFMmzCfD.cjs.map} +1 -1
  48. package/dist/{status-DGDWubBc.js → status-DlLYGONt.js} +3 -3
  49. package/dist/{status-DGDWubBc.js.map → status-DlLYGONt.js.map} +1 -1
  50. package/dist/studioWorker.js +2 -2
  51. package/dist/{summary-DQ_SULKW.cjs → summary-BwbfP0Qj.cjs} +3 -3
  52. package/dist/{summary-DQ_SULKW.cjs.map → summary-BwbfP0Qj.cjs.map} +1 -1
  53. package/dist/{summary-CiCW8bRA.js → summary-DvLq6uim.js} +3 -3
  54. package/dist/{summary-CiCW8bRA.js.map → summary-DvLq6uim.js.map} +1 -1
  55. package/dist/{text-hhzIqdVE.js → text-DG7CyUe7.js} +2 -2
  56. package/dist/{text-hhzIqdVE.js.map → text-DG7CyUe7.js.map} +1 -1
  57. package/dist/{text-BKjdI_f1.cjs → text-DfFJj91M.cjs} +2 -2
  58. package/dist/{text-BKjdI_f1.cjs.map → text-DfFJj91M.cjs.map} +1 -1
  59. package/dist/{utils-CZzj70Rn.js → utils-BeOShrJ6.js} +3 -3
  60. package/dist/{utils-CZzj70Rn.js.map → utils-BeOShrJ6.js.map} +1 -1
  61. package/dist/{utils-Dyd-rk1U.cjs → utils-Cb4fBZiX.cjs} +3 -3
  62. package/dist/{utils-Dyd-rk1U.cjs.map → utils-Cb4fBZiX.cjs.map} +1 -1
  63. package/package.json +7 -7
  64. package/dist/run-CLJnncEi.cjs.map +0 -1
  65. package/dist/run-ChGaCan5.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { t as __name } from "./rolldown-runtime-CRm0XQPb.js";
2
2
  import { t as getErrorMessage } from "./errors-DmC83ALX.js";
3
- import { a as getElapsedMs, i as formatMs, r as version, t as isDisabled } from "./Telemetry-B8mC2nqp.js";
4
- import { _ as write, a as readOutputFiles, c as createSpinner, g as read, l as withSpinner, m as exists, n as diffFiles } from "./utils-CZzj70Rn.js";
5
- import { _ as isRichOutput, a as logOutro, c as logBlock, d as logStep, f as logWarn, i as logIntro, l as logError, r as isInteractiveRun, t as pluralize } from "./text-hhzIqdVE.js";
6
- import { a as installSpec, c as toRegistryId, f as wantsMascot, i as incompatibility, l as toShortId, n as closestIds, o as isOutdated, r as fetchRegistryIndex, s as registryUrl, t as bumpOf, u as getBanner } from "./registry-Cw2X7I3b.js";
3
+ import { a as getElapsedMs, i as formatMs, r as version, t as isDisabled } from "./Telemetry-BhoWyCRu.js";
4
+ import { _ as write, a as readOutputFiles, c as createSpinner, g as read, l as withSpinner, m as exists, n as diffFiles } from "./utils-BeOShrJ6.js";
5
+ import { _ as isRichOutput, a as logOutro, c as logBlock, d as logStep, f as logWarn, i as logIntro, l as logError, r as isInteractiveRun, t as pluralize } from "./text-DG7CyUe7.js";
6
+ import { a as installSpec, c as toRegistryId, f as wantsMascot, i as incompatibility, l as toShortId, n as closestIds, o as isOutdated, r as fetchRegistryIndex, s as registryUrl, t as bumpOf, u as getBanner } from "./registry-BUPuJlgX.js";
7
7
  import { a as initDefaults, i as KUBB_PACKAGE_NAME, n as findConfigFile, r as KUBB_CONFIG_FILENAME, t as getConfigs } from "./config-Bh00Hwpw.js";
8
- import { t as logCommandSummary } from "./summary-CiCW8bRA.js";
8
+ import { t as logCommandSummary } from "./summary-DvLq6uim.js";
9
9
  import { styleText } from "node:util";
10
10
  import dryrun, { pluginId as dryRunId } from "@gunshi/plugin-dryrun";
11
11
  import { cli, define, defineWithTypes } from "gunshi";
@@ -74,6 +74,18 @@ const studioPermissionArgs = {
74
74
  default: false,
75
75
  toKebab: true
76
76
  },
77
+ allowInstall: {
78
+ type: "boolean",
79
+ description: "Let Studio install extensions from the registry with kubb add; needs --allow-config-edit too. Asked for once per project when omitted",
80
+ default: false,
81
+ toKebab: true
82
+ },
83
+ allowUpdate: {
84
+ type: "boolean",
85
+ description: "Let Studio update installed extensions with kubb update. Asked for once per project when omitted",
86
+ default: false,
87
+ toKebab: true
88
+ },
77
89
  allowExec: {
78
90
  type: "boolean",
79
91
  description: "Run the formatter, the linter, and output.postGenerate after a generation",
@@ -161,7 +173,7 @@ const command$13 = defineWithTypes()({
161
173
  async run(ctx) {
162
174
  const { values } = ctx;
163
175
  const logLevel = resolveLogLevel(values);
164
- const { run } = await import("./run-Cd6W_RNN.js");
176
+ const { run } = await import("./run-BJXDoxOJ.js");
165
177
  await run({
166
178
  input: values.input,
167
179
  configPath: values.config,
@@ -185,7 +197,7 @@ const command$12 = define({
185
197
  ].join("\n"),
186
198
  rendering: { header: null },
187
199
  async run() {
188
- const { run } = await import("./run-CIE_og50.js");
200
+ const { run } = await import("./run-CioQPR0t.js");
189
201
  await run();
190
202
  }
191
203
  });
@@ -200,7 +212,7 @@ function studioCommand({ action, block, ...definition }) {
200
212
  ...definition,
201
213
  toKebab: true,
202
214
  async run({ values }) {
203
- const { runStudio } = await import("./run-CORf5LJQ.js");
215
+ const { runStudio } = await import("./run-DklXr_kO.js");
204
216
  await runStudio(values, action, { block });
205
217
  }
206
218
  });
@@ -230,7 +242,7 @@ const command$11 = studioCommand({
230
242
  },
231
243
  block: true,
232
244
  async action(options) {
233
- const { connect } = await import("./run-CORf5LJQ.js");
245
+ const { connect } = await import("./run-DklXr_kO.js");
234
246
  await connect(options);
235
247
  }
236
248
  });
@@ -242,7 +254,7 @@ const command$10 = studioCommand({
242
254
  examples: ["kubb studio login", "kubb studio login --url http://localhost:3000"].join("\n"),
243
255
  args: command$11.args,
244
256
  async action(options) {
245
- const { login } = await import("./run-CORf5LJQ.js");
257
+ const { login } = await import("./run-DklXr_kO.js");
246
258
  await login(options);
247
259
  }
248
260
  });
@@ -254,7 +266,7 @@ const command$9 = studioCommand({
254
266
  examples: "kubb studio logout",
255
267
  args: {},
256
268
  async action() {
257
- const { stopWorker } = await import("./background-D7b5cDs_.js");
269
+ const { stopWorker } = await import("./background-BLkaGx4A.js");
258
270
  const { clearCredentials } = await import("./credentials-C8tjAhTo.js");
259
271
  await stopWorker();
260
272
  await clearCredentials();
@@ -297,7 +309,7 @@ const command$8 = define({
297
309
  ...logLevelArg
298
310
  },
299
311
  async run(ctx) {
300
- const { runner } = await import("./snapshot-CYfGZRlq.js");
312
+ const { runner } = await import("./snapshot-DLPs2buj.js");
301
313
  await runner(ctx);
302
314
  }
303
315
  });
@@ -308,7 +320,7 @@ const command$7 = studioCommand({
308
320
  description: "Keep this project connected to Kubb Studio in the background.",
309
321
  args: command$11.args,
310
322
  async action(options) {
311
- const { startWorker } = await import("./background-D7b5cDs_.js");
323
+ const { startWorker } = await import("./background-BLkaGx4A.js");
312
324
  await startWorker(options);
313
325
  }
314
326
  });
@@ -316,7 +328,7 @@ const stopCommand = define({
316
328
  name: "stop",
317
329
  description: "Stop this project's background connection and keep its pairing.",
318
330
  async run() {
319
- const { stopWorker } = await import("./background-D7b5cDs_.js");
331
+ const { stopWorker } = await import("./background-BLkaGx4A.js");
320
332
  await stopWorker();
321
333
  console.log("Background connection stopped.");
322
334
  }
@@ -329,9 +341,9 @@ const command$6 = studioCommand({
329
341
  examples: "kubb studio status",
330
342
  args: { url: studioConnectionArgs.url },
331
343
  async action(options) {
332
- const { getWorkerLogPath, getWorkerStatus } = await import("./background-D7b5cDs_.js");
344
+ const { getWorkerLogPath, getWorkerStatus } = await import("./background-BLkaGx4A.js");
333
345
  const { readCredentials } = await import("./credentials-C8tjAhTo.js");
334
- const { formatStatus } = await import("./status-DGDWubBc.js");
346
+ const { formatStatus } = await import("./status-DlLYGONt.js");
335
347
  const [worker, credentials] = await Promise.all([getWorkerStatus(), readCredentials()]);
336
348
  console.log([
337
349
  "",
@@ -399,7 +411,7 @@ const command$4 = define({
399
411
  }
400
412
  },
401
413
  async run({ values }) {
402
- const { run } = await import("./run-05nazgoj.js");
414
+ const { run } = await import("./run-BWT7PtHZ.js");
403
415
  await run({
404
416
  input: values.input,
405
417
  configPath: values.config
@@ -940,6 +952,7 @@ async function run$4({ id: input, configPath, yes, install }) {
940
952
  unconfigured.push(target);
941
953
  }
942
954
  const manual = unconfigured.length > 0;
955
+ if (manual && manifest.kind === "plugin") process$1.exitCode = 1;
943
956
  if (manual) logBlock([
944
957
  "Add the import to your Kubb config and merge the property into its defineConfig call:",
945
958
  "",
@@ -1430,7 +1443,7 @@ async function regenerate({ cwd, configPath }) {
1430
1443
  const spinner = createSpinner();
1431
1444
  spinner.start("Generating with the new versions");
1432
1445
  try {
1433
- const [{ getConfigs }, { generate }] = await Promise.all([import("./config-iVdOcpro.js"), import("./run-Cd6W_RNN.js")]);
1446
+ const [{ getConfigs }, { generate }] = await Promise.all([import("./config-iVdOcpro.js"), import("./run-BJXDoxOJ.js")]);
1434
1447
  const { configs } = await getConfigs({ configPath });
1435
1448
  const dirs = configs.map((config) => path.resolve(config.root ?? cwd, config.output.path));
1436
1449
  const before = new Map((await Promise.all(dirs.map(readOutputFiles))).flatMap((files) => [...files]));
@@ -1533,7 +1546,7 @@ async function run$1({ ids, dryRun, yes }) {
1533
1546
  summary("Updates available", "planned", [`Dry run: nothing was installed. Run kubb update to install ${proposals.length === 1 ? "it" : "them"}.`]);
1534
1547
  return;
1535
1548
  }
1536
- const defaults = proposals.filter((entry) => !isMajor(entry));
1549
+ const defaults = proposals.filter((entry) => wanted.has(entry.id) || !isMajor(entry));
1537
1550
  const chosen = yes ? defaults.map((entry) => entry.id) : await clack.multiselect({
1538
1551
  message: "Select the updates to install",
1539
1552
  options: proposals.map((entry) => ({