@forumulate/cli 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api/command.d.ts +1 -1
- package/dist/api/command.d.ts.map +1 -1
- package/dist/api/command.js +1 -1
- package/dist/api/http.d.ts +6 -1
- package/dist/api/http.d.ts.map +1 -1
- package/dist/api/http.js +7 -1
- package/dist/api/http.js.map +1 -1
- package/dist/api/operations.json +1 -1
- package/dist/api/rows.d.ts +2 -0
- package/dist/api/rows.d.ts.map +1 -0
- package/dist/api/rows.js +9 -0
- package/dist/api/rows.js.map +1 -0
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +2 -0
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/job-wait.d.ts +2 -2
- package/dist/commands/job-wait.js +2 -2
- package/dist/content/library.d.ts +0 -9
- package/dist/content/library.d.ts.map +1 -1
- package/dist/content/library.js +12 -2
- package/dist/content/library.js.map +1 -1
- package/dist/help-commands.d.ts +1 -0
- package/dist/help-commands.d.ts.map +1 -1
- package/dist/help-commands.js +50 -1
- package/dist/help-commands.js.map +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +11 -1
- package/dist/help.js.map +1 -1
- package/dist/import/media.d.ts.map +1 -1
- package/dist/import/media.js +2 -1
- package/dist/import/media.js.map +1 -1
- package/dist/plan/command.d.ts +51 -0
- package/dist/plan/command.d.ts.map +1 -0
- package/dist/plan/command.js +182 -0
- package/dist/plan/command.js.map +1 -0
- package/dist/plan/document.d.ts +24 -0
- package/dist/plan/document.d.ts.map +1 -0
- package/dist/plan/document.js +208 -0
- package/dist/plan/document.js.map +1 -0
- package/dist/plan/markdown-dir.d.ts +73 -0
- package/dist/plan/markdown-dir.d.ts.map +1 -0
- package/dist/plan/markdown-dir.js +220 -0
- package/dist/plan/markdown-dir.js.map +1 -0
- package/dist/plan/output.d.ts +59 -0
- package/dist/plan/output.d.ts.map +1 -0
- package/dist/plan/output.js +102 -0
- package/dist/plan/output.js.map +1 -0
- package/dist/publish/api.d.ts.map +1 -1
- package/dist/publish/api.js +3 -2
- package/dist/publish/api.js.map +1 -1
- package/dist/publish/frontmatter.d.ts +8 -1
- package/dist/publish/frontmatter.d.ts.map +1 -1
- package/dist/publish/frontmatter.js +21 -0
- package/dist/publish/frontmatter.js.map +1 -1
- package/dist/publish/rows.d.ts +13 -0
- package/dist/publish/rows.d.ts.map +1 -0
- package/dist/publish/rows.js +21 -0
- package/dist/publish/rows.js.map +1 -0
- package/dist/publish/scan.d.ts +2 -0
- package/dist/publish/scan.d.ts.map +1 -1
- package/dist/publish/scan.js +1 -0
- package/dist/publish/scan.js.map +1 -1
- package/dist/publish-command.d.ts.map +1 -1
- package/dist/publish-command.js +2 -1
- package/dist/publish-command.js.map +1 -1
- package/dist/publish-dir.d.ts +54 -0
- package/dist/publish-dir.d.ts.map +1 -0
- package/dist/publish-dir.js +119 -0
- package/dist/publish-dir.js.map +1 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +37 -16
- package/dist/run.js.map +1 -1
- package/dist/translations/target.d.ts +0 -7
- package/dist/translations/target.d.ts.map +1 -1
- package/dist/translations/target.js +10 -2
- package/dist/translations/target.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../src/api/rows.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/api/rows.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rowsOf = void 0;
|
|
4
|
+
// The helper lives under publish/ because @forumulate/content-sync compiles that
|
|
5
|
+
// folder on its own (its rootDir), and publish/api.ts uses it; the rest of the CLI
|
|
6
|
+
// imports it from here.
|
|
7
|
+
var rows_1 = require("../publish/rows");
|
|
8
|
+
Object.defineProperty(exports, "rowsOf", { enumerable: true, get: function () { return rows_1.rowsOf; } });
|
|
9
|
+
//# sourceMappingURL=rows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rows.js","sourceRoot":"","sources":["../../src/api/rows.ts"],"names":[],"mappings":";;;AAAA,iFAAiF;AACjF,mFAAmF;AACnF,wBAAwB;AACxB,wCAAyC;AAAhC,8FAAA,MAAM,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,UAkBrB,CAAC;AAIF,0EAA0E;AAC1E,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAmDlD;AAwDD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA8BlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":";;;AAkCA,4BAmDC;AAwDD,4CA8BC;AA3KD,sCAAmF;AACnF,qCAA6C;AAC7C,qCAAuC;AAEvC;;;;;;GAMG;AACU,QAAA,SAAS,GAAG;IACvB,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,SAAS;IACT,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IAC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,EAAE,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACpF,OAAO;QACL,GAAG,IAAI,GAAG,CAAC;YACT,GAAG,YAAY;YACf,GAAG,MAAM;YACT,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACpC,QAAQ;YACR,SAAS;SACV,CAAC;KACH,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,MAAM;YACT,OAAO;;;;;;;CAOZ,CAAC;QACE,KAAK,KAAK;YACR,OAAO;;;;;;;;;CASZ,CAAC;QACE,KAAK,MAAM;YACT,OAAO;;;CAGZ,CAAC;QACE;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -9,8 +9,8 @@ import type { CommandDeps } from './context';
|
|
|
9
9
|
* poller; the API now answers one job object everywhere, and this is the one
|
|
10
10
|
* poller.
|
|
11
11
|
*
|
|
12
|
-
* Exit codes (
|
|
13
|
-
*
|
|
12
|
+
* Exit codes (the same table as the API's own `JOB_WAIT_EXIT`, kept here
|
|
13
|
+
* because the CLI does not depend on the package that holds it): 0 completed, 1 failed or canceled, 124 timed
|
|
14
14
|
* out — 124 because that is what `timeout(1)` exits with, so a pipeline that
|
|
15
15
|
* already handles a timed-out step handles this one.
|
|
16
16
|
*/
|
|
@@ -15,8 +15,8 @@ exports.reportWait = reportWait;
|
|
|
15
15
|
* poller; the API now answers one job object everywhere, and this is the one
|
|
16
16
|
* poller.
|
|
17
17
|
*
|
|
18
|
-
* Exit codes (
|
|
19
|
-
*
|
|
18
|
+
* Exit codes (the same table as the API's own `JOB_WAIT_EXIT`, kept here
|
|
19
|
+
* because the CLI does not depend on the package that holds it): 0 completed, 1 failed or canceled, 124 timed
|
|
20
20
|
* out — 124 because that is what `timeout(1)` exits with, so a pipeline that
|
|
21
21
|
* already handles a timed-out step handles this one.
|
|
22
22
|
*/
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Which content library a `forumulate content` command means.
|
|
3
|
-
*
|
|
4
|
-
* A person types a slug (`--library acme-site`); the API wants ids. The org is
|
|
5
|
-
* optional because a pulled file already names its library by id, and asking
|
|
6
|
-
* for the org as well would be asking for something the CLI can look up. An
|
|
7
|
-
* ambiguous slug (two orgs with an `acme-site`) is refused with the orgs
|
|
8
|
-
* named, never guessed.
|
|
9
|
-
*/
|
|
10
1
|
import type { ForumulateClient } from '@forumulate/sdk';
|
|
11
2
|
export interface LibraryTarget {
|
|
12
3
|
orgId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/content/library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../src/content/library.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,WAAY,SAAQ,KAAK;CAAG;AAEzC;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE;IAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;CAAE,GAAG,CAAC,EAAE,CAE/D;AAED,wBAAsB,OAAO,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMpF;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACvC,OAAO,CAAC,aAAa,CAAC,CAwBxB"}
|
package/dist/content/library.js
CHANGED
|
@@ -4,6 +4,16 @@ exports.TargetError = void 0;
|
|
|
4
4
|
exports.orgRows = orgRows;
|
|
5
5
|
exports.orgIdOf = orgIdOf;
|
|
6
6
|
exports.resolveLibrary = resolveLibrary;
|
|
7
|
+
/**
|
|
8
|
+
* Which content library a `forumulate content` command means.
|
|
9
|
+
*
|
|
10
|
+
* A person types a slug (`--library acme-site`); the API wants ids. The org is
|
|
11
|
+
* optional because a pulled file already names its library by id, and asking
|
|
12
|
+
* for the org as well would be asking for something the CLI can look up. An
|
|
13
|
+
* ambiguous slug (two orgs with an `acme-site`) is refused with the orgs
|
|
14
|
+
* named, never guessed.
|
|
15
|
+
*/
|
|
16
|
+
const rows_1 = require("../api/rows");
|
|
7
17
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8
18
|
class TargetError extends Error {
|
|
9
19
|
}
|
|
@@ -33,8 +43,8 @@ async function resolveLibrary(client, want) {
|
|
|
33
43
|
const hits = [];
|
|
34
44
|
for (const orgId of orgIds) {
|
|
35
45
|
// An org the caller cannot list libraries in simply has none for them.
|
|
36
|
-
const listed = await client.content.libraries.list(orgId).catch(() => ({ libraries
|
|
37
|
-
for (const l of listed
|
|
46
|
+
const listed = (0, rows_1.rowsOf)(await client.content.libraries.list(orgId).catch(() => ({})), 'libraries');
|
|
47
|
+
for (const l of listed) {
|
|
38
48
|
if (l.id === library || l.slug === library)
|
|
39
49
|
hits.push({ orgId, libraryId: l.id, name: l.name });
|
|
40
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/content/library.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/content/library.ts"],"names":[],"mappings":";;;AA0BA,0BAEC;AAED,0BAMC;AAED,wCA2BC;AAjED;;;;;;;;GAQG;AACH,sCAAqC;AAGrC,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAQ/E,MAAa,WAAY,SAAQ,KAAK;CAAG;AAAzC,kCAAyC;AAEzC;;;GAGG;AACH,SAAgB,OAAO,CAAI,GAA+B;IACxD,OAAO,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;AACpC,CAAC;AAEM,KAAK,UAAU,OAAO,CAAC,MAAwB,EAAE,GAAW;IACjE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;IAC7D,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,WAAW,CAAC,oBAAoB,GAAG,6CAA6C,CAAC,CAAC;IACtG,OAAO,GAAG,CAAC,EAAE,CAAC;AAChB,CAAC;AAEM,KAAK,UAAU,cAAc,CAClC,MAAwB,EACxB,IAAwC;IAExC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,IAAI,WAAW,CAAC,yEAAyE,CAAC,CAAC;IACnG,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC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AC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CACpH,CAAC;AACJ,CAAC"}
|
package/dist/help-commands.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
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
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)";
|
|
3
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)";
|
|
4
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)";
|
|
5
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)";
|
|
@@ -1 +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,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,
|
|
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"}
|
package/dist/help-commands.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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.SYNC_HELP = exports.PUBLISH_HELP = void 0;
|
|
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
4
|
const validate_1 = require("./validate");
|
|
5
5
|
const command_1 = require("./doctor/command");
|
|
6
6
|
const exit_codes_1 = require("./exit-codes");
|
|
@@ -101,6 +101,53 @@ Usage:
|
|
|
101
101
|
|
|
102
102
|
${OUTPUT}
|
|
103
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
|
+
|
|
104
151
|
${exit_codes_1.EXIT_CODES_HELP}`;
|
|
105
152
|
exports.DEV_HELP = `forumulate dev — preview a folder of Markdown locally
|
|
106
153
|
|
|
@@ -211,5 +258,7 @@ exports.COMMAND_HELP = {
|
|
|
211
258
|
translations: exports.TRANSLATIONS_HELP,
|
|
212
259
|
i18n: exports.TRANSLATIONS_HELP,
|
|
213
260
|
check: command_2.CHECK_HELP,
|
|
261
|
+
plan: exports.PLAN_HELP,
|
|
262
|
+
apply: exports.PLAN_HELP,
|
|
214
263
|
};
|
|
215
264
|
//# sourceMappingURL=help-commands.js.map
|
|
@@ -1 +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,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;;;;;;;;;;;;EAY1B,4BAAe,EAAE,CAAC;AAEP,QAAA,WAAW,GAAG;;;;;;;;;;EAUzB,MAAM;;EAEN,4BAAe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;;;;;;;;;;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;;;;;;;;;;;;EAY1B,4BAAe,EAAE,CAAC;AAEP,QAAA,WAAW,GAAG;;;;;;;;;;EAUzB,MAAM;;EAEN,4BAAe,EAAE,CAAC;AAEP,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;EAkB/B,4BAAe,EAAE,CAAC;AAEpB,iFAAiF;AACpE,QAAA,YAAY,GAAqC;IAC5D,OAAO,EAAE,oBAAY;IACrB,IAAI,EAAE,iBAAS;IACf,GAAG,EAAE,gBAAQ;IACb,MAAM,EAAE,qBAAW;IACnB,QAAQ,EAAE,wBAAa;IACvB,KAAK,EAAE,kBAAU;IACjB,MAAM,EAAE,mBAAW;IACnB,MAAM,EAAE,oBAAW;IACnB,IAAI,EAAE,oBAAW;IACjB,KAAK,EAAE,0BAAU;IACjB,QAAQ,EAAE,qBAAa;IACvB,WAAW,EAAE,wBAAgB;IAC7B,OAAO,EAAE,oBAAY;IACrB,MAAM,EAAE,mBAAW;IACnB,YAAY,EAAE,yBAAiB;IAC/B,IAAI,EAAE,yBAAiB;IACvB,KAAK,EAAE,oBAAgB;IACvB,IAAI,EAAE,iBAAS;IACf,KAAK,EAAE,iBAAS;CACjB,CAAC"}
|
package/dist/help.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** `forumulate help`. The resource groups print their own (`forumulate spaces --help`). */
|
|
2
|
-
export declare const HELP = "forumulate \u2014 Forumulate command-line interface\n\nUsage:\n forumulate <command> [args]\n\nCommands:\n login [--token <pat>] Store a token for this API, so every other\n command stops needing FORUMULATE_TOKEN in\n the environment\n logout Forget the stored token\n whoami [--json] Who you are, and WHICH token: its source (--token,\n FORUMULATE_TOKEN or credentials.json), id, name,\n last 4, expiry, narrowing and the API base\n auth status [--json] The same report, for scripts\n config set|get|unset|list Defaults: org, space, library, api-version\n (`forumulate config set org acme`)\n\nEvery API operation:\n api list [--tag t] [--search w] Discover operations and their summaries\n [--refresh] ...from the live API's spec, not the bundled one\n api describe <operationId> Parameters and body schema, as flags\n api <operationId> [args] [flags] Call it: --<param> value, --data @f.json,\n api <METHOD> <path> [flags] --field a.b=v, --paginate, --json\n\nResources (each: <group> --help lists its verbs and the operation each calls):\n Org: orgs | members | invites | groups | roles | service-accounts (bots)\n tokens (pats) | keys | integration-tokens (int-tokens)\n webhooks | extensions | audit\n Spaces: spaces | snapshots | shape | domains | assets | space-types (types)\n Docs: items (pages) | docs | collections | versions | change-requests (crs)\n openapi | sdks | github (git)\n Content: blog | forum | changelog | roadmap | status | events | course\n careers | forms (blog/forum/changelog/status: translations \u2026)\n CMS: libraries | entries | media | releases | environments (envs)\n Site: theme | sites | reader\n Jobs: jobs | backups | imports | manifest (starters take --wait [--timeout s])\n search <query...> [--org] e.g. spaces create Docs --slug docs --type DOCS\n items create --space docs --file a.md --publish\n docs schedule set <pageId> <when> --space docs\n webhooks deliveries <id>; webhooks replay <id> <d>\n --out <file> where a file answer goes (SDK archive, PDF, CSV export)\n cache purge --space <s> [--page p] Drop cached copies (web tier + every CDN); deletes\n nothing\n completion bash|zsh|fish Shell completion script\n\nOlder forms, unchanged:\n orgs List your organizations\n spaces <orgId> List spaces in an org\n items <orgId> <spaceId> List what is in a space, with where each\n piece's content lives\n search <orgId> <query...> Unified search across docs/forum/blog\n dev <folder> Preview a folder of Markdown locally, rendered\n by your space's own renderer; reloads on save.\n --org <id> --space <id> [--port 4321] [--site <your docs URL>]\n publish <folder> --org <o> --space <s>\n Publish a folder of Markdown: one folder per\n collection, front matter, assets, order,\n and a forumulate.yaml manifest for space,\n site, theme, OpenAPI and monitors. Re-runs\n change only what changed, then read back.\n --org <id|slug> --space <id|slug> (or org:/space: in the manifest)\n --dry-run print the plan, write nothing (no token needed for a\n public space)\n --prune remove 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\n --no-verify skip the read-back --pace <ms> gap between writes\n --manifest <file> a manifest somewhere else\n --diff print the changed paragraphs and fields of each update\n --purge page|space|none what to drop from the cache (default page),\n reported per CDN\n --json one summary: created, updated, unchanged, trashed, purged,\n verify, diffUrl (the run is recorded; publish.completed fires)\n Pages edited in the studio since the last publish are not overwritten\n without --force. Full reference: forumulate publish --help\n sync <folder> Content as code: the same folder publish,\n PLAN BY DEFAULT. Posts (blog), pages\n (docs, custom, legal), FAQ questions,\n changelog releases and blog categories,\n matched by slug; images uploaded once by\n content hash; README, LICENSE, _drafts/,\n dotfiles skipped. Guide:\n https://forumulate.com/guides/content-as-code\n --apply write the plan (then read it back)\n --prune also remove what has no file (to the trash)\n --diff print the changed paragraphs and fields of each update\n --org, --space, --only, --force, --no-verify, --pace, --manifest, --json\n as for publish\n check links [folder] Broken internal links, #anchors, pictures and\n (--external) outside links in a folder, before\n publishing; exit 1 when any is broken\n --space <s> [--org <o>] the same report for a published space\n --allow-redirect <hosts> --ignore <text> --json\n publish <folder> --preview <name> Send the change to a preview link instead of\n publishing it (--comment posts it on the PR)\n publish <orgId> <spaceId> <pageId> (deprecated) Publish a page \u2014 use items publish\n publish <orgId> <spaceId> <dir> (deprecated) \u2014 use publish <dir> --org --space\n domains <orgId> <spaceId> List this space's domains and their state\n domains verify <orgId> <spaceId> <hostname>\n Re-run verification and say what is missing\n snapshot <orgId> <spaceId> <label> Create a space version snapshot\n content types --library <id|slug> TypeScript for a content library's model:\n collections, globals, the block union\n [--org <id|slug>] [--out forumulate.d.ts] [--preview] [--schema <file>]\n [--check] fail (exit 1) when the file is out of date, write nothing\n content pull --library <id|slug> Write the model to forumulate.content.json\n [--format json|payload] [--out <file>] (payload: forumulate.payload.ts)\n content push [file] Show the diff against the library, then\n apply it as a new model version\n [--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 import <payload|contentful|sanity|strapi|wordpress> <export path>\n Bring another CMS's content into a library:\n model, media, entries, references (always\n shows a dry run first)\n Re-running updates entries a\n previous import made. strapi takes a\n folder or an unencrypted export .tar.gz\n --library <id|slug> [--org \u2026] [--dry-run] [--yes]\n [--config payload.config.ts] (payload) the config that becomes the model\n [--publish source|all|none] what to publish (default: what was live)\n [--allow-model-removals] [--pace <ms>] [--base-url <url>] (strapi uploads)\n translations (alias i18n) Every translation capability, one vocabulary\n locales list|add|relabel|remove|set a space's (--space) or library's\n (--library) languages; set es=Espa\u00F1ol fr [--prune] is exact\n status each piece \u00D7 language: missing/draft/published/outdated\n [--locale es,fr] [--fail-on missing,outdated] (exit 1)\n pull one Markdown file per piece per language \u2192 [--out translations]\n [--locale \u2026] [--only slug,\u2026] [--include-missing] (stubs)\n push [dir] diff the files against the API, write what changed [--dry-run]\n auto machine-translate with YOUR DeepL/AI key --locale es\n [--state missing,outdated] [--only \u2026] [--force] [--publish]\n [--library \u2026 --entry id,\u2026] [--dry-run]\n labels pull|push [file] chrome words (--site <id> | --space \u2026)\n overrides pull|push [file] org UI string overrides [--prune]\n [--format json|xliff] for labels and overrides\n item-locale <itemId> <locale|none> correct a piece's declared language\n remove <pieceId> <locale> one translation (--yes)\n entry <entryId> <locale> a library entry's twin [--fields f.json]\n name <locale> <name\u2026> a space's (or --collection's) name\n switcher get|set <f.json> the org's reader language switcher\n provider status|connect|disconnect your DeepL key (DEEPL_API_KEY)\n conformance <collectionUrl> Run the Content Sync Protocol suite against\n any platform's collection endpoint\n validate [dir] Check forumulate.yaml, front matter and $schema\n files against the published schemas, with\n did-you-mean hints. --json; exit 2 if invalid\n doctor <readerUrl> | --site <s> Check a live site from the outside: health,\n canonical on both addresses, sitemap, cache\n consistency, root redirect, descriptions,\n llms.txt, favicon, consent tag, white-label\n leaks. --json; exit 1 on any FAIL\n help [command] Show this help, or a command's own\n (every command also takes --help)\n\nEnvironment:\n FORUMULATE_TOKEN Personal Access Token (Bearer). Overrides a stored one, so\n CI keeps working exactly as it did; --token overrides it.\n Mint one at\n https://forumulate.com/account/tokens\n FORUMULATE_URL The site (default https://forumulate.com); the API is its\n /api, i.e. https://forumulate.com/api. A value already\n ending in /api is used as-is.\n FORUMULATE_API_URL Exact API base, for a local API with no /api prefix\n (http://localhost:4000). Wins over FORUMULATE_URL.\n FORUMULATE_ORG, FORUMULATE_SPACE, FORUMULATE_LIBRARY\n Defaults for --org, --space and --library; they beat\n `forumulate config set`, a flag beats both.\n FORUMULATE_API_VERSION\n Forumulate-Version for api/resource commands\n (default 2026-12-01).\n\nThe SDK (ForumulateClient.fromEnv) and the MCP server (@forumulate/mcp) read\nthe same variables. Guide: https://forumulate.com/guides/api-tokens-and-scopes\n\nEvery FORUMULATE_* variable not listed above is reported (with the one you\nprobably meant) by `forumulate whoami` and on any authentication failure.\n\nFlags:\n --json Emit raw JSON instead of a formatted summary (stdout only;\n progress and warnings go to stderr)\n --out <file> Write stdout to a file (never truncated; non-zero exit if the\n write fails). content/translations use --out for their own file\n --jsonl With --paginate: one JSON row per line, streamed\n --token <pat> The token for this run, on every command. Precedence:\n --token, then FORUMULATE_TOKEN, then credentials.json. On an\n operation with a `token` parameter of its own (registries\n set, github connect, domains acme-challenge) the flag is that\n parameter; set FORUMULATE_TOKEN for the PAT there\n --dry-run (api, resources) print the request instead of sending it\n --dry-run Plan the work and write nothing (publish of a directory)\n --version Print the CLI version\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL) 2 usage\n 3 auth (no token, 401, token not allowed) 4 not found\n 5 conflict (409/412, edited in the studio since your last publish)\n";
|
|
2
|
+
export declare const HELP = "forumulate \u2014 Forumulate command-line interface\n\nUsage:\n forumulate <command> [args]\n\nCommands:\n login [--token <pat>] Store a token for this API, so every other\n command stops needing FORUMULATE_TOKEN in\n the environment\n logout Forget the stored token\n whoami [--json] Who you are, and WHICH token: its source (--token,\n FORUMULATE_TOKEN or credentials.json), id, name,\n last 4, expiry, narrowing and the API base\n auth status [--json] The same report, for scripts\n config set|get|unset|list Defaults: org, space, library, api-version\n (`forumulate config set org acme`)\n\nEvery API operation:\n api list [--tag t] [--search w] Discover operations and their summaries\n [--refresh] ...from the live API's spec, not the bundled one\n api describe <operationId> Parameters and body schema, as flags\n api <operationId> [args] [flags] Call it: --<param> value, --data @f.json,\n api <METHOD> <path> [flags] --field a.b=v, --paginate, --json\n\nResources (each: <group> --help lists its verbs and the operation each calls):\n Org: orgs | members | invites | groups | roles | service-accounts (bots)\n tokens (pats) | keys | integration-tokens (int-tokens)\n webhooks | extensions | audit\n Spaces: spaces | snapshots | shape | domains | assets | space-types (types)\n Docs: items (pages) | docs | collections | versions | change-requests (crs)\n openapi | sdks | github (git)\n Content: blog | forum | changelog | roadmap | status | events | course\n careers | forms (blog/forum/changelog/status: translations \u2026)\n CMS: libraries | entries | media | releases | environments (envs)\n Site: theme | sites | reader\n Jobs: jobs | backups | imports | manifest (starters take --wait [--timeout s])\n search <query...> [--org] e.g. spaces create Docs --slug docs --type DOCS\n items create --space docs --file a.md --publish\n docs schedule set <pageId> <when> --space docs\n webhooks deliveries <id>; webhooks replay <id> <d>\n --out <file> where a file answer goes (SDK archive, PDF, CSV export)\n cache purge --space <s> [--page p] Drop cached copies (web tier + every CDN); deletes\n nothing\n completion bash|zsh|fish Shell completion script\n\nOlder forms, unchanged:\n orgs List your organizations\n spaces <orgId> List spaces in an org\n items <orgId> <spaceId> List what is in a space, with where each\n piece's content lives\n search <orgId> <query...> Unified search across docs/forum/blog\n dev <folder> Preview a folder of Markdown locally, rendered\n by your space's own renderer; reloads on save.\n --org <id> --space <id> [--port 4321] [--site <your docs URL>]\n publish <folder> --org <o> --space <s>\n Publish a folder of Markdown: one folder per\n collection, front matter, assets, order,\n and a forumulate.yaml manifest for space,\n site, theme, OpenAPI and monitors. Re-runs\n change only what changed, then read back.\n --org <id|slug> --space <id|slug> (or org:/space: in the manifest)\n --dry-run print the plan, write nothing (no token needed for a\n public space)\n --prune remove 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\n --no-verify skip the read-back --pace <ms> gap between writes\n --manifest <file> a manifest somewhere else\n --diff print the changed paragraphs and fields of each update\n --purge page|space|none what to drop from the cache (default page),\n reported per CDN\n --json one summary: created, updated, unchanged, trashed, purged,\n verify, diffUrl (the run is recorded; publish.completed fires)\n Pages edited in the studio since the last publish are not overwritten\n without --force. Full reference: forumulate publish --help\n sync <folder> Content as code: the same folder publish,\n PLAN BY DEFAULT. Posts (blog), pages\n (docs, custom, legal), FAQ questions,\n changelog releases and blog categories,\n matched by slug; images uploaded once by\n content hash; README, LICENSE, _drafts/,\n dotfiles skipped. Guide:\n https://forumulate.com/guides/content-as-code\n --apply write the plan (then read it back)\n --prune also remove what has no file (to the trash)\n --diff print the changed paragraphs and fields of each update\n --org, --space, --only, --force, --no-verify, --pace, --manifest, --json\n as for publish\n plan [forumulate.yaml] The whole site as one document (version: 2):\n spaces and their SEO, languages, front doors,\n contact form and About parts, Markdown pages\n with locale twins, redirects, sites. Prints\n the diff; writes nothing. --check exits 1\n when it is not empty. Full reference:\n forumulate plan --help\n apply [forumulate.yaml] Carry that plan out, idempotently, every\n write read back; --prune also removes what\n the manifest wrote and no longer declares\n check links [folder] Broken internal links, #anchors, pictures and\n (--external) outside links in a folder, before\n publishing; exit 1 when any is broken\n --space <s> [--org <o>] the same report for a published space\n --allow-redirect <hosts> --ignore <text> --json\n publish <folder> --preview <name> Send the change to a preview link instead of\n publishing it (--comment posts it on the PR)\n publish <orgId> <spaceId> <pageId> (deprecated) Publish a page \u2014 use items publish\n publish <orgId> <spaceId> <dir> (deprecated) \u2014 use publish <dir> --org --space\n domains <orgId> <spaceId> List this space's domains and their state\n domains verify <orgId> <spaceId> <hostname>\n Re-run verification and say what is missing\n snapshot <orgId> <spaceId> <label> Create a space version snapshot\n content types --library <id|slug> TypeScript for a content library's model:\n collections, globals, the block union\n [--org <id|slug>] [--out forumulate.d.ts] [--preview] [--schema <file>]\n [--check] fail (exit 1) when the file is out of date, write nothing\n content pull --library <id|slug> Write the model to forumulate.content.json\n [--format json|payload] [--out <file>] (payload: forumulate.payload.ts)\n content push [file] Show the diff against the library, then\n apply it as a new model version\n [--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 import <payload|contentful|sanity|strapi|wordpress> <export path>\n Bring another CMS's content into a library:\n model, media, entries, references (always\n shows a dry run first)\n Re-running updates entries a\n previous import made. strapi takes a\n folder or an unencrypted export .tar.gz\n --library <id|slug> [--org \u2026] [--dry-run] [--yes]\n [--config payload.config.ts] (payload) the config that becomes the model\n [--publish source|all|none] what to publish (default: what was live)\n [--allow-model-removals] [--pace <ms>] [--base-url <url>] (strapi uploads)\n translations (alias i18n) Every translation capability, one vocabulary\n locales list|add|relabel|remove|set a space's (--space) or library's\n (--library) languages; set es=Espa\u00F1ol fr [--prune] is exact\n status each piece \u00D7 language: missing/draft/published/outdated\n [--locale es,fr] [--fail-on missing,outdated] (exit 1)\n pull one Markdown file per piece per language \u2192 [--out translations]\n [--locale \u2026] [--only slug,\u2026] [--include-missing] (stubs)\n push [dir] diff the files against the API, write what changed [--dry-run]\n auto machine-translate with YOUR DeepL/AI key --locale es\n [--state missing,outdated] [--only \u2026] [--force] [--publish]\n [--library \u2026 --entry id,\u2026] [--dry-run]\n labels pull|push [file] chrome words (--site <id> | --space \u2026)\n overrides pull|push [file] org UI string overrides [--prune]\n [--format json|xliff] for labels and overrides\n item-locale <itemId> <locale|none> correct a piece's declared language\n remove <pieceId> <locale> one translation (--yes)\n entry <entryId> <locale> a library entry's twin [--fields f.json]\n name <locale> <name\u2026> a space's (or --collection's) name\n switcher get|set <f.json> the org's reader language switcher\n provider status|connect|disconnect your DeepL key (DEEPL_API_KEY)\n conformance <collectionUrl> Run the Content Sync Protocol suite against\n any platform's collection endpoint\n validate [dir] Check forumulate.yaml, front matter and $schema\n files against the published schemas, with\n did-you-mean hints. --json; exit 2 if invalid\n doctor <readerUrl> | --site <s> Check a live site from the outside: health,\n canonical on both addresses, sitemap, cache\n consistency, root redirect, descriptions,\n llms.txt, favicon, consent tag, white-label\n leaks. --json; exit 1 on any FAIL\n help [command] Show this help, or a command's own\n (every command also takes --help)\n\nEnvironment:\n FORUMULATE_TOKEN Personal Access Token (Bearer). Overrides a stored one, so\n CI keeps working exactly as it did; --token overrides it.\n Mint one at\n https://forumulate.com/account/tokens\n FORUMULATE_URL The site (default https://forumulate.com); the API is its\n /api, i.e. https://forumulate.com/api. A value already\n ending in /api is used as-is.\n FORUMULATE_API_URL Exact API base, for a local API with no /api prefix\n (http://localhost:4000). Wins over FORUMULATE_URL.\n FORUMULATE_ORG, FORUMULATE_SPACE, FORUMULATE_LIBRARY\n Defaults for --org, --space and --library; they beat\n `forumulate config set`, a flag beats both.\n FORUMULATE_API_VERSION\n Forumulate-Version for api/resource commands\n (default: the SDK's current version).\n\nThe SDK (ForumulateClient.fromEnv) and the MCP server (@forumulate/mcp) read\nthe same variables. Guide: https://forumulate.com/guides/api-tokens-and-scopes\n\nEvery FORUMULATE_* variable not listed above is reported (with the one you\nprobably meant) by `forumulate whoami` and on any authentication failure.\n\nFlags:\n --json Emit raw JSON instead of a formatted summary (stdout only;\n progress and warnings go to stderr)\n --out <file> Write stdout to a file (never truncated; non-zero exit if the\n write fails). content/translations use --out for their own file\n --jsonl With --paginate: one JSON row per line, streamed\n --token <pat> The token for this run, on every command. Precedence:\n --token, then FORUMULATE_TOKEN, then credentials.json. On an\n operation with a `token` parameter of its own (registries\n set, github connect, domains acme-challenge) the flag is that\n parameter; set FORUMULATE_TOKEN for the PAT there\n --dry-run (api, resources) print the request instead of sending it\n --dry-run Plan the work and write nothing (publish of a directory)\n --version Print the CLI version\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL) 2 usage\n 3 auth (no token, 401, token not allowed) 4 not found\n 5 conflict (409/412, edited in the studio since your last publish)\n";
|
|
3
3
|
//# sourceMappingURL=help.d.ts.map
|
package/dist/help.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,IAAI,+0bAiNhB,CAAC"}
|
package/dist/help.js
CHANGED
|
@@ -91,6 +91,16 @@ Older forms, unchanged:
|
|
|
91
91
|
--diff print the changed paragraphs and fields of each update
|
|
92
92
|
--org, --space, --only, --force, --no-verify, --pace, --manifest, --json
|
|
93
93
|
as for publish
|
|
94
|
+
plan [forumulate.yaml] The whole site as one document (version: 2):
|
|
95
|
+
spaces and their SEO, languages, front doors,
|
|
96
|
+
contact form and About parts, Markdown pages
|
|
97
|
+
with locale twins, redirects, sites. Prints
|
|
98
|
+
the diff; writes nothing. --check exits 1
|
|
99
|
+
when it is not empty. Full reference:
|
|
100
|
+
forumulate plan --help
|
|
101
|
+
apply [forumulate.yaml] Carry that plan out, idempotently, every
|
|
102
|
+
write read back; --prune also removes what
|
|
103
|
+
the manifest wrote and no longer declares
|
|
94
104
|
check links [folder] Broken internal links, #anchors, pictures and
|
|
95
105
|
(--external) outside links in a folder, before
|
|
96
106
|
publishing; exit 1 when any is broken
|
|
@@ -174,7 +184,7 @@ Environment:
|
|
|
174
184
|
\`forumulate config set\`, a flag beats both.
|
|
175
185
|
FORUMULATE_API_VERSION
|
|
176
186
|
Forumulate-Version for api/resource commands
|
|
177
|
-
(default
|
|
187
|
+
(default: the SDK's current version).
|
|
178
188
|
|
|
179
189
|
The SDK (ForumulateClient.fromEnv) and the MCP server (@forumulate/mcp) read
|
|
180
190
|
the same variables. Guide: https://forumulate.com/guides/api-tokens-and-scopes
|
package/dist/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAA,2FAA2F;AAC9E,QAAA,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAA,2FAA2F;AAC9E,QAAA,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiNnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/import/media.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/import/media.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5D,KAAK,EAAE,WAAW,CAAC;IACnB,8BAA8B;IAC9B,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACjD,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;CACd;AAID,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAG9F;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,CAAC,EAAE,WAAW,GACb,OAAO,CAAC,YAAY,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CAc7C"}
|
package/dist/import/media.js
CHANGED
|
@@ -11,6 +11,7 @@ exports.uploadMedia = uploadMedia;
|
|
|
11
11
|
* (their own id, their file name, the URL a body links them by); all three
|
|
12
12
|
* resolve to the one asset.
|
|
13
13
|
*/
|
|
14
|
+
const rows_1 = require("../api/rows");
|
|
14
15
|
const node_crypto_1 = require("node:crypto");
|
|
15
16
|
const node_path_1 = require("node:path");
|
|
16
17
|
const REMOTE = /^https?:\/\//i;
|
|
@@ -24,7 +25,7 @@ async function uploadMedia(deps, orgId, libraryId, m) {
|
|
|
24
25
|
: deps.files.readBytes((0, node_path_1.isAbsolute)(m.location) ? m.location : (0, node_path_1.join)(deps.root, m.location));
|
|
25
26
|
const { hash, name } = storedName(bytes, m.filename);
|
|
26
27
|
const found = await deps.client.content.assets.list(orgId, libraryId, { search: hash, limit: 50 });
|
|
27
|
-
const hit = found
|
|
28
|
+
const hit = (0, rows_1.rowsOf)(found, 'assets').find((a) => a.filename === name);
|
|
28
29
|
if (hit)
|
|
29
30
|
return { id: hit.id, url: hit.url, filename: hit.filename, reused: true };
|
|
30
31
|
if (!deps.upload)
|
package/dist/import/media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/import/media.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/import/media.ts"],"names":[],"mappings":";;AAiCA,gCAGC;AAED,kCAmBC;AAzDD;;;;;;;;GAQG;AACH,sCAAqC;AACrC,6CAAyC;AACzC,yCAA6C;AAoB7C,MAAM,MAAM,GAAG,eAAe,CAAC;AAE/B,SAAgB,UAAU,CAAC,KAAiB,EAAE,QAAgB;IAC5D,MAAM,IAAI,GAAG,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;AACzE,CAAC;AAEM,KAAK,UAAU,WAAW,CAC/B,IAAe,EACf,KAAa,EACb,SAAiB,EACjB,CAAc;IAEd,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;QACnC,CAAC,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;QACnC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAA,sBAAU,EAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,gBAAI,EAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5F,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,MAAM,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AE,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ApiClient } from '../publish/client';
|
|
2
|
+
import { type ManifestAnswer } from './output';
|
|
3
|
+
/**
|
|
4
|
+
* `forumulate plan` and `forumulate apply` (DX-D): one `forumulate.yaml`
|
|
5
|
+
* (version 2) and its Markdown folders, planned as a diff and applied
|
|
6
|
+
* idempotently through `PUT /orgs/{org}/manifest` — the API's own planner and
|
|
7
|
+
* applier, so there is no second engine here that could disagree with it.
|
|
8
|
+
*
|
|
9
|
+
* What the CLI adds is only what needs the disk or the terminal: folders
|
|
10
|
+
* become pages, local images are uploaded once by content hash and their
|
|
11
|
+
* references rewritten, and a large apply is split into batches. The batches
|
|
12
|
+
* exist because an apply is a request, and a request through the edge is cut
|
|
13
|
+
* at 30 seconds while the work carries on: forty new pages, each written,
|
|
14
|
+
* published and read back, do not fit in one. So the plan is computed first
|
|
15
|
+
* and the CHANGED pages are sent a batch at a time, each request carrying
|
|
16
|
+
* every page already settled (which plans `unchanged` and costs a read); the
|
|
17
|
+
* last request is the whole document, and only it carries `prune`, so a
|
|
18
|
+
* prune always sees every page that is declared.
|
|
19
|
+
*/
|
|
20
|
+
export interface PlanFlags {
|
|
21
|
+
command: 'plan' | 'apply';
|
|
22
|
+
file?: string;
|
|
23
|
+
org?: string;
|
|
24
|
+
prune: boolean;
|
|
25
|
+
json: boolean;
|
|
26
|
+
diff: boolean;
|
|
27
|
+
/** `plan --check`: exit 1 when the plan is not empty (drift detection in CI). */
|
|
28
|
+
check: boolean;
|
|
29
|
+
verbose: boolean;
|
|
30
|
+
/** Changed pages per apply request. */
|
|
31
|
+
batch: number;
|
|
32
|
+
}
|
|
33
|
+
export interface PlanCliDeps {
|
|
34
|
+
client: ApiClient;
|
|
35
|
+
out: (l: string) => void;
|
|
36
|
+
err: (l: string) => void;
|
|
37
|
+
env?: NodeJS.ProcessEnv;
|
|
38
|
+
upload?: (path: string, form: FormData) => Promise<unknown>;
|
|
39
|
+
cwd?: string;
|
|
40
|
+
}
|
|
41
|
+
type Body = Record<string, unknown>;
|
|
42
|
+
export declare function runPlanCommand(flags: PlanFlags, deps: PlanCliDeps): Promise<number>;
|
|
43
|
+
export declare function hasChanges(answer: ManifestAnswer): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The apply requests: every page the plan leaves alone is in all of them;
|
|
46
|
+
* the changed ones are added `size` at a time; the last request is the whole
|
|
47
|
+
* document, and is the only one that may prune.
|
|
48
|
+
*/
|
|
49
|
+
export declare function batches(body: Body, plan: ManifestAnswer, size: number): Body[];
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/plan/command.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAKnD,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAExE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,iFAAiF;IACjF,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzB,GAAG,EAAE,CAAC,CAA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