stim 1.28.0 → 1.30.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/dist/{acquire-artifact-CKByBnTD.mjs → acquire-artifact-CrZ4rEbI.mjs} +1 -1
- package/dist/{act-8iswyfRa.mjs → act-BaKjDWGw.mjs} +479 -29
- package/dist/{activity-DRMg4_mD.mjs → activity-BTaUf0tc.mjs} +6 -5
- package/dist/{agent-device-usage-output-tE90fDdo.mjs → agent-device-usage-output-DYBpO17K.mjs} +4 -4
- package/dist/{android-YWCbmkVK.mjs → android-BCYLwmH6.mjs} +5 -5
- package/dist/{android-D577ApKG.mjs → android-BEQUDpOg.mjs} +1 -1
- package/dist/{android-CHmSU4B4.mjs → android-BWqdDK6R.mjs} +44 -42
- package/dist/{android-CsPs-7Mg.mjs → android-DdKG6lyD.mjs} +44 -35
- package/dist/{android-cas-_aDifWW0.mjs → android-cas-BH6K12__.mjs} +4 -4
- package/dist/{android-project-DUGMbq28.d.mts → android-project-CCEQyYJK.d.mts} +6 -2
- package/dist/api.d.mts +7 -4
- package/dist/api.mjs +27 -27
- package/dist/{apk-signed-tail-CQbwM0qO.mjs → apk-signed-tail-B8kw4a8K.mjs} +2 -2
- package/dist/{artifact-DYtHjxsn.mjs → artifact-DTHXcmQ3.mjs} +12 -12
- package/dist/{artifact-bFkfD3vf.mjs → artifact-M6W2l-xh.mjs} +12 -12
- package/dist/{auto-placement-BVqs8AJi.mjs → auto-placement-CZaWDmcY.mjs} +10 -10
- package/dist/{browser-web-BUaLcafY.mjs → browser-web-JQ7lFej3.mjs} +12 -12
- package/dist/{build-cQURy_KW.mjs → build-C2ZWoCmg.mjs} +23 -23
- package/dist/{build-cache-CZULpXVl.mjs → build-cache-DlC3owap.mjs} +4 -4
- package/dist/{build-plan-CxoYfxsc.mjs → build-plan-J3iRR3gI.mjs} +6 -6
- package/dist/{cache-manifest-DEjqGGat.mjs → cache-manifest-evF_zJ9U.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-Bm_A1xX9.mjs → ccache-B8gY50-h.mjs} +18 -18
- package/dist/{cli-CpbaLDa7.mjs → cli-xRPXJPtA.mjs} +19 -19
- package/dist/cli.mjs +1 -1
- package/dist/{client-YxCer6ab.mjs → client-DrHykA24.mjs} +5 -5
- package/dist/collector-run.mjs +5 -5
- package/dist/{command-output-C8R1KIvi.mjs → command-output-BBW8eWPL.mjs} +1 -1
- package/dist/{config-Cn94Jc0g.mjs → config-AbUjIBOQ.mjs} +121 -19
- package/dist/{dependencies-DKeMzwXY.mjs → dependencies-vUh9mp5z.mjs} +39 -38
- package/dist/{dependency-state-CojA2o0t.mjs → dependency-state-CPKAKCZ8.mjs} +1 -1
- package/dist/{dev-client-D-BW5uiq.mjs → dev-client-CASgAOu7.mjs} +2 -2
- package/dist/device-ChnO7bR9.mjs +761 -0
- package/dist/device-CsIdRXfm.mjs +175 -0
- package/dist/{device-CgXfbcz5.mjs → device-android-CcdQqQWg.mjs} +28 -195
- package/dist/{device-capacity-Cd8lMSn3.mjs → device-capacity-C5C_jOQd.mjs} +11 -11
- package/dist/device-host-worker.mjs +44 -35
- package/dist/{device-ios-Cc9ulihb.mjs → device-ios-DbmtPIiw.mjs} +28 -18
- package/dist/{device-lease-run-Mtzp4THX.mjs → device-lease-run-Do6zYA7y.mjs} +4 -4
- package/dist/{device-pool-eRz6DtCg.mjs → device-pool-CpoYiCGO.mjs} +3 -3
- package/dist/{device-eeK95Lir.mjs → device-provision-B5Ms94qY.mjs} +11 -302
- package/dist/{doctor-xf7ht-5n.mjs → doctor-CJSB5q-s.mjs} +20 -20
- package/dist/{doctor-Bz_ouYAW.mjs → doctor-CLE4AZEI.mjs} +20 -15
- package/dist/{doctor-C2QyhejJ.mjs → doctor-CpfbYh3Q.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BTW82PDC.mjs → doctor-watchman-D1IyMle9.mjs} +4 -4
- package/dist/{eas-build-Dm6q68QY.mjs → eas-build-DIDOHw2P.mjs} +2 -2
- package/dist/{eas-fallback-DajNpxf-.mjs → eas-fallback-DVS9oBSc.mjs} +4 -4
- package/dist/{eas-session-ledger-CBFo_Uo1.mjs → eas-session-ledger-CW3l-inB.mjs} +5 -5
- package/dist/{error-diagnostics-D1QfyJzQ.mjs → error-diagnostics-XJ9eWdtq.mjs} +8 -8
- package/dist/{gc-PLFwb0k4.mjs → gc-BVIcxCxE.mjs} +2 -2
- package/dist/{gc-DM5oMm-J.mjs → gc-Co7PE36D.mjs} +80 -18
- package/dist/{guide-C4I46XAk.mjs → guide-DkepBgHT.mjs} +235 -34
- package/dist/{hosted-android-DlaKLbW0.mjs → hosted-android-Du7NxufJ.mjs} +3 -3
- package/dist/{hosted-client-DDRm9hPJ.mjs → hosted-client-Cect92SZ.mjs} +3 -3
- package/dist/{hosted-logs-bSebOKbz.mjs → hosted-logs-Opcjv1Lr.mjs} +17 -8
- package/dist/{hosted-logs-sync-B0c53W_c.mjs → hosted-logs-sync-wsI7N1Hv.mjs} +7 -11
- package/dist/{hosted-macos-B7-8Pv4H.mjs → hosted-macos-BP9Kucat.mjs} +5 -5
- package/dist/{hosted-native-CDe33CSr.mjs → hosted-native-DmdLSmvu.mjs} +9 -8
- package/dist/{idle-shutdown-CQ0QwU9J.mjs → idle-shutdown-BcMN_cLm.mjs} +7 -7
- package/dist/{ios-B1HvafEG.mjs → ios-BFkBHuRT.mjs} +8 -8
- package/dist/{ios-tg4tp3q1.mjs → ios-CG0IsLtt.mjs} +29 -29
- package/dist/{ios-B1DYuOjh.mjs → ios-CXnoVO_z.mjs} +4 -4
- package/dist/{ios-device-B4elVFKi.mjs → ios-device-ClSfuu-_.mjs} +1 -1
- package/dist/{ios-project-CR4mZ7CH.mjs → ios-project-BM9TbTE7.mjs} +7 -7
- package/dist/{ios-state-BPHqMDdZ.mjs → ios-state-Ce_dystM.mjs} +1 -1
- package/dist/{js-swap-CVpSW1fn.mjs → js-swap-9Rx-5Nqz.mjs} +4 -4
- package/dist/{launch-DoySmhjz.mjs → launch-DvJV1Mx4.mjs} +19 -19
- package/dist/{lightened-DFAJgfIk.mjs → lightened-23pqe7LS.mjs} +4 -4
- package/dist/{logs-BGsW7iPe.mjs → logs-DJgZlf2K.mjs} +9 -8
- package/dist/{logs-DI5ILkYB.mjs → logs-Pkeh3wZk.mjs} +7 -6
- package/dist/{macos-Bo9st9Di.mjs → macos-DPvPQadc.mjs} +20 -20
- package/dist/{macos-C12RMJQF.mjs → macos-Du07NsOB.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -9
- package/dist/{metro-BnhXV2Mj.mjs → metro-BMQHczcf.mjs} +2 -2
- package/dist/{metro-request-DXyKjVDF.mjs → metro-request-BtF7ox53.mjs} +1 -1
- package/dist/{named-ports-Phoi2POD.mjs → named-ports-DcktE2Pw.mjs} +2 -2
- package/dist/{native-android-vxgtLD7w.mjs → native-android-CBOM1_gB.mjs} +16 -16
- package/dist/{native-gradle-artifact-inputs-BN96IVw8.mjs → native-gradle-artifact-inputs-D_iAfPuS.mjs} +3 -3
- package/dist/{native-runtime-DG4Rodzj.mjs → native-runtime-D4cTwU0Z.mjs} +6 -6
- package/dist/{native-xcode-inputs-BKarCoKg.mjs → native-xcode-inputs-BF-ogSnG.mjs} +2 -2
- package/dist/{native-xcode-ios-8A-efGa5.mjs → native-xcode-ios-DwJBfMP6.mjs} +15 -15
- package/dist/{ndjson-Dy2W4vRa.mjs → ndjson-CrjIsGzw.mjs} +2 -2
- package/dist/offload-worker.d.mts +1 -1
- package/dist/offload-worker.mjs +22 -22
- package/dist/{ownership-DJCq48IJ.mjs → ownership-Dtz9G5Gl.mjs} +2 -2
- package/dist/{phone-reverses-BzTa8g1F.mjs → phone-reverses-CvhhkGMH.mjs} +4 -4
- package/dist/{placement-log-Cvhta5ib.mjs → placement-log-CRR_TE1r.mjs} +1 -1
- package/dist/{plan-placement-WkZdccuN.mjs → plan-placement-CdLc-pTb.mjs} +6 -6
- package/dist/{ports-UV4mJgyC.mjs → ports-g4N_cfyg.mjs} +3 -3
- package/dist/{prebuild-k8d_tqOq.mjs → prebuild-DBJMhwSS.mjs} +9 -9
- package/dist/{project-Sui52ywT.mjs → project-DPQjnpcI.mjs} +15 -15
- package/dist/{react-native-android-DANlGGQf.mjs → react-native-android-idMWOwkX.mjs} +24 -24
- package/dist/{react-native-build-jUHnIfZ9.mjs → react-native-build-BSoh4HkH.mjs} +7 -7
- package/dist/{react-native-doctor-DCWRjS7K.mjs → react-native-doctor-CYibY8-4.mjs} +9 -8
- package/dist/{react-native-ios-BwMsFMXi.mjs → react-native-ios-13KIIOOy.mjs} +16 -15
- package/dist/{recordings-iy0mkm7b.mjs → recordings-CHMaF73C.mjs} +1 -1
- package/dist/{reload-Bj7QyuDy.mjs → reload-B9DZOjcV.mjs} +1 -1
- package/dist/{reload-c_uEyc_X.mjs → reload-BUQI3dSu.mjs} +14 -14
- package/dist/{remote-DFlpAqdV.mjs → remote-C-RGHhAP.mjs} +8 -8
- package/dist/{result-BIcXREyC.mjs → result-W4HCum4A.mjs} +16 -16
- package/dist/{run-y2HwyNvg.mjs → run-BQAmrohh.mjs} +2 -2
- package/dist/{selection-CXgM_VK_.mjs → selection-PCMT97XD.mjs} +105 -62
- package/dist/{server-bare-2N4vSRZG.mjs → server-bare-CEQdB_F4.mjs} +37 -1
- package/dist/{server-command-qneHPcRI.mjs → server-command-oqi3TDy7.mjs} +5 -5
- package/dist/server-expo-BUFAq2In.mjs +2 -0
- package/dist/{server-expo-Ccm9zB0o.mjs → server-expo-C1K07shx.mjs} +8 -5
- package/dist/{settings-Cfd_Q6ys.mjs → settings-CKlMOmhj.mjs} +2 -2
- package/dist/{settings-CY5JZlNN.mjs → settings-D776ygML.mjs} +1 -1
- package/dist/{settings-Djl-mpjX.mjs → settings-D9LtQaUw.mjs} +2 -1
- package/dist/{settings-payload-DwQiEMCn.mjs → settings-payload-CE-NZ6Lq.mjs} +4 -4
- package/dist/{settings-write-CJpjkeAd.mjs → settings-write-D7Xwa_-M.mjs} +5 -5
- package/dist/settings.schema.json +58 -9
- package/dist/{simslim-DCQwzoPy.mjs → simslim-CbpHERcv.mjs} +1 -1
- package/dist/{slot-launch-BpmanOnk.mjs → slot-launch-CeIK1iUI.mjs} +6 -6
- package/dist/{stage-CmugrSG5.mjs → stage-Blqe6bWb.mjs} +1 -1
- package/dist/{start-DYLk6GXn.mjs → start-B7J5a9nS.mjs} +11 -11
- package/dist/{start-CHH3zgIU.mjs → start-CvP2pJjc.mjs} +1 -1
- package/dist/{state-BXC1Lfxw.mjs → state-C2AUjjhg.mjs} +1 -1
- package/dist/{state-B2QJbDwz.mjs → state-D5ZxwCGJ.mjs} +2 -2
- package/dist/{stats-DxKqhcGp.mjs → stats-Uo7l8OAk.mjs} +4 -4
- package/dist/{status-7ULDEJ1e.mjs → status-CK7ZoEhV.mjs} +2 -2
- package/dist/{status-D_Ljc89p.mjs → status-CqJI1TgG.mjs} +1 -1
- package/dist/{status-BHCkOZga.mjs → status-_rWXFSO7.mjs} +24 -24
- package/dist/{status-watch-BmsPqYSU.mjs → status-watch-CnSyXUmj.mjs} +4 -4
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-CbWo21kb.mjs → stim-desktop-CYXLFpFS.mjs} +1 -1
- package/dist/{stop-b2pouxAO.mjs → stop-Bogo9oO2.mjs} +2 -2
- package/dist/{stop-DQvE-P76.mjs → stop-CMVfaA-6.mjs} +4 -4
- package/dist/{stop-D-dGE9gh.mjs → stop-CnF9ixYe.mjs} +20 -19
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +23 -19
- package/dist/{support-04IhBUTT.mjs → support-BGqpYMV8.mjs} +15 -11
- package/dist/{support-BtlJKjyQ.mjs → support-DUevTPur.mjs} +9 -9
- package/dist/{swiftpm-artifact-inputs-Cj2UpmPN.mjs → swiftpm-artifact-inputs-BcJk6-3u.mjs} +1 -1
- package/dist/{swiftpm-macos-BhF2stxY.mjs → swiftpm-macos-DBrmoocG.mjs} +8 -8
- package/dist/toolchain-Cw9VVHOY.mjs +2 -0
- package/dist/{toolchain-mLA_km-b.mjs → toolchain-DLdoyxIt.mjs} +19 -11
- package/dist/{trigger-DMou-X7j.mjs → trigger-CfnOfpDd.mjs} +1 -1
- package/dist/trigger-DBZ-GBrl.mjs +2 -0
- package/dist/{warm-progress-B0Vpuvpl.mjs → warm-progress-DQ2wQZKp.mjs} +3 -3
- package/dist/web-CI_qCRPw.mjs +2 -0
- package/dist/{web-BYmK0TjL.mjs → web-g9U7L1sR.mjs} +8 -8
- package/dist/web-run.mjs +5 -5
- package/dist/{workspace-state-kIZrdlSg.mjs → workspace-state-DGwkPXwq.mjs} +2 -2
- package/dist/{workspaces-CmOcceDN.mjs → workspaces-7_RWoi6c.mjs} +11 -11
- package/dist/{worktree-nliAoHxB.mjs → worktree-DEet9H3p.mjs} +1 -1
- package/dist/{worktree-2dk5edza.mjs → worktree-qKJ3x07S.mjs} +25 -25
- package/package.json +7 -7
- package/shim/bundle-response.cjs +37 -0
- package/dist/server-expo-WulkyAwT.mjs +0 -2
- package/dist/toolchain-qktiV8xc.mjs +0 -2
- package/dist/trigger-qp2ji5wE.mjs +0 -2
- package/dist/web-CrVLVQZY.mjs +0 -2
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-
|
|
3
|
-
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-
|
|
4
|
-
import { i as macosProcess, o as requiredMacosRecord } from "./state-
|
|
5
|
-
import { A as
|
|
6
|
-
import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-
|
|
7
|
-
import { i as createNdjsonWriter } from "./ndjson-
|
|
8
|
-
import { _n as reverseMetroPorts, dn as installIosApp, fn as iosAppProcess, hn as launchIosApp, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, tn as androidAppProcess, vn as writeDebugHttpHost } from "./ccache-
|
|
9
|
-
import { ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-
|
|
10
|
-
import { E as resolveIosCreation, R as readHostMemoryPressure, T as resetIosPrivacy, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, j as uninstallIosApp, n as bootIosSim, w as resetIosKeychain } from "./ios-
|
|
11
|
-
import { i as stopMacosAppHeld, n as stopHostedBundleInstances } from "./stop-
|
|
2
|
+
import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-AbUjIBOQ.mjs";
|
|
4
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-C2AUjjhg.mjs";
|
|
5
|
+
import { A as hostSystemImageArch, Ct as forgetCreatedDeviceAsync, I as listAvdsAsync, K as ownedAvdSystemImage, L as listInstalledSystemImages, M as listAdbDevicesAsync, N as listAvdDeviceProfiles, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, ct as waitForBoot, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, k as getAvdNameForSerialAsync, nt as resolveOwnedAvdSerialAsync, t as DEFAULT_AVD_DEVICE_PROFILE, tt as resetAdoptedAvd, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-DdKG6lyD.mjs";
|
|
6
|
+
import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-BEQUDpOg.mjs";
|
|
7
|
+
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
8
|
+
import { _n as reverseMetroPorts, dn as installIosApp, fn as iosAppProcess, hn as launchIosApp, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, tn as androidAppProcess, vn as writeDebugHttpHost } from "./ccache-B8gY50-h.mjs";
|
|
9
|
+
import { ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-7_RWoi6c.mjs";
|
|
10
|
+
import { E as resolveIosCreation, R as readHostMemoryPressure, T as resetIosPrivacy, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, j as uninstallIosApp, n as bootIosSim, w as resetIosKeychain } from "./ios-CXnoVO_z.mjs";
|
|
11
|
+
import { i as stopMacosAppHeld, n as stopHostedBundleInstances } from "./stop-CMVfaA-6.mjs";
|
|
12
12
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
13
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-
|
|
14
|
-
import {
|
|
13
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-C5C_jOQd.mjs";
|
|
14
|
+
import { a as muteBootedSimulator } from "./device-ios-DbmtPIiw.mjs";
|
|
15
|
+
import { _ as findAapt } from "./support-BGqpYMV8.mjs";
|
|
16
|
+
import { i as muteBootedEmulator } from "./device-android-CcdQqQWg.mjs";
|
|
15
17
|
import { t as waitForMacosRegistration } from "./registration-BwCe64PH.mjs";
|
|
16
18
|
import { n as parseLogStreamLine } from "./ios-CsRVik64.mjs";
|
|
17
19
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -19,7 +21,7 @@ import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstat
|
|
|
19
21
|
import { availableParallelism, freemem, homedir, loadavg } from "node:os";
|
|
20
22
|
import { dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
21
23
|
import { LOG_ROTATE_BYTES, configDir, withDirLock, withDirLockAsync } from "@stim-cli/core";
|
|
22
|
-
import { assertHostedDeviceLedger, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedMacosAppSlot, hostedMacosBundleId, hostedNativeLogsDir, isJsonObject, parseHostedOfferRequest, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedNativeLogsCheckpoint, readNdjsonGenerations } from "@stim-cli/core/state";
|
|
24
|
+
import { assertHostedDeviceLedger, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedMacosAppSlot, hostedMacosBundleId, hostedMemoryRefusal, hostedNativeLogsDir, isJsonObject, parseHostedOfferRequest, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedNativeLogsCheckpoint, readNdjsonGenerations } from "@stim-cli/core/state";
|
|
23
25
|
//#region src/device-host/android-app.ts
|
|
24
26
|
async function digest$1(path) {
|
|
25
27
|
const hash = createHash("sha256");
|
|
@@ -58,7 +60,7 @@ async function installHostedAndroidApp(home, session, attempt, device, metro) {
|
|
|
58
60
|
if (identity !== record.bundleId || !minimum || !api || Number(minimum) > Number(api)) throw new Error("The APK package identity or minimum SDK is incompatible with the hosted emulator.");
|
|
59
61
|
const nativeCode = /^native-code:\s*(.*)$/m.exec(badging)?.[1];
|
|
60
62
|
if (nativeCode !== void 0 && !nativeCode.split(/\s+/).includes(`'${device.architecture}'`)) throw new Error("The APK has no native library slice for the hosted emulator architecture.");
|
|
61
|
-
assertHostedAndroidTarget(home, device);
|
|
63
|
+
await assertHostedAndroidTarget(home, device);
|
|
62
64
|
const sdkExecutor = hostedAndroidExecutor();
|
|
63
65
|
const installed = await installAndroidApp({
|
|
64
66
|
serial: device.serial,
|
|
@@ -66,7 +68,7 @@ async function installHostedAndroidApp(home, session, attempt, device, metro) {
|
|
|
66
68
|
packageName: record.bundleId
|
|
67
69
|
}, { exec: sdkExecutor });
|
|
68
70
|
if (!installed.ok) throw new Error(installed.reason ?? "Hosted APK installation was not established.");
|
|
69
|
-
assertHostedAndroidTarget(home, device);
|
|
71
|
+
await assertHostedAndroidTarget(home, device);
|
|
70
72
|
if (record.mode === "development" && !metro) throw new Error("Hosted Android development launch requires its Metro bridge.");
|
|
71
73
|
const launched = record.mode === "development" && metro ? await launchAndroidApp({
|
|
72
74
|
serial: device.serial,
|
|
@@ -87,14 +89,14 @@ async function installHostedAndroidApp(home, session, attempt, device, metro) {
|
|
|
87
89
|
}
|
|
88
90
|
return "unverified";
|
|
89
91
|
}
|
|
90
|
-
function assertHostedAndroidSerial(home, device) {
|
|
92
|
+
async function assertHostedAndroidSerial(home, device) {
|
|
91
93
|
assertHostedDeviceLedger(home, device.avdName, "android");
|
|
92
94
|
const current = readHostedDevice(home, "android");
|
|
93
|
-
if (current.avdName !== device.avdName || current.serial !== device.serial || current.systemImage !== device.systemImage ||
|
|
95
|
+
if (current.avdName !== device.avdName || current.serial !== device.serial || current.systemImage !== device.systemImage || await getAvdNameForSerialAsync(device.serial, { timeoutMs: 2e3 }) !== device.avdName) throw new Error("The hosted Android device identity changed.");
|
|
94
96
|
}
|
|
95
|
-
function assertHostedAndroidTarget(home, device) {
|
|
96
|
-
assertHostedAndroidSerial(home, device);
|
|
97
|
-
if (androidDeviceAbi(device.serial) !== device.architecture) throw new Error("The hosted Android device identity or running ABI changed.");
|
|
97
|
+
async function assertHostedAndroidTarget(home, device) {
|
|
98
|
+
await assertHostedAndroidSerial(home, device);
|
|
99
|
+
if (await androidDeviceAbi(device.serial) !== device.architecture) throw new Error("The hosted Android device identity or running ABI changed.");
|
|
98
100
|
}
|
|
99
101
|
function hostedAndroidExecutor() {
|
|
100
102
|
const executor = getExecutor();
|
|
@@ -110,7 +112,7 @@ function hostedAndroidExecutor() {
|
|
|
110
112
|
async function restoreHostedAndroidMetro(home, session, attempt, device, metro) {
|
|
111
113
|
const record = readHostedApp(session, attempt, home);
|
|
112
114
|
if (record.state !== "installed" || record.mode !== "development") throw new Error("Metro restore requires an installed development app.");
|
|
113
|
-
assertHostedAndroidTarget(home, device);
|
|
115
|
+
await assertHostedAndroidTarget(home, device);
|
|
114
116
|
const exec = hostedAndroidExecutor();
|
|
115
117
|
const reversed = await reverseMetroPorts({
|
|
116
118
|
serial: device.serial,
|
|
@@ -118,7 +120,7 @@ async function restoreHostedAndroidMetro(home, session, attempt, device, metro)
|
|
|
118
120
|
devicePorts: [metro.devicePort]
|
|
119
121
|
}, { exec });
|
|
120
122
|
if (reversed.failed) throw new Error(reversed.reason);
|
|
121
|
-
assertHostedAndroidTarget(home, device);
|
|
123
|
+
await assertHostedAndroidTarget(home, device);
|
|
122
124
|
await writeDebugHttpHost({
|
|
123
125
|
serial: device.serial,
|
|
124
126
|
packageName: record.bundleId,
|
|
@@ -235,7 +237,7 @@ function collectHostedNativeLogs({ home, platform, since, final, query, parse, t
|
|
|
235
237
|
async function collectHostedAndroidLogs(home, session, attempt, since, final = false) {
|
|
236
238
|
const deadline = Date.now() + 1e4;
|
|
237
239
|
const device = readHostedDevice(home, "android");
|
|
238
|
-
assertHostedAndroidSerial(home, device);
|
|
240
|
+
await assertHostedAndroidSerial(home, device);
|
|
239
241
|
const app = readHostedAppMetadata(session, attempt, home);
|
|
240
242
|
if (app.state !== "installed") return false;
|
|
241
243
|
const exec = getExecutor();
|
|
@@ -530,12 +532,14 @@ async function installHostedApp(home, session, attempt, device, metroPort) {
|
|
|
530
532
|
}
|
|
531
533
|
//#endregion
|
|
532
534
|
//#region src/device-host/worker.ts
|
|
535
|
+
const hostedNotify = (message) => {
|
|
536
|
+
process.stderr.write(`${message}\n`);
|
|
537
|
+
};
|
|
533
538
|
function inventory() {
|
|
534
539
|
return listAllIosSims({ includeUnavailable: true });
|
|
535
540
|
}
|
|
536
541
|
async function selectHostedIosDevice(selectors) {
|
|
537
542
|
inventory();
|
|
538
|
-
if (readHostMemoryPressure(getExecutor()) !== "normal") throw new Error("Host memory pressure is unknown or elevated.");
|
|
539
543
|
const selected = await resolveIosCreation(selectors);
|
|
540
544
|
if (!selected.deviceType || !selected.runtime) throw new Error("The installed simulator type or runtime could not be established.");
|
|
541
545
|
if (process.arch !== "arm64" && process.arch !== "x64") throw new Error("Unsupported simulator host architecture.");
|
|
@@ -572,6 +576,7 @@ async function runHostedDevice(mode, selectors, app) {
|
|
|
572
576
|
assertHostedDeviceLedger(home, device.udid);
|
|
573
577
|
await bootIosSim(device.udid, { openViewer: false });
|
|
574
578
|
if (inventory().find((sim) => sim.udid === device.udid)?.state !== "Booted") throw new Error("Hosted simulator boot could not be verified.");
|
|
579
|
+
await muteBootedSimulator(device.udid, hostedNotify);
|
|
575
580
|
return {
|
|
576
581
|
state: "ready",
|
|
577
582
|
device
|
|
@@ -615,6 +620,7 @@ async function runHostedDevice(mode, selectors, app) {
|
|
|
615
620
|
renameSync(temporary, join(home, "hosted-device.json"));
|
|
616
621
|
});
|
|
617
622
|
removeHostedAppData(home, { keepBlobs: true });
|
|
623
|
+
await muteBootedSimulator(device.udid, hostedNotify);
|
|
618
624
|
return {
|
|
619
625
|
state: "ready",
|
|
620
626
|
device
|
|
@@ -666,12 +672,11 @@ async function runHostedDevice(mode, selectors, app) {
|
|
|
666
672
|
}
|
|
667
673
|
//#endregion
|
|
668
674
|
//#region src/device-host/android.ts
|
|
669
|
-
function portIsOccupied(port) {
|
|
670
|
-
const devices =
|
|
675
|
+
async function portIsOccupied(port) {
|
|
676
|
+
const devices = await listAdbDevicesAsync({ timeoutMs: 5e3 });
|
|
671
677
|
return [...devices.emulators, ...devices.unhealthy].some((device) => device.consolePort === port);
|
|
672
678
|
}
|
|
673
679
|
function selectHostedAndroidDevice(request) {
|
|
674
|
-
if (readHostMemoryPressure(getExecutor()) !== "normal") throw new Error("Host memory pressure is unknown or elevated.");
|
|
675
680
|
const image = pickDefaultSystemImage(listInstalledSystemImages(), { systemImage: request.systemImage });
|
|
676
681
|
if (!image || image.arch !== hostSystemImageArch()) throw new Error("No compatible installed Android image.");
|
|
677
682
|
const profile = request.deviceProfile ?? DEFAULT_AVD_DEVICE_PROFILE;
|
|
@@ -718,7 +723,7 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
718
723
|
if (!/^[a-f0-9-]{36}$/.test(request.session) || !hostedConsolePort(request.consolePort)) throw new Error("Hosted Android prepare needs its server-selected session and console port.");
|
|
719
724
|
const choice = selectHostedAndroidDevice(request);
|
|
720
725
|
const avdName = ownedAvdName(`hosted-${request.session}`);
|
|
721
|
-
if ((await listAvdsAsync({ timeoutMs: 5e3 })).includes(avdName) || portIsOccupied(request.consolePort)) throw new Error("The hosted AVD name or selected console port is already in use.");
|
|
726
|
+
if ((await listAvdsAsync({ timeoutMs: 5e3 })).includes(avdName) || await portIsOccupied(request.consolePort)) throw new Error("The hosted AVD name or selected console port is already in use.");
|
|
722
727
|
const selected = {
|
|
723
728
|
avdName,
|
|
724
729
|
serial: `emulator-${request.consolePort}`,
|
|
@@ -744,7 +749,7 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
744
749
|
}
|
|
745
750
|
});
|
|
746
751
|
assertHostedDeviceLedger(home, avdName, "android");
|
|
747
|
-
if (portIsOccupied(selected.consolePort)) throw new Error("The selected Android console port became occupied.");
|
|
752
|
+
if (await portIsOccupied(selected.consolePort)) throw new Error("The selected Android console port became occupied.");
|
|
748
753
|
await bootAndroidEmulator(avdName, selected.consolePort, {
|
|
749
754
|
openViewer: false,
|
|
750
755
|
logFile: join(home, "emulator.log")
|
|
@@ -759,7 +764,8 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
759
764
|
packageManager
|
|
760
765
|
})}`);
|
|
761
766
|
}
|
|
762
|
-
if (await getAvdNameForSerialAsync(selected.serial) !== avdName || androidDeviceAbi(selected.serial) !== selected.architecture) throw new Error("Hosted Android boot could not be verified for its exact owned AVD.");
|
|
767
|
+
if (await getAvdNameForSerialAsync(selected.serial) !== avdName || await androidDeviceAbi(selected.serial) !== selected.architecture) throw new Error("Hosted Android boot could not be verified for its exact owned AVD.");
|
|
768
|
+
await muteBootedEmulator(selected.serial, selected.avdName, hostedNotify);
|
|
763
769
|
return {
|
|
764
770
|
state: "ready",
|
|
765
771
|
device: selected
|
|
@@ -795,7 +801,7 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
795
801
|
state: "compatible",
|
|
796
802
|
device
|
|
797
803
|
};
|
|
798
|
-
if (!hostedConsolePort(request.consolePort) || portIsOccupied(request.consolePort)) throw new Error("The selected Android console port is invalid or occupied.");
|
|
804
|
+
if (!hostedConsolePort(request.consolePort) || await portIsOccupied(request.consolePort)) throw new Error("The selected Android console port is invalid or occupied.");
|
|
799
805
|
device = {
|
|
800
806
|
...device,
|
|
801
807
|
consolePort: request.consolePort,
|
|
@@ -820,9 +826,10 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
820
826
|
packageManager
|
|
821
827
|
})}`);
|
|
822
828
|
}
|
|
823
|
-
if (await getAvdNameForSerialAsync(device.serial) !== device.avdName || androidDeviceAbi(device.serial) !== device.architecture) throw new Error("Hosted Android boot could not be verified for its exact owned AVD.");
|
|
829
|
+
if (await getAvdNameForSerialAsync(device.serial) !== device.avdName || await androidDeviceAbi(device.serial) !== device.architecture) throw new Error("Hosted Android boot could not be verified for its exact owned AVD.");
|
|
824
830
|
await resetAdoptedAvd(device.avdName, device.serial, "");
|
|
825
831
|
removeHostedAppData(home, { keepBlobs: true });
|
|
832
|
+
await muteBootedEmulator(device.serial, device.avdName, hostedNotify);
|
|
826
833
|
return {
|
|
827
834
|
state: "ready",
|
|
828
835
|
device
|
|
@@ -866,7 +873,6 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
866
873
|
//#endregion
|
|
867
874
|
//#region src/device-host/macos.ts
|
|
868
875
|
function selectHostedMacos() {
|
|
869
|
-
if (readHostMemoryPressure(getExecutor()) !== "normal") throw new Error("Host memory pressure is unknown or elevated.");
|
|
870
876
|
const macosVersion = getExecutor().runFile("sw_vers", ["-productVersion"], {
|
|
871
877
|
timeoutMs: 1e4,
|
|
872
878
|
killSignal: "SIGKILL"
|
|
@@ -936,6 +942,8 @@ async function runHostedMacosApp(mode, request, app) {
|
|
|
936
942
|
if (mode === "prepare") {
|
|
937
943
|
recorded = existsSync(join(home, "hosted-device.json"));
|
|
938
944
|
if (recorded) throw new Error("Attach or stop the existing hosted macOS session.");
|
|
945
|
+
const memoryRefusal = hostedMemoryRefusal(readHostMemoryPressure(getExecutor()) ?? readHostMemoryPressure(getExecutor()));
|
|
946
|
+
if (memoryRefusal) throw new Error(memoryRefusal);
|
|
939
947
|
const selected = {
|
|
940
948
|
...selectHostedMacos(),
|
|
941
949
|
appSlot: request.appSlot
|
|
@@ -1139,13 +1147,14 @@ async function inspectHostedDevice(request, options) {
|
|
|
1139
1147
|
cpus,
|
|
1140
1148
|
loadPerCore: loadavg()[1] / cpus,
|
|
1141
1149
|
memoryFreeBytes: freemem(),
|
|
1142
|
-
memoryPressure: readHostMemoryPressure(),
|
|
1150
|
+
memoryPressure: readHostMemoryPressure() ?? readHostMemoryPressure(),
|
|
1143
1151
|
workerDiskFreeBytes,
|
|
1144
1152
|
...options ? { localDevices: countLiveOwnedDevices({}, options) } : {}
|
|
1145
1153
|
};
|
|
1146
1154
|
try {
|
|
1147
1155
|
if (process.platform !== "darwin") throw new Error("Hosted device sessions require a Mac.");
|
|
1148
|
-
|
|
1156
|
+
const memoryRefusal = hostedMemoryRefusal(resources.memoryPressure);
|
|
1157
|
+
if (memoryRefusal) throw new Error(memoryRefusal);
|
|
1149
1158
|
return request.platform === "macos" ? {
|
|
1150
1159
|
platform: "macos",
|
|
1151
1160
|
choice: selectHostedMacos(),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, o as cancellableSleep, t as getExecutor, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { D as workspaceId$1, k as workspaceLogsDir$1 } from "./workspace-state-
|
|
3
|
-
import { C as saveConfig, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, d as getConfigDir, w as setDevice } from "./config-
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import { D as iosSimSlimProfileSetting, E as iosSimSlimDefaultSetting } from "./settings-
|
|
6
|
-
import { mt as dropParked, pt as adoptParked, vt as parkedMaxSetting, xt as selectParked, yt as readParked } from "./android-
|
|
7
|
-
import { i as createNdjsonWriter } from "./ndjson-
|
|
8
|
-
import { _t as teardownParkedIosSim, ht as teardownOwnedIosSim } from "./workspaces-
|
|
9
|
-
import { A as springBoardRunning, B as reportMemoryCulprits, C as renameIosSim, D as resolveOwnedIosSim, E as resolveIosCreation, F as hostMemoryPressureAdvice, M as waitForSpringBoard, N as configuredIosSimulatorViewer, R as readHostMemoryPressure, S as readSpringBoardPid, T as resetIosPrivacy, _ as ownedSimName, a as createOwnedIosSim, d as listAllIosSims, f as listAllIosSimsAsync, h as listIosRuntimesAsync, n as bootIosSim, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, w as resetIosKeychain, y as parseRuntimeVersion } from "./ios-
|
|
10
|
-
import { c as deviceTypeMismatch, d as runtimeMismatch, g as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-
|
|
1
|
+
import { D as ownership_claim_exports, n as isTimeoutError, o as cancellableSleep, t as getExecutor, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { D as workspaceId$1, k as workspaceLogsDir$1 } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { C as saveConfig, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, d as getConfigDir, w as setDevice } from "./config-AbUjIBOQ.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-BBW8eWPL.mjs";
|
|
5
|
+
import { D as iosSimSlimProfileSetting, E as iosSimSlimDefaultSetting } from "./settings-D776ygML.mjs";
|
|
6
|
+
import { mt as dropParked, pt as adoptParked, vt as parkedMaxSetting, xt as selectParked, yt as readParked } from "./android-DdKG6lyD.mjs";
|
|
7
|
+
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
8
|
+
import { _t as teardownParkedIosSim, ht as teardownOwnedIosSim } from "./workspaces-7_RWoi6c.mjs";
|
|
9
|
+
import { A as springBoardRunning, B as reportMemoryCulprits, C as renameIosSim, D as resolveOwnedIosSim, E as resolveIosCreation, F as hostMemoryPressureAdvice, M as waitForSpringBoard, N as configuredIosSimulatorViewer, R as readHostMemoryPressure, S as readSpringBoardPid, T as resetIosPrivacy, _ as ownedSimName, a as createOwnedIosSim, d as listAllIosSims, f as listAllIosSimsAsync, h as listIosRuntimesAsync, n as bootIosSim, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, w as resetIosKeychain, y as parseRuntimeVersion } from "./ios-CXnoVO_z.mjs";
|
|
10
|
+
import { c as deviceTypeMismatch, d as runtimeMismatch, g as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-C5C_jOQd.mjs";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import { readFileSync } from "node:fs";
|
|
13
13
|
import { homedir } from "node:os";
|
|
@@ -516,6 +516,7 @@ async function configureOwnedIosSim({ record, projectPath, slot, profile, slimBy
|
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
const SPRINGBOARD_RESPAWN_POLLS = 20;
|
|
519
|
+
const SPAWN_STALL_TOLERANCE_MS = 18e4;
|
|
519
520
|
async function ensureIosBooted(args) {
|
|
520
521
|
const { springBoardDown, ...first } = await bootOwnedIosSim(args);
|
|
521
522
|
const { device, projectPath, out } = args;
|
|
@@ -586,13 +587,22 @@ async function bootOwnedIosSim({ device, projectPath, slot, origin, deviceSlotWa
|
|
|
586
587
|
};
|
|
587
588
|
const ready = async () => {
|
|
588
589
|
try {
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
590
|
+
const stallDeadline = Date.now() + SPAWN_STALL_TOLERANCE_MS;
|
|
591
|
+
const listSpringBoard = async () => {
|
|
592
|
+
for (;;) try {
|
|
593
|
+
return await getExecutor().runFileAsync("xcrun", [
|
|
594
|
+
"simctl",
|
|
595
|
+
"spawn",
|
|
596
|
+
udid,
|
|
597
|
+
"launchctl",
|
|
598
|
+
"list"
|
|
599
|
+
], { timeoutMs: 3e4 });
|
|
600
|
+
} catch (error) {
|
|
601
|
+
if (!isTimeoutError(error) || Date.now() >= stallDeadline) throw error;
|
|
602
|
+
const sims = await listAllIosSimsAsync().catch(() => null);
|
|
603
|
+
if (sims && sims.find((s) => s.udid === udid)?.state !== "Booted") throw error;
|
|
604
|
+
}
|
|
605
|
+
};
|
|
596
606
|
let listing = await listSpringBoard();
|
|
597
607
|
for (let poll = 0; !springBoardRunning(listing) && poll < SPRINGBOARD_RESPAWN_POLLS; poll++) {
|
|
598
608
|
await cancellableSleep(pollMs);
|
|
@@ -703,4 +713,4 @@ function bootFailure(udid, error) {
|
|
|
703
713
|
};
|
|
704
714
|
}
|
|
705
715
|
//#endregion
|
|
706
|
-
export { ensureOwnedIosDevice as i, clearIosAdoptionPending as n, ensureIosBooted as r, IosDeviceMismatchError as t };
|
|
716
|
+
export { muteBootedSimulator as a, ensureOwnedIosDevice as i, clearIosAdoptionPending as n, ensureIosBooted as r, IosDeviceMismatchError as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b as operationState } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { V as deviceSlotKey } from "./config-
|
|
3
|
-
import { a as formatElapsed, r as clockTime } from "./command-output-
|
|
4
|
-
import { Xt as APP_READINESS_TIMEOUT_MS, zt as MANIFEST_VERIFY_TIMEOUT_MS } from "./ccache-
|
|
5
|
-
import { E as releaseRunLease, S as parseLease, T as raiseLease, b as leaseIsExpired, j as takeLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-
|
|
2
|
+
import { V as deviceSlotKey } from "./config-AbUjIBOQ.mjs";
|
|
3
|
+
import { a as formatElapsed, r as clockTime } from "./command-output-BBW8eWPL.mjs";
|
|
4
|
+
import { Xt as APP_READINESS_TIMEOUT_MS, zt as MANIFEST_VERIFY_TIMEOUT_MS } from "./ccache-B8gY50-h.mjs";
|
|
5
|
+
import { E as releaseRunLease, S as parseLease, T as raiseLease, b as leaseIsExpired, j as takeLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-BTaUf0tc.mjs";
|
|
6
6
|
//#region src/engine/device-lease-run.ts
|
|
7
7
|
const LEASE_STEP_FLOOR_MS = 6e4;
|
|
8
8
|
const DEBUG_VERIFY_STEP_MS = MANIFEST_VERIFY_TIMEOUT_MS + APP_READINESS_TIMEOUT_MS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as deviceSlotKey } from "./config-
|
|
2
|
-
import { A as selectPoolDevice, S as parseLease, b as leaseIsExpired, v as deviceLeasePath, y as fileLeaseIo } from "./activity-
|
|
3
|
-
import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-
|
|
1
|
+
import { V as deviceSlotKey } from "./config-AbUjIBOQ.mjs";
|
|
2
|
+
import { A as selectPoolDevice, S as parseLease, b as leaseIsExpired, v as deviceLeasePath, y as fileLeaseIo } from "./activity-BTaUf0tc.mjs";
|
|
3
|
+
import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-Do6zYA7y.mjs";
|
|
4
4
|
//#region src/engine/device-pool.ts
|
|
5
5
|
function heldPoolId(root, platform, now, io = fileLeaseIo, slot = "default") {
|
|
6
6
|
const record = io.readHolder(root)[deviceSlotKey(platform, slot)];
|