@rehearsal-labs/retest 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/api/source-location.d.ts.map +1 -1
- package/dist/api/source-location.js +3 -1
- package/dist/browser/builds.d.ts +35 -6
- package/dist/browser/builds.d.ts.map +1 -1
- package/dist/browser/builds.js +115 -16
- package/dist/browser/cdp/transport.d.ts.map +1 -1
- package/dist/browser/cdp/transport.js +4 -4
- package/dist/browser/chromium-process.d.ts +23 -0
- package/dist/browser/chromium-process.d.ts.map +1 -1
- package/dist/browser/chromium-process.js +78 -13
- package/dist/browser/electron.d.ts +1 -1
- package/dist/browser/electron.d.ts.map +1 -1
- package/dist/browser/electron.js +6 -3
- package/dist/browser/executables.d.ts +16 -1
- package/dist/browser/executables.d.ts.map +1 -1
- package/dist/browser/executables.js +50 -18
- package/dist/browser/firefox/accessible-names.d.ts +5 -4
- package/dist/browser/firefox/accessible-names.d.ts.map +1 -1
- package/dist/browser/firefox/accessible-names.js +11 -6
- package/dist/browser/firefox/bridge.js +3 -2
- package/dist/browser/firefox/executable.d.ts +14 -14
- package/dist/browser/firefox/executable.d.ts.map +1 -1
- package/dist/browser/firefox/executable.js +29 -21
- package/dist/browser/firefox/launch.js +1 -1
- package/dist/browser/firefox/navigation.d.ts +5 -2
- package/dist/browser/firefox/navigation.d.ts.map +1 -1
- package/dist/browser/firefox/navigation.js +48 -14
- package/dist/browser/firefox/orphans.d.ts.map +1 -1
- package/dist/browser/firefox/orphans.js +34 -2
- package/dist/browser/firefox/page.d.ts.map +1 -1
- package/dist/browser/firefox/page.js +113 -19
- package/dist/browser/firefox/process.d.ts +20 -1
- package/dist/browser/firefox/process.d.ts.map +1 -1
- package/dist/browser/firefox/process.js +124 -22
- package/dist/browser/firefox/profile.d.ts +5 -0
- package/dist/browser/firefox/profile.d.ts.map +1 -1
- package/dist/browser/firefox/profile.js +17 -1
- package/dist/browser/firefox/storage.d.ts.map +1 -1
- package/dist/browser/firefox/storage.js +4 -2
- package/dist/browser/firefox/subscriptions.d.ts +26 -0
- package/dist/browser/firefox/subscriptions.d.ts.map +1 -0
- package/dist/browser/firefox/subscriptions.js +10 -0
- package/dist/browser/launch.d.ts +6 -0
- package/dist/browser/launch.d.ts.map +1 -1
- package/dist/browser/launch.js +14 -1
- package/dist/cli/commands/doctor.js +3 -3
- package/dist/cli/commands/inspect.js +3 -2
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +26 -13
- package/dist/cli/commands/licences.d.ts +22 -0
- package/dist/cli/commands/licences.d.ts.map +1 -1
- package/dist/cli/commands/licences.js +62 -20
- package/dist/cli/commands/run.js +2 -2
- package/dist/cli/doctor/checks.js +4 -1
- package/dist/cli/inspect/diagnostics.js +3 -3
- package/dist/cli/inspect/test-timeline.js +10 -10
- package/dist/cli/install/doctor-rows.d.ts.map +1 -1
- package/dist/cli/install/doctor-rows.js +5 -4
- package/dist/cli/install/file-changes.d.ts +44 -0
- package/dist/cli/install/file-changes.d.ts.map +1 -0
- package/dist/cli/install/file-changes.js +81 -0
- package/dist/cli/install/install-archive.d.ts +3 -1
- package/dist/cli/install/install-archive.d.ts.map +1 -1
- package/dist/cli/install/install-archive.js +80 -33
- package/dist/cli/install/lock.d.ts.map +1 -1
- package/dist/cli/install/lock.js +108 -21
- package/dist/cli/install/media-doctor.d.ts.map +1 -1
- package/dist/cli/install/media-doctor.js +2 -1
- package/dist/cli/install/media-install.d.ts.map +1 -1
- package/dist/cli/install/media-install.js +38 -19
- package/dist/cli/install/media-pins.d.ts +7 -1
- package/dist/cli/install/media-pins.d.ts.map +1 -1
- package/dist/cli/install/media-pins.js +23 -12
- package/dist/cli/install/media-record.d.ts.map +1 -1
- package/dist/cli/install/media-record.js +10 -9
- package/dist/cli/install/media-report.d.ts +3 -1
- package/dist/cli/install/media-report.d.ts.map +1 -1
- package/dist/cli/install/media-report.js +7 -5
- package/dist/cli/install/media-tools.d.ts.map +1 -1
- package/dist/cli/install/media-tools.js +6 -4
- package/dist/cli/install/process-start.d.ts +3 -2
- package/dist/cli/install/process-start.d.ts.map +1 -1
- package/dist/cli/install/process-start.js +4 -0
- package/dist/cli/install/report.d.ts.map +1 -1
- package/dist/cli/install/report.js +11 -7
- package/dist/cli/install/supervisor-install.d.ts +33 -0
- package/dist/cli/install/supervisor-install.d.ts.map +1 -0
- package/dist/cli/install/supervisor-install.js +158 -0
- package/dist/cli/install/supervisor-locate.d.ts +47 -0
- package/dist/cli/install/supervisor-locate.d.ts.map +1 -0
- package/dist/cli/install/supervisor-locate.js +113 -0
- package/dist/cli/install/supervisor-pins.d.ts +21 -0
- package/dist/cli/install/supervisor-pins.d.ts.map +1 -0
- package/dist/cli/install/supervisor-pins.js +28 -0
- package/dist/cli/install/supervisor-record.d.ts +31 -0
- package/dist/cli/install/supervisor-record.d.ts.map +1 -0
- package/dist/cli/install/supervisor-record.js +104 -0
- package/dist/cli/install/supervisor-report.d.ts +11 -0
- package/dist/cli/install/supervisor-report.d.ts.map +1 -0
- package/dist/cli/install/supervisor-report.js +33 -0
- package/dist/cli/install/supervisor-tools.d.ts +43 -0
- package/dist/cli/install/supervisor-tools.d.ts.map +1 -0
- package/dist/cli/install/supervisor-tools.js +114 -0
- package/dist/cli/install/unpack.d.ts +23 -3
- package/dist/cli/install/unpack.d.ts.map +1 -1
- package/dist/cli/install/unpack.js +124 -10
- package/dist/cli/install/zip-member.d.ts +15 -0
- package/dist/cli/install/zip-member.d.ts.map +1 -0
- package/dist/cli/install/zip-member.js +77 -0
- package/dist/cli/interrupt.d.ts +1 -1
- package/dist/cli/interrupt.d.ts.map +1 -1
- package/dist/cli/interrupt.js +15 -10
- package/dist/cli/terminal.d.ts +9 -1
- package/dist/cli/terminal.d.ts.map +1 -1
- package/dist/cli/terminal.js +14 -0
- package/dist/config/define.d.ts +2 -2
- package/dist/config/define.js +2 -2
- package/dist/diagnostics/firefox-collector.d.ts +11 -10
- package/dist/diagnostics/firefox-collector.d.ts.map +1 -1
- package/dist/diagnostics/firefox-collector.js +16 -11
- package/dist/media/client.d.ts +2 -1
- package/dist/media/client.d.ts.map +1 -1
- package/dist/media/client.js +16 -5
- package/dist/media/host.d.ts +32 -0
- package/dist/media/host.d.ts.map +1 -0
- package/dist/media/host.js +50 -0
- package/dist/media/locate.d.ts.map +1 -1
- package/dist/media/locate.js +4 -3
- package/dist/native/processes.d.ts.map +1 -1
- package/dist/native/processes.js +7 -3
- package/dist/protocol/files.d.ts +1 -1
- package/dist/protocol/files.d.ts.map +1 -1
- package/dist/protocol/files.js +10 -5
- package/dist/reporters/commands.d.ts +12 -3
- package/dist/reporters/commands.d.ts.map +1 -1
- package/dist/reporters/commands.js +29 -11
- package/dist/reporters/human-card.js +1 -1
- package/dist/reporters/human.d.ts +3 -1
- package/dist/reporters/human.d.ts.map +1 -1
- package/dist/reporters/human.js +8 -8
- package/dist/reporters/style.d.ts +21 -2
- package/dist/reporters/style.d.ts.map +1 -1
- package/dist/reporters/style.js +11 -2
- package/dist/runner/app-server.d.ts +27 -7
- package/dist/runner/app-server.d.ts.map +1 -1
- package/dist/runner/app-server.js +74 -24
- package/dist/runner/child.js +6 -2
- package/dist/runner/media-leftovers.d.ts +7 -3
- package/dist/runner/media-leftovers.d.ts.map +1 -1
- package/dist/runner/media-leftovers.js +27 -6
- package/dist/runner/resources.d.ts +8 -0
- package/dist/runner/resources.d.ts.map +1 -1
- package/dist/runner/resources.js +12 -1
- package/dist/runner/run-session.d.ts.map +1 -1
- package/dist/runner/run-session.js +9 -4
- package/dist/runner/run.d.ts.map +1 -1
- package/dist/runner/run.js +2 -1
- package/dist/runner/target-drivers.d.ts +5 -2
- package/dist/runner/target-drivers.d.ts.map +1 -1
- package/dist/runner/target-drivers.js +10 -1
- package/dist/runner/test-file-process.d.ts +8 -0
- package/dist/runner/test-file-process.d.ts.map +1 -1
- package/dist/runner/test-file-process.js +26 -3
- package/dist/runner/test-pages.d.ts.map +1 -1
- package/dist/runner/test-pages.js +5 -2
- package/dist/shared/environment.d.ts +17 -0
- package/dist/shared/environment.d.ts.map +1 -0
- package/dist/shared/environment.js +27 -0
- package/dist/shared/metadata-process-worker.js +15 -7
- package/dist/shared/metadata-process.d.ts +5 -0
- package/dist/shared/metadata-process.d.ts.map +1 -1
- package/dist/shared/metadata-process.js +36 -6
- package/dist/shared/posix-path.d.ts +12 -0
- package/dist/shared/posix-path.d.ts.map +1 -1
- package/dist/shared/posix-path.js +16 -0
- package/dist/shared/private-file.d.ts +38 -0
- package/dist/shared/private-file.d.ts.map +1 -0
- package/dist/shared/private-file.js +132 -0
- package/dist/shared/process-ownership.d.ts +52 -2
- package/dist/shared/process-ownership.d.ts.map +1 -1
- package/dist/shared/process-ownership.js +104 -11
- package/dist/shared/process-supervisor.d.ts +309 -0
- package/dist/shared/process-supervisor.d.ts.map +1 -0
- package/dist/shared/process-supervisor.js +737 -0
- package/dist/shared/process-system.d.ts +113 -0
- package/dist/shared/process-system.d.ts.map +1 -0
- package/dist/shared/process-system.js +254 -0
- package/dist/shared/regular-file.d.ts +2 -2
- package/dist/shared/regular-file.d.ts.map +1 -1
- package/dist/shared/regular-file.js +19 -2
- package/dist/store/artifacts.d.ts +5 -4
- package/dist/store/artifacts.d.ts.map +1 -1
- package/dist/store/artifacts.js +18 -5
- package/dist/store/run-store.d.ts +5 -2
- package/dist/store/run-store.d.ts.map +1 -1
- package/dist/store/run-store.js +48 -4
- package/media/Cargo.lock +16 -0
- package/media/Cargo.toml +16 -1
- package/media/src/encoder.rs +56 -12
- package/media/src/frame.rs +7 -1
- package/media/src/main.rs +20 -2
- package/media/src/place.rs +230 -11
- package/media/src/process_ownership_windows.rs +1058 -0
- package/media/src/recording.rs +15 -7
- package/media/src/replies.rs +55 -0
- package/media/src/server.rs +72 -2
- package/media/src/store.rs +71 -2
- package/package.json +9 -4
- package/src/cli/install/media-notices.txt +465 -1
- package/supervisor/Cargo.lock +25 -0
- package/supervisor/Cargo.toml +22 -0
- package/supervisor/NOTICES +464 -0
- package/supervisor/build.rs +44 -0
- package/supervisor/src/command.rs +612 -0
- package/supervisor/src/jobs.rs +1650 -0
- package/supervisor/src/main.rs +71 -0
- package/supervisor/src/reply.rs +367 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ There is no Playwright, Puppeteer or Selenium underneath. Retest is early, and t
|
|
|
25
25
|
|
|
26
26
|
## Quick start
|
|
27
27
|
|
|
28
|
-
You need Node.js 24.12 or later, on macOS or
|
|
28
|
+
You need Node.js 24.12 or later, on macOS, Linux or Windows x64. Windows also needs Retest's process supervisor, which [the guide](docs/guide.md#windows) says how to install.
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
npm install --save-dev @rehearsal-labs/retest typescript @types/node
|
|
@@ -72,16 +72,16 @@ npx retest install --list # what is pinned for this machine; downloads nothi
|
|
|
72
72
|
npx retest install firefox # also chromium, webkit and electron
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
On macOS on Apple silicon, Retest pins Chrome for Testing, Firefox
|
|
75
|
+
On macOS on Apple silicon, Retest pins Chrome for Testing, Firefox 158.0.1, WebKit build 2359 and Electron 44.5.1. On Windows x64 it pins Chrome for Testing, Firefox 158.0.1 and Electron 44.5.1. On Linux x64 it pins Chrome for Testing only. A Firefox target finds the installed build by itself. Give a Chromium, WebKit or Electron target the path that `retest install` prints.
|
|
76
76
|
|
|
77
77
|
## What runs today
|
|
78
78
|
|
|
79
79
|
| | |
|
|
80
80
|
| --- | --- |
|
|
81
|
-
| Browsers | Chrome and Chromium. Firefox
|
|
81
|
+
| Browsers | Chrome and Chromium. Firefox 158.0.1 on macOS on Apple silicon and on Windows x64. WebKit build 2359 on macOS on Apple silicon |
|
|
82
82
|
| iOS simulator apps | Find, tap, fill and check elements through WebDriverAgent, built on your Mac from a pinned commit |
|
|
83
83
|
| macOS apps | Find, click, fill and check elements through the macOS runner of appium-mac2-driver |
|
|
84
|
-
| Electron apps | The app's first window, driven like a Chrome page. Checked with Electron 44.5.1 on macOS |
|
|
84
|
+
| Electron apps | The app's first window, driven like a Chrome page. Checked with Electron 44.5.1 on macOS and Windows |
|
|
85
85
|
| One test across platforms | An iOS simulator app, a macOS app and web apps in the same test |
|
|
86
86
|
| AI checks | `test.evaluate` asks a judge you choose whether a screenshot, text or recorded frames meet a requirement |
|
|
87
87
|
| Layout checks | Overlapping elements, cut-off text, an element past the viewport's right edge and sideways scroll, each measured in pixels. Checked on Chrome on macOS |
|
|
@@ -92,8 +92,9 @@ On macOS on Apple silicon, Retest pins Chrome for Testing, Firefox 133, Playwrig
|
|
|
92
92
|
| Mocked responses and drag | Answer a request with your own response or refuse it; drag an element onto another. Checked on Chrome on macOS |
|
|
93
93
|
| Playwright test files | `retest run --playwright` runs `.spec.ts` files unchanged, for the methods [the guide](docs/guide.md#run-playwright-test-files) lists |
|
|
94
94
|
| Linux | Chrome and Chromium only, checked inside Docker |
|
|
95
|
+
| Windows x64 | Chrome, Chromium, Firefox and Electron, with recordings on Chrome. Nothing a run starts outlives Retest. Checked on Windows Server 2025 on GitHub's runner |
|
|
95
96
|
|
|
96
|
-
Not yet: Android apps,
|
|
97
|
+
Not yet: Android apps, Safari, and real phones or tablets. [The guide](docs/guide.md#windows) says what Windows does not run yet.
|
|
97
98
|
|
|
98
99
|
## One test across platforms
|
|
99
100
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-location.d.ts","sourceRoot":"","sources":["../../src/api/source-location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"source-location.d.ts","sourceRoot":"","sources":["../../src/api/source-location.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAc7D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAM1E;AAED,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAOvF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG3F"}
|
|
@@ -5,7 +5,9 @@ import { formatLine } from "../protocol/location.js";
|
|
|
5
5
|
import { relativePosixPath } from "../shared/posix-path.js";
|
|
6
6
|
// The folder holding this copy of Retest: `src` when run from source, `dist` when built.
|
|
7
7
|
const ownDirectory = fileURLToPath(new URL('../', import.meta.url));
|
|
8
|
-
|
|
8
|
+
// A frame names its script by a file URL or an absolute path: a POSIX one, or on Windows a drive or UNC path, as V8
|
|
9
|
+
// writes a frame a source map placed.
|
|
10
|
+
const stackFrame = /(?:\(|at )((?:file:\/\/)?\/[^()]*?|[A-Za-z]:[\\/][^()]*?|\\\\[^()]*?):(\d+):(\d+)\)?$/;
|
|
9
11
|
const maxFrames = 64;
|
|
10
12
|
/**
|
|
11
13
|
* Where the code that called into Retest sits: the first stack frame outside Retest's own files.
|
package/dist/browser/builds.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type BuildEngine = 'chromium' | 'firefox' | 'webkit' | 'electron' | 'webd
|
|
|
5
5
|
/** The engines whose build is a published archive Retest downloads; the native executors are built from source. */
|
|
6
6
|
export type ArchiveEngine = Exclude<BuildEngine, ExecutorName>;
|
|
7
7
|
/** A machine a build is pinned for. */
|
|
8
|
-
export type BuildPlatform = 'mac-arm64' | 'linux-x64';
|
|
8
|
+
export type BuildPlatform = 'mac-arm64' | 'linux-x64' | 'win-x64';
|
|
9
9
|
/** Every engine, in the order lists show them. */
|
|
10
10
|
export declare const buildEngines: readonly BuildEngine[];
|
|
11
11
|
/**
|
|
@@ -38,12 +38,19 @@ export type PinnedLicences = {
|
|
|
38
38
|
readonly inspected: false;
|
|
39
39
|
readonly reason: string;
|
|
40
40
|
};
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* How a published archive is packed: a zip; a macOS disk image holding one app bundle that is copied out; or a Windows
|
|
43
|
+
* installer that is a 7-Zip self-extracting archive, from which only the folder `folder` is unpacked and nothing of the
|
|
44
|
+
* installer is run.
|
|
45
|
+
*/
|
|
42
46
|
export type ArchiveFormat = {
|
|
43
47
|
readonly format: 'zip';
|
|
44
48
|
} | {
|
|
45
49
|
readonly format: 'dmg';
|
|
46
50
|
readonly app: string;
|
|
51
|
+
} | {
|
|
52
|
+
readonly format: 'exe';
|
|
53
|
+
readonly folder: string;
|
|
47
54
|
};
|
|
48
55
|
/** A file of an installed build whose bytes are pinned, beside its executable and licences, and why. */
|
|
49
56
|
export type PinnedFile = {
|
|
@@ -106,6 +113,7 @@ export type BuildPin = ArchivePin | SourcePin;
|
|
|
106
113
|
* The tested set. Chromium is Chrome for Testing, from Google; Firefox is Mozilla's release; WebKit is Playwright's
|
|
107
114
|
* automation build, the only WebKit build with the inspector pipe Retest drives; Electron is the release its fixture app
|
|
108
115
|
* runs on; the two native executors are built from their pinned commits. Only Chromium is pinned for Linux x64; its archive has been inspected, without a Linux browser execution claim.
|
|
116
|
+
* Windows x64 has Chromium, Firefox and Electron, from the same releases, and no WebKit build.
|
|
109
117
|
*/
|
|
110
118
|
export declare const pinnedBuilds: readonly BuildPin[];
|
|
111
119
|
/**
|
|
@@ -114,7 +122,7 @@ export declare const pinnedBuilds: readonly BuildPin[];
|
|
|
114
122
|
* @example buildPlatform('darwin', 'arm64') // 'mac-arm64'
|
|
115
123
|
*/
|
|
116
124
|
export declare function buildPlatform(platform?: NodeJS.Platform, arch?: string): BuildPlatform | undefined;
|
|
117
|
-
/** @example describePlatform('
|
|
125
|
+
/** @example describePlatform('win-x64') // 'Windows x64' */
|
|
118
126
|
export declare function describePlatform(platform: BuildPlatform): string;
|
|
119
127
|
/**
|
|
120
128
|
* The pin of one engine for one platform, if Retest pins one.
|
|
@@ -122,6 +130,12 @@ export declare function describePlatform(platform: BuildPlatform): string;
|
|
|
122
130
|
* @example findPin('webkit', 'linux-x64') // undefined
|
|
123
131
|
*/
|
|
124
132
|
export declare function findPin(engine: BuildEngine, platform: BuildPlatform, pins?: readonly BuildPin[]): BuildPin | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* Why there is no pin of an engine for a platform, as one sentence for `retest install` to refuse with.
|
|
135
|
+
*
|
|
136
|
+
* @example unpinnedMessage('webkit', 'win-x64') // 'Retest does not run WebKit on Windows, so there is no WebKit build to install.'
|
|
137
|
+
*/
|
|
138
|
+
export declare function unpinnedMessage(engine: BuildEngine, platform: BuildPlatform): string;
|
|
125
139
|
/** @example describePin(findPin('electron', 'mac-arm64')) // 'Electron 44.5.1' */
|
|
126
140
|
export declare function describePin(pin: BuildPin): string;
|
|
127
141
|
/**
|
|
@@ -161,11 +175,26 @@ export type CacheFolders = {
|
|
|
161
175
|
};
|
|
162
176
|
/**
|
|
163
177
|
* The cache folders under the user's cache folder: `~/Library/Caches/retest` on macOS, `$XDG_CACHE_HOME/retest` or
|
|
164
|
-
* `~/.cache/retest` on Linux. Undefined without an absolute `HOME`,
|
|
178
|
+
* `~/.cache/retest` on Linux, `%LOCALAPPDATA%\retest` on Windows. Undefined without an absolute `HOME`, or on Windows
|
|
179
|
+
* an absolute `LOCALAPPDATA`, since there is then no user cache folder. Paths are written as `platform` writes them.
|
|
165
180
|
*
|
|
166
181
|
* @example cacheFolders({ HOME: '/Users/ada' }, 'darwin')?.browsers // '/Users/ada/Library/Caches/retest/browsers'
|
|
182
|
+
* @example cacheFolders({ LOCALAPPDATA: 'C:\\Users\\ada\\AppData\\Local' }, 'win32')?.browsers // 'C:\\Users\\ada\\AppData\\Local\\retest\\browsers'
|
|
167
183
|
*/
|
|
168
184
|
export declare function cacheFolders(env: Readonly<Record<string, string | undefined>>, platform?: NodeJS.Platform): CacheFolders | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* The variable `cacheFolders` finds the user's cache folder from, for a message to name when it is not set.
|
|
187
|
+
*
|
|
188
|
+
* @example cacheVariable('win32') // 'LOCALAPPDATA'
|
|
189
|
+
*/
|
|
190
|
+
export declare function cacheVariable(platform?: NodeJS.Platform): 'HOME' | 'LOCALAPPDATA';
|
|
191
|
+
/**
|
|
192
|
+
* An environment variable as the system reads it: by its exact name, and on Windows, where names differ only in case
|
|
193
|
+
* for the same variable, by any spelling of it. `process.env` already reads so on Windows; a copy of it does not.
|
|
194
|
+
*
|
|
195
|
+
* @example environmentVariable({ ProgramFiles: 'C:\\Program Files' }, 'PROGRAMFILES', 'win32') // 'C:\\Program Files'
|
|
196
|
+
*/
|
|
197
|
+
export declare function environmentVariable(env: Readonly<Record<string, string | undefined>>, name: string, platform?: NodeJS.Platform): string | undefined;
|
|
169
198
|
/**
|
|
170
199
|
* The folder one pin's build is installed in. A browser or Electron build is named after its engine, version and
|
|
171
200
|
* platform; an executor build after its name, version and the key of the tested set, as its build step names it.
|
|
@@ -340,7 +369,7 @@ export type InstalledBuildOptions = {
|
|
|
340
369
|
* `retest install` refuses. The message names the folder, what is wrong and how to fix it. Nothing is downloaded,
|
|
341
370
|
* and nothing is thrown: a folder that cannot be read is damaged.
|
|
342
371
|
*
|
|
343
|
-
* @example await installedBuild('firefox', process.env) // { state: 'damaged', message: 'Firefox
|
|
372
|
+
* @example await installedBuild('firefox', process.env) // { state: 'damaged', message: 'Firefox 158.0.1 … in … is not usable: …' }
|
|
344
373
|
*/
|
|
345
374
|
export declare function installedBuild(engine: ArchiveEngine, env: Readonly<Record<string, string | undefined>>, options?: InstalledBuildOptions): Promise<InstalledBuild>;
|
|
346
375
|
/** A pinned build as a driver reads it; see `installedBuild`. */
|
|
@@ -359,7 +388,7 @@ export type InstalledBuild = {
|
|
|
359
388
|
* installed as its pin and record say; undefined otherwise, which a damaged build is too. A driver that must tell a
|
|
360
389
|
* damaged build from a missing one asks `installedBuild`. A target's own `executablePath` always wins over it.
|
|
361
390
|
*
|
|
362
|
-
* @example await installedExecutable('firefox', process.env) // '/Users/ada/Library/Caches/retest/browsers/firefox-
|
|
391
|
+
* @example await installedExecutable('firefox', process.env) // '/Users/ada/Library/Caches/retest/browsers/firefox-158.0.1-mac-arm64/build/Firefox.app/Contents/MacOS/firefox'
|
|
363
392
|
*/
|
|
364
393
|
export declare function installedExecutable(engine: ArchiveEngine, env: Readonly<Record<string, string | undefined>>, options?: InstalledBuildOptions): Promise<string | undefined>;
|
|
365
394
|
//# sourceMappingURL=builds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builds.d.ts","sourceRoot":"","sources":["../../src/browser/builds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAgB5D,gGAAgG;AAChG,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAEpG,mHAAmH;AACnH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;AAE9D,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"builds.d.ts","sourceRoot":"","sources":["../../src/browser/builds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAgB5D,gGAAgG;AAChG,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAEpG,mHAAmH;AACnH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;AAE9D,uCAAuC;AACvC,MAAM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C,CAGpL"}
|
package/dist/browser/builds.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { closeSync, constants, fstatSync, lstatSync, openSync, readSync } from 'node:fs';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import { access, lstat, readdir, readlink } from 'node:fs/promises';
|
|
4
|
-
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
4
|
+
import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep, win32 } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { folderChecksum, nativePins, pinKey, readBuildRecord } from "../native/executors.js";
|
|
7
7
|
import { errorMessage } from "../protocol/failures.js";
|
|
@@ -13,6 +13,8 @@ export const buildEngines = ['chromium', 'firefox', 'webkit', 'electron', 'webdr
|
|
|
13
13
|
const chromiumVersion = '153.0.8010.12';
|
|
14
14
|
const chromeForTesting = 'https://storage.googleapis.com/chrome-for-testing-public';
|
|
15
15
|
const macChrome = 'chrome-mac-arm64/Google Chrome for Testing.app';
|
|
16
|
+
const firefoxReleases = 'https://archive.mozilla.org/pub/firefox/releases';
|
|
17
|
+
const electronReleases = 'https://github.com/electron/electron/releases/download';
|
|
16
18
|
// Authorized Linux archive observations, retained beside the pin table without adding unsupported install pins.
|
|
17
19
|
// Firefox 133.0.3: https://archive.mozilla.org/pub/firefox/releases/133.0.3/linux-x86_64/en-US/firefox-133.0.3.tar.bz2
|
|
18
20
|
// 89_495_132 bytes; SHA-256 43713e238d0153fdbf1ab46dd76c6b01ab83fae197b5dc3a95087f51907ba44d.
|
|
@@ -76,6 +78,7 @@ function executorPin(engine) {
|
|
|
76
78
|
* The tested set. Chromium is Chrome for Testing, from Google; Firefox is Mozilla's release; WebKit is Playwright's
|
|
77
79
|
* automation build, the only WebKit build with the inspector pipe Retest drives; Electron is the release its fixture app
|
|
78
80
|
* runs on; the two native executors are built from their pinned commits. Only Chromium is pinned for Linux x64; its archive has been inspected, without a Linux browser execution claim.
|
|
81
|
+
* Windows x64 has Chromium, Firefox and Electron, from the same releases, and no WebKit build.
|
|
79
82
|
*/
|
|
80
83
|
export const pinnedBuilds = [
|
|
81
84
|
{
|
|
@@ -114,23 +117,58 @@ export const pinnedBuilds = [
|
|
|
114
117
|
},
|
|
115
118
|
provenance: 'Archive size and checksum, executable and both licence files read from the Google publisher download. Linux browser execution and installation remain unverified.',
|
|
116
119
|
},
|
|
120
|
+
{
|
|
121
|
+
kind: 'archive',
|
|
122
|
+
engine: 'chromium',
|
|
123
|
+
title: 'Chrome for Testing',
|
|
124
|
+
version: chromiumVersion,
|
|
125
|
+
platform: 'win-x64',
|
|
126
|
+
archive: { format: 'zip', url: `${chromeForTesting}/${chromiumVersion}/win64/chrome-win64.zip`, size: 205_123_748, sha256: '415968b02065d4a9e2c10b85f0ae9f489b8fba500e94d9d0a7b7c4852a7234c1' },
|
|
127
|
+
executable: { path: 'chrome-win64/chrome.exe', sha256: '9b07943f834485b43c9d54caea2951c78715f9f07070a80ab6658465ebd3e711' },
|
|
128
|
+
files: [],
|
|
129
|
+
licences: {
|
|
130
|
+
inspected: true,
|
|
131
|
+
files: [
|
|
132
|
+
{ path: 'chrome-win64/ABOUT', title: "the build's notice, which names chrome://credits, where the licences compiled into the browser are listed", licence: 'BSD-3-Clause and the licences at chrome://credits', sha256: '122b32f3ee3f1e8d65c774f5257fc6cc2127b666148ced0ce2efa3ea57e1d93c', published: true },
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
provenance: 'Archive size and checksum, executable and notice read from the Google publisher download of 21 October 2026, here and on a Windows Server 2025 machine, whose own tar.exe unpacks the same files as unzip and libarchive bsdtar do on macOS. The Windows build carries no Widevine module, so there is no Widevine licence to pin. Installed by retest install and run on Windows Server 2025 x64, on a GitHub windows-2025 runner, in the 0.3.0 CI matrix.',
|
|
136
|
+
},
|
|
117
137
|
{
|
|
118
138
|
kind: 'archive',
|
|
119
139
|
engine: 'firefox',
|
|
120
140
|
title: 'Firefox',
|
|
121
|
-
version: '
|
|
122
|
-
build: '
|
|
141
|
+
version: '158.0.1',
|
|
142
|
+
build: '20261019185856',
|
|
123
143
|
platform: 'mac-arm64',
|
|
124
|
-
archive: { format: 'dmg', app: 'Firefox.app', url:
|
|
125
|
-
executable: { path: 'Firefox.app/Contents/MacOS/firefox', sha256: '
|
|
144
|
+
archive: { format: 'dmg', app: 'Firefox.app', url: `${firefoxReleases}/158.0.1/mac/en-US/Firefox%20158.0.1.dmg`, size: 165_038_147, sha256: '1d7aa96b51fc9110185047de18228ac87238fba5e42bba53c9d696f88878cba6', checksums: `${firefoxReleases}/158.0.1/SHA256SUMS` },
|
|
145
|
+
executable: { path: 'Firefox.app/Contents/MacOS/firefox', sha256: '0b406e1d7c88d48c13f6389e05f22dedcb6ab99f06e539150a49e4ba995d0386' },
|
|
126
146
|
files: [],
|
|
127
147
|
licences: {
|
|
128
148
|
inspected: true,
|
|
129
149
|
files: [
|
|
130
|
-
{ path: 'Firefox.app/Contents/Resources/omni.ja', title: "the archive that holds Firefox's about:license page, chrome/toolkit/content/global/license.html", licence: 'MPL-2.0 and the licences at about:license', sha256: '
|
|
150
|
+
{ path: 'Firefox.app/Contents/Resources/omni.ja', title: "the archive that holds Firefox's about:license page, chrome/toolkit/content/global/license.html", licence: 'MPL-2.0 and the licences at about:license', sha256: 'dbfea026a6155b5c8794f55b2e54b19b0120353379a18e343dad381aa84228f5', published: true },
|
|
131
151
|
],
|
|
132
152
|
},
|
|
133
|
-
provenance:
|
|
153
|
+
provenance: "Archive size and checksum from Mozilla's download of 22 October 2026, which matched the release's SHA256SUMS. The image holds Firefox.app at its root, copied to Firefox.app under the installed build. Executable and omni.ja checksums read from the mounted image; its application.ini names Firefox 158.0.1 build 20261019185856.",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
kind: 'archive',
|
|
157
|
+
engine: 'firefox',
|
|
158
|
+
title: 'Firefox',
|
|
159
|
+
version: '158.0.1',
|
|
160
|
+
build: '20261019185856',
|
|
161
|
+
platform: 'win-x64',
|
|
162
|
+
archive: { format: 'exe', folder: 'core', url: `${firefoxReleases}/158.0.1/win64/en-US/Firefox%20Setup%20158.0.1.exe`, size: 94_890_968, sha256: '3259a2f8508e58cf2e383b6c99bfc64d6ddc86d1407b7c2f86f660af955b5d10', checksums: `${firefoxReleases}/158.0.1/SHA256SUMS` },
|
|
163
|
+
executable: { path: 'core/firefox.exe', sha256: '76732d4e43c864194660c671c52ecf4bad89e43b666d9a0acf89cd4b692ced9b' },
|
|
164
|
+
files: [],
|
|
165
|
+
licences: {
|
|
166
|
+
inspected: true,
|
|
167
|
+
files: [
|
|
168
|
+
{ path: 'core/omni.ja', title: "the archive that holds Firefox's about:license page, chrome/toolkit/content/global/license.html", licence: 'MPL-2.0 and the licences at about:license', sha256: '42f976ac57103698320728a9c134ec8e710ab9a3c48d127ea3e115e1b3b211c3', published: true },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
provenance: "Archive size and checksum from Mozilla's download of 22 October 2026, which matched the release's SHA256SUMS. Mozilla publishes no zip of a Windows release, only this installer: a 7-Zip archive behind a self-extracting stub that Retest never runs. The archive holds setup.exe and the core folder, which is the whole of Firefox and is unpacked alone. Executable and omni.ja checksums read from that folder as libarchive bsdtar unpacked it on macOS, and the same bytes again after retest install unpacked it with tar.exe on a Windows Server 2025 machine; its application.ini names Firefox 158.0.1 build 20261019185856.",
|
|
134
172
|
},
|
|
135
173
|
{
|
|
136
174
|
kind: 'archive',
|
|
@@ -171,6 +209,25 @@ export const pinnedBuilds = [
|
|
|
171
209
|
treeSha256: 'f94a2b748b5f3e41b0ff1938ebd02052bb8af4cf037c2d24d21ffd51c5f7d7b4',
|
|
172
210
|
provenance: "Archive size and checksum from a download of the official release, which matched the release's SHASUMS256.txt; executable, licence and tree checksums read from that archive unpacked with ditto in ~/Library/Caches/retest-proofs/electron/44.5.1.",
|
|
173
211
|
},
|
|
212
|
+
{
|
|
213
|
+
kind: 'archive',
|
|
214
|
+
engine: 'electron',
|
|
215
|
+
title: 'Electron',
|
|
216
|
+
version: '44.5.1',
|
|
217
|
+
platform: 'win-x64',
|
|
218
|
+
archive: { format: 'zip', url: `${electronReleases}/v44.5.1/electron-v44.5.1-win32-x64.zip`, size: 157_998_329, sha256: '9b382492dcfee91f8f9e92c91f7972550a1b95d2299cac72279dab33a600d7db', checksums: `${electronReleases}/v44.5.1/SHASUMS256.txt` },
|
|
219
|
+
executable: { path: 'electron.exe', sha256: '49b61a030a520fc36a4b8fa5cce53fb4e935a7bdbbe4b80e9222f598e49cc7fa' },
|
|
220
|
+
files: [],
|
|
221
|
+
licences: {
|
|
222
|
+
inspected: true,
|
|
223
|
+
files: [
|
|
224
|
+
{ path: 'LICENSE', title: "Electron's licence", licence: 'MIT', sha256: '5154e165bd6c2cc0cfbcd8916498c7abab0497923bafcd5cb07673fe8480087d', published: true },
|
|
225
|
+
{ path: 'LICENSES.chromium.html', title: 'the licences of Chromium and the libraries compiled into it', licence: 'BSD-3-Clause and the licences it lists', sha256: '7b328b8c7463ac9bfc7dc648c751533517c8441a0b5b21047d6c0b2620e60d70', published: true },
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
treeSha256: '0a50669f7461801821ab9d01ee2193748d36f45b6235bcfd648ed9a44a175e30',
|
|
229
|
+
provenance: "Archive size and checksum from a download of the official release on 21 October 2026, which matched the release's SHASUMS256.txt, here and on a Windows Server 2025 machine. Executable, licence and tree checksums read on that machine from the archive unpacked with its own tar.exe; unzip and libarchive bsdtar on macOS unpack the same files. Installed by retest install and run on Windows Server 2025 x64, on a GitHub windows-2025 runner, in the 0.3.0 CI matrix.",
|
|
230
|
+
},
|
|
174
231
|
executorPin('webdriveragent'),
|
|
175
232
|
executorPin('mac2'),
|
|
176
233
|
];
|
|
@@ -184,11 +241,14 @@ export function buildPlatform(platform = process.platform, arch = process.arch)
|
|
|
184
241
|
return 'mac-arm64';
|
|
185
242
|
if (platform === 'linux' && arch === 'x64')
|
|
186
243
|
return 'linux-x64';
|
|
244
|
+
if (platform === 'win32' && arch === 'x64')
|
|
245
|
+
return 'win-x64';
|
|
187
246
|
return undefined;
|
|
188
247
|
}
|
|
189
|
-
|
|
248
|
+
const platformNames = { 'mac-arm64': 'macOS arm64', 'linux-x64': 'Linux x64', 'win-x64': 'Windows x64' };
|
|
249
|
+
/** @example describePlatform('win-x64') // 'Windows x64' */
|
|
190
250
|
export function describePlatform(platform) {
|
|
191
|
-
return platform
|
|
251
|
+
return platformNames[platform];
|
|
192
252
|
}
|
|
193
253
|
/**
|
|
194
254
|
* The pin of one engine for one platform, if Retest pins one.
|
|
@@ -198,6 +258,16 @@ export function describePlatform(platform) {
|
|
|
198
258
|
export function findPin(engine, platform, pins = pinnedBuilds) {
|
|
199
259
|
return pins.find((pin) => pin.engine === engine && pin.platform === platform);
|
|
200
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Why there is no pin of an engine for a platform, as one sentence for `retest install` to refuse with.
|
|
263
|
+
*
|
|
264
|
+
* @example unpinnedMessage('webkit', 'win-x64') // 'Retest does not run WebKit on Windows, so there is no WebKit build to install.'
|
|
265
|
+
*/
|
|
266
|
+
export function unpinnedMessage(engine, platform) {
|
|
267
|
+
if (engine === 'webkit' && platform === 'win-x64')
|
|
268
|
+
return 'Retest does not run WebKit on Windows, so there is no WebKit build to install.';
|
|
269
|
+
return `Retest pins no ${engine} build for ${describePlatform(platform)}.`;
|
|
270
|
+
}
|
|
201
271
|
/** @example describePin(findPin('electron', 'mac-arm64')) // 'Electron 44.5.1' */
|
|
202
272
|
export function describePin(pin) {
|
|
203
273
|
const build = pin.kind === 'archive' && pin.build !== undefined ? ` (build ${pin.build})` : '';
|
|
@@ -275,17 +345,46 @@ export function readBundledLicence(file) {
|
|
|
275
345
|
}
|
|
276
346
|
/**
|
|
277
347
|
* The cache folders under the user's cache folder: `~/Library/Caches/retest` on macOS, `$XDG_CACHE_HOME/retest` or
|
|
278
|
-
* `~/.cache/retest` on Linux. Undefined without an absolute `HOME`,
|
|
348
|
+
* `~/.cache/retest` on Linux, `%LOCALAPPDATA%\retest` on Windows. Undefined without an absolute `HOME`, or on Windows
|
|
349
|
+
* an absolute `LOCALAPPDATA`, since there is then no user cache folder. Paths are written as `platform` writes them.
|
|
279
350
|
*
|
|
280
351
|
* @example cacheFolders({ HOME: '/Users/ada' }, 'darwin')?.browsers // '/Users/ada/Library/Caches/retest/browsers'
|
|
352
|
+
* @example cacheFolders({ LOCALAPPDATA: 'C:\\Users\\ada\\AppData\\Local' }, 'win32')?.browsers // 'C:\\Users\\ada\\AppData\\Local\\retest\\browsers'
|
|
281
353
|
*/
|
|
282
354
|
export function cacheFolders(env, platform = process.platform) {
|
|
355
|
+
if (platform === 'win32') {
|
|
356
|
+
const local = environmentVariable(env, cacheVariable(platform), platform);
|
|
357
|
+
if (local === undefined || !win32.isAbsolute(local))
|
|
358
|
+
return undefined;
|
|
359
|
+
return { browsers: win32.join(local, 'retest', 'browsers'), executors: win32.join(local, 'retest', 'native-executors') };
|
|
360
|
+
}
|
|
283
361
|
const home = env['HOME'];
|
|
284
|
-
if (home === undefined || !isAbsolute(home))
|
|
362
|
+
if (home === undefined || !posix.isAbsolute(home))
|
|
285
363
|
return undefined;
|
|
286
364
|
const xdg = env['XDG_CACHE_HOME'];
|
|
287
|
-
const root = platform === 'darwin' ? join(home, 'Library', 'Caches') : xdg !== undefined && isAbsolute(xdg) ? xdg : join(home, '.cache');
|
|
288
|
-
return { browsers: join(root, 'retest', 'browsers'), executors: join(root, 'retest', 'native-executors') };
|
|
365
|
+
const root = platform === 'darwin' ? posix.join(home, 'Library', 'Caches') : xdg !== undefined && posix.isAbsolute(xdg) ? xdg : posix.join(home, '.cache');
|
|
366
|
+
return { browsers: posix.join(root, 'retest', 'browsers'), executors: posix.join(root, 'retest', 'native-executors') };
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* The variable `cacheFolders` finds the user's cache folder from, for a message to name when it is not set.
|
|
370
|
+
*
|
|
371
|
+
* @example cacheVariable('win32') // 'LOCALAPPDATA'
|
|
372
|
+
*/
|
|
373
|
+
export function cacheVariable(platform = process.platform) {
|
|
374
|
+
return platform === 'win32' ? 'LOCALAPPDATA' : 'HOME';
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* An environment variable as the system reads it: by its exact name, and on Windows, where names differ only in case
|
|
378
|
+
* for the same variable, by any spelling of it. `process.env` already reads so on Windows; a copy of it does not.
|
|
379
|
+
*
|
|
380
|
+
* @example environmentVariable({ ProgramFiles: 'C:\\Program Files' }, 'PROGRAMFILES', 'win32') // 'C:\\Program Files'
|
|
381
|
+
*/
|
|
382
|
+
export function environmentVariable(env, name, platform = process.platform) {
|
|
383
|
+
const exact = env[name];
|
|
384
|
+
if (exact !== undefined || platform !== 'win32')
|
|
385
|
+
return exact;
|
|
386
|
+
const wanted = name.toUpperCase();
|
|
387
|
+
return Object.entries(env).find(([key]) => key.toUpperCase() === wanted)?.[1];
|
|
289
388
|
}
|
|
290
389
|
/**
|
|
291
390
|
* The folder one pin's build is installed in. A browser or Electron build is named after its engine, version and
|
|
@@ -315,7 +414,7 @@ const installedRecordSchema = s.object({
|
|
|
315
414
|
schemaVersion: s.literal(1),
|
|
316
415
|
engine: s.enum(['chromium', 'firefox', 'webkit', 'electron']),
|
|
317
416
|
version: s.string(),
|
|
318
|
-
platform: s.enum(['mac-arm64', 'linux-x64']),
|
|
417
|
+
platform: s.enum(['mac-arm64', 'linux-x64', 'win-x64']),
|
|
319
418
|
source: s.string(),
|
|
320
419
|
sourceCode: s.optional(s.object({ repository: s.string(), revision: s.string(), patches: s.string() })),
|
|
321
420
|
fetchedFrom: s.string(),
|
|
@@ -483,7 +582,7 @@ export async function inspectBuilds(platform, folders, options = {}, pins = pinn
|
|
|
483
582
|
* `retest install` refuses. The message names the folder, what is wrong and how to fix it. Nothing is downloaded,
|
|
484
583
|
* and nothing is thrown: a folder that cannot be read is damaged.
|
|
485
584
|
*
|
|
486
|
-
* @example await installedBuild('firefox', process.env) // { state: 'damaged', message: 'Firefox
|
|
585
|
+
* @example await installedBuild('firefox', process.env) // { state: 'damaged', message: 'Firefox 158.0.1 … in … is not usable: …' }
|
|
487
586
|
*/
|
|
488
587
|
export async function installedBuild(engine, env, options = {}) {
|
|
489
588
|
const platform = 'platform' in options ? options.platform : buildPlatform();
|
|
@@ -511,7 +610,7 @@ export async function installedBuild(engine, env, options = {}) {
|
|
|
511
610
|
* installed as its pin and record say; undefined otherwise, which a damaged build is too. A driver that must tell a
|
|
512
611
|
* damaged build from a missing one asks `installedBuild`. A target's own `executablePath` always wins over it.
|
|
513
612
|
*
|
|
514
|
-
* @example await installedExecutable('firefox', process.env) // '/Users/ada/Library/Caches/retest/browsers/firefox-
|
|
613
|
+
* @example await installedExecutable('firefox', process.env) // '/Users/ada/Library/Caches/retest/browsers/firefox-158.0.1-mac-arm64/build/Firefox.app/Contents/MacOS/firefox'
|
|
515
614
|
*/
|
|
516
615
|
export async function installedExecutable(engine, env, options = {}) {
|
|
517
616
|
const build = await installedBuild(engine, env, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/browser/cdp/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,iEAAiE;IACjE,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,sDAAsD;IACtD,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,yFAAyF;IACzF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,6EAA6E;IAC7E,QAAQ,IAAI,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,C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,EAAE,QAAQ,EAAE,EAAE,WAAW;IAkB/C,qFAAqF;IACrF,MAAM,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAUzC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;IAgBnC,KAAK,IAAI,IAAI;CAqDd"}
|
|
@@ -12,20 +12,20 @@ export class PipeTransport {
|
|
|
12
12
|
constructor({ readable, writable }) {
|
|
13
13
|
this.#readable = readable;
|
|
14
14
|
this.#writable = writable;
|
|
15
|
+
// A pipe that closes without Retest closing it means the browser went, whichever of its two ends Node hears of first,
|
|
16
|
+
// so a killed browser is told of in one sentence however the ends race.
|
|
15
17
|
readable.on('end', () => this.#end('the browser closed the pipe'));
|
|
16
18
|
readable.on('close', () => this.#end('the browser closed the pipe'));
|
|
17
19
|
readable.on('error', (error) => this.#end(`reading from the browser failed: ${error.message}`));
|
|
18
|
-
writable.on('close', () => this.#end('the
|
|
20
|
+
writable.on('close', () => this.#end('the browser closed the pipe'));
|
|
19
21
|
writable.on('error', (error) => this.#end(`writing to the browser failed: ${error.message}`));
|
|
20
22
|
writable.on('drain', () => {
|
|
21
23
|
this.#blocked = false;
|
|
22
24
|
this.#flush();
|
|
23
25
|
});
|
|
24
26
|
// A stream that ended before this point never emits its events again.
|
|
25
|
-
if (readable.destroyed || readable.readableEnded)
|
|
27
|
+
if (readable.destroyed || readable.readableEnded || writable.destroyed || writable.writableEnded)
|
|
26
28
|
this.#end('the browser closed the pipe');
|
|
27
|
-
else if (writable.destroyed || writable.writableEnded)
|
|
28
|
-
this.#end('the pipe to the browser closed');
|
|
29
29
|
}
|
|
30
30
|
/** Starts reading. Nothing is read before this, so no message can arrive unheard. */
|
|
31
31
|
listen(handlers) {
|
|
@@ -112,4 +112,27 @@ export declare function stillThereMessage(groupId: number, stats: () => readonly
|
|
|
112
112
|
export declare function signalGroup(pgid: number, signal: NodeJS.Signals | 0): boolean;
|
|
113
113
|
/** Signals a descendant only after this process recorded it beneath the launched browser. */
|
|
114
114
|
export declare function signalRecordedProcess(browserPid: number, pid: number, signal: NodeJS.Signals): void;
|
|
115
|
+
/**
|
|
116
|
+
* Waits for the output to close. A timer can fire before I/O that is already waiting has been read, when the main thread
|
|
117
|
+
* was busy with other work such as synchronous process readings, so the clock alone is no proof the output is still
|
|
118
|
+
* open: on a busy host every healthy close failed so. When the bound passes, waiting I/O is read first, then the output
|
|
119
|
+
* is judged by whether anything can still write to it. Once nothing can, Retest's own writing gets its own bound.
|
|
120
|
+
* If a writer remains after verified owned shutdown, an output with safe reader finish support may stop its local
|
|
121
|
+
* readers and flush accepted bytes and queued writes within that same writing bound. This does not claim remote
|
|
122
|
+
* EOF or collect bytes an inherited writer sends later. An output without this support still fails and is canceled.
|
|
123
|
+
*/
|
|
124
|
+
export declare function outputWithin(output: BrowserOutput, timeoutMs: number, confirmedGone: () => Promise<boolean>): Promise<string[]>;
|
|
125
|
+
/** How long an exit hook on Windows asks again to remove a folder whose processes it confirmed gone. */
|
|
126
|
+
export declare const exitRemovalMs: number;
|
|
127
|
+
/**
|
|
128
|
+
* Removes a folder from an exit hook on Windows, where a folder whose files processes just ended were using refuses
|
|
129
|
+
* removal for a moment after they left their job, and the synchronous removal does not wait: it is asked again, a poll
|
|
130
|
+
* apart, until the deadline.
|
|
131
|
+
*/
|
|
132
|
+
export declare function removeOnceFree(folder: string, deadline: Deadline): void;
|
|
133
|
+
/**
|
|
134
|
+
* Whether a group is gone, for an exit hook, which cannot await. Processes just sent SIGKILL are still exiting when they
|
|
135
|
+
* are first read, so the group is read again, a poll apart, until it is gone or the deadline passes.
|
|
136
|
+
*/
|
|
137
|
+
export declare function groupEndsNow(ownership: OwnedProcessGroup, deadline: Deadline): boolean;
|
|
115
138
|
//# sourceMappingURL=chromium-process.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromium-process.d.ts","sourceRoot":"","sources":["../../src/browser/chromium-process.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY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