@zgeoff/rig 0.2.5 → 0.2.6

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 (143) hide show
  1. package/dist/bench/pick-unremoved-checkout-state.d.ts +1 -1
  2. package/dist/{run-bench.d.ts → bench/run-bench.d.ts} +3 -3
  3. package/dist/browser/make-browser-lane-hooks.d.ts +1 -1
  4. package/dist/browser/process-runtime.d.ts +1 -1
  5. package/dist/browser/stop-descendant-processes.d.ts +1 -1
  6. package/dist/browser/wire-browser-lane-hooks.d.ts +1 -1
  7. package/dist/cli/run-cli.d.ts +10 -0
  8. package/dist/{read-command-output.d.ts → command/read-command-output.d.ts} +1 -1
  9. package/dist/{define-rig.d.ts → config/define-rig.d.ts} +1 -1
  10. package/dist/{parse-rig-config.d.ts → config/parse-rig-config.d.ts} +1 -1
  11. package/dist/{read-rig-config.d.ts → config/read-rig-config.d.ts} +1 -1
  12. package/dist/{run-eval.d.ts → eval/run-eval.d.ts} +2 -2
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +23 -23
  15. package/dist/{build-init-scripts.d.ts → init/build-init-scripts.d.ts} +1 -1
  16. package/dist/{run-init.d.ts → init/run-init.d.ts} +1 -1
  17. package/dist/{build-program-lane-hooks.d.ts → lanes/build-program-lane-hooks.d.ts} +1 -1
  18. package/dist/{make-repo-lane-hooks.d.ts → lanes/make-repo-lane-hooks.d.ts} +2 -2
  19. package/dist/{parse-lane-hook.d.ts → lanes/parse-lane-hook.d.ts} +1 -1
  20. package/dist/{parse-lane-start.d.ts → lanes/parse-lane-start.d.ts} +1 -1
  21. package/dist/{pick-lane-selection.d.ts → lanes/pick-lane-selection.d.ts} +1 -1
  22. package/dist/{run-lane.d.ts → lanes/run-lane.d.ts} +3 -3
  23. package/dist/{standard-lanes.d.ts → lanes/standard-lanes.d.ts} +1 -1
  24. package/dist/{build-program-environment.d.ts → programs/build-program-environment.d.ts} +1 -1
  25. package/dist/{collect-unprogrammed-e2e-dirs.d.ts → programs/collect-unprogrammed-e2e-dirs.d.ts} +1 -1
  26. package/dist/{run-program-builds.d.ts → programs/run-program-builds.d.ts} +2 -2
  27. package/dist/{build-test-selection.d.ts → unit/build-test-selection.d.ts} +1 -1
  28. package/dist/{build-unit-command.d.ts → unit/build-unit-command.d.ts} +1 -1
  29. package/dist/{collect-test-runs.d.ts → unit/collect-test-runs.d.ts} +1 -1
  30. package/dist/{pick-unit-run-plan.d.ts → unit/pick-unit-run-plan.d.ts} +1 -1
  31. package/dist/{resolve-related-tests.d.ts → unit/resolve-related-tests.d.ts} +1 -1
  32. package/dist/{run-related-tests.d.ts → unit/run-related-tests.d.ts} +1 -1
  33. package/dist/{run-unit-tests.d.ts → unit/run-unit-tests.d.ts} +2 -2
  34. package/dist/{run-unit.d.ts → unit/run-unit.d.ts} +1 -1
  35. package/dist/{read-git-common-dir.d.ts → workspace/read-git-common-dir.d.ts} +2 -2
  36. package/dist/{read-git-prefix.d.ts → workspace/read-git-prefix.d.ts} +2 -2
  37. package/package.json +7 -7
  38. package/src/bench/define-bench.ts +1 -1
  39. package/src/bench/pick-unremoved-checkout-state.ts +1 -1
  40. package/src/bench/read-bench-args.ts +1 -1
  41. package/src/bench/read-bench-file-args.ts +1 -1
  42. package/src/{run-bench-file.ts → bench/run-bench-file.ts} +5 -5
  43. package/src/{run-bench.ts → bench/run-bench.ts} +26 -26
  44. package/src/browser/browser-preload.ts +1 -1
  45. package/src/browser/make-browser-lane-hooks.ts +2 -2
  46. package/src/browser/process-runtime.ts +2 -2
  47. package/src/browser/stop-descendant-processes.ts +1 -1
  48. package/src/browser/wire-browser-lane-hooks.ts +2 -2
  49. package/src/{read-cli-args.ts → cli/read-cli-args.ts} +1 -1
  50. package/src/{run-cli.ts → cli/run-cli.ts} +14 -14
  51. package/src/cli.ts +13 -13
  52. package/src/{read-command-output.ts → command/read-command-output.ts} +1 -1
  53. package/src/{run-command.ts → command/run-command.ts} +3 -3
  54. package/src/{define-rig.ts → config/define-rig.ts} +7 -7
  55. package/src/{parse-rig-config.ts → config/parse-rig-config.ts} +3 -3
  56. package/src/{read-rig-config.ts → config/read-rig-config.ts} +1 -1
  57. package/src/{run-eval.ts → eval/run-eval.ts} +2 -2
  58. package/src/index.ts +3 -3
  59. package/src/{build-init-scripts.ts → init/build-init-scripts.ts} +5 -5
  60. package/src/{run-init.ts → init/run-init.ts} +1 -1
  61. package/src/{build-program-lane-hooks.ts → lanes/build-program-lane-hooks.ts} +2 -2
  62. package/src/{make-repo-lane-hooks.ts → lanes/make-repo-lane-hooks.ts} +4 -4
  63. package/src/{parse-lane-hook.ts → lanes/parse-lane-hook.ts} +1 -1
  64. package/src/{parse-lane-start.ts → lanes/parse-lane-start.ts} +1 -1
  65. package/src/{pick-lane-selection.ts → lanes/pick-lane-selection.ts} +1 -1
  66. package/src/{run-lane.ts → lanes/run-lane.ts} +14 -14
  67. package/src/{standard-lanes.ts → lanes/standard-lanes.ts} +1 -1
  68. package/src/{build-program-environment.ts → programs/build-program-environment.ts} +1 -1
  69. package/src/{collect-unprogrammed-e2e-dirs.ts → programs/collect-unprogrammed-e2e-dirs.ts} +1 -1
  70. package/src/programs/resolve-program.ts +2 -2
  71. package/src/{run-program-builds.ts → programs/run-program-builds.ts} +2 -2
  72. package/src/{build-test-selection.ts → unit/build-test-selection.ts} +4 -4
  73. package/src/{build-unit-command.ts → unit/build-unit-command.ts} +1 -1
  74. package/src/{collect-test-runs.ts → unit/collect-test-runs.ts} +2 -2
  75. package/src/{pick-unit-run-plan.ts → unit/pick-unit-run-plan.ts} +1 -1
  76. package/src/{resolve-related-tests.ts → unit/resolve-related-tests.ts} +2 -2
  77. package/src/{run-related-tests.ts → unit/run-related-tests.ts} +1 -1
  78. package/src/{run-unit-tests.ts → unit/run-unit-tests.ts} +3 -3
  79. package/src/{run-unit.ts → unit/run-unit.ts} +1 -1
  80. package/src/{read-git-common-dir.ts → workspace/read-git-common-dir.ts} +2 -2
  81. package/src/{read-git-prefix.ts → workspace/read-git-prefix.ts} +2 -2
  82. package/dist/run-cli.d.ts +0 -10
  83. /package/dist/{build-bench-folder-path.d.ts → bench/build-bench-folder-path.d.ts} +0 -0
  84. /package/dist/{collect-bench-files.d.ts → bench/collect-bench-files.d.ts} +0 -0
  85. /package/dist/{create-bench-work-folder.d.ts → bench/create-bench-work-folder.d.ts} +0 -0
  86. /package/dist/{run-bench-file.d.ts → bench/run-bench-file.d.ts} +0 -0
  87. /package/dist/{is-command-name.d.ts → cli/is-command-name.d.ts} +0 -0
  88. /package/dist/{read-cli-args.d.ts → cli/read-cli-args.d.ts} +0 -0
  89. /package/dist/{run-command.d.ts → command/run-command.d.ts} +0 -0
  90. /package/dist/{system-clock.d.ts → command/system-clock.d.ts} +0 -0
  91. /package/dist/{bunfig-declaration-schema.d.ts → config/bunfig-declaration-schema.d.ts} +0 -0
  92. /package/dist/{format-parse-error.d.ts → config/format-parse-error.d.ts} +0 -0
  93. /package/dist/{make-ignore-check.d.ts → config/make-ignore-check.d.ts} +0 -0
  94. /package/dist/{parse-duration.d.ts → config/parse-duration.d.ts} +0 -0
  95. /package/dist/{repo-glob-schema.d.ts → config/repo-glob-schema.d.ts} +0 -0
  96. /package/dist/{collect-eval-files.d.ts → eval/collect-eval-files.d.ts} +0 -0
  97. /package/dist/{init-files.d.ts → init/init-files.d.ts} +0 -0
  98. /package/dist/{has-lane-suffix.d.ts → lanes/has-lane-suffix.d.ts} +0 -0
  99. /package/dist/{lane-hooks.d.ts → lanes/lane-hooks.d.ts} +0 -0
  100. /package/dist/{run-lane-hooks.d.ts → lanes/run-lane-hooks.d.ts} +0 -0
  101. /package/dist/{pick-e2e-dirs.d.ts → programs/pick-e2e-dirs.d.ts} +0 -0
  102. /package/dist/{build-diet-command.d.ts → unit/build-diet-command.d.ts} +0 -0
  103. /package/dist/{find-single-run-flag.d.ts → unit/find-single-run-flag.d.ts} +0 -0
  104. /package/dist/{find-timeout-arg.d.ts → unit/find-timeout-arg.d.ts} +0 -0
  105. /package/dist/{format-no-match-message.d.ts → unit/format-no-match-message.d.ts} +0 -0
  106. /package/dist/{format-no-tests-message.d.ts → unit/format-no-tests-message.d.ts} +0 -0
  107. /package/dist/{is-test-file.d.ts → unit/is-test-file.d.ts} +0 -0
  108. /package/dist/{parse-test-args.d.ts → unit/parse-test-args.d.ts} +0 -0
  109. /package/dist/{read-memory-budget.d.ts → unit/read-memory-budget.d.ts} +0 -0
  110. /package/dist/{read-worker-count.d.ts → unit/read-worker-count.d.ts} +0 -0
  111. /package/dist/{resolve-diet-script.d.ts → unit/resolve-diet-script.d.ts} +0 -0
  112. /package/dist/{test-run-args.d.ts → unit/test-run-args.d.ts} +0 -0
  113. /package/dist/{probe-workspace-repo.d.ts → workspace/probe-workspace-repo.d.ts} +0 -0
  114. /package/dist/{read-tracked-files.d.ts → workspace/read-tracked-files.d.ts} +0 -0
  115. /package/src/{build-bench-folder-path.ts → bench/build-bench-folder-path.ts} +0 -0
  116. /package/src/{collect-bench-files.ts → bench/collect-bench-files.ts} +0 -0
  117. /package/src/{create-bench-work-folder.ts → bench/create-bench-work-folder.ts} +0 -0
  118. /package/src/{is-command-name.ts → cli/is-command-name.ts} +0 -0
  119. /package/src/{system-clock.ts → command/system-clock.ts} +0 -0
  120. /package/src/{bunfig-declaration-schema.ts → config/bunfig-declaration-schema.ts} +0 -0
  121. /package/src/{format-parse-error.ts → config/format-parse-error.ts} +0 -0
  122. /package/src/{make-ignore-check.ts → config/make-ignore-check.ts} +0 -0
  123. /package/src/{parse-duration.ts → config/parse-duration.ts} +0 -0
  124. /package/src/{repo-glob-schema.ts → config/repo-glob-schema.ts} +0 -0
  125. /package/src/{collect-eval-files.ts → eval/collect-eval-files.ts} +0 -0
  126. /package/src/{init-files.ts → init/init-files.ts} +0 -0
  127. /package/src/{has-lane-suffix.ts → lanes/has-lane-suffix.ts} +0 -0
  128. /package/src/{lane-hooks.ts → lanes/lane-hooks.ts} +0 -0
  129. /package/src/{run-lane-hooks.ts → lanes/run-lane-hooks.ts} +0 -0
  130. /package/src/{pick-e2e-dirs.ts → programs/pick-e2e-dirs.ts} +0 -0
  131. /package/src/{build-diet-command.ts → unit/build-diet-command.ts} +0 -0
  132. /package/src/{find-single-run-flag.ts → unit/find-single-run-flag.ts} +0 -0
  133. /package/src/{find-timeout-arg.ts → unit/find-timeout-arg.ts} +0 -0
  134. /package/src/{format-no-match-message.ts → unit/format-no-match-message.ts} +0 -0
  135. /package/src/{format-no-tests-message.ts → unit/format-no-tests-message.ts} +0 -0
  136. /package/src/{is-test-file.ts → unit/is-test-file.ts} +0 -0
  137. /package/src/{parse-test-args.ts → unit/parse-test-args.ts} +0 -0
  138. /package/src/{read-memory-budget.ts → unit/read-memory-budget.ts} +0 -0
  139. /package/src/{read-worker-count.ts → unit/read-worker-count.ts} +0 -0
  140. /package/src/{resolve-diet-script.ts → unit/resolve-diet-script.ts} +0 -0
  141. /package/src/{test-run-args.ts → unit/test-run-args.ts} +0 -0
  142. /package/src/{probe-workspace-repo.ts → workspace/probe-workspace-repo.ts} +0 -0
  143. /package/src/{read-tracked-files.ts → workspace/read-tracked-files.ts} +0 -0
