@taprootio/site-authoring 0.8.3 → 0.8.5
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 +85 -3
- package/examples/riverbend-wellness/settings/taproot-styles.json +2 -188
- package/package.json +2 -2
- package/src/api.js +35 -0
- package/src/cli.js +126 -5
- package/src/constants.js +8 -1
- package/src/content/components.js +18 -2
- package/src/content/tiptap-prosemirror.ts +23 -2
- package/src/delivery-browser.js +276 -0
- package/src/delivery-check.js +821 -0
- package/src/errors.js +12 -1
- package/src/presentation-reference.js +110 -11
- package/src/reference-help.js +122 -4
- package/src/settings-catalog.js +14 -1
- package/src/staging-check.js +9 -0
- package/src/theme-projection.js +213 -0
- package/src/theme-validation.js +64 -4
- package/src/verbs/delivery-check.js +185 -0
- package/src/verbs/deploy.js +72 -3
- package/src/verbs/index.js +6 -0
- package/src/verbs/preview-revoke.js +2 -2
- package/src/verbs/staging-review.js +29 -0
- package/src/verbs/theme-push.js +3 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { mintStagingPreviewHandoff, withRefusalGuidance } from "../api.js";
|
|
2
|
+
import { VERB_STAGING_REVIEW } from "../constants.js";
|
|
3
|
+
import { openSession, successResult } from "../session.js";
|
|
4
|
+
|
|
5
|
+
export const STAGING_REVIEW_GUIDANCE = "Open the URL once in a browser, then switch the site's theme toggle between "
|
|
6
|
+
+ "light and dark to review both schemes; no page draft is needed to review a presentation change.";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* `staging review` — mint a fresh single-use review handoff for the site's
|
|
10
|
+
* acknowledged staging host, and nothing else (TR00800 follow-up).
|
|
11
|
+
*
|
|
12
|
+
* It is the recovery `deploy --staging` names when it could not mint one,
|
|
13
|
+
* and the only such path a managed Docs site can take: `redirects check`
|
|
14
|
+
* inspects a redirect map the Docs shell does not have and needs the
|
|
15
|
+
* Standard surface. Minting is read-only for the site: the handoff is a
|
|
16
|
+
* short-lived capability bound to the current host, reported only in the
|
|
17
|
+
* final JSON and never in progress or GITHUB_OUTPUT.
|
|
18
|
+
*/
|
|
19
|
+
export async function stagingReview(invocation) {
|
|
20
|
+
const { client, siteId, now, onProgress } = await openSession(invocation);
|
|
21
|
+
return await withRefusalGuidance(onProgress, "staging review", async () => {
|
|
22
|
+
onProgress("Minting a fresh single-use staging review handoff.");
|
|
23
|
+
const handoff = await mintStagingPreviewHandoff(client, siteId, { now });
|
|
24
|
+
onProgress(`Staging review handoff minted for ${handoff.stagingUrl}. ${STAGING_REVIEW_GUIDANCE}`);
|
|
25
|
+
return successResult(VERB_STAGING_REVIEW, siteId, {
|
|
26
|
+
stagingPreview: { ...handoff, review: STAGING_REVIEW_GUIDANCE },
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
package/src/verbs/theme-push.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
footerColorOverlay,
|
|
7
7
|
} from "../appearance-contract.js";
|
|
8
8
|
import { VERB_THEME_PUSH } from "../constants.js";
|
|
9
|
-
import { SiteAuthoringError } from "../errors.js";
|
|
9
|
+
import { MISSING_SETTING_MESSAGE, SiteAuthoringError } from "../errors.js";
|
|
10
10
|
import { projectFooterSettingsForWorkspace } from "../footer-contract.js";
|
|
11
11
|
import { computeFooterDraftHash } from "../footer-draft-hash.js";
|
|
12
12
|
import {
|
|
@@ -122,13 +122,13 @@ export async function validateThemeWorkspace(workspaceDir, siteId, knownImageIds
|
|
|
122
122
|
if (missing.length > 0) {
|
|
123
123
|
throw new SiteAuthoringError(
|
|
124
124
|
"theme.settings_missing",
|
|
125
|
-
"Required settings keys are
|
|
125
|
+
"Required settings keys are absent from this workspace. Restore them locally, or run 'taproot-site pull' if the workspace is stale; a fresh pull that still omits them means the server projection is incomplete for the listed paths.",
|
|
126
126
|
{
|
|
127
127
|
field: missing[0],
|
|
128
128
|
details: missing.map((field) => ({
|
|
129
129
|
code: "theme.setting_missing",
|
|
130
130
|
field,
|
|
131
|
-
message:
|
|
131
|
+
message: MISSING_SETTING_MESSAGE,
|
|
132
132
|
})),
|
|
133
133
|
},
|
|
134
134
|
);
|