@vexdo/cli 0.1.0 → 0.1.2
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/README.md +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1597 -0
- package/package.json +9 -1
- package/.eslintrc.json +0 -23
- package/.github/workflows/ci.yml +0 -84
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/go.imports.xml +0 -11
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -7
- package/.idea/vexdo-cli.iml +0 -9
- package/.prettierrc +0 -5
- package/CLAUDE.md +0 -93
- package/CONTRIBUTING.md +0 -62
- package/src/commands/abort.ts +0 -66
- package/src/commands/fix.ts +0 -106
- package/src/commands/init.ts +0 -142
- package/src/commands/logs.ts +0 -74
- package/src/commands/review.ts +0 -107
- package/src/commands/start.ts +0 -197
- package/src/commands/status.ts +0 -52
- package/src/commands/submit.ts +0 -38
- package/src/index.ts +0 -42
- package/src/lib/claude.ts +0 -259
- package/src/lib/codex.ts +0 -96
- package/src/lib/config.ts +0 -157
- package/src/lib/gh.ts +0 -78
- package/src/lib/git.ts +0 -119
- package/src/lib/logger.ts +0 -147
- package/src/lib/requirements.ts +0 -18
- package/src/lib/review-loop.ts +0 -154
- package/src/lib/state.ts +0 -121
- package/src/lib/submit-task.ts +0 -43
- package/src/lib/tasks.ts +0 -94
- package/src/prompts/arbiter.ts +0 -21
- package/src/prompts/reviewer.ts +0 -20
- package/src/types/index.ts +0 -96
- package/test/config.test.ts +0 -124
- package/test/state.test.ts +0 -147
- package/test/unit/claude.test.ts +0 -117
- package/test/unit/codex.test.ts +0 -67
- package/test/unit/gh.test.ts +0 -49
- package/test/unit/git.test.ts +0 -120
- package/test/unit/review-loop.test.ts +0 -198
- package/tests/integration/review.test.ts +0 -137
- package/tests/integration/start.test.ts +0 -220
- package/tests/unit/init.test.ts +0 -91
- package/tsconfig.json +0 -15
- package/tsup.config.ts +0 -8
- package/vitest.config.ts +0 -7
package/tests/unit/init.test.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import os from 'node:os';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
|
|
5
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
6
|
-
import { parse } from 'yaml';
|
|
7
|
-
|
|
8
|
-
import { runInit } from '../../src/commands/init.js';
|
|
9
|
-
import * as logger from '../../src/lib/logger.js';
|
|
10
|
-
|
|
11
|
-
function makeTempDir(): string {
|
|
12
|
-
return fs.mkdtempSync(path.join(os.tmpdir(), 'vexdo-init-'));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
afterEach(() => {
|
|
16
|
-
vi.restoreAllMocks();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
describe('runInit', () => {
|
|
20
|
-
it('creates .vexdo.yml with answers and all expected directories', async () => {
|
|
21
|
-
const root = makeTempDir();
|
|
22
|
-
|
|
23
|
-
const answers = [
|
|
24
|
-
'api,web',
|
|
25
|
-
'',
|
|
26
|
-
'./apps/web',
|
|
27
|
-
'claude-sonnet-4-5',
|
|
28
|
-
'5',
|
|
29
|
-
'y',
|
|
30
|
-
'gpt-4.1',
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
await runInit(root, async () => answers.shift() ?? '');
|
|
34
|
-
|
|
35
|
-
const configPath = path.join(root, '.vexdo.yml');
|
|
36
|
-
expect(fs.existsSync(configPath)).toBe(true);
|
|
37
|
-
|
|
38
|
-
const config = parse(fs.readFileSync(configPath, 'utf8')) as {
|
|
39
|
-
services: Array<{ name: string; path: string }>;
|
|
40
|
-
review: { model: string; max_iterations: number; auto_submit: boolean };
|
|
41
|
-
codex: { model: string };
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
expect(config.services).toEqual([
|
|
45
|
-
{ name: 'api', path: './api' },
|
|
46
|
-
{ name: 'web', path: './apps/web' },
|
|
47
|
-
]);
|
|
48
|
-
expect(config.review).toEqual({
|
|
49
|
-
model: 'claude-sonnet-4-5',
|
|
50
|
-
max_iterations: 5,
|
|
51
|
-
auto_submit: true,
|
|
52
|
-
});
|
|
53
|
-
expect(config.codex).toEqual({ model: 'gpt-4.1' });
|
|
54
|
-
|
|
55
|
-
for (const taskDir of ['backlog', 'in_progress', 'review', 'done', 'blocked']) {
|
|
56
|
-
expect(fs.existsSync(path.join(root, 'tasks', taskDir))).toBe(true);
|
|
57
|
-
}
|
|
58
|
-
expect(fs.existsSync(path.join(root, '.vexdo', 'logs'))).toBe(true);
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it('appends .vexdo/ to .gitignore once and does not duplicate on second run', async () => {
|
|
62
|
-
const root = makeTempDir();
|
|
63
|
-
|
|
64
|
-
const answersFirst = ['api', '', '', '', 'n', ''];
|
|
65
|
-
await runInit(root, async () => answersFirst.shift() ?? '');
|
|
66
|
-
|
|
67
|
-
let gitignore = fs.readFileSync(path.join(root, '.gitignore'), 'utf8');
|
|
68
|
-
expect((gitignore.match(/\.vexdo\//g) ?? []).length).toBe(1);
|
|
69
|
-
|
|
70
|
-
const answersSecond = ['y', 'api', '', '', '', 'n', ''];
|
|
71
|
-
await runInit(root, async () => answersSecond.shift() ?? '');
|
|
72
|
-
|
|
73
|
-
gitignore = fs.readFileSync(path.join(root, '.gitignore'), 'utf8');
|
|
74
|
-
expect((gitignore.match(/\.vexdo\//g) ?? []).length).toBe(1);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('warns and asks before overwrite when .vexdo.yml already exists', async () => {
|
|
78
|
-
const root = makeTempDir();
|
|
79
|
-
fs.writeFileSync(path.join(root, '.vexdo.yml'), 'version: 1\nservices: []\n', 'utf8');
|
|
80
|
-
|
|
81
|
-
const warnSpy = vi.spyOn(logger, 'warn');
|
|
82
|
-
const promptSpy = vi.fn(async () => 'n');
|
|
83
|
-
|
|
84
|
-
await runInit(root, promptSpy);
|
|
85
|
-
|
|
86
|
-
expect(warnSpy).toHaveBeenCalledWith('Found existing .vexdo.yml.');
|
|
87
|
-
expect(promptSpy).toHaveBeenCalledWith('Overwrite existing .vexdo.yml? (y/N): ');
|
|
88
|
-
const content = fs.readFileSync(path.join(root, '.vexdo.yml'), 'utf8');
|
|
89
|
-
expect(content).toContain('services: []');
|
|
90
|
-
});
|
|
91
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"rootDir": ".",
|
|
11
|
-
"outDir": "dist",
|
|
12
|
-
"types": ["node", "vitest/globals"]
|
|
13
|
-
},
|
|
14
|
-
"include": ["src", "test", "tsup.config.ts", "vitest.config.ts"]
|
|
15
|
-
}
|
package/tsup.config.ts
DELETED