@networkbase/cli 2.1.3 → 2.1.5

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/lib/tui/ask.mjs CHANGED
@@ -44,6 +44,8 @@ export async function ask(ctx, q) {
44
44
 
45
45
  /** A yes/no that defaults to the safe answer (A4.11). @param {import("../context.mjs").Context} ctx @param {{ key: string, question: string, yesLabel?: string, noLabel?: string, preview?: string, defaultYes?: boolean, heldByServer?: boolean }} c heldByServer: the server holds it for an agent token */
46
46
  export async function confirm(ctx, c) {
47
+ // --dry-run stops at the first yes, local changes too (a config file, a deleted folder), even with --yes (C3).
48
+ if (ctx.flags["dry-run"] && !ctx.flags.ownDryRun) throw new CliError("DRY_RUN", `Dry run: would ask ${c.question}`, { details: { question: c.question, preview: c.preview ?? null } });
47
49
  // --yes means yes, even where the safe default is No (delete, unlink); --answer key=no still says no.
48
50
  if (ctx.flags.yes && answered(ctx, c.key) === null) return true;
49
51
  // An agent token's big changes are held by the server for the person's yes; asking here too asked them twice.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@networkbase/cli",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "NetworkBase in your terminal: sync files, work on tasks, edit docs",
5
5
  "type": "module",
6
6
  "homepage": "https://networkbase.in",