edsger 0.46.0 → 0.48.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/.claude/settings.local.json +3 -23
- package/dist/api/__tests__/app-store.test.d.ts +7 -0
- package/dist/api/__tests__/app-store.test.js +60 -0
- package/dist/api/__tests__/intelligence.test.d.ts +11 -0
- package/dist/api/__tests__/intelligence.test.js +315 -0
- package/dist/api/features/__tests__/feature-utils.test.d.ts +4 -0
- package/dist/api/features/__tests__/feature-utils.test.js +370 -0
- package/dist/api/features/__tests__/status-updater.test.d.ts +4 -0
- package/dist/api/features/__tests__/status-updater.test.js +88 -0
- package/dist/commands/build/__tests__/build.test.d.ts +5 -0
- package/dist/commands/build/__tests__/build.test.js +206 -0
- package/dist/commands/build/__tests__/detect-project.test.d.ts +6 -0
- package/dist/commands/build/__tests__/detect-project.test.js +160 -0
- package/dist/commands/build/__tests__/run-build.test.d.ts +6 -0
- package/dist/commands/build/__tests__/run-build.test.js +433 -0
- package/dist/commands/intelligence/__tests__/command.test.d.ts +4 -0
- package/dist/commands/intelligence/__tests__/command.test.js +48 -0
- package/dist/commands/run-sheet/index.js +6 -0
- package/dist/commands/workflow/core/__tests__/feature-filter.test.d.ts +5 -0
- package/dist/commands/workflow/core/__tests__/feature-filter.test.js +316 -0
- package/dist/commands/workflow/core/__tests__/pipeline-evaluator.test.d.ts +4 -0
- package/dist/commands/workflow/core/__tests__/pipeline-evaluator.test.js +397 -0
- package/dist/commands/workflow/core/__tests__/state-manager.test.d.ts +4 -0
- package/dist/commands/workflow/core/__tests__/state-manager.test.js +384 -0
- package/dist/config/__tests__/config.test.d.ts +4 -0
- package/dist/config/__tests__/config.test.js +286 -0
- package/dist/config/__tests__/feature-status.test.d.ts +4 -0
- package/dist/config/__tests__/feature-status.test.js +111 -0
- package/dist/errors/__tests__/index.test.d.ts +4 -0
- package/dist/errors/__tests__/index.test.js +349 -0
- package/dist/index.js +0 -0
- package/dist/phases/app-store-generation/__tests__/agent.test.d.ts +5 -0
- package/dist/phases/app-store-generation/__tests__/agent.test.js +142 -0
- package/dist/phases/app-store-generation/__tests__/context.test.d.ts +4 -0
- package/dist/phases/app-store-generation/__tests__/context.test.js +284 -0
- package/dist/phases/app-store-generation/__tests__/prompts.test.d.ts +4 -0
- package/dist/phases/app-store-generation/__tests__/prompts.test.js +122 -0
- package/dist/phases/app-store-generation/__tests__/screenshot-composer.test.d.ts +5 -0
- package/dist/phases/app-store-generation/__tests__/screenshot-composer.test.js +826 -0
- package/dist/phases/code-review/__tests__/diff-utils.test.d.ts +1 -0
- package/dist/phases/code-review/__tests__/diff-utils.test.js +101 -0
- package/dist/phases/intelligence-analysis/__tests__/context.test.d.ts +4 -0
- package/dist/phases/intelligence-analysis/__tests__/context.test.js +192 -0
- package/dist/phases/intelligence-analysis/__tests__/matching.test.d.ts +13 -0
- package/dist/phases/intelligence-analysis/__tests__/matching.test.js +154 -0
- package/dist/phases/intelligence-analysis/__tests__/orchestration.test.d.ts +5 -0
- package/dist/phases/intelligence-analysis/__tests__/orchestration.test.js +378 -0
- package/dist/phases/intelligence-analysis/__tests__/prompts.test.d.ts +4 -0
- package/dist/phases/intelligence-analysis/__tests__/prompts.test.js +33 -0
- package/dist/phases/pr-execution/__tests__/file-assigner.test.d.ts +1 -0
- package/dist/phases/pr-execution/__tests__/file-assigner.test.js +303 -0
- package/dist/phases/pr-resolve/__tests__/checklist-learner.test.d.ts +1 -0
- package/dist/phases/pr-resolve/__tests__/checklist-learner.test.js +157 -0
- package/dist/phases/pr-resolve/__tests__/prompts.test.d.ts +1 -0
- package/dist/phases/pr-resolve/__tests__/prompts.test.js +116 -0
- package/dist/phases/pr-resolve/__tests__/resolve-mapping.test.d.ts +1 -0
- package/dist/phases/pr-resolve/__tests__/resolve-mapping.test.js +138 -0
- package/dist/phases/pr-resolve/__tests__/types.test.d.ts +1 -0
- package/dist/phases/pr-resolve/__tests__/types.test.js +43 -0
- package/dist/phases/pr-resolve/__tests__/workspace.test.d.ts +1 -0
- package/dist/phases/pr-resolve/__tests__/workspace.test.js +111 -0
- package/dist/phases/pr-review/__tests__/prompts.test.d.ts +1 -0
- package/dist/phases/pr-review/__tests__/prompts.test.js +49 -0
- package/dist/phases/pr-review/__tests__/review-comments.test.d.ts +1 -0
- package/dist/phases/pr-review/__tests__/review-comments.test.js +110 -0
- package/dist/phases/pr-shared/__tests__/agent-utils.test.d.ts +1 -0
- package/dist/phases/pr-shared/__tests__/agent-utils.test.js +91 -0
- package/dist/phases/pr-shared/__tests__/context.test.d.ts +1 -0
- package/dist/phases/pr-shared/__tests__/context.test.js +94 -0
- package/dist/phases/pr-splitting/__tests__/import-dep-validator.test.d.ts +1 -0
- package/dist/phases/pr-splitting/__tests__/import-dep-validator.test.js +331 -0
- package/dist/phases/release-sync/github.d.ts +12 -0
- package/dist/phases/release-sync/github.js +39 -0
- package/dist/phases/release-sync/snapshot.js +0 -1
- package/dist/phases/run-sheet/index.d.ts +15 -0
- package/dist/phases/run-sheet/index.js +154 -22
- package/dist/phases/run-sheet/render.d.ts +23 -5
- package/dist/phases/run-sheet/render.js +193 -31
- package/dist/phases/smoke-test/__tests__/agent.test.d.ts +4 -0
- package/dist/phases/smoke-test/__tests__/agent.test.js +84 -0
- package/dist/phases/smoke-test/__tests__/github.test.d.ts +9 -0
- package/dist/phases/smoke-test/__tests__/github.test.js +120 -0
- package/dist/phases/smoke-test/__tests__/snapshot.test.d.ts +8 -0
- package/dist/phases/smoke-test/__tests__/snapshot.test.js +93 -0
- package/dist/phases/smoke-test/github.d.ts +54 -0
- package/dist/phases/smoke-test/github.js +101 -0
- package/dist/phases/smoke-test/snapshot.d.ts +27 -0
- package/dist/phases/smoke-test/snapshot.js +157 -0
- package/dist/services/coaching/__tests__/coaching-agent.test.d.ts +1 -0
- package/dist/services/coaching/__tests__/coaching-agent.test.js +74 -0
- package/dist/services/coaching/__tests__/coaching-loop.test.d.ts +1 -0
- package/dist/services/coaching/__tests__/coaching-loop.test.js +59 -0
- package/dist/services/coaching/__tests__/self-rating.test.d.ts +1 -0
- package/dist/services/coaching/__tests__/self-rating.test.js +188 -0
- package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.d.ts +4 -0
- package/dist/services/lifecycle-agent/__tests__/phase-criteria.test.js +133 -0
- package/dist/services/lifecycle-agent/__tests__/transition-rules.test.d.ts +4 -0
- package/dist/services/lifecycle-agent/__tests__/transition-rules.test.js +336 -0
- package/dist/services/lifecycle-agent/index.d.ts +24 -0
- package/dist/services/lifecycle-agent/index.js +25 -0
- package/dist/services/lifecycle-agent/phase-criteria.d.ts +57 -0
- package/dist/services/lifecycle-agent/phase-criteria.js +335 -0
- package/dist/services/lifecycle-agent/transition-rules.d.ts +60 -0
- package/dist/services/lifecycle-agent/transition-rules.js +184 -0
- package/dist/services/lifecycle-agent/types.d.ts +190 -0
- package/dist/services/lifecycle-agent/types.js +12 -0
- package/dist/services/phase-hooks/__tests__/bindings-fetcher.test.d.ts +1 -0
- package/dist/services/phase-hooks/__tests__/bindings-fetcher.test.js +122 -0
- package/dist/services/phase-hooks/__tests__/hook-executor.test.d.ts +1 -0
- package/dist/services/phase-hooks/__tests__/hook-executor.test.js +321 -0
- package/dist/services/phase-hooks/__tests__/hook-runner.test.d.ts +1 -0
- package/dist/services/phase-hooks/__tests__/hook-runner.test.js +261 -0
- package/dist/services/phase-hooks/__tests__/plugin-loader.test.d.ts +1 -0
- package/dist/services/phase-hooks/__tests__/plugin-loader.test.js +158 -0
- package/dist/services/video/__tests__/video-pipeline.test.d.ts +6 -0
- package/dist/services/video/__tests__/video-pipeline.test.js +249 -0
- package/dist/workspace/__tests__/workspace-manager.test.d.ts +7 -0
- package/dist/workspace/__tests__/workspace-manager.test.js +52 -0
- package/dist/workspace/workspace-manager.js +17 -4
- package/package.json +1 -1
- package/.env.local +0 -12
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for the pure helpers inside workspace-manager.
|
|
3
|
+
*
|
|
4
|
+
* syncRepoToRef / cloneFeatureRepo shell out to git and are exercised
|
|
5
|
+
* end-to-end; only the validator is cheap to unit-test here.
|
|
6
|
+
*/
|
|
7
|
+
import assert from 'node:assert';
|
|
8
|
+
import { describe, it } from 'node:test';
|
|
9
|
+
import { isSafeGitRef } from '../workspace-manager.js';
|
|
10
|
+
void describe('isSafeGitRef', () => {
|
|
11
|
+
void it('accepts common release / branch names', () => {
|
|
12
|
+
assert.strictEqual(isSafeGitRef('main'), true);
|
|
13
|
+
assert.strictEqual(isSafeGitRef('develop'), true);
|
|
14
|
+
assert.strictEqual(isSafeGitRef('v1.2.3'), true);
|
|
15
|
+
assert.strictEqual(isSafeGitRef('2024.01.15'), true);
|
|
16
|
+
assert.strictEqual(isSafeGitRef('release/2.0'), true);
|
|
17
|
+
assert.strictEqual(isSafeGitRef('v1.0.0-rc.1'), true);
|
|
18
|
+
assert.strictEqual(isSafeGitRef('v2@stable'), true);
|
|
19
|
+
assert.strictEqual(isSafeGitRef('feature/user-auth_v2'), true);
|
|
20
|
+
});
|
|
21
|
+
void it('rejects empty / overlong input', () => {
|
|
22
|
+
assert.strictEqual(isSafeGitRef(''), false);
|
|
23
|
+
assert.strictEqual(isSafeGitRef('x'.repeat(101)), false);
|
|
24
|
+
});
|
|
25
|
+
void it('rejects whitespace', () => {
|
|
26
|
+
assert.strictEqual(isSafeGitRef('v 1.0'), false);
|
|
27
|
+
assert.strictEqual(isSafeGitRef('main\n'), false);
|
|
28
|
+
assert.strictEqual(isSafeGitRef('\tmain'), false);
|
|
29
|
+
});
|
|
30
|
+
void it('rejects shell metacharacters', () => {
|
|
31
|
+
assert.strictEqual(isSafeGitRef('v1;rm -rf /'), false);
|
|
32
|
+
assert.strictEqual(isSafeGitRef('v1$PATH'), false);
|
|
33
|
+
assert.strictEqual(isSafeGitRef('v1`id`'), false);
|
|
34
|
+
assert.strictEqual(isSafeGitRef('v1|less'), false);
|
|
35
|
+
assert.strictEqual(isSafeGitRef('v1>out'), false);
|
|
36
|
+
assert.strictEqual(isSafeGitRef('v1*'), false);
|
|
37
|
+
});
|
|
38
|
+
void it('rejects refs that would confuse git itself', () => {
|
|
39
|
+
assert.strictEqual(isSafeGitRef('.hidden'), false);
|
|
40
|
+
assert.strictEqual(isSafeGitRef('-foo'), false);
|
|
41
|
+
assert.strictEqual(isSafeGitRef('v2..rc'), false);
|
|
42
|
+
assert.strictEqual(isSafeGitRef('HEAD@{1}'), false);
|
|
43
|
+
});
|
|
44
|
+
void it('rejects non-string input defensively', () => {
|
|
45
|
+
// @ts-expect-error testing runtime guard
|
|
46
|
+
assert.strictEqual(isSafeGitRef(null), false);
|
|
47
|
+
// @ts-expect-error testing runtime guard
|
|
48
|
+
assert.strictEqual(isSafeGitRef(undefined), false);
|
|
49
|
+
// @ts-expect-error testing runtime guard
|
|
50
|
+
assert.strictEqual(isSafeGitRef(123), false);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -174,8 +174,16 @@ export function syncRepoToRef(repoPath, ref, token) {
|
|
|
174
174
|
throw new Error(`Unsafe branch ref: ${JSON.stringify(ref.branch)}`);
|
|
175
175
|
}
|
|
176
176
|
const creds = buildCredentialArgs(token);
|
|
177
|
+
// Timeouts so a hung proxy / credential prompt can't wedge the CLI
|
|
178
|
+
// forever. Network op gets more headroom than local ones.
|
|
179
|
+
const NET_TIMEOUT_MS = 120_000;
|
|
180
|
+
const LOCAL_TIMEOUT_MS = 30_000;
|
|
177
181
|
try {
|
|
178
|
-
execFileSync('git', [...creds, 'fetch', 'origin', '--tags', '--prune'], {
|
|
182
|
+
execFileSync('git', [...creds, 'fetch', 'origin', '--tags', '--prune'], {
|
|
183
|
+
cwd: repoPath,
|
|
184
|
+
stdio: 'pipe',
|
|
185
|
+
timeout: NET_TIMEOUT_MS,
|
|
186
|
+
});
|
|
179
187
|
}
|
|
180
188
|
catch {
|
|
181
189
|
logWarning('git fetch failed during sync; working tree may be stale');
|
|
@@ -186,20 +194,25 @@ export function syncRepoToRef(repoPath, ref, token) {
|
|
|
186
194
|
execFileSync('git', ['reset', '--hard', 'HEAD'], {
|
|
187
195
|
cwd: repoPath,
|
|
188
196
|
stdio: 'pipe',
|
|
197
|
+
timeout: LOCAL_TIMEOUT_MS,
|
|
198
|
+
});
|
|
199
|
+
execFileSync('git', ['clean', '-fd'], {
|
|
200
|
+
cwd: repoPath,
|
|
201
|
+
stdio: 'pipe',
|
|
202
|
+
timeout: LOCAL_TIMEOUT_MS,
|
|
189
203
|
});
|
|
190
|
-
execFileSync('git', ['clean', '-fd'], { cwd: repoPath, stdio: 'pipe' });
|
|
191
204
|
}
|
|
192
205
|
catch {
|
|
193
206
|
// Non-fatal; subsequent checkout will surface any real issue.
|
|
194
207
|
}
|
|
195
208
|
try {
|
|
196
209
|
if (ref.tag) {
|
|
197
|
-
execFileSync('git', ['-c', 'advice.detachedHead=false', 'checkout', `refs/tags/${ref.tag}`], { cwd: repoPath, stdio: 'pipe' });
|
|
210
|
+
execFileSync('git', ['-c', 'advice.detachedHead=false', 'checkout', `refs/tags/${ref.tag}`], { cwd: repoPath, stdio: 'pipe', timeout: LOCAL_TIMEOUT_MS });
|
|
198
211
|
logInfo(`Checked out tag ${ref.tag}`);
|
|
199
212
|
}
|
|
200
213
|
else if (ref.branch) {
|
|
201
214
|
// Create-or-reset local branch to origin tip.
|
|
202
|
-
execFileSync('git', ['checkout', '-B', ref.branch, `origin/${ref.branch}`], { cwd: repoPath, stdio: 'pipe' });
|
|
215
|
+
execFileSync('git', ['checkout', '-B', ref.branch, `origin/${ref.branch}`], { cwd: repoPath, stdio: 'pipe', timeout: LOCAL_TIMEOUT_MS });
|
|
203
216
|
logInfo(`Checked out branch ${ref.branch} at origin/${ref.branch}`);
|
|
204
217
|
}
|
|
205
218
|
}
|
package/package.json
CHANGED
package/.env.local
DELETED