@forumulate/cli 0.9.0 → 0.11.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.
Files changed (240) hide show
  1. package/README.md +3 -3
  2. package/dist/api/args.d.ts.map +1 -1
  3. package/dist/api/args.js +1 -0
  4. package/dist/api/args.js.map +1 -1
  5. package/dist/api/command.d.ts +1 -1
  6. package/dist/api/command.d.ts.map +1 -1
  7. package/dist/api/command.js +86 -11
  8. package/dist/api/command.js.map +1 -1
  9. package/dist/api/http.d.ts +8 -0
  10. package/dist/api/http.d.ts.map +1 -1
  11. package/dist/api/http.js +3 -2
  12. package/dist/api/http.js.map +1 -1
  13. package/dist/api/live-spec.d.ts +48 -0
  14. package/dist/api/live-spec.d.ts.map +1 -0
  15. package/dist/api/live-spec.js +72 -0
  16. package/dist/api/live-spec.js.map +1 -0
  17. package/dist/api/operations.json +1 -1
  18. package/dist/api/request.d.ts.map +1 -1
  19. package/dist/api/request.js +25 -1
  20. package/dist/api/request.js.map +1 -1
  21. package/dist/api/send.d.ts +10 -1
  22. package/dist/api/send.d.ts.map +1 -1
  23. package/dist/api/send.js +14 -3
  24. package/dist/api/send.js.map +1 -1
  25. package/dist/api/slim.d.ts +14 -0
  26. package/dist/api/slim.d.ts.map +1 -0
  27. package/dist/api/slim.js +174 -0
  28. package/dist/api/slim.js.map +1 -0
  29. package/dist/cache-command.d.ts +12 -0
  30. package/dist/cache-command.d.ts.map +1 -0
  31. package/dist/cache-command.js +93 -0
  32. package/dist/cache-command.js.map +1 -0
  33. package/dist/check/command.d.ts +48 -0
  34. package/dist/check/command.d.ts.map +1 -0
  35. package/dist/check/command.js +256 -0
  36. package/dist/check/command.js.map +1 -0
  37. package/dist/check/external.d.ts +66 -0
  38. package/dist/check/external.d.ts.map +1 -0
  39. package/dist/check/external.js +177 -0
  40. package/dist/check/external.js.map +1 -0
  41. package/dist/check/markdown-links.d.ts +38 -0
  42. package/dist/check/markdown-links.d.ts.map +1 -0
  43. package/dist/check/markdown-links.js +166 -0
  44. package/dist/check/markdown-links.js.map +1 -0
  45. package/dist/cli.js +42 -7
  46. package/dist/cli.js.map +1 -1
  47. package/dist/commands/completion.d.ts.map +1 -1
  48. package/dist/commands/completion.js +3 -0
  49. package/dist/commands/completion.js.map +1 -1
  50. package/dist/commands/context.d.ts.map +1 -1
  51. package/dist/commands/context.js +6 -2
  52. package/dist/commands/context.js.map +1 -1
  53. package/dist/commands/groups-api.d.ts.map +1 -1
  54. package/dist/commands/groups-api.js +20 -2
  55. package/dist/commands/groups-api.js.map +1 -1
  56. package/dist/commands/groups-docs.d.ts.map +1 -1
  57. package/dist/commands/groups-docs.js +8 -2
  58. package/dist/commands/groups-docs.js.map +1 -1
  59. package/dist/commands/groups-jobs.d.ts +10 -0
  60. package/dist/commands/groups-jobs.d.ts.map +1 -0
  61. package/dist/commands/groups-jobs.js +89 -0
  62. package/dist/commands/groups-jobs.js.map +1 -0
  63. package/dist/commands/groups-org.d.ts.map +1 -1
  64. package/dist/commands/groups-org.js +59 -2
  65. package/dist/commands/groups-org.js.map +1 -1
  66. package/dist/commands/groups-site.d.ts.map +1 -1
  67. package/dist/commands/groups-site.js +33 -3
  68. package/dist/commands/groups-site.js.map +1 -1
  69. package/dist/commands/groups-spaces.d.ts.map +1 -1
  70. package/dist/commands/groups-spaces.js +11 -5
  71. package/dist/commands/groups-spaces.js.map +1 -1
  72. package/dist/commands/groups-types.d.ts.map +1 -1
  73. package/dist/commands/groups-types.js +74 -0
  74. package/dist/commands/groups-types.js.map +1 -1
  75. package/dist/commands/groups.d.ts.map +1 -1
  76. package/dist/commands/groups.js +2 -0
  77. package/dist/commands/groups.js.map +1 -1
  78. package/dist/commands/index.d.ts +9 -0
  79. package/dist/commands/index.d.ts.map +1 -1
  80. package/dist/commands/index.js +18 -3
  81. package/dist/commands/index.js.map +1 -1
  82. package/dist/commands/job-wait.d.ts +64 -0
  83. package/dist/commands/job-wait.d.ts.map +1 -0
  84. package/dist/commands/job-wait.js +91 -0
  85. package/dist/commands/job-wait.js.map +1 -0
  86. package/dist/commands/resource.d.ts +19 -0
  87. package/dist/commands/resource.d.ts.map +1 -1
  88. package/dist/commands/resource.js +65 -3
  89. package/dist/commands/resource.js.map +1 -1
  90. package/dist/content/library.d.ts +8 -0
  91. package/dist/content/library.d.ts.map +1 -1
  92. package/dist/content/library.js +10 -2
  93. package/dist/content/library.js.map +1 -1
  94. package/dist/credentials.d.ts +43 -4
  95. package/dist/credentials.d.ts.map +1 -1
  96. package/dist/credentials.js +67 -4
  97. package/dist/credentials.js.map +1 -1
  98. package/dist/doctor/address-checks.d.ts +56 -0
  99. package/dist/doctor/address-checks.d.ts.map +1 -0
  100. package/dist/doctor/address-checks.js +183 -0
  101. package/dist/doctor/address-checks.js.map +1 -0
  102. package/dist/doctor/boilerplate.d.ts +33 -0
  103. package/dist/doctor/boilerplate.d.ts.map +1 -0
  104. package/dist/doctor/boilerplate.js +78 -0
  105. package/dist/doctor/boilerplate.js.map +1 -0
  106. package/dist/doctor/command.d.ts +18 -0
  107. package/dist/doctor/command.d.ts.map +1 -0
  108. package/dist/doctor/command.js +234 -0
  109. package/dist/doctor/command.js.map +1 -0
  110. package/dist/doctor/crawl.d.ts +49 -0
  111. package/dist/doctor/crawl.d.ts.map +1 -0
  112. package/dist/doctor/crawl.js +210 -0
  113. package/dist/doctor/crawl.js.map +1 -0
  114. package/dist/doctor/extended.d.ts +52 -0
  115. package/dist/doctor/extended.d.ts.map +1 -0
  116. package/dist/doctor/extended.js +150 -0
  117. package/dist/doctor/extended.js.map +1 -0
  118. package/dist/doctor/page-checks.d.ts +42 -0
  119. package/dist/doctor/page-checks.d.ts.map +1 -0
  120. package/dist/doctor/page-checks.js +200 -0
  121. package/dist/doctor/page-checks.js.map +1 -0
  122. package/dist/doctor/probe.d.ts +63 -0
  123. package/dist/doctor/probe.d.ts.map +1 -0
  124. package/dist/doctor/probe.js +170 -0
  125. package/dist/doctor/probe.js.map +1 -0
  126. package/dist/doctor/reader-auth-atlas.d.ts +18 -0
  127. package/dist/doctor/reader-auth-atlas.d.ts.map +1 -0
  128. package/dist/doctor/reader-auth-atlas.js +50 -0
  129. package/dist/doctor/reader-auth-atlas.js.map +1 -0
  130. package/dist/doctor/robots-params.d.ts +36 -0
  131. package/dist/doctor/robots-params.d.ts.map +1 -0
  132. package/dist/doctor/robots-params.js +97 -0
  133. package/dist/doctor/robots-params.js.map +1 -0
  134. package/dist/doctor/site.d.ts +42 -0
  135. package/dist/doctor/site.d.ts.map +1 -0
  136. package/dist/doctor/site.js +82 -0
  137. package/dist/doctor/site.js.map +1 -0
  138. package/dist/doctor.d.ts +21 -0
  139. package/dist/doctor.d.ts.map +1 -1
  140. package/dist/doctor.js +94 -3
  141. package/dist/doctor.js.map +1 -1
  142. package/dist/exit-codes.d.ts +40 -0
  143. package/dist/exit-codes.d.ts.map +1 -0
  144. package/dist/exit-codes.js +66 -0
  145. package/dist/exit-codes.js.map +1 -0
  146. package/dist/help-commands.d.ts +14 -0
  147. package/dist/help-commands.d.ts.map +1 -0
  148. package/dist/help-commands.js +264 -0
  149. package/dist/help-commands.js.map +1 -0
  150. package/dist/help.d.ts +1 -1
  151. package/dist/help.d.ts.map +1 -1
  152. package/dist/help.js +67 -11
  153. package/dist/help.js.map +1 -1
  154. package/dist/io.d.ts +33 -0
  155. package/dist/io.d.ts.map +1 -0
  156. package/dist/io.js +81 -0
  157. package/dist/io.js.map +1 -0
  158. package/dist/plan/command.d.ts +51 -0
  159. package/dist/plan/command.d.ts.map +1 -0
  160. package/dist/plan/command.js +182 -0
  161. package/dist/plan/command.js.map +1 -0
  162. package/dist/plan/document.d.ts +24 -0
  163. package/dist/plan/document.d.ts.map +1 -0
  164. package/dist/plan/document.js +208 -0
  165. package/dist/plan/document.js.map +1 -0
  166. package/dist/plan/markdown-dir.d.ts +64 -0
  167. package/dist/plan/markdown-dir.d.ts.map +1 -0
  168. package/dist/plan/markdown-dir.js +191 -0
  169. package/dist/plan/markdown-dir.js.map +1 -0
  170. package/dist/plan/output.d.ts +59 -0
  171. package/dist/plan/output.d.ts.map +1 -0
  172. package/dist/plan/output.js +102 -0
  173. package/dist/plan/output.js.map +1 -0
  174. package/dist/preview-comment.d.ts +20 -0
  175. package/dist/preview-comment.d.ts.map +1 -0
  176. package/dist/preview-comment.js +88 -0
  177. package/dist/preview-comment.js.map +1 -0
  178. package/dist/publish/about.d.ts +23 -0
  179. package/dist/publish/about.d.ts.map +1 -0
  180. package/dist/publish/about.js +66 -0
  181. package/dist/publish/about.js.map +1 -0
  182. package/dist/publish/command.d.ts +20 -0
  183. package/dist/publish/command.d.ts.map +1 -1
  184. package/dist/publish/command.js +97 -4
  185. package/dist/publish/command.js.map +1 -1
  186. package/dist/publish/context.d.ts +8 -0
  187. package/dist/publish/context.d.ts.map +1 -1
  188. package/dist/publish/context.js.map +1 -1
  189. package/dist/publish/docs-apply.d.ts.map +1 -1
  190. package/dist/publish/docs-apply.js +13 -1
  191. package/dist/publish/docs-apply.js.map +1 -1
  192. package/dist/publish/extras.d.ts +10 -0
  193. package/dist/publish/extras.d.ts.map +1 -1
  194. package/dist/publish/extras.js +54 -2
  195. package/dist/publish/extras.js.map +1 -1
  196. package/dist/publish/manifest.d.ts.map +1 -1
  197. package/dist/publish/manifest.js +27 -2
  198. package/dist/publish/manifest.js.map +1 -1
  199. package/dist/publish/preview.d.ts +56 -0
  200. package/dist/publish/preview.d.ts.map +1 -0
  201. package/dist/publish/preview.js +133 -0
  202. package/dist/publish/preview.js.map +1 -0
  203. package/dist/publish/redirects.d.ts +13 -0
  204. package/dist/publish/redirects.d.ts.map +1 -0
  205. package/dist/publish/redirects.js +154 -0
  206. package/dist/publish/redirects.js.map +1 -0
  207. package/dist/publish/scan.d.ts +2 -0
  208. package/dist/publish/scan.d.ts.map +1 -1
  209. package/dist/publish/scan.js +1 -0
  210. package/dist/publish/scan.js.map +1 -1
  211. package/dist/publish/studio-edits.d.ts +25 -0
  212. package/dist/publish/studio-edits.d.ts.map +1 -0
  213. package/dist/publish/studio-edits.js +53 -0
  214. package/dist/publish/studio-edits.js.map +1 -0
  215. package/dist/publish/types.d.ts +22 -1
  216. package/dist/publish/types.d.ts.map +1 -1
  217. package/dist/publish-command.d.ts +55 -0
  218. package/dist/publish-command.d.ts.map +1 -0
  219. package/dist/publish-command.js +197 -0
  220. package/dist/publish-command.js.map +1 -0
  221. package/dist/run.d.ts +3 -10
  222. package/dist/run.d.ts.map +1 -1
  223. package/dist/run.js +152 -120
  224. package/dist/run.js.map +1 -1
  225. package/dist/translations/target.d.ts.map +1 -1
  226. package/dist/translations/target.js +2 -2
  227. package/dist/translations/target.js.map +1 -1
  228. package/dist/validate.d.ts +39 -0
  229. package/dist/validate.d.ts.map +1 -0
  230. package/dist/validate.js +166 -0
  231. package/dist/validate.js.map +1 -0
  232. package/dist/version.d.ts +8 -0
  233. package/dist/version.d.ts.map +1 -0
  234. package/dist/version.js +11 -0
  235. package/dist/version.js.map +1 -0
  236. package/dist/whoami.d.ts +41 -0
  237. package/dist/whoami.d.ts.map +1 -0
  238. package/dist/whoami.js +161 -0
  239. package/dist/whoami.js.map +1 -0
  240. package/package.json +2 -2
