@delegance/claude-autopilot 7.6.0 → 7.8.0
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/CHANGELOG.md +101 -0
- package/README.md +19 -0
- package/bin/_launcher.js +310 -6
- package/dist/src/cli/dashboard/missing-package.d.ts +48 -0
- package/dist/src/cli/dashboard/missing-package.js +85 -0
- package/dist/src/cli/dashboard/upload.d.ts +1 -1
- package/dist/src/cli/dashboard/upload.js +20 -1
- package/dist/src/cli/help-text.d.ts +1 -1
- package/dist/src/cli/help-text.js +12 -2
- package/dist/src/cli/index.js +33 -2
- package/dist/src/cli/scaffold/rust.d.ts +38 -0
- package/dist/src/cli/scaffold/rust.js +281 -0
- package/dist/src/cli/scaffold/types.d.ts +7 -4
- package/dist/src/cli/scaffold.d.ts +1 -1
- package/dist/src/cli/scaffold.js +48 -17
- package/dist/src/cli/tsx-resolver.d.ts +42 -0
- package/dist/src/cli/tsx-resolver.js +376 -0
- package/package.json +4 -7
- package/scripts/autoregress.ts +0 -402
- package/scripts/snapshots/impact-selector.ts +0 -60
- package/scripts/snapshots/import-scanner.ts +0 -44
- package/scripts/snapshots/serializer.ts +0 -24
- package/tests/snapshots/baselines/.gitkeep +0 -0
- package/tests/snapshots/baselines/src-formatters-sarif.json +0 -210
- package/tests/snapshots/baselines/src-snapshots-impact-selector.json +0 -32
- package/tests/snapshots/baselines/src-snapshots-import-scanner.json +0 -21
- package/tests/snapshots/baselines/src-snapshots-serializer.json +0 -39
- package/tests/snapshots/import-map.json +0 -138
- package/tests/snapshots/index.json +0 -14
- package/tests/snapshots/src-formatters-sarif.snap.ts +0 -132
- package/tests/snapshots/src-snapshots-impact-selector.snap.ts +0 -95
- package/tests/snapshots/src-snapshots-import-scanner.snap.ts +0 -126
- package/tests/snapshots/src-snapshots-serializer.snap.ts +0 -64
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// @snapshot-for: scripts/snapshots/import-scanner.ts
|
|
2
|
-
// @generated-at: 2026-04-21T17:42:06.431Z
|
|
3
|
-
// @source-commit: d207869
|
|
4
|
-
// @generator-version: 1.0.0-alpha.6
|
|
5
|
-
|
|
6
|
-
import fs from 'node:fs';
|
|
7
|
-
import { describe, it } from 'node:test';
|
|
8
|
-
import assert from 'node:assert/strict';
|
|
9
|
-
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import * as path from 'node:path';
|
|
11
|
-
|
|
12
|
-
import { buildImportMap } from '../../scripts/snapshots/import-scanner.ts';
|
|
13
|
-
import { normalizeSnapshot } from '../../scripts/snapshots/serializer.ts';
|
|
14
|
-
|
|
15
|
-
const SLUG = 'src-snapshots-import-scanner';
|
|
16
|
-
void SLUG;
|
|
17
|
-
const baselineRaw =
|
|
18
|
-
process.env.CAPTURE_BASELINE === '1'
|
|
19
|
-
? '{}'
|
|
20
|
-
: fs.readFileSync(
|
|
21
|
-
fileURLToPath(new URL('./baselines/src-snapshots-import-scanner.json', import.meta.url)),
|
|
22
|
-
'utf8',
|
|
23
|
-
);
|
|
24
|
-
const baseline = JSON.parse(baselineRaw);
|
|
25
|
-
const captured: Record<string, unknown> = {};
|
|
26
|
-
process.on('exit', () => {
|
|
27
|
-
if (process.env.CAPTURE_BASELINE === '1') {
|
|
28
|
-
const p = process.env.AUTOREGRESS_TEMP_BASELINE_DIR
|
|
29
|
-
? path.join(process.env.AUTOREGRESS_TEMP_BASELINE_DIR, 'src-snapshots-import-scanner.json')
|
|
30
|
-
: fileURLToPath(new URL('./baselines/src-snapshots-import-scanner.json', import.meta.url));
|
|
31
|
-
fs.writeFileSync(p, JSON.stringify(captured, null, 2), 'utf8');
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
function mkTempDir(name: string): string {
|
|
36
|
-
return fs.mkdtempSync(path.join(process.cwd(), `.tmp-${name}-`));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
describe('buildImportMap snapshots', () => {
|
|
40
|
-
it('captures relative import and export-from edges', () => {
|
|
41
|
-
const dir = mkTempDir('import-scanner-basic');
|
|
42
|
-
fs.mkdirSync(path.join(dir, 'feature'), { recursive: true });
|
|
43
|
-
|
|
44
|
-
fs.writeFileSync(
|
|
45
|
-
path.join(dir, 'feature', 'util.ts'),
|
|
46
|
-
`export const util = 1;\n`,
|
|
47
|
-
'utf8',
|
|
48
|
-
);
|
|
49
|
-
fs.writeFileSync(
|
|
50
|
-
path.join(dir, 'feature', 'index.ts'),
|
|
51
|
-
`import { util } from './util';
|
|
52
|
-
export { util as u } from './util';
|
|
53
|
-
`,
|
|
54
|
-
'utf8',
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
const result = buildImportMap(dir);
|
|
58
|
-
|
|
59
|
-
if (process.env.CAPTURE_BASELINE === '1') {
|
|
60
|
-
captured['captures relative import and export-from edges'] = result;
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
assert.equal(
|
|
64
|
-
normalizeSnapshot(result),
|
|
65
|
-
normalizeSnapshot(baseline['captures relative import and export-from edges']),
|
|
66
|
-
);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('ignores non-relative imports and deduplicates importers per target', () => {
|
|
70
|
-
const dir = mkTempDir('import-scanner-dedupe');
|
|
71
|
-
fs.mkdirSync(path.join(dir, 'lib'), { recursive: true });
|
|
72
|
-
|
|
73
|
-
fs.writeFileSync(path.join(dir, 'lib', 'shared.ts'), `export const x = 1;\n`, 'utf8');
|
|
74
|
-
fs.writeFileSync(
|
|
75
|
-
path.join(dir, 'a.ts'),
|
|
76
|
-
`import { readFileSync } from 'node:fs';
|
|
77
|
-
import { x } from './lib/shared';
|
|
78
|
-
import { y } from "./lib/shared";
|
|
79
|
-
`,
|
|
80
|
-
'utf8',
|
|
81
|
-
);
|
|
82
|
-
fs.writeFileSync(
|
|
83
|
-
path.join(dir, 'b.ts'),
|
|
84
|
-
`export { x } from './lib/shared';\n`,
|
|
85
|
-
'utf8',
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const result = buildImportMap(dir);
|
|
89
|
-
|
|
90
|
-
if (process.env.CAPTURE_BASELINE === '1') {
|
|
91
|
-
captured['ignores non-relative imports and deduplicates importers per target'] = result;
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
assert.equal(
|
|
95
|
-
normalizeSnapshot(result),
|
|
96
|
-
normalizeSnapshot(baseline['ignores non-relative imports and deduplicates importers per target']),
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it('excludes imports that resolve outside srcDir', () => {
|
|
101
|
-
const root = mkTempDir('import-scanner-outside');
|
|
102
|
-
const src = path.join(root, 'src');
|
|
103
|
-
fs.mkdirSync(path.join(src, 'pkg'), { recursive: true });
|
|
104
|
-
|
|
105
|
-
fs.writeFileSync(path.join(src, 'pkg', 'inside.ts'), `export const ok = true;\n`, 'utf8');
|
|
106
|
-
fs.writeFileSync(
|
|
107
|
-
path.join(src, 'pkg', 'consumer.ts'),
|
|
108
|
-
`import { ok } from './inside';
|
|
109
|
-
import x from '../outside';
|
|
110
|
-
import y from '../../totally-out';
|
|
111
|
-
`,
|
|
112
|
-
'utf8',
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
const result = buildImportMap(src);
|
|
116
|
-
|
|
117
|
-
if (process.env.CAPTURE_BASELINE === '1') {
|
|
118
|
-
captured['excludes imports that resolve outside srcDir'] = result;
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
assert.equal(
|
|
122
|
-
normalizeSnapshot(result),
|
|
123
|
-
normalizeSnapshot(baseline['excludes imports that resolve outside srcDir']),
|
|
124
|
-
);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// @snapshot-for: scripts/snapshots/serializer.ts
|
|
2
|
-
// @generated-at: 2026-04-21T17:42:06.431Z
|
|
3
|
-
// @source-commit: d207869
|
|
4
|
-
// @generator-version: 1.0.0-alpha.6
|
|
5
|
-
|
|
6
|
-
import fs from 'node:fs';
|
|
7
|
-
import { describe, it } from 'node:test';
|
|
8
|
-
import assert from 'node:assert/strict';
|
|
9
|
-
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import * as path from 'node:path';
|
|
11
|
-
import { normalizeSnapshot } from '../../scripts/snapshots/serializer.ts';
|
|
12
|
-
|
|
13
|
-
const SLUG = 'src-snapshots-serializer';
|
|
14
|
-
const baselineRaw = process.env.CAPTURE_BASELINE === '1' ? '{}' : fs.readFileSync(fileURLToPath(new URL('./baselines/src-snapshots-serializer.json', import.meta.url)), 'utf8');
|
|
15
|
-
const baseline = JSON.parse(baselineRaw);
|
|
16
|
-
const captured: Record<string, unknown> = {};
|
|
17
|
-
process.on('exit', () => {
|
|
18
|
-
if (process.env.CAPTURE_BASELINE === '1') {
|
|
19
|
-
const p = process.env.AUTOREGRESS_TEMP_BASELINE_DIR
|
|
20
|
-
? path.join(process.env.AUTOREGRESS_TEMP_BASELINE_DIR, 'src-snapshots-serializer.json')
|
|
21
|
-
: fileURLToPath(new URL('./baselines/src-snapshots-serializer.json', import.meta.url));
|
|
22
|
-
fs.writeFileSync(p, JSON.stringify(captured, null, 2), 'utf8');
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
describe('normalizeSnapshot', () => {
|
|
27
|
-
it('normalizes timestamps uuids and cwd-prefixed paths', () => {
|
|
28
|
-
const cwd = '/repo/project';
|
|
29
|
-
const result = JSON.parse(normalizeSnapshot({
|
|
30
|
-
ts: '2026-04-21T17:42:06.431Z',
|
|
31
|
-
id: '550e8400-e29b-41d4-a716-446655440000',
|
|
32
|
-
path: '/repo/project/src/index.ts',
|
|
33
|
-
untouched: '/other/place/file.ts',
|
|
34
|
-
}, cwd));
|
|
35
|
-
|
|
36
|
-
if (process.env.CAPTURE_BASELINE === '1') { captured['normalizes timestamps uuids and cwd-prefixed paths'] = result; return; }
|
|
37
|
-
assert.equal(normalizeSnapshot(result), normalizeSnapshot(baseline['normalizes timestamps uuids and cwd-prefixed paths']));
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('recursively normalizes arrays and nested objects', () => {
|
|
41
|
-
const cwd = '/work';
|
|
42
|
-
const result = JSON.parse(normalizeSnapshot({
|
|
43
|
-
items: [
|
|
44
|
-
'2024-01-02T03:04:05.000Z',
|
|
45
|
-
{ uid: '123e4567-e89b-12d3-a456-426614174000', file: '/work/a/b.txt' },
|
|
46
|
-
['plain', '/work/c/d.ts'],
|
|
47
|
-
],
|
|
48
|
-
}, cwd));
|
|
49
|
-
|
|
50
|
-
if (process.env.CAPTURE_BASELINE === '1') { captured['recursively normalizes arrays and nested objects'] = result; return; }
|
|
51
|
-
assert.equal(normalizeSnapshot(result), normalizeSnapshot(baseline['recursively normalizes arrays and nested objects']));
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('sorts object keys deterministically at all levels', () => {
|
|
55
|
-
const result = JSON.parse(normalizeSnapshot({
|
|
56
|
-
z: 1,
|
|
57
|
-
a: { d: 4, b: 2, c: 3 },
|
|
58
|
-
m: [{ y: 2, x: 1 }, { b: 2, a: 1 }],
|
|
59
|
-
}));
|
|
60
|
-
|
|
61
|
-
if (process.env.CAPTURE_BASELINE === '1') { captured['sorts object keys deterministically at all levels'] = result; return; }
|
|
62
|
-
assert.equal(normalizeSnapshot(result), normalizeSnapshot(baseline['sorts object keys deterministically at all levels']));
|
|
63
|
-
});
|
|
64
|
-
});
|