@overkill-dev/run 0.0.66 → 0.0.67
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/config/benchmark-execution.js +30 -0
- package/config/benchmark-execution.js.map +1 -0
- package/config/config-error.d.ts +4 -0
- package/config/config-error.d.ts.map +1 -0
- package/config/config-error.js +7 -0
- package/config/config-error.js.map +1 -0
- package/config/config.d.ts +57 -0
- package/config/config.d.ts.map +1 -0
- package/{run/run-config.js → config/config.js} +54 -19
- package/config/config.js.map +1 -0
- package/{run/coverage-config-schema.d.ts → config/coverage-schema.d.ts} +7 -7
- package/config/coverage-schema.d.ts.map +1 -0
- package/{run/coverage-config-schema.js → config/coverage-schema.js} +1 -1
- package/config/coverage-schema.js.map +1 -0
- package/{run/run-config-defaults.js → config/defaults.js} +6 -1
- package/config/defaults.js.map +1 -0
- package/{run/run-execution-config.d.ts → config/execution.d.ts} +5 -7
- package/config/execution.d.ts.map +1 -0
- package/config/host-process.js +41 -0
- package/config/host-process.js.map +1 -0
- package/config/profile-file-discovery.js +88 -0
- package/config/profile-file-discovery.js.map +1 -0
- package/{run/profile-config-normalization.js → config/profile-normalization.js} +13 -13
- package/config/profile-normalization.js.map +1 -0
- package/{run/profile-file-glob.js → config/profile-patterns.js} +6 -10
- package/config/profile-patterns.js.map +1 -0
- package/{run/run-config-schema.d.ts → config/schema.d.ts} +208 -28
- package/config/schema.d.ts.map +1 -0
- package/{run/run-config-schema.js → config/schema.js} +38 -12
- package/config/schema.js.map +1 -0
- package/config/snapshot.js +204 -0
- package/config/snapshot.js.map +1 -0
- package/config/types.d.ts +157 -0
- package/config/types.d.ts.map +1 -0
- package/config/validation.js +91 -0
- package/config/validation.js.map +1 -0
- package/{run/work-distribution-config.js → config/work-distribution.js} +3 -3
- package/config/work-distribution.js.map +1 -0
- package/package.json +10 -7
- package/packages/run/command-line.entry-point.d.ts +5 -3
- package/packages/run/command-line.entry-point.d.ts.map +1 -1
- package/packages/run/command-line.entry-point.js +28 -7
- package/packages/run/command-line.entry-point.js.map +1 -1
- package/packages/run/config.entry-point.d.ts +8 -6
- package/packages/run/config.entry-point.d.ts.map +1 -1
- package/packages/run/config.entry-point.js +4 -4
- package/packages/run/config.entry-point.js.map +1 -1
- package/packages/run/run.entry-point.d.ts +6 -4
- package/packages/run/run.entry-point.d.ts.map +1 -1
- package/packages/run/run.entry-point.js +3 -3
- package/packages/run/run.entry-point.js.map +1 -1
- package/readme.md +43 -13
- package/run/attachment-eligibility.js +1 -1
- package/run/attachment-eligibility.js.map +1 -1
- package/run/attachment-record.js +2 -2
- package/run/attachment-record.js.map +1 -1
- package/run/attachment-results.js.map +1 -1
- package/run/benchmark-commands.d.ts +10 -0
- package/run/benchmark-commands.d.ts.map +1 -0
- package/run/benchmark-commands.js +82 -0
- package/run/benchmark-commands.js.map +1 -0
- package/run/child-process-outbox.js +36 -0
- package/run/child-process-outbox.js.map +1 -0
- package/run/command-line-command-namespace.d.ts.map +1 -1
- package/run/command-line-command-namespace.js.map +1 -1
- package/run/command-line-command.d.ts +26 -18
- package/run/command-line-command.d.ts.map +1 -1
- package/run/command-line-command.js +3 -2
- package/run/command-line-command.js.map +1 -1
- package/run/command-line-config.d.ts +5 -0
- package/run/command-line-config.d.ts.map +1 -0
- package/run/command-line-config.js +51 -0
- package/run/command-line-config.js.map +1 -0
- package/run/command-line-execution.js +82 -0
- package/run/command-line-execution.js.map +1 -0
- package/run/command-line-runner.d.ts +4 -5
- package/run/command-line-runner.d.ts.map +1 -1
- package/run/command-line-runner.js +6 -124
- package/run/command-line-runner.js.map +1 -1
- package/run/command-line-unimplemented-commands.js +1 -8
- package/run/command-line-unimplemented-commands.js.map +1 -1
- package/run/coverage-loaded-sources.js +8 -9
- package/run/coverage-loaded-sources.js.map +1 -1
- package/run/coverage-method-ranges.js +100 -0
- package/run/coverage-method-ranges.js.map +1 -0
- package/run/coverage-paths.js.map +1 -1
- package/run/coverage-reporting.js.map +1 -1
- package/run/coverage-runtime-source.js +66 -28
- package/run/coverage-runtime-source.js.map +1 -1
- package/run/coverage-session.js.map +1 -1
- package/run/coverage-source-map.js +2 -3
- package/run/coverage-source-map.js.map +1 -1
- package/run/coverage-source-selection.js +9 -7
- package/run/coverage-source-selection.js.map +1 -1
- package/run/coverage-tokens.js +26 -0
- package/run/coverage-tokens.js.map +1 -0
- package/run/duration-history-schema.js +1 -1
- package/run/duration-history-schema.js.map +1 -1
- package/run/node-command-line-runner.d.ts +1 -1
- package/run/node-command-line-runner.d.ts.map +1 -1
- package/run/node-command-line-runner.js +18 -10
- package/run/node-command-line-runner.js.map +1 -1
- package/run/request-snapshot.js +40 -0
- package/run/request-snapshot.js.map +1 -0
- package/run/run-collected-planning.js +9 -0
- package/run/run-collected-planning.js.map +1 -1
- package/run/run-collected-resolution.js.map +1 -1
- package/run/run-collection-error-result.js +3 -2
- package/run/run-collection-error-result.js.map +1 -1
- package/run/run-command-schema.js +1 -1
- package/run/run-command-schema.js.map +1 -1
- package/run/run-coverage.js.map +1 -1
- package/run/run-discovery-types.d.ts +2 -2
- package/run/run-discovery-types.d.ts.map +1 -1
- package/run/run-discovery.js +14 -96
- package/run/run-discovery.js.map +1 -1
- package/run/run-engine-primitives.d.ts.map +1 -1
- package/run/run-errors.d.ts +5 -7
- package/run/run-errors.d.ts.map +1 -1
- package/run/run-errors.js +0 -6
- package/run/run-errors.js.map +1 -1
- package/run/run-facts.js +5 -70
- package/run/run-facts.js.map +1 -1
- package/run/run-host-process.js +1 -40
- package/run/run-host-process.js.map +1 -1
- package/run/run-if-main-options.js.map +1 -1
- package/run/run-if-main-profile.d.ts +8 -10
- package/run/run-if-main-profile.d.ts.map +1 -1
- package/run/run-if-main-profile.js +25 -112
- package/run/run-if-main-profile.js.map +1 -1
- package/run/run-if-main.d.ts.map +1 -1
- package/run/run-if-main.js.map +1 -1
- package/run/run-in-process-execution.js +2 -0
- package/run/run-in-process-execution.js.map +1 -1
- package/run/run-input-resolution.js +11 -6
- package/run/run-input-resolution.js.map +1 -1
- package/run/run-isolated-command.js +2 -2
- package/run/run-isolated-command.js.map +1 -1
- package/run/run-isolated-process.js +12 -7
- package/run/run-isolated-process.js.map +1 -1
- package/run/run-local-command.js +7 -10
- package/run/run-local-command.js.map +1 -1
- package/run/run-local-execution.js.map +1 -1
- package/run/run-local-resolution.js +1 -3
- package/run/run-local-resolution.js.map +1 -1
- package/run/run-local-test-plan.js.map +1 -1
- package/run/run-orchestrator-dependencies.d.ts +4 -4
- package/run/run-orchestrator-dependencies.d.ts.map +1 -1
- package/run/run-ordering.js.map +1 -1
- package/run/run-process-engine.js.map +1 -1
- package/run/run-profile-facts.js +62 -0
- package/run/run-profile-facts.js.map +1 -0
- package/run/run-record-types.d.ts +5 -4
- package/run/run-record-types.d.ts.map +1 -1
- package/run/run-reporter-resolution.js +4 -1
- package/run/run-reporter-resolution.js.map +1 -1
- package/run/run-result-reporting.js.map +1 -1
- package/run/run-selection.js.map +1 -1
- package/run/run-supervised-process.js +3 -4
- package/run/run-supervised-process.js.map +1 -1
- package/run/run-support.js +1 -222
- package/run/run-support.js.map +1 -1
- package/run/run-types.d.ts +40 -166
- package/run/run-types.d.ts.map +1 -1
- package/run/run-types.js.map +1 -1
- package/run/run-validation.js +4 -63
- package/run/run-validation.js.map +1 -1
- package/run/run.d.ts.map +1 -1
- package/run/run.js +32 -16
- package/run/run.js.map +1 -1
- package/run/supervised-child-process.js +1 -1
- package/run/supervised-child-process.js.map +1 -1
- package/run/supervised-child.entry-point.js +9 -6
- package/run/supervised-child.entry-point.js.map +1 -1
- package/run/supervised-child.js +1 -1
- package/run/supervised-child.js.map +1 -1
- package/run/supervised-protocol.js.map +1 -1
- package/run/supervised-run-resource-policy.js.map +1 -1
- package/run/supervised-run-state.js.map +1 -1
- package/run/test-profile.js +21 -0
- package/run/test-profile.js.map +1 -0
- package/run/work-unit-identity.js.map +1 -1
- package/run/work-unit-planning.js +6 -6
- package/run/work-unit-planning.js.map +1 -1
- package/run/work-unit-resource-constraints.js +1 -1
- package/run/work-unit-resource-constraints.js.map +1 -1
- package/run/worker-pool-host-protocol-schema.js +1 -1
- package/run/worker-pool-host-protocol-schema.js.map +1 -1
- package/run/worker-pool-host.entry-point.js +7 -4
- package/run/worker-pool-host.entry-point.js.map +1 -1
- package/run/worker-pool-lanes.js.map +1 -1
- package/run/worker-pool-lifecycle-lanes.js.map +1 -1
- package/run/worker-pool-placement-planning.js.map +1 -1
- package/run/worker-pool-protocol.js.map +1 -1
- package/run/worker-pool-routing.js.map +1 -1
- package/run/worker-pool-runtime.js.map +1 -1
- package/sbom.cdx.json +26 -43
- package/run/coverage-config-schema.d.ts.map +0 -1
- package/run/coverage-config-schema.js.map +0 -1
- package/run/profile-config-normalization.js.map +0 -1
- package/run/profile-file-glob.js.map +0 -1
- package/run/run-config-defaults.js.map +0 -1
- package/run/run-config-schema.d.ts.map +0 -1
- package/run/run-config-schema.js.map +0 -1
- package/run/run-config.d.ts +0 -62
- package/run/run-config.d.ts.map +0 -1
- package/run/run-config.js.map +0 -1
- package/run/run-execution-config.d.ts.map +0 -1
- package/run/work-distribution-config.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RunResult } from '../engine/run-result.ts';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { ConfigLoadRequest } from '../config/config.ts';
|
|
3
|
+
import type { ProfileRunRequest, RunRequest } from './run-types.ts';
|
|
4
4
|
type CommandLineRunOrder = Exclude<RunRequest['order'], 'plan'>;
|
|
5
5
|
export declare const commandLineExitCodes: Readonly<{
|
|
6
6
|
argumentOrConfig: 3;
|
|
@@ -12,22 +12,23 @@ export declare const commandLineExitCodes: Readonly<{
|
|
|
12
12
|
testFailure: 1;
|
|
13
13
|
}>;
|
|
14
14
|
export type CommandLineExitCode = (typeof commandLineExitCodes)[keyof typeof commandLineExitCodes];
|
|
15
|
-
export type CommandLineRunTestsRequest =
|
|
15
|
+
export type CommandLineRunTestsRequest = ConfigLoadRequest & {
|
|
16
16
|
readonly runRequest: RunRequest;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
type CommandLineListRequest<Profile extends string | null> = {
|
|
19
|
+
readonly order: CommandLineRunOrder;
|
|
20
|
+
readonly paths: readonly string[];
|
|
21
|
+
readonly profile: Profile;
|
|
22
|
+
readonly seed: RunRequest['seed'];
|
|
23
|
+
readonly selection: RunRequest['selection'];
|
|
24
|
+
readonly shard: RunRequest['shard'];
|
|
25
|
+
readonly withLocations: boolean;
|
|
26
|
+
readonly withOrphans: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type CommandLineListTestsRequest = ConfigLoadRequest & {
|
|
29
|
+
readonly listRequest: CommandLineListRequest<string>;
|
|
30
|
+
};
|
|
31
|
+
export type CommandLineCommandContext = ConfigLoadRequest & {
|
|
31
32
|
readonly arguments: readonly string[];
|
|
32
33
|
};
|
|
33
34
|
export type CommandLineRunnerResult = {
|
|
@@ -44,10 +45,17 @@ export type CommandLineBaselineCommands = {
|
|
|
44
45
|
readonly list: CommandLineCommand;
|
|
45
46
|
readonly update: CommandLineCommand;
|
|
46
47
|
};
|
|
48
|
+
export type BenchmarkRunRequest = ProfileRunRequest<string | null>;
|
|
49
|
+
export type CommandLineBenchmarkRunRequest = ConfigLoadRequest & {
|
|
50
|
+
readonly runRequest: BenchmarkRunRequest;
|
|
51
|
+
};
|
|
52
|
+
export type CommandLineBenchmarkListRequest = ConfigLoadRequest & {
|
|
53
|
+
readonly listRequest: CommandLineListRequest<string | null>;
|
|
54
|
+
};
|
|
47
55
|
export type CommandLineBenchmarkCommands = {
|
|
48
56
|
readonly baseline: CommandLineBaselineCommands;
|
|
49
|
-
readonly listBenchmarks:
|
|
50
|
-
readonly runBenchmarks:
|
|
57
|
+
readonly listBenchmarks: (request: CommandLineBenchmarkListRequest) => Promise<CommandLineRunnerResult>;
|
|
58
|
+
readonly runBenchmarks: (request: CommandLineBenchmarkRunRequest) => Promise<CommandLineRunnerResult>;
|
|
51
59
|
};
|
|
52
60
|
export {};
|
|
53
61
|
//# sourceMappingURL=command-line-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-command.d.ts","sourceRoot":"","sources":["../../../../source/run/command-line-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAwB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"command-line-command.d.ts","sourceRoot":"","sources":["../../../../source/run/command-line-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAwB,MAAM,yBAAyB,CAAC;AAGtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGpE,KAAK,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,oBAAoB;;;;;;;;EAQ/B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAOnG,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,GAAG;IACzD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACnC,CAAC;AAEF,KAAK,sBAAsB,CAAC,OAAO,SAAS,MAAM,GAAG,IAAI,IAAI;IACzD,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,M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AG;IAC7D,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,GAAG;IAC9D,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACvC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,QAAQ,CAAC,cAAc,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACxG,QAAQ,CAAC,aAAa,EAAE,CAAC,OAAO,EAAE,8BAA8B,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACzG,CAAC;AAMF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReporterSinkConflictError } from "../engine/reporter.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ConfigError } from "../config/config-error.js";
|
|
3
|
+
import { RunCollectionError, RunResolutionError } from "./run-errors.js";
|
|
3
4
|
export const commandLineExitCodes = Object.freeze({
|
|
4
5
|
argumentOrConfig: 3,
|
|
5
6
|
internalCrash: 70,
|
|
@@ -132,7 +133,7 @@ function createCommandLineCollectionErrorResult(error) {
|
|
|
132
133
|
}
|
|
133
134
|
export function createCommandLineErrorResultFromUnknown(error) {
|
|
134
135
|
const classifiedError = primaryError(error);
|
|
135
|
-
if (classifiedError instanceof
|
|
136
|
+
if (classifiedError instanceof ConfigError) {
|
|
136
137
|
return createCommandLineErrorResult(commandLineExitCodes.argumentOrConfig, 'configuration error', error);
|
|
137
138
|
}
|
|
138
139
|
if (classifiedError instanceof ReporterSinkConflictError) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-command.js","sourceRoot":"","sources":["../../../../source/run/command-line-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"command-line-command.js","sourceRoot":"","sources":["../../../../source/run/command-line-command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,gBAAgB,EAAE,CAAC;IACnB,aAAa,EAAE,EAAE;IACjB,gBAAgB,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC;IACP,kBAAkB,EAAE,CAAC;IACrB,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,CAAC;CACjB,CAAC,CAAC;AAiEH,SAAS,iBAAiB,CAAC,KAAkB;IACzC,OAAO,0BAA0B,KAAK,CAAC,OAAO,EAAE,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,MAA8B;IACvE,OAAO,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACzC,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IAC/B,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,OAAO,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC;AACvD,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACjC,OAAO,mBAAmB,CAAC,KAAK,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC;QAC/B,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;QACjC,OAAO,K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EAAE,CAAC;QAChD,OAAO,sCAAsC,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,eAAe,YAAY,kBAAkB,EAAE,CAAC;QAChD,OAAO,sCAAsC,CAAC,eAAe,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,4BAA4B,CAAC,oBAAoB,CAAC,aAAa,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;AACrG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-line-config.d.ts","sourceRoot":"","sources":["../../../../source/run/command-line-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;MAOvD,MAAM,6BAA6B,GAAG;IAAE,QAAQ,CAAC,qBAAqB,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { selectProfile } from "./test-profile.js";
|
|
2
|
+
import { selectCommandLineReporterFallback } from "./run-reporter-resolution.js";
|
|
3
|
+
async function loadCommandLineReporterFallback(fallback, dependencies) {
|
|
4
|
+
if (fallback.kind === 'configured') {
|
|
5
|
+
return fallback.reporters;
|
|
6
|
+
}
|
|
7
|
+
if (fallback.kind === 'default') {
|
|
8
|
+
return [await dependencies.createDefaultReporter()];
|
|
9
|
+
}
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
export async function createCommandLineConfig(loadedConfig, request, dependencies) {
|
|
13
|
+
const reporterFallback = selectCommandLineReporterFallback(loadedConfig, request.runRequest.profile);
|
|
14
|
+
return {
|
|
15
|
+
loader: loadedConfig.loader,
|
|
16
|
+
outputRenderer: loadedConfig.outputRenderer,
|
|
17
|
+
profiles: loadedConfig.profiles,
|
|
18
|
+
reporters: await loadCommandLineReporterFallback(reporterFallback, dependencies),
|
|
19
|
+
runtimeStateDir: loadedConfig.runtimeStateDir
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function listProfile(profile) {
|
|
23
|
+
if (profile.testFamily !== 'microtest') {
|
|
24
|
+
return profile;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
...profile,
|
|
28
|
+
execution: {
|
|
29
|
+
maxConcurrency: profile.execution.maxConcurrency,
|
|
30
|
+
processModel: 'in-process',
|
|
31
|
+
scheduling: profile.execution.scheduling
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function listProfiles(profiles) {
|
|
36
|
+
return Object.fromEntries(Object.entries(profiles).map(function toListProfile(entry) {
|
|
37
|
+
const [name, profile] = entry;
|
|
38
|
+
return [name, listProfile(profile)];
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
export function createCommandLineListConfig(loadedConfig, profileName) {
|
|
42
|
+
selectProfile(profileName, loadedConfig);
|
|
43
|
+
return {
|
|
44
|
+
loader: loadedConfig.loader,
|
|
45
|
+
outputRenderer: loadedConfig.outputRenderer,
|
|
46
|
+
profiles: listProfiles(loadedConfig.profiles),
|
|
47
|
+
reporters: [],
|
|
48
|
+
runtimeStateDir: loadedConfig.runtimeStateDir
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=command-line-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-line-config.js","sourceRoot":"","sources":["../../../../source/run/command-line-config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAoC,MAAM,8BAA8B,CAAC;AAInH,KAAK,UAAU,+BAA+B,CAC1C,QAAqC,EACrC,YAA2C;IAE3C,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,SAAS,CAAC;IAC9B,CAAC;IAED,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,CAAE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,CAAC,CAAC;IACzC,OAAO;QACH,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,cAAc,EAAE,YAAY,CAAC,cAAc;QAC3C,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC;QAC7C,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,YAAY,CAAC,eAAe;KAChD,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { selectTestProfile } from "./test-profile.js";
|
|
2
|
+
import { createCommandLineConfig, createCommandLineListConfig } from "./command-line-config.js";
|
|
3
|
+
import { commandLineExitCodes, formatRunnerErrorDiagnostics, readExitCodeFromRunResult } from "./command-line-command.js";
|
|
4
|
+
import { renderResolvedRunList } from "./run-list-renderer.js";
|
|
5
|
+
export function assertOrdinaryCommandProfile(profileName, config) {
|
|
6
|
+
if (config.profiles[profileName]?.testFamily === 'benchmark') {
|
|
7
|
+
selectTestProfile(profileName, config);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
async function createCommandFromRequest(request, loadedConfig, dependencies) {
|
|
11
|
+
return {
|
|
12
|
+
config: await createCommandLineConfig(loadedConfig, request, dependencies),
|
|
13
|
+
cwd: request.cwd,
|
|
14
|
+
engine: { kind: 'default' },
|
|
15
|
+
request: {
|
|
16
|
+
...request.runRequest,
|
|
17
|
+
capabilityRestrictions: { mode: 'enabled' }
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function createCommandFromListRequest(request, loadedConfig) {
|
|
22
|
+
return {
|
|
23
|
+
config: createCommandLineListConfig(loadedConfig, request.listRequest.profile),
|
|
24
|
+
cwd: request.cwd,
|
|
25
|
+
engine: { kind: 'default' },
|
|
26
|
+
request: {
|
|
27
|
+
baselineUpdateMode: 'none',
|
|
28
|
+
capabilityRestrictions: { mode: 'enabled' },
|
|
29
|
+
capture: 'buffered',
|
|
30
|
+
coverage: false,
|
|
31
|
+
debug: {
|
|
32
|
+
mode: 'off',
|
|
33
|
+
selectors: []
|
|
34
|
+
},
|
|
35
|
+
execution: { mode: 'profile-default' },
|
|
36
|
+
measureResourceUsage: null,
|
|
37
|
+
order: request.listRequest.order,
|
|
38
|
+
paths: request.listRequest.paths,
|
|
39
|
+
profile: request.listRequest.profile,
|
|
40
|
+
resourceBudgetOverrides: null,
|
|
41
|
+
resourceUsageSamplingIntervalMilliseconds: null,
|
|
42
|
+
seed: request.listRequest.seed,
|
|
43
|
+
selection: request.listRequest.selection,
|
|
44
|
+
shard: request.listRequest.shard,
|
|
45
|
+
timingCollection: 'profile-default',
|
|
46
|
+
verbose: false,
|
|
47
|
+
workers: null
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export async function runTestsWithLoadedConfig(request, dependencies, loadedConfig, options) {
|
|
52
|
+
const command = await createCommandFromRequest(request, loadedConfig, dependencies);
|
|
53
|
+
const runResult = await dependencies.orchestrator.runWithReporterDelivery(command, options);
|
|
54
|
+
return {
|
|
55
|
+
exitCode: readExitCodeFromRunResult(runResult.result),
|
|
56
|
+
fallbackDiagnostics: formatRunnerErrorDiagnostics(runResult.undeliveredRunnerErrors),
|
|
57
|
+
runResult: runResult.result,
|
|
58
|
+
stdoutLines: []
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export async function listTestsWithLoadedConfig(request, dependencies, loadedConfig) {
|
|
62
|
+
const command = createCommandFromListRequest(request, loadedConfig);
|
|
63
|
+
const resolvedRun = await dependencies.orchestrator.resolve(command, { timing: null });
|
|
64
|
+
if (resolvedRun.collectionRunnerErrors.length > 0) {
|
|
65
|
+
return {
|
|
66
|
+
exitCode: commandLineExitCodes.runnerError,
|
|
67
|
+
fallbackDiagnostics: formatRunnerErrorDiagnostics(resolvedRun.collectionRunnerErrors),
|
|
68
|
+
runResult: null,
|
|
69
|
+
stdoutLines: []
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
exitCode: commandLineExitCodes.pass,
|
|
74
|
+
fallbackDiagnostics: [],
|
|
75
|
+
runResult: null,
|
|
76
|
+
stdoutLines: renderResolvedRunList(resolvedRun, {
|
|
77
|
+
withLocations: request.listRequest.withLocations,
|
|
78
|
+
withOrphans: request.listRequest.withOrphans
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=command-line-execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-line-execution.js","sourceRoot":"","sources":["../../../../source/run/command-line-execution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EACH,uBAAuB,EACvB,2BAA2B,EAE9B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACH,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,EAI5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAgB/D,MAAM,UAAU,4BAA4B,CAAC,WAAmB,EAAE,MAAoB;IAClF,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,KAAK,WAAW,EAAE,CAAC;QAC3D,iBAAiB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;AACL,CAAC;AAED,KAAK,UAAU,wBAAwB,CACnC,OAAmC,EACnC,YAA0B,EAC1B,YAA8C;IAE9C,OAAO;QACH,MAAM,EAAE,MAAM,uBAAuB,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,CAAC;QAC1E,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC3B,OAAO,EAAE;YACL,GAAG,OAAO,CAAC,UAAU;YACrB,sBAAsB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC9C;KACJ,CAAC;AACN,CAAC;AAED,SAAS,4BAA4B,CACjC,OAAoC,EACpC,YA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,EAAE,yBAAyB,CAAC,SAAS,CAAC,MAAM,CAAC;QACrD,mBAAmB,EAAE,4BAA4B,CAAC,SAAS,CAAC,uBAAuB,CAAC;QACpF,SAAS,EAAE,SAAS,CAAC,MAAM;QAC3B,WAAW,EAAE,EAAE;KAClB,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC3C,OAAoC,EACpC,YAA8C,EAC9C,YAA0B;IAE1B,MAAM,OAAO,GAAG,4BAA4B,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACpE,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvF,IAAI,WAAW,CAAC,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,OAAO;YACH,QAAQ,EAAE,oBAAoB,CAAC,WAAW;YAC1C,mBAAmB,EAAE,4BAA4B,CAAC,WAAW,CAAC,sBAAsB,CAAC;YACrF,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,EAAE;SAClB,CAAC;IACN,CAAC;IAED,OAAO;QACH,QAAQ,EAAE,oBAAoB,CAAC,IAAI;QACnC,mBAAmB,EAAE,EAAE;QACvB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,qBAAqB,CAAC,WAAW,EAAE;YAC5C,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa;YAChD,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,WAAW;SAC/C,CAAC;KACL,CAAC;AACN,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoadedConfig, ConfigLoadRequest } from '../config/config.ts';
|
|
2
|
+
import type { CommandLineConfigDependencies } from './command-line-config.ts';
|
|
2
3
|
import type { RunOrchestrator } from './run-types.ts';
|
|
3
|
-
import type { LoadedRunConfig, RunConfigLoadRequest } from './run-config.ts';
|
|
4
4
|
import { type CommandLineListTestsRequest, type CommandLineBaselineCommands, type CommandLineBenchmarkCommands, type CommandLineCommand, type CommandLineRunTestsRequest, type CommandLineRunnerResult as CommandLineRunnerResultShape } from './command-line-command.ts';
|
|
5
5
|
import { type CommandLineCommandLoaders } from './command-line-command-namespace.ts';
|
|
6
6
|
export type CommandLineRunner = {
|
|
@@ -12,9 +12,8 @@ export type CommandLineRunner = {
|
|
|
12
12
|
readonly runTests: (request: CommandLineRunTestsRequest) => Promise<CommandLineRunnerResult>;
|
|
13
13
|
};
|
|
14
14
|
export type CommandLineRunnerResult = CommandLineRunnerResultShape;
|
|
15
|
-
export type CommandLineRunnerDependencies = CommandLineCommandLoaders & {
|
|
16
|
-
readonly
|
|
17
|
-
readonly loadRunConfig: (request: RunConfigLoadRequest) => Promise<LoadedRunConfig>;
|
|
15
|
+
export type CommandLineRunnerDependencies = CommandLineCommandLoaders & CommandLineConfigDependencies & {
|
|
16
|
+
readonly loadConfig: (request: ConfigLoadRequest) => Promise<LoadedConfig>;
|
|
18
17
|
readonly orchestrator: RunOrchestrator;
|
|
19
18
|
};
|
|
20
19
|
//# sourceMappingURL=command-line-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-runner.d.ts","sourceRoot":"","sources":["../../../../source/run/command-line-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"command-line-runner.d.ts","sourceRoot":"","sources":["../../../../source/run/command-line-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGR,YAAY,EACZ,iBAAiB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACR,6BAA6B,EAChC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAEH,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,IAAI,4BAA4B,EAC/D,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEH,KAAK,yBAAyB,EACjC,MAAM,qCAAqC,CAAC;AAc7C,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,QAAQ,CAAC,KAAK,EAAE,4BAA4B,CAAC;IAC7C,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC/F,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAChG,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,4BAA4B,CAAC;AAEnE,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,GAAG,6BAA6B,GAAG;IACpG,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3E,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;CAC1C,CAAC"}
|
|
@@ -1,129 +1,9 @@
|
|
|
1
|
-
import { createCommandLineErrorResultFromUnknown
|
|
1
|
+
import { createCommandLineErrorResultFromUnknown } from "./command-line-command.js";
|
|
2
2
|
import { createCommandLineCommandNamespace } from "./command-line-command-namespace.js";
|
|
3
3
|
import { createUnimplementedCommand } from "./command-line-unimplemented-commands.js";
|
|
4
|
-
import {
|
|
5
|
-
import { renderResolvedRunList } from "./run-list-renderer.js";
|
|
4
|
+
import { assertOrdinaryCommandProfile, runTestsWithLoadedConfig, listTestsWithLoadedConfig } from "./command-line-execution.js";
|
|
6
5
|
import { createDefaultDirectReporter } from "./default-direct-reporter.js";
|
|
7
6
|
import { createSystemRunTimingMeasurement, emptyTimingSpanMetadata } from "./run-timing-collection.js";
|
|
8
|
-
async function loadCommandLineReporterFallback(fallback, dependencies) {
|
|
9
|
-
if (fallback.kind === 'configured') {
|
|
10
|
-
return fallback.reporters;
|
|
11
|
-
}
|
|
12
|
-
if (fallback.kind === 'default') {
|
|
13
|
-
return [await dependencies.createDefaultReporter()];
|
|
14
|
-
}
|
|
15
|
-
return [];
|
|
16
|
-
}
|
|
17
|
-
async function createCommandLineConfig(loadedConfig, request, dependencies) {
|
|
18
|
-
const reporterFallback = selectCommandLineReporterFallback(loadedConfig, request.runRequest.profile);
|
|
19
|
-
return {
|
|
20
|
-
loader: loadedConfig.loader,
|
|
21
|
-
outputRenderer: loadedConfig.outputRenderer,
|
|
22
|
-
profiles: loadedConfig.profiles,
|
|
23
|
-
reporters: await loadCommandLineReporterFallback(reporterFallback, dependencies),
|
|
24
|
-
runtimeStateDir: loadedConfig.runtimeStateDir
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function listProfile(profile) {
|
|
28
|
-
if (profile.testFamily !== 'microtest') {
|
|
29
|
-
return profile;
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
...profile,
|
|
33
|
-
execution: {
|
|
34
|
-
maxConcurrency: profile.execution.maxConcurrency,
|
|
35
|
-
processModel: 'in-process',
|
|
36
|
-
scheduling: profile.execution.scheduling
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function listProfiles(profiles) {
|
|
41
|
-
return Object.fromEntries(Object.entries(profiles).map(function toListProfile(entry) {
|
|
42
|
-
const [name, profile] = entry;
|
|
43
|
-
return [name, listProfile(profile)];
|
|
44
|
-
}));
|
|
45
|
-
}
|
|
46
|
-
function createCommandLineListConfig(loadedConfig) {
|
|
47
|
-
return {
|
|
48
|
-
loader: loadedConfig.loader,
|
|
49
|
-
outputRenderer: loadedConfig.outputRenderer,
|
|
50
|
-
profiles: listProfiles(loadedConfig.profiles),
|
|
51
|
-
reporters: [],
|
|
52
|
-
runtimeStateDir: loadedConfig.runtimeStateDir
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
async function createCommandFromRequest(request, loadedConfig, dependencies) {
|
|
56
|
-
return {
|
|
57
|
-
config: await createCommandLineConfig(loadedConfig, request, dependencies),
|
|
58
|
-
cwd: request.cwd,
|
|
59
|
-
engine: { kind: 'default' },
|
|
60
|
-
request: {
|
|
61
|
-
...request.runRequest,
|
|
62
|
-
capabilityRestrictions: { mode: 'enabled' }
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function createCommandFromListRequest(request, loadedConfig) {
|
|
67
|
-
return {
|
|
68
|
-
config: createCommandLineListConfig(loadedConfig),
|
|
69
|
-
cwd: request.cwd,
|
|
70
|
-
engine: { kind: 'default' },
|
|
71
|
-
request: {
|
|
72
|
-
baselineUpdateMode: 'none',
|
|
73
|
-
capabilityRestrictions: { mode: 'enabled' },
|
|
74
|
-
capture: 'buffered',
|
|
75
|
-
coverage: false,
|
|
76
|
-
debug: {
|
|
77
|
-
mode: 'off',
|
|
78
|
-
selectors: []
|
|
79
|
-
},
|
|
80
|
-
execution: { mode: 'profile-default' },
|
|
81
|
-
measureResourceUsage: null,
|
|
82
|
-
order: request.listRequest.order,
|
|
83
|
-
paths: request.listRequest.paths,
|
|
84
|
-
profile: request.listRequest.profile,
|
|
85
|
-
resourceBudgetOverrides: null,
|
|
86
|
-
resourceUsageSamplingIntervalMilliseconds: null,
|
|
87
|
-
seed: request.listRequest.seed,
|
|
88
|
-
selection: request.listRequest.selection,
|
|
89
|
-
shard: request.listRequest.shard,
|
|
90
|
-
timingCollection: 'profile-default',
|
|
91
|
-
verbose: false,
|
|
92
|
-
workers: null
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
async function runTestsWithLoadedConfig(request, dependencies, loadedConfig, options) {
|
|
97
|
-
const command = await createCommandFromRequest(request, loadedConfig, dependencies);
|
|
98
|
-
const runResult = await dependencies.orchestrator.runWithReporterDelivery(command, options);
|
|
99
|
-
return {
|
|
100
|
-
exitCode: readExitCodeFromRunResult(runResult.result),
|
|
101
|
-
fallbackDiagnostics: formatRunnerErrorDiagnostics(runResult.undeliveredRunnerErrors),
|
|
102
|
-
runResult: runResult.result,
|
|
103
|
-
stdoutLines: []
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
async function listTestsWithLoadedConfig(request, dependencies, loadedConfig) {
|
|
107
|
-
const command = createCommandFromListRequest(request, loadedConfig);
|
|
108
|
-
const resolvedRun = await dependencies.orchestrator.resolve(command);
|
|
109
|
-
if (resolvedRun.collectionRunnerErrors.length > 0) {
|
|
110
|
-
return {
|
|
111
|
-
exitCode: commandLineExitCodes.runnerError,
|
|
112
|
-
fallbackDiagnostics: formatRunnerErrorDiagnostics(resolvedRun.collectionRunnerErrors),
|
|
113
|
-
runResult: null,
|
|
114
|
-
stdoutLines: []
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
exitCode: commandLineExitCodes.pass,
|
|
119
|
-
fallbackDiagnostics: [],
|
|
120
|
-
runResult: null,
|
|
121
|
-
stdoutLines: renderResolvedRunList(resolvedRun, {
|
|
122
|
-
withLocations: request.listRequest.withLocations,
|
|
123
|
-
withOrphans: request.listRequest.withOrphans
|
|
124
|
-
})
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
7
|
export function createCommandLineRunner(dependencies) {
|
|
128
8
|
const commandNamespace = createCommandLineCommandNamespace(dependencies);
|
|
129
9
|
return {
|
|
@@ -131,7 +11,8 @@ export function createCommandLineRunner(dependencies) {
|
|
|
131
11
|
bench: commandNamespace.bench,
|
|
132
12
|
async listTests(request) {
|
|
133
13
|
try {
|
|
134
|
-
const loadedConfig = await dependencies.
|
|
14
|
+
const loadedConfig = await dependencies.loadConfig(request);
|
|
15
|
+
assertOrdinaryCommandProfile(request.listRequest.profile, loadedConfig);
|
|
135
16
|
return await listTestsWithLoadedConfig(request, dependencies, loadedConfig);
|
|
136
17
|
}
|
|
137
18
|
catch (error) {
|
|
@@ -144,8 +25,9 @@ export function createCommandLineRunner(dependencies) {
|
|
|
144
25
|
const timing = createSystemRunTimingMeasurement();
|
|
145
26
|
try {
|
|
146
27
|
const loadedConfig = await timing.measureAsync('config.load', emptyTimingSpanMetadata(), async function loadRunTestsConfig() {
|
|
147
|
-
return await dependencies.
|
|
28
|
+
return await dependencies.loadConfig(request);
|
|
148
29
|
});
|
|
30
|
+
assertOrdinaryCommandProfile(request.runRequest.profile, loadedConfig);
|
|
149
31
|
return await runTestsWithLoadedConfig(request, dependencies, loadedConfig, { timing });
|
|
150
32
|
}
|
|
151
33
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-runner.js","sourceRoot":"","sources":["../../../../source/run/command-line-runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-line-runner.js","sourceRoot":"","sources":["../../../../source/run/command-line-runner.ts"],"names":[],"mappings":"AAWA,OAAO,EACH,uCAAuC,EAO1C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,iCAAiC,EAEpC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAEtF,OAAO,EACH,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EACH,gCAAgC,EAChC,uBAAuB,EAC1B,MAAM,4BAA4B,CAAC;AAkBpC,MAAM,UAAU,uBAAuB,CAAC,YAA2C;IAC/E,MAAM,gBAAgB,GAAG,iCAAiC,CAAC,YAAY,CAAC,CAAC;IAEzE,OAAO;QACH,QAAQ,EAAE,gBAAgB,CAAC,QAAQ;QACnC,KAAK,EAAE,gBAAgB,CAAC,KAAK;QAC7B,KAAK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createUnimplementedCommandResult(command, context);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function createUnimplementedBaselineCommands(namespace) {
|
|
14
|
+
export function createUnimplementedBaselineCommands(namespace) {
|
|
15
15
|
return {
|
|
16
16
|
apply: createUnimplementedCommand(`${namespace} apply`),
|
|
17
17
|
bootstrap: createUnimplementedCommand(`${namespace} bootstrap`),
|
|
@@ -23,11 +23,4 @@ function createUnimplementedBaselineCommands(namespace) {
|
|
|
23
23
|
export async function loadUnimplementedBaselineCommands() {
|
|
24
24
|
return createUnimplementedBaselineCommands('baseline');
|
|
25
25
|
}
|
|
26
|
-
export async function loadUnimplementedBenchmarkCommands() {
|
|
27
|
-
return {
|
|
28
|
-
baseline: createUnimplementedBaselineCommands('bench baseline'),
|
|
29
|
-
listBenchmarks: createUnimplementedCommand('bench list'),
|
|
30
|
-
runBenchmarks: createUnimplementedCommand('bench run')
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
26
|
//# sourceMappingURL=command-line-unimplemented-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-unimplemented-commands.js","sourceRoot":"","sources":["../../../../source/run/command-line-unimplemented-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACH,uCAAuC,
|
|
1
|
+
{"version":3,"file":"command-line-unimplemented-commands.js","sourceRoot":"","sources":["../../../../source/run/command-line-unimplemented-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACH,uCAAuC,EAK1C,MAAM,2BAA2B,CAAC;AAEnC,SAAS,gCAAgC,CACrC,OAAe,EACf,OAAkC;IAElC,MAAM,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;QACjD,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,SAAS,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC;IAE/D,OAAO,uCAAuC,CAC1C,IAAI,kBAAkB,CAClB,YAAY,OAAO,IAAI,cAAc,0BAA0B,EAC/D,SAAS,EACT,qBAAqB,CACxB,CACJ,CAAC;AACN,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAe;IACtD,OAAO,KAAK,UAAU,uBAAuB,CAAC,OAAO;QACjD,OAAO,gCAAgC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,mCAAmC,CAAC,SAAiB;IACjE,OAAO;QACH,KAAK,EAAE,0BAA0B,CAAC,GAAG,SAAS,QAAQ,CAAC;QACvD,SAAS,EAAE,0BAA0B,CAAC,GAAG,SAAS,YAAY,CAAC;QAC/D,IAAI,EAAE,0BAA0B,CAAC,GAAG,SAAS,OAAO,CAAC;QACrD,IAAI,EAAE,0BAA0B,CAAC,GAAG,SAAS,OAAO,CAAC;QACrD,MAAM,EAAE,0BAA0B,CAAC,GAAG,SAAS,SAAS,CAAC;KAC5D,CAAC;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iCAAiC;IACnD,OAAO,mCAAmC,CAAC,UAAU,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
1
|
import path from 'node:path';
|
|
3
2
|
import { fileURLToPath } from 'node:url';
|
|
4
3
|
import { isPathInside } from "./path-containment.js";
|
|
5
|
-
import {
|
|
4
|
+
import { isSupportedCoverageSource } from "./coverage-runtime-source.js";
|
|
6
5
|
import { normalizedCoverageSourceMap, readCoverageSourceMap } from "./coverage-source-map.js";
|
|
7
6
|
function projectScriptPath(url, projectRoot) {
|
|
8
7
|
if (!url.startsWith('file:')) {
|
|
@@ -12,20 +11,20 @@ function projectScriptPath(url, projectRoot) {
|
|
|
12
11
|
const insideProject = isPathInside(projectRoot, filePath) && !filePath.split(path.sep).includes('node_modules');
|
|
13
12
|
return insideProject && isSupportedCoverageSource(filePath) ? filePath : null;
|
|
14
13
|
}
|
|
15
|
-
async function readLoadedEntry(url, cached, projectRoot) {
|
|
14
|
+
async function readLoadedEntry(url, cached, projectRoot, cache) {
|
|
16
15
|
const filePath = projectScriptPath(url, projectRoot);
|
|
17
16
|
if (filePath === null) {
|
|
18
17
|
return null;
|
|
19
18
|
}
|
|
20
|
-
const source = await
|
|
21
|
-
const map = await readCoverageSourceMap({ cached, source, url });
|
|
19
|
+
const source = await cache.read(filePath);
|
|
20
|
+
const map = await readCoverageSourceMap({ cache, cached, source, url });
|
|
22
21
|
return { filePath, map, source, url };
|
|
23
22
|
}
|
|
24
23
|
async function loadedCoverageEntries(request) {
|
|
25
24
|
const entries = new Map();
|
|
26
25
|
for (const batch of request.batches) {
|
|
27
26
|
for (const entry of batch.entries) {
|
|
28
|
-
const loaded = await readLoadedEntry(entry.url, batch.sourceMaps[entry.url], request.projectRoot);
|
|
27
|
+
const loaded = await readLoadedEntry(entry.url, batch.sourceMaps[entry.url], request.projectRoot, request.cache);
|
|
29
28
|
if (loaded !== null) {
|
|
30
29
|
entries.set(entry.url, loaded);
|
|
31
30
|
}
|
|
@@ -63,13 +62,13 @@ async function originalSourceContent(original, request) {
|
|
|
63
62
|
if (filePath === null) {
|
|
64
63
|
return { content: original.content ?? '', filePath: null };
|
|
65
64
|
}
|
|
66
|
-
const content = original.content ?? await
|
|
67
|
-
const hasRuntime = isSupportedCoverageSource(filePath) &&
|
|
65
|
+
const content = original.content ?? await request.cache.read(filePath);
|
|
66
|
+
const hasRuntime = isSupportedCoverageSource(filePath) && request.cache.inspect(content, filePath).hasRuntime;
|
|
68
67
|
return { content, filePath: hasRuntime ? filePath : null };
|
|
69
68
|
}
|
|
70
69
|
async function selectLoadedEntry(entry, request) {
|
|
71
70
|
if (entry.map === null) {
|
|
72
|
-
return request.includeSource(entry.filePath) &&
|
|
71
|
+
return request.includeSource(entry.filePath) && request.cache.inspect(entry.source, entry.filePath).hasRuntime
|
|
73
72
|
? { map: null, sources: [entry.filePath], url: entry.url }
|
|
74
73
|
: null;
|
|
75
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage-loaded-sources.js","sourceRoot":"","sources":["../../../../source/run/coverage-loaded-sources.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"coverage-loaded-sources.js","sourceRoot":"","sources":["../../../../source/run/coverage-loaded-sources.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,yBAAyB,EAA4B,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAoB,MAAM,0BAA0B,CAAC;AAsBhH,SAAS,iBAAiB,CAAC,GAAW,EAAE,WAAmB;IACvD,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,aAAa,GAAG,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEhH,OAAO,aAAa,IAAI,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC;AAED,KAAK,UAAU,eAAe,CAC1B,GAAW,EACX,MAAe,EACf,WAAmB,EACnB,KAA0B;IAE1B,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAErD,I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