@ghostlytools/cli 1.12.0 → 1.12.1

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 (63) hide show
  1. package/README.md +5 -5
  2. package/dist/assets/{api-DLzCtePC.js → api-BwEgbvvK.js} +49 -23
  3. package/dist/assets/api-BwEgbvvK.js.map +1 -0
  4. package/dist/assets/{api-DYMKyb1k.js → api-jRUXnBdX.js} +2 -2
  5. package/dist/assets/{apiKit-CVaEzKWQ.js → apiKit-BlsNk-Cx.js} +2 -2
  6. package/dist/assets/{apiKit-CVaEzKWQ.js.map → apiKit-BlsNk-Cx.js.map} +1 -1
  7. package/dist/assets/{appFetch-D56GsYuq.js → appFetch-CW9fJPHh.js} +2 -2
  8. package/dist/assets/{appFetch-D56GsYuq.js.map → appFetch-CW9fJPHh.js.map} +1 -1
  9. package/dist/assets/{apps-BPFW19Wc.js → apps-BcG4u6SM.js} +1 -1
  10. package/dist/assets/{apps-XnZ8VEuj.js → apps-CL8TXHhu.js} +6 -6
  11. package/dist/assets/{apps-XnZ8VEuj.js.map → apps-CL8TXHhu.js.map} +1 -1
  12. package/dist/assets/{backup-DpyvT9Z6.js → backup-BA41EDvh.js} +47 -8
  13. package/dist/assets/backup-BA41EDvh.js.map +1 -0
  14. package/dist/assets/{backup-COX6j1_W.js → backup-xZfV-ytw.js} +1 -1
  15. package/dist/assets/{bitcoind-DTsrd7TF.js → bitcoind-Dh7n9amb.js} +2 -2
  16. package/dist/assets/{bitcoind-DTsrd7TF.js.map → bitcoind-Dh7n9amb.js.map} +1 -1
  17. package/dist/assets/buttons-CsGdQNnR.js +1 -0
  18. package/dist/assets/{buttons-BvWqHJeh.js → buttons-SH1tNRh7.js} +6 -6
  19. package/dist/assets/buttons-SH1tNRh7.js.map +1 -0
  20. package/dist/assets/{client-kGZ3ZdUW.js → client-DGS-atRu.js} +2 -2
  21. package/dist/assets/{client-kGZ3ZdUW.js.map → client-DGS-atRu.js.map} +1 -1
  22. package/dist/assets/{endpoint-B0vE5ojY.js → endpoint-Cvu-taMs.js} +42 -5
  23. package/dist/assets/{endpoint-B0vE5ojY.js.map → endpoint-Cvu-taMs.js.map} +1 -1
  24. package/dist/assets/{groupMeta-DTQAJG50.js → groupMeta-DxuJzko_.js} +49 -28
  25. package/dist/assets/groupMeta-DxuJzko_.js.map +1 -0
  26. package/dist/assets/{host-z0FAHP9Z.js → host-BxM-HMr0.js} +62 -9
  27. package/dist/assets/host-BxM-HMr0.js.map +1 -0
  28. package/dist/assets/{hyperdhtRelay-CvsAfQRQ.js → hyperdhtRelay-DLUiwfnt.js} +32 -4
  29. package/dist/assets/hyperdhtRelay-DLUiwfnt.js.map +1 -0
  30. package/dist/assets/{irohWeb-CLBx5MIv.js → irohWeb-CbnGtUo6.js} +175 -6
  31. package/dist/assets/irohWeb-CbnGtUo6.js.map +1 -0
  32. package/dist/assets/{main-CVqkvuIo.js → main-CwTaepxR.js} +48 -31
  33. package/dist/assets/main-CwTaepxR.js.map +1 -0
  34. package/dist/assets/{ownStatus-DMEhrpkd.js → ownStatus-DtzIllg2.js} +4 -3
  35. package/dist/assets/ownStatus-DtzIllg2.js.map +1 -0
  36. package/dist/assets/{profiles-BFSGqDFC.js → profiles-BOYGlmu2.js} +2 -2
  37. package/dist/assets/{profiles-BFSGqDFC.js.map → profiles-BOYGlmu2.js.map} +1 -1
  38. package/dist/assets/{registry-B15Yg_1C.js → registry-4W1LGlCF.js} +1 -1
  39. package/dist/assets/{registry-rXgaZeNn.js → registry-Bep4umOM.js} +36 -28
  40. package/dist/assets/registry-Bep4umOM.js.map +1 -0
  41. package/dist/assets/secretGuard-Bm6nci0I.js +1 -0
  42. package/dist/assets/{secretGuard-B4-LlMjv.js → secretGuard-BrATm_gl.js} +33 -9
  43. package/dist/assets/{secretGuard-B4-LlMjv.js.map → secretGuard-BrATm_gl.js.map} +1 -1
  44. package/dist/assets/{server-CQR7NLCz.js → server-D4gf-LnD.js} +257 -43
  45. package/dist/assets/server-D4gf-LnD.js.map +1 -0
  46. package/dist/assets/{waitNotice-BGM0QOS2.js → waitNotice-DQvZgz2T.js} +2 -2
  47. package/dist/assets/{waitNotice-BGM0QOS2.js.map → waitNotice-DQvZgz2T.js.map} +1 -1
  48. package/dist/ghostly.mjs +1 -1
  49. package/npm-shrinkwrap.json +2 -2
  50. package/package.json +1 -1
  51. package/dist/assets/api-DLzCtePC.js.map +0 -1
  52. package/dist/assets/backup-DpyvT9Z6.js.map +0 -1
  53. package/dist/assets/buttons-Bq7pTXqF.js +0 -1
  54. package/dist/assets/buttons-BvWqHJeh.js.map +0 -1
  55. package/dist/assets/groupMeta-DTQAJG50.js.map +0 -1
  56. package/dist/assets/host-z0FAHP9Z.js.map +0 -1
  57. package/dist/assets/hyperdhtRelay-CvsAfQRQ.js.map +0 -1
  58. package/dist/assets/irohWeb-CLBx5MIv.js.map +0 -1
  59. package/dist/assets/main-CVqkvuIo.js.map +0 -1
  60. package/dist/assets/ownStatus-DMEhrpkd.js.map +0 -1
  61. package/dist/assets/registry-rXgaZeNn.js.map +0 -1
  62. package/dist/assets/secretGuard-BmmnEbYf.js +0 -1
  63. package/dist/assets/server-CQR7NLCz.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { i as localFileError, n as EXIT, r as asCliError, t as CliError } from "./errors-DDLFO4Gf.js";
