@taprootio/site-authoring 0.6.2 → 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 +103 -10
- package/package.json +2 -2
- package/src/api.js +281 -61
- package/src/cli.js +73 -26
- package/src/constants.js +2 -1
- package/src/content/components.js +7 -33
- package/src/content/free-form-section-registry.json +4 -2
- package/src/content/inline-facts.js +6 -0
- package/src/content/tiptap-prosemirror.ts +22 -16
- package/src/content/vocabulary.js +6 -2
- package/src/errors.js +27 -0
- package/src/fixture-contract.js +4 -4
- package/src/fixture-init.js +231 -0
- package/src/output.js +12 -2
- package/src/reference-help.js +139 -89
- package/src/settings-catalog.js +1 -0
- package/src/staging-check.js +145 -0
- package/src/theme-validation.js +31 -12
- package/src/transport.js +12 -3
- package/src/verbs/deploy.js +35 -101
- package/src/verbs/index.js +4 -1
- package/src/verbs/pull.js +22 -5
- package/src/verbs/redirects-check.js +18 -0
- package/src/verbs/status.js +34 -17
- package/src/verbs/theme-push.js +44 -9
- package/src/verbs/validate.js +51 -12
package/README.md
CHANGED
|
@@ -38,8 +38,9 @@ resolve a different contract than the CLI was tested against.
|
|
|
38
38
|
|
|
39
39
|
Taproot accepts only the latest published release of this package. There is no
|
|
40
40
|
compatibility window: the contract moves with every release, and a CLI behind
|
|
41
|
-
the current one is refused at sign-in
|
|
42
|
-
the sign-in for a site credential, before it
|
|
41
|
+
the current one is refused at sign-in, at `sites`/`use` site listing, and at
|
|
42
|
+
every online verb that exchanges the sign-in for a site credential, before it
|
|
43
|
+
validates or writes anything.
|
|
43
44
|
`TAPROOT_SITE_KEY` runs perform no sign-in and no exchange, so they are not
|
|
44
45
|
version-gated and their `status` reports `cliRelease.latestKnown: false`; keep
|
|
45
46
|
an automation's CLI current yourself.
|
|
@@ -51,8 +52,11 @@ npm install -g @taprootio/site-authoring@latest
|
|
|
51
52
|
A refusal names the field `CliUpgradeRequired`, classifies as
|
|
52
53
|
`refusal: "cli_outdated"`, and carries both versions and that command. Nothing
|
|
53
54
|
is wrong with the credential, the request, or the site, and no retry of an
|
|
54
|
-
outdated version succeeds.
|
|
55
|
-
|
|
55
|
+
outdated version succeeds. The API puts the versions and remedy in both the
|
|
56
|
+
status message and the stable field detail. Legacy 0.2.0 ignores those messages
|
|
57
|
+
and prints only `CliUpgradeRequired`; if that is all you see, run the upgrade
|
|
58
|
+
command above. If the newer release is only minutes old, npm may not serve it
|
|
59
|
+
yet — wait a moment and run the upgrade again.
|
|
56
60
|
|
|
57
61
|
Each sign-in exchange also reports the latest published release. `status` shows
|
|
58
62
|
it as `cliRelease`, `whoami` reports what the last exchange recorded (dated with
|
|
@@ -184,11 +188,11 @@ explicitly and bypasses discovery. `login`, `logout`, `sites`, `use`,
|
|
|
184
188
|
}
|
|
185
189
|
```
|
|
186
190
|
|
|
187
|
-
| Field | Rule
|
|
188
|
-
| --------------- |
|
|
189
|
-
| `configVersion` | Must be `1`.
|
|
190
|
-
| `siteId` | Optional. The canonical lowercase UUID of the site the next command writes to. `use` writes it; a present but malformed value is refused.
|
|
191
|
-
| `workspaceDir` | Required. A relative POSIX path beneath the configuration directory that `pull` writes into. Every existing segment must be a real directory.
|
|
191
|
+
| Field | Rule |
|
|
192
|
+
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
193
|
+
| `configVersion` | Must be `1`. |
|
|
194
|
+
| `siteId` | Optional. The canonical lowercase UUID of the site the next command writes to. `use` writes it; a present but malformed value is refused. |
|
|
195
|
+
| `workspaceDir` | Required. A relative POSIX path beneath the configuration directory that `pull` writes into. Every existing segment must be a real directory. |
|
|
192
196
|
|
|
193
197
|
The file is a small, closed JSON object. Unknown fields, duplicate keys, links
|
|
194
198
|
in the path, and unsupported versions are refused before any credential is
|
|
@@ -265,7 +269,14 @@ for another. The handoff also expires two minutes after it is minted;
|
|
|
265
269
|
It stages; nothing reaches an audience until `deploy --staging` publishes the
|
|
266
270
|
candidate and `deploy --production` promotes that completed staging
|
|
267
271
|
deployment. `status` reports the platform authoring switch, the CLI release,
|
|
268
|
-
deployments, readiness, and
|
|
272
|
+
deployments, readiness, image processing, and broken references under Content
|
|
273
|
+
permission. `brokenReferences` names affected pages and their missing image IDs
|
|
274
|
+
or internal page paths in the latest editable bodies. It reports `covered: true`,
|
|
275
|
+
`totalPages`, and `pages`; an empty report means no missing targets were found.
|
|
276
|
+
Output is bounded to 50 pages and 50 targets of each kind per page, with explicit
|
|
277
|
+
`pagesTruncated`, `missingImageIdsTruncated`, or `missingPagePathsTruncated` flags.
|
|
278
|
+
A denied, malformed, or failed read fails `status` instead of implying a clean
|
|
279
|
+
site.
|
|
269
280
|
|
|
270
281
|
## Output contract
|
|
271
282
|
|
|
@@ -336,3 +347,85 @@ The package's tests run in both places. A few compare this package against
|
|
|
336
347
|
sources that live only in the private monorepo — the canonical renderer, the
|
|
337
348
|
shared section registry, the seeded default theme, and the API's contracts —
|
|
338
349
|
and those skip by name in the public tree rather than pretending to pass.
|
|
350
|
+
|
|
351
|
+
### Content corrections in 0.7.0
|
|
352
|
+
|
|
353
|
+
CTA buttons accept the same safe destinations as hero actions, including `tel:`,
|
|
354
|
+
`mailto:`, fragments, queries, and relative paths. New page content rejects empty
|
|
355
|
+
contact destinations and the `tel://`/`mailto://` authority forms, consistently
|
|
356
|
+
with navigation and footer validation. Previously stored page links retain their
|
|
357
|
+
rendering behavior.
|
|
358
|
+
|
|
359
|
+
Inline-fact values support LF/CRLF line breaks (including inside their link),
|
|
360
|
+
and reading order is value then label. Unicode spaces and tabs remain valid.
|
|
361
|
+
Other C0/C1 controls, U+2028/U+2029, U+FEFF, and literal `<br>` tags are rejected
|
|
362
|
+
with the exact fact field path. A label is optional and stays outside the value's link. See
|
|
363
|
+
`taproot-site help page free-form` and `taproot-site help component cta`.
|
|
364
|
+
|
|
365
|
+
### Staging verification and deployment evidence
|
|
366
|
+
|
|
367
|
+
`deploy --staging` selects the same changed pages, settings groups and navigation
|
|
368
|
+
as the Deployments page. `status` checks that exact current candidate, so a
|
|
369
|
+
completed CLI stage counts as successful until that candidate changes.
|
|
370
|
+
|
|
371
|
+
A retained failed preview of selected page content refuses deployment as
|
|
372
|
+
`deploy.preview_failed`, naming the page and snapshot. Render a new successful
|
|
373
|
+
preview or change the content; `--allow-failed-preview` is the explicit override.
|
|
374
|
+
Pending retries do not erase known failure. Previews remain optional. Expired
|
|
375
|
+
snapshots removed by normal cleanup and legacy snapshots without a candidate
|
|
376
|
+
fingerprint supply no gating evidence. Typed preview failure diagnostics contain
|
|
377
|
+
only error class and known page/node/attribute labels, never renderer messages.
|
|
378
|
+
|
|
379
|
+
Staging deploys check the current redirect map through the real staging edge.
|
|
380
|
+
Run `taproot-site redirects check` to repeat after eventual edge propagation.
|
|
381
|
+
The Node CLI consumes a separate handoff, retains its short staging cookie in
|
|
382
|
+
memory, and requests each map path without following redirects. Results report
|
|
383
|
+
path, HTTP status and Location; `verified` requires all entries to match and the
|
|
384
|
+
map revision to remain unchanged. A mismatch is evidence to investigate, not a
|
|
385
|
+
failed deployment. Checks describe the current map, not a historical release.
|
|
386
|
+
Requests have a 90-second deadline with eight concurrent requests; large JSON
|
|
387
|
+
lists have explicit truncation, prioritizing failures. Human output reports each
|
|
388
|
+
entry. A gate/transport failure never counts as verified.
|
|
389
|
+
|
|
390
|
+
`stagingPreview.url` is a fresh single-use two-minute handoff minted **after**
|
|
391
|
+
checks. Opening it consumes it and establishes a five-minute staging cookie.
|
|
392
|
+
Minting again replaces the same authority's previous handoff and cookie. Current
|
|
393
|
+
site, host and credential permission are rechecked; key revocation stops access.
|
|
394
|
+
Treat the URL as secret: it is returned only in final JSON, omitted from progress
|
|
395
|
+
and `GITHUB_OUTPUT`. The same Actions exclusion applies to `preview page` URLs.
|
|
396
|
+
|
|
397
|
+
Deployment results carry `phaseTimings`. New deployments retain up to 32 durable
|
|
398
|
+
server-observed phase transitions, including repeated phases on retry. Durations
|
|
399
|
+
are calculated only between recorded transitions. `truncated` marks missing
|
|
400
|
+
older history; `known: false` marks legacy rows. CLI polling never invents phase
|
|
401
|
+
timestamps. Progress reports the same recorded timestamps and durations.
|
|
402
|
+
|
|
403
|
+
### Export a pulled workspace as an offline fixture
|
|
404
|
+
|
|
405
|
+
From a pulled workspace (or its configured project), run:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
taproot-site validate --init ../authoring-fixture
|
|
409
|
+
taproot-site validate ../authoring-fixture
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
The destination must be new, outside the source workspace, and its parent must exist. Use
|
|
413
|
+
`taproot-site --config path/to/taproot-site.json validate --init ../authoring-fixture`
|
|
414
|
+
to select another source configuration. Initialization needs no credential or
|
|
415
|
+
network. It exports editable free-form pages as ProseMirror with navigation,
|
|
416
|
+
redirects, settings, and version-6 appearance/footer metadata, validates the
|
|
417
|
+
result, and leaves the source unchanged. Excluded metadata/read-only pages are
|
|
418
|
+
counted; unresolved references to them fail validation.
|
|
419
|
+
|
|
420
|
+
Exported UUIDs and HTTP(S) origins are deterministic fixture values under
|
|
421
|
+
`example.test`; URL credentials, query strings and fragments are removed.
|
|
422
|
+
Configuration, credential files, internal state and deployment receipts are
|
|
423
|
+
excluded. Authored prose remains. Exports are bounded to 64 MiB, and a failed
|
|
424
|
+
validation removes the new output directory.
|
|
425
|
+
|
|
426
|
+
Required settings omissions are collected in `error.details` with field paths
|
|
427
|
+
and the `taproot-site pull` remedy. Present-but-invalid settings keep their
|
|
428
|
+
value errors. Pull reports `pages.revisionsRecordedWithoutBodyComparison` and a
|
|
429
|
+
human notice when it adopts first revisions without a completed body comparison.
|
|
430
|
+
The count excludes new downloads, established revisions and compared bodies;
|
|
431
|
+
it is not a claim that an adopted Markdown source matches the site.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taprootio/site-authoring",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Taproot site authoring CLI: sign in once in the browser, then pull, validate, push, preview, approve, and deploy a site from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "ISC",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@taprootio/espalier": "4.
|
|
31
|
+
"@taprootio/espalier": "4.11.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"test": "node --test",
|