@se-studio/contentful-cms 1.2.0 → 1.2.2
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/CHANGELOG.md +44 -0
- package/HOSTED.md +1 -1
- package/README.md +20 -19
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +5 -32
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/backup.js +1 -1
- package/dist/commands/backup.js.map +1 -1
- package/dist/commands/create-from-json.d.ts.map +1 -1
- package/dist/commands/create-from-json.js +11 -7
- package/dist/commands/create-from-json.js.map +1 -1
- package/dist/commands/create-taxonomy.d.ts +4 -0
- package/dist/commands/create-taxonomy.d.ts.map +1 -1
- package/dist/commands/create-taxonomy.js +22 -4
- package/dist/commands/create-taxonomy.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +16 -6
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/diagnose.d.ts.map +1 -1
- package/dist/commands/diagnose.js +1 -1
- package/dist/commands/diagnose.js.map +1 -1
- package/dist/commands/discard.d.ts.map +1 -1
- package/dist/commands/discard.js +1 -1
- package/dist/commands/discard.js.map +1 -1
- package/dist/commands/ensure.d.ts.map +1 -1
- package/dist/commands/ensure.js +8 -0
- package/dist/commands/ensure.js.map +1 -1
- package/dist/commands/entry-lookup-target.d.ts +113 -0
- package/dist/commands/entry-lookup-target.d.ts.map +1 -0
- package/dist/commands/entry-lookup-target.js +235 -0
- package/dist/commands/entry-lookup-target.js.map +1 -0
- package/dist/commands/entry-search.d.ts.map +1 -1
- package/dist/commands/entry-search.js +1 -1
- package/dist/commands/entry-search.js.map +1 -1
- package/dist/commands/help.js +1 -1
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +6 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +31 -9
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/nav.d.ts.map +1 -1
- package/dist/commands/nav.js +39 -22
- package/dist/commands/nav.js.map +1 -1
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +36 -21
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/peek.d.ts.map +1 -1
- package/dist/commands/peek.js +36 -31
- package/dist/commands/peek.js.map +1 -1
- package/dist/commands/resolve.d.ts.map +1 -1
- package/dist/commands/resolve.js +82 -131
- package/dist/commands/resolve.js.map +1 -1
- package/dist/commands/screenshot.js +2 -2
- package/dist/commands/screenshot.js.map +1 -1
- package/dist/commands/set.d.ts.map +1 -1
- package/dist/commands/set.js +16 -0
- package/dist/commands/set.js.map +1 -1
- package/dist/contentful/cda-sync.d.ts +3 -1
- package/dist/contentful/cda-sync.d.ts.map +1 -1
- package/dist/contentful/cda-sync.js +128 -16
- package/dist/contentful/cda-sync.js.map +1 -1
- package/dist/contentful/entry-fields.d.ts +1 -0
- package/dist/contentful/entry-fields.d.ts.map +1 -1
- package/dist/contentful/entry-fields.js +21 -0
- package/dist/contentful/entry-fields.js.map +1 -1
- package/dist/contentful/entry-lookup.d.ts +16 -0
- package/dist/contentful/entry-lookup.d.ts.map +1 -0
- package/dist/contentful/entry-lookup.js +273 -0
- package/dist/contentful/entry-lookup.js.map +1 -0
- package/dist/contentful/fetch.d.ts +1 -1
- package/dist/contentful/fetch.d.ts.map +1 -1
- package/dist/contentful/fetch.js +11 -77
- package/dist/contentful/fetch.js.map +1 -1
- package/dist/contentful/linkedEntryFields.d.ts +27 -0
- package/dist/contentful/linkedEntryFields.d.ts.map +1 -0
- package/dist/contentful/linkedEntryFields.js +95 -0
- package/dist/contentful/linkedEntryFields.js.map +1 -0
- package/dist/contentful/reference-record.d.ts +16 -7
- package/dist/contentful/reference-record.d.ts.map +1 -1
- package/dist/contentful/reference-record.js +57 -16
- package/dist/contentful/reference-record.js.map +1 -1
- package/dist/contentful/resolve-content-type.d.ts +1 -1
- package/dist/contentful/resolve-content-type.d.ts.map +1 -1
- package/dist/contentful/resolve-content-type.js +1 -1
- package/dist/contentful/resolve-content-type.js.map +1 -1
- package/dist/contentful/slug-validation.d.ts +7 -0
- package/dist/contentful/slug-validation.d.ts.map +1 -0
- package/dist/contentful/slug-validation.js +15 -0
- package/dist/contentful/slug-validation.js.map +1 -0
- package/dist/generated/hosted-guide.d.ts +1 -1
- package/dist/generated/hosted-guide.d.ts.map +1 -1
- package/dist/generated/hosted-guide.js +1 -1
- package/dist/generated/hosted-guide.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/index/db.d.ts.map +1 -1
- package/dist/index/db.js +17 -0
- package/dist/index/db.js.map +1 -1
- package/dist/index/query.d.ts +13 -2
- package/dist/index/query.d.ts.map +1 -1
- package/dist/index/query.js +62 -5
- package/dist/index/query.js.map +1 -1
- package/dist/index/reference-lookup.d.ts.map +1 -1
- package/dist/index/reference-lookup.js +12 -0
- package/dist/index/reference-lookup.js.map +1 -1
- package/dist/index/require.d.ts.map +1 -1
- package/dist/index/require.js +6 -0
- package/dist/index/require.js.map +1 -1
- package/dist/index/run-sync.d.ts +2 -0
- package/dist/index/run-sync.d.ts.map +1 -1
- package/dist/index/run-sync.js +25 -4
- package/dist/index/run-sync.js.map +1 -1
- package/dist/index/schema.d.ts +10 -4
- package/dist/index/schema.d.ts.map +1 -1
- package/dist/index/schema.js +26 -4
- package/dist/index/schema.js.map +1 -1
- package/dist/index/sync-lock.d.ts +1 -0
- package/dist/index/sync-lock.d.ts.map +1 -1
- package/dist/index/sync-lock.js +43 -30
- package/dist/index/sync-lock.js.map +1 -1
- package/dist/index/sync-log.d.ts +7 -0
- package/dist/index/sync-log.d.ts.map +1 -0
- package/dist/index/sync-log.js +23 -0
- package/dist/index/sync-log.js.map +1 -0
- package/dist/index/sync.d.ts.map +1 -1
- package/dist/index/sync.js +7 -4
- package/dist/index/sync.js.map +1 -1
- package/dist/mcp/tools/cms-edit.d.ts +1 -1
- package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
- package/dist/mcp/tools/cms-edit.js +11 -11
- package/dist/session/store.js +2 -2
- package/dist/session/store.js.map +1 -1
- package/docs/FUNCTIONAL_SPEC.md +9 -8
- package/docs/help/create-from-json.md +4 -4
- package/docs/help/fields-article.md +2 -2
- package/docs/help/fields-collection.md +1 -1
- package/docs/help/fields-component.md +1 -1
- package/docs/help/fields-page.md +2 -2
- package/docs/help/fields-taxonomy.md +8 -4
- package/docs/help/index-sync.md +36 -18
- package/docs/help/index.md +8 -7
- package/docs/help/lookup.md +123 -0
- package/docs/help/run.md +1 -1
- package/docs/help/taxonomy-from-json.md +2 -2
- package/docs/help/workflow.md +6 -6
- package/docs/mcp/hosted-guide.md +4 -4
- package/package.json +1 -1
- package/skills/core/SKILL.md +39 -30
- package/skills/templates/SKILL.md +1 -1
- package/dist/commands/resolve-options.d.ts +0 -20
- package/dist/commands/resolve-options.d.ts.map +0 -1
- package/dist/commands/resolve-options.js +0 -51
- package/dist/commands/resolve-options.js.map +0 -1
package/dist/index/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/index/sync.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAA6B,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqB7C,SAAS,WAAW,CAAC,EAAwB;IAC3C,EAAE,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,YAAY,CAAC,EAAwB,EAAE,MAAwB;IACtE,MAA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IAAI,GAAG,EAAE,EAAE,CAAC,CAAC;IACjF,MAAM,QAAQ,GAAG,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACzC,EAAE,CAAC,KAAK,EAAE,CAAC;IAEX,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAE1D,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,MAAM;QACN,QAAQ;QACR,UAAU;QACV,UAAU;QACV,cAAc;QACd,QAAQ;QACR,KAAK;KACN,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAElD,MAAM,UAAU,eAAe,CAAC,QAAgB,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IAChE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/B,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,GAAG,GAAG,CAAC,GAAG,cAAc,CAAC;AAClC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import type { RunCmsEditFn } from '../types.js';
|
|
3
|
-
export declare const TOOL_DESCRIPTION = "Run any cms-edit command. cms-edit edits Contentful draft content (no publishing).\n\nUse cms_edit_version (no args) to check the installed version.\nUse cms_edit_help to read the getting-started guide by topic.\nRead the cms-edit://guide resource for the full guide.\n\nWorkflow: open \u2192 snapshot \u2192 read/set/rtf/add/remove \u2192 diff \u2192 save\nAll saves create drafts only \u2014 a human must publish in Contentful.\n\nCommon command sequences:\n [\"open\", \"/pricing\"]
|
|
3
|
+
export declare const TOOL_DESCRIPTION = "Run any cms-edit command. cms-edit edits Contentful draft content (no publishing).\n\nUse cms_edit_version (no args) to check the installed version.\nUse cms_edit_help to read the getting-started guide by topic.\nRead the cms-edit://guide resource for the full guide.\n\nWorkflow: open \u2192 snapshot \u2192 read/set/rtf/add/remove \u2192 diff \u2192 save\nAll saves create drafts only \u2014 a human must publish in Contentful.\n\nCommon command sequences:\n [\"open\", \"--page-slug\", \"/pricing\"] \u2014 load a page by slug\n [\"open\", \"--id\", \"<entry-id>\"] \u2014 load by Contentful entry ID\n [\"snapshot\"] \u2014 print content tree with @refs\n [\"read\", \"@c0\"] \u2014 read all fields of a component (requires open session)\n [\"read\", \"@c0\", \"heading\"] \u2014 read a specific field (requires open session)\n [\"read\", \"@root\"] \u2014 read root entry fields (requires open session)\n [\"read\", \"<entry-id>\", \"--id\"] \u2014 read entry by ID (no session)\n [\"read\", \"<entry-id>\", \"--id\", \"heading\"] \u2014 read one field by entry ID (no session)\n [\"peek\", \"--page-slug\", \"/pricing\"] \u2014 preview tree + root fields (no session)\n [\"peek\", \"--id\", \"<entry-id>\"] \u2014 preview by entry ID with rootFields in JSON\n [\"set\", \"@c0\", \"heading\", \"New heading\"] \u2014 set a scalar field\n [\"rtf\", \"@c0\", \"body\", \"--content\", \"# H1\\n\\nBody.\"] \u2014 set rich text (preferred for AI)\n [\"rtf\", \"@c0\", \"body\", \"--base64\", \"<encoded>\"] \u2014 set rich text via base64 (no filesystem)\n [\"diff\"] \u2014 show pending changes\n [\"save\"] \u2014 write drafts to Contentful\n [\"discard\"] \u2014 discard unsaved changes\n [\"links\", \"set\", \"@c0\", \"0\", \"variant\", \"link\"] \u2014 set scalar field on link at index 0\n [\"batch\", \"set\", \"<entry-id>:variant=link\"] \u2014 queue scalar edit by entry ID\n [\"batch\", \"diff\"] \u2014 show pending batch edits\n [\"batch\", \"save\"] \u2014 save all batch edits as drafts\n [\"health\"] \u2014 verify config and connectivity\n [\"diagnose\"] \u2014 session/MCP diagnostics (store, userId, active session)\n [\"version\"] \u2014 print installed cms-edit version\n [\"guide\"] \u2014 print getting-started guide\n [\"guide\", \"workflow\"] \u2014 print a guide section\n\nSessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-uses session \"_mcp\" unless you pass --session.\nUse --session <name> before the subcommand to isolate concurrent workflows, e.g. [\"--session\", \"my-work\", \"open\", \"/\"].\nUse --space <name> to target a specific Contentful space (local MCP only \u2014 omit for hosted .mcpb extensions).\nStateless read (no open required): [\"read\", \"<entry-id>\", \"--id\"] or [\"read\", \"<entry-id>\", \"--id\", \"heading\"].\npeek is one-shot (no session): use [\"peek\", \"--page-slug\", \"<slug>\"] or [\"peek\", \"--id\", \"<entry-id>\"]. Includes rootFields in JSON \u2014 no follow-up read required.\nOutput is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).\n\nRich text tips:\n --content \"<markdown>\" preferred named flag for inline content (any length)\n --base64 \"<encoded>\" fully environment-agnostic, no filesystem needed\n --file \"<abs-path>\" platform-native absolute path required (C:\\\\Users\\\\... on Windows)\n stdin (\"-\") not supported via MCP";
|
|
4
4
|
export declare function registerCmsEditTools(server: McpServer, runCmsEdit: RunCmsEditFn): void;
|
|
5
5
|
export declare function getMcpServerInfo(): {
|
|
6
6
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms-edit.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"cms-edit.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/cms-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,gBAAgB,8oIA+CoB,CAAC;AAElD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,GAAG,IAAI,CA8BtF;AAED,wBAAgB,gBAAgB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAEpE"}
|
|
@@ -12,16 +12,16 @@ Workflow: open → snapshot → read/set/rtf/add/remove → diff → save
|
|
|
12
12
|
All saves create drafts only — a human must publish in Contentful.
|
|
13
13
|
|
|
14
14
|
Common command sequences:
|
|
15
|
-
["open", "/pricing"]
|
|
16
|
-
["open", "
|
|
17
|
-
["snapshot"]
|
|
18
|
-
["read", "@c0"]
|
|
19
|
-
["read", "@c0", "heading"]
|
|
20
|
-
["read", "@root"]
|
|
21
|
-
["read", "<entry-id>", "--id"]
|
|
22
|
-
["read", "<entry-id>", "--id", "heading"]
|
|
23
|
-
["peek", "/pricing"]
|
|
24
|
-
["peek", "
|
|
15
|
+
["open", "--page-slug", "/pricing"] — load a page by slug
|
|
16
|
+
["open", "--id", "<entry-id>"] — load by Contentful entry ID
|
|
17
|
+
["snapshot"] — print content tree with @refs
|
|
18
|
+
["read", "@c0"] — read all fields of a component (requires open session)
|
|
19
|
+
["read", "@c0", "heading"] — read a specific field (requires open session)
|
|
20
|
+
["read", "@root"] — read root entry fields (requires open session)
|
|
21
|
+
["read", "<entry-id>", "--id"] — read entry by ID (no session)
|
|
22
|
+
["read", "<entry-id>", "--id", "heading"] — read one field by entry ID (no session)
|
|
23
|
+
["peek", "--page-slug", "/pricing"] — preview tree + root fields (no session)
|
|
24
|
+
["peek", "--id", "<entry-id>"] — preview by entry ID with rootFields in JSON
|
|
25
25
|
["set", "@c0", "heading", "New heading"] — set a scalar field
|
|
26
26
|
["rtf", "@c0", "body", "--content", "# H1\\n\\nBody."] — set rich text (preferred for AI)
|
|
27
27
|
["rtf", "@c0", "body", "--base64", "<encoded>"] — set rich text via base64 (no filesystem)
|
|
@@ -42,7 +42,7 @@ Sessions persist between MCP calls (Redis on hosted, disk locally). MCP auto-use
|
|
|
42
42
|
Use --session <name> before the subcommand to isolate concurrent workflows, e.g. ["--session", "my-work", "open", "/"].
|
|
43
43
|
Use --space <name> to target a specific Contentful space (local MCP only — omit for hosted .mcpb extensions).
|
|
44
44
|
Stateless read (no open required): ["read", "<entry-id>", "--id"] or ["read", "<entry-id>", "--id", "heading"].
|
|
45
|
-
peek is one-shot (no session): use ["peek", "<slug>"] or ["peek", "
|
|
45
|
+
peek is one-shot (no session): use ["peek", "--page-slug", "<slug>"] or ["peek", "--id", "<entry-id>"]. Includes rootFields in JSON — no follow-up read required.
|
|
46
46
|
Output is always JSON (CMS_EDIT_JSON=1 is forced by the MCP server).
|
|
47
47
|
|
|
48
48
|
Rich text tips:
|
package/dist/session/store.js
CHANGED
|
@@ -61,7 +61,7 @@ export async function requireSession(sessionName, configPath) {
|
|
|
61
61
|
store,
|
|
62
62
|
});
|
|
63
63
|
const hint = nameHint ? ` (session: ${nameHint})` : '';
|
|
64
|
-
let message = `No active session${hint}. Run 'cms-edit open <slug>' or 'cms-edit open <id>
|
|
64
|
+
let message = `No active session${hint}. Run 'cms-edit open --page-slug <slug>' or 'cms-edit open --id <id>' first.`;
|
|
65
65
|
if (isJsonMode()) {
|
|
66
66
|
message += ` Debug: userId=${userId ?? 'none'}, sessionName=${nameHint ?? 'default'}, store=${store}`;
|
|
67
67
|
}
|
|
@@ -73,7 +73,7 @@ export async function requireSession(sessionName, configPath) {
|
|
|
73
73
|
if (validSpaceKeys.length > 0 && !validSpaceKeys.includes(session.spaceKey)) {
|
|
74
74
|
throw new Error(`No active session for this project (spaces: ${validSpaceKeys.join(', ')}). ` +
|
|
75
75
|
`The most recent session is for space '${session.spaceKey}', which is not configured here. ` +
|
|
76
|
-
`Run 'cms-edit open <slug>' to start a new session.`);
|
|
76
|
+
`Run 'cms-edit open --page-slug <slug>' to start a new session.`);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
catch (e) {
|
|
@@ -1 +1 @@
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IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,sBAAsB,EAAE,CAAC;YACxC,6CAA6C;QAC/C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/docs/FUNCTIONAL_SPEC.md
CHANGED
|
@@ -89,10 +89,10 @@ Each resolved entry is assigned a stable `@ref` label (`@c0` = the root, `@c1`,
|
|
|
89
89
|
|
|
90
90
|
| Command | Function |
|
|
91
91
|
|---|---|
|
|
92
|
-
| `open <slug>` | Load
|
|
93
|
-
| `open
|
|
94
|
-
| `peek <slug>` | Fetch and display content tree and root field values without creating a session |
|
|
95
|
-
| `peek
|
|
92
|
+
| `open --page-slug <slug>` | Load entry by flat lookup flag (see `docs/help/lookup.md`) |
|
|
93
|
+
| `open --id <id>` | Load by Contentful entry ID |
|
|
94
|
+
| `peek --page-slug <slug>` | Fetch and display content tree and root field values without creating a session |
|
|
95
|
+
| `peek --id <id>` | Same as peek, but look up by Contentful entry ID |
|
|
96
96
|
| `snapshot` | Print the current session's entry tree with @refs, entry types, field labels, and publish status |
|
|
97
97
|
| `read <ref>` | Print all fields of an entry in the active session |
|
|
98
98
|
| `read <ref> <field>` | Print a specific field (rich text rendered as Markdown) |
|
|
@@ -105,8 +105,9 @@ Each resolved entry is assigned a stable `@ref` label (`@c0` = the root, `@c1`,
|
|
|
105
105
|
| `list --type media --asset-id <id>` | List Media entries linked to an asset (index) |
|
|
106
106
|
| `list --type media --asset-filename <name>` | List Media entries by exact asset fileName (index) |
|
|
107
107
|
| `sitemap` | List all pages with their slugs and publish status |
|
|
108
|
-
| `resolve <id>` | Resolve an entry or asset ID to its details |
|
|
109
|
-
| `resolve --
|
|
108
|
+
| `resolve --id <id>` | Resolve an entry or asset ID to its details |
|
|
109
|
+
| `resolve --page-slug <slug>` | Resolve by flat lookup flag (no session). See `docs/help/lookup.md` |
|
|
110
|
+
| `open --page-slug <slug>` | Open a page session (one lookup flag required) |
|
|
110
111
|
|
|
111
112
|
### 7.2 Session Management
|
|
112
113
|
|
|
@@ -148,7 +149,7 @@ Each resolved entry is assigned a stable `@ref` label (`@c0` = the root, `@c1`,
|
|
|
148
149
|
| `create taxonomy-from-json --file <path>` | Batch-create tagType, articleType, and tag entries from JSON |
|
|
149
150
|
| `create tag-type --slug <slug> --name "X"` | Create a tagType entry (draft) |
|
|
150
151
|
| `create article-type --slug <slug> --name "X"` | Create an articleType entry (draft) |
|
|
151
|
-
| `create tag --slug <slug> --name "X" --tag-type <slug>` | Create a tag entry (draft) |
|
|
152
|
+
| `create tag --slug <slug> --name "X" --tag-type <slug>` | Create a tag entry (draft); `--tag-type-slug`, `--tag-type-name`; `--description`, `--featured-image`; cmsLabel auto `"<tagType> — <name>"` |
|
|
152
153
|
| `ensure tag-type\|tag\|article-type …` | Idempotent taxonomy create (returns existing entry when slug matches) |
|
|
153
154
|
| `add <entry-type> --content-type <ct>` | Create a new child entry of a given content type, link it into the current open entry's content array, and assign it a @ref |
|
|
154
155
|
|
|
@@ -190,7 +191,7 @@ Default session name: `batch`. Scalar fields only in v1.
|
|
|
190
191
|
|
|
191
192
|
| Command | Function |
|
|
192
193
|
|---|---|
|
|
193
|
-
| `nav open <
|
|
194
|
+
| `nav open --nav-name <name>` | Open a navigation entry in a session (`--nav-id` also supported) |
|
|
194
195
|
| `nav add --label "X" --slug /page` | Add a navigation item |
|
|
195
196
|
|
|
196
197
|
---
|
|
@@ -292,7 +292,7 @@ If a run fails mid-way (e.g. a missing internal link slug), the page entry is al
|
|
|
292
292
|
```
|
|
293
293
|
✗ Component creation failed: No entry found with slug "/solutions/hepatology".
|
|
294
294
|
✗ The page entry was already created in Contentful (partial state) — ID: 4xKpzQ2abc123, slug: /solutions
|
|
295
|
-
Inspect with: cms-edit open /solutions
|
|
295
|
+
Inspect with: cms-edit open --page-slug /solutions
|
|
296
296
|
Remove with: delete the entry in Contentful at https://app.contentful.com/spaces/...
|
|
297
297
|
Tip: run with --dry-run first to validate all internal link slugs exist.
|
|
298
298
|
```
|
|
@@ -300,7 +300,7 @@ If a run fails mid-way (e.g. a missing internal link slug), the page entry is al
|
|
|
300
300
|
Options:
|
|
301
301
|
1. Delete the partial entry in Contentful, fix the dependency order, and re-run.
|
|
302
302
|
2. Repair the partial entry using `cms-edit run` with targeted `set`/`rtf` operations.
|
|
303
|
-
3. Use `cms-edit open /solutions` + individual `add` operations to rebuild the content.
|
|
303
|
+
3. Use `cms-edit open --page-slug /solutions` + individual `add` operations to rebuild the content.
|
|
304
304
|
|
|
305
305
|
---
|
|
306
306
|
|
|
@@ -366,7 +366,7 @@ Run:
|
|
|
366
366
|
```bash
|
|
367
367
|
cms-edit create from-json --file hepatology.json --dry-run # validate first
|
|
368
368
|
cms-edit create from-json --file hepatology.json # create for real
|
|
369
|
-
cms-edit open /solutions/hepatology
|
|
369
|
+
cms-edit open --page-slug /solutions/hepatology # inspect result
|
|
370
370
|
```
|
|
371
371
|
|
|
372
372
|
---
|
|
@@ -374,7 +374,7 @@ cms-edit open /solutions/hepatology # inspect result
|
|
|
374
374
|
## After Creation
|
|
375
375
|
|
|
376
376
|
Once created:
|
|
377
|
-
1. Run `cms-edit open /<slug>` to inspect the result.
|
|
377
|
+
1. Run `cms-edit open --page-slug /<slug>` to inspect the result.
|
|
378
378
|
2. Fix any field values with `cms-edit set` or `cms-edit rtf`.
|
|
379
379
|
3. Publish in the Contentful web app when ready.
|
|
380
380
|
|
|
@@ -8,7 +8,7 @@ An `article` entry is a blog post or news item. It has a slug, date, article typ
|
|
|
8
8
|
|
|
9
9
|
| Field | Type | Required | Description |
|
|
10
10
|
|---|---|---|---|
|
|
11
|
-
| `slug` | Text | Yes | URL slug without leading slash. Example: `
|
|
11
|
+
| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |
|
|
12
12
|
| `title` | Text | Yes | Article title |
|
|
13
13
|
| `description` | Text | No | SEO meta description / article summary |
|
|
14
14
|
| `cmsLabel` | Text | No | Label in Contentful's entry list. Defaults to `title` |
|
|
@@ -34,7 +34,7 @@ This lists all article type entries with their IDs and slugs. Use the `sys.id` v
|
|
|
34
34
|
## Reading Article Fields
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
cms-edit open /news/2025-hepatology-study
|
|
37
|
+
cms-edit open --article-slug /news/2025-hepatology-study
|
|
38
38
|
cms-edit read @c0 # all fields
|
|
39
39
|
cms-edit read @c0 date
|
|
40
40
|
cms-edit read @c0 description
|
|
@@ -24,7 +24,7 @@ A `collection` entry is a group of components — a card grid, timeline, categor
|
|
|
24
24
|
## Reading Collection Fields
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
cms-edit open /solutions
|
|
27
|
+
cms-edit open --page-slug /solutions
|
|
28
28
|
cms-edit snapshot
|
|
29
29
|
# A collection appears as a nested group in the tree, e.g.:
|
|
30
30
|
# @c3 collection [draft] CardGrid
|
|
@@ -27,7 +27,7 @@ Not all components use all fields — unused fields are simply null.
|
|
|
27
27
|
## Reading Component Fields
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
cms-edit open /solutions/hepatology
|
|
30
|
+
cms-edit open --page-slug /solutions/hepatology
|
|
31
31
|
cms-edit snapshot
|
|
32
32
|
cms-edit read @c1 # all fields on the first component
|
|
33
33
|
cms-edit read @c1 heading # just the heading
|
package/docs/help/fields-page.md
CHANGED
|
@@ -8,7 +8,7 @@ A `page` entry is the root of a web page's content tree. It has a slug, metadata
|
|
|
8
8
|
|
|
9
9
|
| Field | Type | Required | Description |
|
|
10
10
|
|---|---|---|---|
|
|
11
|
-
| `slug` | Text | Yes | URL slug without leading slash. Example: `
|
|
11
|
+
| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |
|
|
12
12
|
| `title` | Text | Yes | Page title used in `<title>` and headings |
|
|
13
13
|
| `description` | Text | No | SEO meta description |
|
|
14
14
|
| `cmsLabel` | Text | No | Label shown in Contentful's entry list. Defaults to `title` |
|
|
@@ -36,7 +36,7 @@ Each array entry is a link to a `component`, `collection`, or `externalComponent
|
|
|
36
36
|
## Reading Page Fields
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
cms-edit open /solutions
|
|
39
|
+
cms-edit open --page-slug /solutions
|
|
40
40
|
cms-edit read @c0 # read all fields on the page entry
|
|
41
41
|
cms-edit read @c0 title # read just the title
|
|
42
42
|
cms-edit read @c0 slug
|
|
@@ -6,10 +6,12 @@ Taxonomy entries (`tagType`, `articleType`, `tag`) can be created as **drafts**
|
|
|
6
6
|
cms-edit create tag-type --slug conference-venue --name "Conference Venue"
|
|
7
7
|
cms-edit create article-type --slug resources/publications --name "Publications"
|
|
8
8
|
cms-edit create tag --slug poster-presentation --name "Poster Presentation" --tag-type presentation-type
|
|
9
|
+
cms-edit create tag --slug easl-congress-2026 --name "EASL Congress 2026" --tag-type publication-source \
|
|
10
|
+
--description "Research presented at EASL Congress 2026." --featured-image <logoAssetId>
|
|
9
11
|
|
|
10
12
|
# Idempotent import helpers
|
|
11
13
|
cms-edit ensure tag-type --slug conference-venue --name "Conference Venue"
|
|
12
|
-
cms-edit resolve --type
|
|
14
|
+
cms-edit resolve --tag-type-slug presentation-type
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
All creates are draft-only. See `cms-edit help taxonomy-from-json` for batch bootstrap.
|
|
@@ -21,7 +23,7 @@ All creates are draft-only. See `cms-edit help taxonomy-from-json` for batch boo
|
|
|
21
23
|
| Field | Type | Required | Description |
|
|
22
24
|
|---|---|---|---|
|
|
23
25
|
| `name` | Text | Yes | Display name |
|
|
24
|
-
| `slug` | Text | No | URL slug
|
|
26
|
+
| `slug` | Text | No | URL slug without leading or trailing slash. Example: `part1/part2`. Optional. |
|
|
25
27
|
| `show` | Boolean | No | Whether tags of this type show visually on cards/detail |
|
|
26
28
|
| `template` | Link (Entry) | No | Template for tag detail pages |
|
|
27
29
|
| `topContent` | Array of Links | No | Content above main area on tag detail |
|
|
@@ -38,7 +40,7 @@ All creates are draft-only. See `cms-edit help taxonomy-from-json` for batch boo
|
|
|
38
40
|
|---|---|---|---|
|
|
39
41
|
| `name` | Text | Yes | Display name |
|
|
40
42
|
| `cmsLabel` | Text | Yes | Label in Contentful entry list (defaults to `--name`) |
|
|
41
|
-
| `slug` | Text | Yes | URL slug
|
|
43
|
+
| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2/part3`. Use `index` for the home page. |
|
|
42
44
|
| `indexPageTitle` | Text | Yes | Title on article index page (defaults to `--name`) |
|
|
43
45
|
| `indexPageDescription` | Text | Yes | Description on article index (defaults to `""`) |
|
|
44
46
|
| `featuredImage` | Link (Asset) | No | Featured image for index/social |
|
|
@@ -71,7 +73,7 @@ All creates are draft-only. See `cms-edit help taxonomy-from-json` for batch boo
|
|
|
71
73
|
| `cmsLabel` | Text | Yes | Label in Contentful (defaults to `--name`) |
|
|
72
74
|
| `name` | Text | Yes | Display name |
|
|
73
75
|
| `tagType` | Link (Entry) | Yes | Parent tagType entry |
|
|
74
|
-
| `slug` | Text | Yes | URL slug
|
|
76
|
+
| `slug` | Text | Yes | URL slug without leading or trailing slash. Example: `part1/part2`. |
|
|
75
77
|
| `description` | Text | No | Short description |
|
|
76
78
|
| `featuredImage` | Link (Asset) | No | Featured image |
|
|
77
79
|
| `visuals` | Array of Links | No | Media/externalVideo entries |
|
|
@@ -145,6 +147,8 @@ These top-level keys resolve to Contentful Entry/Asset links (same conventions a
|
|
|
145
147
|
| `--slug <slug>` | Required URL slug |
|
|
146
148
|
| `--name <name>` | Required display name |
|
|
147
149
|
| `--cms-label <label>` | CMS label (articleType/tag; defaults to name) |
|
|
150
|
+
| `--description <desc>` | Short description (tags only) |
|
|
151
|
+
| `--featured-image <asset-id>` | Asset ID for featured image (tags only) |
|
|
148
152
|
| `--json-file <path>` | Full field spec (see above) |
|
|
149
153
|
| `--if-not-exists` | Return existing entry ID when slug matches (exit 0) |
|
|
150
154
|
| `--dry-run` | Validate field build and link resolution without writing |
|
package/docs/help/index-sync.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Content index sync
|
|
2
2
|
|
|
3
|
-
cms-edit keeps a **local SQLite index** per space/environment for fast asset, media, and
|
|
3
|
+
cms-edit keeps a **local SQLite index** per space/environment for fast asset, media, and **content catalog** discovery. The default index is built from the **Content Preview API** (draft content) — matching cms-edit’s draft-only workflow.
|
|
4
4
|
|
|
5
5
|
## What gets indexed
|
|
6
6
|
|
|
@@ -8,7 +8,21 @@ cms-edit keeps a **local SQLite index** per space/environment for fast asset, me
|
|
|
8
8
|
|-------|---------|
|
|
9
9
|
| `assets` | All CDN assets (filename, title, MIME, dimensions) |
|
|
10
10
|
| `media` | Media wrapper entries linked to assets |
|
|
11
|
-
| `reference_entries` |
|
|
11
|
+
| `reference_entries` | Content catalog metadata (no content trees) |
|
|
12
|
+
|
|
13
|
+
### Catalog content types (schema v3)
|
|
14
|
+
|
|
15
|
+
Typically fewer than ~1000 rows each: `page`, `article`, `pageVariant`, `template`, `articleType`, `tagType`, `tag`, `navigation`, `navigationItem`.
|
|
16
|
+
|
|
17
|
+
Each catalog row stores:
|
|
18
|
+
|
|
19
|
+
| Column | Purpose |
|
|
20
|
+
|--------|---------|
|
|
21
|
+
| `slug` | Normalized URL slug when the type has `slug` |
|
|
22
|
+
| `label` | List line: `title`, `name`, or template cmsLabel |
|
|
23
|
+
| `cmsLabel` | `cmsLabel` when present (page, article, pageVariant, tag, template) |
|
|
24
|
+
| `tagTypeSlug` | Parent tag type slug (tags only) |
|
|
25
|
+
| `articleTypeSlug` | Parent article type slug (articles only) |
|
|
12
26
|
|
|
13
27
|
## When you need it
|
|
14
28
|
|
|
@@ -21,18 +35,16 @@ These commands **require** a built index:
|
|
|
21
35
|
- `cms-edit asset upload --if-exists-by-filename` (lookup uses the index)
|
|
22
36
|
- `*AssetFilename` keys in `create from-json`
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
Catalog commands **prefer** the index when present (CMA fallback if a row is missing):
|
|
25
39
|
|
|
26
|
-
- `cms-edit list --type template|articleType|tagType|tag`
|
|
27
|
-
- `cms-edit
|
|
28
|
-
- `cms-edit resolve --type articleType|tagType|tag --slug …`
|
|
29
|
-
- `cms-edit resolve --type template --label …` (or `--slug` as cmsLabel alias)
|
|
40
|
+
- `cms-edit list --type page|article|pageVariant|template|articleType|tagType|tag|navigation|navigationItem`
|
|
41
|
+
- `cms-edit open`, `cms-edit resolve`, `cms-edit nav open` — see [lookup.md](./lookup.md)
|
|
30
42
|
- `cms-edit create … --if-not-exists` / `ensure` for taxonomy
|
|
31
|
-
- `tagTypeSlug` shorthands in JSON create flows
|
|
43
|
+
- `tagTypeSlug` / `tagTypeName` shorthands in JSON create flows
|
|
32
44
|
|
|
33
|
-
For `--type template`, `--slug` filters by **cmsLabel** (not URL slug).
|
|
45
|
+
For `--type template`, `--slug` filters by **cmsLabel** (not URL slug).
|
|
34
46
|
|
|
35
|
-
|
|
47
|
+
Use `--force-cma` on `list` to bypass the catalog and paginate via CMA.
|
|
36
48
|
|
|
37
49
|
## Commands
|
|
38
50
|
|
|
@@ -40,6 +52,11 @@ General `cms-edit list --type media` without asset filters still uses the manage
|
|
|
40
52
|
# Full rebuild (draft/preview content — default)
|
|
41
53
|
cms-edit index sync
|
|
42
54
|
|
|
55
|
+
# Progress on stderr (per-page fetches, catalog types, SQLite write)
|
|
56
|
+
cms-edit index sync --verbose
|
|
57
|
+
# Same via env (also applies to automatic background sync):
|
|
58
|
+
LOG_CMS_INDEX=1 cms-edit index sync
|
|
59
|
+
|
|
43
60
|
# Check freshness and row counts
|
|
44
61
|
cms-edit index status
|
|
45
62
|
|
|
@@ -49,7 +66,7 @@ cms-edit index dump --all
|
|
|
49
66
|
cms-edit index dump --type image/ -n 20
|
|
50
67
|
cms-edit index dump --assets-only --skip 50
|
|
51
68
|
cms-edit index dump --reference-only
|
|
52
|
-
cms-edit index dump --reference-type
|
|
69
|
+
cms-edit index dump --reference-type page
|
|
53
70
|
|
|
54
71
|
# Published content only (separate database file suffix -published)
|
|
55
72
|
cms-edit index sync --published
|
|
@@ -65,15 +82,15 @@ Commands that depend on the index call **`ensureContentIndex`** internally. You
|
|
|
65
82
|
| Condition | Auto-sync behaviour |
|
|
66
83
|
|-----------|---------------------|
|
|
67
84
|
| Index missing | **Full** rebuild |
|
|
68
|
-
| Schema version outdated (e.g.
|
|
85
|
+
| Schema version outdated (e.g. v2 → v3) | **Full** rebuild |
|
|
69
86
|
| Last sync older than **24 hours** | **Incremental** upsert (`sys.updatedAt[gte]` last `syncedAt`) |
|
|
70
87
|
| Index fresh | No sync |
|
|
71
88
|
|
|
72
89
|
Manual `cms-edit index sync` always performs a **full** rebuild.
|
|
73
90
|
|
|
74
|
-
**Incremental limitations:** Only rows changed since the last sync are fetched. Entries deleted in Contentful may remain in the index until the next full `index sync`. Duplicate slug/label rows in the index cause
|
|
91
|
+
**Incremental limitations:** Only rows changed since the last sync are fetched. Entries deleted in Contentful may remain in the index until the next full `index sync`. Duplicate slug/label/cmsLabel rows in the index cause lookup commands to fail with an explicit error (fix in Contentful, then full sync).
|
|
75
92
|
|
|
76
|
-
**Single writer:** Only one cms-edit process syncs a given database at a time (file lock beside `media.db`).
|
|
93
|
+
**Single writer:** Only one cms-edit process syncs a given database at a time (file lock beside `media.db`). If another sync is in progress, the command **fails immediately** (exit code 1) with the lock path and holder pid/start time. Stale locks (>30 min or dead pid) are removed automatically.
|
|
77
94
|
|
|
78
95
|
## Preview / delivery API token
|
|
79
96
|
|
|
@@ -100,9 +117,10 @@ If CMA cannot read API keys, set `previewAccessToken` or `deliveryAccessToken` m
|
|
|
100
117
|
```bash
|
|
101
118
|
cms-edit index sync
|
|
102
119
|
cms-edit asset search --filename-match 'istock.*'
|
|
103
|
-
cms-edit list --type
|
|
104
|
-
cms-edit list --type
|
|
105
|
-
cms-edit resolve --type
|
|
120
|
+
cms-edit list --type page
|
|
121
|
+
cms-edit list --type article --article-type-name "Publications"
|
|
122
|
+
cms-edit resolve --tag-type-slug topic
|
|
123
|
+
cms-edit open --page-slug /about
|
|
106
124
|
```
|
|
107
125
|
|
|
108
|
-
See [MEDIA_INDEX_PLAN.md](../MEDIA_INDEX_PLAN.md) for architecture details.
|
|
126
|
+
See [lookup.md](./lookup.md) for all `open` / `resolve` flags. See [MEDIA_INDEX_PLAN.md](../MEDIA_INDEX_PLAN.md) for architecture details.
|
package/docs/help/index.md
CHANGED
|
@@ -27,7 +27,8 @@ Available topics for `cms-edit help <topic>`:
|
|
|
27
27
|
| `fields-component` | All fields on a `component` entry |
|
|
28
28
|
| `fields-collection` | All fields on a `collection` entry |
|
|
29
29
|
| `fields-taxonomy` | All fields on `tagType`, `articleType`, and `tag` entries |
|
|
30
|
-
| `index-sync` | Build and use the local
|
|
30
|
+
| `index-sync` | Build and use the local content index (CDA sync) |
|
|
31
|
+
| `lookup` | Flat flags for `open`, `resolve`, and `nav open` |
|
|
31
32
|
|
|
32
33
|
---
|
|
33
34
|
|
|
@@ -38,7 +39,7 @@ Available topics for `cms-edit help <topic>`:
|
|
|
38
39
|
cms-edit sitemap
|
|
39
40
|
|
|
40
41
|
# Open a page and inspect it
|
|
41
|
-
cms-edit open /about
|
|
42
|
+
cms-edit open --page-slug /about
|
|
42
43
|
cms-edit snapshot
|
|
43
44
|
|
|
44
45
|
# Edit a field
|
|
@@ -67,10 +68,10 @@ cms-edit run --file patch.json
|
|
|
67
68
|
### Navigation & Discovery
|
|
68
69
|
| Command | Description |
|
|
69
70
|
|---|---|
|
|
70
|
-
| `open <slug>` | Load a page
|
|
71
|
-
| `open
|
|
72
|
-
| `peek <slug>` | Print content tree + root field values without creating a session |
|
|
73
|
-
| `peek
|
|
71
|
+
| `open --page-slug <slug>` | Load a page into the session (see `help lookup`) |
|
|
72
|
+
| `open --id <id>` | Load by Contentful entry ID |
|
|
73
|
+
| `peek --page-slug <slug>` | Print content tree + root field values without creating a session |
|
|
74
|
+
| `peek --id <id>` | Same by Contentful entry ID |
|
|
74
75
|
| `snapshot` | Re-print the current session's content tree with @refs |
|
|
75
76
|
| `read [@ref] [field]` | Read fields from the active session (@refs from snapshot) |
|
|
76
77
|
| `read <id> --id [field]` | Read entry fields by ID without an open session |
|
|
@@ -78,7 +79,7 @@ cms-edit run --file patch.json
|
|
|
78
79
|
| `list --type <ct>` | List all entries of a content type |
|
|
79
80
|
| `search <query>` | Full-text search across entries |
|
|
80
81
|
| `resolve <id>` | Resolve a Contentful entry or asset ID |
|
|
81
|
-
| `resolve --
|
|
82
|
+
| `resolve --page-slug <slug>` | Resolve an entry by flat lookup flag (no session); see `help lookup` |
|
|
82
83
|
| `ensure tag-type\|tag\|article-type …` | Idempotent taxonomy create (returns existing entry if slug matches) |
|
|
83
84
|
| `types` | List valid type-discriminator values |
|
|
84
85
|
| `colours` | List valid backgroundColour / textColour values |
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Flat lookup flags (`open`, `resolve`, `nav open`)
|
|
2
|
+
|
|
3
|
+
cms-edit resolves entries using **explicit flags** — not positional slugs. Provide **exactly one** primary lookup flag per command. Scope flags (for example `--tag-type-name` with `--tag-name`) do not count as a second primary.
|
|
4
|
+
|
|
5
|
+
Run `cms-edit index sync` once per space (or let commands auto-sync) so catalog types resolve from the local index.
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
| Command | Purpose |
|
|
10
|
+
|---------|---------|
|
|
11
|
+
| `cms-edit open` | Start an editing session |
|
|
12
|
+
| `cms-edit peek` | Preview tree + root fields without a session |
|
|
13
|
+
| `cms-edit resolve` | Print entry summary or `--json` (no session) |
|
|
14
|
+
| `cms-edit nav open` | Open a `navigation` entry session |
|
|
15
|
+
|
|
16
|
+
## Entry ID
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cms-edit open --id 4xKj2abcDefGhijK
|
|
20
|
+
cms-edit resolve --id 4xKj2abcDefGhijK
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Pages
|
|
24
|
+
|
|
25
|
+
| Flag | Contentful field |
|
|
26
|
+
|------|------------------|
|
|
27
|
+
| `--page-slug` | `slug` (leading/trailing `/` stripped) |
|
|
28
|
+
| `--page-title` | `title` |
|
|
29
|
+
| `--page-cms-label` | `cmsLabel` |
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cms-edit open --page-slug /pricing/
|
|
33
|
+
cms-edit peek --page-slug /pricing/
|
|
34
|
+
cms-edit open --page-cms-label "Hepatology Solutions Page"
|
|
35
|
+
cms-edit resolve --page-title "Test page for nick"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Articles
|
|
39
|
+
|
|
40
|
+
| Flag | Contentful field |
|
|
41
|
+
|------|------------------|
|
|
42
|
+
| `--article-slug` | `slug` |
|
|
43
|
+
| `--article-title` | `title` |
|
|
44
|
+
| `--article-cms-label` | `cmsLabel` |
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cms-edit open --article-slug resources/publications/my-post
|
|
48
|
+
cms-edit list --type article --article-type-name "Publications"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Page variants
|
|
52
|
+
|
|
53
|
+
| Flag | Contentful field |
|
|
54
|
+
|------|------------------|
|
|
55
|
+
| `--page-variant-slug` | `slug` |
|
|
56
|
+
| `--page-variant-title` | `title` |
|
|
57
|
+
| `--page-variant-cms-label` | `cmsLabel` |
|
|
58
|
+
|
|
59
|
+
## Taxonomy
|
|
60
|
+
|
|
61
|
+
| Type | Slug | Name | cmsLabel |
|
|
62
|
+
|------|------|------|----------|
|
|
63
|
+
| tag | `--tag-slug` | `--tag-name` | `--tag-cms-label` |
|
|
64
|
+
| tagType | `--tag-type-slug` | `--tag-type-name` | — |
|
|
65
|
+
| articleType | `--article-type-slug` | `--article-type-name` | — |
|
|
66
|
+
|
|
67
|
+
Scope tags under a tag type (optional):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cms-edit resolve --tag-name "Hepatology" --tag-type-name "Therapeutic Area"
|
|
71
|
+
cms-edit list --type tag --tag-type-slug therapeutic-area
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Templates use **cmsLabel** only:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
cms-edit open --template-label "Default page template"
|
|
78
|
+
cms-edit resolve --label "Default page template" # alias for --template-label
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Navigation
|
|
82
|
+
|
|
83
|
+
Navigation entries use the **`name`** field (not slug).
|
|
84
|
+
|
|
85
|
+
| Flag | Resolves |
|
|
86
|
+
|------|----------|
|
|
87
|
+
| `--nav-id` | `navigation` entry ID |
|
|
88
|
+
| `--nav-name` | `navigation.fields.name` |
|
|
89
|
+
| `--nav-item-id` | `navigationItem` entry ID |
|
|
90
|
+
| `--nav-item-title` | `navigationItem.fields.title` |
|
|
91
|
+
|
|
92
|
+
When multiple nav items share a title, add **`--nav-id`** to scope:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
cms-edit nav open --nav-name "Main header"
|
|
96
|
+
cms-edit resolve --nav-item-title "Contact" --nav-id <navigation-entry-id>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## List filters (index)
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cms-edit list --type page
|
|
103
|
+
cms-edit list --type article --article-type-slug resources/publications
|
|
104
|
+
cms-edit list --type tag --tag-type-name "Therapeutic Area"
|
|
105
|
+
cms-edit list --type navigation
|
|
106
|
+
cms-edit list --type navigationItem
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use `--force-cma` to paginate via the Management API instead of the catalog.
|
|
110
|
+
|
|
111
|
+
## Breaking changes (1.x → catalog flags)
|
|
112
|
+
|
|
113
|
+
| Old | New |
|
|
114
|
+
|-----|-----|
|
|
115
|
+
| `cms-edit open /pricing` | `cms-edit open --page-slug pricing` |
|
|
116
|
+
| `cms-edit peek /pricing` | `cms-edit peek --page-slug pricing` |
|
|
117
|
+
| `cms-edit open <id> --id` | `cms-edit open --id <id>` |
|
|
118
|
+
| `cms-edit nav open footer` | `cms-edit nav open --nav-name "Footer"` |
|
|
119
|
+
| `cms-edit resolve --type tag --slug x` | `cms-edit resolve --tag-slug x` |
|
|
120
|
+
|
|
121
|
+
## Ambiguity
|
|
122
|
+
|
|
123
|
+
If two entries share the same slug, title, or cmsLabel in the index, cms-edit prints all matching IDs and exits with an error. Fix duplicates in Contentful or resolve by `--id`.
|
package/docs/help/run.md
CHANGED