@ghostlytools/cli 1.10.2 → 1.10.4

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 (99) hide show
  1. package/README.md +4 -2
  2. package/dist/assets/{api-DcE4KylM.js → api-DgS7f5TT.js} +2 -2
  3. package/dist/assets/{api-EUGHGnRz.js → api-DkcMOWLX.js} +44 -19
  4. package/dist/assets/api-DkcMOWLX.js.map +1 -0
  5. package/dist/assets/{apiKit-CJVp_crp.js → apiKit-D6Oj-vFx.js} +27 -11
  6. package/dist/assets/apiKit-D6Oj-vFx.js.map +1 -0
  7. package/dist/assets/{apps-C54T_MOT.js → apps-B22SeD6T.js} +3 -3
  8. package/dist/assets/{apps-C54T_MOT.js.map → apps-B22SeD6T.js.map} +1 -1
  9. package/dist/assets/{apps-C-KbyLCa.js → apps-DgALLHzS.js} +1 -1
  10. package/dist/assets/{arkade-BmxJTa65.js → arkade-D5cPr_dV.js} +2 -2
  11. package/dist/assets/{arkade-BmxJTa65.js.map → arkade-D5cPr_dV.js.map} +1 -1
  12. package/dist/assets/{backup-C0Plp-DF.js → backup-DndsW2uX.js} +1 -1
  13. package/dist/assets/{backup-BxSH5BZG.js → backup-dzJLzg-k.js} +6 -6
  14. package/dist/assets/{backup-BxSH5BZG.js.map → backup-dzJLzg-k.js.map} +1 -1
  15. package/dist/assets/{blobFiles-BnjN_Vrz.js → blobFiles-XZ9PEXYy.js} +2 -2
  16. package/dist/assets/{blobFiles-BnjN_Vrz.js.map → blobFiles-XZ9PEXYy.js.map} +1 -1
  17. package/dist/assets/{buttons-B-ZJYdo0.js → buttons-ByKT_vP8.js} +4 -4
  18. package/dist/assets/{buttons-B-ZJYdo0.js.map → buttons-ByKT_vP8.js.map} +1 -1
  19. package/dist/assets/buttons-TVCNj280.js +2 -0
  20. package/dist/assets/{client-CDa87uYD.js → client-q7dVOtYb.js} +10 -4
  21. package/dist/assets/client-q7dVOtYb.js.map +1 -0
  22. package/dist/assets/{codec-D45W1L8n.js → codec-HD6iOn_D.js} +2 -2
  23. package/dist/assets/{codec-D45W1L8n.js.map → codec-HD6iOn_D.js.map} +1 -1
  24. package/dist/assets/{envelope-C3yFCQa-.js → envelope-C-0tfbOG.js} +2 -2
  25. package/dist/assets/{envelope-C3yFCQa-.js.map → envelope-C-0tfbOG.js.map} +1 -1
  26. package/dist/assets/{fileBytes-DjBYYyXT.js → fileBytes-BABGEF13.js} +2 -2
  27. package/dist/assets/{fileBytes-DjBYYyXT.js.map → fileBytes-BABGEF13.js.map} +1 -1
  28. package/dist/assets/{fileBytes-DMzrIdCu.js → fileBytes-CQQK2uOh.js} +1 -1
  29. package/dist/assets/{fileBytes-Douk1yOp.js → fileBytes-DqnfKIkj.js} +2 -2
  30. package/dist/assets/{fileBytes-Douk1yOp.js.map → fileBytes-DqnfKIkj.js.map} +1 -1
  31. package/dist/assets/fileBytesIdb-BtXATa7j.js +2 -0
  32. package/dist/assets/{fileBytesIdb-CkClu9YI.js → fileBytesIdb-DrXmDUSy.js} +2 -2
  33. package/dist/assets/{fileBytesIdb-CkClu9YI.js.map → fileBytesIdb-DrXmDUSy.js.map} +1 -1
  34. package/dist/assets/{fileBytesOpfs-WryQuOgK.js → fileBytesOpfs-udKCzcLe.js} +6 -9
  35. package/dist/assets/{fileBytesOpfs-WryQuOgK.js.map → fileBytesOpfs-udKCzcLe.js.map} +1 -1
  36. package/dist/assets/{fixedHosts-C6nCHjOa.js → fixedHosts-CN3CsslV.js} +7 -8
  37. package/dist/assets/fixedHosts-CN3CsslV.js.map +1 -0
  38. package/dist/assets/{groupFiles-DYopNE57.js → groupFiles-BFv9K_za.js} +256 -110
  39. package/dist/assets/groupFiles-BFv9K_za.js.map +1 -0
  40. package/dist/assets/{host-G5seUwaI.js → host-C-wwtVt2.js} +378 -60
  41. package/dist/assets/host-C-wwtVt2.js.map +1 -0
  42. package/dist/assets/{hyperdhtRelay-B_uHjg_r.js → hyperdhtRelay-B9EQTm_M.js} +2 -2
  43. package/dist/assets/{hyperdhtRelay-B_uHjg_r.js.map → hyperdhtRelay-B9EQTm_M.js.map} +1 -1
  44. package/dist/assets/{irohWeb-C-2oslSU.js → irohWeb-o0H_NlCF.js} +2 -2
  45. package/dist/assets/{irohWeb-C-2oslSU.js.map → irohWeb-o0H_NlCF.js.map} +1 -1
  46. package/dist/assets/{main-Dk--nD7X.js → main-CLUIPy4d.js} +49 -30
  47. package/dist/assets/main-CLUIPy4d.js.map +1 -0
  48. package/dist/assets/{mainline-HPlVrl8R.js → mainline-B2qmNsib.js} +155 -3
  49. package/dist/assets/mainline-B2qmNsib.js.map +1 -0
  50. package/dist/assets/{networkReason-CfpO9ayz.js → networkReason-BEl-DDWd.js} +4 -4
  51. package/dist/assets/{networkReason-CfpO9ayz.js.map → networkReason-BEl-DDWd.js.map} +1 -1
  52. package/dist/assets/{nwc-BY7BPttn.js → nwc-BNkhjJHN.js} +3 -3
  53. package/dist/assets/{nwc-BY7BPttn.js.map → nwc-BNkhjJHN.js.map} +1 -1
  54. package/dist/assets/{nwcProvider-CfpbNUf7.js → nwcProvider-CvaRJdHT.js} +2 -2
  55. package/dist/assets/{nwcProvider-CfpbNUf7.js.map → nwcProvider-CvaRJdHT.js.map} +1 -1
  56. package/dist/assets/{ownDid-DJFZM2cV.js → ownDid-D67KNdJq.js} +3 -2
  57. package/dist/assets/ownDid-D67KNdJq.js.map +1 -0
  58. package/dist/assets/{profiles-DKmZGXp6.js → profiles-QDB7V_Qt.js} +7 -5
  59. package/dist/assets/profiles-QDB7V_Qt.js.map +1 -0
  60. package/dist/assets/{registry-BUm4cAzV.js → registry-BKkSnpjL.js} +126 -19
  61. package/dist/assets/registry-BKkSnpjL.js.map +1 -0
  62. package/dist/assets/{registry-CAzrtV0_.js → registry-DN5a8Ul6.js} +1 -1
  63. package/dist/assets/{resolve-CDD4X68j.js → resolve-DhpAggDP.js} +24 -5
  64. package/dist/assets/resolve-DhpAggDP.js.map +1 -0
  65. package/dist/assets/{server-DcOsgYDU.js → server-7w2O5wsv.js} +956 -277
  66. package/dist/assets/server-7w2O5wsv.js.map +1 -0
  67. package/dist/assets/{src-D31D1_oY.js → src-BZkY6N3J.js} +909 -198
  68. package/dist/assets/src-BZkY6N3J.js.map +1 -0
  69. package/dist/assets/{sshForges-DerRwMf3.js → sshForges-Cxjt3c51.js} +2 -2
  70. package/dist/assets/{sshForges-DerRwMf3.js.map → sshForges-Cxjt3c51.js.map} +1 -1
  71. package/dist/assets/{translate-C-sj0VJe.js → translate-v8wF1GcF.js} +2 -2
  72. package/dist/assets/{translate-C-sj0VJe.js.map → translate-v8wF1GcF.js.map} +1 -1
  73. package/dist/assets/{usdt-DwHqp625.js → usdt-63gYjM5E.js} +7 -4
  74. package/dist/assets/usdt-63gYjM5E.js.map +1 -0
  75. package/dist/assets/{waitNotice-D52RWbV4.js → waitNotice-Ce3YCinu.js} +27 -5
  76. package/dist/assets/waitNotice-Ce3YCinu.js.map +1 -0
  77. package/dist/assets/{words-Db9WgatT.js → words-PUnyO4ph.js} +4 -4
  78. package/dist/assets/words-PUnyO4ph.js.map +1 -0
  79. package/dist/ghostly.mjs +1 -1
  80. package/package.json +1 -1
  81. package/dist/assets/api-EUGHGnRz.js.map +0 -1
  82. package/dist/assets/apiKit-CJVp_crp.js.map +0 -1
  83. package/dist/assets/buttons-DA3wZfG0.js +0 -2
  84. package/dist/assets/client-CDa87uYD.js.map +0 -1
  85. package/dist/assets/fileBytesIdb-CD5Uv490.js +0 -2
  86. package/dist/assets/fixedHosts-C6nCHjOa.js.map +0 -1
  87. package/dist/assets/groupFiles-DYopNE57.js.map +0 -1
  88. package/dist/assets/host-G5seUwaI.js.map +0 -1
  89. package/dist/assets/main-Dk--nD7X.js.map +0 -1
  90. package/dist/assets/mainline-HPlVrl8R.js.map +0 -1
  91. package/dist/assets/ownDid-DJFZM2cV.js.map +0 -1
  92. package/dist/assets/profiles-DKmZGXp6.js.map +0 -1
  93. package/dist/assets/registry-BUm4cAzV.js.map +0 -1
  94. package/dist/assets/resolve-CDD4X68j.js.map +0 -1
  95. package/dist/assets/server-DcOsgYDU.js.map +0 -1
  96. package/dist/assets/src-D31D1_oY.js.map +0 -1
  97. package/dist/assets/usdt-DwHqp625.js.map +0 -1
  98. package/dist/assets/waitNotice-D52RWbV4.js.map +0 -1
  99. package/dist/assets/words-Db9WgatT.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { Da as VOICE_LIMITS, bo as cardLine, do as PR_CHECKS, fo as PR_STATES, go as TASK_STATUSES, ho as STATUS_CARD_LIMITS, lo as CRON_LINE, mo as RUN_RESULTS, nr as GROUP_FILE_LIMITS, po as ROUTINE_STATES, uo as ITEM_STATES, wo as statusCardBytes, xo as cardUrl } from "./src-D31D1_oY.js";
