stim 1.21.0 → 1.22.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 +60 -7
- package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-Co2k4f7O.mjs} +21 -3
- package/dist/{act-DHAw2A2S.mjs → act-DsuqEkiM.mjs} +298 -164
- package/dist/{activity-BzVfHSrY.mjs → activity-CMLmzp7o.mjs} +33 -12
- package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-DUFaTMdd.mjs} +7 -7
- package/dist/{android-BLgbNqox.mjs → android-ByRMUoiJ.mjs} +66 -52
- package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
- package/dist/{android-CV_GCELZ.mjs → android-DGkNqa_c.mjs} +5 -5
- package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
- package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
- package/dist/api.d.mts +132 -118
- package/dist/api.mjs +239 -42
- package/dist/{artifact-B8T3S5gi.mjs → artifact-8EY8SAPw.mjs} +40 -35
- package/dist/{artifact-DAuZ-FNU.mjs → artifact-DJPy518Y.mjs} +69 -40
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-QQzVjz3O.mjs → browser-web-Bcv99PBM.mjs} +187 -59
- package/dist/{budget-Bs6SxxzO.mjs → budget-Cvwn54qV.mjs} +830 -699
- package/dist/{build-CoPzQRNw.mjs → build-CabC3G23.mjs} +34 -27
- package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
- package/dist/{build-plan-CaFskB7_.mjs → build-plan-DUC8Ka9y.mjs} +74 -14
- package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-BJRZ9pG3.mjs → ccache-Btwc36-I.mjs} +6 -6
- package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
- package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
- package/dist/{cli-0DYf8QhQ.mjs → cli-CHZa9Lvk.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-UXD70ZbM.mjs → client-OyRoEuSr.mjs} +218 -47
- package/dist/collector-run.d.mts +1 -1
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-B1UrjZHL.mjs → command-output-gwpm28fu.mjs} +1 -1
- package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
- package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
- package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
- package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-UOeESKm6.mjs → dev-client-BSDR5h3F.mjs} +2 -2
- package/dist/{device-ExJq8Ei7.mjs → device-B-L3Fbxy.mjs} +71 -14
- package/dist/{device-DCxH7_By.mjs → device-DklWZLqb.mjs} +16 -16
- package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-DK5_EwRS.mjs} +9 -10
- package/dist/device-host-worker.mjs +25 -32
- package/dist/{device-ios-DRUeKaFV.mjs → device-ios-DoB6KFCO.mjs} +39 -16
- package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-xJPQ_QQG.mjs} +5 -5
- package/dist/{device-pool-DMRpVX9a.mjs → device-pool-BMkdsefq.mjs} +3 -3
- package/dist/{doctor-DTvaDOda.mjs → doctor-Bo7BXLux.mjs} +24 -37
- package/dist/{doctor-Dhqebm0q.mjs → doctor-D5_EzwfA.mjs} +19 -16
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-BLHCYxzi.mjs → doctor-thjWAV0z.mjs} +1 -1
- package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-N2wDotwQ.mjs} +5 -5
- package/dist/{eas-build-BomfRnFT.mjs → eas-build-CwknaQYj.mjs} +4 -4
- package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-CSgAulr5.mjs} +27 -18
- package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-DlY_serQ.mjs} +8 -7
- package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-DBWO2rxE.mjs} +10 -10
- package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
- package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
- package/dist/{gc-_-dCXdyL.mjs → gc-CXxN-4SE.mjs} +587 -313
- package/dist/gc-DnNDQyaP.mjs +3 -0
- package/dist/{guide-Yqwt2bd6.mjs → guide-Br0LEfKy.mjs} +239 -43
- package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-B-9f-jkd.mjs} +6 -6
- package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-DZAPrcro.mjs} +4 -4
- package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
- package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-FIRx9X2f.mjs} +5 -5
- package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-_awYSpfv.mjs} +21 -12
- package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-BdzE668-.mjs} +27 -14
- package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
- package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DDg3SdvY.mjs} +7 -7
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-CQ68hG9s.mjs → ios-Ds1clbIt.mjs} +8 -8
- package/dist/{ios-device-CwFMehUS.mjs → ios-device--h_-8ENa.mjs} +3 -3
- package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
- package/dist/{ios-ubFsBzwq.mjs → ios-pm4nL6By.mjs} +59 -50
- package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CZhKODF3.mjs} +5 -5
- package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
- package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Cc1dttps.mjs → js-swap-Bwhh4S7V.mjs} +7 -29
- package/dist/{launch-Zq2mOSDy.mjs → launch-BjxemNpK.mjs} +40 -39
- package/dist/{launch-CD1yVc7U.mjs → launch-CCzXlc8r.mjs} +16 -16
- package/dist/{logs-BS00Anxf.mjs → logs-BfwwadsZ.mjs} +151 -24
- package/dist/{logs-CMm05HxN.mjs → logs-jTS_lHSo.mjs} +10 -17
- package/dist/{macos-B65--pPd.mjs → macos-DVlSSyUg.mjs} +1 -1
- package/dist/{macos-C-0qJ6zq.mjs → macos-NfV2D7dO.mjs} +143 -46
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +8 -8
- package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
- package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
- package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
- package/dist/{native-android-JACyjTZs.mjs → native-android-CqgnOgsT.mjs} +43 -242
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
- package/dist/{native-run-DY_RLx3C.mjs → native-run-NwUuxbkg.mjs} +4 -5
- package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-B7KIafpM.mjs} +8 -7
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-D_VOfFL7.mjs} +2 -3
- package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-BYDOHWLN.mjs} +27 -32
- package/dist/offload-worker.d.mts +65 -2
- package/dist/offload-worker.mjs +305 -73
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
- package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
- package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-DIsMtN-d.mjs} +12 -8
- package/dist/{ports-D-MmCTdv.mjs → ports-Cy1RkmuQ.mjs} +3 -3
- package/dist/{prebuild-uD_ipCxF.mjs → prebuild-D4JoEAEs.mjs} +49 -14
- package/dist/{project-BZNjmW_8.mjs → project-wM_XFTvE.mjs} +16 -16
- package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
- package/dist/pull-requests.d.mts +2 -2
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-6OZ7MSM7.mjs} +71 -48
- package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-Dvd8hC21.mjs} +8 -8
- package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-DsoSF1Y9.mjs} +7 -7
- package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-4u1Rn-GR.mjs} +40 -26
- package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-CmTRFJaX.mjs → reload-BzkYabB-.mjs} +16 -15
- package/dist/{reload-DzjSl5P_.mjs → reload-D7AVlb8N.mjs} +1 -1
- package/dist/{remote-ByYkXdGD.mjs → remote-DjGDmlTZ.mjs} +18 -15
- package/dist/{result-DNiS-tTP.mjs → result-D2Ykz_iD.mjs} +24 -23
- package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
- package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
- package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
- package/dist/{server-command-CtzloH3v.mjs → server-command-C6QjeupS.mjs} +5 -5
- package/dist/{server-expo-DT_F_uVI.mjs → server-expo-CrjB29pq.mjs} +7 -5
- package/dist/server-expo-D58c9L0M.mjs +2 -0
- package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
- package/dist/{settings-T1gtc3bf.mjs → settings-DpR-1Wnn.mjs} +1 -1
- package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-CzD60rOD.mjs} +7 -6
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
- package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-CbfmNgM6.mjs} +6 -6
- package/dist/{stage-BIS0ydsV.mjs → stage-Bps5oius.mjs} +21 -4
- package/dist/{start-RChynRDp.mjs → start-Br-oxqMD.mjs} +1 -1
- package/dist/{start-7lpH7hmN.mjs → start-EojN4WFz.mjs} +622 -393
- package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
- package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
- package/dist/{stats-53T7OTb9.mjs → stats-D3GerlFW.mjs} +5 -5
- package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
- package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
- package/dist/{status-CSi6tlRq.mjs → status-EvrK72L2.mjs} +1 -1
- package/dist/{status-BL7jVyAB.mjs → status-WBDajew2.mjs} +43 -29
- package/dist/{status-watch-GDCfqpTE.mjs → status-watch-Bg_u-pwR.mjs} +48 -16
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
- package/dist/{stop-Bk_1qiV6.mjs → stop-DTZ9uTw3.mjs} +2 -2
- package/dist/{stop-D7h6jAXQ.mjs → stop-Dky10AEJ.mjs} +31 -22
- package/dist/{stop-CPzlM1L-.mjs → stop-Mv6W9FAk.mjs} +15 -16
- package/dist/supervisor-run.d.mts +3 -3
- package/dist/supervisor-run.mjs +28 -36
- package/dist/{support-Dlu37g6H.mjs → support-CNioewsd.mjs} +10 -10
- package/dist/{support-67vraa1Q.mjs → support-yUiOjnVY.mjs} +8 -8
- package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
- package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
- package/dist/toolchain-BY8X8HXx.mjs +2 -0
- package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-DpJMHq0n.mjs} +9 -6
- package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
- package/dist/web-CZ07gd77.mjs +2 -0
- package/dist/{web-CJmIj6AI.mjs → web-DKx6yoFA.mjs} +11 -10
- package/dist/web-run.mjs +11 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
- package/dist/{workspaces-BccMFmGQ.mjs → workspaces-CpANmBlq.mjs} +594 -266
- package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-CHecZ4Oq.mjs} +850 -551
- package/dist/worktree-ZqZVjD9K.mjs +2 -0
- package/dist/{xcode-Zlx3qjEs.mjs → xcode-BXn9-xYx.mjs} +5 -5
- package/package.json +7 -7
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/dist/gc-C-WwL0yi.mjs +0 -3
- package/dist/git-C3iTsJaZ.mjs +0 -73
- package/dist/server-expo-C-90EhcG.mjs +0 -2
- package/dist/settings-DkdmlelE.d.mts +0 -15
- package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
- package/dist/toolchain-DhKwp9iI.mjs +0 -2
- package/dist/trigger-Bf3uDcpv.mjs +0 -2
- package/dist/web-DknQETPs.mjs +0 -2
- package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
- package/dist/worktree-CK2MpJW5.mjs +0 -2
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as withConfigLock,
|
|
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 { A as
|
|
9
|
-
import { I as memoryCulpritAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, d as listAllIosSims } from "./ios-
|
|
10
|
-
import { t as clearDeviceIdleShutdown } from "./idle-shutdown-
|
|
11
|
-
import { i as countLiveOwnedDevices, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-
|
|
12
|
-
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-
|
|
13
|
-
import { t as reconcileSimSlim } from "./simslim-
|
|
1
|
+
import { t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
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-DlrsduwG.mjs";
|
|
3
|
+
import { l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
4
|
+
import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-C7O8A6ZI.mjs";
|
|
5
|
+
import { s as ownedDeviceLabel } from "./project-wM_XFTvE.mjs";
|
|
6
|
+
import { c as pidExists } from "./metro-DiXtA3Ty.mjs";
|
|
7
|
+
import { A as teardownParkedAvd, D as teardownOwnedAvd } from "./workspaces-CpANmBlq.mjs";
|
|
8
|
+
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, _t as parkedMaxSetting, b as configureNewOwnedAvd, et as resolveOwnedAvdSerialAsync, f as assertOwnedAvdStopped, ft as adoptParked, ht as isLegacyDeletionClaim, j as listAdbDevicesAsync, n as OWNED_AVD_CONFIG_DEFAULTS, ot as waitForBoot, t as DEFAULT_AVD_DEVICE_PROFILE, vt as readParked, x as createOwnedAvd, y as bootAndroidEmulator, z as nextConsolePort } from "./android-C7sVmyI9.mjs";
|
|
9
|
+
import { I as memoryCulpritAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, d as listAllIosSims } from "./ios-hcBpnEGk.mjs";
|
|
10
|
+
import { t as clearDeviceIdleShutdown } from "./idle-shutdown-DDg3SdvY.mjs";
|
|
11
|
+
import { i as countLiveOwnedDevices, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-DK5_EwRS.mjs";
|
|
12
|
+
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-DoB6KFCO.mjs";
|
|
13
|
+
import { t as reconcileSimSlim } from "./simslim-BNckWpXi.mjs";
|
|
14
|
+
import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
|
|
14
15
|
import { randomUUID } from "node:crypto";
|
|
16
|
+
import { existsSync } from "node:fs";
|
|
15
17
|
import { isDeepStrictEqual } from "node:util";
|
|
18
|
+
import { fileURLToPath } from "node:url";
|
|
16
19
|
import { captureProcessIdentity } from "@stim-cli/core/process-identity";
|
|
17
|
-
import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
|
|
18
20
|
import chalk from "chalk";
|
|
19
21
|
import { request } from "node:http";
|
|
20
22
|
//#region src/engine/metro-warmup.ts
|
|
@@ -491,6 +493,7 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
|
|
|
491
493
|
const running = await getAvdNameForSerialAsync(serial);
|
|
492
494
|
if (running && running !== avdName) throw new Error(`${serial} is running AVD ${running}, not this workspace's owned AVD ${avdName}; refusing to use it.`);
|
|
493
495
|
clearAndroidBootPending(projectPath, avdName, slot);
|
|
496
|
+
await muteBootedEmulator(serial, avdName, out);
|
|
494
497
|
const { bootPending: _booted, ...booted } = claim;
|
|
495
498
|
return {
|
|
496
499
|
...booted,
|
|
@@ -507,6 +510,59 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
|
|
|
507
510
|
out
|
|
508
511
|
});
|
|
509
512
|
}
|
|
513
|
+
async function muteBootedEmulator(serial, avdName, out) {
|
|
514
|
+
const exec = getExecutor();
|
|
515
|
+
try {
|
|
516
|
+
const helper = ["../shim/android-audio.jar", "../../shim/android-audio.jar"].map((path) => fileURLToPath(new URL(path, import.meta.url))).find(existsSync);
|
|
517
|
+
if (!helper) throw new Error("Stim installation is missing shim/android-audio.jar.");
|
|
518
|
+
const remote = `/data/local/tmp/stim-audio-${randomUUID()}.jar`;
|
|
519
|
+
const adb = async (args) => {
|
|
520
|
+
if (await getAvdNameForSerialAsync(serial) !== avdName) throw new Error("The emulator no longer matches this workspace; media volume was not confirmed.");
|
|
521
|
+
return exec.runFileAsync("adb", [
|
|
522
|
+
"-s",
|
|
523
|
+
serial,
|
|
524
|
+
...args
|
|
525
|
+
], { timeoutMs: 3e4 });
|
|
526
|
+
};
|
|
527
|
+
try {
|
|
528
|
+
await adb([
|
|
529
|
+
"push",
|
|
530
|
+
helper,
|
|
531
|
+
remote
|
|
532
|
+
]);
|
|
533
|
+
await adb([
|
|
534
|
+
"shell",
|
|
535
|
+
`CLASSPATH=${remote}`,
|
|
536
|
+
"app_process",
|
|
537
|
+
"/system/bin",
|
|
538
|
+
"dev.stim.audio.Main",
|
|
539
|
+
"0"
|
|
540
|
+
]);
|
|
541
|
+
} finally {
|
|
542
|
+
await adb([
|
|
543
|
+
"shell",
|
|
544
|
+
"rm",
|
|
545
|
+
"-f",
|
|
546
|
+
remote
|
|
547
|
+
]);
|
|
548
|
+
}
|
|
549
|
+
const readback = await exec.runFileAsync("adb", [
|
|
550
|
+
"-s",
|
|
551
|
+
serial,
|
|
552
|
+
"shell",
|
|
553
|
+
"cmd",
|
|
554
|
+
"media_session",
|
|
555
|
+
"volume",
|
|
556
|
+
"--stream",
|
|
557
|
+
"3",
|
|
558
|
+
"--get"
|
|
559
|
+
], { timeoutMs: 3e4 });
|
|
560
|
+
if (!/\bvolume is 0 in range \[0\.\.\d+\]/.test(readback)) throw new Error("Android did not confirm media volume zero for this emulator.");
|
|
561
|
+
out(chalk.dim(phaseLine("device", "emulator media muted; turn on Media sound in its Stim Desktop options")));
|
|
562
|
+
} catch (error) {
|
|
563
|
+
out(chalk.yellow(phaseLine("device", `Could not mute emulator media: ${error instanceof Error ? error.message : String(error)}`)));
|
|
564
|
+
}
|
|
565
|
+
}
|
|
510
566
|
function reportAndroidMemoryPressure(out) {
|
|
511
567
|
const pressure = readHostMemoryPressure();
|
|
512
568
|
if (pressure === "warning" || pressure === "critical") {
|
|
@@ -632,6 +688,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
632
688
|
out
|
|
633
689
|
});
|
|
634
690
|
if (result.failed) releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
|
|
691
|
+
else await muteBootedEmulator(serial, avdName, out);
|
|
635
692
|
return booted(result);
|
|
636
693
|
};
|
|
637
694
|
try {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { G as
|
|
1
|
+
import { m as operationState, t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-DlrsduwG.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 { In as runProcessOperation } from "./budget-
|
|
8
|
-
import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-
|
|
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-gwpm28fu.mjs";
|
|
5
|
+
import { Ht as makeTemporaryDirectory, K as resolveIosProjectDir, Ut as removeTemporaryEntry, q as resolveProjectSettings, tt as settingValueAt } from "./settings-C7O8A6ZI.mjs";
|
|
6
|
+
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-wM_XFTvE.mjs";
|
|
7
|
+
import { In as runProcessOperation } from "./budget-Cvwn54qV.mjs";
|
|
8
|
+
import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-CMLmzp7o.mjs";
|
|
9
|
+
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, s as androidPoolCandidates, tt as resolvePhysicalDevice } from "./android-C7sVmyI9.mjs";
|
|
10
|
+
import { m as resolveScheme, v as xcodebuildArgs } from "./xcode-BXn9-xYx.mjs";
|
|
11
|
+
import { a as discoverXcodeProject } from "./react-native-build-Dvd8hC21.mjs";
|
|
12
|
+
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-xJPQ_QQG.mjs";
|
|
13
|
+
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-CNioewsd.mjs";
|
|
14
|
+
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-BtAffm0A.mjs";
|
|
15
|
+
import { t as selectFromPool } from "./device-pool-BMkdsefq.mjs";
|
|
16
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device--h_-8ENa.mjs";
|
|
17
|
+
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-D_VOfFL7.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,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as workspaceProcessLockError, i as withWorkspaceProcessLock, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import {
|
|
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, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
5
|
+
import { g as deviceReclaimIdleMinutesSetting } from "./settings-C7O8A6ZI.mjs";
|
|
6
6
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
7
|
-
import { K as recordCapacityRefusal, q as recordCapacityWait } from "./budget-
|
|
7
|
+
import { K as recordCapacityRefusal, q as recordCapacityWait } from "./budget-Cvwn54qV.mjs";
|
|
8
8
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
9
|
-
import { f as withIdleWorkspace } from "./workspaces-
|
|
10
|
-
import { A as
|
|
11
|
-
import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DaKmZi0z.mjs";
|
|
9
|
+
import { f as withIdleWorkspace } from "./workspaces-CpANmBlq.mjs";
|
|
10
|
+
import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-C7sVmyI9.mjs";
|
|
11
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-hcBpnEGk.mjs";
|
|
12
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DDg3SdvY.mjs";
|
|
14
13
|
import { realpathSync } from "node:fs";
|
|
15
14
|
import { basename, join } from "node:path";
|
|
16
15
|
import { LOG_ROTATE_BYTES, workspaceId } from "@stim-cli/core";
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.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-DlrsduwG.mjs";
|
|
4
|
+
import { d as writeWorkspaceState } from "./workspace-state-U08dEzhG.mjs";
|
|
5
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-08I3hw3_.mjs";
|
|
6
6
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
7
|
-
import { Cn as launchAndroidApp, Dn as reverseMetroPorts, On as writeDebugHttpHost, Sn as iosAppProcess, Tn as launchIosApp, dn as androidAppProcess, wn as launchAndroidReleaseApp, xn as installIosApp, yn as installAndroidApp } from "./budget-
|
|
8
|
-
import {
|
|
9
|
-
import { t as forgetCreatedDevice } from "./created-devices-
|
|
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-
|
|
12
|
-
import { r as stopMacosAppHeld } from "./stop-
|
|
13
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-CMlqEcvw.mjs";
|
|
14
|
-
import { n as parseLogcatLine, r as parsePidof, t as androidClockOffset } from "./android-BEJ8Jpl7.mjs";
|
|
7
|
+
import { Cn as launchAndroidApp, Dn as reverseMetroPorts, On as writeDebugHttpHost, Sn as iosAppProcess, Tn as launchIosApp, dn as androidAppProcess, wn as launchAndroidReleaseApp, xn as installIosApp, yn as installAndroidApp } from "./budget-Cvwn54qV.mjs";
|
|
8
|
+
import { D as teardownOwnedAvd, k as teardownOwnedIosSim } from "./workspaces-CpANmBlq.mjs";
|
|
9
|
+
import { t as forgetCreatedDevice } from "./created-devices-x9rN6bhs.mjs";
|
|
10
|
+
import { $ as resetAdoptedAvd, 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, d as androidToolPath, et as resolveOwnedAvdSerialAsync, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, ot as waitForBoot, t as DEFAULT_AVD_DEVICE_PROFILE, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-C7sVmyI9.mjs";
|
|
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-Dky10AEJ.mjs";
|
|
15
13
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
16
|
-
import {
|
|
17
|
-
import { n as
|
|
14
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-DK5_EwRS.mjs";
|
|
15
|
+
import { n as parseLogcatLine, r as parsePidof, t as androidClockOffset } from "./android-DR5lZ2Az.mjs";
|
|
16
|
+
import { _ as findAapt } from "./support-yUiOjnVY.mjs";
|
|
17
|
+
import { t as waitForMacosRegistration } from "./registration-BcRgF6Ox.mjs";
|
|
18
|
+
import { n as parseLogStreamLine } from "./ios-xtlRHaeB.mjs";
|
|
18
19
|
import { createHash, randomUUID } from "node:crypto";
|
|
19
20
|
import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
|
|
20
21
|
import { availableParallelism, freemem, homedir, loadavg } from "node:os";
|
|
21
22
|
import { dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
22
23
|
import { LOG_ROTATE_BYTES, configDir, withDirLock, withDirLockAsync } from "@stim-cli/core";
|
|
23
|
-
import { assertHostedDeviceLedger, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedMacosAppSlot, hostedMacosBundleId, hostedNativeLogsDir, isJsonObject, parseHostedOfferRequest, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedNativeLogsCheckpoint,
|
|
24
|
+
import { assertHostedDeviceLedger, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedMacosAppSlot, hostedMacosBundleId, hostedNativeLogsDir, isJsonObject, parseHostedOfferRequest, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedNativeLogsCheckpoint, readNdjsonGenerations } from "@stim-cli/core/state";
|
|
24
25
|
//#region src/device-host/android-app.ts
|
|
25
26
|
async function digest$1(path) {
|
|
26
27
|
const hash = createHash("sha256");
|
|
@@ -1071,7 +1072,6 @@ async function runHostedMacosApp(mode, request, app) {
|
|
|
1071
1072
|
});
|
|
1072
1073
|
const fd = openSync(join(home, "macos-supervisor.log"), "a", 384);
|
|
1073
1074
|
let child;
|
|
1074
|
-
let spawnError;
|
|
1075
1075
|
const env = {};
|
|
1076
1076
|
for (const key of [
|
|
1077
1077
|
"PATH",
|
|
@@ -1099,31 +1099,24 @@ async function runHostedMacosApp(mode, request, app) {
|
|
|
1099
1099
|
stdio: [
|
|
1100
1100
|
"ignore",
|
|
1101
1101
|
fd,
|
|
1102
|
-
fd
|
|
1102
|
+
fd,
|
|
1103
|
+
"ipc"
|
|
1103
1104
|
],
|
|
1104
1105
|
cwd: canonicalRunRoot,
|
|
1105
1106
|
env
|
|
1106
1107
|
});
|
|
1107
|
-
child.once("error", (error) => {
|
|
1108
|
-
spawnError = error;
|
|
1109
|
-
});
|
|
1110
1108
|
child.unref();
|
|
1111
1109
|
} finally {
|
|
1112
1110
|
closeSync(fd);
|
|
1113
1111
|
}
|
|
1114
1112
|
const deadline = Date.now() + 2e4;
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
pid: current.app.pid
|
|
1123
|
-
};
|
|
1124
|
-
if (child.exitCode !== null || child.signalCode !== null) break;
|
|
1125
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
1126
|
-
}
|
|
1113
|
+
const current = await waitForMacosRegistration(canonicalRunRoot, launch.launchId, child, deadline);
|
|
1114
|
+
if (current?.app) return {
|
|
1115
|
+
state: "installed",
|
|
1116
|
+
device,
|
|
1117
|
+
launched: true,
|
|
1118
|
+
pid: current.app.pid
|
|
1119
|
+
};
|
|
1127
1120
|
throw new Error("The hosted macOS app did not register. See macos-supervisor.log in the worker home.");
|
|
1128
1121
|
} catch (error) {
|
|
1129
1122
|
return {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as withWorkspaceProcessLock, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { f as workspaceId$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { C as saveConfig, D as withConfigLock,
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { l as runtimeMismatch, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal, o as deviceTypeMismatch } from "./device-capacity-
|
|
3
|
+
import { C as saveConfig, D as withConfigLock$1, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, d as getConfigDir, w as setDevice } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
5
|
+
import { u as cancellableSleep } from "./operation-exec-BW0em61G.mjs";
|
|
6
|
+
import { T as iosSimSlimProfileSetting } from "./settings-C7O8A6ZI.mjs";
|
|
7
|
+
import { j as teardownParkedIosSim } from "./workspaces-CpANmBlq.mjs";
|
|
8
|
+
import { _t as parkedMaxSetting, bt as selectParked, ft as adoptParked, pt as dropParked, vt as readParked } from "./android-C7sVmyI9.mjs";
|
|
9
|
+
import { A as configuredIosSimulatorViewer, C as resetIosKeychain, E as resolveOwnedIosSim, M as hostMemoryPressureAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, S as renameIosSim, T as resolveIosCreation, _ 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 resetIosPrivacy, y as parseRuntimeVersion } from "./ios-hcBpnEGk.mjs";
|
|
10
|
+
import { l as runtimeMismatch, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal, o as deviceTypeMismatch } from "./device-capacity-DK5_EwRS.mjs";
|
|
11
11
|
import { ambientContext } from "@stim-cli/core";
|
|
12
|
+
import { isJsonObject } from "@stim-cli/core/state";
|
|
12
13
|
import chalk from "chalk";
|
|
13
14
|
//#region src/engine/device-ios.ts
|
|
14
15
|
function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlotWait) {
|
|
@@ -23,6 +24,7 @@ function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlo
|
|
|
23
24
|
simulatorApp,
|
|
24
25
|
env: ambientContext()?.env
|
|
25
26
|
});
|
|
27
|
+
await muteBootedSimulator(udid, out);
|
|
26
28
|
await configure();
|
|
27
29
|
}, {
|
|
28
30
|
...deviceSlotWait,
|
|
@@ -35,6 +37,26 @@ function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlo
|
|
|
35
37
|
done
|
|
36
38
|
};
|
|
37
39
|
}
|
|
40
|
+
async function muteBootedSimulator(udid, out) {
|
|
41
|
+
try {
|
|
42
|
+
const response = JSON.parse(await getExecutor().runFileAsync("xcrun", [
|
|
43
|
+
"devicectl",
|
|
44
|
+
"device",
|
|
45
|
+
"settings",
|
|
46
|
+
"audio",
|
|
47
|
+
"--device",
|
|
48
|
+
udid,
|
|
49
|
+
"--volume",
|
|
50
|
+
"0",
|
|
51
|
+
"--json-output",
|
|
52
|
+
"-"
|
|
53
|
+
], { timeoutMs: 3e4 }));
|
|
54
|
+
if (!isJsonObject(response) || !isJsonObject(response.info) || response.info.outcome !== "success" || !isJsonObject(response.result) || typeof response.result.deviceIdentifier !== "string" || response.result.deviceIdentifier.toUpperCase() !== udid.toUpperCase() || response.result.volume !== 0) throw new Error("Xcode did not confirm volume zero for this simulator.");
|
|
55
|
+
out(chalk.dim(phaseLine("device", "simulator muted; turn on Sound in its Stim Desktop options")));
|
|
56
|
+
} catch (error) {
|
|
57
|
+
out(chalk.yellow(phaseLine("device", `Could not mute this simulator: ${error instanceof Error ? error.message : String(error)}`)));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
38
60
|
var IosDeviceMismatchError = class extends Error {
|
|
39
61
|
remedy = "Run `stim worktree remove` (or `stim gc --delete`) to reap the current sim, then `stim ios` again to create the requested one, or pass `--slot <name>` to create it beside the current one.";
|
|
40
62
|
};
|
|
@@ -107,8 +129,8 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
|
|
|
107
129
|
return record;
|
|
108
130
|
}
|
|
109
131
|
}
|
|
110
|
-
await withConfigLockAsync(() => {
|
|
111
|
-
const current = deviceSlotPlatforms(loadConfig()?.projects?.[projectPath], slot)?.ios;
|
|
132
|
+
await withConfigLockAsync$1(() => {
|
|
133
|
+
const current = deviceSlotPlatforms(loadConfig$1()?.projects?.[projectPath], slot)?.ios;
|
|
112
134
|
if (!current) return;
|
|
113
135
|
if (current.deviceUdid !== record.deviceUdid || current.owned !== record.owned) throw new Error("The simulator assignment changed during recovery. Run `stim ios` again.");
|
|
114
136
|
clearDevice(projectPath, "ios", slot);
|
|
@@ -183,7 +205,7 @@ function withIosDeviceNameLock(fn) {
|
|
|
183
205
|
}
|
|
184
206
|
function ownedIosNameSuffix(label, model, projectPath, udid, listed) {
|
|
185
207
|
const names = new Set(listed.filter((sim) => sim.udid !== udid).map((sim) => sim.name));
|
|
186
|
-
for (const project of Object.values(loadConfig()?.projects ?? {})) for (const { platforms } of projectDeviceSlots(project)) {
|
|
208
|
+
for (const project of Object.values(loadConfig$1()?.projects ?? {})) for (const { platforms } of projectDeviceSlots(project)) {
|
|
187
209
|
const record = platforms.ios;
|
|
188
210
|
if (record?.deviceUdid !== udid && record?.deviceName) names.add(record.deviceName);
|
|
189
211
|
}
|
|
@@ -262,8 +284,8 @@ async function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
|
|
|
262
284
|
return null;
|
|
263
285
|
}
|
|
264
286
|
function clearIosAdoptionPending(projectPath, slot = "default") {
|
|
265
|
-
withConfigLock(() => {
|
|
266
|
-
const cfg = loadConfig();
|
|
287
|
+
withConfigLock$1(() => {
|
|
288
|
+
const cfg = loadConfig$1();
|
|
267
289
|
const ios = deviceSlotPlatforms(cfg?.projects?.[projectPath], slot)?.ios;
|
|
268
290
|
if (!cfg || !ios?.adoptionPending) return;
|
|
269
291
|
delete ios.adopted;
|
|
@@ -365,15 +387,16 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
|
|
|
365
387
|
await withDeviceBootAdmission({
|
|
366
388
|
platform: "ios",
|
|
367
389
|
key: udid
|
|
368
|
-
}, () => {
|
|
390
|
+
}, async () => {
|
|
369
391
|
out(chalk.dim(phaseLine("device", `booting ${sim.name} (${udid})`)));
|
|
370
|
-
|
|
392
|
+
await bootIosSim(udid, {
|
|
371
393
|
timeoutMs,
|
|
372
394
|
label: sim.name,
|
|
373
395
|
out,
|
|
374
396
|
simulatorApp,
|
|
375
397
|
env: ambientContext()?.env
|
|
376
398
|
});
|
|
399
|
+
await muteBootedSimulator(udid, out);
|
|
377
400
|
}, {
|
|
378
401
|
...deviceSlotWait,
|
|
379
402
|
root: projectPath,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as formatElapsed, r as clockTime } from "./command-output-
|
|
4
|
-
import { Zt as VERIFY_TIMEOUT_MS, on as APP_READINESS_TIMEOUT_MS } from "./budget-
|
|
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-
|
|
1
|
+
import { m as operationState } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { V as deviceSlotKey } from "./config-DlrsduwG.mjs";
|
|
3
|
+
import { a as formatElapsed, r as clockTime } from "./command-output-gwpm28fu.mjs";
|
|
4
|
+
import { Zt as VERIFY_TIMEOUT_MS, on as APP_READINESS_TIMEOUT_MS } from "./budget-Cvwn54qV.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-CMLmzp7o.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 = VERIFY_TIMEOUT_MS + APP_READINESS_TIMEOUT_MS;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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-DlrsduwG.mjs";
|
|
2
|
+
import { A as selectPoolDevice, S as parseLease, b as leaseIsExpired, v as deviceLeasePath, y as fileLeaseIo } from "./activity-CMLmzp7o.mjs";
|
|
3
|
+
import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-xJPQ_QQG.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)];
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as reportSignal, t as getExecutor, y as trackReportResource } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { i as sharedBuildCache, u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { _ as loadConfig$1,
|
|
4
|
-
import { d as quotedPath, u as plural } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { i as
|
|
8
|
-
import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-
|
|
9
|
-
import { Bn as checkEasAuth$1, Gn as providerFromConfig, Ht as readInstalledEasCliVersionAsync, Wn as ownerFromConfig, er as MIN_EAS_CLI_SIMULATOR_VERSION, nr as easCliUpgradeRemedy, qn as resolveEasCliBin, tr as easCliSupport } from "./budget-
|
|
10
|
-
import {
|
|
11
|
-
import { N as listBuildLocks } from "./activity-
|
|
12
|
-
import { a as diffFingerprintSources, l as fingerprintProject } from "./build-cache-
|
|
13
|
-
import {
|
|
14
|
-
import { F as readHostMemoryPressureAsync, M as hostMemoryPressureAdvice } from "./ios-
|
|
3
|
+
import { _ as loadConfig$1, nt as realIo, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { d as quotedPath, u as plural } from "./command-output-gwpm28fu.mjs";
|
|
5
|
+
import { l as gitQuietAsync, o as git } from "./operation-exec-BW0em61G.mjs";
|
|
6
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
|
|
7
|
+
import { D as mergeSettingsLayers, Et as listWorktreesAsync, Gt as temporaryRoot, Ht as makeTemporaryDirectory, I as projectSettingsContext, It as resolveSourceCheckoutAsync, K as resolveIosProjectDir, Mt as repoRoot, Nt as repoRootAsync, Ot as locallyKnownUpstreamAsync, Q as settingOrigin, T as iosSimSlimProfileSetting, U as remoteIosSetting, V as remoteAndroidSetting, Vt as filesystemDevice, W as resolveAndroidLayout, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, at as webSettings, et as settingShapeErrors, ht as dirtyFingerprintFiles, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, it as unknownSettingKeys, m as defaultAndroidLayout, nt as settingsLayers, r as PATH_SETTINGS, tt as settingValueAt, vt as gitCommonDirAsync } from "./settings-C7O8A6ZI.mjs";
|
|
8
|
+
import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-wM_XFTvE.mjs";
|
|
9
|
+
import { Bn as checkEasAuth$1, Gn as providerFromConfig, Ht as readInstalledEasCliVersionAsync, Wn as ownerFromConfig, er as MIN_EAS_CLI_SIMULATOR_VERSION, nr as easCliUpgradeRemedy, qn as resolveEasCliBin, tr as easCliSupport } from "./budget-Cvwn54qV.mjs";
|
|
10
|
+
import { L as listBuildSlots } from "./workspaces-CpANmBlq.mjs";
|
|
11
|
+
import { N as listBuildLocks } from "./activity-CMLmzp7o.mjs";
|
|
12
|
+
import { a as diffFingerprintSources, l as fingerprintProject } from "./build-cache-Dv7RN200.mjs";
|
|
13
|
+
import { _t as parkedMaxSetting, dt as POOL_SETTING_REMEDY, k as hostSystemImageArch, o as androidHome } from "./android-C7sVmyI9.mjs";
|
|
14
|
+
import { F as readHostMemoryPressureAsync, M as hostMemoryPressureAdvice } from "./ios-hcBpnEGk.mjs";
|
|
15
15
|
import { p as resolveOptimizations, u as compilerCacheFallbackMessage } from "./errors-ccaPc4ox.mjs";
|
|
16
|
-
import { i as projectCmakeLauncher } from "./ccache-
|
|
17
|
-
import { x as podInstallCommand } from "./xcode-
|
|
18
|
-
import { h as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-
|
|
19
|
-
import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { n as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
16
|
+
import { i as projectCmakeLauncher } from "./ccache-Btwc36-I.mjs";
|
|
17
|
+
import { x as podInstallCommand } from "./xcode-BXn9-xYx.mjs";
|
|
18
|
+
import { h as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-Dvd8hC21.mjs";
|
|
19
|
+
import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-DK5_EwRS.mjs";
|
|
20
|
+
import { t as readDoctorFingerprint } from "./doctor-fingerprint-DZLoYFVb.mjs";
|
|
21
|
+
import { i as probeSigningIdentities } from "./ios-signing-BtAffm0A.mjs";
|
|
22
|
+
import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-Bbw689-6.mjs";
|
|
23
|
+
import { i as installedNpmTreeIsValidAsync, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-1I9KZT1Y.mjs";
|
|
24
|
+
import { n as simslimIsOnPath } from "./simslim-BNckWpXi.mjs";
|
|
25
|
+
import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-CwknaQYj.mjs";
|
|
26
|
+
import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-ngferVq2.mjs";
|
|
26
27
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, rmSync } from "node:fs";
|
|
27
28
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
28
29
|
import { LAST_BUILD_KEYS, isJsonObject, readBuildHistory, readJsonObject, readStats, settingDefinition } from "@stim-cli/core/state";
|
|
29
30
|
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, relative as relative$1, resolve as resolve$1, sep as sep$1 } from "path";
|
|
30
|
-
import { fileURLToPath } from "node:url";
|
|
31
31
|
import { existsSync as existsSync$1, lstatSync as lstatSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1 } from "fs";
|
|
32
32
|
import * as expoFingerprint from "@expo/fingerprint";
|
|
33
33
|
import { rm } from "fs/promises";
|
|
@@ -193,19 +193,6 @@ function checkStorageLayout(projectRoot, { platform, iosProjectPath = "ios", and
|
|
|
193
193
|
return findings;
|
|
194
194
|
}
|
|
195
195
|
//#endregion
|
|
196
|
-
//#region src/doctor-fingerprint.ts
|
|
197
|
-
async function readDoctorFingerprint(operation, request) {
|
|
198
|
-
const output = await getExecutor().runFileAsync(process.execPath, [fileURLToPath(new URL("../dist/doctor-fingerprint.mjs", import.meta.url))], {
|
|
199
|
-
cwd: operation.cwd,
|
|
200
|
-
env: Object.fromEntries(Object.entries(operation.env).filter((entry) => entry[1] !== void 0)),
|
|
201
|
-
input: JSON.stringify(request),
|
|
202
|
-
timeoutMs: 6e4,
|
|
203
|
-
killSignal: "SIGKILL",
|
|
204
|
-
signal: operation.signal
|
|
205
|
-
});
|
|
206
|
-
return JSON.parse(output);
|
|
207
|
-
}
|
|
208
|
-
//#endregion
|
|
209
196
|
//#region src/diagnostics/doctor-cxx.ts
|
|
210
197
|
function parseCmakeCacheLauncher(source) {
|
|
211
198
|
if (typeof source !== "string") return null;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as refuseNoProject, l as phaseLine } from "./command-output-
|
|
3
|
-
import {
|
|
4
|
-
import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-
|
|
5
|
-
import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-
|
|
6
|
-
import { a as inspectBudget, cr as inspectWatchmanMemory, fr as memorySweepIsScoped, n as budgetLine } from "./budget-
|
|
7
|
-
import { L as memoryCulpritFindings, R as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-
|
|
8
|
-
import { c as detectXcodeMajorAsync } from "./xcode-
|
|
9
|
-
import { s as offloadCheck } from "./client-
|
|
10
|
-
import { c as inspectBuildMachines, f as inspectDeviceHostMachines } from "./selection-
|
|
11
|
-
import { r as maintenanceStatus, t as maintenanceLine } from "./status-
|
|
12
|
-
import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-
|
|
13
|
-
import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-
|
|
14
|
-
import { h as resolveDeviceType, v as resolveRuntime } from "./support-
|
|
1
|
+
import { Y as doctorIo, _ as loadConfig$1, p as getProject } from "./config-DlrsduwG.mjs";
|
|
2
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
3
|
+
import { L as projectSettingsContextAsync, Mt as repoRoot } from "./settings-C7O8A6ZI.mjs";
|
|
4
|
+
import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-wM_XFTvE.mjs";
|
|
5
|
+
import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-DlY_serQ.mjs";
|
|
6
|
+
import { a as inspectBudget, cr as inspectWatchmanMemory, fr as memorySweepIsScoped, n as budgetLine } from "./budget-Cvwn54qV.mjs";
|
|
7
|
+
import { L as memoryCulpritFindings, R as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-hcBpnEGk.mjs";
|
|
8
|
+
import { c as detectXcodeMajorAsync } from "./xcode-BXn9-xYx.mjs";
|
|
9
|
+
import { s as offloadCheck } from "./client-OyRoEuSr.mjs";
|
|
10
|
+
import { c as inspectBuildMachines, f as inspectDeviceHostMachines } from "./selection-DSMbWEX2.mjs";
|
|
11
|
+
import { r as maintenanceStatus, t as maintenanceLine } from "./status-BRROykC8.mjs";
|
|
12
|
+
import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-N2wDotwQ.mjs";
|
|
13
|
+
import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-Bo7BXLux.mjs";
|
|
14
|
+
import { h as resolveDeviceType, v as resolveRuntime } from "./support-CNioewsd.mjs";
|
|
15
15
|
import { isJsonObject, maintenanceNdjsonFile, readHostedAppMetadata, readHostedSessions } from "@stim-cli/core/state";
|
|
16
16
|
import { dirname, join, sep } from "path";
|
|
17
17
|
import chalk from "chalk";
|
|
@@ -418,12 +418,15 @@ async function prepareDoctor(root, platform, registry, operation) {
|
|
|
418
418
|
doctors: await selected.load()
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
async function readDoctorReport(operation, platform, version) {
|
|
421
|
+
async function readDoctorReport(operation, platform, version, requestAccess = false) {
|
|
422
422
|
const found = projectRegistry.findProjectRoot(operation.projectRoot);
|
|
423
423
|
if (!found) throw Object.assign(new Error(NO_PROJECT_REFUSAL.message), NO_PROJECT_REFUSAL);
|
|
424
424
|
const root = found;
|
|
425
425
|
const prepared = await prepareDoctor(root, platform, projectRegistry, operation);
|
|
426
|
-
return assembleDoctorReport(root, {
|
|
426
|
+
return assembleDoctorReport(root, {
|
|
427
|
+
platform,
|
|
428
|
+
fix: requestAccess
|
|
429
|
+
}, version, prepared, (runningVersion) => inspectStimVersions(runningVersion, {
|
|
427
430
|
operation,
|
|
428
431
|
cwd: root,
|
|
429
432
|
env: operation.env,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
//#region src/doctor-fingerprint.ts
|
|
4
|
+
async function readDoctorFingerprint(operation, request) {
|
|
5
|
+
const output = await getExecutor().runFileAsync(process.execPath, [fileURLToPath(new URL("../dist/doctor-fingerprint.mjs", import.meta.url))], {
|
|
6
|
+
cwd: operation.cwd,
|
|
7
|
+
env: Object.fromEntries(Object.entries(operation.env).filter((entry) => entry[1] !== void 0)),
|
|
8
|
+
input: JSON.stringify(request),
|
|
9
|
+
timeoutMs: 6e4,
|
|
10
|
+
killSignal: "SIGKILL",
|
|
11
|
+
signal: operation.signal
|
|
12
|
+
});
|
|
13
|
+
return JSON.parse(output);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { readDoctorFingerprint as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as readDoctorReport, i as parseDoctorPlatform, n as doctorCommand, o as shadowedStimFinding, r as doctorSuccessLines, s as toolchainReport, t as applySandboxFix } from "./doctor-
|
|
1
|
+
import { a as readDoctorReport, i as parseDoctorPlatform, n as doctorCommand, o as shadowedStimFinding, r as doctorSuccessLines, s as toolchainReport, t as applySandboxFix } from "./doctor-D5_EzwfA.mjs";
|
|
2
2
|
export { applySandboxFix, doctorCommand as default, doctorSuccessLines, parseDoctorPlatform, readDoctorReport, shadowedStimFinding, toolchainReport };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { f as projectRegistry } from "./project-
|
|
5
|
-
import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-
|
|
1
|
+
import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-DlrsduwG.mjs";
|
|
2
|
+
import { l as gitQuietAsync } from "./operation-exec-BW0em61G.mjs";
|
|
3
|
+
import { Et as listWorktreesAsync, Nt as repoRootAsync } from "./settings-C7O8A6ZI.mjs";
|
|
4
|
+
import { f as projectRegistry } from "./project-wM_XFTvE.mjs";
|
|
5
|
+
import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-DlY_serQ.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
8
8
|
import { isJsonObject } from "@stim-cli/core/state";
|