mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-16 06:53:27 +08:00
52 lines
1.2 KiB
JavaScript
52 lines
1.2 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/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 stale ecc@ecc plugin identifier`, () => {
|
|
assert.ok(!content.includes('ecc@ecc'));
|
|
});
|
|
|
|
test(`${relativePath} documents the canonical marketplace plugin identifier`, () => {
|
|
assert.ok(content.includes('everything-claude-code@everything-claude-code'));
|
|
});
|
|
}
|
|
|
|
if (failed > 0) {
|
|
console.log(`\nFailed: ${failed}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log(`\nPassed: ${passed}`);
|