mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-16 13:53:04 +08:00
docs: verify Codex marketplace readiness (#1931)
This commit is contained in:
@@ -433,11 +433,15 @@ test('marketplace local plugin path resolves to the repo-root Codex bundle', ()
|
||||
continue;
|
||||
}
|
||||
|
||||
const resolvedRoot = path.resolve(path.dirname(marketplacePath), plugin.source.path);
|
||||
assert.ok(
|
||||
plugin.source.path.startsWith('./'),
|
||||
`Codex marketplace source.path must be ./-prefixed: ${plugin.source.path}`,
|
||||
);
|
||||
const resolvedRoot = path.resolve(repoRoot, plugin.source.path);
|
||||
assert.strictEqual(
|
||||
resolvedRoot,
|
||||
repoRoot,
|
||||
`Expected local marketplace path to resolve to repo root, got: ${plugin.source.path}`,
|
||||
`Expected local marketplace path to resolve to repo root from marketplace root, got: ${plugin.source.path}`,
|
||||
);
|
||||
assert.ok(
|
||||
fs.existsSync(path.join(resolvedRoot, '.codex-plugin', 'plugin.json')),
|
||||
@@ -512,6 +516,22 @@ test('user-facing docs do not use the legacy non-URL marketplace add form', () =
|
||||
);
|
||||
});
|
||||
|
||||
test('.codex-plugin README uses current marketplace add flow', () => {
|
||||
const readme = fs.readFileSync(path.join(repoRoot, '.codex-plugin', 'README.md'), 'utf8');
|
||||
assert.ok(
|
||||
readme.includes('codex plugin marketplace add'),
|
||||
'Expected .codex-plugin README to document codex plugin marketplace add',
|
||||
);
|
||||
assert.ok(
|
||||
readme.includes('Official Plugin Directory publishing is coming soon'),
|
||||
'Expected .codex-plugin README to document current official directory status',
|
||||
);
|
||||
assert.ok(
|
||||
!/\bcodex plugin install\b/.test(readme),
|
||||
'codex plugin install is not a current Codex CLI command',
|
||||
);
|
||||
});
|
||||
|
||||
test('docs/zh-CN/README.md version row matches package.json', () => {
|
||||
const readme = fs.readFileSync(zhCnReadmePath, 'utf8');
|
||||
const match = readme.match(new RegExp(`^\\| \\*\\*版本\\*\\* \\| 插件 \\| 插件 \\| 参考配置 \\| (${semverPattern}) \\|$`, 'm'));
|
||||
|
||||
Reference in New Issue
Block a user