@letterstory/cli 0.177.84 → 0.177.85
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/cli.mjs +1 -1
- package/lib/commands/usage.mjs +21 -1
- package/package.json +1 -1
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.85";
|
|
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/usage.mjs
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
// letterstory usage import-posthog --project <id> --key <phx_…> [--days 90] [--host app.acme.com]
|
|
7
7
|
// [--feature-urls map.json] [--dry-run] history from your PostHog (import_posthog_usage)
|
|
8
8
|
// letterstory usage posthog connect --project <id> --key <phx_…> [--posthog-host eu.posthog.com] [--host app.acme.com]
|
|
9
|
+
// [--internal-accounts accounts.json] confirmed account IDs for new Proofs suggestions
|
|
9
10
|
// connect PostHog for good: 90 days now, then daily
|
|
10
11
|
// letterstory usage posthog [status]|sync [--days 7]|disconnect the connection (never its key), sync now, remove it
|
|
11
12
|
// letterstory usage case-study [--days 7|30|90] the patterns and the latest case study
|
|
@@ -40,6 +41,12 @@ export const ARGS = {
|
|
|
40
41
|
reset: { flag: "clear-choice", type: "bool" },
|
|
41
42
|
},
|
|
42
43
|
connect_proof_database: {
|
|
44
|
+
known_internal_accounts: {
|
|
45
|
+
value: (flags) =>
|
|
46
|
+
flags["internal-accounts"]
|
|
47
|
+
? JSON.parse(readFileSync(String(flags["internal-accounts"]), "utf8"))
|
|
48
|
+
: undefined,
|
|
49
|
+
},
|
|
43
50
|
project_ref: { flag: "project" },
|
|
44
51
|
host: { flag: "host" },
|
|
45
52
|
access_token: { flag: "key" },
|
|
@@ -62,12 +69,18 @@ export const ARGS = {
|
|
|
62
69
|
focus: { flag: "focus" },
|
|
63
70
|
source: { flag: "source" },
|
|
64
71
|
},
|
|
72
|
+
compare_proof_actions: {
|
|
73
|
+
previous_choice_id: { flag: "previous-choice-id" },
|
|
74
|
+
choice_id: { flag: "choice-id" },
|
|
75
|
+
window: { value: (flags) => ({ since: flags.since, until: flags.until }) },
|
|
76
|
+
},
|
|
65
77
|
refresh_proof_actions: {},
|
|
66
78
|
get_proof_actions: { id: { flag: "id" } },
|
|
67
79
|
decide_proof_action: {
|
|
68
80
|
analysis_id: { flag: "analysis-id" },
|
|
69
81
|
card_id: { flag: "card-id" },
|
|
70
82
|
decision: { flag: "decision" },
|
|
83
|
+
replace_choice_id: { flag: "replace-choice-id" },
|
|
71
84
|
},
|
|
72
85
|
instrument_proof_action: {
|
|
73
86
|
action: { flag: "action" },
|
|
@@ -121,6 +134,12 @@ export const ARGS = {
|
|
|
121
134
|
dry_run: { flag: "dry-run", type: "bool" },
|
|
122
135
|
},
|
|
123
136
|
connect_posthog_usage: {
|
|
137
|
+
known_internal_accounts: {
|
|
138
|
+
value: (flags) =>
|
|
139
|
+
flags["internal-accounts"]
|
|
140
|
+
? JSON.parse(readFileSync(String(flags["internal-accounts"]), "utf8"))
|
|
141
|
+
: undefined,
|
|
142
|
+
},
|
|
124
143
|
project_id: { flag: "project" },
|
|
125
144
|
// --key, or POSTHOG_PERSONAL_API_KEY so the key stays out of the shell's history.
|
|
126
145
|
personal_api_key: {
|
|
@@ -278,9 +297,10 @@ export async function cmdUsage(ctx) {
|
|
|
278
297
|
printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, [])));
|
|
279
298
|
return 0;
|
|
280
299
|
}
|
|
281
|
-
if (["proofs", "find-proofs", "review-proof", "refresh-proofs"].includes(ctx.positionals[0])) {
|
|
300
|
+
if (["proofs", "find-proofs", "review-proof", "refresh-proofs", "compare-proofs"].includes(ctx.positionals[0])) {
|
|
282
301
|
const tool = {
|
|
283
302
|
proofs: "get_proof_actions",
|
|
303
|
+
"compare-proofs": "compare_proof_actions",
|
|
284
304
|
"refresh-proofs": "refresh_proof_actions",
|
|
285
305
|
"find-proofs": "generate_proof_actions",
|
|
286
306
|
"review-proof": "decide_proof_action",
|