@forumulate/cli 0.8.0 → 0.10.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 +11 -3
- package/dist/api/args.d.ts.map +1 -1
- package/dist/api/args.js +1 -0
- package/dist/api/args.js.map +1 -1
- package/dist/api/command.d.ts +1 -1
- package/dist/api/command.d.ts.map +1 -1
- package/dist/api/command.js +86 -11
- package/dist/api/command.js.map +1 -1
- package/dist/api/http.d.ts +8 -0
- package/dist/api/http.d.ts.map +1 -1
- package/dist/api/http.js +3 -2
- package/dist/api/http.js.map +1 -1
- package/dist/api/live-spec.d.ts +48 -0
- package/dist/api/live-spec.d.ts.map +1 -0
- package/dist/api/live-spec.js +72 -0
- package/dist/api/live-spec.js.map +1 -0
- package/dist/api/operations.json +1 -1
- package/dist/api/request.d.ts.map +1 -1
- package/dist/api/request.js +25 -1
- package/dist/api/request.js.map +1 -1
- package/dist/api/send.d.ts +10 -1
- package/dist/api/send.d.ts.map +1 -1
- package/dist/api/send.js +14 -3
- package/dist/api/send.js.map +1 -1
- package/dist/api/slim.d.ts +14 -0
- package/dist/api/slim.d.ts.map +1 -0
- package/dist/api/slim.js +174 -0
- package/dist/api/slim.js.map +1 -0
- package/dist/cache-command.d.ts +12 -0
- package/dist/cache-command.d.ts.map +1 -0
- package/dist/cache-command.js +93 -0
- package/dist/cache-command.js.map +1 -0
- package/dist/check/command.d.ts +48 -0
- package/dist/check/command.d.ts.map +1 -0
- package/dist/check/command.js +256 -0
- package/dist/check/command.js.map +1 -0
- package/dist/check/external.d.ts +66 -0
- package/dist/check/external.d.ts.map +1 -0
- package/dist/check/external.js +177 -0
- package/dist/check/external.js.map +1 -0
- package/dist/check/markdown-links.d.ts +38 -0
- package/dist/check/markdown-links.d.ts.map +1 -0
- package/dist/check/markdown-links.js +166 -0
- package/dist/check/markdown-links.js.map +1 -0
- package/dist/cli.js +42 -7
- package/dist/cli.js.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +17 -0
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +6 -2
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/groups-api.d.ts.map +1 -1
- package/dist/commands/groups-api.js +20 -2
- package/dist/commands/groups-api.js.map +1 -1
- package/dist/commands/groups-docs.d.ts.map +1 -1
- package/dist/commands/groups-docs.js +8 -2
- package/dist/commands/groups-docs.js.map +1 -1
- package/dist/commands/groups-jobs.d.ts +10 -0
- package/dist/commands/groups-jobs.d.ts.map +1 -0
- package/dist/commands/groups-jobs.js +89 -0
- package/dist/commands/groups-jobs.js.map +1 -0
- package/dist/commands/groups-org.d.ts.map +1 -1
- package/dist/commands/groups-org.js +59 -2
- package/dist/commands/groups-org.js.map +1 -1
- package/dist/commands/groups-site.d.ts.map +1 -1
- package/dist/commands/groups-site.js +47 -10
- package/dist/commands/groups-site.js.map +1 -1
- package/dist/commands/groups-spaces.d.ts.map +1 -1
- package/dist/commands/groups-spaces.js +11 -5
- package/dist/commands/groups-spaces.js.map +1 -1
- package/dist/commands/groups-types.d.ts.map +1 -1
- package/dist/commands/groups-types.js +74 -0
- package/dist/commands/groups-types.js.map +1 -1
- package/dist/commands/groups.d.ts.map +1 -1
- package/dist/commands/groups.js +2 -0
- package/dist/commands/groups.js.map +1 -1
- package/dist/commands/index.d.ts +9 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +18 -3
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/job-wait.d.ts +64 -0
- package/dist/commands/job-wait.d.ts.map +1 -0
- package/dist/commands/job-wait.js +91 -0
- package/dist/commands/job-wait.js.map +1 -0
- package/dist/commands/resource.d.ts +19 -0
- package/dist/commands/resource.d.ts.map +1 -1
- package/dist/commands/resource.js +65 -3
- package/dist/commands/resource.js.map +1 -1
- package/dist/content/library.d.ts +8 -0
- package/dist/content/library.d.ts.map +1 -1
- package/dist/content/library.js +10 -2
- package/dist/content/library.js.map +1 -1
- package/dist/credentials.d.ts +43 -4
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +67 -4
- package/dist/credentials.js.map +1 -1
- package/dist/dev/command.d.ts +41 -0
- package/dist/dev/command.d.ts.map +1 -0
- package/dist/dev/command.js +158 -0
- package/dist/dev/command.js.map +1 -0
- package/dist/doctor/address-checks.d.ts +56 -0
- package/dist/doctor/address-checks.d.ts.map +1 -0
- package/dist/doctor/address-checks.js +183 -0
- package/dist/doctor/address-checks.js.map +1 -0
- package/dist/doctor/boilerplate.d.ts +33 -0
- package/dist/doctor/boilerplate.d.ts.map +1 -0
- package/dist/doctor/boilerplate.js +78 -0
- package/dist/doctor/boilerplate.js.map +1 -0
- package/dist/doctor/command.d.ts +18 -0
- package/dist/doctor/command.d.ts.map +1 -0
- package/dist/doctor/command.js +234 -0
- package/dist/doctor/command.js.map +1 -0
- package/dist/doctor/crawl.d.ts +49 -0
- package/dist/doctor/crawl.d.ts.map +1 -0
- package/dist/doctor/crawl.js +210 -0
- package/dist/doctor/crawl.js.map +1 -0
- package/dist/doctor/extended.d.ts +52 -0
- package/dist/doctor/extended.d.ts.map +1 -0
- package/dist/doctor/extended.js +150 -0
- package/dist/doctor/extended.js.map +1 -0
- package/dist/doctor/page-checks.d.ts +42 -0
- package/dist/doctor/page-checks.d.ts.map +1 -0
- package/dist/doctor/page-checks.js +200 -0
- package/dist/doctor/page-checks.js.map +1 -0
- package/dist/doctor/probe.d.ts +63 -0
- package/dist/doctor/probe.d.ts.map +1 -0
- package/dist/doctor/probe.js +170 -0
- package/dist/doctor/probe.js.map +1 -0
- package/dist/doctor/reader-auth-atlas.d.ts +18 -0
- package/dist/doctor/reader-auth-atlas.d.ts.map +1 -0
- package/dist/doctor/reader-auth-atlas.js +50 -0
- package/dist/doctor/reader-auth-atlas.js.map +1 -0
- package/dist/doctor/robots-params.d.ts +36 -0
- package/dist/doctor/robots-params.d.ts.map +1 -0
- package/dist/doctor/robots-params.js +97 -0
- package/dist/doctor/robots-params.js.map +1 -0
- package/dist/doctor/site.d.ts +42 -0
- package/dist/doctor/site.d.ts.map +1 -0
- package/dist/doctor/site.js +82 -0
- package/dist/doctor/site.js.map +1 -0
- package/dist/doctor.d.ts +21 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +94 -3
- package/dist/doctor.js.map +1 -1
- package/dist/exit-codes.d.ts +40 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +66 -0
- package/dist/exit-codes.js.map +1 -0
- package/dist/help-commands.d.ts +13 -0
- package/dist/help-commands.d.ts.map +1 -0
- package/dist/help-commands.js +215 -0
- package/dist/help-commands.js.map +1 -0
- package/dist/help.d.ts +1 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +74 -11
- package/dist/help.js.map +1 -1
- package/dist/io.d.ts +33 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +81 -0
- package/dist/io.js.map +1 -0
- package/dist/preview-comment.d.ts +20 -0
- package/dist/preview-comment.d.ts.map +1 -0
- package/dist/preview-comment.js +88 -0
- package/dist/preview-comment.js.map +1 -0
- package/dist/publish/about.d.ts +23 -0
- package/dist/publish/about.d.ts.map +1 -0
- package/dist/publish/about.js +66 -0
- package/dist/publish/about.js.map +1 -0
- package/dist/publish/api.d.ts +30 -12
- package/dist/publish/api.d.ts.map +1 -1
- package/dist/publish/api.js +62 -10
- package/dist/publish/api.js.map +1 -1
- package/dist/publish/client.d.ts +19 -0
- package/dist/publish/client.d.ts.map +1 -0
- package/dist/publish/client.js +3 -0
- package/dist/publish/client.js.map +1 -0
- package/dist/publish/command.d.ts +51 -2
- package/dist/publish/command.d.ts.map +1 -1
- package/dist/publish/command.js +157 -17
- package/dist/publish/command.js.map +1 -1
- package/dist/publish/context.d.ts +12 -1
- package/dist/publish/context.d.ts.map +1 -1
- package/dist/publish/context.js.map +1 -1
- package/dist/publish/diff.d.ts +21 -0
- package/dist/publish/diff.d.ts.map +1 -0
- package/dist/publish/diff.js +96 -0
- package/dist/publish/diff.js.map +1 -0
- package/dist/publish/docs-apply.d.ts +8 -1
- package/dist/publish/docs-apply.d.ts.map +1 -1
- package/dist/publish/docs-apply.js +49 -10
- package/dist/publish/docs-apply.js.map +1 -1
- package/dist/publish/docs-plan.d.ts +16 -3
- package/dist/publish/docs-plan.d.ts.map +1 -1
- package/dist/publish/docs-plan.js +57 -6
- package/dist/publish/docs-plan.js.map +1 -1
- package/dist/publish/extras.d.ts +10 -0
- package/dist/publish/extras.d.ts.map +1 -1
- package/dist/publish/extras.js +54 -2
- package/dist/publish/extras.js.map +1 -1
- package/dist/publish/frontmatter.d.ts +1 -1
- package/dist/publish/frontmatter.d.ts.map +1 -1
- package/dist/publish/frontmatter.js +1 -0
- package/dist/publish/frontmatter.js.map +1 -1
- package/dist/publish/index.d.ts +12 -0
- package/dist/publish/index.d.ts.map +1 -0
- package/dist/publish/index.js +17 -0
- package/dist/publish/index.js.map +1 -0
- package/dist/publish/manifest.d.ts.map +1 -1
- package/dist/publish/manifest.js +48 -3
- package/dist/publish/manifest.js.map +1 -1
- package/dist/publish/names.d.ts +28 -0
- package/dist/publish/names.d.ts.map +1 -0
- package/dist/publish/names.js +80 -0
- package/dist/publish/names.js.map +1 -0
- package/dist/publish/posts.d.ts.map +1 -1
- package/dist/publish/posts.js +46 -13
- package/dist/publish/posts.js.map +1 -1
- package/dist/publish/preview.d.ts +56 -0
- package/dist/publish/preview.d.ts.map +1 -0
- package/dist/publish/preview.js +133 -0
- package/dist/publish/preview.js.map +1 -0
- package/dist/publish/redirects.d.ts +13 -0
- package/dist/publish/redirects.d.ts.map +1 -0
- package/dist/publish/redirects.js +154 -0
- package/dist/publish/redirects.js.map +1 -0
- package/dist/publish/reserved.d.ts +49 -0
- package/dist/publish/reserved.d.ts.map +1 -0
- package/dist/publish/reserved.js +118 -0
- package/dist/publish/reserved.js.map +1 -0
- package/dist/publish/rewrite.d.ts +12 -0
- package/dist/publish/rewrite.d.ts.map +1 -1
- package/dist/publish/rewrite.js +22 -0
- package/dist/publish/rewrite.js.map +1 -1
- package/dist/publish/scan-docs.d.ts +10 -0
- package/dist/publish/scan-docs.d.ts.map +1 -0
- package/dist/publish/scan-docs.js +160 -0
- package/dist/publish/scan-docs.js.map +1 -0
- package/dist/publish/scan.d.ts +21 -17
- package/dist/publish/scan.d.ts.map +1 -1
- package/dist/publish/scan.js +99 -232
- package/dist/publish/scan.js.map +1 -1
- package/dist/publish/slots.d.ts +39 -0
- package/dist/publish/slots.d.ts.map +1 -0
- package/dist/publish/slots.js +64 -0
- package/dist/publish/slots.js.map +1 -0
- package/dist/publish/studio-edits.d.ts +25 -0
- package/dist/publish/studio-edits.d.ts.map +1 -0
- package/dist/publish/studio-edits.js +53 -0
- package/dist/publish/studio-edits.js.map +1 -0
- package/dist/publish/tags.d.ts +9 -0
- package/dist/publish/tags.d.ts.map +1 -0
- package/dist/publish/tags.js +194 -0
- package/dist/publish/tags.js.map +1 -0
- package/dist/publish/types.d.ts +84 -1
- package/dist/publish/types.d.ts.map +1 -1
- package/dist/publish/types.js +0 -10
- package/dist/publish/types.js.map +1 -1
- package/dist/publish-command.d.ts +55 -0
- package/dist/publish-command.d.ts.map +1 -0
- package/dist/publish-command.js +197 -0
- package/dist/publish-command.js.map +1 -0
- package/dist/run.d.ts +3 -10
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +171 -112
- package/dist/run.js.map +1 -1
- package/dist/translations/target.d.ts.map +1 -1
- package/dist/translations/target.js +2 -2
- package/dist/translations/target.js.map +1 -1
- package/dist/validate.d.ts +39 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +166 -0
- package/dist/validate.js.map +1 -0
- package/dist/version.d.ts +8 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +11 -0
- package/dist/version.js.map +1 -0
- package/dist/whoami.d.ts +41 -0
- package/dist/whoami.d.ts.map +1 -0
- package/dist/whoami.js +161 -0
- package/dist/whoami.js.map +1 -0
- package/package.json +2 -2
- package/dist/publish-dir.d.ts +0 -54
- package/dist/publish-dir.d.ts.map +0 -1
- package/dist/publish-dir.js +0 -119
- package/dist/publish-dir.js.map +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VARIANT_PARAMS = void 0;
|
|
4
|
+
exports.disallowLines = disallowLines;
|
|
5
|
+
exports.linesByOrigin = linesByOrigin;
|
|
6
|
+
exports.robotsParams = robotsParams;
|
|
7
|
+
const probe_1 = require("./probe");
|
|
8
|
+
/**
|
|
9
|
+
* `robots-params`: the `Disallow` lines that keep crawlers off the re-cut
|
|
10
|
+
* addresses of a mounted space's lists (SEO spec §1, item 5).
|
|
11
|
+
*
|
|
12
|
+
* A reader page offers its sort, order, scope, period, filter, solved and
|
|
13
|
+
* range choices as GET forms, which crawlers do not submit — but an address
|
|
14
|
+
* already in a crawler's queue, a backlink, or another site's
|
|
15
|
+
* `?sort=name&order=desc` link still reaches it. Those copies say `noindex`
|
|
16
|
+
* (or name the uncut page as canonical), and are still a crawl each. The host's
|
|
17
|
+
* robots.txt is the one place that can say "do not even fetch these", and for
|
|
18
|
+
* a space mounted on somebody else's domain (`acme.com/community`) it is THEIR
|
|
19
|
+
* file — we cannot write it. So the doctor prints the lines to paste.
|
|
20
|
+
*
|
|
21
|
+
* Advisory, never a failure: a site that wants those copies crawled is making
|
|
22
|
+
* a choice. Passes once every line for this host is already in its robots.txt.
|
|
23
|
+
* Judged by HTTP alone, so it is the same for any host the doctor is pointed at.
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The query keys a reader list is re-cut by — the web reader's
|
|
27
|
+
* `VARIANT_PARAMS` (apps/web/src/lib/reader-variant-robots.ts). Never `page`
|
|
28
|
+
* (a page of a list is a document of its own) and never a search.
|
|
29
|
+
*/
|
|
30
|
+
exports.VARIANT_PARAMS = [
|
|
31
|
+
'sort',
|
|
32
|
+
'order',
|
|
33
|
+
'scope',
|
|
34
|
+
'period',
|
|
35
|
+
'window',
|
|
36
|
+
'filter',
|
|
37
|
+
'solved',
|
|
38
|
+
'range',
|
|
39
|
+
'replies',
|
|
40
|
+
'release',
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* The lines for one mount. `*` and the `?` are robots wildcards (RFC 9309 §2.2.3
|
|
44
|
+
* — Google, Bing and every major crawler read them): `/community*?*sort=` is any
|
|
45
|
+
* address under the mount whose query names `sort`, first or not.
|
|
46
|
+
*/
|
|
47
|
+
function disallowLines(mountPath) {
|
|
48
|
+
const mount = mountPath.replace(/\/+$/, '');
|
|
49
|
+
const at = mount ? `${mount}*` : '/*';
|
|
50
|
+
return exports.VARIANT_PARAMS.map((p) => `Disallow: ${at}?*${p}=`);
|
|
51
|
+
}
|
|
52
|
+
/** The roots grouped by the origin whose robots.txt would carry them. */
|
|
53
|
+
function linesByOrigin(roots) {
|
|
54
|
+
const out = new Map();
|
|
55
|
+
for (const root of roots) {
|
|
56
|
+
let u;
|
|
57
|
+
try {
|
|
58
|
+
u = new URL(root);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const list = out.get(u.origin) ?? [];
|
|
64
|
+
for (const l of disallowLines(u.pathname))
|
|
65
|
+
if (!list.includes(l))
|
|
66
|
+
list.push(l);
|
|
67
|
+
out.set(u.origin, list);
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
/** Does robots.txt already say `line` (any case, any spacing after the colon)? */
|
|
72
|
+
function has(robots, line) {
|
|
73
|
+
const want = line.replace(/^disallow:\s*/i, '').trim();
|
|
74
|
+
return robots
|
|
75
|
+
.split(/\r?\n/)
|
|
76
|
+
.some((l) => /^\s*disallow:/i.test(l) && l.replace(/^\s*disallow:\s*/i, '').trim() === want);
|
|
77
|
+
}
|
|
78
|
+
function robotsParams(roots,
|
|
79
|
+
/** The origin whose robots.txt was read. */
|
|
80
|
+
origin, robots) {
|
|
81
|
+
const title = "robots.txt keeps crawlers off a space's sorted and filtered copies";
|
|
82
|
+
const byOrigin = linesByOrigin(roots);
|
|
83
|
+
if (!byOrigin.size)
|
|
84
|
+
return (0, probe_1.check)('robots-params', title, 'skip', 'No space root to suggest lines for.', '');
|
|
85
|
+
const ownLines = byOrigin.get(origin) ?? [];
|
|
86
|
+
const missing = robots === undefined ? ownLines : ownLines.filter((l) => !has(robots, l));
|
|
87
|
+
const others = [...byOrigin].filter(([o]) => o !== origin);
|
|
88
|
+
if (!missing.length && !others.length)
|
|
89
|
+
return (0, probe_1.check)('robots-params', title, 'pass', `All ${ownLines.length} lines are in ${origin}/robots.txt.`, '');
|
|
90
|
+
const block = (o, lines) => [`# ${o}/robots.txt`, 'User-agent: *', ...lines].map((l) => ` ${l}`).join('\n');
|
|
91
|
+
const parts = [
|
|
92
|
+
...(missing.length ? [block(origin, missing)] : []),
|
|
93
|
+
...others.map(([o, lines]) => block(o, lines)),
|
|
94
|
+
];
|
|
95
|
+
return (0, probe_1.check)('robots-params', title, 'skip', `Suggested — add to the host's robots.txt (the pages already say noindex or name their canonical; this saves the crawl):\n${parts.join('\n')}`, "Every sorted, scoped or filtered copy of a list is a fetch a crawler spends instead of a page that can rank.");
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=robots-params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"robots-params.js","sourceRoot":"","sources":["../../src/doctor/robots-params.ts"],"names":[],"mappings":";;;AA4CA,sCAIC;AAGD,sCAcC;AAUD,oCA4BC;AAtGD,mCAAgC;AAEhC;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC5B,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,SAAS;IACT,SAAS;CACD,CAAC;AAEX;;;;GAIG;AAC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C,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnF,MAAM,KAAK,GAAG;QACZ,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;KAC/C,CAAC;IACF,OAAO,IAAA,aAAK,EACV,eAAe,EACf,KAAK,EACL,MAAM,EACN,4HAA4H,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAC9I,8GAA8G,CAC/G,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Http } from '../api/http';
|
|
2
|
+
import type { AddressSet } from './address-checks';
|
|
3
|
+
import type { Get } from './probe';
|
|
4
|
+
/**
|
|
5
|
+
* `doctor --site <slug|id>`: every address of every space on a site, from the API.
|
|
6
|
+
*
|
|
7
|
+
* From a URL alone the doctor sees one copy of a page. The defects that bit
|
|
8
|
+
* the integrator were in the OTHER copy — the platform address of a legal page
|
|
9
|
+
* naming itself canonical (FMU-B01) — which nobody opens because readers never
|
|
10
|
+
* get there. The API knows every address a space is served at (its
|
|
11
|
+
* `readerEndpoints`: the customer's domain first, then the platform's), so this
|
|
12
|
+
* asks it, and the checks then compare the copies.
|
|
13
|
+
*/
|
|
14
|
+
export interface ReaderEndpoint {
|
|
15
|
+
url: string;
|
|
16
|
+
kind?: string;
|
|
17
|
+
primary?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ResolvedSpace {
|
|
20
|
+
id: string;
|
|
21
|
+
/** Primary first. */
|
|
22
|
+
endpoints: ReaderEndpoint[];
|
|
23
|
+
}
|
|
24
|
+
export interface ResolvedSite {
|
|
25
|
+
id: string;
|
|
26
|
+
slug?: string;
|
|
27
|
+
name?: string;
|
|
28
|
+
spaces: ResolvedSpace[];
|
|
29
|
+
/** The address the report is run against: the first space's primary root. */
|
|
30
|
+
url?: string;
|
|
31
|
+
/** Spaces whose addresses could not be read, and why. */
|
|
32
|
+
problems: string[];
|
|
33
|
+
}
|
|
34
|
+
export declare function resolveSite(http: Http, org: string, site: string): Promise<ResolvedSite>;
|
|
35
|
+
/**
|
|
36
|
+
* The address sets the two-address check compares: each space's ROOT at every
|
|
37
|
+
* address, and one real PAGE per space — the first its sitemap lists under the
|
|
38
|
+
* primary root — mapped onto every other address by its path below the root.
|
|
39
|
+
* A root alone would miss the legal-page defect, which only pages had.
|
|
40
|
+
*/
|
|
41
|
+
export declare function addressSetsFor(get: Get, site: ResolvedSite): Promise<AddressSet[]>;
|
|
42
|
+
//# sourceMappingURL=site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../src/doctor/site.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAEnC;;;;;;;;;GASG;AAEH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,SAAS,EAAE,cAAc,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AASD,wBAAsB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAwC9F;AAID;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA2BxF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveSite = resolveSite;
|
|
4
|
+
exports.addressSetsFor = addressSetsFor;
|
|
5
|
+
const crawl_1 = require("./crawl");
|
|
6
|
+
async function resolveSite(http, org, site) {
|
|
7
|
+
const enc = encodeURIComponent;
|
|
8
|
+
const { data } = await http.send({ method: 'GET', path: `/orgs/${enc(org)}/sites` });
|
|
9
|
+
const rows = (data.sites ??
|
|
10
|
+
data.data ??
|
|
11
|
+
[]);
|
|
12
|
+
const row = rows.find((s) => s.id === site || s.slug === site);
|
|
13
|
+
if (!row) {
|
|
14
|
+
const known = rows.map((s) => s.slug ?? s.id).join(', ') || 'none';
|
|
15
|
+
throw Object.assign(new Error(`No site "${site}" in ${org}. Sites: ${known}.`), {
|
|
16
|
+
status: 404,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const spaces = [];
|
|
20
|
+
const problems = [];
|
|
21
|
+
for (const spaceId of row.spaceIds ?? []) {
|
|
22
|
+
try {
|
|
23
|
+
const res = await http.send({
|
|
24
|
+
method: 'GET',
|
|
25
|
+
path: `/orgs/${enc(org)}/spaces/${enc(spaceId)}/reader-auth`,
|
|
26
|
+
});
|
|
27
|
+
const endpoints = (res.data.readerEndpoints ?? []).filter((e) => typeof e.url === 'string' && /^https?:/.test(e.url));
|
|
28
|
+
// Primary first, whatever order the answer used.
|
|
29
|
+
endpoints.sort((a, b) => Number(!!b.primary) - Number(!!a.primary));
|
|
30
|
+
if (endpoints.length)
|
|
31
|
+
spaces.push({ id: spaceId, endpoints });
|
|
32
|
+
else
|
|
33
|
+
problems.push(`${spaceId}: no reader addresses (private, or not published)`);
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
problems.push(`${spaceId}: ${e.message}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
id: row.id,
|
|
41
|
+
slug: row.slug,
|
|
42
|
+
name: row.name,
|
|
43
|
+
spaces,
|
|
44
|
+
url: spaces[0]?.endpoints[0]?.url,
|
|
45
|
+
problems,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const trim = (u) => u.replace(/\/+$/, '');
|
|
49
|
+
/**
|
|
50
|
+
* The address sets the two-address check compares: each space's ROOT at every
|
|
51
|
+
* address, and one real PAGE per space — the first its sitemap lists under the
|
|
52
|
+
* primary root — mapped onto every other address by its path below the root.
|
|
53
|
+
* A root alone would miss the legal-page defect, which only pages had.
|
|
54
|
+
*/
|
|
55
|
+
async function addressSetsFor(get, site) {
|
|
56
|
+
const sets = [];
|
|
57
|
+
// One sitemap read per host: a site's spaces usually share one domain.
|
|
58
|
+
const urlsByOrigin = new Map();
|
|
59
|
+
for (const space of site.spaces) {
|
|
60
|
+
if (space.endpoints.length < 2)
|
|
61
|
+
continue;
|
|
62
|
+
const roots = space.endpoints.map((e) => trim(e.url));
|
|
63
|
+
const primary = roots[0];
|
|
64
|
+
sets.push({ expected: primary, urls: roots });
|
|
65
|
+
const origin = new URL(primary).origin;
|
|
66
|
+
if (!urlsByOrigin.has(origin)) {
|
|
67
|
+
const r = await get(`${origin}/robots.txt`);
|
|
68
|
+
const robots = r.ok && r.status === 200 ? r.text : '';
|
|
69
|
+
const { lists } = await (0, crawl_1.readSitemaps)(get, (0, crawl_1.sitemapsFromRobots)(robots, origin));
|
|
70
|
+
urlsByOrigin.set(origin, lists.flatMap((l) => l.urls));
|
|
71
|
+
}
|
|
72
|
+
const page = urlsByOrigin
|
|
73
|
+
.get(origin)
|
|
74
|
+
.find((u) => u.startsWith(`${primary}/`) && u.length > primary.length + 1);
|
|
75
|
+
if (!page)
|
|
76
|
+
continue;
|
|
77
|
+
const rest = page.slice(primary.length);
|
|
78
|
+
sets.push({ expected: page, urls: roots.map((r) => `${r}${rest}`) });
|
|
79
|
+
}
|
|
80
|
+
return sets;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=site.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site.js","sourceRoot":"","sources":["../../src/doctor/site.ts"],"names":[],"mappings":";;AA8CA,kCAwCC;AAUD,wCA2BC;AAzHD,mCAA2D;AA4CpD,KAAK,UAAU,WAAW,CAAC,IAAU,EAAE,GAAW,EAAE,IAAY;IACrE,MAAM,GAAG,GAAG,kBAAkB,CAAC;IAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrF,MAAM,IAAI,GAAG,CAAE,IAAgD,CAAC,KAAK;QAClE,IAA6B,CAAC,IAAI;QACnC,EAAE,CAAc,CAAC;IACnB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC/D,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,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AAG,MAAM,aAAa,CAAC,CAAC;YAC5C,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAA,oBAAY,EAAC,GAAG,EAAE,IAAA,0BAAkB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;YAC9E,YAAY,CAAC,GAAG,CACd,MAAM,EACN,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAC7B,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,YAAY;aACtB,GAAG,CAAC,MAAM,CAAE;aACZ,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/doctor.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Check } from './conformance';
|
|
2
|
+
import type { AddressSet } from './doctor/address-checks';
|
|
2
3
|
/**
|
|
3
4
|
* Everything that is wrong with a live site, from the outside.
|
|
4
5
|
*
|
|
@@ -21,7 +22,27 @@ export interface DoctorInput {
|
|
|
21
22
|
/** The API base, when it is not the same origin (defaults to the site's). */
|
|
22
23
|
apiBase?: string;
|
|
23
24
|
fetchImpl?: typeof fetch;
|
|
25
|
+
/**
|
|
26
|
+
* Only these check ids (`--only`). The single-page checks are cheap and run
|
|
27
|
+
* regardless, then are filtered; the site-wide ones (a sitemap crawl) are
|
|
28
|
+
* not started unless asked for.
|
|
29
|
+
*/
|
|
30
|
+
only?: string[];
|
|
31
|
+
/** The platform's hostname, for the white-label and two-address checks. Default forumulate.com. */
|
|
32
|
+
platformHost?: string;
|
|
33
|
+
/** The platform's API base, for the primary-address lookup. Default `https://<platformHost>/api`. */
|
|
34
|
+
platformApi?: string;
|
|
35
|
+
/** Other addresses of the same page (`--also`, or looked up by `--site`). */
|
|
36
|
+
addressSets?: AddressSet[];
|
|
37
|
+
/** The space roots to check (`--site` knows them; otherwise derived from the URL). */
|
|
38
|
+
roots?: string[];
|
|
39
|
+
/** How many sitemap URLs to sample (`--limit`). */
|
|
40
|
+
limit?: number;
|
|
41
|
+
/** Per-request timeout. */
|
|
42
|
+
timeoutMs?: number;
|
|
24
43
|
}
|
|
44
|
+
/** The single-page checks, in report order; the site-wide ones are `EXTENDED_CHECK_IDS`. */
|
|
45
|
+
export declare const BASE_CHECK_IDS: readonly ["health", "public-read", "canonical", "html-untouched", "cache-headers", "robots", "sitemap", "crawler-access", "feeds", "images"];
|
|
25
46
|
export interface DoctorReport {
|
|
26
47
|
url: string;
|
|
27
48
|
checks: Check[];
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,OAAO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
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.READER_API_SEGMENT = void 0;
|
|
3
|
+
exports.READER_API_SEGMENT = exports.BASE_CHECK_IDS = void 0;
|
|
4
4
|
exports.runDoctor = runDoctor;
|
|
5
|
+
const extended_1 = require("./doctor/extended");
|
|
6
|
+
const probe_1 = require("./doctor/probe");
|
|
7
|
+
/** The single-page checks, in report order; the site-wide ones are `EXTENDED_CHECK_IDS`. */
|
|
8
|
+
exports.BASE_CHECK_IDS = [
|
|
9
|
+
'health',
|
|
10
|
+
'public-read',
|
|
11
|
+
'canonical',
|
|
12
|
+
'html-untouched',
|
|
13
|
+
'cache-headers',
|
|
14
|
+
'robots',
|
|
15
|
+
'sitemap',
|
|
16
|
+
'crawler-access',
|
|
17
|
+
'feeds',
|
|
18
|
+
'images',
|
|
19
|
+
];
|
|
5
20
|
/** A crawler-ish UA: some CDNs answer bots differently, which is the point. */
|
|
6
21
|
const CRAWLER_UA = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
|
|
7
22
|
async function runDoctor(input) {
|
|
@@ -141,11 +156,30 @@ async function runDoctor(input) {
|
|
|
141
156
|
? 'Cloudflare Email Obfuscation is rewriting addresses on this page.'
|
|
142
157
|
: 'No rewritten email addresses.', 'The injected decoder has no CSP nonce, so it is refused and every address renders as [email protected] with a dead link. Turn Email Obfuscation off for these paths.');
|
|
143
158
|
}
|
|
144
|
-
// 5. The document is cacheable, and says so.
|
|
159
|
+
// 5. The document is cacheable, and says so — or says WHY not.
|
|
145
160
|
if (anon.ok) {
|
|
146
161
|
const cc = anon.res.headers.get('cache-control') ?? '';
|
|
147
162
|
const bad = /no-store/i.test(cc) || cc === '';
|
|
148
|
-
|
|
163
|
+
// The platform names the rule behind every reader `no-store` (FMU-B05): a
|
|
164
|
+
// gated page is meant to be uncached, an accident is not.
|
|
165
|
+
const reason = anon.res.headers.get('x-forumulate-cache-reason');
|
|
166
|
+
add('cache-headers', 'The document carries a usable Cache-Control',
|
|
167
|
+
// A gated page is reported as a skip (counted with the warnings), not a failure.
|
|
168
|
+
bad ? (reason && GATED_REASONS.has(reason) ? 'skip' : 'fail') : 'pass', `${cc || '(none)'}${reason ? ` — reason: ${reason}` : ''}`, reason && GATED_REASONS.has(reason)
|
|
169
|
+
? 'This page is gated, so it is deliberately kept out of shared caches.'
|
|
170
|
+
: 'Without one, every reader pays full origin latency and a CDN in front of it does nothing.');
|
|
171
|
+
}
|
|
172
|
+
// 5b. The page describes itself in the owner's words, not a stock sentence.
|
|
173
|
+
if (html) {
|
|
174
|
+
const description = /<meta[^>]+name=["']description["'][^>]+content=["']([^"']*)["']/i.exec(html)?.[1] ?? null;
|
|
175
|
+
const stock = description ? STOCK_DESCRIPTIONS.find((re) => re.test(description)) : undefined;
|
|
176
|
+
add('description', 'The page has a description of its own',
|
|
177
|
+
// A stock sentence is a failure; no description at all is only a warning.
|
|
178
|
+
stock ? 'fail' : description ? 'pass' : 'skip', description ?? 'No meta description.', stock
|
|
179
|
+
? 'This is a generic sentence, not one you wrote; search results and share cards show it. Set the space description (settings.seo.description) or the site tagline.'
|
|
180
|
+
: description
|
|
181
|
+
? ''
|
|
182
|
+
: 'Search engines make one up from the page. Set the space description (settings.seo.description) or the site tagline.');
|
|
149
183
|
}
|
|
150
184
|
// 6. Crawlers are let in, and told where to look.
|
|
151
185
|
const robots = await get(`${origin}/robots.txt`, { 'user-agent': CRAWLER_UA });
|
|
@@ -225,6 +259,39 @@ async function runDoctor(input) {
|
|
|
225
259
|
? ''
|
|
226
260
|
: 'A page that renders with holes in it reads as abandoned, and nothing about a 200 page says its pictures are gone.');
|
|
227
261
|
}
|
|
262
|
+
/*
|
|
263
|
+
* The site-wide checks (FMU-D14). They judge the page a reader LANDS on, so
|
|
264
|
+
* a root that redirects is followed first — the redirect itself is what
|
|
265
|
+
* `root-redirect` judges, and its throwaway body is not the page.
|
|
266
|
+
*/
|
|
267
|
+
const only = input.only?.length ? new Set(input.only) : undefined;
|
|
268
|
+
const probeGet = (0, probe_1.makeGet)({ fetchImpl: doFetch, timeoutMs: input.timeoutMs });
|
|
269
|
+
let landedUrl = site.toString();
|
|
270
|
+
let landedHtml = html;
|
|
271
|
+
if (anon.ok && anon.res.status >= 300 && anon.res.status < 400) {
|
|
272
|
+
const { final } = await (0, probe_1.follow)(probeGet, landedUrl, { accept: 'text/html' });
|
|
273
|
+
if (final.ok && final.status === 200) {
|
|
274
|
+
landedUrl = final.url;
|
|
275
|
+
landedHtml = final.text;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
const platformHost = (input.platformHost ?? extended_1.DEFAULT_PLATFORM_HOST).toLowerCase();
|
|
279
|
+
const extended = {
|
|
280
|
+
url: landedUrl,
|
|
281
|
+
requestedUrl: site.toString(),
|
|
282
|
+
html: landedHtml,
|
|
283
|
+
robots: robots.ok && robots.res.status === 200 ? robots.text : undefined,
|
|
284
|
+
get: probeGet,
|
|
285
|
+
platformHost,
|
|
286
|
+
platformApi: input.platformApi ?? `https://${platformHost}/api`,
|
|
287
|
+
addressSets: input.addressSets,
|
|
288
|
+
roots: input.roots,
|
|
289
|
+
limit: input.limit,
|
|
290
|
+
only,
|
|
291
|
+
};
|
|
292
|
+
checks.push(...(await (0, extended_1.extendedChecks)(extended)));
|
|
293
|
+
if (only)
|
|
294
|
+
checks.splice(0, checks.length, ...checks.filter((c) => only.has(c.id)));
|
|
228
295
|
return {
|
|
229
296
|
url: input.url,
|
|
230
297
|
checks,
|
|
@@ -395,4 +462,28 @@ function blocksPath(robots, pathname) {
|
|
|
395
462
|
}
|
|
396
463
|
return false;
|
|
397
464
|
}
|
|
465
|
+
/** `x-forumulate-cache-reason` values that mean "gated on purpose", not an accident. */
|
|
466
|
+
const GATED_REASONS = new Set([
|
|
467
|
+
'network-gate',
|
|
468
|
+
'status-gate',
|
|
469
|
+
'policy-gate',
|
|
470
|
+
'post-password',
|
|
471
|
+
'legal-access-link',
|
|
472
|
+
'legal-acceptance',
|
|
473
|
+
'credential-handshake',
|
|
474
|
+
]);
|
|
475
|
+
/**
|
|
476
|
+
* The stock sentences reader surfaces used to make up when a space had no
|
|
477
|
+
* description (FMU-B08). A page still carrying one is reported, so a site
|
|
478
|
+
* served by an older build, or another platform's boilerplate, is caught.
|
|
479
|
+
*/
|
|
480
|
+
const STOCK_DESCRIPTIONS = [
|
|
481
|
+
/^Guides and reference, in a nested tree\.$/,
|
|
482
|
+
/^Community discussions in .+\.$/,
|
|
483
|
+
/^The latest posts from .+\.$/,
|
|
484
|
+
/^Published documentation for .+\.$/,
|
|
485
|
+
/^Terms, privacy and the other policies that apply to .+\.$/,
|
|
486
|
+
/^Live status for .+\.$/,
|
|
487
|
+
/^Product updates and release notes for .+\.$/,
|
|
488
|
+
];
|
|
398
489
|
//# sourceMappingURL=doctor.js.map
|
package/dist/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";;;AAqCA,8BAiUC;AApUD,+EAA+E;AAC/E,MAAM,UAAU,GAAG,0EAA0E,CAAC;AAEvF,KAAK,UAAU,SAAS,CAAC,KAAkB;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC;IACzC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B;;;;;;;;;OASG;IACH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IAClD,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtD,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,MAAM,GAAG,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AAO,IAAI,CAAC;aACjF,IAAI,MAAM,IAAI,GAAG,KAAK,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;IACtF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,wFAAwF;AACxF,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,cAAc;IACd,aAAa;IACb,aAAa;IACb,eAAe;IACf,mBAAmB;IACnB,kBAAkB;IAClB,sBAAsB;CACvB,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,kBAAkB,GAAG;IACzB,4CAA4C;IAC5C,iCAAiC;IACjC,8BAA8B;IAC9B,oCAAoC;IACpC,4DAA4D;IAC5D,wBAAwB;IACxB,8CAA8C;CAC/C,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exit codes every `forumulate` command answers with (FMU-D05).
|
|
3
|
+
*
|
|
4
|
+
* A pipeline reads the exit code, not the prose. Everything used to be 0 or 1,
|
|
5
|
+
* so a CI step could not tell "the token is wrong" from "the page the manifest
|
|
6
|
+
* names is gone" from "somebody edited this in the studio" — three failures with
|
|
7
|
+
* three different fixes, one of which (auth) should page a person and two of
|
|
8
|
+
* which should not. These are documented in `forumulate help` and on every
|
|
9
|
+
* command's own `--help`; changing one is a breaking change for every script
|
|
10
|
+
* that branches on it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const EXIT: {
|
|
13
|
+
/** Done, and verified where the command verifies. */
|
|
14
|
+
readonly OK: 0;
|
|
15
|
+
/** The work ran but the result is wrong: a read-back mismatch, a doctor FAIL, a failed check. */
|
|
16
|
+
readonly FAILED: 1;
|
|
17
|
+
/** The command line itself is wrong: unknown command, missing argument, contradictory flags. */
|
|
18
|
+
readonly USAGE: 2;
|
|
19
|
+
/** No token, or the API refused the one given (401, or a 403 about the token's own scope). */
|
|
20
|
+
readonly AUTH: 3;
|
|
21
|
+
/** The org, space, page or operation named does not exist (404). */
|
|
22
|
+
readonly NOT_FOUND: 4;
|
|
23
|
+
/** The write collided with something: a 409/412, or studio edits a publish would overwrite. */
|
|
24
|
+
readonly CONFLICT: 5;
|
|
25
|
+
/** `--wait` gave up: the job was still running when `--timeout` passed (FMU-D03; `timeout(1)`'s code). */
|
|
26
|
+
readonly TIMEOUT: 124;
|
|
27
|
+
};
|
|
28
|
+
export type ExitCode = (typeof EXIT)[keyof typeof EXIT];
|
|
29
|
+
/** The block `--help` prints, so every command documents the same table. */
|
|
30
|
+
export declare const EXIT_CODES_HELP = "Exit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
31
|
+
/**
|
|
32
|
+
* The exit code an API error maps to.
|
|
33
|
+
*
|
|
34
|
+
* A 403 is auth only when it is about the CREDENTIAL (`rbac.forbidden` names
|
|
35
|
+
* the token's scope); a 403 because the user lacks a role is still "the token
|
|
36
|
+
* you gave cannot do this", which is the same fix — use another token — so both
|
|
37
|
+
* are 3. A 422 is the caller's input, so it is a usage error.
|
|
38
|
+
*/
|
|
39
|
+
export declare function exitCodeForError(e: unknown): ExitCode;
|
|
40
|
+
//# sourceMappingURL=exit-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI;IACf,qDAAqD;;IAErD,iGAAiG;;IAEjG,gGAAgG;;IAEhG,8FAA8F;;IAE9F,oEAAoE;;IAEpE,+FAA+F;;IAE/F,0GAA0G;;CAElG,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC;AAExD,4EAA4E;AAC5E,eAAO,MAAM,eAAe,qTAImD,CAAC;AAEhF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,QAAQ,CAarD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXIT_CODES_HELP = exports.EXIT = void 0;
|
|
4
|
+
exports.exitCodeForError = exitCodeForError;
|
|
5
|
+
/**
|
|
6
|
+
* The exit codes every `forumulate` command answers with (FMU-D05).
|
|
7
|
+
*
|
|
8
|
+
* A pipeline reads the exit code, not the prose. Everything used to be 0 or 1,
|
|
9
|
+
* so a CI step could not tell "the token is wrong" from "the page the manifest
|
|
10
|
+
* names is gone" from "somebody edited this in the studio" — three failures with
|
|
11
|
+
* three different fixes, one of which (auth) should page a person and two of
|
|
12
|
+
* which should not. These are documented in `forumulate help` and on every
|
|
13
|
+
* command's own `--help`; changing one is a breaking change for every script
|
|
14
|
+
* that branches on it.
|
|
15
|
+
*/
|
|
16
|
+
exports.EXIT = {
|
|
17
|
+
/** Done, and verified where the command verifies. */
|
|
18
|
+
OK: 0,
|
|
19
|
+
/** The work ran but the result is wrong: a read-back mismatch, a doctor FAIL, a failed check. */
|
|
20
|
+
FAILED: 1,
|
|
21
|
+
/** The command line itself is wrong: unknown command, missing argument, contradictory flags. */
|
|
22
|
+
USAGE: 2,
|
|
23
|
+
/** No token, or the API refused the one given (401, or a 403 about the token's own scope). */
|
|
24
|
+
AUTH: 3,
|
|
25
|
+
/** The org, space, page or operation named does not exist (404). */
|
|
26
|
+
NOT_FOUND: 4,
|
|
27
|
+
/** The write collided with something: a 409/412, or studio edits a publish would overwrite. */
|
|
28
|
+
CONFLICT: 5,
|
|
29
|
+
/** `--wait` gave up: the job was still running when `--timeout` passed (FMU-D03; `timeout(1)`'s code). */
|
|
30
|
+
TIMEOUT: 124,
|
|
31
|
+
};
|
|
32
|
+
/** The block `--help` prints, so every command documents the same table. */
|
|
33
|
+
exports.EXIT_CODES_HELP = `Exit status:
|
|
34
|
+
0 ok 1 failed (verification mismatch, doctor FAIL)
|
|
35
|
+
2 usage 3 auth (no token, 401, token not allowed)
|
|
36
|
+
4 not found 5 conflict (409/412, edited in the studio since your last publish)
|
|
37
|
+
124 --wait timed out (the job keeps running; with --wait, a failed job is 1)`;
|
|
38
|
+
/**
|
|
39
|
+
* The exit code an API error maps to.
|
|
40
|
+
*
|
|
41
|
+
* A 403 is auth only when it is about the CREDENTIAL (`rbac.forbidden` names
|
|
42
|
+
* the token's scope); a 403 because the user lacks a role is still "the token
|
|
43
|
+
* you gave cannot do this", which is the same fix — use another token — so both
|
|
44
|
+
* are 3. A 422 is the caller's input, so it is a usage error.
|
|
45
|
+
*/
|
|
46
|
+
function exitCodeForError(e) {
|
|
47
|
+
const err = e;
|
|
48
|
+
if (err && typeof err.exitCode === 'number')
|
|
49
|
+
return err.exitCode;
|
|
50
|
+
// A Cloudflare block page is the edge refusing the request before the API saw
|
|
51
|
+
// it — the token was never read, so "use another token" (3) would send a
|
|
52
|
+
// person to the wrong fix. It is a failed call (1); the message names the edge.
|
|
53
|
+
if (err?.code === 'edge.blocked')
|
|
54
|
+
return exports.EXIT.FAILED;
|
|
55
|
+
const status = err?.status;
|
|
56
|
+
if (status === 401 || status === 403)
|
|
57
|
+
return exports.EXIT.AUTH;
|
|
58
|
+
if (status === 404 || status === 410)
|
|
59
|
+
return exports.EXIT.NOT_FOUND;
|
|
60
|
+
if (status === 409 || status === 412)
|
|
61
|
+
return exports.EXIT.CONFLICT;
|
|
62
|
+
if (status === 400 || status === 422)
|
|
63
|
+
return exports.EXIT.USAGE;
|
|
64
|
+
return exports.EXIT.FAILED;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=exit-codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":";;;AA6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"forumulate publish \u2014 publish a folder of Markdown into a space\n\nUsage:\n forumulate publish <folder> --org <id|slug> --space <id|slug> [flags]\n\n (org: and space: may come from forumulate.yaml, FORUMULATE_ORG / FORUMULATE_SPACE\n or `forumulate config set` instead of the flags.)\n\n One folder per collection, front matter for titles, slugs, order and SEO, assets\n uploaded once by content hash. A re-run changes only what changed, then reads the\n space back and fails if anything did not land.\n\nFlags:\n --dry-run print the plan; write nothing (no token needed for a public space)\n --prune move pages/posts/collections with no file to the trash\n --only a,b just these slugs, files, folders, or manifest parts\n (site, theme, settings, openapi, monitors)\n --force re-send every page even if it looks unchanged, AND overwrite pages\n edited in the studio since the last publish\n --purge page|space|none\n what to drop from the cache when done (default page): page = every\n page this run changed; space = the whole space (a title in the\n navigation changed); none = leave the CDN alone. Reported per CDN.\n --no-verify skip the read-back --pace <ms> gap between writes (250)\n --manifest <file> a forumulate.yaml somewhere else\n --diff print the changed paragraphs and fields of each update\n --no-report do not record this run (publish.completed is not sent)\n --json one JSON summary: {space, created, updated, unchanged, trashed,\n purged, verify, diffUrl, runId, lines, errors}\n --out <file> write that output to a file\n --preview <name> publish nothing: send the pages this run would add or change (and\n with --prune, remove) to a preview named <name> (pr-123) and print\n its link \u2014 the space as the change would publish it, on its own\n addresses, for 7 days (previews.ttl_days). Same name again: same\n link, renewed. --json adds previews[{urls, summary, comment}].\n --preview-ttl <d> a shorter life for the preview link, in days\n --comment with --preview in CI: post the link and diff table on the pull\n request (GitHub, Gitea, GitLab, Bitbucket; GITHUB_TOKEN /\n GITEA_TOKEN / GITLAB_TOKEN / BITBUCKET_TOKEN), editing it on re-runs\n\nStudio edits: a page edited in the studio (or through the API) since this folder was\nlast published is not overwritten. The run stops before writing and prints\n CONFLICT <slug> edited in studio by <name> at <time>\nPull the change into the file, or re-run with --force to overwrite it.\n\nforumulate.yaml keys:\n org, space where to publish (one space), or\n spaces: [{path, space, create: {type, name, visibility}, rootCollection,\n theme, settings, tags, openapi: [{file|url, collection, ...}], monitors,\n redirects: [{from, to, status?, type?}] or a CSV file name,\n redirects are merged into the space's table, never replaced\n about: {...} | about.yaml (an ABOUT space's parts)}]\n site: {...} the site configuration (applied with PATCH semantics)\n theme: {...} the space theme\n Guide: https://forumulate.com/guides/content-as-code\n\nOlder forms (deprecated; they print a notice on stderr):\n publish <orgId> <spaceId> <folder> \u2192 publish <folder> --org \u2026 --space \u2026\n publish <orgId> <spaceId> <pageId> \u2192 forumulate items publish <pageId> --space \u2026\n\nExamples:\n forumulate publish docs --org acme --space docs --dry-run\n forumulate publish docs --org acme --space docs --purge space --json --out run.json\n forumulate publish docs --org acme --space docs --preview pr-123 --comment\n\nOutput (every command):\n --json the result as JSON on stdout; progress and warnings go to stderr\n --out <file> write stdout to a file instead (never truncated, exit 1 if the write fails)\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
2
|
+
export declare const SYNC_HELP = "forumulate sync \u2014 the same folder publish, plan by default\n\nUsage:\n forumulate sync <folder> [--apply] [--prune] [--diff] [--org \u2026] [--space \u2026]\n\n Without --apply it plans and writes nothing; with --apply it is `publish`.\n Takes every publish flag (--only, --force, --purge, --no-verify, --pace,\n --manifest, --json). See `forumulate publish --help` for them and the\n forumulate.yaml keys.\n\nOutput (every command):\n --json the result as JSON on stdout; progress and warnings go to stderr\n --out <file> write stdout to a file instead (never truncated, exit 1 if the write fails)\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
3
|
+
export declare const DEV_HELP = "forumulate dev \u2014 preview a folder of Markdown locally\n\nUsage:\n forumulate dev <folder> --org <id|slug> --space <id|slug> [--port 4321] [--site <url>]\n\n Renders with your space's own renderer and reloads on save. Nothing is written\n to the space.\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
4
|
+
export declare const LOGIN_HELP = "forumulate login \u2014 store a token for this API\n\nUsage:\n forumulate login [--token <pat>] (asks for it, hidden, when not given)\n\n The token is checked against the API first, then stored in\n ~/.config/forumulate/credentials.json (mode 0600), keyed by API base, so a\n staging token is never sent to production. On every later command a\n --token beats FORUMULATE_TOKEN, which beats the stored token.\n Mint a token at https://forumulate.com/account/tokens\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
5
|
+
export declare const LOGOUT_HELP = "forumulate logout \u2014 forget the stored token for this API\n\nUsage:\n forumulate logout\n\n Warns when FORUMULATE_TOKEN is still set, because it still wins.\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
6
|
+
export declare const SNAPSHOT_HELP = "forumulate snapshot \u2014 save a version snapshot of a space\n\nUsage:\n forumulate snapshot <orgId> <spaceId> <label\u2026> [--json]\n (also: forumulate snapshots --help)\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
7
|
+
export declare const CONFORMANCE_HELP = "forumulate conformance \u2014 run the Content Sync Protocol suite\n\nUsage:\n forumulate conformance <collectionUrl> [--json]\n\n Runs against any platform's collection endpoint, ours included. Exit 1 when a\n check fails.\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
8
|
+
export declare const CONTENT_HELP = "forumulate content \u2014 a content library's model as code\n\nUsage:\n forumulate content types --library <id|slug> [--org \u2026] [--out forumulate.d.ts]\n [--preview] [--schema <file>] [--check]\n forumulate content pull --library <id|slug> [--format json|payload] [--out <file>]\n forumulate content push [file] [--library \u2026] [--dry-run] [--yes] [--force]\n [--rename type.field=new | block:hero.field=new | library:field=new]\n [--rename-type old=new] [--rename-block old=new]\n\n Here --out names the file the command writes (not a stdout redirect).\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
9
|
+
export declare const IMPORT_HELP = "forumulate import \u2014 bring another CMS's content into a library\n\nUsage:\n forumulate import <payload|contentful|sanity|strapi|wordpress> <export path>\n --library <id|slug> [--org \u2026] [--dry-run] [--yes]\n [--config payload.config.ts] [--publish source|all|none]\n [--allow-model-removals] [--pace <ms>] [--base-url <url>]\n\n Always shows a dry run first; a re-run updates what a previous import made.\n\nOutput (every command):\n --json the result as JSON on stdout; progress and warnings go to stderr\n --out <file> write stdout to a file instead (never truncated, exit 1 if the write fails)\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
10
|
+
export declare const TRANSLATIONS_HELP = "forumulate translations (alias i18n) \u2014 every translation capability\n\nUsage:\n forumulate translations locales list|add|relabel|remove|set [--space \u2026|--library \u2026]\n forumulate translations status [--locale es,fr] [--fail-on missing,outdated]\n forumulate translations pull [--out translations] [--locale \u2026] [--only \u2026]\n forumulate translations push [dir] [--dry-run]\n forumulate translations auto --locale es [--state missing,outdated] [--publish]\n forumulate translations labels|overrides pull|push [file] [--format json|xliff]\n forumulate translations item-locale <itemId> <locale|none>\n forumulate translations remove <pieceId> <locale> --yes\n forumulate translations entry <entryId> <locale> [--fields f.json]\n forumulate translations name <locale> <name\u2026>\n forumulate translations switcher get|set <f.json>\n forumulate translations provider status|connect|disconnect\n\n Here --out names the folder or file the command writes.\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL)\n 2 usage 3 auth (no token, 401, token not allowed)\n 4 not found 5 conflict (409/412, edited in the studio since your last publish)\n 124 --wait timed out (the job keeps running; with --wait, a failed job is 1)";
|
|
11
|
+
/** The command → its own help. A command missing here prints the global help. */
|
|
12
|
+
export declare const COMMAND_HELP: Readonly<Record<string, string>>;
|
|
13
|
+
//# sourceMappingURL=help-commands.d.ts.map
|