@letterstory/cli 0.81.0 → 0.81.2
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 +2 -2
- package/lib/commands/org.mjs +3 -3
- package/lib/commands/phantom.mjs +18 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./commands.mjs";
|
|
58
58
|
|
|
59
59
|
// Keep in sync with cli/package.json.
|
|
60
|
-
export const VERSION = "0.81.
|
|
60
|
+
export const VERSION = "0.81.2";
|
|
61
61
|
|
|
62
62
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
63
63
|
// can't accidentally swallow the id as --json's value.
|
|
@@ -75,6 +75,7 @@ const BOOLEAN_FLAGS = new Set([
|
|
|
75
75
|
"verbose",
|
|
76
76
|
"no-color",
|
|
77
77
|
"dry-run",
|
|
78
|
+
"prune",
|
|
78
79
|
"buy",
|
|
79
80
|
"rebuild",
|
|
80
81
|
"print-key",
|
|
@@ -929,7 +930,6 @@ Mail:
|
|
|
929
930
|
|
|
930
931
|
Insights:
|
|
931
932
|
insights summary [--period …] [--part <block>]... Measure Overview: AI named/cited rates, share of voice, search, targets
|
|
932
|
-
insights competitors [--period 14d|30d|90d] GEO → Competitors: share of mentions per brand, is it moving, by engine/question
|
|
933
933
|
insights site [--period 14d|30d|90d] [--collection <uuid>]
|
|
934
934
|
insights post <article-id> [--period 14d|30d|90d]
|
|
935
935
|
insights top [--period 14d|30d|90d] [--collection <uuid>] [--limit <n>] [--sort clicks|impressions]
|
package/lib/commands/org.mjs
CHANGED
|
@@ -118,7 +118,7 @@ export function joinBundle(dir) {
|
|
|
118
118
|
|
|
119
119
|
async function orgExport(ctx) {
|
|
120
120
|
const { client, flags, io } = ctx;
|
|
121
|
-
refuseUnknownFlags(ctx, ARGS, ["split", "file"]);
|
|
121
|
+
refuseUnknownFlags(ctx, ARGS.export_org_config, ["split", "file"]);
|
|
122
122
|
const { config } = await client.callTool("export_org_config", argsFromFlags(ARGS.export_org_config, flags));
|
|
123
123
|
const split = flagStr(flags.split);
|
|
124
124
|
const file = flagStr(flags.file);
|
|
@@ -186,7 +186,7 @@ export function formatPlan(plan) {
|
|
|
186
186
|
|
|
187
187
|
async function orgDiff(ctx) {
|
|
188
188
|
const { client, flags, io } = ctx;
|
|
189
|
-
refuseUnknownFlags(ctx, ARGS);
|
|
189
|
+
refuseUnknownFlags(ctx, ARGS.diff_org_config);
|
|
190
190
|
const { plan } = await client.callTool(
|
|
191
191
|
"diff_org_config",
|
|
192
192
|
argsFromFlags(ARGS.diff_org_config, flags, ctx.positionals)
|
|
@@ -210,7 +210,7 @@ export function formatApply(result) {
|
|
|
210
210
|
|
|
211
211
|
async function orgApply(ctx) {
|
|
212
212
|
const { client, flags, io } = ctx;
|
|
213
|
-
refuseUnknownFlags(ctx, ARGS, ["yes"]);
|
|
213
|
+
refuseUnknownFlags(ctx, ARGS.apply_org_config, ["yes"]);
|
|
214
214
|
if (flagBool(flags.prune) && !flagBool(flags["dry-run"]) && !flagBool(flags.yes))
|
|
215
215
|
throw new CliError("--prune deletes records missing from the bundle. Review with --dry-run, then add --yes.");
|
|
216
216
|
const { result } = await client.callTool(
|
package/lib/commands/phantom.mjs
CHANGED
|
@@ -79,12 +79,27 @@ export const ARGS = {
|
|
|
79
79
|
value: (flags) =>
|
|
80
80
|
flags.layout === undefined ? undefined : flags.layout === "none" ? null : String(flags.layout),
|
|
81
81
|
},
|
|
82
|
+
maverick_enabled: { flag: "maverick", type: "bool", negate: "no-maverick" },
|
|
83
|
+
// `--maverick-customer-id none` clears it (identification back to pending).
|
|
84
|
+
maverick_customer_id: {
|
|
85
|
+
value: (flags) =>
|
|
86
|
+
flags["maverick-customer-id"] === undefined
|
|
87
|
+
? undefined
|
|
88
|
+
: flags["maverick-customer-id"] === "none"
|
|
89
|
+
? null
|
|
90
|
+
: String(flags["maverick-customer-id"]),
|
|
91
|
+
},
|
|
82
92
|
},
|
|
83
93
|
},
|
|
84
94
|
collection: { value: (flags) => readJsonObjectFlag(flags, "collection-config") },
|
|
85
95
|
configure: { flag: "configure", type: "bool" },
|
|
86
96
|
dry_run: { flag: "dry-run", type: "bool" },
|
|
87
97
|
},
|
|
98
|
+
// `phantom visitors [phantom-id]` — the id is optional (omit for every opted-in site).
|
|
99
|
+
get_phantom_visitors: {
|
|
100
|
+
phantom_id: { value: (flags, positionals) => positionals[0] },
|
|
101
|
+
limit: { flag: "limit", type: "num" },
|
|
102
|
+
},
|
|
88
103
|
delete_phantom: { phantom_id: { positional: 0, label: "phantom-id", required: true } },
|
|
89
104
|
rebuild_phantom: { phantom_id: { positional: 0, label: "phantom-id", required: true } },
|
|
90
105
|
get_phantom_diagnostics: { phantom_id: { positional: 0, label: "phantom-id", required: true } },
|
|
@@ -118,6 +133,8 @@ export async function cmdPhantom(ctx) {
|
|
|
118
133
|
return phantomCreate(rest);
|
|
119
134
|
case "config":
|
|
120
135
|
return phantomConfig(rest);
|
|
136
|
+
case "visitors":
|
|
137
|
+
return call(rest, "get_phantom_visitors");
|
|
121
138
|
case "delete":
|
|
122
139
|
case "rm":
|
|
123
140
|
if (rest.flags.yes !== true) {
|
|
@@ -136,7 +153,7 @@ export async function cmdPhantom(ctx) {
|
|
|
136
153
|
return phantomDomain(rest);
|
|
137
154
|
default:
|
|
138
155
|
throw new CliError(
|
|
139
|
-
`Unknown phantom subcommand: ${sub ?? "(none)"}. Try: list, get, new, config, delete, rebuild, diagnostics, balance, domain`
|
|
156
|
+
`Unknown phantom subcommand: ${sub ?? "(none)"}. Try: list, get, new, config, visitors, delete, rebuild, diagnostics, balance, domain`
|
|
140
157
|
);
|
|
141
158
|
}
|
|
142
159
|
}
|