2
- import { a as endedUnsent, i as endedUnanswered, o as isNotTheDaemon, p as CALL_RATES, r as connectDaemon, s as notTheDaemon, t as DaemonClient, y as isCallRate } from "./client-kGZ3ZdUW.js";
2
+ import { a as endedUnsent, i as endedUnanswered, o as isNotTheDaemon, p as CALL_RATES, r as connectDaemon, s as notTheDaemon, t as DaemonClient, y as isCallRate } from "./client-DGS-atRu.js";
3
3
  import { n as dropSecretEnv, t as childEnv } from "./childEnv-C-99hdbL.js";
4
- import { Cr as cardUrl, D as GROUP_FILE_LIMITS, Dr as statusCardBytes, En as VOICE_LIMITS, Sr as cardLine, Zn as reactionEmoji, _r as TASK_STATUSES, bt as STATUS_AVAILABILITIES, dr as ITEM_STATES, fr as PR_CHECKS, gr as STATUS_CARD_LIMITS, hr as RUN_RESULTS, mr as ROUTINE_STATES, pr as PR_STATES, ur as CRON_LINE } from "./groupMeta-DTQAJG50.js";
5
- import { S as userPath, _ as profileExists, b as startingDaemon, c as createProfile, d as daemonClaim, f as ghostlyHome, g as noProfile, i as checkProfileName, l as currentProfile, m as lockOwner, o as checkShownNameOption, p as listProfiles, s as claimForDaemon, u as currentProfileOrNone, v as profilePaths, w as ownProfile, y as selectProfile } from "./profiles-BFSGqDFC.js";
6
- import { _ as hideSecretFields, a as PAY_METHODS, c as turnRef, d as ENGINE_METHODS, f as ENGINE_PARAMS, h as SECRET_RESULTS, i as CHAT_METHODS, m as READ_PARAMS, o as TRANSPORT_NAMES, p as ENGINE_READS, r as ADDRESS_TYPES, s as WALLET_TYPES, t as checkOwnStatus } from "./ownStatus-DMEhrpkd.js";
7
- import { B as shellWord, V as jsonOut, a as contactKeyOf, b as namedByThem, y as nameKey } from "./apiKit-CVaEzKWQ.js";
8
- import { i as waitsFor, r as waitNotice } from "./waitNotice-BGM0QOS2.js";
4
+ import { Cr as cardUrl, D as GROUP_FILE_LIMITS, Dr as statusCardBytes, En as VOICE_LIMITS, Sr as cardLine, Zn as reactionEmoji, _r as TASK_STATUSES, bt as STATUS_AVAILABILITIES, dr as ITEM_STATES, fr as PR_CHECKS, gr as STATUS_CARD_LIMITS, hr as RUN_RESULTS, mr as ROUTINE_STATES, pr as PR_STATES, ur as CRON_LINE } from "./groupMeta-DxuJzko_.js";
5
+ import { S as userPath, _ as profileExists, b as startingDaemon, c as createProfile, d as daemonClaim, f as ghostlyHome, g as noProfile, i as checkProfileName, l as currentProfile, m as lockOwner, o as checkShownNameOption, p as listProfiles, s as claimForDaemon, u as currentProfileOrNone, v as profilePaths, w as ownProfile, y as selectProfile } from "./profiles-BOYGlmu2.js";
6
+ import { _ as hideSecretFields, a as PAY_METHODS, c as turnRef, d as ENGINE_METHODS, f as ENGINE_PARAMS, h as SECRET_RESULTS, i as CHAT_METHODS, m as READ_PARAMS, o as TRANSPORT_NAMES, p as ENGINE_READS, r as ADDRESS_TYPES, s as WALLET_TYPES, t as checkOwnStatus } from "./ownStatus-DtzIllg2.js";
7
+ import { B as shellWord, V as jsonOut, a as contactKeyOf, b as namedByThem, y as nameKey } from "./apiKit-BlsNk-Cx.js";
8
+ import { i as waitsFor, r as waitNotice } from "./waitNotice-DQvZgz2T.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, sep } 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.12.0",
16
+ version: "1.12.1",
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",
@@ -236,12 +236,23 @@ function parseArgs(argv, spec, idSlot = () => false, parsing) {
236
236
  function unknownOption(arg, all, parsing, help = parsing ? `ghostly help ${parsing.command}` : void 0) {
237
237
  const names = Object.entries(all).flatMap(([name, o]) => o.type === "boolean" ? [name, `no-${name}`] : [name]);
238
238
  const near = nearest(arg.replace(/^--?/, ""), names);
239
+ const privateKey = /PRIVATE KEY/.test(arg);
239
240
  const hints = [
240
241
  ...near ? [`did you mean --${near}?`] : [],
242
+ ...privateKey ? ["never paste a private key anywhere: Ghostly only needs the public key;"] : [],
241
243
  ...parsing?.text && /^-[^-]/.test(arg) ? ["put -- before text that starts with a dash;"] : [],
242
244
  ...help ? [help] : []
243
245
  ];
244
- return new CliError("usage", `Unknown option ${arg}${parsing ? ` for ghostly ${parsing.command}` : ""}${hints.length ? ` (${hints.join(" ")})` : ""}`);
246
+ return new CliError("usage", `Unknown option ${shownOption(arg, privateKey)}${parsing ? ` for ghostly ${parsing.command}` : ""}${hints.length ? ` (${hints.join(" ")})` : ""}`);
247
+ }
248
+ /**
249
+ * An unknown option as its refusal names it: a pasted private key (a PEM or OpenPGP block starts with dashes), a word
250
+ * with a line break or one longer than any option's name is described, not printed (docs/CLI.md "Secrets stay hidden").
251
+ * A seed, an nsec, a hex key or a Cashu token is longer than 40 characters too.
252
+ */
253
+ function shownOption(arg, privateKey) {
254
+ if (privateKey) return "(a private key)";
255
+ return arg.length > 40 || /[\r\n]/.test(arg) ? `(a ${arg.length}-character word)` : arg;
245
256
  }
246
257
  /**
247
258
  * A first word that starts with a dash and is no global option (`ghostly --porfile bot send …`, `ghostly -x status`):
@@ -1198,7 +1209,7 @@ var commands$8 = {
1198
1209
  description: "Replace the three files when they are there"
1199
1210
  }
1200
1211
  },
1201
- run: async ({ options }, a) => (await import("./apps-BPFW19Wc.js")).initApp(a.dir, {
1212
+ run: async ({ options }, a) => (await import("./apps-BcG4u6SM.js")).initApp(a.dir, {
1202
1213
  name: options.name,
1203
1214
  title: options.title,
1204
1215
  force: options.force === true
@@ -1238,7 +1249,7 @@ var commands$8 = {
1238
1249
  description: "This version's sequence, higher than the bundle at --out's (default: one more than it)"
1239
1250
  }
1240
1251
  },
1241
- run: async ({ options }, a) => (await import("./apps-BPFW19Wc.js")).publishApp(a.dir, keyFile(options.key, "app publish <dir> --key <file> [--out <file>] [--sequence n]"), here(options.out), options.sequence)
1252
+ run: async ({ options }, a) => (await import("./apps-BcG4u6SM.js")).publishApp(a.dir, keyFile(options.key, "app publish <dir> --key <file> [--out <file>] [--sequence n]"), here(options.out), options.sequence)
1242
1253
  },
1243
1254
  "app revoke": {
1244
1255
  method: "app.revoke",
@@ -1271,7 +1282,7 @@ var commands$8 = {
1271
1282
  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"
1272
1283
  }
1273
1284
  },
1274
- run: async ({ options }, a) => (await import("./apps-BPFW19Wc.js")).revokeApp(a.dir, keyFile(options.key, "app revoke <dir> --key <file> (--digest <digest>... | --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]"), {
1285
+ run: async ({ options }, a) => (await import("./apps-BcG4u6SM.js")).revokeApp(a.dir, keyFile(options.key, "app revoke <dir> --key <file> (--digest <digest>... | --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]"), {
1275
1286
  digests: options.digest,
1276
1287
  upTo: options["up-to"],
1277
1288
  reason: options.reason,
@@ -1332,7 +1343,7 @@ var commands$8 = {
1332
1343
  usage: "app verify <bundle|url>",
1333
1344
  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 (for a URL, or beside one of its sources) revokes this version",
1334
1345
  args: ["bundle"],
1335
- run: async (_, a) => (await import("./apps-BPFW19Wc.js")).verifyApp(a.bundle)
1346
+ run: async (_, a) => (await import("./apps-BcG4u6SM.js")).verifyApp(a.bundle)
1336
1347
  },
1337
1348
  "store sign": {
1338
1349
  method: "store.sign",
@@ -1349,7 +1360,7 @@ var commands$8 = {
1349
1360
  description: "The folder to write ghostly-store.json and ghostly-store.sig in (default: the index's)"
1350
1361
  }
1351
1362
  },
1352
- run: async ({ options }, a) => (await import("./apps-BPFW19Wc.js")).signStore(a.index, keyFile(options.key, "store sign <index> --key <file> [--out <dir>]"), here(options.out))
1363
+ run: async ({ options }, a) => (await import("./apps-BcG4u6SM.js")).signStore(a.index, keyFile(options.key, "store sign <index> --key <file> [--out <dir>]"), here(options.out))
1353
1364
  }
1354
1365
  };
1355
1366
  // src/commands/calls.ts
@@ -2447,7 +2458,7 @@ var commands$3 = {
2447
2458
  }
2448
2459
  },
2449
2460
  params: ({ options }, a) => {
2450
- if (options.sfu === void 0 && options.clear !== true && options.e2ee === void 0) throw new CliError("usage", "Missing --sfu: ghostly group call <group> --sfu <https origin> | --clear");
2461
+ if (options.sfu === void 0 && options.clear !== true && options.e2ee === void 0) throw new CliError("usage", "Missing --sfu, --e2ee, --no-e2ee or --clear: ghostly group call <group> --sfu <https origin> [--e2ee | --no-e2ee] | --e2ee | --no-e2ee | --clear");
2451
2462
  if (options.sfu !== void 0 && options.clear === true) throw new CliError("usage", "--clear removes the call node: not with --sfu");
2452
2463
  if (options.e2ee !== void 0 && options.clear === true) throw new CliError("usage", "--clear removes the call node: not with --e2ee or --no-e2ee");
2453
2464
  return {
@@ -3614,28 +3625,34 @@ async function allowlist(from, groups, call, peerOf) {
3614
3625
  keys.add(key);
3615
3626
  continue;
3616
3627
  }
3617
- const chat = await otherFlag(call("chat.get", { chat: ref }), ref, "--from");
3618
- if (chat.id !== ref && (!nameKey(ref) || nameKey(chat.label) !== nameKey(ref))) throw namedByThem(ref, {
3619
- chat: chat.id,
3620
- name: chat.peerName ?? null,
3621
- contact: chat.peer
3622
- });
3623
- chats.add(chat.id);
3628
+ chats.add(await fromChat(ref, call));
3624
3629
  }
3625
- for (const ref of groups) groupIds.add((await otherFlag(call("group.get", { group: ref }), ref, "--group")).id);
3630
+ for (const ref of groups) groupIds.add((await otherFlag(call("group.get", { group: ref }), ref, "--group", call)).id);
3626
3631
  return new Allowlist(chats, keys, groupIds, peerOf);
3627
3632
  }
3633
+ /** The chat `--from <ref>` names (not a contact key): its id, or `namedByThem` when only its contact chose `ref`. */
3634
+ async function fromChat(ref, call) {
3635
+ const chat = await otherFlag(call("chat.get", { chat: ref }), ref, "--from", call);
3636
+ if (chat.id !== ref && (!nameKey(ref) || nameKey(chat.label) !== nameKey(ref))) throw namedByThem(ref, {
3637
+ chat: chat.id,
3638
+ name: chat.peerName ?? null,
3639
+ contact: chat.peer
3640
+ });
3641
+ return chat.id;
3642
+ }
3628
3643
  /**
3629
3644
  * A `--from` that names a group, or a `--group` a chat: said with the flag that takes it. The lookup's own hint named
3630
3645
  * `ghostly group show` (or `chat show`), which lists nothing. A chat is named by its id: `--from` refuses a prefix of it
3631
- * or the name its contact chose, which `--group`'s lookup took.
3646
+ * or the name its contact chose, which `--group`'s lookup took, so a `--group` that found its chat only so is refused
3647
+ * as `--from` refuses it, with no `--from` to paste.
3632
3648
  */
3633
- async function otherFlag(lookup, ref, flag) {
3649
+ async function otherFlag(lookup, ref, flag, call) {
3634
3650
  try {
3635
3651
  return await lookup;
3636
3652
  } catch (error) {
3637
3653
  const other = flag === "--from" ? "group" : "chat";
3638
3654
  if (!(error instanceof CliError) || error.code !== "not_found" || typeof error.details?.[other] !== "string") throw error;
3655
+ if (other === "chat" && contactKeyOf(ref) === void 0) await fromChat(ref, call);
3639
3656
  const named = other === "chat" ? error.details.chat : ref;
3640
3657
  const shown = shellWord(named, error.details[other]);
3641
3658
  throw new CliError("not_found", `${JSON.stringify(ref)} is a ${other}, not a ${flag === "--from" ? "chat" : "group"}: ghostly listen ${flag === "--from" ? "--group" : "--from"} ${shown}`, error.details);
@@ -4455,8 +4472,8 @@ var VERSION = package_default.version;
4455
4472
  * command a running daemon answers loads none of them, and starts about as fast as Node does. Statically imported, they
4456
4473
  * cost every command ~100 ms before its socket was opened.
4457
4474
  */
4458
- var engineApi = () => import("./api-DYMKyb1k.js");
4459
- var engineHost = () => import("./host-z0FAHP9Z.js");
4475
+ var engineApi = () => import("./api-jRUXnBdX.js");
4476
+ var engineHost = () => import("./host-BxM-HMr0.js");
4460
4477
  /**
4461
4478
  * `--translate <lang>`'s translator, or null (not asked; or the runtime is not there, said on stderr). Loaded only when
4462
4479
  * asked: the app's message parser it reads costs every other command nothing.
@@ -5464,7 +5481,7 @@ async function profileCommand(sub, argv) {
5464
5481
  noMoreThan(1, parsed.positionals, "profile create <name> [--use] [--name <shown name>] [--force]");
5465
5482
  const shownName = parsed.options.name === void 0 ? void 0 : checkShownNameOption(parsed.options.name);
5466
5483
  const force = parsed.options.force === true;
5467
- if (shownName) (await import("./secretGuard-BmmnEbYf.js")).guardText(shownName, force, "name", "set it");
5484
+ if (shownName) (await import("./secretGuard-Bm6nci0I.js")).guardText(shownName, force, "name", "set it");
5468
5485
  const paths = createProfile(g.home, name);
5469
5486
  let shown = null;
5470
5487
  if (shownName !== void 0) try {
@@ -5564,7 +5581,7 @@ async function profileCommand(sub, argv) {
5564
5581
  if (!given || !name) throw new CliError("usage", `Missing <${given ? "new profile" : "file"}>: ghostly profile restore <file> <new profile> [--passphrase-file f] [--use]`);
5565
5582
  noMoreThan(2, parsed.positionals, "profile restore <file> <new profile> [--passphrase-file f] [--use]");
5566
5583
  const file = here(given);
5567
- const { backupFileProtection, restoreProfile } = await import("./backup-COX6j1_W.js");
5584
+ const { backupFileProtection, restoreProfile } = await import("./backup-xZfV-ytw.js");
5568
5585
  const protection = await backupFileProtection(file);
5569
5586
  const paths = await restoreProfile(g.home, checkProfileName(name), file, protection === "none" ? void 0 : await backupPassphrase(parsed.options["passphrase-file"], RESTORE_PASSPHRASE));
5570
5587
  if (parsed.options.use) selectProfile(g.home, name);
@@ -6411,7 +6428,7 @@ async function textCommand(name, argv) {
6411
6428
  };
6412
6429
  if (spec.target === "group") params.mentions = parsed.options.mention ?? [];
6413
6430
  if (parsed.options.reply !== void 0) params.reply = parsed.options.reply;
6414
- if (!spec.message) Object.assign(params, (await import("./buttons-Bq7pTXqF.js")).buttonsOf(parsed.options));
6431
+ if (!spec.message) Object.assign(params, (await import("./buttons-CsGdQNnR.js")).buttonsOf(parsed.options));
6415
6432
  print(await withSession(g, (s) => {
6416
6433
  if (parsed.options.wait !== void 0) params.wait = parsed.options.wait;
6417
6434
  if (parsed.options.timeout !== void 0) params.timeout = parsed.options.timeout;
@@ -6455,7 +6472,7 @@ async function identityAddCommand(argv) {
6455
6472
  if (!provider) throw new CliError("usage", "Missing <provider>: ghostly identity add <provider> [subject] [--signer id] [--field name=value]... [--stdin] [--days n] [--timeout s]");
6456
6473
  inRange(parsed.options, "timeout", "a number of seconds", 5, 3600);
6457
6474
  const items = parsed.options.field ?? [];
6458
- const known = parsed.options.days !== void 0 || items.length ? (await import("./registry-B15Yg_1C.js")).IDENTITY_PROVIDERS.find((p) => p.id === provider) : void 0;
6475
+ const known = parsed.options.days !== void 0 || items.length ? (await import("./registry-4W1LGlCF.js")).IDENTITY_PROVIDERS.find((p) => p.id === provider) : void 0;
6459
6476
  if (known && parsed.options.days !== void 0) inRange(parsed.options, "days", "a whole number", 1, known.validity.maxDays, true);
6460
6477
  const { fields, warning } = await identityFields(items, parsed.options.stdin === true, identitySecretFields(known, parsed.options.signer), readStdin, process.stdin.isTTY === true);
6461
6478
  if (warning) process.stderr.write(`ghostly: ${warning}\n`);
@@ -6817,4 +6834,4 @@ async function run(argv) {
6817
6834
  }
6818
6835
  export { run };
6819
6836
 
6820
- //# sourceMappingURL=main-CVqkvuIo.js.map
6837
+ //# sourceMappingURL=main-CwTaepxR.js.map