stim 1.23.1 → 1.25.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 +3 -2
- package/dist/{acquire-artifact-BzYRDgaP.mjs → acquire-artifact-zA4S7RHE.mjs} +2 -2
- package/dist/{act-vxiMwdf5.mjs → act-BbHS3oV8.mjs} +41 -26
- package/dist/{activity-BpWUPgUm.mjs → activity-BpjwrQXU.mjs} +6 -6
- package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-Bnkerfod.mjs} +5 -5
- package/dist/{android-DtfRGLcc.mjs → android-BGwuK3Mc.mjs} +75 -50
- package/dist/{android-CLi6DSiS.mjs → android-CNZgRC-4.mjs} +5 -5
- package/dist/{android-C7sVmyI9.mjs → android-Cjcj8MCw.mjs} +140 -46
- package/dist/{android-cas-ngferVq2.mjs → android-cas-BVqh2Zep.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-DVWyCbWU.d.mts → android-project-CTYaETc0.d.mts} +6 -2
- package/dist/{android-DR5lZ2Az.mjs → android-saBeB4lr.mjs} +13 -3
- package/dist/api.d.mts +22 -5
- package/dist/api.mjs +32 -31
- package/dist/{artifact-Xvgibgzq.mjs → artifact-Co8zixVx.mjs} +19 -17
- package/dist/{artifact-DBI3DALs.mjs → artifact-DN8JNwqS.mjs} +18 -17
- package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
- package/dist/{browser-web-BJN9ZHxB.mjs → browser-web-CCgZsHmI.mjs} +16 -17
- package/dist/{budget-3ivAK99e.mjs → budget-HyShrIpL.mjs} +149 -47
- package/dist/{build-Dv9s8Fz-.mjs → build-CAiw8Ezm.mjs} +33 -29
- package/dist/{build-cache-Dv7RN200.mjs → build-cache-CKCzxzxA.mjs} +172 -21
- package/dist/{build-plan-BmbdHQbr.mjs → build-plan-zCuHGlA8.mjs} +8 -7
- package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-CH2EWGPB.mjs → ccache-h1FKhZeg.mjs} +6 -6
- package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
- package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
- package/dist/{cli-BkK6Wr5i.mjs → cli-C4w607Pz.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-B4MMzfo_.mjs → client-BQsmyp_-.mjs} +274 -39
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-YKGWivpG.mjs → command-output-BBvS1H6v.mjs} +3 -2
- package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
- package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
- package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-BwNCYG5Q.mjs} +2 -2
- package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
- package/dist/{dev-client-BFxiDpkf.mjs → dev-client-CHoXXZeg.mjs} +3 -3
- package/dist/{device-CiNYxqp6.mjs → device-B9FqTBYW.mjs} +81 -54
- package/dist/{device-B7ljwccX.mjs → device-F5-4z9ef.mjs} +16 -16
- package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-ZYaRALv5.mjs} +20 -16
- package/dist/device-host-worker.mjs +17 -17
- package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DkHBrmvH.mjs} +32 -50
- package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-ogEeJ62K.mjs} +6 -6
- package/dist/{device-pool-B4iOXIrD.mjs → device-pool-BIg8MU8l.mjs} +3 -3
- package/dist/{doctor-DRu-8ld6.mjs → doctor-A_Nr_fDe.mjs} +1 -1
- package/dist/{doctor-HUC1igzw.mjs → doctor-Bm8TVpGn.mjs} +37 -31
- package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-C6t4Maue.mjs → doctor-k3P3PizH.mjs} +14 -14
- package/dist/{doctor-watchman-iGBpC6KM.mjs → doctor-watchman-BovI1y3-.mjs} +5 -5
- package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CyDKNTBP.mjs} +4 -4
- package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-gaZi-dJL.mjs} +16 -15
- package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-BMCA1gdO.mjs} +12 -8
- package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-B1Mj_-7h.mjs} +17 -42
- package/dist/{errors-ccaPc4ox.mjs → errors-DHm_U5gv.mjs} +2 -1
- package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
- package/dist/{gc-BW8E1uSC.mjs → gc-B9jcnmIk.mjs} +205 -28
- package/dist/{gc-dDE4QPVu.mjs → gc-eaz403W6.mjs} +2 -2
- package/dist/{guide-DYYEO3Wz.mjs → guide-DR0K0xW9.mjs} +328 -89
- package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-Bvb2-ZxD.mjs} +4 -4
- package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-rsRqysJc.mjs} +4 -4
- package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-RtVcJH3u.mjs} +1 -1
- package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CWKGYWNX.mjs} +11 -6
- package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-d0pv9Tth.mjs} +7 -7
- package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-BxTizGU2.mjs} +58 -11
- package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BIyfl0Zj.mjs} +10 -10
- package/dist/{ios-hcBpnEGk.mjs → ios-BQzvJlzw.mjs} +122 -17
- package/dist/{ios-CWjqfSm_.mjs → ios-BRVM8b0P.mjs} +81 -49
- package/dist/{ios-DTOYZGMJ.mjs → ios-Dvt97HgQ.mjs} +8 -8
- package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
- package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
- package/dist/{ios-device-DFGuwF4U.mjs → ios-device-CKSvk0bu.mjs} +3 -3
- package/dist/{ios-project-CSZYI1iu.mjs → ios-project-DCUDo06I.mjs} +5 -5
- package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
- package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-CT9nV5SP.mjs} +15 -7
- package/dist/{js-swap-BSBHldmm.mjs → js-swap-Z9HbC4cj.mjs} +7 -6
- package/dist/{launch-D-zq8SHG.mjs → launch-D0lPvFFu.mjs} +49 -30
- package/dist/{launch-CP2wDCVd.mjs → launch-DscF1QfM.mjs} +52 -50
- package/dist/{logs-pNvA2hHK.mjs → logs-BsIRre8x.mjs} +16 -9
- package/dist/{logs-By5aw3g9.mjs → logs-Crs9y34Z.mjs} +8 -6
- package/dist/{macos-CPMahOC2.mjs → macos-CcUlJPMu.mjs} +1 -1
- package/dist/{macos-C67FZ2ft.mjs → macos-D477nfzH.mjs} +49 -42
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-DiXtA3Ty.mjs → metro-1pJgCX4U.mjs} +4 -4
- package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-Bp9gJQAN.mjs} +3 -4
- package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BVbn8SvC.mjs} +3 -3
- package/dist/{native-android-_MWSs3PP.mjs → native-android-BvMizJn1.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BJscK4vN.mjs} +5 -5
- package/dist/{native-run-Dv88i0aU.mjs → native-run-D5OJsGwA.mjs} +6 -6
- package/dist/{native-runtime-DBRfY_PN.mjs → native-runtime-B9w_Qyz3.mjs} +10 -9
- package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
- package/dist/{native-xcode-inputs-CqViUh3r.mjs → native-xcode-inputs-Cv4l-obn.mjs} +2 -2
- package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-DGrg90hE.mjs} +21 -20
- package/dist/offload-worker.d.mts +12 -4
- package/dist/offload-worker.mjs +78 -43
- package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
- package/dist/{ownership-C5fo5Edb.mjs → ownership-jxxz-19m.mjs} +3 -3
- package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
- package/dist/phone-reverses-CYb7RRAx.mjs +57 -0
- package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DjOXJRIH.mjs} +1 -1
- package/dist/{plan-placement-cr0fEU7b.mjs → plan-placement-BqKgKHCi.mjs} +3 -3
- package/dist/{ports-DpXjKkSV.mjs → ports-DtS1Amb0.mjs} +3 -3
- package/dist/{prebuild-BligW0QS.mjs → prebuild-JUaqOLpc.mjs} +14 -9
- package/dist/{project-DhCtQWWU.mjs → project-BiC68mIp.mjs} +21 -17
- package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-ZlhQfhvq.mjs → react-native-android-DRYqoJc4.mjs} +76 -32
- package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-CwZB-agu.mjs} +23 -20
- package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-BCrytK7h.mjs} +10 -9
- package/dist/{react-native-ios-C5W0SA6f.mjs → react-native-ios-Cr1buNFo.mjs} +41 -24
- package/dist/{recordings-CQmfzAh7.mjs → recordings-BaoQ0t-J.mjs} +1 -1
- package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
- package/dist/{reload-QcwnYLYV.mjs → reload-Beftw2X3.mjs} +1 -1
- package/dist/{reload-COJWTbae.mjs → reload-FbSgMF8x.mjs} +144 -42
- package/dist/{remote-DR8qUERM.mjs → remote-BuZj6AyU.mjs} +16 -7
- package/dist/{result-utnBea7x.mjs → result-CR2vk2cj.mjs} +41 -18
- package/dist/{run-DidHghD1.mjs → run-BtzE09Dl.mjs} +2 -2
- package/dist/{selection-DSMbWEX2.mjs → selection-D5cxEl3t.mjs} +13 -7
- package/dist/{server-bare-CafzuyFB.mjs → server-bare-CH9X0RLn.mjs} +56 -4
- package/dist/{server-command-B9o92sLM.mjs → server-command-CaBbDNU2.mjs} +5 -5
- package/dist/server-expo-C16Zf2k7.mjs +2 -0
- package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Ck8EIidM.mjs} +14 -9
- package/dist/{settings-C7O8A6ZI.mjs → settings-B5tCoq9N.mjs} +132 -39
- package/dist/{settings-PfJx8uK1.mjs → settings-DzH9mGQZ.mjs} +1 -1
- package/dist/{settings-write-Chuy7Cte.mjs → settings-write-n0zwfohx.mjs} +7 -7
- package/dist/settings.schema.json +51 -0
- package/dist/{simslim-BNckWpXi.mjs → simslim-BjxszUAb.mjs} +22 -7
- package/dist/{slot-launch-B7AuoWJv.mjs → slot-launch-QeuJMlnJ.mjs} +6 -6
- package/dist/{stage-C4u17aES.mjs → stage-D8xlRU2D.mjs} +2 -3
- package/dist/{start-BL_BsiWt.mjs → start-C1JLjkNw.mjs} +1 -1
- package/dist/{start-CU8mCPC7.mjs → start-YMpNwLhh.mjs} +75 -35
- package/dist/{state--smjFSTL.mjs → state-DMRNP7-4.mjs} +4 -4
- package/dist/{state-08I3hw3_.mjs → state-DPaM3u5K.mjs} +2 -2
- package/dist/{stats-CO6sK0Nh.mjs → stats-CP7STzZw.mjs} +5 -5
- package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
- package/dist/{status-_WPHzVft.mjs → status-CRLiJ-O_.mjs} +24 -24
- package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
- package/dist/{status-CrJutl6-.mjs → status-cNw6i0_t.mjs} +1 -1
- package/dist/{status-watch-BHFasOZN.mjs → status-watch-Bc2J4TZn.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/stim-clonefile.c +18 -0
- package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
- package/dist/{stop-iuFHjUST.mjs → stop-Br7LKxBE.mjs} +2 -2
- package/dist/{stop-CR5689oB.mjs → stop-COP6PQqw.mjs} +5 -5
- package/dist/{stop-BJ06ipTZ.mjs → stop-Db9Kh-UA.mjs} +109 -56
- package/dist/supervisor-run.mjs +17 -17
- package/dist/{support-CbXPbUMJ.mjs → support-Cxj9CmII.mjs} +6 -6
- package/dist/{support-TWuQlHQo.mjs → support-qKcbgmI5.mjs} +14 -11
- package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-iY9fsmOc.mjs} +4 -4
- package/dist/{swiftpm-macos-DbwGCpZg.mjs → swiftpm-macos-Bp_sn9P4.mjs} +15 -14
- package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-DB1aeqxO.mjs} +1 -1
- package/dist/{toolchain-B9hCFCQw.mjs → toolchain-VzLJzZ7O.mjs} +69 -37
- package/dist/trigger-BLsHgAGR.mjs +2 -0
- package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
- package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-BV3ZPmcY.mjs} +6 -6
- package/dist/{web-DRF_oFXk.mjs → web-B4Yjyt1G.mjs} +12 -10
- package/dist/web-DS4UDWvf.mjs +2 -0
- package/dist/web-run.mjs +8 -9
- package/dist/windows-report.mjs +12 -1
- package/dist/windows-report.ps1 +1 -1
- package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CPSp3mav.mjs} +11 -4
- package/dist/{workspaces-e41xsjKr.mjs → workspaces-C9w4aeXF.mjs} +36 -32
- package/dist/{worktree-B4Nj3EGS.mjs → worktree-CclFIe1Z.mjs} +324 -99
- package/dist/{worktree-BEwxVwKF.mjs → worktree-Ct9Gk3KL.mjs} +1 -1
- package/dist/{xcode-Rq744mBF.mjs → xcode-CiIIDnuD.mjs} +42 -28
- package/package.json +7 -7
- package/shim/bundle-response.cjs +53 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +23 -1
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
- package/dist/server-expo-Ddr8cG_c.mjs +0 -2
- package/dist/trigger-yb_nFzPF.mjs +0 -2
- package/dist/web-kDE9Myoy.mjs +0 -2
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as withConfigLock, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync, _ as loadConfig, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as acquireAvdClaim, t as allConsolePortsAndSerials, w as setDevice } from "./config-
|
|
3
|
-
import { l as phaseLine } from "./command-output-
|
|
4
|
-
import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-
|
|
5
|
-
import { s as ownedDeviceLabel } from "./project-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { i as
|
|
13
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { D as withConfigLock$1, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as acquireAvdClaim, t as allConsolePortsAndSerials, w as setDevice } from "./config-BZhXY15H.mjs";
|
|
3
|
+
import { l as phaseLine } from "./command-output-BBvS1H6v.mjs";
|
|
4
|
+
import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-B5tCoq9N.mjs";
|
|
5
|
+
import { s as ownedDeviceLabel } from "./project-BiC68mIp.mjs";
|
|
6
|
+
import { A as listAdbDevices, B as ownedAvdDeviceProfile, F as listAvdsAsync, H as ownedAvdMatchesConfiguration, I as listInstalledSystemImages, K as ownedAvdSystemImage, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, _ as avdPoolConfiguration, b as configureNewOwnedAvd, ct as waitForBoot, f as assertOwnedAvdStopped, gt as isLegacyDeletionClaim, j as listAdbDevicesAsync, n as OWNED_AVD_CONFIG_DEFAULTS, nt as resolveOwnedAvdSerialAsync, pt as adoptParked, t as DEFAULT_AVD_DEVICE_PROFILE, vt as parkedMaxSetting, x as createOwnedAvd, y as bootAndroidEmulator, yt as readParked, z as nextConsolePort } from "./android-Cjcj8MCw.mjs";
|
|
7
|
+
import { c as pidExists } from "./metro-1pJgCX4U.mjs";
|
|
8
|
+
import { O as teardownOwnedAvd, j as teardownParkedAvd } from "./workspaces-C9w4aeXF.mjs";
|
|
9
|
+
import { h as tailLines } from "./activity-BpjwrQXU.mjs";
|
|
10
|
+
import { F as memoryCulpritsUnderAsync, I as readHostMemoryPressure, R as reportMemoryCulprits, d as listAllIosSims, z as memoryCulpritAdvice } from "./ios-BQzvJlzw.mjs";
|
|
11
|
+
import { t as clearDeviceIdleShutdown } from "./idle-shutdown-BIyfl0Zj.mjs";
|
|
12
|
+
import { i as countLiveOwnedDevices, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-ZYaRALv5.mjs";
|
|
13
|
+
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-DkHBrmvH.mjs";
|
|
14
|
+
import { t as reconcileSimSlim } from "./simslim-BjxszUAb.mjs";
|
|
14
15
|
import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
|
|
15
16
|
import { randomUUID } from "node:crypto";
|
|
16
17
|
import { existsSync } from "node:fs";
|
|
17
18
|
import { isDeepStrictEqual } from "node:util";
|
|
19
|
+
import { dirname, join, resolve, sep } from "node:path";
|
|
20
|
+
import { rotatedLogPath } from "@stim-cli/core";
|
|
21
|
+
import { acceptsShape, settingDefinition } from "@stim-cli/core/state";
|
|
18
22
|
import { fileURLToPath } from "node:url";
|
|
19
23
|
import { captureProcessIdentity } from "@stim-cli/core/process-identity";
|
|
20
24
|
import chalk from "chalk";
|
|
@@ -26,7 +30,7 @@ async function requestLocal(url, platform, prefetch) {
|
|
|
26
30
|
const req = request(url, { headers: {
|
|
27
31
|
accept: "application/json",
|
|
28
32
|
"expo-platform": platform,
|
|
29
|
-
|
|
33
|
+
"x-stim-metro-warmup": "1"
|
|
30
34
|
} });
|
|
31
35
|
const timer = setTimeout(() => req.destroy(), WARMUP_TIMEOUT_MS);
|
|
32
36
|
timer.unref();
|
|
@@ -48,7 +52,33 @@ async function requestLocal(url, platform, prefetch) {
|
|
|
48
52
|
req.end();
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
|
|
55
|
+
const ENTRY_EXTENSIONS = [
|
|
56
|
+
"",
|
|
57
|
+
".js",
|
|
58
|
+
".jsx",
|
|
59
|
+
".ts",
|
|
60
|
+
".tsx"
|
|
61
|
+
];
|
|
62
|
+
function entryExists(bundlePath, root) {
|
|
63
|
+
const entry = decodeURIComponent(bundlePath.replace(/\.bundle\/*$/, ""));
|
|
64
|
+
if (entry.startsWith("/.expo/")) return true;
|
|
65
|
+
for (let dir = resolve(root);; dir = dirname(dir)) {
|
|
66
|
+
const file = resolve(dir, `.${entry}`);
|
|
67
|
+
if (file.startsWith(dir + sep) && ENTRY_EXTENSIONS.some((ext) => existsSync(file + ext))) return true;
|
|
68
|
+
if (dirname(dir) === dir) return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function recordedBundleUrl(logsDir, root, platform) {
|
|
72
|
+
const setting = settingDefinition(`metro.warmupUrl.${platform}`);
|
|
73
|
+
if (!logsDir || !root || !setting) return null;
|
|
74
|
+
const log = join(logsDir, "metro.ndjson");
|
|
75
|
+
for (const file of [log, rotatedLogPath(log)]) for (const line of (tailLines(file) ?? []).toReversed()) try {
|
|
76
|
+
const record = JSON.parse(line);
|
|
77
|
+
if (record?.event === "bundle_response_started" && record.platform === platform && acceptsShape(setting, record.url) && entryExists(new URL(record.url, "http://localhost").pathname, root)) return record.url;
|
|
78
|
+
} catch {}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
async function warmMetro({ port, platform, isExpo, appId, bundleUrl, logsDir, root }) {
|
|
52
82
|
try {
|
|
53
83
|
const origin = `http://127.0.0.1:${port}`;
|
|
54
84
|
if (await requestLocal(new URL("/_stim/metro-warmup", origin), platform, false) !== "ready") return;
|
|
@@ -65,6 +95,7 @@ async function warmMetro({ port, platform, isExpo, appId, bundleUrl }) {
|
|
|
65
95
|
sourcePaths: "url-server",
|
|
66
96
|
...appId ? { app: appId } : {}
|
|
67
97
|
}).toString();
|
|
98
|
+
bundleUrl ||= recordedBundleUrl(logsDir, root, platform);
|
|
68
99
|
if (!bundleUrl && isExpo) {
|
|
69
100
|
const body = await requestLocal(new URL(origin), platform, false);
|
|
70
101
|
if (body === null) return;
|
|
@@ -91,12 +122,12 @@ var AvdBootError = class extends Error {
|
|
|
91
122
|
};
|
|
92
123
|
var AvdRecoveryError = class extends AvdBootError {};
|
|
93
124
|
function findOtherOwner(avdName, projectPath, selectedSlot = "default") {
|
|
94
|
-
for (const [path, project] of Object.entries(loadConfig()?.projects ?? {})) if (projectDeviceSlots(project).some(({ slot, platforms }) => (path !== projectPath || slot !== selectedSlot) && platforms.android?.avdName?.toLowerCase() === avdName.toLowerCase())) return path;
|
|
125
|
+
for (const [path, project] of Object.entries(loadConfig$1()?.projects ?? {})) if (projectDeviceSlots(project).some(({ slot, platforms }) => (path !== projectPath || slot !== selectedSlot) && platforms.android?.avdName?.toLowerCase() === avdName.toLowerCase())) return path;
|
|
95
126
|
return null;
|
|
96
127
|
}
|
|
97
128
|
async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, systemImage, deviceProfile, configuration, configure, teardown = teardownOwnedAvd }) {
|
|
98
|
-
const { claim, reservation, previous, avdName } = await withConfigLockAsync(() => {
|
|
99
|
-
const previous = deviceSlotPlatforms(loadConfig()?.projects?.[projectPath], slot)?.android;
|
|
129
|
+
const { claim, reservation, previous, avdName } = await withConfigLockAsync$1(() => {
|
|
130
|
+
const previous = deviceSlotPlatforms(loadConfig$1()?.projects?.[projectPath], slot)?.android;
|
|
100
131
|
if (previous?.avdName && previous.avdName !== previousAvdName) throw new Error(`Another Stim run assigned AVD ${previous.avdName} to this workspace. Retry to use it.`);
|
|
101
132
|
if (readParked("android").some((entry) => entry.name === ownedAvdName(label)) || findOtherOwner(ownedAvdName(label), projectPath, slot)) label = `${label}-${randomUUID().slice(0, 8)}`;
|
|
102
133
|
const avdName = ownedAvdName(label);
|
|
@@ -121,7 +152,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
|
|
|
121
152
|
throw error;
|
|
122
153
|
}
|
|
123
154
|
});
|
|
124
|
-
const currentRecord = () => deviceSlotPlatforms(loadConfig()?.projects?.[projectPath], slot)?.android;
|
|
155
|
+
const currentRecord = () => deviceSlotPlatforms(loadConfig$1()?.projects?.[projectPath], slot)?.android;
|
|
125
156
|
const assertReservation = () => {
|
|
126
157
|
if (readParked("android").some((entry) => entry.name === avdName)) throw new Error(`AVD ${avdName} was parked by another Stim run. Retry to adopt it safely.`);
|
|
127
158
|
const owner = findOtherOwner(avdName, projectPath, slot);
|
|
@@ -168,7 +199,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
|
|
|
168
199
|
if (!message.includes("already exists")) throw error;
|
|
169
200
|
try {
|
|
170
201
|
if (!(await listAvdsAsync()).includes(avdName)) throw new AvdRecoveryError(`AVD ${avdName} already exists on disk but is not listed by the emulator. ${message}`, "Run `npx stim gc` to inspect orphaned owned AVDs, then `npx stim gc --delete` to reclaim those safe to delete. Retry `stim android` after cleanup; keep any AVD that GC cannot verify.", error);
|
|
171
|
-
await withConfigLockAsync(assertReservation);
|
|
202
|
+
await withConfigLockAsync$1(assertReservation);
|
|
172
203
|
const resolved = await resolveOwnedAvdSerialAsync(avdName);
|
|
173
204
|
if (resolved.missing || resolved.notOwned) throw new Error(`AVD ${avdName} could not be verified for recovery. Retry after checking its registration.`, { cause: error });
|
|
174
205
|
if (!resolved.serial) assertOwnedAvdStopped(avdName);
|
|
@@ -183,7 +214,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
|
|
|
183
214
|
} : {}
|
|
184
215
|
};
|
|
185
216
|
} catch (recoveryError) {
|
|
186
|
-
await withConfigLockAsync(() => {
|
|
217
|
+
await withConfigLockAsync$1(() => {
|
|
187
218
|
if (!isDeepStrictEqual(currentRecord(), reservation)) return;
|
|
188
219
|
if (previous) setDevice(projectPath, "android", previous, slot);
|
|
189
220
|
else clearDevice(projectPath, "android", slot, avdName);
|
|
@@ -197,7 +228,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
|
|
|
197
228
|
} catch (error) {
|
|
198
229
|
configurationFailure = { error };
|
|
199
230
|
}
|
|
200
|
-
if (!configurationFailure) await withConfigLockAsync(() => {
|
|
231
|
+
if (!configurationFailure) await withConfigLockAsync$1(() => {
|
|
201
232
|
assertReservation();
|
|
202
233
|
setDevice(projectPath, "android", {
|
|
203
234
|
avdName,
|
|
@@ -227,9 +258,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
|
|
|
227
258
|
slot,
|
|
228
259
|
expectedRecord: reservation
|
|
229
260
|
},
|
|
230
|
-
onRemoved: () =>
|
|
231
|
-
clearDevice(projectPath, "android", slot, avdName);
|
|
232
|
-
}
|
|
261
|
+
onRemoved: () => withConfigLockAsync$1(() => clearDevice(projectPath, "android", slot, avdName))
|
|
233
262
|
});
|
|
234
263
|
const orphan = cleanup.status === "failed" || cleanup.status === "skipped" ? ` The owned AVD remains tracked for cleanup (${cleanup.reason || cleanup.status}); fix the cause, then retry or run \`stim gc --delete\`.` : "";
|
|
235
264
|
throw new Error(`Created owned AVD ${avdName}, but could not configure its AVD settings: ${String(error?.message || error)}${orphan}`, { cause: error });
|
|
@@ -257,9 +286,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
257
286
|
slot,
|
|
258
287
|
expectedRecord: record
|
|
259
288
|
},
|
|
260
|
-
onRemoved: () =>
|
|
261
|
-
clearDevice(projectPath, "android", slot, avdName);
|
|
262
|
-
}
|
|
289
|
+
onRemoved: () => withConfigLockAsync$1(() => clearDevice(projectPath, "android", slot, avdName))
|
|
263
290
|
});
|
|
264
291
|
if (cleanup.status === "failed" || cleanup.status === "skipped") throw new AvdRecoveryError(`Owned AVD ${record.avdName} has incomplete setup and could not be deleted (${cleanup.reason || cleanup.status}). Fix the cause, then retry; Stim kept the device record for cleanup.`, "Wait for any active AVD operation to finish. If the refusal names an unresolved claim, inspect its creator and native processes before removing only that claim. Retry `stim android` to reconcile the incomplete device.");
|
|
265
292
|
record = null;
|
|
@@ -277,9 +304,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
277
304
|
slot,
|
|
278
305
|
expectedRecord: record
|
|
279
306
|
},
|
|
280
|
-
onRemoved: () =>
|
|
281
|
-
clearDevice(projectPath, "android", slot, avdName);
|
|
282
|
-
}
|
|
307
|
+
onRemoved: () => withConfigLockAsync$1(() => clearDevice(projectPath, "android", slot, avdName))
|
|
283
308
|
});
|
|
284
309
|
if (cleanup.status === "failed" || cleanup.status === "skipped") throw new AvdRecoveryError(`Owned AVD ${avdName} never finished a boot, but could not be deleted to create one on ${requestedImage} (${cleanup.reason || cleanup.status}). Stim kept the device record.`, "Fix the cause, then retry, or pass `--slot <name>` to create the requested emulator beside it.");
|
|
285
310
|
out(phaseLine("device", `deleted ${avdName}, which never finished a boot, to create one on ${requestedImage}`));
|
|
@@ -290,7 +315,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
290
315
|
const configurationBeforeDefaults = avdPoolConfiguration(androidDataPartitionSizeGbSetting(settings), projectAvdConfig, deviceProfile);
|
|
291
316
|
if (record?.avdName) {
|
|
292
317
|
if (record.owned) {
|
|
293
|
-
const resolved = await resolveOwnedAvdSerialAsync(record.avdName);
|
|
318
|
+
const resolved = await resolveOwnedAvdSerialAsync(record.avdName, { preferredSerial: record.consolePort ? `emulator-${record.consolePort}` : void 0 });
|
|
294
319
|
const currentProfile = resolved.notOwned || resolved.missing ? null : ownedAvdDeviceProfile(record.avdName);
|
|
295
320
|
if (requestedProfile && currentProfile && currentProfile !== requestedProfile) throw new AvdRecoveryError(`this project's emulator uses device profile ${currentProfile}, but ${requestedProfile} was requested. Stim will not silently boot a different model.`, "Run `stim worktree remove` (or `stim gc --delete`) to reap the current emulator, then `stim android` again to create the requested one, or pass `--slot <name>` to create it beside the current one.");
|
|
296
321
|
if (resolved.notOwned) note(chalk.yellow(`Note: recorded AVD ${record.avdName} is not Stim-owned -- creating a fresh owned AVD instead of reusing it.`));
|
|
@@ -304,7 +329,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
304
329
|
owned: true,
|
|
305
330
|
deviceName: record.deviceName ?? record.avdName
|
|
306
331
|
};
|
|
307
|
-
setDevice(projectPath, "android", updated, slot);
|
|
332
|
+
await withConfigLockAsync$1(() => setDevice(projectPath, "android", updated, slot));
|
|
308
333
|
return {
|
|
309
334
|
...updated,
|
|
310
335
|
systemImage: ownedAvdSystemImage(record.avdName),
|
|
@@ -369,7 +394,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
369
394
|
poolConfiguration: parked.configuration,
|
|
370
395
|
adoptionPending: true
|
|
371
396
|
};
|
|
372
|
-
if (!adoptParked({
|
|
397
|
+
if (!await adoptParked({
|
|
373
398
|
platform: "android",
|
|
374
399
|
projectPath,
|
|
375
400
|
slot,
|
|
@@ -444,7 +469,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
444
469
|
deviceProfile: created.deviceProfile
|
|
445
470
|
};
|
|
446
471
|
}
|
|
447
|
-
function claimAndroidConsolePort({ projectPath, slot, avdName, deviceName, livePorts = [], metadata }, { lock = withConfigLock, recordedPorts = () => allConsolePortsAndSerials().androidConsolePorts, record = setDevice } = {}) {
|
|
472
|
+
function claimAndroidConsolePort({ projectPath, slot, avdName, deviceName, livePorts = [], metadata }, { lock = withConfigLock$1, recordedPorts = () => allConsolePortsAndSerials().androidConsolePorts, record = setDevice } = {}) {
|
|
448
473
|
return lock(() => {
|
|
449
474
|
const consolePort = nextConsolePort([...recordedPorts(), ...livePorts]);
|
|
450
475
|
const claim = {
|
|
@@ -469,14 +494,15 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
|
|
|
469
494
|
platform: "android",
|
|
470
495
|
key: avdName
|
|
471
496
|
}, async () => {
|
|
472
|
-
const
|
|
497
|
+
const livePorts = liveAndroidConsolePorts();
|
|
498
|
+
const claim = await withConfigLockAsync$1(() => claimAndroidConsolePort({
|
|
473
499
|
projectPath,
|
|
474
500
|
slot,
|
|
475
501
|
avdName,
|
|
476
502
|
deviceName,
|
|
477
|
-
livePorts
|
|
503
|
+
livePorts,
|
|
478
504
|
metadata
|
|
479
|
-
});
|
|
505
|
+
}));
|
|
480
506
|
const serial = `emulator-${claim.consolePort}`;
|
|
481
507
|
try {
|
|
482
508
|
reportAndroidMemoryPressure(out);
|
|
@@ -492,7 +518,7 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
|
|
|
492
518
|
if (result.failed) throw new AvdBootError(result.reason, result.remedy);
|
|
493
519
|
const running = await getAvdNameForSerialAsync(serial);
|
|
494
520
|
if (running && running !== avdName) throw new Error(`${serial} is running AVD ${running}, not this workspace's owned AVD ${avdName}; refusing to use it.`);
|
|
495
|
-
clearAndroidBootPending(projectPath, avdName, slot);
|
|
521
|
+
await withConfigLockAsync$1(() => clearAndroidBootPending(projectPath, avdName, slot));
|
|
496
522
|
await muteBootedEmulator(serial, avdName, out);
|
|
497
523
|
const { bootPending: _booted, ...booted } = claim;
|
|
498
524
|
return {
|
|
@@ -501,7 +527,7 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
|
|
|
501
527
|
setup: true
|
|
502
528
|
};
|
|
503
529
|
} catch (error) {
|
|
504
|
-
releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
|
|
530
|
+
await withConfigLockAsync$1(() => releaseAndroidConsolePort(projectPath, claim.consolePort, slot));
|
|
505
531
|
throw error;
|
|
506
532
|
}
|
|
507
533
|
}, {
|
|
@@ -566,11 +592,11 @@ async function muteBootedEmulator(serial, avdName, out) {
|
|
|
566
592
|
function reportAndroidMemoryPressure(out) {
|
|
567
593
|
const pressure = readHostMemoryPressure();
|
|
568
594
|
if (pressure === "warning" || pressure === "critical") {
|
|
569
|
-
|
|
570
|
-
out(chalk.dim(phaseLine("memory",
|
|
595
|
+
out(chalk.dim(phaseLine("memory", `macOS reports ${pressure} host memory pressure; emulator boot may be slow. Free memory with \`stim stop\` only in workspaces you own; ask before closing other apps or devices.`)));
|
|
596
|
+
reportMemoryCulprits(pressure, (named) => out(chalk.dim(phaseLine("memory", named))));
|
|
571
597
|
}
|
|
572
598
|
}
|
|
573
|
-
function androidBootRemedy(pressure) {
|
|
599
|
+
async function androidBootRemedy(pressure) {
|
|
574
600
|
let count = null;
|
|
575
601
|
try {
|
|
576
602
|
const live = countLiveOwnedDevices({
|
|
@@ -583,7 +609,7 @@ function androidBootRemedy(pressure) {
|
|
|
583
609
|
});
|
|
584
610
|
count = typeof live === "number" ? live : null;
|
|
585
611
|
} catch {}
|
|
586
|
-
const named = memoryCulpritAdvice(
|
|
612
|
+
const named = memoryCulpritAdvice(await memoryCulpritsUnderAsync(pressure));
|
|
587
613
|
const observation = pressure === "warning" || pressure === "critical" ? `macOS reports ${pressure} host memory pressure. ${named ? `${named} ` : ""}` : "";
|
|
588
614
|
const devices = count ? `${count} Stim-owned ${count === 1 ? "device is" : "devices are"} running. ` : "";
|
|
589
615
|
if (observation || devices) return `${observation}${devices}Stop an unneeded device with \`stim stop\` only in a workspace you own, then run \`stim android\` again; ask before closing other apps or devices. These observations do not establish the cause of the timeout or an OOM crash.`;
|
|
@@ -617,7 +643,7 @@ async function waitForAndroidBoot({ serial, timeoutMs, pid = null, alive = pidEx
|
|
|
617
643
|
return {
|
|
618
644
|
failed: true,
|
|
619
645
|
reason: `${exited ? `The emulator process for ${serial} exited before the device finished booting.` : `Emulator ${serial} did not finish booting within ${Math.round(elapsedMs / 1e3)}s.`} Diagnostic: ${JSON.stringify(result.diagnostic)}`,
|
|
620
|
-
remedy: exited ? "Inspect the emulator log for the process exit, fix what it reports, then run `stim android` again." : androidBootRemedy(pressure)
|
|
646
|
+
remedy: exited ? "Inspect the emulator log for the process exit, fix what it reports, then run `stim android` again." : await androidBootRemedy(pressure)
|
|
621
647
|
};
|
|
622
648
|
}
|
|
623
649
|
async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot, timeoutMs, out, logFile = null, alive = pidExists }) {
|
|
@@ -627,7 +653,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
627
653
|
};
|
|
628
654
|
let resolved;
|
|
629
655
|
try {
|
|
630
|
-
resolved = await resolveOwnedAvdSerialAsync(device.avdName);
|
|
656
|
+
resolved = await resolveOwnedAvdSerialAsync(device.avdName, { preferredSerial: device.consolePort ? `emulator-${device.consolePort}` : void 0 });
|
|
631
657
|
} catch (e) {
|
|
632
658
|
return {
|
|
633
659
|
failed: true,
|
|
@@ -643,8 +669,8 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
643
669
|
reason: `AVD ${device.avdName} is not Stim-owned; refusing to boot it.`
|
|
644
670
|
};
|
|
645
671
|
const avdName = device.avdName;
|
|
646
|
-
const booted = (result) => {
|
|
647
|
-
if (!result.failed) clearAndroidBootPending(projectPath, avdName, slot);
|
|
672
|
+
const booted = async (result) => {
|
|
673
|
+
if (!result.failed) await withConfigLockAsync$1(() => clearAndroidBootPending(projectPath, avdName, slot));
|
|
648
674
|
return result;
|
|
649
675
|
};
|
|
650
676
|
if (resolved.serial) return booted(await waitForAndroidBoot({
|
|
@@ -659,14 +685,15 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
659
685
|
out
|
|
660
686
|
}));
|
|
661
687
|
const boot = async () => {
|
|
662
|
-
const
|
|
688
|
+
const livePorts = liveAndroidConsolePorts();
|
|
689
|
+
const claim = await withConfigLockAsync$1(() => claimAndroidConsolePort({
|
|
663
690
|
projectPath,
|
|
664
691
|
slot,
|
|
665
692
|
avdName,
|
|
666
693
|
deviceName: device.deviceName,
|
|
667
|
-
livePorts
|
|
694
|
+
livePorts,
|
|
668
695
|
metadata: device
|
|
669
|
-
});
|
|
696
|
+
}));
|
|
670
697
|
const serial = `emulator-${claim.consolePort}`;
|
|
671
698
|
reportAndroidMemoryPressure(out);
|
|
672
699
|
out(chalk.dim(phaseLine("device", `booting ${avdName} as ${serial}`)));
|
|
@@ -674,7 +701,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
674
701
|
try {
|
|
675
702
|
pid = await bootAndroidEmulator(avdName, claim.consolePort, { logFile });
|
|
676
703
|
} catch (e) {
|
|
677
|
-
releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
|
|
704
|
+
await withConfigLockAsync$1(() => releaseAndroidConsolePort(projectPath, claim.consolePort, slot));
|
|
678
705
|
return {
|
|
679
706
|
failed: true,
|
|
680
707
|
reason: `Could not start emulator for AVD ${avdName}: ${e?.message || e}`
|
|
@@ -687,7 +714,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
687
714
|
alive,
|
|
688
715
|
out
|
|
689
716
|
});
|
|
690
|
-
if (result.failed) releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
|
|
717
|
+
if (result.failed) await withConfigLockAsync$1(() => releaseAndroidConsolePort(projectPath, claim.consolePort, slot));
|
|
691
718
|
else await muteBootedEmulator(serial, avdName, out);
|
|
692
719
|
return booted(result);
|
|
693
720
|
};
|
|
@@ -721,7 +748,7 @@ function didSetUpDevice(device, remote) {
|
|
|
721
748
|
return remote ? void 0 : Boolean(device.setup || device.booting);
|
|
722
749
|
}
|
|
723
750
|
async function ensureOwnedDevice({ platform, project, projectPath, slot, settingsRoot = projectPath, label = ownedDeviceLabel(projectPath), settings, flags = {}, note = () => {}, out = () => {}, logFile = null, alive = pidExists, configureAvd = configureNewOwnedAvd, teardownAvd = teardownOwnedAvd, reconcileIosSimulator = reconcileSimSlim, simSnapshot }) {
|
|
724
|
-
clearDeviceIdleShutdown(projectPath, platform, slot);
|
|
751
|
+
await clearDeviceIdleShutdown(projectPath, platform, slot);
|
|
725
752
|
if (slot && slot !== "default") label = `${label}-${slot}`;
|
|
726
753
|
const record = deviceSlotPlatforms(project, slot)?.[platform] ?? null;
|
|
727
754
|
if (platform === "ios") return ensureOwnedIosDevice({
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-
|
|
1
|
+
import { b as operationState, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-BZhXY15H.mjs";
|
|
3
3
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { r as clockTime } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { m as resolveScheme, v as xcodebuildArgs } from "./xcode-
|
|
11
|
-
import { a as discoverXcodeProject } from "./react-native-build-
|
|
12
|
-
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-
|
|
13
|
-
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-
|
|
14
|
-
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-
|
|
15
|
-
import { t as selectFromPool } from "./device-pool-
|
|
16
|
-
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-
|
|
17
|
-
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-
|
|
4
|
+
import { r as clockTime } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { J as resolveProjectSettings, Ut as makeTemporaryDirectory, Wt as removeTemporaryEntry, nt as settingValueAt, q as resolveIosProjectDir } from "./settings-B5tCoq9N.mjs";
|
|
6
|
+
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-BiC68mIp.mjs";
|
|
7
|
+
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, rt as resolvePhysicalDevice, s as androidPoolCandidates } from "./android-Cjcj8MCw.mjs";
|
|
8
|
+
import { zn as runProcessOperation } from "./budget-HyShrIpL.mjs";
|
|
9
|
+
import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-BpjwrQXU.mjs";
|
|
10
|
+
import { m as resolveScheme, v as xcodebuildArgs } from "./xcode-CiIIDnuD.mjs";
|
|
11
|
+
import { a as discoverXcodeProject } from "./react-native-build-CwZB-agu.mjs";
|
|
12
|
+
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-ogEeJ62K.mjs";
|
|
13
|
+
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-qKcbgmI5.mjs";
|
|
14
|
+
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-4c_qXvQm.mjs";
|
|
15
|
+
import { t as selectFromPool } from "./device-pool-BIg8MU8l.mjs";
|
|
16
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-CKSvk0bu.mjs";
|
|
17
|
+
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-Cv4l-obn.mjs";
|
|
18
18
|
import { existsSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
19
19
|
import { homedir } from "node:os";
|
|
20
20
|
import { join } from "node:path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, d as workspaceProcessLockError, u as withWorkspaceProcessLock } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { G as projectDeviceSlots, H as deviceSlotPlatforms, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-
|
|
4
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
5
|
-
import { g as deviceReclaimIdleMinutesSetting } from "./settings-
|
|
3
|
+
import { G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { g as deviceReclaimIdleMinutesSetting } from "./settings-B5tCoq9N.mjs";
|
|
6
|
+
import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-Cjcj8MCw.mjs";
|
|
6
7
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
7
|
-
import {
|
|
8
|
+
import { J as recordCapacityRefusal, Y as recordCapacityWait } from "./budget-HyShrIpL.mjs";
|
|
8
9
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-CJmUOV5x.mjs";
|
|
10
|
+
import { p as withIdleWorkspace } from "./workspaces-C9w4aeXF.mjs";
|
|
11
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-BQzvJlzw.mjs";
|
|
12
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-BIyfl0Zj.mjs";
|
|
13
13
|
import { realpathSync } from "node:fs";
|
|
14
14
|
import { basename, join } from "node:path";
|
|
15
15
|
import { LOG_ROTATE_BYTES, workspaceId } from "@stim-cli/core";
|
|
@@ -524,24 +524,28 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
|
|
|
524
524
|
await sleep(Math.min(2e3, Math.max(0, waitMs - elapsedMs)));
|
|
525
525
|
}
|
|
526
526
|
} catch (error) {
|
|
527
|
-
if (error instanceof DeviceAdmissionRefusal && error.code === "STIM_AT_CAPACITY")
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
527
|
+
if (error instanceof DeviceAdmissionRefusal && error.code === "STIM_AT_CAPACITY") {
|
|
528
|
+
const at = now();
|
|
529
|
+
await withConfigLockAsync$1(() => recordCapacityRefusal({
|
|
530
|
+
platform: device.platform,
|
|
531
|
+
max,
|
|
532
|
+
workspace
|
|
533
|
+
}, at)).catch(() => {});
|
|
534
|
+
}
|
|
532
535
|
throw error;
|
|
533
536
|
} finally {
|
|
534
537
|
(0, ownership_claim_exports.releaseClaim)(ticket);
|
|
535
538
|
if (visibleWait) waitingFor(null);
|
|
536
539
|
if (started !== void 0) {
|
|
537
540
|
const ms = Math.max(0, Math.round(now() - started));
|
|
538
|
-
|
|
541
|
+
const at = now();
|
|
542
|
+
await withConfigLockAsync$1(() => recordCapacityWait({
|
|
539
543
|
platform: device.platform,
|
|
540
544
|
ms,
|
|
541
545
|
max,
|
|
542
546
|
workspace,
|
|
543
547
|
...reclaimed ? { reclaimed } : {}
|
|
544
|
-
},
|
|
548
|
+
}, at)).catch(() => {});
|
|
545
549
|
onWait(ms);
|
|
546
550
|
}
|
|
547
551
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { n as ensureWorkspaceStorage } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-
|
|
4
|
-
import { d as writeWorkspaceState } from "./workspace-state-
|
|
5
|
-
import { i as macosProcess, o as requiredMacosRecord } from "./state-
|
|
3
|
+
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { d as writeWorkspaceState } from "./workspace-state-CPSp3mav.mjs";
|
|
5
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-DPaM3u5K.mjs";
|
|
6
|
+
import { A as listAdbDevices, D as getAvdNameForSerial, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, M as listAvdDeviceProfiles, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, ct as waitForBoot, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, nt as resolveOwnedAvdSerialAsync, t as DEFAULT_AVD_DEVICE_PROFILE, tt as resetAdoptedAvd, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-Cjcj8MCw.mjs";
|
|
7
|
+
import { n as forgetCreatedDeviceAsync } from "./created-devices-D2Aca-xu.mjs";
|
|
8
|
+
import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-saBeB4lr.mjs";
|
|
6
9
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { C as resetIosKeychain, P as readHostMemoryPressure, T as resolveIosCreation, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, k as uninstallIosApp, n as bootIosSim, w as resetIosPrivacy } from "./ios-hcBpnEGk.mjs";
|
|
12
|
-
import { r as stopMacosAppHeld } from "./stop-CR5689oB.mjs";
|
|
10
|
+
import { An as reverseMetroPorts, Dn as launchAndroidReleaseApp, En as launchAndroidApp, On as launchIosApp, Sn as installAndroidApp, Tn as iosAppProcess, jn as writeDebugHttpHost, mn as androidAppProcess, wn as installIosApp } from "./budget-HyShrIpL.mjs";
|
|
11
|
+
import { A as teardownOwnedIosSim, O as teardownOwnedAvd } from "./workspaces-C9w4aeXF.mjs";
|
|
12
|
+
import { C as resetIosKeychain, I as readHostMemoryPressure, T as resolveIosCreation, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, k as uninstallIosApp, n as bootIosSim, w as resetIosPrivacy } from "./ios-BQzvJlzw.mjs";
|
|
13
|
+
import { r as stopMacosAppHeld } from "./stop-COP6PQqw.mjs";
|
|
13
14
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
14
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { n as parseLogStreamLine } from "./ios-xtlRHaeB.mjs";
|
|
15
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-ZYaRALv5.mjs";
|
|
16
|
+
import { _ as findAapt } from "./support-Cxj9CmII.mjs";
|
|
17
|
+
import { t as waitForMacosRegistration } from "./registration-CN6nlhcD.mjs";
|
|
18
|
+
import { n as parseLogStreamLine } from "./ios-ENC4sRPA.mjs";
|
|
19
19
|
import { createHash, randomUUID } from "node:crypto";
|
|
20
20
|
import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
|
|
21
21
|
import { availableParallelism, freemem, homedir, loadavg } from "node:os";
|
|
@@ -652,7 +652,7 @@ async function runHostedDevice(mode, selectors, app) {
|
|
|
652
652
|
if (outcome.status !== "torn-down" && outcome.status !== "missing") throw new Error(outcome.reason ?? "Hosted simulator teardown was not established.");
|
|
653
653
|
const after = inventory().find((sim) => sim.udid === device.udid);
|
|
654
654
|
if (after) throw new Error(`Hosted simulator ${device.udid} is still listed (${after.state}); deletion could not be verified. If its runtime is unavailable, delete it with xcrun simctl delete and stop the session again.`);
|
|
655
|
-
|
|
655
|
+
await forgetCreatedDeviceAsync("ios", device.udid);
|
|
656
656
|
removeHostedAppData(home);
|
|
657
657
|
return {
|
|
658
658
|
state: "stopped",
|
|
@@ -851,7 +851,7 @@ async function runHostedAndroidDevice(mode, request, app) {
|
|
|
851
851
|
const name = device.avdName;
|
|
852
852
|
if ((await listAvdsAsync({ timeoutMs: 5e3 })).includes(name) || avdStorageRoots().some((root) => avdPathExists(join(root, `${name}.ini`)) || avdPathExists(join(root, `${name}.avd`)))) throw new Error("The hosted AVD or its data still exists; deletion could not be verified.");
|
|
853
853
|
if (await getAvdNameForSerialAsync(device.serial) === device.avdName) throw new Error("The hosted Android emulator is still running.");
|
|
854
|
-
if (ledger === "listed")
|
|
854
|
+
if (ledger === "listed") await forgetCreatedDeviceAsync("android", device.avdName);
|
|
855
855
|
removeHostedAppData(home);
|
|
856
856
|
return {
|
|
857
857
|
state: "stopped",
|