@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.
- package/dist/bench/pick-unremoved-checkout-state.d.ts +1 -1
- package/dist/{run-bench.d.ts → bench/run-bench.d.ts} +3 -3
- package/dist/browser/make-browser-lane-hooks.d.ts +1 -1
- package/dist/browser/process-runtime.d.ts +1 -1
- package/dist/browser/stop-descendant-processes.d.ts +1 -1
- package/dist/browser/wire-browser-lane-hooks.d.ts +1 -1
- package/dist/cli/run-cli.d.ts +10 -0
- package/dist/{read-command-output.d.ts → command/read-command-output.d.ts} +1 -1
- package/dist/{define-rig.d.ts → config/define-rig.d.ts} +1 -1
- package/dist/{parse-rig-config.d.ts → config/parse-rig-config.d.ts} +1 -1
- package/dist/{read-rig-config.d.ts → config/read-rig-config.d.ts} +1 -1
- package/dist/{run-eval.d.ts → eval/run-eval.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +23 -23
- package/dist/{build-init-scripts.d.ts → init/build-init-scripts.d.ts} +1 -1
- package/dist/{run-init.d.ts → init/run-init.d.ts} +1 -1
- package/dist/{build-program-lane-hooks.d.ts → lanes/build-program-lane-hooks.d.ts} +1 -1
- package/dist/{make-repo-lane-hooks.d.ts → lanes/make-repo-lane-hooks.d.ts} +2 -2
- package/dist/{parse-lane-hook.d.ts → lanes/parse-lane-hook.d.ts} +1 -1
- package/dist/{parse-lane-start.d.ts → lanes/parse-lane-start.d.ts} +1 -1
- package/dist/{pick-lane-selection.d.ts → lanes/pick-lane-selection.d.ts} +1 -1
- package/dist/{run-lane.d.ts → lanes/run-lane.d.ts} +3 -3
- package/dist/{standard-lanes.d.ts → lanes/standard-lanes.d.ts} +1 -1
- package/dist/{build-program-environment.d.ts → programs/build-program-environment.d.ts} +1 -1
- package/dist/{collect-unprogrammed-e2e-dirs.d.ts → programs/collect-unprogrammed-e2e-dirs.d.ts} +1 -1
- package/dist/{run-program-builds.d.ts → programs/run-program-builds.d.ts} +2 -2
- package/dist/{build-test-selection.d.ts → unit/build-test-selection.d.ts} +1 -1
- package/dist/{build-unit-command.d.ts → unit/build-unit-command.d.ts} +1 -1
- package/dist/{collect-test-runs.d.ts → unit/collect-test-runs.d.ts} +1 -1
- package/dist/{pick-unit-run-plan.d.ts → unit/pick-unit-run-plan.d.ts} +1 -1
- package/dist/{resolve-related-tests.d.ts → unit/resolve-related-tests.d.ts} +1 -1
- package/dist/{run-related-tests.d.ts → unit/run-related-tests.d.ts} +1 -1
- package/dist/{run-unit-tests.d.ts → unit/run-unit-tests.d.ts} +2 -2
- package/dist/{run-unit.d.ts → unit/run-unit.d.ts} +1 -1
- package/dist/{read-git-common-dir.d.ts → workspace/read-git-common-dir.d.ts} +2 -2
- package/dist/{read-git-prefix.d.ts → workspace/read-git-prefix.d.ts} +2 -2
- package/package.json +7 -7
- package/src/bench/define-bench.ts +1 -1
- package/src/bench/pick-unremoved-checkout-state.ts +1 -1
- package/src/bench/read-bench-args.ts +1 -1
- package/src/bench/read-bench-file-args.ts +1 -1
- package/src/{run-bench-file.ts → bench/run-bench-file.ts} +5 -5
- package/src/{run-bench.ts → bench/run-bench.ts} +26 -26
- package/src/browser/browser-preload.ts +1 -1
- package/src/browser/make-browser-lane-hooks.ts +2 -2
- package/src/browser/process-runtime.ts +2 -2
- package/src/browser/stop-descendant-processes.ts +1 -1
- package/src/browser/wire-browser-lane-hooks.ts +2 -2
- package/src/{read-cli-args.ts → cli/read-cli-args.ts} +1 -1
- package/src/{run-cli.ts → cli/run-cli.ts} +14 -14
- package/src/cli.ts +13 -13
- package/src/{read-command-output.ts → command/read-command-output.ts} +1 -1
- package/src/{run-command.ts → command/run-command.ts} +3 -3
- package/src/{define-rig.ts → config/define-rig.ts} +7 -7
- package/src/{parse-rig-config.ts → config/parse-rig-config.ts} +3 -3
- package/src/{read-rig-config.ts → config/read-rig-config.ts} +1 -1
- package/src/{run-eval.ts → eval/run-eval.ts} +2 -2
- package/src/index.ts +3 -3
- package/src/{build-init-scripts.ts → init/build-init-scripts.ts} +5 -5
- package/src/{run-init.ts → init/run-init.ts} +1 -1
- package/src/{build-program-lane-hooks.ts → lanes/build-program-lane-hooks.ts} +2 -2
- package/src/{make-repo-lane-hooks.ts → lanes/make-repo-lane-hooks.ts} +4 -4
- package/src/{parse-lane-hook.ts → lanes/parse-lane-hook.ts} +1 -1
- package/src/{parse-lane-start.ts → lanes/parse-lane-start.ts} +1 -1
- package/src/{pick-lane-selection.ts → lanes/pick-lane-selection.ts} +1 -1
- package/src/{run-lane.ts → lanes/run-lane.ts} +14 -14
- package/src/{standard-lanes.ts → lanes/standard-lanes.ts} +1 -1
- package/src/{build-program-environment.ts → programs/build-program-environment.ts} +1 -1
- package/src/{collect-unprogrammed-e2e-dirs.ts → programs/collect-unprogrammed-e2e-dirs.ts} +1 -1
- package/src/programs/resolve-program.ts +2 -2
- package/src/{run-program-builds.ts → programs/run-program-builds.ts} +2 -2
- package/src/{build-test-selection.ts → unit/build-test-selection.ts} +4 -4
- package/src/{build-unit-command.ts → unit/build-unit-command.ts} +1 -1
- package/src/{collect-test-runs.ts → unit/collect-test-runs.ts} +2 -2
- package/src/{pick-unit-run-plan.ts → unit/pick-unit-run-plan.ts} +1 -1
- package/src/{resolve-related-tests.ts → unit/resolve-related-tests.ts} +2 -2
- package/src/{run-related-tests.ts → unit/run-related-tests.ts} +1 -1
- package/src/{run-unit-tests.ts → unit/run-unit-tests.ts} +3 -3
- package/src/{run-unit.ts → unit/run-unit.ts} +1 -1
- package/src/{read-git-common-dir.ts → workspace/read-git-common-dir.ts} +2 -2
- package/src/{read-git-prefix.ts → workspace/read-git-prefix.ts} +2 -2
- package/dist/run-cli.d.ts +0 -10
- /package/dist/{build-bench-folder-path.d.ts → bench/build-bench-folder-path.d.ts} +0 -0
- /package/dist/{collect-bench-files.d.ts → bench/collect-bench-files.d.ts} +0 -0
- /package/dist/{create-bench-work-folder.d.ts → bench/create-bench-work-folder.d.ts} +0 -0
- /package/dist/{run-bench-file.d.ts → bench/run-bench-file.d.ts} +0 -0
- /package/dist/{is-command-name.d.ts → cli/is-command-name.d.ts} +0 -0
- /package/dist/{read-cli-args.d.ts → cli/read-cli-args.d.ts} +0 -0
- /package/dist/{run-command.d.ts → command/run-command.d.ts} +0 -0
- /package/dist/{system-clock.d.ts → command/system-clock.d.ts} +0 -0
- /package/dist/{bunfig-declaration-schema.d.ts → config/bunfig-declaration-schema.d.ts} +0 -0
- /package/dist/{format-parse-error.d.ts → config/format-parse-error.d.ts} +0 -0
- /package/dist/{make-ignore-check.d.ts → config/make-ignore-check.d.ts} +0 -0
- /package/dist/{parse-duration.d.ts → config/parse-duration.d.ts} +0 -0
- /package/dist/{repo-glob-schema.d.ts → config/repo-glob-schema.d.ts} +0 -0
- /package/dist/{collect-eval-files.d.ts → eval/collect-eval-files.d.ts} +0 -0
- /package/dist/{init-files.d.ts → init/init-files.d.ts} +0 -0
- /package/dist/{has-lane-suffix.d.ts → lanes/has-lane-suffix.d.ts} +0 -0
- /package/dist/{lane-hooks.d.ts → lanes/lane-hooks.d.ts} +0 -0
- /package/dist/{run-lane-hooks.d.ts → lanes/run-lane-hooks.d.ts} +0 -0
- /package/dist/{pick-e2e-dirs.d.ts → programs/pick-e2e-dirs.d.ts} +0 -0
- /package/dist/{build-diet-command.d.ts → unit/build-diet-command.d.ts} +0 -0
- /package/dist/{find-single-run-flag.d.ts → unit/find-single-run-flag.d.ts} +0 -0
- /package/dist/{find-timeout-arg.d.ts → unit/find-timeout-arg.d.ts} +0 -0
- /package/dist/{format-no-match-message.d.ts → unit/format-no-match-message.d.ts} +0 -0
- /package/dist/{format-no-tests-message.d.ts → unit/format-no-tests-message.d.ts} +0 -0
- /package/dist/{is-test-file.d.ts → unit/is-test-file.d.ts} +0 -0
- /package/dist/{parse-test-args.d.ts → unit/parse-test-args.d.ts} +0 -0
- /package/dist/{read-memory-budget.d.ts → unit/read-memory-budget.d.ts} +0 -0
- /package/dist/{read-worker-count.d.ts → unit/read-worker-count.d.ts} +0 -0
- /package/dist/{resolve-diet-script.d.ts → unit/resolve-diet-script.d.ts} +0 -0
- /package/dist/{test-run-args.d.ts → unit/test-run-args.d.ts} +0 -0
- /package/dist/{probe-workspace-repo.d.ts → workspace/probe-workspace-repo.d.ts} +0 -0
- /package/dist/{read-tracked-files.d.ts → workspace/read-tracked-files.d.ts} +0 -0
- /package/src/{build-bench-folder-path.ts → bench/build-bench-folder-path.ts} +0 -0
- /package/src/{collect-bench-files.ts → bench/collect-bench-files.ts} +0 -0
- /package/src/{create-bench-work-folder.ts → bench/create-bench-work-folder.ts} +0 -0
- /package/src/{is-command-name.ts → cli/is-command-name.ts} +0 -0
- /package/src/{system-clock.ts → command/system-clock.ts} +0 -0
- /package/src/{bunfig-declaration-schema.ts → config/bunfig-declaration-schema.ts} +0 -0
- /package/src/{format-parse-error.ts → config/format-parse-error.ts} +0 -0
- /package/src/{make-ignore-check.ts → config/make-ignore-check.ts} +0 -0
- /package/src/{parse-duration.ts → config/parse-duration.ts} +0 -0
- /package/src/{repo-glob-schema.ts → config/repo-glob-schema.ts} +0 -0
- /package/src/{collect-eval-files.ts → eval/collect-eval-files.ts} +0 -0
- /package/src/{init-files.ts → init/init-files.ts} +0 -0
- /package/src/{has-lane-suffix.ts → lanes/has-lane-suffix.ts} +0 -0
- /package/src/{lane-hooks.ts → lanes/lane-hooks.ts} +0 -0
- /package/src/{run-lane-hooks.ts → lanes/run-lane-hooks.ts} +0 -0
- /package/src/{pick-e2e-dirs.ts → programs/pick-e2e-dirs.ts} +0 -0
- /package/src/{build-diet-command.ts → unit/build-diet-command.ts} +0 -0
- /package/src/{find-single-run-flag.ts → unit/find-single-run-flag.ts} +0 -0
- /package/src/{find-timeout-arg.ts → unit/find-timeout-arg.ts} +0 -0
- /package/src/{format-no-match-message.ts → unit/format-no-match-message.ts} +0 -0
- /package/src/{format-no-tests-message.ts → unit/format-no-tests-message.ts} +0 -0
- /package/src/{is-test-file.ts → unit/is-test-file.ts} +0 -0
- /package/src/{parse-test-args.ts → unit/parse-test-args.ts} +0 -0
- /package/src/{read-memory-budget.ts → unit/read-memory-budget.ts} +0 -0
- /package/src/{read-worker-count.ts → unit/read-worker-count.ts} +0 -0
- /package/src/{resolve-diet-script.ts → unit/resolve-diet-script.ts} +0 -0
- /package/src/{test-run-args.ts → unit/test-run-args.ts} +0 -0
- /package/src/{probe-workspace-repo.ts → workspace/probe-workspace-repo.ts} +0 -0
- /package/src/{read-tracked-files.ts → workspace/read-tracked-files.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CommandOutput } from '../read-command-output.ts';
|
|
1
|
+
import type { CommandOutput } from '../command/read-command-output.ts';
|
|
2
2
|
import type { CheckoutState } from './types.ts';
|
|
3
3
|
export declare function pickUnremovedCheckoutState(listing: CommandOutput, baseRoot: string): Exclude<CheckoutState, 'removed'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ReadCommandOutput } from '
|
|
2
|
-
import type { ProgramBuildDeps } from '
|
|
3
|
-
import type { RigConfig, RigRun } from '
|
|
1
|
+
import type { ReadCommandOutput } from '../command/read-command-output.ts';
|
|
2
|
+
import type { ProgramBuildDeps } from '../programs/run-program-builds.ts';
|
|
3
|
+
import type { RigConfig, RigRun } from '../types.ts';
|
|
4
4
|
export interface BenchDeps extends ProgramBuildDeps {
|
|
5
5
|
readonly dietScript: string;
|
|
6
6
|
readonly benchScript: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LaneHooks } from '../lane-hooks.ts';
|
|
1
|
+
import type { LaneHooks } from '../lanes/lane-hooks.ts';
|
|
2
2
|
import type { BrowserRun } from './build-browser-run.ts';
|
|
3
3
|
import type { LaneFiles } from './lane-files.ts';
|
|
4
4
|
import type { ChromeDirs } from './pick-chrome-dirs.ts';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BenchDeps } from '../bench/run-bench.ts';
|
|
2
|
+
import type { EvalDeps } from '../eval/run-eval.ts';
|
|
3
|
+
import type { InitDeps } from '../init/run-init.ts';
|
|
4
|
+
import type { LaneDeps } from '../lanes/run-lane.ts';
|
|
5
|
+
import type { RigRun } from '../types.ts';
|
|
6
|
+
import type { RelatedTestDeps } from '../unit/run-related-tests.ts';
|
|
7
|
+
import type { UnitDeps } from '../unit/run-unit.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>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { RigConfig, RigDeclaration } from '
|
|
1
|
+
import type { RigConfig, RigDeclaration } from '../types.ts';
|
|
2
2
|
export declare function defineRig(declaration: RigDeclaration): RigConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommandOptions } from '
|
|
2
|
-
import type { RigOutput, RigRun } from '
|
|
1
|
+
import type { CommandOptions } from '../command/run-command.ts';
|
|
2
|
+
import type { RigOutput, RigRun } from '../types.ts';
|
|
3
3
|
export interface EvalDeps {
|
|
4
4
|
readonly output: RigOutput;
|
|
5
5
|
readonly readTrackedFiles: (repoRoot: string) => Promise<readonly string[]>;
|
package/dist/index.d.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
|
export type { LaneContext, BenchDeclaration, LaneDeclaration, ProgramDeclaration, LaneStart, ResolvedLane, RigConfig, RigDeclaration, } from './types.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/cli/is-command-name.ts
|
|
2
|
+
var commandNames = ["bench", "eval", "init", "related"];
|
|
3
|
+
function isCommandName(name) {
|
|
4
|
+
return commandNames.some((command) => command === name);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// src/lanes/standard-lanes.ts
|
|
8
|
+
var standardLanes = [
|
|
9
|
+
{ name: "unit", suffix: null, limitMs: 5000, parallel: "workers" },
|
|
10
|
+
{ name: "e2e", suffix: null, limitMs: 15000, parallel: 1 },
|
|
11
|
+
{ name: "browser", suffix: ".browser", limitMs: 1e4, parallel: 1 },
|
|
12
|
+
{ name: "docker", suffix: ".docker", limitMs: 15000, parallel: 1 },
|
|
13
|
+
{ name: "host", suffix: ".host", limitMs: 15000, parallel: 1 },
|
|
14
|
+
{ name: "agent-sdk", suffix: ".agent-sdk", limitMs: 5000, parallel: 1 },
|
|
15
|
+
{ name: "model-api", suffix: ".model-api", limitMs: 120000, parallel: 1 }
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// src/config/bunfig-declaration-schema.ts
|
|
2
19
|
import { z as z2 } from "zod";
|
|
3
20
|
|
|
4
|
-
// src/repo-glob-schema.ts
|
|
21
|
+
// src/config/repo-glob-schema.ts
|
|
5
22
|
import { z } from "zod";
|
|
6
23
|
var repoGlobSchema = z.string().refine((pattern) => pattern !== "" && !pattern.startsWith("/") && !hasDotSegment(pattern));
|
|
7
24
|
function hasDotSegment(path) {
|
|
8
25
|
return path.split("/").some((segment) => segment === "." || segment === "..");
|
|
9
26
|
}
|
|
10
27
|
|
|
11
|
-
// src/bunfig-declaration-schema.ts
|
|
28
|
+
// src/config/bunfig-declaration-schema.ts
|
|
12
29
|
var bunfigDeclarationSchema = z2.object({
|
|
13
30
|
path: repoGlobSchema.refine((path) => path.endsWith(".toml")),
|
|
14
31
|
files: z2.array(repoGlobSchema).min(1)
|
|
15
32
|
}).readonly();
|
|
16
33
|
|
|
17
|
-
// src/
|
|
18
|
-
var commandNames = ["bench", "eval", "init", "related"];
|
|
19
|
-
function isCommandName(name) {
|
|
20
|
-
return commandNames.some((command) => command === name);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// src/parse-duration.ts
|
|
34
|
+
// src/config/parse-duration.ts
|
|
24
35
|
var durationPattern = /^(?<count>[1-9]\d*)(?<unit>ms|s)$/u;
|
|
25
36
|
function parseDuration(text) {
|
|
26
37
|
const groups = durationPattern.exec(text)?.groups;
|
|
@@ -31,18 +42,7 @@ function parseDuration(text) {
|
|
|
31
42
|
return groups["unit"] === "s" ? count * 1000 : count;
|
|
32
43
|
}
|
|
33
44
|
|
|
34
|
-
// src/
|
|
35
|
-
var standardLanes = [
|
|
36
|
-
{ name: "unit", suffix: null, limitMs: 5000, parallel: "workers" },
|
|
37
|
-
{ name: "e2e", suffix: null, limitMs: 15000, parallel: 1 },
|
|
38
|
-
{ name: "browser", suffix: ".browser", limitMs: 1e4, parallel: 1 },
|
|
39
|
-
{ name: "docker", suffix: ".docker", limitMs: 15000, parallel: 1 },
|
|
40
|
-
{ name: "host", suffix: ".host", limitMs: 15000, parallel: 1 },
|
|
41
|
-
{ name: "agent-sdk", suffix: ".agent-sdk", limitMs: 5000, parallel: 1 },
|
|
42
|
-
{ name: "model-api", suffix: ".model-api", limitMs: 120000, parallel: 1 }
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
// src/define-rig.ts
|
|
45
|
+
// src/config/define-rig.ts
|
|
46
46
|
var laneNamePattern = /^[a-z][a-z0-9-]*$/u;
|
|
47
47
|
function defineRig(declaration) {
|
|
48
48
|
const declared = Object.entries(declaration.lanes ?? {});
|
|
@@ -222,7 +222,7 @@ function readBenchLane(lane, lanes) {
|
|
|
222
222
|
}
|
|
223
223
|
return lane;
|
|
224
224
|
}
|
|
225
|
-
// src/parse-rig-config.ts
|
|
225
|
+
// src/config/parse-rig-config.ts
|
|
226
226
|
import { z as z3 } from "zod";
|
|
227
227
|
function parseRigConfig(value) {
|
|
228
228
|
if (typeof value !== "object" || value === null || !("lanes" in value)) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { RigConfig } from '
|
|
1
|
+
import type { RigConfig } from '../types.ts';
|
|
2
2
|
export type PackageScripts = Readonly<Record<string, string>>;
|
|
3
3
|
export declare function buildInitScripts(oldScripts: PackageScripts, config: RigConfig, trackedFiles: readonly string[], isWorkspaceRepo: boolean): PackageScripts;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { RigConfig, RigOutput } from '../types.ts';
|
|
1
2
|
import type { InitFiles } from './init-files.ts';
|
|
2
|
-
import type { RigConfig, RigOutput } from './types.ts';
|
|
3
3
|
export interface InitDeps {
|
|
4
4
|
readonly probeWorkspaceRepo: (repoRoot: string) => Promise<boolean>;
|
|
5
5
|
readonly readTrackedFiles: (repoRoot: string) => Promise<readonly string[]>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import type { ProgramDeclaration } from '../types.ts';
|
|
1
2
|
import type { LaneHooks } from './lane-hooks.ts';
|
|
2
|
-
import type { ProgramDeclaration } from './types.ts';
|
|
3
3
|
export declare function buildProgramLaneHooks(hooks: LaneHooks, repoRoot: string, programs: Readonly<Record<string, ProgramDeclaration>>): LaneHooks;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { CommandOptions } from '../command/run-command.ts';
|
|
2
|
+
import type { LaneContext } from '../types.ts';
|
|
1
3
|
import type { LaneHooks } from './lane-hooks.ts';
|
|
2
|
-
import type { CommandOptions } from './run-command.ts';
|
|
3
|
-
import type { LaneContext } from './types.ts';
|
|
4
4
|
export interface RepoLaneOptions {
|
|
5
5
|
readonly context: LaneContext;
|
|
6
6
|
readonly dietScript: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { LaneStart } from '
|
|
1
|
+
import type { LaneStart } from '../types.ts';
|
|
2
2
|
export declare function parseLaneStart(value: unknown, path: string): LaneStart;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ResolvedLane } from '
|
|
1
|
+
import type { ResolvedLane } from '../types.ts';
|
|
2
2
|
export declare function pickLaneSelection(lane: ResolvedLane, e2eDirs: readonly string[]): readonly string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BrowserLaneWiring } from '
|
|
1
|
+
import type { BrowserLaneWiring } from '../browser/wire-browser-lane-hooks.ts';
|
|
2
|
+
import type { ProgramBuildDeps } from '../programs/run-program-builds.ts';
|
|
3
|
+
import type { ResolvedLane, RigConfig, RigRun } from '../types.ts';
|
|
2
4
|
import type { LaneHooks } from './lane-hooks.ts';
|
|
3
|
-
import type { ProgramBuildDeps } from './run-program-builds.ts';
|
|
4
|
-
import type { ResolvedLane, RigConfig, RigRun } from './types.ts';
|
|
5
5
|
export interface LaneDeps extends ProgramBuildDeps {
|
|
6
6
|
readonly dietScript: string;
|
|
7
7
|
readonly probeWorkspaceRepo: (repoRoot: string) => Promise<boolean>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ProgramDeclaration } from '
|
|
1
|
+
import type { ProgramDeclaration } from '../types.ts';
|
|
2
2
|
export declare function buildProgramVariable(name: string): string;
|
|
3
3
|
export declare function buildProgramEnvironment(repoRoot: string, programs: Readonly<Record<string, ProgramDeclaration>>): Readonly<Record<string, string>>;
|
package/dist/{collect-unprogrammed-e2e-dirs.d.ts → programs/collect-unprogrammed-e2e-dirs.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ProgramDeclaration } from '
|
|
1
|
+
import type { ProgramDeclaration } from '../types.ts';
|
|
2
2
|
export declare function collectUnprogrammedE2EDirs(e2eDirs: readonly string[], programs: Readonly<Record<string, ProgramDeclaration>>): readonly string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommandOptions } from '
|
|
2
|
-
import type { ProgramDeclaration, RigOutput, RigRun } from '
|
|
1
|
+
import type { CommandOptions } from '../command/run-command.ts';
|
|
2
|
+
import type { ProgramDeclaration, RigOutput, RigRun } from '../types.ts';
|
|
3
3
|
export interface ProgramBuildDeps {
|
|
4
4
|
readonly output: RigOutput;
|
|
5
5
|
readonly runCommand: (command: readonly string[], options: CommandOptions) => Promise<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ResolvedLane, RigConfig } from '../types.ts';
|
|
1
2
|
import type { TestArgs } from './parse-test-args.ts';
|
|
2
|
-
import type { ResolvedLane, RigConfig } from './types.ts';
|
|
3
3
|
export type TestSelection = {
|
|
4
4
|
readonly kind: 'lane';
|
|
5
5
|
readonly files: readonly string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { RigConfig, RigRun } from '../types.ts';
|
|
1
2
|
import type { WorkerCount } from './read-worker-count.ts';
|
|
2
3
|
import type { RelatedTestSources } from './resolve-related-tests.ts';
|
|
3
4
|
import type { UnitRunDeps } from './run-unit-tests.ts';
|
|
4
|
-
import type { RigConfig, RigRun } from './types.ts';
|
|
5
5
|
export interface RelatedTestDeps extends UnitRunDeps {
|
|
6
6
|
readonly sources: Readonly<RelatedTestSources>;
|
|
7
7
|
readonly readWorkerCount: () => Promise<WorkerCount>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { CommandOptions } from '../command/run-command.ts';
|
|
2
|
+
import type { RigConfig, RigOutput, RigRun } from '../types.ts';
|
|
1
3
|
import type { UnitRunPlanRequest } from './pick-unit-run-plan.ts';
|
|
2
|
-
import type { CommandOptions } from './run-command.ts';
|
|
3
|
-
import type { RigConfig, RigOutput, RigRun } from './types.ts';
|
|
4
4
|
export interface UnitRequest extends UnitRunPlanRequest {
|
|
5
5
|
readonly workerCount: number;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { RigConfig, RigRun } from '../types.ts';
|
|
1
2
|
import type { WorkerCount } from './read-worker-count.ts';
|
|
2
3
|
import type { UnitRunDeps } from './run-unit-tests.ts';
|
|
3
|
-
import type { RigConfig, RigRun } from './types.ts';
|
|
4
4
|
export interface UnitDeps extends UnitRunDeps {
|
|
5
5
|
readonly readWorkerCount: () => Promise<WorkerCount>;
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SpawnOptions } from '
|
|
2
|
-
import type { ReadCommandOutput } from '
|
|
1
|
+
import type { SpawnOptions } from '../browser/process-runtime.ts';
|
|
2
|
+
import type { ReadCommandOutput } from '../command/read-command-output.ts';
|
|
3
3
|
export interface GitCommonDirDeps {
|
|
4
4
|
readonly readCommandOutput: ReadCommandOutput;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SpawnOptions } from '
|
|
2
|
-
import type { ReadCommandOutput } from '
|
|
1
|
+
import type { SpawnOptions } from '../browser/process-runtime.ts';
|
|
2
|
+
import type { ReadCommandOutput } from '../command/read-command-output.ts';
|
|
3
3
|
export interface GitPrefixDeps {
|
|
4
4
|
readonly readCommandOutput: ReadCommandOutput;
|
|
5
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgeoff/rig",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Run every test lane of a repo from one declaration of its limits, with a browser lane built in",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --packages external && tsc -p tsconfig.build.json",
|
|
47
|
-
"typecheck": "tsrs"
|
|
47
|
+
"typecheck": "tsrs --fast"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@zgeoff/diet": "0.2.
|
|
51
|
-
"@zgeoff/std": "0.4.
|
|
50
|
+
"@zgeoff/diet": "0.2.3",
|
|
51
|
+
"@zgeoff/std": "0.4.4",
|
|
52
52
|
"gunshi": "1.0.0-rc.1",
|
|
53
53
|
"ts-pattern": "5.9.2",
|
|
54
54
|
"zod": "4.6.7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/bun": "1.4.4",
|
|
58
|
-
"@zgeoff/std": "0.4.
|
|
59
|
-
"@zgeoff/testing": "0.3.
|
|
58
|
+
"@zgeoff/std": "0.4.4",
|
|
59
|
+
"@zgeoff/testing": "0.3.1",
|
|
60
60
|
"tiny-invariant": "1.3.3",
|
|
61
|
-
"tsrs": "0.
|
|
61
|
+
"tsrs": "0.25.0-ts7.1.0-beta",
|
|
62
62
|
"typescript": "7.0.2"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
|
-
import type { CommandOutput } from '../read-command-output.ts';
|
|
2
|
+
import type { CommandOutput } from '../command/read-command-output.ts';
|
|
3
3
|
import type { CheckoutState } from './types.ts';
|
|
4
4
|
|
|
5
5
|
// Takes what `git worktree list --porcelain -z` gave after a failed removal. A listing that failed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cli } from 'gunshi/bone';
|
|
2
2
|
import { define } from 'gunshi/definition';
|
|
3
|
-
import { formatParseError } from '../format-parse-error.ts';
|
|
3
|
+
import { formatParseError } from '../config/format-parse-error.ts';
|
|
4
4
|
|
|
5
5
|
export type BenchArgs =
|
|
6
6
|
| { readonly kind: 'parsed'; readonly name: string | null; readonly baseRef: string | null }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cli } from 'gunshi/bone';
|
|
2
2
|
import { define } from 'gunshi/definition';
|
|
3
|
-
import { formatParseError } from '../format-parse-error.ts';
|
|
3
|
+
import { formatParseError } from '../config/format-parse-error.ts';
|
|
4
4
|
|
|
5
5
|
export type BenchFileArgs =
|
|
6
6
|
| { readonly kind: 'parsed'; readonly file: string; readonly reportPath: string }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appendFile } from 'node:fs/promises';
|
|
2
|
-
import { formatBenchReport } from './
|
|
3
|
-
import { formatBenchmarkResult } from './
|
|
4
|
-
import { parseBenchDefinition } from './
|
|
5
|
-
import { readBenchFileArgs } from './
|
|
6
|
-
import { runBenchmark } from './
|
|
2
|
+
import { formatBenchReport } from './format-bench-report.ts';
|
|
3
|
+
import { formatBenchmarkResult } from './format-benchmark-result.ts';
|
|
4
|
+
import { parseBenchDefinition } from './parse-bench-definition.ts';
|
|
5
|
+
import { readBenchFileArgs } from './read-bench-file-args.ts';
|
|
6
|
+
import { runBenchmark } from './run-benchmark.ts';
|
|
7
7
|
|
|
8
8
|
// `rig bench` runs this once per bench file, in the environment the benchmarks get, and judges the
|
|
9
9
|
// budget from the report this appends, so a bench that ran exits 0 whatever its median.
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { join, relative } from 'node:path';
|
|
2
2
|
import { match } from 'ts-pattern';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import type {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import type { BenchOutput, BenchVerdict, CheckoutState } from './bench/types.ts';
|
|
17
|
-
import { pickExitCodeAfterTests } from './browser/pick-exit-code-after-tests.ts';
|
|
18
|
-
import { buildDietCommand } from './build-diet-command.ts';
|
|
19
|
-
import { buildProgramLaneHooks } from './build-program-lane-hooks.ts';
|
|
3
|
+
import { pickExitCodeAfterTests } from '../browser/pick-exit-code-after-tests.ts';
|
|
4
|
+
import type { ReadCommandOutput } from '../command/read-command-output.ts';
|
|
5
|
+
import { defineRig } from '../config/define-rig.ts';
|
|
6
|
+
import { buildProgramLaneHooks } from '../lanes/build-program-lane-hooks.ts';
|
|
7
|
+
import type { LaneHooks } from '../lanes/lane-hooks.ts';
|
|
8
|
+
import { makeRepoLaneHooks } from '../lanes/make-repo-lane-hooks.ts';
|
|
9
|
+
import { runLaneHooks } from '../lanes/run-lane-hooks.ts';
|
|
10
|
+
import type { ProgramBuildDeps } from '../programs/run-program-builds.ts';
|
|
11
|
+
import { runProgramBuilds } from '../programs/run-program-builds.ts';
|
|
12
|
+
import type { RigConfig, RigRun } from '../types.ts';
|
|
13
|
+
import { buildDietCommand } from '../unit/build-diet-command.ts';
|
|
14
|
+
import { readGitPrefix } from '../workspace/read-git-prefix.ts';
|
|
15
|
+
import { buildBaseSideRoot } from './build-base-side-root.ts';
|
|
20
16
|
import { collectBenchFiles } from './collect-bench-files.ts';
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import type {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
17
|
+
import { findBaseSetupVerdict } from './find-base-setup-verdict.ts';
|
|
18
|
+
import { findMissingBenchVerdict } from './find-missing-bench-verdict.ts';
|
|
19
|
+
import { parseBenchReport } from './parse-bench-report.ts';
|
|
20
|
+
import type { ParsedBenchReport } from './parse-bench-report.ts';
|
|
21
|
+
import { pickBenchPlan } from './pick-bench-plan.ts';
|
|
22
|
+
import { pickCheckoutCleanup } from './pick-checkout-cleanup.ts';
|
|
23
|
+
import { pickCleanedUpResult } from './pick-cleaned-up-result.ts';
|
|
24
|
+
import { pickComparisonVerdict } from './pick-comparison-verdict.ts';
|
|
25
|
+
import { pickHeadVerdict } from './pick-head-verdict.ts';
|
|
26
|
+
import { pickNamedBenchFiles } from './pick-named-bench-files.ts';
|
|
27
|
+
import { pickUnremovedCheckoutState } from './pick-unremoved-checkout-state.ts';
|
|
28
|
+
import { readBenchArgs } from './read-bench-args.ts';
|
|
29
|
+
import type { BenchOutput, BenchVerdict, CheckoutState } from './types.ts';
|
|
30
30
|
|
|
31
31
|
export interface BenchDeps extends ProgramBuildDeps {
|
|
32
32
|
readonly dietScript: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { afterAll } from 'bun:test';
|
|
6
6
|
import { hostname } from 'node:os';
|
|
7
|
-
import { systemClock } from '../system-clock.ts';
|
|
7
|
+
import { systemClock } from '../command/system-clock.ts';
|
|
8
8
|
import { laneFiles } from './lane-files.ts';
|
|
9
9
|
import { readProcessTable } from './read-process-table.ts';
|
|
10
10
|
import { startBrowser } from './start-browser.ts';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
|
-
import type { LaneHooks, LaneStartOutcome } from '../lane-hooks.ts';
|
|
3
|
-
import { testRunArgs } from '../test-run-args.ts';
|
|
2
|
+
import type { LaneHooks, LaneStartOutcome } from '../lanes/lane-hooks.ts';
|
|
3
|
+
import { testRunArgs } from '../unit/test-run-args.ts';
|
|
4
4
|
import type { BrowserRun } from './build-browser-run.ts';
|
|
5
5
|
import type { LaneEnvironments } from './build-lane-environments.ts';
|
|
6
6
|
import { buildLaneEnvironments } from './build-lane-environments.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Clock } from '../system-clock.ts';
|
|
2
|
-
import { systemClock } from '../system-clock.ts';
|
|
1
|
+
import type { Clock } from '../command/system-clock.ts';
|
|
2
|
+
import { systemClock } from '../command/system-clock.ts';
|
|
3
3
|
|
|
4
4
|
export interface SpawnedProcess {
|
|
5
5
|
readonly pid: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { match } from 'ts-pattern';
|
|
2
|
-
import type { Clock } from '../system-clock.ts';
|
|
2
|
+
import type { Clock } from '../command/system-clock.ts';
|
|
3
3
|
import { collectDescendantPIDs } from './collect-descendant-pids.ts';
|
|
4
4
|
import { hasErrorCode } from './has-error-code.ts';
|
|
5
5
|
import { pickDescendantStopStep } from './pick-descendant-stop-step.ts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hostname, tmpdir, userInfo } from 'node:os';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import type { LaneHooks } from '../lanes/lane-hooks.ts';
|
|
4
|
+
import { buildDietCommand } from '../unit/build-diet-command.ts';
|
|
5
5
|
import { buildBrowserRun } from './build-browser-run.ts';
|
|
6
6
|
import { buildRecordedCommand } from './build-recorded-command.ts';
|
|
7
7
|
import { hasBrowserBuildScript } from './has-browser-build-script.ts';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cli } from 'gunshi/bone';
|
|
2
2
|
import { define } from 'gunshi/definition';
|
|
3
|
-
import { formatParseError } from '
|
|
3
|
+
import { formatParseError } from '../config/format-parse-error.ts';
|
|
4
4
|
|
|
5
5
|
export interface CLIArgs {
|
|
6
6
|
readonly command: string;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { match } from 'ts-pattern';
|
|
2
|
-
import {
|
|
2
|
+
import { runBench } from '../bench/run-bench.ts';
|
|
3
|
+
import type { BenchDeps } from '../bench/run-bench.ts';
|
|
4
|
+
import { runEval } from '../eval/run-eval.ts';
|
|
5
|
+
import type { EvalDeps } from '../eval/run-eval.ts';
|
|
6
|
+
import { runInit } from '../init/run-init.ts';
|
|
7
|
+
import type { InitDeps } from '../init/run-init.ts';
|
|
8
|
+
import type { LaneDeps } from '../lanes/run-lane.ts';
|
|
9
|
+
import { runLane } from '../lanes/run-lane.ts';
|
|
10
|
+
import type { RigConfig, RigRun } from '../types.ts';
|
|
11
|
+
import { findTimeoutArg } from '../unit/find-timeout-arg.ts';
|
|
12
|
+
import type { RelatedTestDeps } from '../unit/run-related-tests.ts';
|
|
13
|
+
import { runRelatedTests } from '../unit/run-related-tests.ts';
|
|
14
|
+
import { runUnit } from '../unit/run-unit.ts';
|
|
15
|
+
import type { UnitDeps } from '../unit/run-unit.ts';
|
|
3
16
|
import { commandNames, isCommandName } from './is-command-name.ts';
|
|
4
17
|
import { readCLIArgs } from './read-cli-args.ts';
|
|
5
|
-
import { runBench } from './run-bench.ts';
|
|
6
|
-
import type { BenchDeps } from './run-bench.ts';
|
|
7
|
-
import { runEval } from './run-eval.ts';
|
|
8
|
-
import type { EvalDeps } from './run-eval.ts';
|
|
9
|
-
import { runInit } from './run-init.ts';
|
|
10
|
-
import type { InitDeps } from './run-init.ts';
|
|
11
|
-
import type { LaneDeps } from './run-lane.ts';
|
|
12
|
-
import { runLane } from './run-lane.ts';
|
|
13
|
-
import type { RelatedTestDeps } from './run-related-tests.ts';
|
|
14
|
-
import { runRelatedTests } from './run-related-tests.ts';
|
|
15
|
-
import { runUnit } from './run-unit.ts';
|
|
16
|
-
import type { UnitDeps } from './run-unit.ts';
|
|
17
|
-
import type { RigConfig, RigRun } from './types.ts';
|
|
18
18
|
|
|
19
19
|
export interface CLIDeps
|
|
20
20
|
extends LaneDeps, UnitDeps, RelatedTestDeps, InitDeps, BenchDeps, EvalDeps {}
|