@taprootio/site-authoring 0.27.0 → 0.27.1
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/package.json +1 -1
- package/src/changelog.json +11 -0
- package/src/reference-help.js +4 -2
- package/src/site-checks.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taprootio/site-authoring",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.1",
|
|
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",
|
package/src/changelog.json
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0.27.1",
|
|
5
|
+
"note": "The site checks refuse a page or redirect source named like a search-engine key file, which the platform now publishes at the site root.",
|
|
6
|
+
"behavior": [
|
|
7
|
+
"A redirect source whose first segment is 32 lowercase hexadecimal characters followed by .txt (any capitals, with or without a path beneath it) is refused with redirect.source_generated_file, like sitemap.xml and robots.txt. Taproot writes a file with that name at the root of a site that tells search engines about its releases, so nothing else can sit there. No command changed.",
|
|
8
|
+
"The help reference version is 45."
|
|
9
|
+
],
|
|
10
|
+
"help": [
|
|
11
|
+
"redirects"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
3
14
|
{
|
|
4
15
|
"version": "0.27.0",
|
|
5
16
|
"note": "Embedded forms inherit configurable background, border and shadow defaults from the site, with per-form overrides.",
|
package/src/reference-help.js
CHANGED
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
|
|
96
96
|
export { getAppearanceReference, getFooterReference, getSettingsReference, getThemeReference };
|
|
97
97
|
|
|
98
|
-
export const REFERENCE_VERSION =
|
|
98
|
+
export const REFERENCE_VERSION = 45;
|
|
99
99
|
|
|
100
100
|
// The date-limit examples `help forms` prints; tests run them through the form validator.
|
|
101
101
|
export const FORM_DATE_WINDOW_FIELD = Object.freeze({
|
|
@@ -786,7 +786,9 @@ const WORKFLOW_REFERENCES = Object.freeze({
|
|
|
786
786
|
+ "check does not see may belong to a release the edge has not switched to yet; deploy --staging waits for "
|
|
787
787
|
+ "staging to serve the new release and reports stagingServed.",
|
|
788
788
|
"A source cannot name a file the site generates: '/index.html' or any page's own 'index.html', '/404.html', "
|
|
789
|
-
+ "'/sitemap.xml', '/robots.txt', '/favicon.ico',
|
|
789
|
+
+ "'/sitemap.xml', '/robots.txt', '/favicon.ico', a path under the sitemap or robots names, or the "
|
|
790
|
+
+ "search-engine key file Taproot publishes when a site tells search engines about its releases (32 "
|
|
791
|
+
+ "lowercase hexadecimal characters followed by '.txt', in any capitals). Nothing under "
|
|
790
792
|
+ "'/taproot/<version>/' (for example '/taproot/5.0.62/manifest.json') can be a source either: the platform "
|
|
791
793
|
+ "serves the published-site runtime there before any redirect. The platform "
|
|
792
794
|
+ "already redirects every '…/index.html' address to its directory, so no entry is needed for one. A source "
|
package/src/site-checks.js
CHANGED
|
@@ -280,6 +280,8 @@ export function normalizeRedirectPath(value) {
|
|
|
280
280
|
return trimmed === "" ? "/" : trimmed;
|
|
281
281
|
}
|
|
282
282
|
const GENERATED_ROOT_FILES = ["404.html", "sitemap.xml", "robots.txt", "favicon.ico"];
|
|
283
|
+
// The IndexNow key file (TR01304) is named by a pattern, so it cannot join the list above.
|
|
284
|
+
const INDEX_NOW_KEY_FILE = /^[a-f0-9]{32}\.txt$/u;
|
|
283
285
|
const INTEGRATION_DATA_ROOT = "integrations";
|
|
284
286
|
const MAX_MARKER_SEGMENT_BYTES = 200;
|
|
285
287
|
const MAX_OUTPUT_PATH_LENGTH = 1_024;
|
|
@@ -317,8 +319,9 @@ export function redirectSourceRule(edgePath) {
|
|
|
317
319
|
return refuse(RULE_REDIRECT_SOURCE_INTEGRATION_DATA);
|
|
318
320
|
if (isRuntimeMirrorPath(decoded))
|
|
319
321
|
return refuse(RULE_REDIRECT_SOURCE_RUNTIME_MIRROR);
|
|
320
|
-
if (GENERATED_ROOT_FILES.includes(first.toLowerCase()))
|
|
322
|
+
if (GENERATED_ROOT_FILES.includes(first.toLowerCase()) || INDEX_NOW_KEY_FILE.test(first.toLowerCase())) {
|
|
321
323
|
return refuse(RULE_REDIRECT_SOURCE_GENERATED_FILE);
|
|
324
|
+
}
|
|
322
325
|
if (!isStorable(decoded))
|
|
323
326
|
return refuse(RULE_REDIRECT_SOURCE_NOT_STORABLE);
|
|
324
327
|
return undefined;
|