d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
126 lines
3.5 KiB
JavaScript
126 lines
3.5 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const repoRoot = path.resolve(__dirname, '..', '..');
|
|
|
|
let passed = 0;
|
|
let failed = 0;
|
|
|
|
function test(name, fn) {
|
|
try {
|
|
fn();
|
|
console.log(` ✓ ${name}`);
|
|
passed++;
|
|
} catch (error) {
|
|
console.log(` ✗ ${name}`);
|
|
console.log(` Error: ${error.message}`);
|
|
failed++;
|
|
}
|
|
}
|
|
|
|
const publicInstallDocs = [
|
|
'README.md',
|
|
'README.zh-CN.md',
|
|
'docs/pt-BR/README.md',
|
|
'docs/zh-CN/README.md',
|
|
'docs/ja-JP/skills/configure-ecc/SKILL.md',
|
|
'docs/zh-CN/skills/configure-ecc/SKILL.md',
|
|
];
|
|
|
|
console.log('\n=== Testing public install identifiers ===\n');
|
|
|
|
for (const relativePath of publicInstallDocs) {
|
|
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
|
|
|
|
test(`${relativePath} does not use the overlong legacy marketplace plugin identifier`, () => {
|
|
assert.ok(!content.includes('everything-claude-code@everything-claude-code'));
|
|
});
|
|
|
|
test(`${relativePath} documents the short marketplace plugin identifier`, () => {
|
|
assert.ok(content.includes('ecc@ecc'));
|
|
});
|
|
}
|
|
|
|
const pluginAndManualInstallDocs = [
|
|
'README.md',
|
|
'README.zh-CN.md',
|
|
'docs/zh-CN/README.md',
|
|
];
|
|
|
|
const publicCommandNamespaceDocs = [
|
|
'README.md',
|
|
'README.zh-CN.md',
|
|
'docs/pt-BR/README.md',
|
|
'docs/tr/README.md',
|
|
'docs/ko-KR/README.md',
|
|
'docs/ja-JP/README.md',
|
|
'docs/zh-CN/README.md',
|
|
'docs/zh-TW/README.md',
|
|
];
|
|
|
|
const manualClaudeSkillInstallDocs = [
|
|
'README.md',
|
|
'docs/de-DE/README.md',
|
|
'docs/ru/README.md',
|
|
];
|
|
|
|
for (const relativePath of pluginAndManualInstallDocs) {
|
|
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
|
|
|
|
test(`${relativePath} warns not to run the full installer after plugin install`, () => {
|
|
assert.ok(
|
|
content.includes('--profile full'),
|
|
'Expected docs to mention the full installer explicitly'
|
|
);
|
|
assert.ok(
|
|
content.includes('/plugin install'),
|
|
'Expected docs to mention plugin install explicitly'
|
|
);
|
|
assert.ok(
|
|
content.includes('不要再运行')
|
|
|| content.includes('do not run'),
|
|
'Expected docs to warn that plugin install and full install are not sequential'
|
|
);
|
|
});
|
|
}
|
|
|
|
for (const relativePath of publicCommandNamespaceDocs) {
|
|
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
|
|
|
|
test(`${relativePath} uses the canonical plugin command namespace`, () => {
|
|
assert.ok(
|
|
!content.includes('/everything-claude-code:'),
|
|
'Expected docs not to advertise the overlong legacy plugin command namespace'
|
|
);
|
|
assert.ok(
|
|
content.includes('/ecc:plan'),
|
|
'Expected docs to show the short plugin command namespace'
|
|
);
|
|
});
|
|
}
|
|
|
|
for (const relativePath of manualClaudeSkillInstallDocs) {
|
|
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
|
|
|
|
test(`${relativePath} keeps manual Claude skill installs top-level`, () => {
|
|
assert.ok(
|
|
!/^\s*#?\s*(mkdir\s+-p|md\s+.*|cp\s+.*|copy\s+.*|cpi\s+.*|New-Item\s+.*|Copy-Item\s+.*)\s+.*(~|\$HOME)[\\/]\.claude[\\/]skills[\\/]ecc([\\/]|\b)/mi.test(content),
|
|
'Claude Code does not discover skills installed by commands targeting ~/.claude/skills/ecc'
|
|
);
|
|
assert.ok(
|
|
content.includes('~/.claude/skills/'),
|
|
'Expected manual install docs to copy skills into direct ~/.claude/skills children'
|
|
);
|
|
});
|
|
}
|
|
|
|
if (failed > 0) {
|
|
console.log(`\nFailed: ${failed}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log(`\nPassed: ${passed}`);
|