@ghostlytools/cli 1.10.2 → 1.10.3
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/README.md +4 -2
- package/dist/assets/{api-DcE4KylM.js → api-BdaxsDvA.js} +2 -2
- package/dist/assets/{api-EUGHGnRz.js → api-C4MLg5Rs.js} +42 -17
- package/dist/assets/api-C4MLg5Rs.js.map +1 -0
- package/dist/assets/{apiKit-CJVp_crp.js → apiKit-BbNaxZGZ.js} +27 -11
- package/dist/assets/apiKit-BbNaxZGZ.js.map +1 -0
- package/dist/assets/{apps-C54T_MOT.js → apps-BluQgEhv.js} +3 -3
- package/dist/assets/{apps-C54T_MOT.js.map → apps-BluQgEhv.js.map} +1 -1
- package/dist/assets/{apps-C-KbyLCa.js → apps-BtGFth7o.js} +1 -1
- package/dist/assets/{arkade-BmxJTa65.js → arkade-DdZx4b_I.js} +2 -2
- package/dist/assets/{arkade-BmxJTa65.js.map → arkade-DdZx4b_I.js.map} +1 -1
- package/dist/assets/{backup-BxSH5BZG.js → backup-DyDsW7sC.js} +6 -6
- package/dist/assets/{backup-BxSH5BZG.js.map → backup-DyDsW7sC.js.map} +1 -1
- package/dist/assets/{backup-C0Plp-DF.js → backup-I1n7ccz7.js} +1 -1
- package/dist/assets/{buttons-B-ZJYdo0.js → buttons-Do7dCku6.js} +4 -4
- package/dist/assets/{buttons-B-ZJYdo0.js.map → buttons-Do7dCku6.js.map} +1 -1
- package/dist/assets/buttons-DpjwXePb.js +2 -0
- package/dist/assets/{client-CDa87uYD.js → client-CWsjRiH8.js} +2 -2
- package/dist/assets/{client-CDa87uYD.js.map → client-CWsjRiH8.js.map} +1 -1
- package/dist/assets/{codec-D45W1L8n.js → codec-DPaXhuYc.js} +2 -2
- package/dist/assets/{codec-D45W1L8n.js.map → codec-DPaXhuYc.js.map} +1 -1
- package/dist/assets/{envelope-C3yFCQa-.js → envelope-5Gu9yGk_.js} +2 -2
- package/dist/assets/{envelope-C3yFCQa-.js.map → envelope-5Gu9yGk_.js.map} +1 -1
- package/dist/assets/{fixedHosts-C6nCHjOa.js → fixedHosts-PR1BcfKX.js} +7 -8
- package/dist/assets/fixedHosts-PR1BcfKX.js.map +1 -0
- package/dist/assets/{groupFiles-DYopNE57.js → groupFiles-BuToTMUk.js} +213 -90
- package/dist/assets/groupFiles-BuToTMUk.js.map +1 -0
- package/dist/assets/{host-G5seUwaI.js → host-fkQYBvKH.js} +226 -29
- package/dist/assets/host-fkQYBvKH.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-B_uHjg_r.js → hyperdhtRelay-DDCak5PY.js} +2 -2
- package/dist/assets/{hyperdhtRelay-B_uHjg_r.js.map → hyperdhtRelay-DDCak5PY.js.map} +1 -1
- package/dist/assets/{irohWeb-C-2oslSU.js → irohWeb-B4_swKx0.js} +2 -2
- package/dist/assets/{irohWeb-C-2oslSU.js.map → irohWeb-B4_swKx0.js.map} +1 -1
- package/dist/assets/{main-Dk--nD7X.js → main-ClYsttvY.js} +49 -30
- package/dist/assets/main-ClYsttvY.js.map +1 -0
- package/dist/assets/{mainline-HPlVrl8R.js → mainline-Hsk2SZ1B.js} +63 -3
- package/dist/assets/mainline-Hsk2SZ1B.js.map +1 -0
- package/dist/assets/{networkReason-CfpO9ayz.js → networkReason-C9Hr-hO7.js} +4 -4
- package/dist/assets/{networkReason-CfpO9ayz.js.map → networkReason-C9Hr-hO7.js.map} +1 -1
- package/dist/assets/{nwc-BY7BPttn.js → nwc-BbK6qNxS.js} +3 -3
- package/dist/assets/{nwc-BY7BPttn.js.map → nwc-BbK6qNxS.js.map} +1 -1
- package/dist/assets/{nwcProvider-CfpbNUf7.js → nwcProvider-D_tt2X3Z.js} +2 -2
- package/dist/assets/{nwcProvider-CfpbNUf7.js.map → nwcProvider-D_tt2X3Z.js.map} +1 -1
- package/dist/assets/{ownDid-DJFZM2cV.js → ownDid-DkK_jem4.js} +2 -2
- package/dist/assets/{ownDid-DJFZM2cV.js.map → ownDid-DkK_jem4.js.map} +1 -1
- package/dist/assets/{profiles-DKmZGXp6.js → profiles-aV9vaK0B.js} +7 -5
- package/dist/assets/profiles-aV9vaK0B.js.map +1 -0
- package/dist/assets/{registry-CAzrtV0_.js → registry-C9T6tYCO.js} +1 -1
- package/dist/assets/{registry-BUm4cAzV.js → registry-CEjnubep.js} +8 -7
- package/dist/assets/registry-CEjnubep.js.map +1 -0
- package/dist/assets/{resolve-CDD4X68j.js → resolve-BBOrN13E.js} +24 -5
- package/dist/assets/resolve-BBOrN13E.js.map +1 -0
- package/dist/assets/{server-DcOsgYDU.js → server-BJ3T-kx3.js} +247 -107
- package/dist/assets/server-BJ3T-kx3.js.map +1 -0
- package/dist/assets/{src-D31D1_oY.js → src-BIdfHB7t.js} +254 -71
- package/dist/assets/src-BIdfHB7t.js.map +1 -0
- package/dist/assets/{sshForges-DerRwMf3.js → sshForges-CRg-NGld.js} +2 -2
- package/dist/assets/{sshForges-DerRwMf3.js.map → sshForges-CRg-NGld.js.map} +1 -1
- package/dist/assets/{translate-C-sj0VJe.js → translate-b0X61WMI.js} +2 -2
- package/dist/assets/{translate-C-sj0VJe.js.map → translate-b0X61WMI.js.map} +1 -1
- package/dist/assets/{usdt-DwHqp625.js → usdt-6CQdfye1.js} +7 -4
- package/dist/assets/usdt-6CQdfye1.js.map +1 -0
- package/dist/assets/{waitNotice-D52RWbV4.js → waitNotice-Ce3YCinu.js} +27 -5
- package/dist/assets/waitNotice-Ce3YCinu.js.map +1 -0
- package/dist/assets/{words-Db9WgatT.js → words-Dk6o6wz4.js} +3 -3
- package/dist/assets/words-Dk6o6wz4.js.map +1 -0
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-EUGHGnRz.js.map +0 -1
- package/dist/assets/apiKit-CJVp_crp.js.map +0 -1
- package/dist/assets/buttons-DA3wZfG0.js +0 -2
- package/dist/assets/fixedHosts-C6nCHjOa.js.map +0 -1
- package/dist/assets/groupFiles-DYopNE57.js.map +0 -1
- package/dist/assets/host-G5seUwaI.js.map +0 -1
- package/dist/assets/main-Dk--nD7X.js.map +0 -1
- package/dist/assets/mainline-HPlVrl8R.js.map +0 -1
- package/dist/assets/profiles-DKmZGXp6.js.map +0 -1
- package/dist/assets/registry-BUm4cAzV.js.map +0 -1
- package/dist/assets/resolve-CDD4X68j.js.map +0 -1
- package/dist/assets/server-DcOsgYDU.js.map +0 -1
- package/dist/assets/src-D31D1_oY.js.map +0 -1
- package/dist/assets/usdt-DwHqp625.js.map +0 -1
- package/dist/assets/waitNotice-D52RWbV4.js.map +0 -1
- package/dist/assets/words-Db9WgatT.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
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-BIdfHB7t.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-
|
|
4
|
-
import { g as namedByThem, t as CONTACT_KEY } from "./apiKit-
|
|
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-Dk6o6wz4.js";
|
|
4
|
+
import { g as namedByThem, t as CONTACT_KEY } from "./apiKit-BbNaxZGZ.js";
|
|
5
5
|
import { n as dropSecretEnv, t as childEnv } from "./childEnv-BVOQK9EA.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { g as isCallRate, i as isNotTheDaemon, r as connectDaemon, t as DaemonClient, u as CALL_RATES } from "./client-
|
|
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-aV9vaK0B.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-CWsjRiH8.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.
|
|
16
|
+
version: "1.10.3",
|
|
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
|
-
/**
|
|
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)
|
|
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-
|
|
1098
|
+
run: async ({ options }, a) => (await import("./apps-BtGFth7o.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-
|
|
1138
|
+
run: async ({ options }, a) => (await import("./apps-BtGFth7o.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-
|
|
1171
|
+
run: async ({ options }, a) => (await import("./apps-BtGFth7o.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-
|
|
1232
|
+
run: async (_, a) => (await import("./apps-BtGFth7o.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-
|
|
1249
|
+
run: async ({ options }, a) => (await import("./apps-BtGFth7o.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-
|
|
4019
|
-
var engineHost = () => import("./host-
|
|
4039
|
+
var engineApi = () => import("./api-BdaxsDvA.js");
|
|
4040
|
+
var engineHost = () => import("./host-fkQYBvKH.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-
|
|
4047
|
+
const { loadDetector, openTranslator, translateTarget } = await import("./translate-b0X61WMI.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-
|
|
4915
|
+
const { backupFileProtection, restoreProfile } = await import("./backup-I1n7ccz7.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-
|
|
5654
|
+
if (!spec.message) Object.assign(params, (await import("./buttons-DpjwXePb.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-
|
|
5703
|
+
const known = parsed.options.days !== void 0 || items.length ? (await import("./registry-C9T6tYCO.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-
|
|
5814
|
+
printAnswer(await (await import("./translate-b0X61WMI.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-
|
|
6039
|
+
//# sourceMappingURL=main-ClYsttvY.js.map
|