mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 06:23:28 +08:00
feat: add ECC consult command
This commit is contained in:
committed by
Affaan Mustafa
parent
708a8fd715
commit
9a3f72712b
@@ -69,6 +69,7 @@ function main() {
|
||||
assert.match(result.stdout, /list-installed/);
|
||||
assert.match(result.stdout, /doctor/);
|
||||
assert.match(result.stdout, /auto-update/);
|
||||
assert.match(result.stdout, /consult/);
|
||||
assert.match(result.stdout, /loop-status/);
|
||||
}],
|
||||
['delegates explicit install command', () => {
|
||||
@@ -103,6 +104,13 @@ function main() {
|
||||
assert.strictEqual(payload.id, 'framework:nextjs');
|
||||
assert.deepStrictEqual(payload.moduleIds, ['framework-language']);
|
||||
}],
|
||||
['delegates consult command', () => {
|
||||
const result = runCli(['consult', 'security', 'reviews', '--json']);
|
||||
assert.strictEqual(result.status, 0, result.stderr);
|
||||
const payload = parseJson(result.stdout);
|
||||
assert.strictEqual(payload.schemaVersion, 'ecc.consult.v1');
|
||||
assert.strictEqual(payload.matches[0].componentId, 'capability:security');
|
||||
}],
|
||||
['delegates lifecycle commands', () => {
|
||||
const homeDir = createTempDir('ecc-cli-home-');
|
||||
const projectRoot = createTempDir('ecc-cli-project-');
|
||||
@@ -188,6 +196,11 @@ function main() {
|
||||
assert.strictEqual(result.status, 0, result.stderr);
|
||||
assert.match(result.stdout, /node scripts\/catalog\.js show <component-id>/);
|
||||
}],
|
||||
['supports help for the consult subcommand', () => {
|
||||
const result = runCli(['help', 'consult']);
|
||||
assert.strictEqual(result.status, 0, result.stderr);
|
||||
assert.match(result.stdout, /node scripts\/consult\.js "security reviews"/);
|
||||
}],
|
||||
['fails on unknown commands instead of treating them as installs', () => {
|
||||
const result = runCli(['bogus']);
|
||||
assert.strictEqual(result.status, 1);
|
||||
|
||||
Reference in New Issue
Block a user