1
+ import { Aa as VOICE_LIMITS, Co as cardLine, Do as statusCardBytes, _o as RUN_RESULTS, fo as CRON_LINE, go as ROUTINE_STATES, ho as PR_STATES, mo as PR_CHECKS, nr as GROUP_FILE_LIMITS, po as ITEM_STATES, vo as STATUS_CARD_LIMITS, wo as cardUrl, yo as TASK_STATUSES } from "./src-BZkY6N3J.js";
2
2
  import { i as localFileError, n as EXIT, r as asCliError, t as CliError } from "./errors-Dt-ZnyOX.js";
3
- import { a as WALLET_TYPES, d as ENGINE_READS, f as READ_PARAMS, i as TRANSPORT_NAMES, l as ENGINE_METHODS, n as CHAT_METHODS, o as turnRef, p as SECRET_RESULTS, r as PAY_METHODS, t as ADDRESS_TYPES, u as ENGINE_PARAMS } from "./words-Db9WgatT.js";
4
- import { g as namedByThem, t as CONTACT_KEY } from "./apiKit-CJVp_crp.js";
3
+ import { a as WALLET_TYPES, d as ENGINE_READS, f as READ_PARAMS, i as TRANSPORT_NAMES, l as ENGINE_METHODS, n as CHAT_METHODS, o as turnRef, p as SECRET_RESULTS, r as PAY_METHODS, t as ADDRESS_TYPES, u as ENGINE_PARAMS } from "./words-PUnyO4ph.js";
4
+ import { g as namedByThem, t as CONTACT_KEY } from "./apiKit-D6Oj-vFx.js";
5
5
  import { n as dropSecretEnv, t as childEnv } from "./childEnv-BVOQK9EA.js";