package/src/cli.ts CHANGED
@@ -4,21 +4,21 @@ import { mkdir, mkdtemp } from 'node:fs/promises';
4
4
  import { availableParallelism, totalmem } from 'node:os';
5
5
  import { join } from 'node:path';
6
6
  import { readOptionalText } from '@zgeoff/std';
7
+ import { createBenchWorkFolder } from './bench/create-bench-work-folder.ts';
7
8
  import { processRuntime } from './browser/process-runtime.ts';
8
9
  import { removePath } from './browser/remove-path.ts';
9
10
  import { wireBrowserLaneHooks } from './browser/wire-browser-lane-hooks.ts';
10
- import { createBenchWorkFolder } from './create-bench-work-folder.ts';
11
- import { initFiles } from './init-files.ts';
12
- import { probeWorkspaceRepo } from './probe-workspace-repo.ts';
13
- import { readCommandOutput } from './read-command-output.ts';
14
- import type { CommandOutput, ReadCommandOptions } from './read-command-output.ts';
15
- import { readGitCommonDir } from './read-git-common-dir.ts';
16
- import { readRigConfig } from './read-rig-config.ts';
17
- import { readTrackedFiles } from './read-tracked-files.ts';
18
- import { readWorkerCount } from './read-worker-count.ts';
19
- import { resolveDietScript } from './resolve-diet-script.ts';
20
- import { runCLI } from './run-cli.ts';
21
- import { runCommand } from './run-command.ts';
11
+ import { runCLI } from './cli/run-cli.ts';
12
+ import { readCommandOutput } from './command/read-command-output.ts';
13
+ import type { CommandOutput, ReadCommandOptions } from './command/read-command-output.ts';
14
+ import { runCommand } from './command/run-command.ts';
15
+ import { readRigConfig } from './config/read-rig-config.ts';
16
+ import { initFiles } from './init/init-files.ts';
17
+ import { readWorkerCount } from './unit/read-worker-count.ts';
18
+ import { resolveDietScript } from './unit/resolve-diet-script.ts';
19
+ import { probeWorkspaceRepo } from './workspace/probe-workspace-repo.ts';
20
+ import { readGitCommonDir } from './workspace/read-git-common-dir.ts';
21
+ import { readTrackedFiles } from './workspace/read-tracked-files.ts';
22
22
 
