@letterstory/cli 0.177.115 → 0.177.116

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 CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
92
92
 
93
93
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
94
- export const VERSION = "0.177.115";
94
+ export const VERSION = "0.177.116";
95
95
 
96
96
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
97
97
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -159,6 +159,7 @@ export const BOOLEAN_FLAGS = new Set([
159
159
  "failing",
160
160
  // replicate forms: read the site's forms key (admins) instead of its submissions.
161
161
  "show-key",
162
+ "searched",
162
163
  // sim create / resample / sample-key: keep the customer's sample key, or delete it now.
163
164
  "keep-key",
164
165
  "delete-key",
@@ -8,7 +8,7 @@
8
8
  // routes and staff Fleet do.
9
9
 
10
10
  import { CliError } from "../client.mjs";
11
- import { flagStr, flagNum, flagList, printResult, argsFromFlags, refuseUnknownFlags, ok } from "./shared.mjs";
11
+ import { flagStr, flagNum, flagBool, flagList, printResult, argsFromFlags, refuseUnknownFlags, ok } from "./shared.mjs";
12
12
 
13
13
  const STATUSES = ["active", "inactive", "achieved", "retired"];
14
14
  const PRIORITIES = ["high", "normal", "low"];
@@ -97,7 +97,10 @@ export const ARGS = {
97
97
  },
98
98
  },
99
99
  },
100
- suggest_ranking_targets: { offering_id: offering },
100
+ suggest_ranking_targets: {
101
+ offering_id: offering,
102
+ searched: { value: (flags) => (flags.searched === undefined ? undefined : flagBool(flags.searched)) },
103
+ },
101
104
  list_question_candidates: { limit: { flag: "limit", type: "num" } },
102
105
  list_ranking_subqueries: {
103
106
  target_id: { positional: 0, label: "target-id" },
@@ -137,7 +140,7 @@ const USAGE = `Usage: targets <list|add|update|activate|deactivate|cap|suggest|c
137
140
  targets activate <target-id>
138
141
  targets deactivate <target-id>
139
142
  targets cap <offering-id|company> <n|default>
140
- targets suggest [--offering <offering-id|company>]
143
+ targets suggest [--offering <offering-id|company>] [--searched]
141
144
  targets candidates [--limit <n>] new questions the market asks, checked and deduped
142
145
  targets subqueries [<target-id>] [--retired] the phrasings asked under each target
143
146
  targets subquery add <target-id> <phrasing>
@@ -332,7 +335,7 @@ async function targetsSuggest(ctx) {
332
335
  const scope = r.offering_id ? ` --offering ${r.offering_id}` : "";
333
336
  const lines = all.map(
334
337
  (s) =>
335
- ` ${s.phrase} [${s.basis}]${s.suggestedFraming ? ` — as ${s.suggestedFraming}` : ""}\n ${s.rationale}`
338
+ ` ${s.phrase} [${s.basis}]${s.monthlySearches != null ? ` ${s.monthlySearches}/mo` : ""}${s.suggestedFraming ? ` — as ${s.suggestedFraming}` : ""}\n ${s.rationale}`
336
339
  );
337
340
  lines.push(`Nothing saved. Keep one with: ${ctx.bin} targets add <phrase>${scope}`);
338
341
  return lines.join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.115",
3
+ "version": "0.177.116",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",