package/dist/doctor.js 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
- add('cache-headers', 'The document carries a usable Cache-Control', bad ? 'fail' : 'pass', cc || '(none)', 'Without one, every reader pays full origin latency and a CDN in front of it does nothing.');
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
@@ -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,GAAG,CAAC,EAAU,EAAE,KAAa,EAAE,KAAqB,EAAE,MAAc,EAA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AAK,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":";;;AA6CA,4CAaC;AA1DD;;;;;;;;;;GAUG;AACU,QAAA,IAAI,GAAG;IAClB,qDAAqD;IACrD,EAAE,EAAE,CAAC;IACL,iGAAiG;IACjG,MAAM,EAAE,CAAC;IACT,gGAAgG;IAChG,KAAK,EAAE,CAAC;IACR,8FAA8F;IAC9F,IAAI,EAAE,CAAC;IACP,oEAAoE;IACpE,SAAS,EAAE,CAAC;IACZ,+FAA+F;IAC/F,QAAQ,EAAE,CAAC;IACX,0GAA0G;IAC1G,OAAO,EAAE,GAAG;CACJ,CAAC;AAIX,4EAA4E;AAC/D,QAAA,eAAe,GAAG;;;;+EAIgD,CAAC;AAEhF;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAAC,CAAU;IACzC,MAAM,GAAG,GAAG,CAAiE,CAAC;IAC9E,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,GAAG,CAAC,QAAoB,CAAC;IAC7E,8EAA8E;IAC9E,yEAAyE;IACzE,gFAAgF;IAChF,IAAI,GAAG,EAAE,IAAI,KAAK,cAAc;QAAE,OAAO,YAAI,CAAC,MAAM,CAAC;IACrD,MAAM,MAAM,GAAG,GAAG,EAAE,MAAM,CAAC;IAC3B,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,YAAI,CAAC,IAAI,CAAC;IACvD,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,YAAI,CAAC,SAAS,CAAC;IAC5D,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,YAAI,CAAC,QAAQ,CAAC;IAC3D,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,YAAI,CAAC,KAAK,CAAC;IACxD,OAAO,YAAI,CAAC,MAAM,CAAC;AACrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ export declare const PUBLISH_HELP = "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 PLAN_HELP = "forumulate plan / forumulate apply \u2014 one document for a whole site\n\nUsage:\n forumulate plan [forumulate.yaml] [--org <id|slug>] [--diff] [--check] [--prune] [--verbose]\n forumulate apply [forumulate.yaml] [--org <id|slug>] [--prune] [--batch <n>] [--verbose]\n\n Reads a version-2 forumulate.yaml and the Markdown folders it names, and sends it to\n PUT /orgs/{org}/manifest: plan is the dry run (the diff, nothing written), apply\n writes it. Every unit goes through the endpoint that owns it, is read back after the\n write, and is recorded, so a re-apply of the same files writes nothing and a page\n edited in the studio since the last apply shows as drift.\n\nFlags:\n --org <o> the organization (else `org:` in the file, else FORUMULATE_ORG)\n --diff plan: print each changed field, from -> to\n --check plan: exit 1 when anything would change (drift detection in CI)\n --prune also delete what this manifest created earlier and no longer\n declares \u2014 only for the kinds the file declares (pages go to the trash)\n --batch <n> apply: changed pages per request (default 20; the edge cuts a request at 30 s)\n --verbose list unchanged steps and everything left alone\n --json the API's answer (plan) or {ok, batches} (apply)\n\nforumulate.yaml (version: 2):\n version: 2\n org: acme\n spaces: [{slug, name, type, visibility, settings, theme, redirects, collections,\n locales: [{code, label}], seo: {...}, translations: {<code>: {name,\n description, seoTitle, seoDescription}}, preset, piecePreset, frontDoor,\n contactForm: {...} | file.yaml (CONTACT), about: {...} | file.yaml (ABOUT)}]\n pages: [{dir: content/docs, space: docs, collection?, locales?} a Markdown folder:\n page.md + page.es.md or es/page.md twins; front matter title, slug,\n seoTitle, seoDescription, canonicalUrl, sections, collection, order\n (or a 01- prefix), draft; sub-folders are collections\n | {space, slug, title, body, ...}] or one page inline\n sites: [{slug, name, spaces: [slugs], config: {...}, configMode: merge|replace}]\n domains, reader_auth, consent, connectors, executor, webhooks, status_monitors,\n brand, prune \u2014 as PUT /orgs/{org}/manifest documents them.\n Guide: https://forumulate.com/guides/forumulate-yaml-apply\n\nExamples:\n forumulate plan --diff\n forumulate plan --check # CI: fail when the site drifted from the repository\n forumulate apply --prune\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)";
4
+ 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)";
5
+ 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)";
6
+ 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)";
7
+ 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)";
8
+ 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)";
9
+ 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)";
10
+ 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)";
11
+ 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)";
12
+ /** The command → its own help. A command missing here prints the global help. */
13
+ export declare const COMMAND_HELP: Readonly<Record<string, string>>;
14
+ //# sourceMappingURL=help-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-commands.d.ts","sourceRoot":"","sources":["../src/help-commands.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,YAAY,+3IAmEN,CAAC;AAEpB,eAAO,MAAM,SAAS,u6BAYH,CAAC;AAEpB,eAAO,MAAM,SAAS,8iGA8CH,CAAC;AAEpB,eAAO,MAAM,QAAQ,4jBAQF,CAAC;AAEpB,eAAO,MAAM,UAAU,mxBAWJ,CAAC;AAEpB,eAAO,MAAM,WAAW,2dAOL,CAAC;AAEpB,eAAO,MAAM,aAAa,ueAMP,CAAC;AAEpB,eAAO,MAAM,gBAAgB,0hBAQV,CAAC;AAEpB,eAAO,MAAM,YAAY,i5BAYN,CAAC;AAEpB,eAAO,MAAM,WAAW,o7BAYL,CAAC;AAEpB,eAAO,MAAM,iBAAiB,gxCAkBX,CAAC;AAEpB,iFAAiF;AACjF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoBzD,CAAC"}
@@ -0,0 +1,264 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMMAND_HELP = exports.TRANSLATIONS_HELP = exports.IMPORT_HELP = exports.CONTENT_HELP = exports.CONFORMANCE_HELP = exports.SNAPSHOT_HELP = exports.LOGOUT_HELP = exports.LOGIN_HELP = exports.DEV_HELP = exports.PLAN_HELP = exports.SYNC_HELP = exports.PUBLISH_HELP = void 0;
4
+ const validate_1 = require("./validate");
5
+ const command_1 = require("./doctor/command");
6
+ const exit_codes_1 = require("./exit-codes");
7
+ const whoami_1 = require("./whoami");
8
+ const cache_command_1 = require("./cache-command");
9
+ // `forumulate check links` — its help lives beside the command it documents.
10
+ const command_2 = require("./check/command");
11
+ /**
12
+ * Each top-level command's own `--help` (FMU-B14).
13
+ *
14
+ * `publish --help` and `doctor --help` printed the global help — a page about
15
+ * everything, saying almost nothing about the command asked for: not every
16
+ * flag, not the `forumulate.yaml` keys, not the exit codes, no example. The
17
+ * resource groups always printed their own; these are the commands that did
18
+ * not. `help-commands.test.ts` walks every top-level command and fails when one
19
+ * falls back to the global page again.
20
+ */
21
+ const OUTPUT = `Output (every command):
22
+ --json the result as JSON on stdout; progress and warnings go to stderr
23
+ --out <file> write stdout to a file instead (never truncated, exit 1 if the write fails)`;
24
+ exports.PUBLISH_HELP = `forumulate publish — publish a folder of Markdown into a space
25
+
26
+ Usage:
27
+ forumulate publish <folder> --org <id|slug> --space <id|slug> [flags]
28
+
29
+ (org: and space: may come from forumulate.yaml, FORUMULATE_ORG / FORUMULATE_SPACE
30
+ or \`forumulate config set\` instead of the flags.)
31
+
32
+ One folder per collection, front matter for titles, slugs, order and SEO, assets
33
+ uploaded once by content hash. A re-run changes only what changed, then reads the
34
+ space back and fails if anything did not land.
35
+
36
+ Flags:
37
+ --dry-run print the plan; write nothing (no token needed for a public space)
38
+ --prune move pages/posts/collections with no file to the trash
39
+ --only a,b just these slugs, files, folders, or manifest parts
40
+ (site, theme, settings, openapi, monitors)
41
+ --force re-send every page even if it looks unchanged, AND overwrite pages
42
+ edited in the studio since the last publish
43
+ --purge page|space|none
44
+ what to drop from the cache when done (default page): page = every
45
+ page this run changed; space = the whole space (a title in the
46
+ navigation changed); none = leave the CDN alone. Reported per CDN.
47
+ --no-verify skip the read-back --pace <ms> gap between writes (250)
48
+ --manifest <file> a forumulate.yaml somewhere else
49
+ --diff print the changed paragraphs and fields of each update
50
+ --no-report do not record this run (publish.completed is not sent)
51
+ --json one JSON summary: {space, created, updated, unchanged, trashed,
52
+ purged, verify, diffUrl, runId, lines, errors}
53
+ --out <file> write that output to a file
54
+ --preview <name> publish nothing: send the pages this run would add or change (and
55
+ with --prune, remove) to a preview named <name> (pr-123) and print
56
+ its link — the space as the change would publish it, on its own
57
+ addresses, for 7 days (previews.ttl_days). Same name again: same
58
+ link, renewed. --json adds previews[{urls, summary, comment}].
59
+ --preview-ttl <d> a shorter life for the preview link, in days
60
+ --comment with --preview in CI: post the link and diff table on the pull
61
+ request (GitHub, Gitea, GitLab, Bitbucket; GITHUB_TOKEN /
62
+ GITEA_TOKEN / GITLAB_TOKEN / BITBUCKET_TOKEN), editing it on re-runs
63
+
64
+ Studio edits: a page edited in the studio (or through the API) since this folder was
65
+ last published is not overwritten. The run stops before writing and prints
66
+ CONFLICT <slug> edited in studio by <name> at <time>
67
+ Pull the change into the file, or re-run with --force to overwrite it.
68
+
69
+ forumulate.yaml keys:
70
+ org, space where to publish (one space), or
71
+ spaces: [{path, space, create: {type, name, visibility}, rootCollection,
72
+ theme, settings, tags, openapi: [{file|url, collection, ...}], monitors,
73
+ redirects: [{from, to, status?, type?}] or a CSV file name,
74
+ redirects are merged into the space's table, never replaced
75
+ about: {...} | about.yaml (an ABOUT space's parts)}]
76
+ site: {...} the site configuration (applied with PATCH semantics)
77
+ theme: {...} the space theme
78
+ Guide: https://forumulate.com/guides/content-as-code
79
+
80
+ Older forms (deprecated; they print a notice on stderr):
81
+ publish <orgId> <spaceId> <folder> → publish <folder> --org … --space …
82
+ publish <orgId> <spaceId> <pageId> → forumulate items publish <pageId> --space …
83
+
84
+ Examples:
85
+ forumulate publish docs --org acme --space docs --dry-run
86
+ forumulate publish docs --org acme --space docs --purge space --json --out run.json
87
+ forumulate publish docs --org acme --space docs --preview pr-123 --comment
88
+
89
+ ${OUTPUT}
90
+
91
+ ${exit_codes_1.EXIT_CODES_HELP}`;
92
+ exports.SYNC_HELP = `forumulate sync — the same folder publish, plan by default
93
+
94
+ Usage:
95
+ forumulate sync <folder> [--apply] [--prune] [--diff] [--org …] [--space …]
96
+
97
+ Without --apply it plans and writes nothing; with --apply it is \`publish\`.
98
+ Takes every publish flag (--only, --force, --purge, --no-verify, --pace,
99
+ --manifest, --json). See \`forumulate publish --help\` for them and the
100
+ forumulate.yaml keys.
101
+
102
+ ${OUTPUT}
103
+
104
+ ${exit_codes_1.EXIT_CODES_HELP}`;
105
+ exports.PLAN_HELP = `forumulate plan / forumulate apply — one document for a whole site
106
+
107
+ Usage:
108
+ forumulate plan [forumulate.yaml] [--org <id|slug>] [--diff] [--check] [--prune] [--verbose]
109
+ forumulate apply [forumulate.yaml] [--org <id|slug>] [--prune] [--batch <n>] [--verbose]
110
+
111
+ Reads a version-2 forumulate.yaml and the Markdown folders it names, and sends it to
112
+ PUT /orgs/{org}/manifest: plan is the dry run (the diff, nothing written), apply
113
+ writes it. Every unit goes through the endpoint that owns it, is read back after the
114
+ write, and is recorded, so a re-apply of the same files writes nothing and a page
115
+ edited in the studio since the last apply shows as drift.
116
+
117
+ Flags:
118
+ --org <o> the organization (else \`org:\` in the file, else FORUMULATE_ORG)
119
+ --diff plan: print each changed field, from -> to
120
+ --check plan: exit 1 when anything would change (drift detection in CI)
121
+ --prune also delete what this manifest created earlier and no longer
122
+ declares — only for the kinds the file declares (pages go to the trash)
123
+ --batch <n> apply: changed pages per request (default 20; the edge cuts a request at 30 s)
124
+ --verbose list unchanged steps and everything left alone
125
+ --json the API's answer (plan) or {ok, batches} (apply)
126
+
127
+ forumulate.yaml (version: 2):
128
+ version: 2
129
+ org: acme
130
+ spaces: [{slug, name, type, visibility, settings, theme, redirects, collections,
131
+ locales: [{code, label}], seo: {...}, translations: {<code>: {name,
132
+ description, seoTitle, seoDescription}}, preset, piecePreset, frontDoor,
133
+ contactForm: {...} | file.yaml (CONTACT), about: {...} | file.yaml (ABOUT)}]
134
+ pages: [{dir: content/docs, space: docs, collection?, locales?} a Markdown folder:
135
+ page.md + page.es.md or es/page.md twins; front matter title, slug,
136
+ seoTitle, seoDescription, canonicalUrl, sections, collection, order
137
+ (or a 01- prefix), draft; sub-folders are collections
138
+ | {space, slug, title, body, ...}] or one page inline
139
+ sites: [{slug, name, spaces: [slugs], config: {...}, configMode: merge|replace}]
140
+ domains, reader_auth, consent, connectors, executor, webhooks, status_monitors,
141
+ brand, prune — as PUT /orgs/{org}/manifest documents them.
142
+ Guide: https://forumulate.com/guides/forumulate-yaml-apply
143
+
144
+ Examples:
145
+ forumulate plan --diff
146
+ forumulate plan --check # CI: fail when the site drifted from the repository
147
+ forumulate apply --prune
148
+
149
+ ${OUTPUT}
150
+
151
+ ${exit_codes_1.EXIT_CODES_HELP}`;
152
+ exports.DEV_HELP = `forumulate dev — preview a folder of Markdown locally
153
+
154
+ Usage:
155
+ forumulate dev <folder> --org <id|slug> --space <id|slug> [--port 4321] [--site <url>]
156
+
157
+ Renders with your space's own renderer and reloads on save. Nothing is written
158
+ to the space.
159
+
160
+ ${exit_codes_1.EXIT_CODES_HELP}`;
161
+ exports.LOGIN_HELP = `forumulate login — store a token for this API
162
+
163
+ Usage:
164
+ forumulate login [--token <pat>] (asks for it, hidden, when not given)
165
+
166
+ The token is checked against the API first, then stored in
167
+ ~/.config/forumulate/credentials.json (mode 0600), keyed by API base, so a
168
+ staging token is never sent to production. On every later command a
169
+ --token beats FORUMULATE_TOKEN, which beats the stored token.
170
+ Mint a token at https://forumulate.com/account/tokens
171
+
172
+ ${exit_codes_1.EXIT_CODES_HELP}`;
173
+ exports.LOGOUT_HELP = `forumulate logout — forget the stored token for this API
174
+
175
+ Usage:
176
+ forumulate logout
177
+
178
+ Warns when FORUMULATE_TOKEN is still set, because it still wins.
179
+
180
+ ${exit_codes_1.EXIT_CODES_HELP}`;
181
+ exports.SNAPSHOT_HELP = `forumulate snapshot — save a version snapshot of a space
182
+
183
+ Usage:
184
+ forumulate snapshot <orgId> <spaceId> <label…> [--json]
185
+ (also: forumulate snapshots --help)
186
+
187
+ ${exit_codes_1.EXIT_CODES_HELP}`;
188
+ exports.CONFORMANCE_HELP = `forumulate conformance — run the Content Sync Protocol suite
189
+
190
+ Usage:
191
+ forumulate conformance <collectionUrl> [--json]
192
+
193
+ Runs against any platform's collection endpoint, ours included. Exit 1 when a
194
+ check fails.
195
+
196
+ ${exit_codes_1.EXIT_CODES_HELP}`;
197
+ exports.CONTENT_HELP = `forumulate content — a content library's model as code
198
+
199
+ Usage:
200
+ forumulate content types --library <id|slug> [--org …] [--out forumulate.d.ts]
201
+ [--preview] [--schema <file>] [--check]
202
+ forumulate content pull --library <id|slug> [--format json|payload] [--out <file>]
203
+ forumulate content push [file] [--library …] [--dry-run] [--yes] [--force]
204
+ [--rename type.field=new | block:hero.field=new | library:field=new]
205
+ [--rename-type old=new] [--rename-block old=new]
206
+
207
+ Here --out names the file the command writes (not a stdout redirect).
208
+
209
+ ${exit_codes_1.EXIT_CODES_HELP}`;
210
+ exports.IMPORT_HELP = `forumulate import — bring another CMS's content into a library
211
+
212
+ Usage:
213
+ forumulate import <payload|contentful|sanity|strapi|wordpress> <export path>
214
+ --library <id|slug> [--org …] [--dry-run] [--yes]
215
+ [--config payload.config.ts] [--publish source|all|none]
216
+ [--allow-model-removals] [--pace <ms>] [--base-url <url>]
217
+
218
+ Always shows a dry run first; a re-run updates what a previous import made.
219
+
220
+ ${OUTPUT}
221
+
222
+ ${exit_codes_1.EXIT_CODES_HELP}`;
223
+ exports.TRANSLATIONS_HELP = `forumulate translations (alias i18n) — every translation capability
224
+
225
+ Usage:
226
+ forumulate translations locales list|add|relabel|remove|set [--space …|--library …]
227
+ forumulate translations status [--locale es,fr] [--fail-on missing,outdated]
228
+ forumulate translations pull [--out translations] [--locale …] [--only …]
229
+ forumulate translations push [dir] [--dry-run]
230
+ forumulate translations auto --locale es [--state missing,outdated] [--publish]
231
+ forumulate translations labels|overrides pull|push [file] [--format json|xliff]
232
+ forumulate translations item-locale <itemId> <locale|none>
233
+ forumulate translations remove <pieceId> <locale> --yes
234
+ forumulate translations entry <entryId> <locale> [--fields f.json]
235
+ forumulate translations name <locale> <name…>
236
+ forumulate translations switcher get|set <f.json>
237
+ forumulate translations provider status|connect|disconnect
238
+
239
+ Here --out names the folder or file the command writes.
240
+
241
+ ${exit_codes_1.EXIT_CODES_HELP}`;
242
+ /** The command → its own help. A command missing here prints the global help. */
243
+ exports.COMMAND_HELP = {
244
+ publish: exports.PUBLISH_HELP,
245
+ sync: exports.SYNC_HELP,
246
+ dev: exports.DEV_HELP,
247
+ doctor: command_1.DOCTOR_HELP,
248
+ validate: validate_1.VALIDATE_HELP,
249
+ login: exports.LOGIN_HELP,
250
+ logout: exports.LOGOUT_HELP,
251
+ whoami: whoami_1.WHOAMI_HELP,
252
+ auth: whoami_1.WHOAMI_HELP,
253
+ cache: cache_command_1.CACHE_HELP,
254
+ snapshot: exports.SNAPSHOT_HELP,
255
+ conformance: exports.CONFORMANCE_HELP,
256
+ content: exports.CONTENT_HELP,
257
+ import: exports.IMPORT_HELP,
258
+ translations: exports.TRANSLATIONS_HELP,
259
+ i18n: exports.TRANSLATIONS_HELP,
260
+ check: command_2.CHECK_HELP,
261
+ plan: exports.PLAN_HELP,
262
+ apply: exports.PLAN_HELP,
263
+ };
264
+ //# sourceMappingURL=help-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-commands.js","sourceRoot":"","sources":["../src/help-commands.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAC3C,8CAA+C;AAC/C,6CAA+C;AAC/C,qCAAuC;AACvC,mDAA6C;AAC7C,6EAA6E;AAC7E,6CAAiE;AAEjE;;;;;;;;;GASG;AACH,MAAM,MAAM,GAAG;;8FAE+E,CAAC;AAElF,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiE1B,MAAM;;EAEN,4BAAe,EAAE,CAAC;AAEP,QAAA,SAAS,GAAG;;;;;;;;;;EAUvB,MAAM;;EAEN,4BAAe,EAAE,CAAC;AAEP,QAAA,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CvB,MAAM;;EAEN,4BAAe,EAAE,CAAC;AAEP,QAAA,QAAQ,GAAG;;;;;;;;EAQtB,4BAAe,EAAE,CAAC;AAEP,QAAA,UAAU,GAAG;;;;;;;;;;;EAWxB,4BAAe,EAAE,CAAC;AAEP,QAAA,WAAW,GAAG;;;;;;;EAOzB,4BAAe,EAAE,CAAC;AAEP,QAAA,aAAa,GAAG;;;;;;EAM3B,4BAAe,EAAE,CAAC;AAEP,QAAA,gBAAgB,GAAG;;;;;;;;EAQ9B,4BAAe,EAAE,CAAC;AAEP,QAAA,YAAY,GAAG;;;;;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