@kb-labs/shared-cli-ui 2.109.0 → 2.111.0

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/index.cjs CHANGED
@@ -2383,12 +2383,22 @@ function confirmDestructive(ctx, opts) {
2383
2383
  return null;
2384
2384
  }
2385
2385
  const a = opts.action;
2386
+ const signal = buildConfirmationSignal(a);
2386
2387
  if (opts.isJson) {
2387
- ctx.ui?.json?.(buildConfirmationSignal(a));
2388
+ ctx.ui?.json?.(signal);
2388
2389
  } else {
2389
2390
  (ctx.ui?.warn ?? ctx.ui?.error)?.(renderDestructiveMessage(a));
2390
2391
  }
2391
- return { exitCode: 1 };
2392
+ return {
2393
+ ok: false,
2394
+ error: {
2395
+ code: "CONFIRMATION_REQUIRED",
2396
+ kind: "validation",
2397
+ message: signal.message,
2398
+ details: { ...signal }
2399
+ },
2400
+ result: signal
2401
+ };
2392
2402
  }
2393
2403
 
2394
2404
  // src/modern-format.ts