@kb-labs/shared-cli-ui 2.109.0 → 2.110.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 +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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?.(
|
|
2388
|
+
ctx.ui?.json?.(signal);
|
|
2388
2389
|
} else {
|
|
2389
2390
|
(ctx.ui?.warn ?? ctx.ui?.error)?.(renderDestructiveMessage(a));
|
|
2390
2391
|
}
|
|
2391
|
-
return {
|
|
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
|