peachsim 0.1.2238 → 0.1.2242
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/cli/bridge-flow-runner.ts +10 -9
- package/cli/commands/inspect/settling.ts +491 -506
- package/cli/commands/platform.ts +2 -0
- package/cli/drivers/playwright-provisioning.ts +160 -37
- package/cli/internal-child.ts +5 -79
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +115 -89
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +494 -510
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +101 -75
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +119 -93
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +492 -508
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +7 -8
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +487 -503
- package/dist-lib/sdk.mjs +487 -503
- package/dist-lib/skills.cjs +1327 -1235
- package/dist-lib/swift-compile.cjs +46 -27
- package/dist-lib/swift-compile.mjs +42 -23
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +89 -64
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/secureItemHostContract.d.ts +5 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +14 -0
- package/dist-types/packages/peach-globals/src/nativeSurfaceContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/secure-item-store.d.ts +2 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/native-static-libraries.ts +20 -20
- package/src/native-swift-slices.ts +1 -0
- package/src/nitro-adapter.lock.json +253 -253
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +10 -3
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-host.ts +2 -1
- package/src/swift-shared-sdk.ts +10 -1
- package/src/swift-standins.ts +5 -2
- package/src/swift-submit.ts +3 -1
- package/src/swift-wasm-prune.ts +23 -14
- package/src/turbo-runtime.lock.json +22 -22
package/cli/commands/platform.ts
CHANGED
|
@@ -216,9 +216,11 @@ export async function runPlatformCommand(
|
|
|
216
216
|
// leftover `--*` tokens are not bundle targets. parse the same flags `open`
|
|
217
217
|
// consumes, then refuse anything still starting with `-`.
|
|
218
218
|
const { parseBridgeCliArgs } = await import('../ws-bridge')
|
|
219
|
+
const { STREAM_FLAG } = await import('./stream')
|
|
219
220
|
const leftover = parseBridgeCliArgs(args, {
|
|
220
221
|
port: opts.port,
|
|
221
222
|
stripBooleanFlags: [
|
|
223
|
+
STREAM_FLAG,
|
|
222
224
|
'--new',
|
|
223
225
|
'--headless',
|
|
224
226
|
'--headed',
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
accessSync,
|
|
4
|
+
constants,
|
|
5
|
+
existsSync,
|
|
6
|
+
mkdirSync,
|
|
7
|
+
readdirSync,
|
|
8
|
+
readFileSync,
|
|
9
|
+
renameSync,
|
|
10
|
+
writeFileSync,
|
|
11
|
+
} from 'node:fs'
|
|
3
12
|
import { createRequire } from 'node:module'
|
|
4
|
-
import { dirname, join } from 'node:path'
|
|
13
|
+
import { basename, dirname, join, relative, resolve } from 'node:path'
|
|
5
14
|
import { installVerifiedTarball } from '@contrast/runtime-delivery'
|
|
6
|
-
import { playwrightCoreDir } from '../../src/home-paths'
|
|
15
|
+
import { cacheDir, playwrightCoreDir } from '../../src/home-paths'
|
|
7
16
|
import { isRecord } from '../../src/is-record'
|
|
8
17
|
import { launchReapedChrome, softwareChromeAllowed } from '../../src/reap-browser'
|
|
9
18
|
import { RNX_INTERNAL_CHILDREN, RNX_INTERNAL_COMMAND } from '../internal-child-contract'
|
|
@@ -107,52 +116,167 @@ type BrowserProbeResult =
|
|
|
107
116
|
| { ok: true; executablePath: string; exists: boolean }
|
|
108
117
|
| { ok: false; message: string }
|
|
109
118
|
|
|
110
|
-
|
|
119
|
+
// the package's own chromium path follows from the package, the platform and
|
|
120
|
+
// the environment it reads as it loads, and naming it costs a child process
|
|
121
|
+
// that loads the package, so each answer is kept in the peach cache.
|
|
122
|
+
const CHROMIUM_PATHS_KEPT = 16
|
|
123
|
+
|
|
124
|
+
function chromiumPathsFile(): string {
|
|
125
|
+
return join(cacheDir(), 'playwright-chromium-paths.json')
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function readChromiumPaths(): Record<string, string> {
|
|
129
|
+
let parsed: unknown
|
|
130
|
+
try {
|
|
131
|
+
parsed = JSON.parse(readFileSync(chromiumPathsFile(), 'utf8'))
|
|
132
|
+
} catch {
|
|
133
|
+
return {}
|
|
134
|
+
}
|
|
135
|
+
if (!isRecord(parsed)) return {}
|
|
136
|
+
const paths: Record<string, string> = {}
|
|
137
|
+
for (const [key, value] of Object.entries(parsed))
|
|
138
|
+
if (typeof value === 'string') paths[key] = value
|
|
139
|
+
return paths
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function packageChromiumPath(
|
|
111
143
|
resolved: ResolvedPlaywright,
|
|
112
144
|
env: NodeJS.ProcessEnv,
|
|
113
|
-
):
|
|
145
|
+
): { ok: true; path: string } | { ok: false; message: string } {
|
|
146
|
+
const key = JSON.stringify([
|
|
147
|
+
resolved.modulePath,
|
|
148
|
+
resolved.version,
|
|
149
|
+
process.platform,
|
|
150
|
+
process.arch,
|
|
151
|
+
Object.entries(env)
|
|
152
|
+
.filter(
|
|
153
|
+
([name]) =>
|
|
154
|
+
name.startsWith('PLAYWRIGHT_') ||
|
|
155
|
+
['HOME', 'XDG_CACHE_HOME', 'LOCALAPPDATA', 'INIT_CWD'].includes(name),
|
|
156
|
+
)
|
|
157
|
+
.sort(([a], [b]) => a.localeCompare(b)),
|
|
158
|
+
])
|
|
159
|
+
const known = readChromiumPaths()
|
|
160
|
+
const cached = known[key]
|
|
161
|
+
if (cached) return { ok: true, path: cached }
|
|
114
162
|
const self = rnxSelfInvocation()
|
|
115
163
|
const probe = spawnSync(
|
|
116
164
|
self.executable,
|
|
117
165
|
[...self.prefixArgs, RNX_INTERNAL_COMMAND, RNX_INTERNAL_CHILDREN.playwrightProbe],
|
|
118
166
|
{
|
|
119
|
-
env: {
|
|
120
|
-
...env,
|
|
121
|
-
SOOTSIM_PW_MODULE: resolved.modulePath,
|
|
122
|
-
},
|
|
167
|
+
env: { ...env, SOOTSIM_PW_MODULE: resolved.modulePath },
|
|
123
168
|
encoding: 'utf8',
|
|
124
169
|
timeout: 30_000,
|
|
125
170
|
},
|
|
126
171
|
)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
172
|
+
const failed = (detail: string) => ({
|
|
173
|
+
ok: false as const,
|
|
174
|
+
message: `could not inspect ${resolved.spec}@${resolved.version} chromium: ${detail}`,
|
|
175
|
+
})
|
|
176
|
+
if (probe.status !== 0)
|
|
177
|
+
return failed((probe.stderr || probe.error?.message || 'browser probe failed').trim())
|
|
178
|
+
let parsed: unknown
|
|
134
179
|
try {
|
|
135
|
-
|
|
136
|
-
if (
|
|
137
|
-
!isRecord(parsed) ||
|
|
138
|
-
typeof parsed.executablePath !== 'string' ||
|
|
139
|
-
typeof parsed.exists !== 'boolean'
|
|
140
|
-
) {
|
|
141
|
-
throw new Error('probe returned an invalid result')
|
|
142
|
-
}
|
|
143
|
-
return {
|
|
144
|
-
ok: true,
|
|
145
|
-
executablePath: parsed.executablePath,
|
|
146
|
-
exists: parsed.exists && existsSync(parsed.executablePath),
|
|
147
|
-
}
|
|
180
|
+
parsed = JSON.parse(probe.stdout)
|
|
148
181
|
} catch (error) {
|
|
149
|
-
return
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
182
|
+
return failed(error instanceof Error ? error.message : String(error))
|
|
183
|
+
}
|
|
184
|
+
if (!isRecord(parsed) || typeof parsed.expectedPath !== 'string')
|
|
185
|
+
return failed('probe returned an invalid result')
|
|
186
|
+
delete known[key]
|
|
187
|
+
known[key] = parsed.expectedPath
|
|
188
|
+
const keys = Object.keys(known)
|
|
189
|
+
for (const old of keys.slice(0, Math.max(0, keys.length - CHROMIUM_PATHS_KEPT)))
|
|
190
|
+
delete known[old]
|
|
191
|
+
mkdirSync(cacheDir(), { recursive: true })
|
|
192
|
+
const staged = `${chromiumPathsFile()}.${process.pid}`
|
|
193
|
+
writeFileSync(staged, JSON.stringify(known))
|
|
194
|
+
renameSync(staged, chromiumPathsFile())
|
|
195
|
+
return { ok: true, path: parsed.expectedPath }
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function isExecutable(path: string): boolean {
|
|
199
|
+
try {
|
|
200
|
+
accessSync(path, constants.X_OK)
|
|
201
|
+
return true
|
|
202
|
+
} catch {
|
|
203
|
+
return false
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/** an explicit executable, else the newest installed chromium (or headless
|
|
208
|
+
* shell) in the resolved package's cache. */
|
|
209
|
+
function probeBrowser(
|
|
210
|
+
resolved: ResolvedPlaywright,
|
|
211
|
+
env: NodeJS.ProcessEnv,
|
|
212
|
+
shell: boolean,
|
|
213
|
+
): BrowserProbeResult {
|
|
214
|
+
const override = env.PEACH_CHROMIUM_EXECUTABLE
|
|
215
|
+
if (override) {
|
|
216
|
+
const executablePath = resolve(override)
|
|
217
|
+
if (!isExecutable(executablePath))
|
|
218
|
+
return {
|
|
219
|
+
ok: false,
|
|
220
|
+
message: `PEACH_CHROMIUM_EXECUTABLE is not executable: ${executablePath}`,
|
|
221
|
+
}
|
|
222
|
+
return { ok: true, executablePath, exists: true }
|
|
223
|
+
}
|
|
224
|
+
const expected = packageChromiumPath(resolved, env)
|
|
225
|
+
if (!expected.ok) return expected
|
|
226
|
+
const expectedPath = expected.path
|
|
227
|
+
let browserDir = dirname(expectedPath)
|
|
228
|
+
while (!/^chromium-\d+$/.test(basename(browserDir))) {
|
|
229
|
+
const parent = dirname(browserDir)
|
|
230
|
+
if (parent === browserDir)
|
|
231
|
+
return {
|
|
232
|
+
ok: false,
|
|
233
|
+
message: `could not inspect ${resolved.spec}@${resolved.version} chromium: unexpected chromium cache layout`,
|
|
234
|
+
}
|
|
235
|
+
browserDir = parent
|
|
236
|
+
}
|
|
237
|
+
const browsersDir = dirname(browserDir)
|
|
238
|
+
// a headless launch off a Mac uses playwright's headless shell, as
|
|
239
|
+
// playwright itself does: the same chromium build and renderer without the
|
|
240
|
+
// desktop browser's printing and service discovery libraries. headed and
|
|
241
|
+
// Mac launches use full chromium.
|
|
242
|
+
const prefix = shell ? 'chromium_headless_shell-' : 'chromium-'
|
|
243
|
+
const paths = shell
|
|
244
|
+
? process.platform === 'win32'
|
|
245
|
+
? ['chrome-headless-shell-win64/chrome-headless-shell.exe']
|
|
246
|
+
: [
|
|
247
|
+
process.arch === 'arm64'
|
|
248
|
+
? 'chrome-headless-shell-linux-arm64/chrome-headless-shell'
|
|
249
|
+
: 'chrome-headless-shell-linux64/chrome-headless-shell',
|
|
250
|
+
'chrome-linux/headless_shell',
|
|
251
|
+
]
|
|
252
|
+
: process.platform === 'linux'
|
|
253
|
+
? [relative(browserDir, expectedPath), 'chrome-linux/chrome']
|
|
254
|
+
: [relative(browserDir, expectedPath)]
|
|
255
|
+
// the package's own revision is what its installer provides when none is installed.
|
|
256
|
+
let executablePath = shell
|
|
257
|
+
? join(
|
|
258
|
+
browsersDir,
|
|
259
|
+
`${prefix}${basename(browserDir).slice('chromium-'.length)}`,
|
|
260
|
+
paths[0]!,
|
|
261
|
+
)
|
|
262
|
+
: expectedPath
|
|
263
|
+
const revisions = existsSync(browsersDir)
|
|
264
|
+
? readdirSync(browsersDir)
|
|
265
|
+
.filter(
|
|
266
|
+
(name) => name.startsWith(prefix) && /^\d+$/.test(name.slice(prefix.length)),
|
|
267
|
+
)
|
|
268
|
+
.sort((a, b) => Number(b.slice(prefix.length)) - Number(a.slice(prefix.length)))
|
|
269
|
+
: []
|
|
270
|
+
for (const revision of revisions) {
|
|
271
|
+
const installed = paths
|
|
272
|
+
.map((path) => join(browsersDir, revision, path))
|
|
273
|
+
.find(isExecutable)
|
|
274
|
+
if (installed) {
|
|
275
|
+
executablePath = installed
|
|
276
|
+
break
|
|
154
277
|
}
|
|
155
278
|
}
|
|
279
|
+
return { ok: true, executablePath, exists: existsSync(executablePath) }
|
|
156
280
|
}
|
|
157
281
|
|
|
158
282
|
export async function ensurePlaywrightBrowser(
|
|
@@ -161,9 +285,8 @@ export async function ensurePlaywrightBrowser(
|
|
|
161
285
|
env: NodeJS.ProcessEnv = process.env,
|
|
162
286
|
): Promise<PlaywrightBrowserProvisioningResult> {
|
|
163
287
|
const headlessShell = headless && process.platform !== 'darwin'
|
|
164
|
-
const probeEnv = { ...env, SOOTSIM_PW_HEADLESS_SHELL: headlessShell ? '1' : '0' }
|
|
165
288
|
const browser = headlessShell ? 'chromium-headless-shell' : 'chromium'
|
|
166
|
-
const before = probeBrowser(resolved,
|
|
289
|
+
const before = probeBrowser(resolved, env, headlessShell)
|
|
167
290
|
if (!before.ok) return before
|
|
168
291
|
if (before.exists) {
|
|
169
292
|
const libraries = await ensureLinuxBrowserLibraries(before.executablePath, browser)
|
|
@@ -211,7 +334,7 @@ export async function ensurePlaywrightBrowser(
|
|
|
211
334
|
}
|
|
212
335
|
}
|
|
213
336
|
|
|
214
|
-
const after = probeBrowser(resolved,
|
|
337
|
+
const after = probeBrowser(resolved, env, headlessShell)
|
|
215
338
|
if (!after.ok) return after
|
|
216
339
|
if (!after.exists) {
|
|
217
340
|
return {
|
package/cli/internal-child.ts
CHANGED
|
@@ -12,17 +12,8 @@
|
|
|
12
12
|
// the same path. bin.ts dispatches here straight from argv, before any CLI
|
|
13
13
|
// startup work, which keeps a per-request worker (sync-http) cheap.
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
accessSync,
|
|
17
|
-
constants,
|
|
18
|
-
existsSync,
|
|
19
|
-
realpathSync,
|
|
20
|
-
readdirSync,
|
|
21
|
-
readFileSync,
|
|
22
|
-
writeFileSync,
|
|
23
|
-
} from 'node:fs'
|
|
15
|
+
import { realpathSync, readFileSync, writeFileSync } from 'node:fs'
|
|
24
16
|
import { createRequire } from 'node:module'
|
|
25
|
-
import { basename, dirname, join, relative, resolve } from 'node:path'
|
|
26
17
|
import { pathToFileURL } from 'node:url'
|
|
27
18
|
import * as vm from 'node:vm'
|
|
28
19
|
import { PEACH_FORKED_SCRIPT_ENV } from '../src/forked-script-contract'
|
|
@@ -88,10 +79,9 @@ export async function runInternalChild(args: string[]): Promise<void> {
|
|
|
88
79
|
// own work does.
|
|
89
80
|
}
|
|
90
81
|
|
|
91
|
-
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* this ever sees. */
|
|
82
|
+
/** the resolved package's own chromium path. a separate process so the
|
|
83
|
+
* caller's environment snapshot, PLAYWRIGHT_BROWSERS_PATH above all, is the
|
|
84
|
+
* only browser cache the package sees as it loads. */
|
|
95
85
|
function playwrightProbe(): ChildReply {
|
|
96
86
|
const modulePath = process.env.SOOTSIM_PW_MODULE
|
|
97
87
|
if (!modulePath) throw new Error('SOOTSIM_PW_MODULE is not set')
|
|
@@ -104,71 +94,7 @@ function playwrightProbe(): ChildReply {
|
|
|
104
94
|
if (typeof expectedPath !== 'string') {
|
|
105
95
|
throw new Error('browser "chromium" reported no executable path')
|
|
106
96
|
}
|
|
107
|
-
|
|
108
|
-
const override = process.env.PEACH_CHROMIUM_EXECUTABLE
|
|
109
|
-
if (override) {
|
|
110
|
-
executablePath = resolve(override)
|
|
111
|
-
accessSync(executablePath, constants.X_OK)
|
|
112
|
-
} else {
|
|
113
|
-
let browserDir = dirname(expectedPath)
|
|
114
|
-
while (!/^chromium-\d+$/.test(basename(browserDir))) {
|
|
115
|
-
const parent = dirname(browserDir)
|
|
116
|
-
if (parent === browserDir) throw new Error('unexpected chromium cache layout')
|
|
117
|
-
browserDir = parent
|
|
118
|
-
}
|
|
119
|
-
const cacheDir = dirname(browserDir)
|
|
120
|
-
// a headless launch off a Mac uses playwright's headless shell, as
|
|
121
|
-
// playwright itself does: the same chromium build and renderer without the
|
|
122
|
-
// desktop browser's printing and service discovery libraries. headed and
|
|
123
|
-
// Mac launches use full chromium.
|
|
124
|
-
const shell = process.env.SOOTSIM_PW_HEADLESS_SHELL === '1'
|
|
125
|
-
const prefix = shell ? 'chromium_headless_shell-' : 'chromium-'
|
|
126
|
-
// chromium switched its linux archive directory to chrome-linux64.
|
|
127
|
-
const paths = shell
|
|
128
|
-
? process.platform === 'win32'
|
|
129
|
-
? ['chrome-headless-shell-win64/chrome-headless-shell.exe']
|
|
130
|
-
: [
|
|
131
|
-
'chrome-headless-shell-linux64/chrome-headless-shell',
|
|
132
|
-
'chrome-linux/headless_shell',
|
|
133
|
-
]
|
|
134
|
-
: process.platform === 'linux'
|
|
135
|
-
? ['chrome-linux64/chrome', 'chrome-linux/chrome']
|
|
136
|
-
: [relative(browserDir, expectedPath)]
|
|
137
|
-
// the package's own revision is what its installer provides when none is installed.
|
|
138
|
-
if (shell)
|
|
139
|
-
executablePath = join(
|
|
140
|
-
cacheDir,
|
|
141
|
-
`${prefix}${basename(browserDir).slice('chromium-'.length)}`,
|
|
142
|
-
paths[0]!,
|
|
143
|
-
)
|
|
144
|
-
const revisions = existsSync(cacheDir)
|
|
145
|
-
? readdirSync(cacheDir)
|
|
146
|
-
.filter(
|
|
147
|
-
(name) => name.startsWith(prefix) && /^\d+$/.test(name.slice(prefix.length)),
|
|
148
|
-
)
|
|
149
|
-
.sort((a, b) => Number(b.slice(prefix.length)) - Number(a.slice(prefix.length)))
|
|
150
|
-
: []
|
|
151
|
-
for (const revision of revisions) {
|
|
152
|
-
const installed = paths
|
|
153
|
-
.map((path) => join(cacheDir, revision, path))
|
|
154
|
-
.find((path) => {
|
|
155
|
-
try {
|
|
156
|
-
accessSync(path, constants.X_OK)
|
|
157
|
-
return true
|
|
158
|
-
} catch {
|
|
159
|
-
return false
|
|
160
|
-
}
|
|
161
|
-
})
|
|
162
|
-
if (installed) {
|
|
163
|
-
executablePath = installed
|
|
164
|
-
break
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return {
|
|
169
|
-
stdout: JSON.stringify({ executablePath, exists: existsSync(executablePath) }),
|
|
170
|
-
code: 0,
|
|
171
|
-
}
|
|
97
|
+
return { stdout: JSON.stringify({ expectedPath }), code: 0 }
|
|
172
98
|
}
|
|
173
99
|
|
|
174
100
|
/** run the resolved playwright core's absolute CLI entry. argv is shaped the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|