@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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +1597 -0
  4. package/package.json +9 -1
  5. package/.eslintrc.json +0 -23
  6. package/.github/workflows/ci.yml +0 -84
  7. package/.idea/copilot.data.migration.ask2agent.xml +0 -6
  8. package/.idea/go.imports.xml +0 -11
  9. package/.idea/misc.xml +0 -6
  10. package/.idea/modules.xml +0 -8
  11. package/.idea/vcs.xml +0 -7
  12. package/.idea/vexdo-cli.iml +0 -9
  13. package/.prettierrc +0 -5
  14. package/CLAUDE.md +0 -93
  15. package/CONTRIBUTING.md +0 -62
  16. package/src/commands/abort.ts +0 -66
  17. package/src/commands/fix.ts +0 -106
  18. package/src/commands/init.ts +0 -142
  19. package/src/commands/logs.ts +0 -74
  20. package/src/commands/review.ts +0 -107
  21. package/src/commands/start.ts +0 -197
  22. package/src/commands/status.ts +0 -52
  23. package/src/commands/submit.ts +0 -38
  24. package/src/index.ts +0 -42
  25. package/src/lib/claude.ts +0 -259
  26. package/src/lib/codex.ts +0 -96
  27. package/src/lib/config.ts +0 -157
  28. package/src/lib/gh.ts +0 -78
  29. package/src/lib/git.ts +0 -119
  30. package/src/lib/logger.ts +0 -147
  31. package/src/lib/requirements.ts +0 -18
  32. package/src/lib/review-loop.ts +0 -154
  33. package/src/lib/state.ts +0 -121
  34. package/src/lib/submit-task.ts +0 -43
  35. package/src/lib/tasks.ts +0 -94
  36. package/src/prompts/arbiter.ts +0 -21
  37. package/src/prompts/reviewer.ts +0 -20
  38. package/src/types/index.ts +0 -96
  39. package/test/config.test.ts +0 -124
  40. package/test/state.test.ts +0 -147
  41. package/test/unit/claude.test.ts +0 -117
  42. package/test/unit/codex.test.ts +0 -67
  43. package/test/unit/gh.test.ts +0 -49
  44. package/test/unit/git.test.ts +0 -120
  45. package/test/unit/review-loop.test.ts +0 -198
  46. package/tests/integration/review.test.ts +0 -137
  47. package/tests/integration/start.test.ts +0 -220
  48. package/tests/unit/init.test.ts +0 -91
  49. package/tsconfig.json +0 -15
  50. package/tsup.config.ts +0 -8
  51. package/vitest.config.ts +0 -7
@@ -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
@@ -1,8 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- clean: true,
8
- });
package/vitest.config.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- environment: 'node',
6
- },
7
- });