6
- import { _ as userPath, a as checkShownName, c as ghostlyHome, f as profileExists, h as startingDaemon, i as checkProfileName, l as listProfiles, m as selectProfile, o as createProfile, p as profilePaths, s as currentProfile, u as lockOwner, y as ownProfile } from "./profiles-DKmZGXp6.js";
7
- import { n as waitNotice, r as waitsFor } from "./waitNotice-D52RWbV4.js";
8
- import { g as isCallRate, i as isNotTheDaemon, r as connectDaemon, t as DaemonClient, u as CALL_RATES } from "./client-CDa87uYD.js";
6
+ import { a as checkShownName, b as ownProfile, c as ghostlyHome, f as noProfile, g as startingDaemon, h as selectProfile, i as checkProfileName, l as listProfiles, m as profilePaths, o as createProfile, p as profileExists, s as currentProfile, u as lockOwner, v as userPath } from "./profiles-QDB7V_Qt.js";
7
+ import { i as waitsFor, r as waitNotice } from "./waitNotice-Ce3YCinu.js";
8
+ import { g as isCallRate, i as isNotTheDaemon, r as connectDaemon, t as DaemonClient, u as CALL_RATES } from "./client-q7dVOtYb.js";
9
9
  import { spawn } from "node:child_process";
10
10
  import { accessSync, closeSync, constants, existsSync, fstatSync, openSync, readFileSync, readSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
11
11
  import { dirname, resolve } from "node:path";
@@ -13,7 +13,7 @@ import { connect } from "node:net";
13
13
  import { format } from "node:util";
14
14
  var package_default = {
15
15
  name: "@ghostlytools/cli",
16
- version: "1.10.2",
16
+ version: "1.10.4",
17
17
  type: "module",
18
18
  description: "Ghostly for bots and terminals: the app's own engine, headless on Node, behind a daemon and a `ghostly` command with JSON output.",
19
19
  license: "MIT",
@@ -117,7 +117,9 @@ var GLOBAL_OPTIONS = {
117
117
  * the ghostly-cli lesson of #208). So is a positional that `idSlot` says takes an id, a key or a draft: there a word
118
118
  * that starts with `-`, is longer than two characters and is no option of the command is the value (`--` starts one
119
119
  * id in 4096; `-x` stays an option). Any other positional that starts with `-` is refused instead of sent: a
120
- * mistyped flag must not reach a contact as text. Put `--` before a message that starts with a dash.
120
+ * mistyped flag must not reach a contact as text. Put `--` before a message that starts with a dash. Where `parsing`
121
+ * says a number comes, a word of a dash and a digit (`-5`) that is no option is that number, for the command to refuse
122
+ * in its own words (`<sats> takes a whole number from 1 up, not -5`); no option's name starts with a digit.
121
123
  *
122
124
  * An unknown option names the command `parsing` gives, the nearest of its options and its help.
123
125
  */
@@ -144,6 +146,10 @@ function parseArgs(argv, spec, idSlot = () => false, parsing) {
144
146
  positionals.push(...argv.slice(i + 1));
145
147
  break;
146
148
  }
149
+ if (/^-\d/.test(arg) && parsing?.number?.(positionals.length) && !isOption(arg)) {
150
+ positionals.push(arg);
151
+ continue;
152
+ }
147
153
  if (arg.startsWith("-") && arg.length > 2 && idSlot(positionals.length) && !isOption(arg)) {
148
154
  positionals.push(arg);
149
155
  continue;
@@ -374,10 +380,16 @@ function refs(values, flag, what) {
374
380
  if (!Array.isArray(values)) return;
375
381
  for (const value of values) if (typeof value === "string" && !value.replace(/^group:/, "").trim()) throw new CliError("usage", `--${flag} ${JSON.stringify(value)} names no ${what}`);
376
382
  }
377
- /** A whole number of sats from the command line. */
383
+ /**
384
+ * A whole number of sats from the command line (`<sats>`), refused in a number flag's words: `<sats> takes a whole
385
+ * number from 1 up, not -5`, a number as typed, other words quoted. Before: "Not an amount in sats: \"-5\"".
386
+ */
378
387
  function sats(value) {
379
388
  const n = Number(value);
380
- if (!value || !Number.isSafeInteger(n) || n <= 0) throw new CliError("usage", `Not an amount in sats: ${JSON.stringify(value)}`);
389
+ if (!value || !Number.isSafeInteger(n) || n <= 0) {
390
+ const shown = /^-?\d+(\.\d+)?$/.test(value ?? "") ? value : JSON.stringify(value);
391
+ throw new CliError("usage", `<sats> takes a whole number from 1 up, not ${shown}`);
392
+ }
381
393
  return n;
382
394
  }
383
395
  /** `name=value` options as an object. */
@@ -1083,7 +1095,7 @@ var commands$8 = {
1083
1095
  description: "Replace the three files when they are there"
1084
1096
  }
1085
1097
  },
1086
- run: async ({ options }, a) => (await import("./apps-C-KbyLCa.js")).initApp(a.dir, {
1098
+ run: async ({ options }, a) => (await import("./apps-DgALLHzS.js")).initApp(a.dir, {
1087
1099
  name: options.name,
1088
1100
  title: options.title,
1089
1101
  force: options.force === true
@@ -1123,7 +1135,7 @@ var commands$8 = {
1123
1135
  description: "This version's sequence, higher than the bundle at --out's (default: one more than it)"
1124
1136
  }
1125
1137
  },
1126
- run: async ({ options }, a) => (await import("./apps-C-KbyLCa.js")).publishApp(a.dir, keyFile(options.key, "app publish <dir> --key <file> [--out <file>] [--sequence n]"), here(options.out), options.sequence)
1138
+ run: async ({ options }, a) => (await import("./apps-DgALLHzS.js")).publishApp(a.dir, keyFile(options.key, "app publish <dir> --key <file> [--out <file>] [--sequence n]"), here(options.out), options.sequence)
1127
1139
  },
1128
1140
  "app revoke": {
1129
1141
  method: "app.revoke",
@@ -1156,7 +1168,7 @@ var commands$8 = {
1156
1168
  description: "Allow --up-to past the bundle's own sequence (versions published from elsewhere), and a --reason that looks like a seed, a key or ecash"
1157
1169
  }
1158
1170
  },
1159
- run: async ({ options }, a) => (await import("./apps-C-KbyLCa.js")).revokeApp(a.dir, keyFile(options.key, "app revoke <dir> --key <file> (--digest <digest>... | --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]"), {
1171
+ run: async ({ options }, a) => (await import("./apps-DgALLHzS.js")).revokeApp(a.dir, keyFile(options.key, "app revoke <dir> --key <file> (--digest <digest>... | --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]"), {
1160
1172
  digests: options.digest,
1161
1173
  upTo: options["up-to"],
1162
1174
  reason: options.reason,
@@ -1217,7 +1229,7 @@ var commands$8 = {
1217
1229
  usage: "app verify <bundle|url>",
1218
1230
  summary: "Check a .ghostlyapp as a client would, from a file or an https URL: its manifest and digest, or refused (exit 1) with the reason, revoked when the ghostly-revoke.json beside it revokes this version",
1219
1231
  args: ["bundle"],
1220
- run: async (_, a) => (await import("./apps-C-KbyLCa.js")).verifyApp(a.bundle)
1232
+ run: async (_, a) => (await import("./apps-DgALLHzS.js")).verifyApp(a.bundle)
1221
1233
  },
1222
1234
  "store sign": {
1223
1235
  method: "store.sign",
@@ -1234,7 +1246,7 @@ var commands$8 = {
1234
1246
  description: "The folder to write ghostly-store.json and ghostly-store.sig in (default: the index's)"
1235
1247
  }
1236
1248
  },
1237
- run: async ({ options }, a) => (await import("./apps-C-KbyLCa.js")).signStore(a.index, keyFile(options.key, "store sign <index> --key <file> [--out <dir>]"), here(options.out))
1249
+ run: async ({ options }, a) => (await import("./apps-DgALLHzS.js")).signStore(a.index, keyFile(options.key, "store sign <index> --key <file> [--out <dir>]"), here(options.out))
1238
1250
  }
1239
1251
  };
1240
1252
  //#endregion
@@ -3188,6 +3200,15 @@ function idSlot(command) {
3188
3200
  };
3189
3201
  return (index) => at(index) && (shift === 0 || index + shift >= names.length || at(index + shift));
3190
3202
  }
3203
+ /** Positionals that take a number (`<sats>`): there `-5` is that number, refused as one, not an unknown option. */
3204
+ var NUMBER_ARGS = /* @__PURE__ */ new Set(["amount"]);
3205
+ /** Which of a command's positionals take a number, by index; a leading `name?` shifts them as it does in `idSlot`. */
3206
+ function numberSlot(command) {
3207
+ const names = (command.args ?? []).map((name) => name.replace(/\?$/, ""));
3208
+ const shift = leadingOptionals(command.args ?? []).length;
3209
+ const at = (index) => NUMBER_ARGS.has(names[index] ?? "");
3210
+ return (index) => at(index) && (shift === 0 || index + shift >= names.length || at(index + shift));
3211
+ }
3191
3212
  /** Whether a command's last positional takes the rest of the line as words, not ids: a text, a name, a path, emoji. */
3192
3213
  function takesText(command) {
3193
3214
  const last = command.args?.at(-1)?.replace(/\?$/, "");
@@ -4015,15 +4036,15 @@ var VERSION = package_default.version;
4015
4036
  * command a running daemon answers loads none of them, and starts about as fast as Node does. Statically imported, they
4016
4037
  * cost every command ~100 ms before its socket was opened.
4017
4038
  */
4018
- var engineApi = () => import("./api-DcE4KylM.js");
4019
- var engineHost = () => import("./host-G5seUwaI.js");
4039
+ var engineApi = () => import("./api-DgS7f5TT.js");
4040
+ var engineHost = () => import("./host-C-wwtVt2.js");
4020
4041
  /**
4021
4042
  * `--translate <lang>`'s translator, or null (not asked; or the runtime is not there, said on stderr). Loaded only when
4022
4043
  * asked: the app's message parser it reads costs every other command nothing.
4023
4044
  */
4024
4045
  async function translatorFor(value, home) {
4025
4046
  if (value === void 0) return null;
4026
- const { loadDetector, openTranslator, translateTarget } = await import("./translate-C-sj0VJe.js");
4047
+ const { loadDetector, openTranslator, translateTarget } = await import("./translate-v8wF1GcF.js");
4027
4048
  return openTranslator({
4028
4049
  home,
4029
4050
  to: translateTarget(value),
@@ -4060,14 +4081,11 @@ function requireProfile(g) {
4060
4081
  createProfile(g.home, g.profile);
4061
4082
  return;
4062
4083
  }
4063
- throw noProfile(g);
4064
- }
4065
- function noProfile(g) {
4066
- return new CliError("not_found", `No profile ${g.profile}: make it with \`ghostly profile create ${g.profile}\``);
4084
+ throw noProfile(g.profile);
4067
4085
  }
4068
4086
  /** For a command that only reads: a mistyped profile is named as one, and `default` is not made by asking about it. */
4069
4087
  function knownProfile(g) {
4070
- if (g.profile !== "default" && !profileExists(g.home, g.profile)) throw noProfile(g);
4088
+ if (g.profile !== "default" && !profileExists(g.home, g.profile)) throw noProfile(g.profile);
4071
4089
  }
4072
4090
  /** `1.2.3`, with an optional `v`, an optional `-beta.1` prerelease and an optional `+build` that never orders. */
4073
4091
  var RELEASE = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
@@ -4885,7 +4903,7 @@ async function profileCommand(sub, argv) {
4885
4903
  ...light
4886
4904
  };
4887
4905
  const made = await withSession(g, (s) => s.call("profile.backup", params), { offline: true });
4888
- if (unsealed) process.stderr.write("Not encrypted: this file holds the profile's keys, chats and wallet secrets in the clear. Anyone who gets it gets everything in it, including any money in its wallets.\n");
4906
+ if (unsealed) process.stderr.write("ghostly: Not encrypted: this file holds the profile's keys, chats and wallet secrets in the clear. Anyone who gets it gets everything in it, including any money in its wallets.\n");
4889
4907
  print(made);
4890
4908
  return;
4891
4909
  }
@@ -4894,7 +4912,7 @@ async function profileCommand(sub, argv) {
4894
4912
  if (!given || !name) throw new CliError("usage", `Missing <${given ? "new profile" : "file"}>: ghostly profile restore <file> <new profile> [--passphrase-file f] [--use]`);
4895
4913
  noMoreThan(2, parsed.positionals, "profile restore <file> <new profile> [--passphrase-file f] [--use]");
4896
4914
  const file = here(given);
4897
- const { backupFileProtection, restoreProfile } = await import("./backup-C0Plp-DF.js");
4915
+ const { backupFileProtection, restoreProfile } = await import("./backup-DndsW2uX.js");
4898
4916
  const protection = await backupFileProtection(file);
4899
4917
  const paths = await restoreProfile(g.home, checkProfileName(name), file, protection === "none" ? void 0 : backupPassphrase(parsed.options["passphrase-file"], RESTORE_PASSPHRASE));
4900
4918
  if (parsed.options.use) selectProfile(g.home, name);
@@ -5633,7 +5651,7 @@ async function textCommand(name, argv) {
5633
5651
  };
5634
5652
  if (spec.target === "group") params.mentions = parsed.options.mention ?? [];
5635
5653
  if (parsed.options.reply !== void 0) params.reply = parsed.options.reply;
5636
- if (!spec.message) Object.assign(params, (await import("./buttons-DA3wZfG0.js")).buttonsOf(parsed.options));
5654
+ if (!spec.message) Object.assign(params, (await import("./buttons-TVCNj280.js")).buttonsOf(parsed.options));
5637
5655
  print(await withSession(g, (s) => {
5638
5656
  if (spec.target === "chat") {
5639
5657
  params.wait = parsed.options.wait ?? (s.mode === "one-shot" ? spec.message ? "confirmed" : "sent" : "none");
@@ -5682,7 +5700,7 @@ async function identityAddCommand(argv) {
5682
5700
  if (!provider) throw new CliError("usage", "Missing <provider>: ghostly identity add <provider> [subject] [--signer id] [--field name=value]... [--stdin] [--days n] [--timeout s]");
5683
5701
  inRange(parsed.options, "timeout", "a number of seconds", 5, 3600);
5684
5702
  const items = parsed.options.field ?? [];
5685
- const known = parsed.options.days !== void 0 || items.length ? (await import("./registry-CAzrtV0_.js")).IDENTITY_PROVIDERS.find((p) => p.id === provider) : void 0;
5703
+ const known = parsed.options.days !== void 0 || items.length ? (await import("./registry-DN5a8Ul6.js")).IDENTITY_PROVIDERS.find((p) => p.id === provider) : void 0;
5686
5704
  if (known && parsed.options.days !== void 0) inRange(parsed.options, "days", "a whole number", 1, known.validity.maxDays, true);
5687
5705
  const { fields, warning } = await identityFields(items, parsed.options.stdin === true, identitySecretFields(known, parsed.options.signer), readStdin, process.stdin.isTTY === true);
5688
5706
  if (warning) process.stderr.write(`ghostly: ${warning}\n`);
@@ -5737,7 +5755,8 @@ async function tableCommand(name, argv) {
5737
5755
  const command = COMMANDS[name];
5738
5756
  const parsed = parseArgs(argv, command.options ?? {}, idSlot(command), {
5739
5757
  command: name,
5740
- text: takesText(command)
5758
+ text: takesText(command),
5759
+ number: numberSlot(command)
5741
5760
  });
5742
5761
  const g = globals(parsed);
5743
5762
  pretty = g.pretty;
@@ -5792,7 +5811,7 @@ async function tableCommand(name, argv) {
5792
5811
  });
5793
5812
  if (translator) {
5794
5813
  try {
5795
- printAnswer(await (await import("./translate-C-sj0VJe.js")).translateAnswer(result, translator));
5814
+ printAnswer(await (await import("./translate-v8wF1GcF.js")).translateAnswer(result, translator));
5796
5815
  } finally {
5797
5816
  translator.close();
5798
5817
  }
@@ -6017,4 +6036,4 @@ async function run(argv) {
6017
6036
  //#endregion
6018
6037
  export { run };
6019
6038
 
6020
- //# sourceMappingURL=main-Dk--nD7X.js.map
6039
+ //# sourceMappingURL=main-CLUIPy4d.js.map