@scribe-platform/cli 0.5.0 → 0.7.0
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 +41 -8
- package/dist/commands/site.d.ts.map +1 -1
- package/dist/commands/site.js +139 -3
- package/dist/commands/site.js.map +1 -1
- package/dist/lib/client.d.ts +54 -1
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/client.js +15 -8
- package/dist/lib/client.js.map +1 -1
- package/dist/lib/deploy-wait.d.ts +41 -0
- package/dist/lib/deploy-wait.d.ts.map +1 -0
- package/dist/lib/deploy-wait.js +22 -0
- package/dist/lib/deploy-wait.js.map +1 -0
- package/dist/lib/verify-report.d.ts +5 -0
- package/dist/lib/verify-report.d.ts.map +1 -0
- package/dist/lib/verify-report.js +54 -0
- package/dist/lib/verify-report.js.map +1 -0
- package/package.json +1 -1
- package/skills/scribe-site-builder/SKILL.md +73 -23
- package/skills/scribe-site-builder/recipes/deploy.md +4 -0
- package/skills/scribe-site-builder/recipes/forms.md +109 -22
- package/skills/scribe-site-builder/recipes/schema.md +42 -0
package/README.md
CHANGED
|
@@ -54,20 +54,51 @@ Run `scribe <group> --help` for the full options on any of these.
|
|
|
54
54
|
### Sites
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
scribe site list [--json]
|
|
57
|
+
scribe site list [--archived] [--json]
|
|
58
58
|
scribe site add --slug <slug> [--domain <domain>] [--name <name>]
|
|
59
59
|
[--turnstile-key <key>] [--form-collection <name>]
|
|
60
60
|
scribe site update <slug> [--domain <domain>] [--turnstile-key <key>]
|
|
61
61
|
scribe site clone <slug> [directory]
|
|
62
|
+
scribe site deploy <slug> [--skip-verify] [--timeout <minutes>]
|
|
63
|
+
scribe site verify <slug> [--json]
|
|
64
|
+
scribe site archive <slug>
|
|
65
|
+
scribe site restore <slug>
|
|
62
66
|
scribe site delete <slug> [--yes]
|
|
63
67
|
```
|
|
64
68
|
|
|
65
|
-
`site add` creates the GitHub repo, pushes
|
|
66
|
-
registers the site with the admin in one step.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
`site add` creates the GitHub repo, pushes a minimal valid scaffold, and
|
|
70
|
+
registers the site with the admin in one step. There is no starter template to
|
|
71
|
+
fill in — the site is authored against the recipes in the `scribe-site-builder`
|
|
72
|
+
skill. `site clone` is a plain `git clone` of the resulting repo, so you can work
|
|
73
|
+
on the design locally.
|
|
74
|
+
|
|
75
|
+
`site deploy` dispatches the build, waits for GitHub Pages to finish, then checks
|
|
76
|
+
what actually shipped. `site verify` runs those checks on their own against
|
|
77
|
+
whatever is live, and exits non-zero if any fail — so it works in a script. The
|
|
78
|
+
five things they check are a contract between a site and Scribe, and every one of
|
|
79
|
+
them fails silently:
|
|
80
|
+
|
|
81
|
+
| Check | What it costs when it's missed |
|
|
82
|
+
|---|---|
|
|
83
|
+
| `analytics` | No visitor data, and it cannot be backfilled |
|
|
84
|
+
| `turnstile` | The endpoint rejects real submissions, or the form is open to abuse |
|
|
85
|
+
| `retry` | A visitor is told their enquiry sent when it didn't. A lost lead |
|
|
86
|
+
| `dispatch` | An editor publishes, the admin says saved, the site never updates |
|
|
87
|
+
| `basepath` | Every link and asset 404s |
|
|
88
|
+
|
|
89
|
+
Forms are optional: a site with none skips `turnstile` and `retry` rather than
|
|
90
|
+
failing them. A site with nothing deployed yet skips everything and exits zero.
|
|
91
|
+
`--skip-verify` exists and prints what it gave up.
|
|
92
|
+
|
|
93
|
+
`site archive` is how a site comes down: it turns GitHub Pages off and makes the
|
|
94
|
+
repo read-only, and deletes nothing. `site restore` brings it back and starts a
|
|
95
|
+
deploy. `site list` shows live sites, and `site list --archived` shows only the
|
|
96
|
+
archived ones. Both need a key belonging to Agency staff.
|
|
97
|
+
|
|
98
|
+
`site delete` permanently removes the repo and every record of the site, and only
|
|
99
|
+
works on a site that is already archived. It cannot be undone, and prompts for
|
|
100
|
+
confirmation unless you pass `--yes`. With no terminal to prompt on, it exits
|
|
101
|
+
instead.
|
|
71
102
|
|
|
72
103
|
### Content
|
|
73
104
|
|
|
@@ -162,7 +193,9 @@ pass `--yes`. There is no equivalent in the admin UI, on purpose.
|
|
|
162
193
|
scribe build trigger <site>
|
|
163
194
|
```
|
|
164
195
|
|
|
165
|
-
Dispatches the site's build workflow. Debounced to once
|
|
196
|
+
Dispatches the site's build workflow and returns immediately. Debounced to once
|
|
197
|
+
every five minutes. Prefer `scribe site deploy`, which waits for the build and
|
|
198
|
+
then checks the result.
|
|
166
199
|
|
|
167
200
|
## Programmatic use
|
|
168
201
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../src/commands/site.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../src/commands/site.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0CpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0V3D"}
|
package/dist/commands/site.js
CHANGED
|
@@ -2,6 +2,10 @@ import { spawn } from 'node:child_process';
|
|
|
2
2
|
import { createInterface } from 'node:readline/promises';
|
|
3
3
|
import { ScribeApiError } from '../lib/client.js';
|
|
4
4
|
import { CliExit, printResult, requireClient, runAction } from '../lib/cli-utils.js';
|
|
5
|
+
import { printVerifyReport, verifyFailed } from '../lib/verify-report.js';
|
|
6
|
+
import { deployOutcome, newestRunId } from '../lib/deploy-wait.js';
|
|
7
|
+
/** Slow enough not to hammer the API through a two-minute build, quick enough to feel responsive. */
|
|
8
|
+
const POLL_INTERVAL_MS = 5_000;
|
|
5
9
|
/**
|
|
6
10
|
* Printed to stderr by default: these records are the thing to act on when
|
|
7
11
|
* promotion is refused, so they shouldn't land in a piped stdout alongside
|
|
@@ -35,11 +39,12 @@ export function registerSiteCommands(program) {
|
|
|
35
39
|
const site = program.command('site').description('Manage sites');
|
|
36
40
|
site
|
|
37
41
|
.command('list')
|
|
38
|
-
.description('List sites accessible to this API key')
|
|
42
|
+
.description('List live sites accessible to this API key (--archived for the archived ones instead)')
|
|
43
|
+
.option('--archived', 'List only archived sites')
|
|
39
44
|
.option('--json', 'Output as JSON')
|
|
40
45
|
.action(runAction(async (opts) => {
|
|
41
46
|
const client = requireClient();
|
|
42
|
-
const sites = await client.listSites();
|
|
47
|
+
const sites = await client.listSites({ archived: opts.archived });
|
|
43
48
|
printResult(sites, opts.json);
|
|
44
49
|
}));
|
|
45
50
|
site
|
|
@@ -170,13 +175,144 @@ export function registerSiteCommands(program) {
|
|
|
170
175
|
});
|
|
171
176
|
});
|
|
172
177
|
}));
|
|
178
|
+
site
|
|
179
|
+
.command('deploy')
|
|
180
|
+
.description("Deploy the site: dispatch its build workflow, wait for it, then verify what shipped")
|
|
181
|
+
.argument('<slug>', 'Site slug')
|
|
182
|
+
.option('--skip-verify', "Deploy without checking the result against Scribe's site invariants")
|
|
183
|
+
.option('--timeout <minutes>', 'How long to wait for the build before giving up', '10')
|
|
184
|
+
.action(runAction(async (slug, opts) => {
|
|
185
|
+
const client = requireClient();
|
|
186
|
+
const timeoutMs = Number(opts.timeout) * 60_000;
|
|
187
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
188
|
+
console.error('--timeout must be a positive number of minutes.');
|
|
189
|
+
process.exitCode = 1;
|
|
190
|
+
throw new CliExit();
|
|
191
|
+
}
|
|
192
|
+
// Read the newest run *before* dispatching, so the run this deploy
|
|
193
|
+
// creates is distinguishable from the one already sitting there green.
|
|
194
|
+
const baseline = newestRunId((await client.buildRuns(slug)).runs);
|
|
195
|
+
const dispatch = await client.triggerBuild(slug);
|
|
196
|
+
if (!dispatch.dispatched) {
|
|
197
|
+
console.log('A build was already dispatched within the last 5 minutes — waiting for that one instead.');
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
console.log(`Dispatched the build for "${slug}".`);
|
|
201
|
+
}
|
|
202
|
+
const deadline = Date.now() + timeoutMs;
|
|
203
|
+
let outcome = deployOutcome((await client.buildRuns(slug)).runs, baseline);
|
|
204
|
+
let announced = false;
|
|
205
|
+
while (outcome.kind === 'pending' || outcome.kind === 'running') {
|
|
206
|
+
if (outcome.kind === 'running' && !announced) {
|
|
207
|
+
console.log(`Building — ${outcome.run.url}`);
|
|
208
|
+
announced = true;
|
|
209
|
+
}
|
|
210
|
+
if (Date.now() >= deadline) {
|
|
211
|
+
// Deliberately not a verify failure. Checking now would read the
|
|
212
|
+
// previous build and could report a pass for a deploy still in
|
|
213
|
+
// flight, which is the one outcome worse than no check.
|
|
214
|
+
console.error(`\nGave up waiting after ${opts.timeout} minute(s). The build may still be running — check the Actions tab,`);
|
|
215
|
+
console.error(`then run \`scribe site verify ${slug}\` once it finishes.`);
|
|
216
|
+
process.exitCode = 1;
|
|
217
|
+
throw new CliExit();
|
|
218
|
+
}
|
|
219
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
220
|
+
outcome = deployOutcome((await client.buildRuns(slug)).runs, baseline);
|
|
221
|
+
}
|
|
222
|
+
if (outcome.kind === 'failed') {
|
|
223
|
+
console.error(`\nThe build failed (${outcome.run.conclusion}) — ${outcome.run.url}`);
|
|
224
|
+
console.error('Nothing was verified, because nothing new was deployed.');
|
|
225
|
+
process.exitCode = 1;
|
|
226
|
+
throw new CliExit();
|
|
227
|
+
}
|
|
228
|
+
console.log(`Deployed — ${outcome.run.url}`);
|
|
229
|
+
if (opts.skipVerify) {
|
|
230
|
+
// Spelled out rather than left as "verification skipped": the point of
|
|
231
|
+
// an escape hatch is knowing what you gave up, and these five fail
|
|
232
|
+
// silently, so nothing else will tell you.
|
|
233
|
+
console.log('\nSkipped verification (--skip-verify). Not checked, and none of these would error on their own:');
|
|
234
|
+
console.log(' the analytics tracker, the spam protection on any form, the submission retry');
|
|
235
|
+
console.log(' queue, the deploy trigger the admin publishes through, and the base path.');
|
|
236
|
+
console.log(`\nRun \`scribe site verify ${slug}\` when convenient.`);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
const report = await client.verifySite(slug);
|
|
240
|
+
printVerifyReport(report);
|
|
241
|
+
if (verifyFailed(report)) {
|
|
242
|
+
// Distinct from a build failure above, and worth saying out loud: the
|
|
243
|
+
// deploy worked, the site is live, and something about it is wrong.
|
|
244
|
+
console.error('The deploy succeeded and the site is live. The checks above are what is wrong with it.');
|
|
245
|
+
process.exitCode = 1;
|
|
246
|
+
throw new CliExit();
|
|
247
|
+
}
|
|
248
|
+
}));
|
|
249
|
+
site
|
|
250
|
+
.command('verify')
|
|
251
|
+
.description("Check the deployed site against Scribe's site invariants (RFC 0024). Exits non-zero on failure")
|
|
252
|
+
.argument('<slug>', 'Site slug')
|
|
253
|
+
.option('--json', 'Output the full report as JSON')
|
|
254
|
+
.action(runAction(async (slug, opts) => {
|
|
255
|
+
const client = requireClient();
|
|
256
|
+
const report = await client.verifySite(slug);
|
|
257
|
+
if (opts.json) {
|
|
258
|
+
console.log(JSON.stringify(report, null, 2));
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
printVerifyReport(report);
|
|
262
|
+
}
|
|
263
|
+
// A skip is not a failure, so a Site with nothing deployed exits zero.
|
|
264
|
+
if (verifyFailed(report)) {
|
|
265
|
+
process.exitCode = 1;
|
|
266
|
+
throw new CliExit();
|
|
267
|
+
}
|
|
268
|
+
}));
|
|
269
|
+
site
|
|
270
|
+
.command('archive')
|
|
271
|
+
.description('Take a site offline without deleting anything: Pages off, repo read-only. Undo with `site restore`.')
|
|
272
|
+
.argument('<slug>', 'Site slug')
|
|
273
|
+
.action(runAction(async (slug) => {
|
|
274
|
+
const client = requireClient();
|
|
275
|
+
const result = await client.archiveSite(slug);
|
|
276
|
+
if (result.alreadyArchived) {
|
|
277
|
+
console.log(`"${slug}" is already archived. Nothing changed.`);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
console.log(`Archived "${slug}". Its website is offline and nothing was deleted.`);
|
|
281
|
+
console.log(`Bring it back with: scribe site restore ${slug}`);
|
|
282
|
+
for (const warning of result.warnings ?? []) {
|
|
283
|
+
console.warn(`Warning: ${warning}`);
|
|
284
|
+
}
|
|
285
|
+
}));
|
|
286
|
+
site
|
|
287
|
+
.command('restore')
|
|
288
|
+
.description('Bring an archived site back online, exactly as it was')
|
|
289
|
+
.argument('<slug>', 'Site slug')
|
|
290
|
+
.action(runAction(async (slug) => {
|
|
291
|
+
const client = requireClient();
|
|
292
|
+
const result = await client.restoreSite(slug);
|
|
293
|
+
if (result.notArchived) {
|
|
294
|
+
console.log(`"${slug}" isn't archived. Nothing changed.`);
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
console.log(`Restored "${slug}". A deploy has started; it will be back at ${result.url} in a minute or two.`);
|
|
298
|
+
for (const warning of result.warnings ?? []) {
|
|
299
|
+
console.warn(`Warning: ${warning}`);
|
|
300
|
+
}
|
|
301
|
+
}));
|
|
173
302
|
site
|
|
174
303
|
.command('delete')
|
|
175
|
-
.description('Permanently delete
|
|
304
|
+
.description('Permanently delete an archived site: its GitHub repo, every record for it, and its analytics history. Cannot be undone.')
|
|
176
305
|
.argument('<slug>', 'Site slug')
|
|
177
306
|
.option('--yes', 'Skip the interactive confirmation prompt')
|
|
178
307
|
.action(runAction(async (slug, opts) => {
|
|
179
308
|
if (!opts.yes) {
|
|
309
|
+
// An agent's shell has no terminal to type into, so the prompt would
|
|
310
|
+
// hang or read an empty answer. Say what to do instead of either.
|
|
311
|
+
if (!process.stdin.isTTY) {
|
|
312
|
+
console.error(`Can't ask for confirmation without a terminal. To take "${slug}" offline, \`scribe site archive ${slug}\` is what you want — it deletes nothing. Permanent deletion of an archived site needs --yes, once its owner has explicitly asked for exactly that.`);
|
|
313
|
+
process.exitCode = 1;
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
180
316
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
181
317
|
const answer = await rl.question(`This permanently deletes the GitHub repo and all Scribe data for "${slug}". Type the slug to confirm: `);
|
|
182
318
|
rl.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site.js","sourceRoot":"","sources":["../../src/commands/site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAsB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErF;;;;GAIG;AACH,SAAS,eAAe,CAAC,OAAwB,EAAE,QAAgC,OAAO,CAAC,KAAK;IAC9F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACjC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;IAEzD,KAAK,CAAC,qEAAqE,CAAC,CAAC;IAC7E,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAEjC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,KAAK,CAAC,2EAA2E,CAAC,CAAC;QACnF,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;YAC9B,KAAK,CAAC,cAAc,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/D,CAAC;QACD,KAAK,CAAC,EAAE,CAAC,CAAC;IACZ,CAAC;IAED,IAAI,MAAM,C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YACd,qEAAqE;YACrE,kEAAkE;YAClE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;gBACzB,OAAO,CAAC,KAAK,CACX,2DAA2D,IAAI,oCAAoC,IAAI,qJAAqJ,CAC7P,CAAC;gBACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;YACD,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7E,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAC9B,qEAAqE,IAAI,+BAA+B,CACzG,CAAC;YACF,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;gBAC3B,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;gBACvD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;gBACrB,OAAO;YACT,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC;QAClC,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACN,CAAC"}
|
package/dist/lib/client.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface SiteSummary {
|
|
|
13
13
|
domain: string;
|
|
14
14
|
githubOwner: string;
|
|
15
15
|
githubRepo: string;
|
|
16
|
+
/** RFC 0026. Present only on `listSites({ archived: true })`. */
|
|
17
|
+
archivedAt?: string | null;
|
|
16
18
|
}
|
|
17
19
|
export interface DnsRecordHint {
|
|
18
20
|
type: 'A' | 'CNAME';
|
|
@@ -102,6 +104,39 @@ export interface ScribeSchema {
|
|
|
102
104
|
* place. Every command/tool goes through this — no direct core or GitHub
|
|
103
105
|
* imports from either package.
|
|
104
106
|
*/
|
|
107
|
+
/** RFC 0024. `skip` means the check could not run, which is neither a pass nor a failure. */
|
|
108
|
+
export interface InvariantCheck {
|
|
109
|
+
name: string;
|
|
110
|
+
state: 'pass' | 'fail' | 'skip';
|
|
111
|
+
message: string;
|
|
112
|
+
detail?: string[];
|
|
113
|
+
}
|
|
114
|
+
export interface VerifyReport {
|
|
115
|
+
slug: string;
|
|
116
|
+
url: string;
|
|
117
|
+
checks: InvariantCheck[];
|
|
118
|
+
failed: string[];
|
|
119
|
+
skipped: string[];
|
|
120
|
+
ran: number;
|
|
121
|
+
lastVerifiedAt: string | null;
|
|
122
|
+
pagesChecked: string[];
|
|
123
|
+
pageErrors: Array<{
|
|
124
|
+
url: string;
|
|
125
|
+
reason: string;
|
|
126
|
+
}>;
|
|
127
|
+
truncated: boolean;
|
|
128
|
+
repoErrors: string[];
|
|
129
|
+
}
|
|
130
|
+
export interface WorkflowRunSummary {
|
|
131
|
+
id: number;
|
|
132
|
+
status: 'running' | 'completed';
|
|
133
|
+
conclusion: string | null;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
updatedAt: string;
|
|
136
|
+
url: string;
|
|
137
|
+
headSha: string;
|
|
138
|
+
event: string;
|
|
139
|
+
}
|
|
105
140
|
export declare class ScribeClient {
|
|
106
141
|
private readonly options;
|
|
107
142
|
constructor(options: ScribeClientOptions);
|
|
@@ -117,7 +152,10 @@ export declare class ScribeClient {
|
|
|
117
152
|
scope: 'read' | 'read-write';
|
|
118
153
|
siteSlugs: string[];
|
|
119
154
|
}>;
|
|
120
|
-
|
|
155
|
+
/** Live sites by default; `archived: true` lists only the archived ones instead (RFC 0026). */
|
|
156
|
+
listSites(options?: {
|
|
157
|
+
archived?: boolean;
|
|
158
|
+
}): Promise<SiteSummary[]>;
|
|
121
159
|
createSite(input: {
|
|
122
160
|
slug: string;
|
|
123
161
|
name?: string;
|
|
@@ -145,6 +183,17 @@ export declare class ScribeClient {
|
|
|
145
183
|
dnsOnly?: boolean;
|
|
146
184
|
force?: boolean;
|
|
147
185
|
}): Promise<PromoteResponse>;
|
|
186
|
+
archiveSite(site: string): Promise<{
|
|
187
|
+
ok: true;
|
|
188
|
+
alreadyArchived?: boolean;
|
|
189
|
+
warnings?: string[];
|
|
190
|
+
}>;
|
|
191
|
+
restoreSite(site: string): Promise<{
|
|
192
|
+
ok: true;
|
|
193
|
+
notArchived?: boolean;
|
|
194
|
+
url?: string;
|
|
195
|
+
warnings?: string[];
|
|
196
|
+
}>;
|
|
148
197
|
deleteSite(site: string): Promise<{
|
|
149
198
|
ok: true;
|
|
150
199
|
warnings?: string[];
|
|
@@ -210,5 +259,9 @@ export declare class ScribeClient {
|
|
|
210
259
|
triggerBuild(site: string): Promise<{
|
|
211
260
|
dispatched: boolean;
|
|
212
261
|
}>;
|
|
262
|
+
verifySite(site: string): Promise<VerifyReport>;
|
|
263
|
+
buildRuns(site: string): Promise<{
|
|
264
|
+
runs: WorkflowRunSummary[];
|
|
265
|
+
}>;
|
|
213
266
|
}
|
|
214
267
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/lib/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAe,SAAQ,KAAK;aAGrB,MAAM,EAAE,MAAM;aACd,IAAI,CAAC,EAAE,OAAO;gBAF9B,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,OAAO,YAAA;CAKjC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,M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SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,kBAAkB,EAAE,CAAA;KAAE,CAAC;CAGvE"}
|
package/dist/lib/client.js
CHANGED
|
@@ -16,12 +16,6 @@ function encodePath(path) {
|
|
|
16
16
|
.map(encodeURIComponent)
|
|
17
17
|
.join('/');
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Thin HTTP client over the admin app's `/api/v1` surface, shared by the
|
|
21
|
-
* CLI and MCP server so the fetch/auth/error-mapping logic exists in one
|
|
22
|
-
* place. Every command/tool goes through this — no direct core or GitHub
|
|
23
|
-
* imports from either package.
|
|
24
|
-
*/
|
|
25
19
|
export class ScribeClient {
|
|
26
20
|
options;
|
|
27
21
|
constructor(options) {
|
|
@@ -72,8 +66,9 @@ export class ScribeClient {
|
|
|
72
66
|
async whoami() {
|
|
73
67
|
return this.request('GET', '/api/v1/whoami');
|
|
74
68
|
}
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
/** Live sites by default; `archived: true` lists only the archived ones instead (RFC 0026). */
|
|
70
|
+
async listSites(options = {}) {
|
|
71
|
+
const { sites } = await this.request('GET', options.archived ? '/api/v1/sites?archived=true' : '/api/v1/sites');
|
|
77
72
|
return sites;
|
|
78
73
|
}
|
|
79
74
|
async createSite(input) {
|
|
@@ -85,6 +80,12 @@ export class ScribeClient {
|
|
|
85
80
|
async promoteSite(site, input) {
|
|
86
81
|
return this.request('POST', `/api/v1/sites/${encodeURIComponent(site)}/promote`, input);
|
|
87
82
|
}
|
|
83
|
+
async archiveSite(site) {
|
|
84
|
+
return this.request('POST', `/api/v1/sites/${encodeURIComponent(site)}/archive`);
|
|
85
|
+
}
|
|
86
|
+
async restoreSite(site) {
|
|
87
|
+
return this.request('POST', `/api/v1/sites/${encodeURIComponent(site)}/restore`);
|
|
88
|
+
}
|
|
88
89
|
async deleteSite(site) {
|
|
89
90
|
return this.request('DELETE', `/api/v1/sites/${encodeURIComponent(site)}`);
|
|
90
91
|
}
|
|
@@ -164,5 +165,11 @@ export class ScribeClient {
|
|
|
164
165
|
async triggerBuild(site) {
|
|
165
166
|
return this.request('POST', `/api/v1/sites/${encodeURIComponent(site)}/build`);
|
|
166
167
|
}
|
|
168
|
+
async verifySite(site) {
|
|
169
|
+
return this.request('POST', `/api/v1/sites/${encodeURIComponent(site)}/verify`);
|
|
170
|
+
}
|
|
171
|
+
async buildRuns(site) {
|
|
172
|
+
return this.request('GET', `/api/v1/sites/${encodeURIComponent(site)}/build/status`);
|
|
173
|
+
}
|
|
167
174
|
}
|
|
168
175
|
//# sourceMappingURL=client.js.map
|
package/dist/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAe,SAAQ,KAAK;IAGrB;IACA;IAHlB,YACE,OAAe,EACC,MAAc,EACd,IAAc;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAU;QAG9B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAe,SAAQ,KAAK;IAGrB;IACA;IAHlB,YACE,OAAe,EACC,MAAc,EACd,IAAc;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAU;QAG9B,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAuGD,iHAAiH;AACjH,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI;SACR,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,kBAAkB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CAAC,EAAE,CAC3F,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,IAAY;QAC7B,OAAO,IAAI,CAAC,OAAO,CAA0B,MAAM,EAAE,iBAAiB,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1G,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,iBAAiB,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAClF,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAY;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACvF,CAAC;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { WorkflowRunSummary } from './client.js';
|
|
2
|
+
/**
|
|
3
|
+
* Deciding when a dispatched deploy has finished — the logic `scribe site deploy`
|
|
4
|
+
* waits on, kept pure so its awkward cases are testable without a two-minute
|
|
5
|
+
* build.
|
|
6
|
+
*
|
|
7
|
+
* The awkward cases are the whole problem. A dispatch returns before GitHub has
|
|
8
|
+
* created the run, so "no new run yet" is normal for a few seconds and must not
|
|
9
|
+
* be read as finished. And the previous run is sitting right there, already
|
|
10
|
+
* `completed` and `success` — mistaking it for this one is how a verify ends up
|
|
11
|
+
* checking the old build and reporting a stale pass, which RFC 0024 says is worse
|
|
12
|
+
* than not checking at all.
|
|
13
|
+
*/
|
|
14
|
+
export type DeployOutcome =
|
|
15
|
+
/** No run newer than the dispatch exists yet. Keep waiting. */
|
|
16
|
+
{
|
|
17
|
+
kind: 'pending';
|
|
18
|
+
}
|
|
19
|
+
/** The new run exists and is still going. */
|
|
20
|
+
| {
|
|
21
|
+
kind: 'running';
|
|
22
|
+
run: WorkflowRunSummary;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'succeeded';
|
|
25
|
+
run: WorkflowRunSummary;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'failed';
|
|
28
|
+
run: WorkflowRunSummary;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Identifies this deploy's run by id: anything whose id is greater than the
|
|
32
|
+
* newest run seen *before* the dispatch is new.
|
|
33
|
+
*
|
|
34
|
+
* Ids rather than timestamps, because GitHub's `created_at` has one-second
|
|
35
|
+
* resolution and a dispatch that lands in the same second as a push would be
|
|
36
|
+
* ambiguous. Run ids are monotonic per repository.
|
|
37
|
+
*/
|
|
38
|
+
export declare function deployOutcome(runs: WorkflowRunSummary[], baselineRunId: number | null): DeployOutcome;
|
|
39
|
+
/** The newest run id before a dispatch, or null when the workflow has never run. */
|
|
40
|
+
export declare function newestRunId(runs: WorkflowRunSummary[]): number | null;
|
|
41
|
+
//# sourceMappingURL=deploy-wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-wait.d.ts","sourceRoot":"","sources":["../../src/lib/deploy-wait.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,aAAa;AACvB,+DAA+D;AAC7D;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE;AACrB,6CAA6C;GAC3C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,kBAAkB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,kBAAkB,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAEhD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,aAAa,CAOrG;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,MAAM,GAAG,IAAI,CAErE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies this deploy's run by id: anything whose id is greater than the
|
|
3
|
+
* newest run seen *before* the dispatch is new.
|
|
4
|
+
*
|
|
5
|
+
* Ids rather than timestamps, because GitHub's `created_at` has one-second
|
|
6
|
+
* resolution and a dispatch that lands in the same second as a push would be
|
|
7
|
+
* ambiguous. Run ids are monotonic per repository.
|
|
8
|
+
*/
|
|
9
|
+
export function deployOutcome(runs, baselineRunId) {
|
|
10
|
+
const candidates = baselineRunId === null ? runs : runs.filter((run) => run.id > baselineRunId);
|
|
11
|
+
if (candidates.length === 0)
|
|
12
|
+
return { kind: 'pending' };
|
|
13
|
+
const run = candidates.reduce((newest, each) => (each.id > newest.id ? each : newest));
|
|
14
|
+
if (run.status !== 'completed')
|
|
15
|
+
return { kind: 'running', run };
|
|
16
|
+
return run.conclusion === 'success' ? { kind: 'succeeded', run } : { kind: 'failed', run };
|
|
17
|
+
}
|
|
18
|
+
/** The newest run id before a dispatch, or null when the workflow has never run. */
|
|
19
|
+
export function newestRunId(runs) {
|
|
20
|
+
return runs.length === 0 ? null : runs.reduce((max, run) => Math.max(max, run.id), 0);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=deploy-wait.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-wait.js","sourceRoot":"","sources":["../../src/lib/deploy-wait.ts"],"names":[],"mappings":"AAuBA;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,IAA0B,EAAE,aAA4B;IACpF,MAAM,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,aAAa,CAAC,CAAC;IAChG,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAExD,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACvF,IAAI,GAAG,CAAC,MAAM,KAAK,WAAW;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;IAChE,OAAO,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;AAC7F,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,WAAW,CAAC,IAA0B;IACpD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { VerifyReport } from './client.js';
|
|
2
|
+
/** Whether anything actually failed. The caller's exit code hangs off this, and a skip never contributes. */
|
|
3
|
+
export declare function verifyFailed(report: VerifyReport): boolean;
|
|
4
|
+
export declare function printVerifyReport(report: VerifyReport, write?: (line: string) => void): void;
|
|
5
|
+
//# sourceMappingURL=verify-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-report.d.ts","sourceRoot":"","sources":["../../src/lib/verify-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAUhD,6GAA6G;AAC7G,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAE1D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAkB,GAAG,IAAI,CAwCzG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Printing an RFC 0024 verification. Shared by `scribe site verify` and
|
|
3
|
+
* `scribe site deploy`, so a deploy's verdict reads identically to a standalone
|
|
4
|
+
* one and there is no second opinion about what counts as a failure.
|
|
5
|
+
*/
|
|
6
|
+
const MARK = { pass: '✓', fail: '✗', skip: '–' };
|
|
7
|
+
/** Whether anything actually failed. The caller's exit code hangs off this, and a skip never contributes. */
|
|
8
|
+
export function verifyFailed(report) {
|
|
9
|
+
return report.failed.length > 0;
|
|
10
|
+
}
|
|
11
|
+
export function printVerifyReport(report, write = console.log) {
|
|
12
|
+
write(`\nVerifying "${report.slug}" — ${report.url}`);
|
|
13
|
+
if (report.pagesChecked.length === 0) {
|
|
14
|
+
// Not a failure. A Site provisioned minutes ago has nothing deployed to look
|
|
15
|
+
// at, and saying so is more useful than five identical skip lines.
|
|
16
|
+
write('\n Nothing deployed yet — no page could be fetched, so nothing was checked.');
|
|
17
|
+
for (const error of report.pageErrors)
|
|
18
|
+
write(` ${error.url} — ${error.reason}`);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
const suffix = report.truncated ? ` (capped — more pages exist than were checked)` : '';
|
|
22
|
+
write(` ${report.pagesChecked.length} page(s) checked${suffix}\n`);
|
|
23
|
+
}
|
|
24
|
+
for (const check of report.checks) {
|
|
25
|
+
write(` ${MARK[check.state] ?? '?'} ${check.name.padEnd(10)} ${check.message}`);
|
|
26
|
+
for (const line of check.detail ?? [])
|
|
27
|
+
write(` ${line}`);
|
|
28
|
+
}
|
|
29
|
+
if (report.pagesChecked.length > 0 && report.pageErrors.length > 0) {
|
|
30
|
+
write('\n Pages that could not be fetched (not counted either way):');
|
|
31
|
+
for (const error of report.pageErrors)
|
|
32
|
+
write(` ${error.url} — ${error.reason}`);
|
|
33
|
+
}
|
|
34
|
+
for (const error of report.repoErrors)
|
|
35
|
+
write(`\n ! ${error}`);
|
|
36
|
+
write('');
|
|
37
|
+
if (verifyFailed(report)) {
|
|
38
|
+
write(` ${report.failed.length} check(s) failed: ${report.failed.join(', ')}`);
|
|
39
|
+
}
|
|
40
|
+
else if (report.pagesChecked.length === 0) {
|
|
41
|
+
// Not "all checks passed". `dispatch` reads repo files and runs for every
|
|
42
|
+
// Site, deployed or not, so a count of what passed would read as a clean
|
|
43
|
+
// bill of health for a Site nothing is serving. This Site is deliberately
|
|
44
|
+
// not recorded as verified either.
|
|
45
|
+
write(' Nothing about the deployed Site was checked, so it is not recorded as verified.');
|
|
46
|
+
write(' Deploy it, then run this again.');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const skipped = report.skipped.length > 0 ? `, ${report.skipped.length} not applicable` : '';
|
|
50
|
+
write(` All ${report.ran} applicable check(s) passed${skipped}.`);
|
|
51
|
+
}
|
|
52
|
+
write('');
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=verify-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-report.js","sourceRoot":"","sources":["../../src/lib/verify-report.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,IAAI,GAA2B,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAEzE,6GAA6G;AAC7G,MAAM,UAAU,YAAY,CAAC,MAAoB;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,MAAoB,EAAE,QAAgC,OAAO,CAA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KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,UAAU;QAAE,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC;IAE/D,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,qBAAqB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC;SAAM,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,0EAA0E;QAC1E,yEAAyE;QACzE,0EAA0E;QAC1E,mCAAmC;QACnC,KAAK,CAAC,mFAAmF,CAAC,CAAC;QAC3F,KAAK,CAAC,mCAAmC,CAAC,CAAC;IAC7C,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,OAAO,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,KAAK,CAAC,SAAS,MAAM,CAAC,GAAG,8BAA8B,OAAO,GAAG,CAAC,CAAC;IACrE,CAAC;IACD,KAAK,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scribe-site-builder
|
|
3
|
-
description: Guides building a website on Scribe CMS end to end — designing the Astro site freely against Scribe as its backend, editing the `.scribe.yml` schema, adding one or many forms, the local dev loop, pushing content, and deploying — using the `scribe` CLI and the recipes in `recipes/`. Also the reference for working an existing Scribe site (adding fields/collections, publishing content, triaging form submissions, deleting a site). Use whenever the user wants to build/create/start a new website or site with Scribe, add a form to a site, work on an existing Scribe site, or asks about the `scribe` CLI.
|
|
3
|
+
description: Guides building a website on Scribe CMS end to end — designing the Astro site freely against Scribe as its backend, editing the `.scribe.yml` schema, adding one or many forms, the local dev loop, pushing content, and deploying — using the `scribe` CLI and the recipes in `recipes/`. Also the reference for working an existing Scribe site (adding fields/collections, publishing content, triaging form submissions, archiving, restoring or deleting a site). Use whenever the user wants to build/create/start a new website or site with Scribe, add a form to a site, work on an existing Scribe site, or asks about the `scribe` CLI.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Building a site with Scribe
|
|
@@ -144,9 +144,26 @@ recognise, a command that no longer exists).
|
|
|
144
144
|
merge conflicts, nothing purpose-built.
|
|
145
145
|
|
|
146
146
|
7. **Deploy.** Any push to the repo's default branch runs `.github/workflows/deploy.yml`
|
|
147
|
-
automatically (build + GitHub Pages).
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
automatically (build + GitHub Pages). Two ways to do it on demand:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
scribe site deploy my-site # dispatch, wait for the build, then verify
|
|
151
|
+
scribe build trigger my-site # dispatch and return immediately
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Prefer `site deploy`.** It waits for the Pages run and then checks the
|
|
155
|
+
deployed pages against Scribe's five site invariants (RFC 0024) — the tracker,
|
|
156
|
+
the spam protection on any form, the submission retry queue, the deploy
|
|
157
|
+
trigger the admin publishes through, and the base path. Every one of those
|
|
158
|
+
fails silently: nothing errors, the build is green, and the page looks right.
|
|
159
|
+
`--skip-verify` exists and prints what it gave up.
|
|
160
|
+
|
|
161
|
+
`build trigger` stays as the fire-and-forget primitive. It is debounced to once
|
|
162
|
+
per 5 minutes per site, so repeat calls in that window are a silent no-op —
|
|
163
|
+
and it tells you nothing about whether the result is correct.
|
|
164
|
+
|
|
165
|
+
`scribe site verify my-site` runs the checks on their own, against whatever is
|
|
166
|
+
currently live. Exits non-zero on a failure, so it works in a script.
|
|
150
167
|
|
|
151
168
|
8. **Domain cutover — only when a customer's own hostname is ready.** Skip this
|
|
152
169
|
entirely for demo sites; the GitHub Pages default already works.
|
|
@@ -274,29 +291,62 @@ placeholder / link out to somewhere else on purpose. Don't default to that — t
|
|
|
274
291
|
"add a photo of X" as "go get a real image and commit it," not "find any URL that
|
|
275
292
|
renders."
|
|
276
293
|
|
|
277
|
-
##
|
|
294
|
+
## Taking a site down: archive, restore, delete
|
|
278
295
|
|
|
279
296
|
```
|
|
280
|
-
scribe site
|
|
297
|
+
scribe site archive <slug> # offline + read-only; deletes nothing
|
|
298
|
+
scribe site restore <slug> # back online, exactly as it was
|
|
299
|
+
scribe site list --archived # the archived ones (plain `list` hides them)
|
|
300
|
+
scribe site delete <slug> [--yes] # permanent; only works on an archived site
|
|
281
301
|
```
|
|
282
302
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
303
|
+
**Archive is how a site comes down** (RFC 0026). It turns GitHub Pages off, so the
|
|
304
|
+
website stops loading. It archives the repo on GitHub, so it is read-only but still
|
|
305
|
+
there. It stops the site's forms accepting submissions and removes the site from
|
|
306
|
+
every list people work from. **Nothing is deleted**: content, schema, submissions and
|
|
307
|
+
their history, requests, metrics and who had access all stay. `scribe site restore`
|
|
308
|
+
brings it back, turning Pages on and starting a deploy, so the site is live again
|
|
309
|
+
in a minute or two. Both need a read-write key belonging to Agency staff. A site
|
|
310
|
+
user's key is refused, even for their own site.
|
|
311
|
+
|
|
312
|
+
**When someone asks you to delete, remove or take down a site, archive it.** It
|
|
313
|
+
can be undone, so this is an ordinary request for you to carry out, not one to hand
|
|
314
|
+
back:
|
|
315
|
+
|
|
316
|
+
1. Run `scribe site list` and name the exact slug and its live URL back to them,
|
|
317
|
+
along with anything that sounds like a sibling they want kept (the `-v2` they're
|
|
318
|
+
removing versus the `v1` that's live).
|
|
319
|
+
2. Tell them what archiving does: the site goes offline and nothing is deleted. It
|
|
320
|
+
only touches that one site, not Scribe, their other sites or their account.
|
|
321
|
+
3. When they confirm the slug, run `scribe site archive <slug>` and report the output,
|
|
322
|
+
including how to bring it back.
|
|
323
|
+
|
|
324
|
+
`scribe site delete` is a different thing, and it is permanent. It deletes the GitHub
|
|
325
|
+
repo (Astro source, schema, content) and every record Scribe holds for the site,
|
|
326
|
+
including its submissions and their history. There is no undo. It refuses a live site
|
|
327
|
+
with a 409 telling you to archive first, so a single command can never destroy a live
|
|
328
|
+
site. Only run it when the person has explicitly asked for permanent deletion of a
|
|
329
|
+
site that is already archived. "Delete" on its own almost always means "take it
|
|
330
|
+
down", which is what archive does. Without `--yes` it prompts for the slug to be
|
|
331
|
+
retyped. From a shell with no terminal (yours) it exits instead of waiting, so after
|
|
332
|
+
that explicit request it's `--yes`. It needs an **unrestricted** API key (no
|
|
333
|
+
`siteSlugs` restriction), the same rule as `site add`. In the admin, archiving is
|
|
334
|
+
under the site's **Settings → Danger zone**. Restore and **Delete permanently** are on
|
|
335
|
+
the archived site's page in the Staff console: **Sites → Archived**.
|
|
336
|
+
|
|
337
|
+
An archived site's other commands (`content`, `schema`, `submission`, `build`, …)
|
|
338
|
+
return a 409 saying it's archived, because its repo is read-only. Restore it first.
|
|
339
|
+
Its slug stays taken while it's archived, so `site add` with the same slug says so.
|
|
340
|
+
|
|
341
|
+
Archiving and deleting both drop the site's domain from the Turnstile widget, but
|
|
342
|
+
only if no other *live* site still uses it, so removing one demo never breaks the
|
|
343
|
+
contact form on the rest. Restoring adds it back. A `Warning:` in the output means
|
|
344
|
+
that cleanup didn't happen. It's harmless, but tidy it up in Cloudflare.
|
|
345
|
+
|
|
346
|
+
Side effect of the permanent delete worth knowing: if an API key's `siteSlugs` was
|
|
347
|
+
only that one site, deleting it leaves that key with an empty `siteSlugs` array,
|
|
348
|
+
which the API treats as **unrestricted** (every site), not inert. Archiving doesn't
|
|
349
|
+
touch keys at all.
|
|
300
350
|
|
|
301
351
|
## `.scribe.yml` field reference
|
|
302
352
|
|
|
@@ -4,6 +4,10 @@ Sites deploy to GitHub Pages from their own repo. Two parts of this are a
|
|
|
4
4
|
contract with Scribe rather than a preference: the workflow must accept
|
|
5
5
|
`workflow_dispatch`, and the Astro `base` must follow `public/CNAME`.
|
|
6
6
|
|
|
7
|
+
Both are checked against the deployed output by `scribe site verify <site>`, along
|
|
8
|
+
with the tracker (`schema.md`) and the two form contracts (`forms.md`) — see
|
|
9
|
+
RFC 0024. Run it after a deploy rather than reading this list and hoping.
|
|
10
|
+
|
|
7
11
|
## Why `workflow_dispatch` matters
|
|
8
12
|
|
|
9
13
|
When an editor publishes in the admin, Scribe commits the content file and then
|
|
@@ -77,6 +77,31 @@ POST /api/submissions?site=<slug>&collection=<name>
|
|
|
77
77
|
Never report success on a non-2xx. A form that says "Thanks!" after a 503 loses
|
|
78
78
|
the message.
|
|
79
79
|
|
|
80
|
+
## 2b. Three things about a form that are contract, not style
|
|
81
|
+
|
|
82
|
+
Design the markup however you like. These three are checked by
|
|
83
|
+
`scribe site verify` (RFC 0024), because each one fails **silently** — nothing
|
|
84
|
+
errors, the build is green, and the page looks right to whoever just deployed it.
|
|
85
|
+
|
|
86
|
+
| Contract | How to satisfy it |
|
|
87
|
+
|---|---|
|
|
88
|
+
| The form says which collection it posts to | `data-collection="<name>"` on the `<form>`, or `collection=<name>` in its `data-endpoint`/`action` |
|
|
89
|
+
| Turnstile protects it | Cloudflare's script tag, plus a `cf-turnstile` element whose `data-sitekey` is **this Site's** key |
|
|
90
|
+
| It never reports a false success | the retry queue in §3, declared with `data-scribe-retry` on the `<form>` |
|
|
91
|
+
|
|
92
|
+
The first is how Scribe finds your form in the built HTML at all. It is also
|
|
93
|
+
already load-bearing — your submit handler reads it to build the POST URL — so
|
|
94
|
+
there is no extra attribute to remember.
|
|
95
|
+
|
|
96
|
+
`data-scribe-retry` is the one attribute that exists purely as a claim, because
|
|
97
|
+
"this form queues a failed submission" has no other signature in the output. Put
|
|
98
|
+
it on the `<form>` in the same component that implements the queue, and don't put
|
|
99
|
+
it on a form that doesn't: it is read as an assertion that the behaviour below is
|
|
100
|
+
present.
|
|
101
|
+
|
|
102
|
+
A widget keyed to a **different** Site's `turnstileSiteKey` is as bad as no
|
|
103
|
+
widget — the endpoint verifies the token against this Site's secret and 401s it.
|
|
104
|
+
|
|
80
105
|
## 3. A form component
|
|
81
106
|
|
|
82
107
|
Generic and schema-driven, which is the useful starting point when the fields
|
|
@@ -119,7 +144,7 @@ function inputType(f: { name: string; type: string }) {
|
|
|
119
144
|
return 'text';
|
|
120
145
|
}
|
|
121
146
|
---
|
|
122
|
-
<form id={formId} data-site={site} data-collection={collection} data-endpoint={`${apiBase}/api/submissions`}>
|
|
147
|
+
<form id={formId} data-site={site} data-collection={collection} data-endpoint={`${apiBase}/api/submissions`} data-scribe-retry>
|
|
123
148
|
{fields.map((f) => (
|
|
124
149
|
prefill[f.name] !== undefined ? (
|
|
125
150
|
<input type="hidden" name={f.name} value={prefill[f.name]} />
|
|
@@ -146,11 +171,23 @@ function inputType(f: { name: string; type: string }) {
|
|
|
146
171
|
const statusEl = form.querySelector('.form-status');
|
|
147
172
|
const say = (m) => { if (statusEl) statusEl.textContent = m; };
|
|
148
173
|
|
|
149
|
-
|
|
150
|
-
|
|
174
|
+
const { site, collection, endpoint } = form.dataset;
|
|
175
|
+
const storageKey = `scribe_pending_submission_${site}_${collection}`;
|
|
176
|
+
|
|
177
|
+
// Last resorts only. The endpoint puts visitor-facing copy in the response
|
|
178
|
+
// body (RFC 0004) so the server can change what a Visitor reads without
|
|
179
|
+
// rebuilding every Site. These two cover the cases where there is no body:
|
|
180
|
+
// the request never arrived, or it came back with nothing usable.
|
|
181
|
+
const UNREACHABLE = "We couldn't send that yet — it's saved and will retry.";
|
|
182
|
+
const GENERIC = "We couldn't send that. Please try again, or call or email us instead.";
|
|
151
183
|
|
|
152
|
-
|
|
153
|
-
|
|
184
|
+
const readPending = () => { try { return JSON.parse(localStorage.getItem(storageKey)) ?? null; } catch { return null; } };
|
|
185
|
+
const savePending = (p) => { try { localStorage.setItem(storageKey, JSON.stringify(p)); } catch {} };
|
|
186
|
+
const clearPending = () => { try { localStorage.removeItem(storageKey); } catch {} };
|
|
187
|
+
|
|
188
|
+
// Built per control rather than from FormData, so a checkbox sends a real
|
|
189
|
+
// boolean and an unchecked box sends `false` instead of being omitted.
|
|
190
|
+
function collect() {
|
|
154
191
|
const payload = {};
|
|
155
192
|
for (const el of form.elements) {
|
|
156
193
|
if (!el.name) continue;
|
|
@@ -158,36 +195,86 @@ function inputType(f: { name: string; type: string }) {
|
|
|
158
195
|
else if (el.type === 'number') payload[el.name] = el.value === '' ? null : Number(el.value);
|
|
159
196
|
else payload[el.name] = el.value;
|
|
160
197
|
}
|
|
198
|
+
return payload;
|
|
199
|
+
}
|
|
161
200
|
|
|
162
|
-
|
|
163
|
-
|
|
201
|
+
async function send(payload) {
|
|
202
|
+
const url = `${endpoint}?site=${encodeURIComponent(site)}&collection=${encodeURIComponent(collection)}`;
|
|
203
|
+
const res = await fetch(url, {
|
|
204
|
+
method: 'POST',
|
|
205
|
+
headers: { 'Content-Type': 'application/json' },
|
|
206
|
+
body: JSON.stringify(payload),
|
|
207
|
+
});
|
|
208
|
+
if (res.ok) return;
|
|
209
|
+
// A non-2xx means the server answered and said why, which is a different
|
|
210
|
+
// thing from never reaching it. `answered` picks the message; `retryable`
|
|
211
|
+
// decides whether a later attempt could plausibly land.
|
|
212
|
+
const body = await res.json().catch(() => ({}));
|
|
213
|
+
const error = new Error((body.error ?? '').trim() || GENERIC);
|
|
214
|
+
error.answered = true;
|
|
215
|
+
error.retryable = res.status >= 500;
|
|
216
|
+
throw error;
|
|
217
|
+
}
|
|
164
218
|
|
|
219
|
+
form.addEventListener('submit', async (event) => {
|
|
220
|
+
event.preventDefault();
|
|
221
|
+
const payload = collect();
|
|
165
222
|
say('Sending…');
|
|
166
223
|
try {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
headers: { 'Content-Type': 'application/json' },
|
|
170
|
-
body: JSON.stringify(payload),
|
|
171
|
-
});
|
|
172
|
-
if (!res.ok) {
|
|
173
|
-
// The server's copy is written for the visitor on 400/503; prefer it.
|
|
174
|
-
const data = await res.json().catch(() => ({}));
|
|
175
|
-
say(data.error || "Sorry — we couldn't send that. Please try again.");
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
224
|
+
await send(payload);
|
|
225
|
+
clearPending();
|
|
178
226
|
form.reset();
|
|
179
227
|
say('Thanks — we got it.');
|
|
180
|
-
} catch {
|
|
181
|
-
|
|
228
|
+
} catch (err) {
|
|
229
|
+
// Never claim a success the server didn't give, and never paper over
|
|
230
|
+
// its message with ours.
|
|
231
|
+
if (err.answered) {
|
|
232
|
+
if (err.retryable) savePending(payload);
|
|
233
|
+
say(err.message);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
savePending(payload);
|
|
237
|
+
say(UNREACHABLE);
|
|
182
238
|
}
|
|
183
239
|
});
|
|
240
|
+
|
|
241
|
+
// Replay on the next page load, which is what makes the queue worth having.
|
|
242
|
+
(async function retryPending() {
|
|
243
|
+
const pending = readPending();
|
|
244
|
+
if (!pending) return;
|
|
245
|
+
try {
|
|
246
|
+
await send(pending);
|
|
247
|
+
clearPending();
|
|
248
|
+
say('Thanks — we got it.');
|
|
249
|
+
} catch (err) {
|
|
250
|
+
// Replaying a rejection (a validation error, a rate limit) on every
|
|
251
|
+
// page load would loop forever, so drop it and show what the server
|
|
252
|
+
// said. Anything else stays queued for next time.
|
|
253
|
+
if (err.answered && !err.retryable) {
|
|
254
|
+
clearPending();
|
|
255
|
+
say(err.message);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
})();
|
|
184
259
|
})();
|
|
185
260
|
</script>
|
|
186
261
|
```
|
|
187
262
|
|
|
263
|
+
**The retry queue is the part not to skip.** Without it, a submission that fails
|
|
264
|
+
because the Visitor's connection dropped or the database was briefly unreachable
|
|
265
|
+
is gone — and the only person who could tell you is the Visitor, who thinks they
|
|
266
|
+
already got in touch. That is the single most expensive silent failure a Scribe
|
|
267
|
+
Site has, which is why `data-scribe-retry` is checked rather than suggested.
|
|
268
|
+
|
|
269
|
+
One subtlety worth knowing: a replay reuses the **stored payload**, which still
|
|
270
|
+
carries the `cf-turnstile-response` from the original attempt. Turnstile tokens
|
|
271
|
+
are short-lived, so a replay much later is rejected as a 401 — `answered` and not
|
|
272
|
+
`retryable`, so it is dropped with the server's message rather than looping. The
|
|
273
|
+
queue's real job is the retry that happens seconds or minutes later, not days.
|
|
274
|
+
|
|
188
275
|
Note `cf-turnstile-response`: the Turnstile widget injects a hidden input with
|
|
189
|
-
that name into the form, so
|
|
190
|
-
|
|
276
|
+
that name into the form, so `collect()` picks it up automatically. If you build
|
|
277
|
+
the payload by hand, include it explicitly.
|
|
191
278
|
|
|
192
279
|
## 4. Put it on a page
|
|
193
280
|
|
|
@@ -45,6 +45,8 @@ export interface ScribeSchema {
|
|
|
45
45
|
site: string;
|
|
46
46
|
siteName?: string;
|
|
47
47
|
turnstileSiteKey?: string;
|
|
48
|
+
umamiWebsiteId?: string;
|
|
49
|
+
umamiScriptUrl?: string;
|
|
48
50
|
collections: ScribeCollection[];
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -76,6 +78,8 @@ runs at build time, and CI installs dev deps before `npm run build`).
|
|
|
76
78
|
| `site` | the Site slug — what you pass as `?site=` when submitting a form |
|
|
77
79
|
| `siteName` | display name |
|
|
78
80
|
| `turnstileSiteKey` | public Turnstile key for forms |
|
|
81
|
+
| `umamiWebsiteId` | analytics id for this Site — **render it, see below** |
|
|
82
|
+
| `umamiScriptUrl` | where the analytics tracker is served from |
|
|
79
83
|
| `collections[].path` | where content files live, relative to the repo root |
|
|
80
84
|
| `collections[].format` | `yaml-frontmatter` (markdown with a body) or `yaml` (data only) |
|
|
81
85
|
| `collections[].form` | `true` means submissions, not files — **no content to render** |
|
|
@@ -87,6 +91,44 @@ A `form: true` collection has **no files in the repo** — its submissions are r
|
|
|
87
91
|
in Scribe's database, readable in the admin or via
|
|
88
92
|
`scribe submission list`/`export`. Don't try to render it as content.
|
|
89
93
|
|
|
94
|
+
## Analytics — put the tracker in your layout
|
|
95
|
+
|
|
96
|
+
Scribe writes `umamiWebsiteId` and `umamiScriptUrl` into `.scribe.yml` when it
|
|
97
|
+
provisions a Site (ADR 0001). **Nothing renders them for you** — a Site whose
|
|
98
|
+
layout omits this snippet collects no visitor data at all, and the Client's
|
|
99
|
+
monthly Report has an empty website section.
|
|
100
|
+
|
|
101
|
+
In the `<head>` of your base layout:
|
|
102
|
+
|
|
103
|
+
```astro
|
|
104
|
+
---
|
|
105
|
+
import { loadScribeSchema } from '../lib/scribe';
|
|
106
|
+
const { umamiWebsiteId, umamiScriptUrl } = loadScribeSchema();
|
|
107
|
+
---
|
|
108
|
+
{umamiWebsiteId && umamiScriptUrl && (
|
|
109
|
+
<script defer src={umamiScriptUrl} data-website-id={umamiWebsiteId}></script>
|
|
110
|
+
)}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Both guards matter: a Site provisioned before analytics existed, or one where
|
|
114
|
+
registration failed, has neither key, and a `<script>` with no id is a request
|
|
115
|
+
that reports nothing.
|
|
116
|
+
|
|
117
|
+
**This is the one thing here you cannot fix later.** Analytics data is not
|
|
118
|
+
retroactive — Umami only knows about visits that happened while the script was
|
|
119
|
+
on the page. A month shipped without it is a month that stays empty forever, so
|
|
120
|
+
add it when you build the layout, not when someone asks for a Report.
|
|
121
|
+
|
|
122
|
+
`scribe site verify <site>` checks the **deployed pages** for it, every page it
|
|
123
|
+
can reach rather than just the homepage — which is the point. A Site can have
|
|
124
|
+
the tracker in one layout and serve some pages through another, and the repo
|
|
125
|
+
looks fine either way. Rod's Auto Body renders through `Site.astro` while still
|
|
126
|
+
carrying an unused `Base.astro`; patching the obvious file there would have
|
|
127
|
+
produced a clean commit, a green deploy, and no tracking at all.
|
|
128
|
+
|
|
129
|
+
Cookieless, so it needs no consent banner, and `defer` keeps it off the
|
|
130
|
+
critical path.
|
|
131
|
+
|
|
90
132
|
## From the CLI instead
|
|
91
133
|
|
|
92
134
|
Useful when you want the schema without a checkout, or to inspect it while
|