@se-studio/contentful-cms 1.1.0 → 1.2.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/CHANGELOG.md +58 -0
- package/HOSTED.md +1 -1
- package/README.md +25 -17
- package/dist/commands/asset.d.ts.map +1 -1
- package/dist/commands/asset.js +6 -5
- package/dist/commands/asset.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 +30 -8
- package/dist/commands/create-taxonomy.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +19 -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-dump.d.ts +2 -0
- package/dist/commands/index-dump.d.ts.map +1 -1
- package/dist/commands/index-dump.js +53 -7
- package/dist/commands/index-dump.js.map +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +26 -20
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +84 -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 +104 -86
- 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/commands/skill.d.ts.map +1 -1
- package/dist/commands/skill.js +11 -35
- package/dist/commands/skill.js.map +1 -1
- package/dist/contentful/asset-link-from-json.d.ts +1 -1
- package/dist/contentful/asset-link-from-json.d.ts.map +1 -1
- package/dist/contentful/asset-link-from-json.js +3 -3
- package/dist/contentful/asset-link-from-json.js.map +1 -1
- package/dist/contentful/cda-sync.d.ts +11 -3
- package/dist/contentful/cda-sync.d.ts.map +1 -1
- package/dist/contentful/cda-sync.js +158 -4
- 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 +31 -3
- 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 +8 -2
- package/dist/contentful/fetch.js.map +1 -1
- package/dist/contentful/field-value-from-json.d.ts.map +1 -1
- package/dist/contentful/field-value-from-json.js +5 -5
- package/dist/contentful/field-value-from-json.js.map +1 -1
- package/dist/contentful/reference-record.d.ts +41 -0
- package/dist/contentful/reference-record.d.ts.map +1 -0
- package/dist/contentful/reference-record.js +99 -0
- package/dist/contentful/reference-record.js.map +1 -0
- 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 +6 -4
- 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/errors.d.ts +18 -0
- package/dist/index/errors.d.ts.map +1 -0
- package/dist/index/errors.js +18 -0
- package/dist/index/errors.js.map +1 -0
- package/dist/index/query.d.ts +41 -0
- package/dist/index/query.d.ts.map +1 -1
- package/dist/index/query.js +181 -0
- package/dist/index/query.js.map +1 -1
- package/dist/index/reference-lookup.d.ts +18 -0
- package/dist/index/reference-lookup.d.ts.map +1 -0
- package/dist/index/reference-lookup.js +119 -0
- package/dist/index/reference-lookup.js.map +1 -0
- package/dist/index/require.d.ts +13 -8
- package/dist/index/require.d.ts.map +1 -1
- package/dist/index/require.js +49 -17
- package/dist/index/require.js.map +1 -1
- package/dist/index/run-sync.d.ts +20 -0
- package/dist/index/run-sync.d.ts.map +1 -0
- package/dist/index/run-sync.js +69 -0
- package/dist/index/run-sync.js.map +1 -0
- package/dist/index/schema.d.ts +11 -2
- package/dist/index/schema.d.ts.map +1 -1
- package/dist/index/schema.js +37 -1
- package/dist/index/schema.js.map +1 -1
- package/dist/index/sync-lock.d.ts +9 -0
- package/dist/index/sync-lock.d.ts.map +1 -0
- package/dist/index/sync-lock.js +98 -0
- package/dist/index/sync-lock.js.map +1 -0
- 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 +14 -1
- package/dist/index/sync.d.ts.map +1 -1
- package/dist/index/sync.js +139 -17
- package/dist/index/sync.js.map +1 -1
- package/dist/mcp/guide.d.ts +2 -2
- package/dist/mcp/guide.d.ts.map +1 -1
- package/dist/mcp/guide.js +3 -0
- package/dist/mcp/guide.js.map +1 -1
- package/dist/mcp/prompts/onboarding.d.ts.map +1 -1
- package/dist/mcp/prompts/onboarding.js +61 -0
- package/dist/mcp/prompts/onboarding.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/output/json.d.ts +6 -0
- package/dist/output/json.d.ts.map +1 -1
- package/dist/output/json.js +21 -0
- package/dist/output/json.js.map +1 -1
- package/dist/session/store.js +2 -2
- package/dist/session/store.js.map +1 -1
- package/dist/setup/wizard.d.ts.map +1 -1
- package/dist/setup/wizard.js +23 -1
- package/dist/setup/wizard.js.map +1 -1
- package/dist/skills/install.d.ts +13 -0
- package/dist/skills/install.d.ts.map +1 -0
- package/dist/skills/install.js +37 -0
- package/dist/skills/install.js.map +1 -0
- package/docs/FUNCTIONAL_SPEC.md +9 -8
- package/docs/MEDIA_INDEX_PLAN.md +19 -1
- package/docs/SKILLS.md +29 -0
- 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 +64 -11
- 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 +20 -5
- package/package.json +5 -4
- package/skills/README.md +30 -0
- package/skills/core/SKILL.md +882 -0
- package/skills/manifest.json +5 -0
- package/skills/setup/SKILL.md +129 -0
- package/skills/templates/SKILL.md +21 -0
- package/dist/commands/resolve-options.d.ts +0 -13
- package/dist/commands/resolve-options.d.ts.map +0 -1
- package/dist/commands/resolve-options.js +0 -29
- package/dist/commands/resolve-options.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/session/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIzD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC;AACvE,CAAC;AAED,SAAS,qBAAqB;IAC5B,OAAO,iBAAiB,EAAE,EAAE,YAAY,IAAI,uBAAuB,CAAC;AACtE,CAAC;AAED,KAAK,UAAU,kBAAkB,CAAI,KAAqB;IACxD,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACtC,C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,EAAE,CAAC;QACxG,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;QACtC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5E,MAAM,IAAI,KAAK,CACb,+CAA+C,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;gBAC3E,yCAAyC,OAAO,CAAC,QAAQ,mCAAmC;gBAC5F,gEAAgE,CACnE,CAAC;QACJ,CAAC;IACH,CAAC;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../src/setup/wizard.ts"],"names":[],"mappings":";AACA,uFAAuF;
|
|
1
|
+
{"version":3,"file":"wizard.d.ts","sourceRoot":"","sources":["../../src/setup/wizard.ts"],"names":[],"mappings":";AACA,uFAAuF;AAyIvF,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CA4LpD"}
|
package/dist/setup/wizard.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
4
|
import * as os from 'node:os';
|
|
5
5
|
import * as path from 'node:path';
|
|
6
|
-
import { cancel, intro, isCancel, log, outro, password, select, spinner, text, } from '@clack/prompts';
|
|
6
|
+
import { cancel, confirm, intro, isCancel, log, outro, password, select, spinner, text, } from '@clack/prompts';
|
|
7
|
+
import { installBundledSkills } from '../skills/install.js';
|
|
7
8
|
async function fetchSpaces(token) {
|
|
8
9
|
const res = await fetch('https://api.contentful.com/spaces?limit=100', {
|
|
9
10
|
headers: { Authorization: `Bearer ${token}` },
|
|
@@ -228,6 +229,27 @@ export async function runSetupWizard() {
|
|
|
228
229
|
};
|
|
229
230
|
writeClaudeDesktopConfig(claudeConfigPath, claudeConfig);
|
|
230
231
|
log.success(`Updated: ${claudeConfigPath}`);
|
|
232
|
+
const installSkills = await confirm({
|
|
233
|
+
message: 'Install cms-edit skills into this project (.agents/skills)?',
|
|
234
|
+
initialValue: true,
|
|
235
|
+
});
|
|
236
|
+
if (isCancel(installSkills)) {
|
|
237
|
+
cancel('Setup cancelled.');
|
|
238
|
+
process.exit(0);
|
|
239
|
+
}
|
|
240
|
+
if (installSkills) {
|
|
241
|
+
try {
|
|
242
|
+
const { installed } = installBundledSkills(['core', 'templates'], process.cwd());
|
|
243
|
+
for (const { dest } of installed) {
|
|
244
|
+
log.success(`Installed skill: ${dest}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
log.warn(err instanceof Error
|
|
249
|
+
? err.message
|
|
250
|
+
: 'Could not install skills — run cms-edit skill install later.');
|
|
251
|
+
}
|
|
252
|
+
}
|
|
231
253
|
outro('All done!\n\n' +
|
|
232
254
|
'Next steps:\n' +
|
|
233
255
|
' 1. Fully quit Claude Desktop and reopen it\n' +
|
package/dist/setup/wizard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["../../src/setup/wizard.ts"],"names":[],"mappings":";AACA,uFAAuF;AAEvF,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,MAAM,EACN,K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,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function getSkillsManifest(): Record<string, string>;
|
|
2
|
+
export declare function getDefaultSkillsInstallDir(cwd?: string): string;
|
|
3
|
+
export interface InstallSkillsResult {
|
|
4
|
+
installed: Array<{
|
|
5
|
+
name: string;
|
|
6
|
+
dest: string;
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Installs bundled cms-edit skills into `.agents/skills/contentful-cms-<name>/`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function installBundledSkills(skillNames: string[], installDir?: string): InstallSkillsResult;
|
|
13
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/skills/install.ts"],"names":[],"mappings":"AASA,wBAAgB,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAG1D;AAED,wBAAgB,0BAA0B,CAAC,GAAG,SAAgB,GAAG,MAAM,CAEtE;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAAE,EACpB,UAAU,SAA+B,GACxC,mBAAmB,CAsBrB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const packageRoot = path.resolve(__dirname, '..', '..');
|
|
6
|
+
const skillsDir = path.join(packageRoot, 'skills');
|
|
7
|
+
const MANIFEST_PATH = path.join(skillsDir, 'manifest.json');
|
|
8
|
+
export function getSkillsManifest() {
|
|
9
|
+
const raw = fs.readFileSync(MANIFEST_PATH, 'utf8');
|
|
10
|
+
return JSON.parse(raw);
|
|
11
|
+
}
|
|
12
|
+
export function getDefaultSkillsInstallDir(cwd = process.cwd()) {
|
|
13
|
+
return path.join(cwd, '.agents', 'skills');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Installs bundled cms-edit skills into `.agents/skills/contentful-cms-<name>/`.
|
|
17
|
+
*/
|
|
18
|
+
export function installBundledSkills(skillNames, installDir = getDefaultSkillsInstallDir()) {
|
|
19
|
+
const manifest = getSkillsManifest();
|
|
20
|
+
const installed = [];
|
|
21
|
+
for (const name of skillNames) {
|
|
22
|
+
if (!(name in manifest)) {
|
|
23
|
+
throw new Error(`Unknown skill: ${name}. Available: ${Object.keys(manifest).join(', ')}`);
|
|
24
|
+
}
|
|
25
|
+
const src = path.join(skillsDir, name, 'SKILL.md');
|
|
26
|
+
if (!fs.existsSync(src)) {
|
|
27
|
+
throw new Error(`Skill file not found: ${src}`);
|
|
28
|
+
}
|
|
29
|
+
const destDir = path.join(installDir, `contentful-cms-${name}`);
|
|
30
|
+
const dest = path.join(destDir, 'SKILL.md');
|
|
31
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
32
|
+
fs.copyFileSync(src, dest);
|
|
33
|
+
installed.push({ name, dest });
|
|
34
|
+
}
|
|
35
|
+
return { installed };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/skills/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC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AE,CAAC,CAAC;QAClD,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,kBAAkB,IAAI,EAAE,CAAC,CAAC;QAChE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC5C,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACvB,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
|
---
|
package/docs/MEDIA_INDEX_PLAN.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
- SQLite index at `~/.contentful-cms/index/<spaceId>/<environment>/media.db` via `node:sqlite`
|
|
9
9
|
- Delivery token resolution: `deliveryAccessToken` → `deliveryApiKeyName` → environment match → optional `autoCreateDeliveryApiKey`
|
|
10
10
|
- **Index required** (no CMA fallback) for: `asset search`, `asset audit`, `list --type media` with `--asset-id` / `--asset-filename*`, upload `--if-exists-by-filename`
|
|
11
|
+
- **Reference catalog** (index-preferred, CMA fallback): `template`, `articleType`, `tagType`, `tag` in `reference_entries` table (schema v2)
|
|
12
|
+
- `list --type template|articleType|tagType|tag`, `resolve --type … --slug`, taxonomy `--if-not-exists`, and `tagTypeSlug` shorthands use the catalog when the index exists
|
|
11
13
|
- Bulk CMA asset pagination and N+1 `links_to_asset` scans removed from those paths
|
|
12
14
|
|
|
13
15
|
Help: [help/index-sync.md](./help/index-sync.md).
|
|
@@ -199,9 +201,25 @@ Webhook-driven incremental sync is out of scope for v1 but fits the same schema.
|
|
|
199
201
|
- [x] `list --type media --asset-id` / `--asset-filename*` without N+1 CMA
|
|
200
202
|
- [x] JSON output for indexed media list
|
|
201
203
|
|
|
204
|
+
### Phase 3b — Reference catalog
|
|
205
|
+
|
|
206
|
+
- [x] Index `template`, `articleType`, `tagType`, `tag` in `reference_entries` (schema v2)
|
|
207
|
+
- [x] `list --type` for reference types from index (`--force-cma` escape hatch)
|
|
208
|
+
- [x] `resolve --type … --slug` and taxonomy `--if-not-exists` prefer index
|
|
209
|
+
- [x] Post-create upsert for taxonomy and template creates
|
|
210
|
+
- [x] `index dump --reference-only` / `--reference-type`
|
|
211
|
+
|
|
212
|
+
### Phase 3c — Auto-sync and incremental refresh
|
|
213
|
+
|
|
214
|
+
- [x] `ensureContentIndex` — auto full rebuild when missing or schema mismatch
|
|
215
|
+
- [x] Incremental upsert when only stale (>24h), same schema (`sys.updatedAt[gte]` last `syncedAt`)
|
|
216
|
+
- [x] Manual `index sync` always full rebuild
|
|
217
|
+
- [x] File lock — single writer per index database
|
|
218
|
+
- [x] Duplicate slug/label detection in reference catalog (index + CMA)
|
|
219
|
+
|
|
202
220
|
### Phase 4 — Operator UX
|
|
203
221
|
|
|
204
|
-
- [x]
|
|
222
|
+
- [x] Auto-sync on index-backed commands (see [help/index-sync.md](./help/index-sync.md))
|
|
205
223
|
- [ ] Optional `index sync` before bulk upload scripts (skill note — partial)
|
|
206
224
|
- [ ] MCP tool exposure if hosted MCP should search assets
|
|
207
225
|
|
package/docs/SKILLS.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# cms-edit and agent skills
|
|
2
|
+
|
|
3
|
+
## Two skill channels
|
|
4
|
+
|
|
5
|
+
| Channel | Package | Install | Use case |
|
|
6
|
+
|---------|---------|---------|----------|
|
|
7
|
+
| **Full SE Studio skills** | `@se-studio/skills` | `npx skills add @se-studio/skills` or `pnpm skills:sync` in monorepo | Marketing sites, CMS guidelines, app tasks |
|
|
8
|
+
| **Bundled cms-edit skills** | `@se-studio/contentful-cms` | `cms-edit skill install` | Minimal set shipped with the CLI (`core`, `templates`, `setup`) |
|
|
9
|
+
|
|
10
|
+
## Where to edit
|
|
11
|
+
|
|
12
|
+
1. **Always edit** `packages/skills/skills/<skill-dir>/SKILL.md` in this monorepo.
|
|
13
|
+
2. Run `pnpm skills:validate` then `pnpm skills:sync` to update `.agents/skills/`.
|
|
14
|
+
3. Bundled cms-edit copies are regenerated by `pnpm --filter @se-studio/contentful-cms sync:skills` (also runs on `build` and `test`).
|
|
15
|
+
|
|
16
|
+
Never edit:
|
|
17
|
+
|
|
18
|
+
- `.agents/skills/` or `.cursor/skills/` by hand (generated)
|
|
19
|
+
- `packages/contentful-cms/skills/` by hand (generated — see `skills/README.md`)
|
|
20
|
+
- `.claude/skills/` in the repo (untracked local installs; not a source of truth)
|
|
21
|
+
|
|
22
|
+
## `.claude/skills` vs `.agents/skills`
|
|
23
|
+
|
|
24
|
+
- **`.agents/skills/`** — Monorepo target for `pnpm skills:sync`; gitignored; symlinked to `.cursor/skills/`.
|
|
25
|
+
- **`.claude/skills/`** — Optional per-machine path used by some Claude setups; **intentionally untracked**. Skills should come from this repo (`@se-studio/skills`, `cms-edit skill install`) or third-party skill packs — not from committed copies under `.claude/`.
|
|
26
|
+
|
|
27
|
+
## Setup wizard
|
|
28
|
+
|
|
29
|
+
`cms-edit-setup` can install bundled `core` and `templates` skills into `.agents/skills/` in the current project.
|
|
@@ -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,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Content index sync
|
|
2
2
|
|
|
3
|
-
cms-edit keeps a **local SQLite index** per space/environment for fast asset 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
|
+
|
|
5
|
+
## What gets indexed
|
|
6
|
+
|
|
7
|
+
| Table | Content |
|
|
8
|
+
|-------|---------|
|
|
9
|
+
| `assets` | All CDN assets (filename, title, MIME, dimensions) |
|
|
10
|
+
| `media` | Media wrapper entries linked to assets |
|
|
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) |
|
|
4
26
|
|
|
5
27
|
## When you need it
|
|
6
28
|
|
|
@@ -11,8 +33,18 @@ These commands **require** a built index:
|
|
|
11
33
|
- `cms-edit list --type media --asset-id <id>`
|
|
12
34
|
- `cms-edit list --type media --asset-filename …` / `--asset-filename-match …`
|
|
13
35
|
- `cms-edit asset upload --if-exists-by-filename` (lookup uses the index)
|
|
36
|
+
- `*AssetFilename` keys in `create from-json`
|
|
37
|
+
|
|
38
|
+
Catalog commands **prefer** the index when present (CMA fallback if a row is missing):
|
|
39
|
+
|
|
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)
|
|
42
|
+
- `cms-edit create … --if-not-exists` / `ensure` for taxonomy
|
|
43
|
+
- `tagTypeSlug` / `tagTypeName` shorthands in JSON create flows
|
|
44
|
+
|
|
45
|
+
For `--type template`, `--slug` filters by **cmsLabel** (not URL slug).
|
|
14
46
|
|
|
15
|
-
|
|
47
|
+
Use `--force-cma` on `list` to bypass the catalog and paginate via CMA.
|
|
16
48
|
|
|
17
49
|
## Commands
|
|
18
50
|
|
|
@@ -20,6 +52,11 @@ General `cms-edit list --type media` without asset filters still uses the manage
|
|
|
20
52
|
# Full rebuild (draft/preview content — default)
|
|
21
53
|
cms-edit index sync
|
|
22
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
|
+
|
|
23
60
|
# Check freshness and row counts
|
|
24
61
|
cms-edit index status
|
|
25
62
|
|
|
@@ -28,6 +65,8 @@ cms-edit index dump
|
|
|
28
65
|
cms-edit index dump --all
|
|
29
66
|
cms-edit index dump --type image/ -n 20
|
|
30
67
|
cms-edit index dump --assets-only --skip 50
|
|
68
|
+
cms-edit index dump --reference-only
|
|
69
|
+
cms-edit index dump --reference-type page
|
|
31
70
|
|
|
32
71
|
# Published content only (separate database file suffix -published)
|
|
33
72
|
cms-edit index sync --published
|
|
@@ -36,6 +75,23 @@ cms-edit index status --published
|
|
|
36
75
|
|
|
37
76
|
Index path: `~/.contentful-cms/index/<spaceId>/<environment>/media.db` (add `-published` suffix for published-only mode).
|
|
38
77
|
|
|
78
|
+
## Automatic sync (simplicity)
|
|
79
|
+
|
|
80
|
+
Commands that depend on the index call **`ensureContentIndex`** internally. You do not need to run `index sync` first in normal agent workflows.
|
|
81
|
+
|
|
82
|
+
| Condition | Auto-sync behaviour |
|
|
83
|
+
|-----------|---------------------|
|
|
84
|
+
| Index missing | **Full** rebuild |
|
|
85
|
+
| Schema version outdated (e.g. v2 → v3) | **Full** rebuild |
|
|
86
|
+
| Last sync older than **24 hours** | **Incremental** upsert (`sys.updatedAt[gte]` last `syncedAt`) |
|
|
87
|
+
| Index fresh | No sync |
|
|
88
|
+
|
|
89
|
+
Manual `cms-edit index sync` always performs a **full** rebuild.
|
|
90
|
+
|
|
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).
|
|
92
|
+
|
|
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.
|
|
94
|
+
|
|
39
95
|
## Preview / delivery API token
|
|
40
96
|
|
|
41
97
|
The management token cannot call the CDN. For default `index sync`:
|
|
@@ -56,18 +112,15 @@ For `index sync --published`:
|
|
|
56
112
|
|
|
57
113
|
If CMA cannot read API keys, set `previewAccessToken` or `deliveryAccessToken` manually.
|
|
58
114
|
|
|
59
|
-
## Freshness
|
|
60
|
-
|
|
61
|
-
- `index status` warns when the index is older than 24 hours.
|
|
62
|
-
- Search/list commands also warn but still run.
|
|
63
|
-
- After `asset upload`, a single asset row is upserted when the index already exists (optional; full accuracy needs `index sync`).
|
|
64
|
-
|
|
65
115
|
## Typical workflow before imports
|
|
66
116
|
|
|
67
117
|
```bash
|
|
68
118
|
cms-edit index sync
|
|
69
119
|
cms-edit asset search --filename-match 'istock.*'
|
|
70
|
-
cms-edit list --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
|
|
71
124
|
```
|
|
72
125
|
|
|
73
|
-
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 |
|