@letterstory/cli 0.176.65 → 0.176.67
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 +2 -0
- package/lib/cli.mjs +3 -1
- package/lib/commands/ask.mjs +1 -1
- package/lib/commands/phantom.mjs +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -123,6 +123,8 @@ letterstory phantom resume <phantom-id>
|
|
|
123
123
|
letterstory phantom diagnostics <phantom-id> # why is my site empty?
|
|
124
124
|
letterstory phantom balance # sites live / granted, and the cadence cap
|
|
125
125
|
letterstory phantom spread-looks [--apply] # a different look per site; dry run unless --apply
|
|
126
|
+
letterstory phantom source <phantom-id> code # build the site from its own repo; each new post merges in as Markdown
|
|
127
|
+
letterstory phantom source <phantom-id> template # back to the shared template (the repo is archived)
|
|
126
128
|
letterstory phantom delete <phantom-id> --yes
|
|
127
129
|
```
|
|
128
130
|
|
package/lib/cli.mjs
CHANGED
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
86
86
|
|
|
87
87
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
88
|
-
export const VERSION = "0.176.
|
|
88
|
+
export const VERSION = "0.176.67";
|
|
89
89
|
|
|
90
90
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
91
91
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -568,6 +568,8 @@ Phantomstory (a collection Letter hosts as an independent publication):
|
|
|
568
568
|
The site's file joined to its collection's
|
|
569
569
|
phantom rebuild <phantom-id> · phantom diagnostics <phantom-id> · phantom balance
|
|
570
570
|
phantom spread-looks [--apply] Give each live site a different look (dry run by default)
|
|
571
|
+
phantom source <phantom-id> code|template Build the site from its own repo (every post a Markdown
|
|
572
|
+
file, new posts merged in), or the shared template again
|
|
571
573
|
phantom domain check <domain> · phantom domain buy <phantom-id> <domain> --yes
|
|
572
574
|
phantom domain connect <phantom-id> <domain>
|
|
573
575
|
phantom delete <phantom-id> --yes
|
package/lib/commands/ask.mjs
CHANGED
|
@@ -21,7 +21,7 @@ export const ARGS = {
|
|
|
21
21
|
found: "found",
|
|
22
22
|
// --refresh: decide every strategy again from the facts as they are now (the standing fit is read otherwise).
|
|
23
23
|
refresh: { flag: "refresh", type: "bool" },
|
|
24
|
-
// --more: every row that fits, not only the top ones (the Ideas list's Show all).
|
|
24
|
+
// --more: every row that fits, not only the top ones (the Ideas list's Show all); alone, Ideas under All.
|
|
25
25
|
more: { flag: "more", type: "bool" },
|
|
26
26
|
domain: "site",
|
|
27
27
|
},
|
package/lib/commands/phantom.mjs
CHANGED
|
@@ -116,6 +116,11 @@ export const ARGS = {
|
|
|
116
116
|
phantom_id: { positional: 0, label: "phantom-id", required: true },
|
|
117
117
|
paused: { value: (flags, positionals, extra) => extra.paused },
|
|
118
118
|
},
|
|
119
|
+
// `phantom source <id> code|template` — build the site from its own repo, or the shared template again.
|
|
120
|
+
set_phantom_source: {
|
|
121
|
+
phantom_id: { positional: 0, label: "phantom-id", required: true },
|
|
122
|
+
source: { positional: 1, label: "code|template", required: true },
|
|
123
|
+
},
|
|
119
124
|
get_phantom_diagnostics: { phantom_id: { positional: 0, label: "phantom-id", required: true } },
|
|
120
125
|
get_phantom_balance: {},
|
|
121
126
|
spread_phantom_looks: { apply: { flag: "apply", type: "bool" } },
|
|
@@ -162,6 +167,8 @@ export async function cmdPhantom(ctx) {
|
|
|
162
167
|
case "pause":
|
|
163
168
|
case "resume":
|
|
164
169
|
return phantomPause(rest, sub === "pause");
|
|
170
|
+
case "source":
|
|
171
|
+
return call(rest, "set_phantom_source");
|
|
165
172
|
case "diagnostics":
|
|
166
173
|
case "diag":
|
|
167
174
|
return call(rest, "get_phantom_diagnostics");
|
|
@@ -173,7 +180,7 @@ export async function cmdPhantom(ctx) {
|
|
|
173
180
|
return phantomDomain(rest);
|
|
174
181
|
default:
|
|
175
182
|
throw new CliError(
|
|
176
|
-
`Unknown phantom subcommand: ${sub ?? "(none)"}. Try: list, get, new, config, visitors, delete, rebuild, pause, resume, diagnostics, balance, spread-looks, domain`
|
|
183
|
+
`Unknown phantom subcommand: ${sub ?? "(none)"}. Try: list, get, new, config, visitors, delete, rebuild, pause, resume, source, diagnostics, balance, spread-looks, domain`
|
|
177
184
|
);
|
|
178
185
|
}
|
|
179
186
|
}
|