opencastle 0.33.6 → 0.33.7

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 (33) hide show
  1. package/dist/cli/convoy/engine.d.ts +5 -0
  2. package/dist/cli/convoy/engine.d.ts.map +1 -1
  3. package/dist/cli/convoy/engine.js +85 -16
  4. package/dist/cli/convoy/engine.js.map +1 -1
  5. package/dist/cli/convoy/engine.test.js +10 -12
  6. package/dist/cli/convoy/engine.test.js.map +1 -1
  7. package/dist/cli/convoy/pipeline.d.ts +3 -0
  8. package/dist/cli/convoy/pipeline.d.ts.map +1 -1
  9. package/dist/cli/convoy/pipeline.js +88 -18
  10. package/dist/cli/convoy/pipeline.js.map +1 -1
  11. package/dist/cli/run.d.ts.map +1 -1
  12. package/dist/cli/run.js +1 -123
  13. package/dist/cli/run.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/cli/convoy/engine.test.ts +10 -12
  16. package/src/cli/convoy/engine.ts +84 -16
  17. package/src/cli/convoy/pipeline.ts +81 -19
  18. package/src/cli/run.ts +0 -118
  19. package/src/dashboard/dist/data/convoys/demo-api-v2.json +3 -3
  20. package/src/dashboard/dist/data/convoys/demo-auth-revamp.json +4 -4
  21. package/src/dashboard/dist/data/convoys/demo-dashboard-ui.json +6 -6
  22. package/src/dashboard/dist/data/convoys/demo-data-pipeline.json +3 -3
  23. package/src/dashboard/dist/data/convoys/demo-deploy-ci.json +1 -1
  24. package/src/dashboard/dist/data/convoys/demo-docs-update.json +3 -3
  25. package/src/dashboard/dist/data/convoys/demo-perf-opt.json +4 -4
  26. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  27. package/src/dashboard/public/data/convoys/demo-api-v2.json +3 -3
  28. package/src/dashboard/public/data/convoys/demo-auth-revamp.json +4 -4
  29. package/src/dashboard/public/data/convoys/demo-dashboard-ui.json +6 -6
  30. package/src/dashboard/public/data/convoys/demo-data-pipeline.json +3 -3
  31. package/src/dashboard/public/data/convoys/demo-deploy-ci.json +1 -1
  32. package/src/dashboard/public/data/convoys/demo-docs-update.json +3 -3
  33. package/src/dashboard/public/data/convoys/demo-perf-opt.json +4 -4
@@ -71,6 +71,7 @@ function makeEngine(opts) {
71
71
  return createConvoyEngine({
72
72
  logsDir: join(tmpDir, 'logs'), // prevents test data in production logs
73
73
  _ensureBranch: vi.fn().mockResolvedValue(undefined),
74
+ _convoyWorktreeDir: null,
74
75
  ...opts,
75
76
  });
76
77
  }
@@ -2760,10 +2761,9 @@ describe('symlink security scan', () => {
2760
2761
  expect(result.status).toBe('done');
2761
2762
  });
2762
2763
  });
2763
- // ── Security: ensureBranch fallback (issue #3) ────────────────────────────────
2764
- describe('ensureBranch fallback when _ensureBranch not provided', () => {
2765
- it('calls the injected _ensureBranch when branch is set in spec', async () => {
2766
- const branchFn = vi.fn().mockResolvedValue(undefined);
2764
+ // ── Security: convoy-level worktree when branch is set ───────────────────────
2765
+ describe('convoy-level worktree when branch is set', () => {
2766
+ it('runs successfully when _convoyWorktreeDir is null and branch is set', async () => {
2767
2767
  const adapter = makeAdapter();
2768
2768
  const spec = makeSpec({ branch: 'feature-x' });
2769
2769
  const engine = createConvoyEngine({
@@ -2773,13 +2773,12 @@ describe('ensureBranch fallback when _ensureBranch not provided', () => {
2773
2773
  dbPath,
2774
2774
  _worktreeManager: makeWorktreeManager(),
2775
2775
  _mergeQueue: makeMergeQueue(),
2776
- _ensureBranch: branchFn,
2776
+ _convoyWorktreeDir: null,
2777
2777
  });
2778
- await engine.run();
2779
- expect(branchFn).toHaveBeenCalledWith('feature-x', expect.any(String));
2778
+ const result = await engine.run();
2779
+ expect(result.status).toBe('done');
2780
2780
  });
2781
- it('does not call ensureBranch when spec has no branch', async () => {
2782
- const branchFn = vi.fn().mockResolvedValue(undefined);
2781
+ it('does not attempt worktree creation when spec has no branch', async () => {
2783
2782
  const adapter = makeAdapter();
2784
2783
  const spec = makeSpec({ branch: undefined });
2785
2784
  const engine = makeEngine({
@@ -2789,10 +2788,9 @@ describe('ensureBranch fallback when _ensureBranch not provided', () => {
2789
2788
  dbPath,
2790
2789
  _worktreeManager: makeWorktreeManager(),
2791
2790
  _mergeQueue: makeMergeQueue(),
2792
- _ensureBranch: branchFn,
2793
2791
  });
2794
- await engine.run();
2795
- expect(branchFn).not.toHaveBeenCalled();
2792
+ const result = await engine.run();
2793
+ expect(result.status).toBe('done');
2796
2794
  });
2797
2795
  });
2798
2796
  // ── Security: secret scan in markdown dual-write (issue #4) ──────────────────