@letterstory/cli 0.177.71 → 0.177.73
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 +1 -1
- package/lib/cli.mjs +1 -1
- package/lib/commands/visits.mjs +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -446,7 +446,7 @@ how it was tested, and what we learned and why.
|
|
|
446
446
|
|
|
447
447
|
```bash
|
|
448
448
|
# Needs a STAFF key with recipes:read (reads) and recipes:write (writes): mint it on
|
|
449
|
-
# /superadmin/
|
|
449
|
+
# /superadmin/letterpress/tuning?tab=settings → "Your agent's key". Recipes are global: one library behind every
|
|
450
450
|
# account's Plan. The same routes and functions as that page.
|
|
451
451
|
export LETTERSTORY_STAFF_API_KEY=<your staff key with recipes:read,recipes:write>
|
|
452
452
|
|
package/lib/cli.mjs
CHANGED
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
91
91
|
|
|
92
92
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
93
|
-
export const VERSION = "0.177.
|
|
93
|
+
export const VERSION = "0.177.73";
|
|
94
94
|
|
|
95
95
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
96
96
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
// letterstory visits health --site <id> staff: how far to trust a site's numbers, and what to fix
|
|
19
19
|
// letterstory visits connect vercel|cloudflare send the host's request logs (no code to deploy)
|
|
20
20
|
// letterstory visits connectors | disconnect <id>
|
|
21
|
+
// letterstory visits shortcut [mod+e | default] your own key for Letter Edit's card (⌘L by default)
|
|
21
22
|
|
|
22
23
|
import { CliError } from "../client.mjs";
|
|
23
24
|
import { flagStr, printResult, argsFromFlags } from "./shared.mjs";
|
|
@@ -29,6 +30,13 @@ const days = { value: (flags) => sinceDays(flags.since) };
|
|
|
29
30
|
|
|
30
31
|
export const ARGS = {
|
|
31
32
|
visitors_list_sites: {},
|
|
33
|
+
get_editor_shortcut: {},
|
|
34
|
+
set_editor_shortcut: {
|
|
35
|
+
// "default" (or "reset") puts ⌘L back: the tool's null.
|
|
36
|
+
shortcut: {
|
|
37
|
+
value: (_flags, positionals) => (/^(default|reset)$/i.test(positionals[0] ?? "") ? null : positionals[0]),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
32
40
|
visitors_update_site: {
|
|
33
41
|
site_id: "site",
|
|
34
42
|
domain: { positional: 0, label: "new domain (e.g. acme.com)", required: true },
|
|
@@ -137,9 +145,11 @@ export async function cmdVisits(ctx) {
|
|
|
137
145
|
return visitsConnectors(rest);
|
|
138
146
|
case "disconnect":
|
|
139
147
|
return visitsDisconnect(rest);
|
|
148
|
+
case "shortcut":
|
|
149
|
+
return visitsShortcut(rest);
|
|
140
150
|
default:
|
|
141
151
|
throw new CliError(
|
|
142
|
-
"Usage: visits [list|citations|people|who|compare|export|sites|domain|pages|health|connect|connectors|disconnect]"
|
|
152
|
+
"Usage: visits [list|citations|people|who|compare|export|sites|domain|pages|health|connect|connectors|disconnect|shortcut]"
|
|
143
153
|
);
|
|
144
154
|
}
|
|
145
155
|
}
|
|
@@ -448,3 +458,13 @@ async function visitsSites(ctx) {
|
|
|
448
458
|
});
|
|
449
459
|
return 0;
|
|
450
460
|
}
|
|
461
|
+
|
|
462
|
+
/** Your own key for Letter Edit's card: read with no argument, set with one (mod+e, mod+shift+k), default for ⌘L. */
|
|
463
|
+
async function visitsShortcut(ctx) {
|
|
464
|
+
const { flags, io } = ctx;
|
|
465
|
+
const result = ctx.positionals.length
|
|
466
|
+
? await call(ctx, "set_editor_shortcut")
|
|
467
|
+
: await call(ctx, "get_editor_shortcut");
|
|
468
|
+
printResult(io, flags, result, (r) => `${r.shortcut}${r.is_default ? " (default)" : ""}`);
|
|
469
|
+
return 0;
|
|
470
|
+
}
|