23
23
  // A signal stops the run's processes through the abort, and the run waits for them to exit before
24
24
  // it returns, so a lane's stop hook and folder cleanup still run.
@@ -62,7 +62,7 @@ try {
62
62
  },
63
63
  {
64
64
  dietScript: resolveDietScript(),
65
- benchScript: join(import.meta.dir, 'run-bench-file.ts'),
65
+ benchScript: join(import.meta.dir, 'bench', 'run-bench-file.ts'),
66
66
  output,
67
67
  sources: { cwd: repoRoot, probeFile: existsSync },
68
68
  readConfig: (root) =>
@@ -1,4 +1,4 @@
1
- import type { ProcessRuntime, SpawnOptions } from './browser/process-runtime.ts';
1
+ import type { ProcessRuntime, SpawnOptions } from '../browser/process-runtime.ts';
2
2
 
3
3
  export interface CommandOutput {
4
4
  readonly exitCode: number;
@@ -1,6 +1,6 @@
1
- import { processGroups } from './browser/process-groups.ts';
2
- import { processRuntime } from './browser/process-runtime.ts';
3
- import { startProcessGroup } from './browser/start-process-group.ts';
1
+ import { processGroups } from '../browser/process-groups.ts';
2
+ import { processRuntime } from '../browser/process-runtime.ts';
3
+ import { startProcessGroup } from '../browser/start-process-group.ts';
4
4
 
5
5
  export interface CommandOptions {
6
6
  readonly cwd: string;
@@ -1,9 +1,6 @@
1
- import { bunfigDeclarationSchema } from './bunfig-declaration-schema.ts';
2
- import { isCommandName } from './is-command-name.ts';
3
- import { parseDuration } from './parse-duration.ts';
4
- import { repoGlobSchema } from './repo-glob-schema.ts';
5
- import { standardLanes } from './standard-lanes.ts';
6
- import type { StandardLane } from './standard-lanes.ts';
1
+ import { isCommandName } from '../cli/is-command-name.ts';
2
+ import { standardLanes } from '../lanes/standard-lanes.ts';
3
+ import type { StandardLane } from '../lanes/standard-lanes.ts';
7
4
  import type {
8
5
  BunfigDeclaration,
9
6
  LaneDeclaration,
@@ -11,7 +8,10 @@ import type {
11
8
  ResolvedLane,
12
9
  RigConfig,
13
10
  RigDeclaration,
14
- } from './types.ts';
11
+ } from '../types.ts';
12
+ import { bunfigDeclarationSchema } from './bunfig-declaration-schema.ts';
13
+ import { parseDuration } from './parse-duration.ts';
14
+ import { repoGlobSchema } from './repo-glob-schema.ts';
15
15
 
16
16
  const laneNamePattern = /^[a-z][a-z0-9-]*$/u;
17
17
 
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod';
2
- import { bunfigDeclarationSchema } from './bunfig-declaration-schema.ts';
3
- import { repoGlobSchema } from './repo-glob-schema.ts';
4
2
  import type {
5
3
  BunfigDeclaration,
6
4
  LaneParallelism,
7
5
  ProgramDeclaration,
8
6
  ResolvedLane,
9
7
  RigConfig,
10
- } from './types.ts';
8
+ } from '../types.ts';
9
+ import { bunfigDeclarationSchema } from './bunfig-declaration-schema.ts';
10
+ import { repoGlobSchema } from './repo-glob-schema.ts';
11
11
 
12
12
  export type ParsedRigConfig =
13
13
  | { readonly kind: 'parsed'; readonly config: RigConfig }
@@ -1,8 +1,8 @@
1
1
  import { join } from 'node:path';
2
2
  import { isRecord } from '@zgeoff/std';
3
+ import type { RigConfig } from '../types.ts';
3
4
  import { defineRig } from './define-rig.ts';
4
5
  import { parseRigConfig } from './parse-rig-config.ts';
5
- import type { RigConfig } from './types.ts';
6
6
 
7
7
  export interface RigConfigSources {
8
8
  readonly probeFile: (path: string) => boolean;
@@ -1,7 +1,7 @@
1
1
  import { basename, dirname } from 'node:path';
2
+ import type { CommandOptions } from '../command/run-command.ts';
3
+ import type { RigOutput, RigRun } from '../types.ts';
2
4
  import { collectEvalFiles } from './collect-eval-files.ts';
3
- import type { CommandOptions } from './run-command.ts';
4
- import type { RigOutput, RigRun } from './types.ts';
5
5
 
6
6
  export interface EvalDeps {
7
7
  readonly output: RigOutput;
package/src/index.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { defineRig } from './define-rig.ts';
2
- export { parseRigConfig } from './parse-rig-config.ts';
3
- export type { ParsedRigConfig } from './parse-rig-config.ts';
1
+ export { defineRig } from './config/define-rig.ts';
2
+ export { parseRigConfig } from './config/parse-rig-config.ts';
3
+ export type { ParsedRigConfig } from './config/parse-rig-config.ts';
4
4
  export { runInPage } from './browser/run-in-page.ts';
5
5
  export type { PageResultSchema } from './browser/run-in-page.ts';
6
6
 
@@ -1,8 +1,8 @@
1
- import { collectBenchFiles } from './collect-bench-files.ts';
2
- import { collectEvalFiles } from './collect-eval-files.ts';
3
- import { pickE2EDirs } from './pick-e2e-dirs.ts';
4
- import { standardLanes } from './standard-lanes.ts';
5
- import type { ResolvedLane, RigConfig } from './types.ts';
1
+ import { collectBenchFiles } from '../bench/collect-bench-files.ts';
2
+ import { collectEvalFiles } from '../eval/collect-eval-files.ts';
3
+ import { standardLanes } from '../lanes/standard-lanes.ts';
4
+ import { pickE2EDirs } from '../programs/pick-e2e-dirs.ts';
5
+ import type { ResolvedLane, RigConfig } from '../types.ts';
6
6
 
7
7
  export type PackageScripts = Readonly<Record<string, string>>;
8
8
 
@@ -1,8 +1,8 @@
1
1
  import { join } from 'node:path';
2
2
  import { isRecord } from '@zgeoff/std';
3
+ import type { RigConfig, RigOutput } from '../types.ts';
3
4
  import { buildInitScripts } from './build-init-scripts.ts';
4
5
  import type { InitFiles } from './init-files.ts';
5
- import type { RigConfig, RigOutput } from './types.ts';
6
6
 
7
7
  export interface InitDeps {
8
8
  readonly probeWorkspaceRepo: (repoRoot: string) => Promise<boolean>;
@@ -1,6 +1,6 @@
1
- import { buildProgramEnvironment } from './build-program-environment.ts';
1
+ import { buildProgramEnvironment } from '../programs/build-program-environment.ts';
2
+ import type { ProgramDeclaration } from '../types.ts';
2
3
  import type { LaneHooks } from './lane-hooks.ts';
3
- import type { ProgramDeclaration } from './types.ts';
4
4
 
5
5
  // The programs' artifact paths reach the test or bench process beside whatever the lane's own start
6
6
  // hook adds. `rig e2e` and `rig bench` both wrap their hooks with this.
@@ -1,11 +1,11 @@
1
1
  import { join } from 'node:path';
2
- import { buildDietCommand } from './build-diet-command.ts';
2
+ import type { CommandOptions } from '../command/run-command.ts';
3
+ import type { LaneContext } from '../types.ts';
4
+ import { buildDietCommand } from '../unit/build-diet-command.ts';
5
+ import { testRunArgs } from '../unit/test-run-args.ts';
3
6
  import type { LaneHooks } from './lane-hooks.ts';
4
7
  import { parseLaneHook } from './parse-lane-hook.ts';
5
8
  import { parseLaneStart } from './parse-lane-start.ts';
6
- import type { CommandOptions } from './run-command.ts';
7
- import { testRunArgs } from './test-run-args.ts';
8
- import type { LaneContext } from './types.ts';
9
9
 
10
10
  export interface RepoLaneOptions {
11
11
  readonly context: LaneContext;
@@ -1,5 +1,5 @@
1
1
  import { isRecord } from '@zgeoff/std';
2
- import type { LaneContext } from './types.ts';
2
+ import type { LaneContext } from '../types.ts';
3
3
 
4
4
  export type LaneHook = (context: LaneContext) => Promise<unknown>;
5
5
 
@@ -1,4 +1,4 @@
1
- import type { LaneStart } from './types.ts';
1
+ import type { LaneStart } from '../types.ts';
2
2
 
3
3
  export function parseLaneStart(value: unknown, path: string): LaneStart {
4
4
  if (value === undefined) {
@@ -1,4 +1,4 @@
1
- import type { ResolvedLane } from './types.ts';
1
+ import type { ResolvedLane } from '../types.ts';
2
2
 
3
3
  // bun test reads a bare argument as a filter on the path, so a suffix filter picks the lane's files
4
4
  // and a ./ path picks a folder.
@@ -1,24 +1,24 @@
1
1
  import { match } from 'ts-pattern';
2
- import { pickExitCodeAfterTests } from './browser/pick-exit-code-after-tests.ts';
3
- import type { BrowserLaneWiring } from './browser/wire-browser-lane-hooks.ts';
2
+ import { pickExitCodeAfterTests } from '../browser/pick-exit-code-after-tests.ts';
3
+ import type { BrowserLaneWiring } from '../browser/wire-browser-lane-hooks.ts';
4
+ import { makeIgnoreCheck } from '../config/make-ignore-check.ts';
5
+ import { collectUnprogrammedE2EDirs } from '../programs/collect-unprogrammed-e2e-dirs.ts';
6
+ import { pickE2EDirs } from '../programs/pick-e2e-dirs.ts';
7
+ import type { ProgramBuildDeps } from '../programs/run-program-builds.ts';
8
+ import { runProgramBuilds } from '../programs/run-program-builds.ts';
9
+ import type { ResolvedLane, RigConfig, RigRun } from '../types.ts';
10
+ import type { TestSelection } from '../unit/build-test-selection.ts';
11
+ import { buildTestSelection } from '../unit/build-test-selection.ts';
12
+ import { formatNoMatchMessage } from '../unit/format-no-match-message.ts';
13
+ import { formatNoTestsMessage } from '../unit/format-no-tests-message.ts';
14
+ import { isTestFile } from '../unit/is-test-file.ts';
15
+ import { parseTestArgs } from '../unit/parse-test-args.ts';
4
16
  import { buildProgramLaneHooks } from './build-program-lane-hooks.ts';
5
- import type { TestSelection } from './build-test-selection.ts';
6
- import { buildTestSelection } from './build-test-selection.ts';
7
- import { collectUnprogrammedE2EDirs } from './collect-unprogrammed-e2e-dirs.ts';
8
- import { formatNoMatchMessage } from './format-no-match-message.ts';
9
- import { formatNoTestsMessage } from './format-no-tests-message.ts';
10
17
  import { hasLaneSuffix } from './has-lane-suffix.ts';
11
- import { isTestFile } from './is-test-file.ts';
12
18
  import type { LaneHooks } from './lane-hooks.ts';
13
- import { makeIgnoreCheck } from './make-ignore-check.ts';
14
19
  import { makeRepoLaneHooks } from './make-repo-lane-hooks.ts';
15
- import { parseTestArgs } from './parse-test-args.ts';
16
- import { pickE2EDirs } from './pick-e2e-dirs.ts';
17
20
  import { pickLaneSelection } from './pick-lane-selection.ts';
18
21
  import { runLaneHooks } from './run-lane-hooks.ts';
19
- import type { ProgramBuildDeps } from './run-program-builds.ts';
20
- import { runProgramBuilds } from './run-program-builds.ts';
21
- import type { ResolvedLane, RigConfig, RigRun } from './types.ts';
22
22
 
23
23
  export interface LaneDeps extends ProgramBuildDeps {
24
24
  readonly dietScript: string;
@@ -1,4 +1,4 @@
1
- import type { LaneParallelism } from './types.ts';
1
+ import type { LaneParallelism } from '../types.ts';
2
2
 
3
3
  export interface StandardLane {
4
4
  readonly name: string;
@@ -1,5 +1,5 @@
1
1
  import { join } from 'node:path';
2
- import type { ProgramDeclaration } from './types.ts';
2
+ import type { ProgramDeclaration } from '../types.ts';
3
3
 
4
4
  // The environment variable that holds a program's built artifact, such as RIG_PROGRAM_KETTLE_CLI
5
5
  // for the program `kettle-cli`.
@@ -1,5 +1,5 @@
1
1
  import { posix } from 'node:path';
2
- import type { ProgramDeclaration } from './types.ts';
2
+ import type { ProgramDeclaration } from '../types.ts';
3
3
 
4
4
  // An e2e folder runs a program of its package, so a folder in a package that no program names has
5
5
  // nothing to run.
@@ -1,9 +1,9 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { isRecord } from '@zgeoff/std';
4
- import { buildProgramVariable } from '../build-program-environment.ts';
5
- import { parseRigConfig } from '../parse-rig-config.ts';
4
+ import { parseRigConfig } from '../config/parse-rig-config.ts';
6
5
  import type { ProgramDeclaration } from '../types.ts';
6
+ import { buildProgramVariable } from './build-program-environment.ts';
7
7
  import { resolveRepoRoot } from './resolve-repo-root.ts';
8
8
 
9
9
  export interface ProgramLaunch {
@@ -1,6 +1,6 @@
1
1
  import { join } from 'node:path';
2
- import type { CommandOptions } from './run-command.ts';
3
- import type { ProgramDeclaration, RigOutput, RigRun } from './types.ts';
2
+ import type { CommandOptions } from '../command/run-command.ts';
3
+ import type { ProgramDeclaration, RigOutput, RigRun } from '../types.ts';
4
4
 
5
5
  export interface ProgramBuildDeps {
6
6
  readonly output: RigOutput;
@@ -1,11 +1,11 @@
1
1
  import { posix } from 'node:path';
2
2
  import { match } from 'ts-pattern';
3
- import { hasLaneSuffix } from './has-lane-suffix.ts';
3
+ import { makeIgnoreCheck } from '../config/make-ignore-check.ts';
4
+ import { hasLaneSuffix } from '../lanes/has-lane-suffix.ts';
5
+ import { pickE2EDirs } from '../programs/pick-e2e-dirs.ts';
6
+ import type { ResolvedLane, RigConfig } from '../types.ts';
4
7
  import { isTestFile } from './is-test-file.ts';
5
- import { makeIgnoreCheck } from './make-ignore-check.ts';
6
8
  import type { TestArgs } from './parse-test-args.ts';
7
- import { pickE2EDirs } from './pick-e2e-dirs.ts';
8
- import type { ResolvedLane, RigConfig } from './types.ts';
9
9
 
10
10
  export type TestSelection =
11
11
  | { readonly kind: 'lane'; readonly files: readonly string[]; readonly flags: readonly string[] }
@@ -1,7 +1,7 @@
1
1
  import { posix } from 'node:path';
2
+ import type { RigConfig } from '../types.ts';
2
3
  import type { TestRun } from './collect-test-runs.ts';
3
4
  import { testRunArgs } from './test-run-args.ts';
4
- import type { RigConfig } from './types.ts';
5
5
 
6
6
  export interface UnitCommandRequest {
7
7
  readonly e2eDirs: readonly string[];
@@ -1,5 +1,5 @@
1
- import { makeIgnoreCheck } from './make-ignore-check.ts';
2
- import type { BunfigDeclaration } from './types.ts';
1
+ import { makeIgnoreCheck } from '../config/make-ignore-check.ts';
2
+ import type { BunfigDeclaration } from '../types.ts';
3
3
 
4
4
  // One `bun test` process: the folder it runs from, the bunfig it reads, and its tests.
5
5
  export interface TestRun {
@@ -1,7 +1,7 @@
1
+ import type { RigConfig } from '../types.ts';
1
2
  import type { TestRun } from './collect-test-runs.ts';
2
3
  import { collectTestRuns } from './collect-test-runs.ts';
3
4
  import { findSingleRunFlag } from './find-single-run-flag.ts';
4
- import type { RigConfig } from './types.ts';
5
5
 
6
6
  export interface UnitRunPlanRequest {
7
7
  readonly flags: readonly string[];
@@ -1,6 +1,6 @@
1
1
  import { basename, join } from 'node:path';
2
- import { makeIgnoreCheck } from './make-ignore-check.ts';
3
- import type { RigConfig } from './types.ts';
2
+ import { makeIgnoreCheck } from '../config/make-ignore-check.ts';
3
+ import type { RigConfig } from '../types.ts';
4
4
 
5
5
  export interface RelatedTestSources {
6
6
  readonly cwd: string;
@@ -1,11 +1,11 @@
1
1
  import { basename } from 'node:path';
2
2
  import { parseArgs } from 'node:util';
3
+ import type { RigConfig, RigRun } from '../types.ts';
3
4
  import type { WorkerCount } from './read-worker-count.ts';
4
5
  import { resolveRelatedTests } from './resolve-related-tests.ts';
5
6
  import type { RelatedTestSources } from './resolve-related-tests.ts';
6
7
  import type { UnitRunDeps } from './run-unit-tests.ts';
7
8
  import { runUnitTests } from './run-unit-tests.ts';
8
- import type { RigConfig, RigRun } from './types.ts';
9
9
 
10
10
  // A host with one worker runs each file slower than CI, and a test that passes there must not fail
11
11
  // the push.
@@ -1,13 +1,13 @@
1
1
  import { join } from 'node:path';
2
2
  import { match } from 'ts-pattern';
3
+ import type { CommandOptions } from '../command/run-command.ts';
4
+ import { pickE2EDirs } from '../programs/pick-e2e-dirs.ts';
5
+ import type { RigConfig, RigOutput, RigRun } from '../types.ts';
3
6
  import { buildDietCommand } from './build-diet-command.ts';
4
7
  import { buildUnitCommand } from './build-unit-command.ts';
5
8
  import type { TestRun } from './collect-test-runs.ts';
6
- import { pickE2EDirs } from './pick-e2e-dirs.ts';
7
9
  import type { UnitRunPlanRequest } from './pick-unit-run-plan.ts';
8
10
  import { pickUnitRunPlan } from './pick-unit-run-plan.ts';
9
- import type { CommandOptions } from './run-command.ts';
10
- import type { RigConfig, RigOutput, RigRun } from './types.ts';
11
11
 
12
12
  export interface UnitRequest extends UnitRunPlanRequest {
13
13
  readonly workerCount: number;
@@ -1,4 +1,5 @@
1
1
  import { match } from 'ts-pattern';
2
+ import type { RigConfig, RigRun } from '../types.ts';
2
3
  import { buildTestSelection } from './build-test-selection.ts';
3
4
  import { formatNoMatchMessage } from './format-no-match-message.ts';
4
5
  import { formatNoTestsMessage } from './format-no-tests-message.ts';
@@ -6,7 +7,6 @@ import { parseTestArgs } from './parse-test-args.ts';
6
7
  import type { WorkerCount } from './read-worker-count.ts';
7
8
  import type { UnitRunDeps } from './run-unit-tests.ts';
8
9
  import { runUnitTests } from './run-unit-tests.ts';
9
- import type { RigConfig, RigRun } from './types.ts';
10
10
 
11
11
  export interface UnitDeps extends UnitRunDeps {
12
12
  readonly readWorkerCount: () => Promise<WorkerCount>;
@@ -1,5 +1,5 @@
1
- import type { SpawnOptions } from './browser/process-runtime.ts';
2
- import type { ReadCommandOutput } from './read-command-output.ts';
1
+ import type { SpawnOptions } from '../browser/process-runtime.ts';
2
+ import type { ReadCommandOutput } from '../command/read-command-output.ts';
3
3
 
4
4
  export interface GitCommonDirDeps {
5
5
  readonly readCommandOutput: ReadCommandOutput;
@@ -1,5 +1,5 @@
1
- import type { SpawnOptions } from './browser/process-runtime.ts';
2
- import type { ReadCommandOutput } from './read-command-output.ts';
1
+ import type { SpawnOptions } from '../browser/process-runtime.ts';
2
+ import type { ReadCommandOutput } from '../command/read-command-output.ts';
3
3
 
4
4
  export interface GitPrefixDeps {
5
5
  readonly readCommandOutput: ReadCommandOutput;
package/dist/run-cli.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { BenchDeps } from './run-bench.ts';
2
- import type { EvalDeps } from './run-eval.ts';
3
- import type { InitDeps } from './run-init.ts';
4
- import type { LaneDeps } from './run-lane.ts';
5
- import type { RelatedTestDeps } from './run-related-tests.ts';
6
- import type { UnitDeps } from './run-unit.ts';
7
- import type { RigRun } from './types.ts';
8
- export interface CLIDeps extends LaneDeps, UnitDeps, RelatedTestDeps, InitDeps, BenchDeps, EvalDeps {
9
- }
10
- export declare function runCLI(argv: readonly string[], run: RigRun, deps: CLIDeps): Promise<number>;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes