stim 1.20.2 → 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.
Files changed (231) hide show
  1. package/README.md +141 -8
  2. package/dist/acquire-artifact-Co2k4f7O.mjs +171 -0
  3. package/dist/act-DsuqEkiM.mjs +2801 -0
  4. package/dist/activity-CMLmzp7o.mjs +1397 -0
  5. package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-DUFaTMdd.mjs} +23 -67
  6. package/dist/{android-DCKZrNvV.mjs → android-ByRMUoiJ.mjs} +157 -93
  7. package/dist/{android-Mz_Inn3w.mjs → android-C7sVmyI9.mjs} +299 -116
  8. package/dist/{android-Dlzxshgp.mjs → android-DGkNqa_c.mjs} +5 -5
  9. package/dist/{android-HqP1_vB_.mjs → android-DR5lZ2Az.mjs} +2 -2
  10. package/dist/android-cas-compiler.mjs +2 -2
  11. package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-ngferVq2.mjs} +7 -6
  12. package/dist/android-project-BCAAmMwz.mjs +12 -0
  13. package/dist/android-project-DVWyCbWU.d.mts +391 -0
  14. package/dist/api.d.mts +810 -64
  15. package/dist/api.mjs +782 -1
  16. package/dist/{artifact-HSwkIWEQ.mjs → artifact-8EY8SAPw.mjs} +240 -213
  17. package/dist/{artifact-D3czlUvT.mjs → artifact-DJPy518Y.mjs} +203 -164
  18. package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
  19. package/dist/{browser-web-CA-F1GQo.mjs → browser-web-Bcv99PBM.mjs} +194 -64
  20. package/dist/budget-Cvwn54qV.mjs +9285 -0
  21. package/dist/{build-DYDbfkk5.mjs → build-CabC3G23.mjs} +153 -98
  22. package/dist/build-cache-Dv7RN200.mjs +602 -0
  23. package/dist/build-plan-DUC8Ka9y.mjs +248 -0
  24. package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DSeQjt-Q.mjs} +2 -2
  25. package/dist/cache-manifest.mjs +1 -1
  26. package/dist/{ccache-zdKiYQ3E.mjs → ccache-Btwc36-I.mjs} +10 -9
  27. package/dist/{cdp-Dq_ypAlJ.mjs → cdp-3fwICjzi.mjs} +18 -5
  28. package/dist/{chrome-BnzZMqsR.mjs → chrome-Bbw689-6.mjs} +7 -4
  29. package/dist/{cli-CLP3diBm.mjs → cli-CHZa9Lvk.mjs} +20 -20
  30. package/dist/cli.mjs +1 -1
  31. package/dist/client-OyRoEuSr.mjs +1577 -0
  32. package/dist/collector-run.d.mts +4 -40
  33. package/dist/collector-run.mjs +9 -8
  34. package/dist/{command-output-BTy8hZ0F.mjs → command-output-gwpm28fu.mjs} +1 -1
  35. package/dist/config-DlrsduwG.mjs +955 -0
  36. package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-x9rN6bhs.mjs} +14 -4
  37. package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-1I9KZT1Y.mjs} +20 -5
  38. package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
  39. package/dist/{dev-client-DAWVIGBu.mjs → dev-client-BSDR5h3F.mjs} +2 -2
  40. package/dist/{device-BECOiufl.mjs → device-B-L3Fbxy.mjs} +91 -34
  41. package/dist/device-DklWZLqb.mjs +1068 -0
  42. package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-DK5_EwRS.mjs} +42 -13
  43. package/dist/device-host-worker.mjs +76 -79
  44. package/dist/{device-ios-COSi6oS1.mjs → device-ios-DoB6KFCO.mjs} +77 -51
  45. package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-xJPQ_QQG.mjs} +14 -26
  46. package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-BMkdsefq.mjs} +5 -5
  47. package/dist/{doctor-kfMBnUw6.mjs → doctor-Bo7BXLux.mjs} +271 -320
  48. package/dist/{doctor-CB8oZKCk.mjs → doctor-D5_EzwfA.mjs} +186 -91
  49. package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
  50. package/dist/doctor-fingerprint.mjs +19 -0
  51. package/dist/doctor-thjWAV0z.mjs +2 -0
  52. package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-N2wDotwQ.mjs} +40 -21
  53. package/dist/{eas-build-JyfqyHfC.mjs → eas-build-CwknaQYj.mjs} +53 -20
  54. package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-CSgAulr5.mjs} +41 -214
  55. package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-DlY_serQ.mjs} +230 -11
  56. package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-DBWO2rxE.mjs} +172 -82
  57. package/dist/exec-DEoAhcze.mjs +858 -0
  58. package/dist/exec-DnYc4HGH.d.mts +78 -0
  59. package/dist/{gc-qWOMdnER.mjs → gc-CXxN-4SE.mjs} +1091 -1029
  60. package/dist/gc-DnNDQyaP.mjs +3 -0
  61. package/dist/{guide-G9cAbVAc.mjs → guide-Br0LEfKy.mjs} +1165 -297
  62. package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-B-9f-jkd.mjs} +10 -8
  63. package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DZAPrcro.mjs} +34 -19
  64. package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
  65. package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-FIRx9X2f.mjs} +77 -43
  66. package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-_awYSpfv.mjs} +35 -22
  67. package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-BdzE668-.mjs} +49 -27
  68. package/dist/idle-C4cZ757K.d.mts +24 -0
  69. package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DDg3SdvY.mjs} +11 -10
  70. package/dist/ios-CDvlmUs7.d.mts +24 -0
  71. package/dist/{ios-BwVCF7oA.mjs → ios-Ds1clbIt.mjs} +8 -8
  72. package/dist/{ios-device-D7pi2Sca.mjs → ios-device--h_-8ENa.mjs} +51 -26
  73. package/dist/{ios-device-B5veSDDQ.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
  74. package/dist/{ios-RkW4pnQf.mjs → ios-hcBpnEGk.mjs} +200 -93
  75. package/dist/{ios-Ce7bc7br.mjs → ios-pm4nL6By.mjs} +160 -108
  76. package/dist/{ios-project-K9hY_Jab.mjs → ios-project-CZhKODF3.mjs} +13 -13
  77. package/dist/ios-signing-BtAffm0A.mjs +489 -0
  78. package/dist/{ios-state-CBLe1xYw.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
  79. package/dist/{ios-nOLJGVdy.mjs → ios-xtlRHaeB.mjs} +1 -1
  80. package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Bwhh4S7V.mjs} +30 -25
  81. package/dist/{launch-C3qJ6Agb.mjs → launch-BjxemNpK.mjs} +85 -543
  82. package/dist/{launch-F4sOqAhB.mjs → launch-CCzXlc8r.mjs} +91 -90
  83. package/dist/logs-BfwwadsZ.mjs +479 -0
  84. package/dist/logs-jTS_lHSo.mjs +248 -0
  85. package/dist/{macos-D7uDvO-z.mjs → macos-DVlSSyUg.mjs} +1 -1
  86. package/dist/macos-NfV2D7dO.mjs +694 -0
  87. package/dist/macos-run.mjs +1 -1
  88. package/dist/maintenance-run.mjs +123 -248
  89. package/dist/{metro-DnCEjCxs.mjs → metro-DiXtA3Ty.mjs} +107 -30
  90. package/dist/metro-gateway-CKZqKqx7.mjs +209 -0
  91. package/dist/{named-ports-4WopRPg-.mjs → named-ports-DkEzOfzO.mjs} +42 -90
  92. package/dist/native-android-CqgnOgsT.mjs +645 -0
  93. package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
  94. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +211 -0
  95. package/dist/native-inputs-TRTTTRxt.mjs +91 -0
  96. package/dist/native-run-NwUuxbkg.mjs +276 -0
  97. package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-B7KIafpM.mjs} +11 -9
  98. package/dist/native-source-Y0yLhFyQ.mjs +133 -0
  99. package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-D_VOfFL7.mjs} +26 -18
  100. package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-BYDOHWLN.mjs} +104 -60
  101. package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
  102. package/dist/offload-worker.d.mts +59 -41
  103. package/dist/offload-worker.mjs +478 -115
  104. package/dist/operation-exec-BW0em61G.mjs +171 -0
  105. package/dist/{ownership-DCtw_2IA.mjs → ownership-C5fo5Edb.mjs} +3 -3
  106. package/dist/{page-DRHy329N.mjs → page-DBL2PiUU.mjs} +12 -5
  107. package/dist/paths-BsJMoPP2.mjs +12 -0
  108. package/dist/paths-DQtTgsBf.mjs +42 -0
  109. package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BnGgJRRZ.mjs} +5 -5
  110. package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-DIsMtN-d.mjs} +15 -11
  111. package/dist/{ports-DdSUicVo.mjs → ports-Cy1RkmuQ.mjs} +3 -3
  112. package/dist/prebuild-D4JoEAEs.mjs +484 -0
  113. package/dist/{project-_phNIJfs.mjs → project-wM_XFTvE.mjs} +65 -37
  114. package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-W1IuLXDt.mjs} +102 -20
  115. package/dist/pull-request-eODyIqZF.d.mts +124 -0
  116. package/dist/pull-requests.d.mts +2 -120
  117. package/dist/pull-requests.mjs +2 -2
  118. package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-6OZ7MSM7.mjs} +121 -72
  119. package/dist/{gradle-DSrXb6lG.mjs → react-native-build-Dvd8hC21.mjs} +292 -15
  120. package/dist/react-native-doctor-DsoSF1Y9.mjs +234 -0
  121. package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-4u1Rn-GR.mjs} +71 -39
  122. package/dist/{recordings-D0d5aQt0.mjs → recordings-CQmfzAh7.mjs} +12 -9
  123. package/dist/registration-BcRgF6Ox.mjs +51 -0
  124. package/dist/{reload-C8JhxjSh.mjs → reload-BzkYabB-.mjs} +94 -47
  125. package/dist/reload-D7AVlb8N.mjs +2 -0
  126. package/dist/{remote-BiR6aYjy.mjs → remote-DjGDmlTZ.mjs} +26 -18
  127. package/dist/result-D2Ykz_iD.mjs +435 -0
  128. package/dist/{run-BtPgpKks.mjs → run-DidHghD1.mjs} +5 -5
  129. package/dist/selection-DSMbWEX2.mjs +620 -0
  130. package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CafzuyFB.mjs} +3 -4
  131. package/dist/{server-command-CTtCkmcQ.mjs → server-command-C6QjeupS.mjs} +14 -7
  132. package/dist/{server-expo-DsguMGUF.mjs → server-expo-CrjB29pq.mjs} +54 -11
  133. package/dist/server-expo-D58c9L0M.mjs +2 -0
  134. package/dist/{settings-B717odTD.mjs → settings-C7O8A6ZI.mjs} +309 -119
  135. package/dist/settings-DpR-1Wnn.mjs +114 -0
  136. package/dist/settings-write-CzD60rOD.mjs +360 -0
  137. package/dist/settings.schema.json +176 -16
  138. package/dist/{simslim-CCr3rE-A.mjs → simslim-BNckWpXi.mjs} +14 -12
  139. package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-CbfmNgM6.mjs} +15 -20
  140. package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
  141. package/dist/stage-Bps5oius.mjs +200 -0
  142. package/dist/{start-TXeMmmO2.mjs → start-Br-oxqMD.mjs} +1 -1
  143. package/dist/start-EojN4WFz.mjs +1364 -0
  144. package/dist/{state-D1Icyjlu.mjs → state--smjFSTL.mjs} +55 -13
  145. package/dist/{state-CG_OFoaA.mjs → state-08I3hw3_.mjs} +3 -2
  146. package/dist/{stats-BoY5sEPU.mjs → stats-D3GerlFW.mjs} +7 -13
  147. package/dist/stats-report-BzaPrRm6.mjs +16 -0
  148. package/dist/{status-BTA7kKiQ.mjs → status-BRROykC8.mjs} +7 -5
  149. package/dist/status-EvrK72L2.mjs +2 -0
  150. package/dist/{status-WgFbkRzj.mjs → status-WBDajew2.mjs} +554 -452
  151. package/dist/{status-watch-C23ILtf9.mjs → status-watch-Bg_u-pwR.mjs} +222 -25
  152. package/dist/status-worker.d.mts +1 -0
  153. package/dist/status-worker.mjs +19 -0
  154. package/dist/stim-desktop-D5OGpYZM.mjs +112 -0
  155. package/dist/{stop-DR6VoDIk.mjs → stop-DTZ9uTw3.mjs} +2 -2
  156. package/dist/{stop-DPEhunlw.mjs → stop-Dky10AEJ.mjs} +33 -23
  157. package/dist/{stop-BNmBMi1F.mjs → stop-Mv6W9FAk.mjs} +137 -98
  158. package/dist/supervisor-run.d.mts +8 -17
  159. package/dist/supervisor-run.mjs +56 -28
  160. package/dist/{support-CwjbFs9H.mjs → support-CNioewsd.mjs} +14 -14
  161. package/dist/{support-DMTqj3Hm.mjs → support-yUiOjnVY.mjs} +20 -13
  162. package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
  163. package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
  164. package/dist/toolchain-BY8X8HXx.mjs +2 -0
  165. package/dist/toolchain-DpJMHq0n.mjs +876 -0
  166. package/dist/{trigger-CigAYjeL.mjs → trigger-Cbyc41d_.mjs} +21 -6
  167. package/dist/trigger-yb_nFzPF.mjs +2 -0
  168. package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-CA3TgT3-.mjs} +263 -156
  169. package/dist/web-CZ07gd77.mjs +2 -0
  170. package/dist/{web-BDBMxDpx.mjs → web-DKx6yoFA.mjs} +20 -14
  171. package/dist/web-run.mjs +13 -12
  172. package/dist/windows-report.d.mts +1 -0
  173. package/dist/windows-report.mjs +18 -0
  174. package/dist/windows-report.ps1 +43 -0
  175. package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-U08dEzhG.mjs} +62 -58
  176. package/dist/{workspaces-C36s2jb9.mjs → workspaces-CpANmBlq.mjs} +1723 -1286
  177. package/dist/{worktree-CgvJYJ-Q.mjs → worktree-CHecZ4Oq.mjs} +1097 -547
  178. package/dist/worktree-ZqZVjD9K.mjs +2 -0
  179. package/dist/xcode-BXn9-xYx.mjs +896 -0
  180. package/package.json +7 -5
  181. package/shim/android-audio/Main.java +24 -0
  182. package/shim/android-audio/README.md +17 -0
  183. package/shim/android-audio.jar +0 -0
  184. package/shim/android-optimizations.gradle +7 -5
  185. package/dist/activity-BSV745Kz.mjs +0 -629
  186. package/dist/api-qvOzWyfO.mjs +0 -154
  187. package/dist/api-run.mjs +0 -294
  188. package/dist/app-install-BIKtMfPq.mjs +0 -896
  189. package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
  190. package/dist/budget-f7516Zk0.mjs +0 -4106
  191. package/dist/build-facts-DcLv2HSd.d.mts +0 -111
  192. package/dist/cancellation-C_22VQTH.mjs +0 -24
  193. package/dist/client-qQAaXSUs.mjs +0 -1771
  194. package/dist/config-BYDxlMY3.mjs +0 -562
  195. package/dist/device-DuiPJQSn.mjs +0 -290
  196. package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
  197. package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
  198. package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
  199. package/dist/exec-DqKo9GKJ.mjs +0 -268
  200. package/dist/git-DDfFzkMm.mjs +0 -45
  201. package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
  202. package/dist/logs-BGrEUaEs.mjs +0 -383
  203. package/dist/macos-Ch5VJmcS.mjs +0 -584
  204. package/dist/metro-gateway-CX9Xlkq2.mjs +0 -103
  205. package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
  206. package/dist/native-android-D5qc3-_v.mjs +0 -226
  207. package/dist/native-gradle-inputs-BsLRrl7u.mjs +0 -349
  208. package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
  209. package/dist/plan-C4TjdPsR.mjs +0 -260
  210. package/dist/prebuild-DYbucPXy.mjs +0 -212
  211. package/dist/preview-78a9kR_-.mjs +0 -1011
  212. package/dist/react-native-build-CtCccJtb.mjs +0 -239
  213. package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
  214. package/dist/remote-cache-OyOyVIS3.mjs +0 -526
  215. package/dist/result-CaJg5Iat.mjs +0 -186
  216. package/dist/server-expo-Bigriskl.mjs +0 -2
  217. package/dist/settings-BORNaaCO.mjs +0 -402
  218. package/dist/settings-vk3mJGSm.d.mts +0 -13
  219. package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
  220. package/dist/stage-KNTQopqv.mjs +0 -157
  221. package/dist/start-BWqzODpb.mjs +0 -1116
  222. package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
  223. package/dist/swiftpm-macos-DRNVJWlb.mjs +0 -119
  224. package/dist/tailnet-Dh-qiYzG.mjs +0 -265
  225. package/dist/toolchain-BFkAcstd.mjs +0 -2
  226. package/dist/toolchain-DxSsNssu.mjs +0 -1657
  227. package/dist/trigger-9_USgmxz.mjs +0 -2
  228. package/dist/web-Dq-i3wzJ.mjs +0 -2
  229. package/dist/worktree-DpLdCHga.mjs +0 -2
  230. package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
  231. package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
@@ -1,14 +1,15 @@
1
- import { C as saveConfig, D as withConfigLock, V as deviceSlotPlatforms, W as projectDeviceSlots, _ as loadConfig, a as clearDevice, d as getConfigDir, j as ownership_claim_exports, w as setDevice } from "./config-BYDxlMY3.mjs";
2
- import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
3
- import { T as iosSimSlimProfileSetting } from "./settings-B717odTD.mjs";
4
- import { S as workspaceId } from "./workspace-state-DJt_MMvf.mjs";
5
- import { l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
6
- import { dt as parkedMaxSetting, ft as readParked, mt as selectParked, ot as adoptParked, st as dropParked } from "./android-Mz_Inn3w.mjs";
7
- import { S as teardownParkedIosSim } from "./workspaces-C36s2jb9.mjs";
8
- import { a as withWorkspaceProcessLock } from "./named-ports-4WopRPg-.mjs";
9
- import { t as cancellableSleep } from "./cancellation-C_22VQTH.mjs";
10
- 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, m as listIosRuntimes, n as bootIosSim, p as listIosDeviceTypes, u as iosSimulatorFailureAdvice, w as resetIosPrivacy, y as parseRuntimeVersion } from "./ios-RkW4pnQf.mjs";
11
- import { a as deviceTypeMismatch, c as runtimeMismatch, n as DeviceAdmissionRefusal, p as withDeviceBootAdmission } from "./device-capacity-CBUAcRyQ.mjs";
1
+ import { i as withWorkspaceProcessLock, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
+ import { f as workspaceId$1 } from "./paths-DQtTgsBf.mjs";
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
+ 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) {
@@ -20,8 +21,10 @@ function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlo
20
21
  await bootIosSim(udid, {
21
22
  label,
22
23
  out,
23
- simulatorApp
24
+ simulatorApp,
25
+ env: ambientContext()?.env
24
26
  });
27
+ await muteBootedSimulator(udid, out);
25
28
  await configure();
26
29
  }, {
27
30
  ...deviceSlotWait,
@@ -34,6 +37,26 @@ function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlo
34
37
  done
35
38
  };
36
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
+ }
37
60
  var IosDeviceMismatchError = class extends Error {
38
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.";
39
62
  };
@@ -50,10 +73,10 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
50
73
  else if (resolved.missing) {} else {
51
74
  const sim = resolved.sim;
52
75
  const wantedType = flags.deviceType || settings?.ios?.deviceType;
53
- const deviceTypes = listIosDeviceTypes();
76
+ const deviceTypes = await listIosDeviceTypesAsync();
54
77
  const mismatch = deviceTypeMismatch(sim.deviceTypeIdentifier, wantedType, deviceTypes);
55
78
  if (mismatch) throw new IosDeviceMismatchError(`${mismatch}. Stim will not silently boot a different model.`);
56
- const versionMismatch = flags.runtimeFlag ? runtimeMismatch(sim.runtime, flags.runtimeFlag, listIosRuntimes()) : null;
79
+ const versionMismatch = flags.runtimeFlag ? runtimeMismatch(sim.runtime, flags.runtimeFlag, await listIosRuntimesAsync()) : null;
57
80
  if (versionMismatch) throw new IosDeviceMismatchError(`${versionMismatch}. Stim will not silently boot a different iOS version.`);
58
81
  const model = {
59
82
  model: deviceTypes.find((d) => d.identifier === sim.deviceTypeIdentifier)?.name ?? null,
@@ -71,7 +94,7 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
71
94
  ...record.schemeApprovals ? { schemeApprovals: record.schemeApprovals } : {}
72
95
  };
73
96
  const configure = async () => {
74
- if (record.adoptionPending) resetAdoptedSim(sim.udid, out);
97
+ if (record.adoptionPending) await resetAdoptedSim(sim.udid, out);
75
98
  return configureOwnedIosSim({
76
99
  record: updated,
77
100
  projectPath,
@@ -97,7 +120,7 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
97
120
  };
98
121
  }
99
122
  } else {
100
- const sim = listAllIosSims().find((s) => s.udid === record.deviceUdid);
123
+ const sim = (await listAllIosSimsAsync()).find((s) => s.udid === record.deviceUdid);
101
124
  if (sim) {
102
125
  if (sim.state !== "Booted") {
103
126
  note(chalk.yellow(`Note: assigned sim ${sim.name} (${sim.udid}) is shut down and is not owned by Stim, so it will not be booted automatically.`));
@@ -106,14 +129,14 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
106
129
  return record;
107
130
  }
108
131
  }
109
- withConfigLock(() => {
110
- const current = deviceSlotPlatforms(loadConfig()?.projects?.[projectPath], slot)?.ios;
132
+ await withConfigLockAsync$1(() => {
133
+ const current = deviceSlotPlatforms(loadConfig$1()?.projects?.[projectPath], slot)?.ios;
111
134
  if (!current) return;
112
135
  if (current.deviceUdid !== record.deviceUdid || current.owned !== record.owned) throw new Error("The simulator assignment changed during recovery. Run `stim ios` again.");
113
136
  clearDevice(projectPath, "ios", slot);
114
137
  });
115
138
  }
116
- const choice = resolveIosCreation({
139
+ const choice = await resolveIosCreation({
117
140
  deviceType: flags.deviceType || settings.ios?.deviceType,
118
141
  runtime: flags.runtime || settings.ios?.runtime
119
142
  });
@@ -126,7 +149,7 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
126
149
  })) : null;
127
150
  if (adopted) {
128
151
  const booting = startIosBoot(adopted.deviceUdid, async () => {
129
- resetAdoptedSim(adopted.deviceUdid, out);
152
+ await resetAdoptedSim(adopted.deviceUdid, out);
130
153
  await configureOwnedIosSim({
131
154
  record: adopted,
132
155
  projectPath,
@@ -143,12 +166,12 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
143
166
  runtime: choice.runtime
144
167
  };
145
168
  }
146
- const created = await withIosDeviceNameLock(() => {
169
+ const created = await withIosDeviceNameLock(async () => {
147
170
  const suffix = ownedIosNameSuffix(label, {
148
171
  model: choice.deviceType,
149
172
  runtime: choice.runtime
150
- }, projectPath);
151
- const result = createOwnedIosSim(label, { suffix }, choice);
173
+ }, projectPath, void 0, await listAllIosSimsAsync({ includeUnavailable: true }));
174
+ const result = await createOwnedIosSim(label, { suffix }, choice);
152
175
  setDevice(projectPath, "ios", {
153
176
  deviceUdid: result.udid,
154
177
  owned: true,
@@ -180,47 +203,47 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
180
203
  function withIosDeviceNameLock(fn) {
181
204
  return withWorkspaceProcessLock(getConfigDir(), "ios-device-names", async () => fn(), { external: true });
182
205
  }
183
- function ownedIosNameSuffix(label, model, projectPath, udid, listed = listAllIosSims({ includeUnavailable: true })) {
206
+ function ownedIosNameSuffix(label, model, projectPath, udid, listed) {
184
207
  const names = new Set(listed.filter((sim) => sim.udid !== udid).map((sim) => sim.name));
185
- 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)) {
186
209
  const record = platforms.ios;
187
210
  if (record?.deviceUdid !== udid && record?.deviceName) names.add(record.deviceName);
188
211
  }
189
212
  for (const parked of readParked("ios")) if (parked.udid !== udid) names.add(parked.name);
190
213
  let suffix = "";
191
- for (let attempt = 0; names.has(ownedSimName(label, model, suffix)); attempt++) suffix = ` ${workspaceId(projectPath)}${attempt ? `-${attempt}` : ""}`;
214
+ for (let attempt = 0; names.has(ownedSimName(label, model, suffix)); attempt++) suffix = ` ${workspaceId$1(projectPath)}${attempt ? `-${attempt}` : ""}`;
192
215
  return suffix;
193
216
  }
194
217
  function ownedIosName(sim, label, model, projectPath, listed) {
195
218
  return ownedSimName(label, model, ownedIosNameSuffix(label, model, projectPath, sim.udid, listed));
196
219
  }
197
- function renameToOwnedName(sim, label, model, projectPath) {
198
- const wanted = ownedIosName(sim, label, model, projectPath);
220
+ async function renameToOwnedName(sim, label, model, projectPath) {
221
+ const wanted = ownedIosName(sim, label, model, projectPath, await listAllIosSimsAsync({ includeUnavailable: true }));
199
222
  if (sim.name === wanted) return wanted;
200
223
  try {
201
- renameIosSim(sim.udid, wanted);
224
+ await renameIosSim(sim.udid, wanted);
202
225
  return wanted;
203
226
  } catch {
204
227
  return sim.name;
205
228
  }
206
229
  }
207
- function resetAdoptedSim(udid, out) {
230
+ async function resetAdoptedSim(udid, out) {
208
231
  out(chalk.dim(phaseLine("device", `resetting privacy grants and the keychain on ${udid}`)));
209
- resetIosPrivacy(udid);
210
- resetIosKeychain(udid);
232
+ await resetIosPrivacy(udid);
233
+ await resetIosKeychain(udid);
211
234
  }
212
- function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
235
+ async function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
213
236
  const candidates = selectParked(readParked("ios"), {
214
237
  deviceTypeIdentifier: choice.deviceTypeId,
215
238
  runtimeIdentifier: choice.runtimeId
216
239
  });
217
240
  if (candidates.length === 0) return null;
218
- const listed = new Map(listAllIosSims({ includeUnavailable: true }).map((sim) => [sim.udid, sim]));
241
+ const listed = new Map((await listAllIosSimsAsync({ includeUnavailable: true })).map((sim) => [sim.udid, sim]));
219
242
  for (const parked of candidates) {
220
243
  const sim = listed.get(parked.udid);
221
244
  if (!sim || !sim.available) {
222
- const result = sim ? teardownParkedIosSim(parked.udid, { label: parked.name }) : null;
223
- if (sim ? result?.status === "torn-down" : dropParked("ios", parked.udid)) out(chalk.dim(phaseLine("device", `deleted parked ${parked.name} (${parked.udid}): ${sim ? "unavailable" : "gone"}`)));
245
+ const result = sim ? await teardownParkedIosSim(parked.udid, { label: parked.name }) : null;
246
+ if (sim ? result?.status === "torn-down" : await dropParked("ios", parked.udid)) out(chalk.dim(phaseLine("device", `deleted parked ${parked.name} (${parked.udid}): ${sim ? "unavailable" : "gone"}`)));
224
247
  else if (result?.status === "failed") out(chalk.yellow(phaseLine("device", `could not delete unavailable parked ${parked.name} (${parked.udid}): ${result.reason}`)));
225
248
  continue;
226
249
  }
@@ -232,7 +255,7 @@ function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
232
255
  model: choice.deviceType,
233
256
  runtime: choice.runtime
234
257
  };
235
- const name = ownedSimName(label, model, ownedIosNameSuffix(label, model, projectPath, parked.udid));
258
+ const name = ownedSimName(label, model, ownedIosNameSuffix(label, model, projectPath, parked.udid, [...listed.values()]));
236
259
  const device = {
237
260
  deviceUdid: parked.udid,
238
261
  owned: true,
@@ -251,7 +274,7 @@ function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
251
274
  });
252
275
  if (!adopted) continue;
253
276
  try {
254
- renameIosSim(parked.udid, name);
277
+ await renameIosSim(parked.udid, name);
255
278
  } catch {}
256
279
  return adopted.schemeApprovals && adopted.schemeApprovals.length > 0 ? {
257
280
  ...device,
@@ -261,8 +284,8 @@ function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
261
284
  return null;
262
285
  }
263
286
  function clearIosAdoptionPending(projectPath, slot = "default") {
264
- withConfigLock(() => {
265
- const cfg = loadConfig();
287
+ withConfigLock$1(() => {
288
+ const cfg = loadConfig$1();
266
289
  const ios = deviceSlotPlatforms(cfg?.projects?.[projectPath], slot)?.ios;
267
290
  if (!cfg || !ios?.adoptionPending) return;
268
291
  delete ios.adopted;
@@ -284,6 +307,7 @@ async function configureOwnedIosSim({ record, projectPath, slot, profile, out, r
284
307
  record = pending;
285
308
  }
286
309
  const result = await reconcileIosSimulator({
310
+ context: ambientContext(),
287
311
  udid: record.deviceUdid,
288
312
  profile,
289
313
  previouslyManaged,
@@ -301,9 +325,9 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
301
325
  failed: true,
302
326
  reason: "No iOS simulator is recorded for this project."
303
327
  };
304
- const ready = () => {
328
+ const ready = async () => {
305
329
  try {
306
- getExecutor().runFile("xcrun", [
330
+ await getExecutor().runFileAsync("xcrun", [
307
331
  "simctl",
308
332
  "spawn",
309
333
  udid,
@@ -330,14 +354,14 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
330
354
  }
331
355
  return ready();
332
356
  }
333
- const readiness = device?.booted === udid ? ready() : null;
357
+ const readiness = device?.booted === udid ? await ready() : null;
334
358
  if (readiness?.ok) {
335
- if (simulatorApp !== void 0) configuredIosSimulatorViewer(simulatorApp).open(udid);
359
+ if (simulatorApp !== void 0) await configuredIosSimulatorViewer(simulatorApp, ambientContext()?.env).open(udid);
336
360
  return readiness;
337
361
  }
338
362
  let resolved;
339
363
  try {
340
- resolved = resolveOwnedIosSim(udid);
364
+ resolved = resolveOwnedIosSim(udid, await listAllIosSimsAsync());
341
365
  } catch (e) {
342
366
  return {
343
367
  failed: true,
@@ -354,8 +378,8 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
354
378
  };
355
379
  const sim = resolved.sim;
356
380
  if (sim.state === "Booted") {
357
- const result = readiness ?? ready();
358
- if (result.ok && simulatorApp !== void 0) configuredIosSimulatorViewer(simulatorApp).open(udid);
381
+ const result = readiness ?? await ready();
382
+ if (result.ok && simulatorApp !== void 0) await configuredIosSimulatorViewer(simulatorApp, ambientContext()?.env).open(udid);
359
383
  return result;
360
384
  }
361
385
  const bootDeadline = Date.now() + timeoutMs;
@@ -363,14 +387,16 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
363
387
  await withDeviceBootAdmission({
364
388
  platform: "ios",
365
389
  key: udid
366
- }, () => {
390
+ }, async () => {
367
391
  out(chalk.dim(phaseLine("device", `booting ${sim.name} (${udid})`)));
368
- return bootIosSim(udid, {
392
+ await bootIosSim(udid, {
369
393
  timeoutMs,
370
394
  label: sim.name,
371
395
  out,
372
- simulatorApp
396
+ simulatorApp,
397
+ env: ambientContext()?.env
373
398
  });
399
+ await muteBootedSimulator(udid, out);
374
400
  }, {
375
401
  ...deviceSlotWait,
376
402
  root: projectPath,
@@ -384,7 +410,7 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
384
410
  await cancellableSleep(pollMs);
385
411
  let state = null;
386
412
  try {
387
- state = listAllIosSims({ timeoutMs: 3e4 }).find((s) => s.udid === udid)?.state ?? null;
413
+ state = (await listAllIosSimsAsync({ timeoutMs: 3e4 })).find((s) => s.udid === udid)?.state ?? null;
388
414
  } catch {}
389
415
  if (state === "Booted") return ready();
390
416
  }
@@ -1,7 +1,8 @@
1
- import { B as deviceSlotKey } from "./config-BYDxlMY3.mjs";
2
- import { a as parseLease, c as raiseLease, l as releaseRunLease, n as fileLeaseIo, p as takeLease, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-BX1sJQ2E.mjs";
3
- import { a as formatElapsed, r as clockTime } from "./command-output-BTy8hZ0F.mjs";
4
- import { a as VERIFY_TIMEOUT_MS, m as APP_READINESS_TIMEOUT_MS } from "./launch-verify-B6Q8hZP-.mjs";
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";
5
6
  //#region src/engine/device-lease-run.ts
6
7
  const LEASE_STEP_FLOOR_MS = 6e4;
7
8
  const DEBUG_VERIFY_STEP_MS = VERIFY_TIMEOUT_MS + APP_READINESS_TIMEOUT_MS;
@@ -154,28 +155,15 @@ function runLease({ root, platform, slot = "default", kind, expiresAt, io = file
154
155
  };
155
156
  return handle;
156
157
  }
157
- const SIGNAL_EXIT_CODES = {
158
- SIGINT: 130,
159
- SIGTERM: 143
160
- };
161
- function releaseLeaseOnSignal(release, { on = (signal, handler) => {
162
- process.once(signal, handler);
163
- }, off = (signal, handler) => {
164
- process.off(signal, handler);
165
- }, exit = (code) => process.exit(code) } = {}) {
166
- const installed = [];
167
- for (const signal of Object.keys(SIGNAL_EXIT_CODES)) {
168
- const handler = () => {
169
- release();
170
- exit(SIGNAL_EXIT_CODES[signal]);
171
- };
172
- installed.push([signal, handler]);
173
- on(signal, handler);
174
- }
175
- return () => {
176
- for (const [signal, handler] of installed) off(signal, handler);
177
- installed.length = 0;
158
+ /** Release the run's lease as soon as `context`'s operation is aborted; returns a function that stops listening. */
159
+ function releaseLeaseOnAbort(context, release) {
160
+ const onAbort = () => {
161
+ operationState(context).handled = true;
162
+ release();
178
163
  };
164
+ if (context.signal.aborted) onAbort();
165
+ else context.signal.addEventListener("abort", onAbort, { once: true });
166
+ return () => context.signal.removeEventListener("abort", onAbort);
179
167
  }
180
168
  async function waitForDevice({ root, platform, slot = "default", id, idLabel, waitSeconds, noWait = false, appId = null, holderAppId = () => null, now = Date.now, sleep = (ms) => new Promise((r) => setTimeout(r, ms)), warn = () => {}, io = fileLeaseIo, deadline, lastLine }) {
181
169
  const path = deviceLeasePath(platform, id);
@@ -291,4 +279,4 @@ async function acquireRunLease({ root, platform, slot = "default", id, deviceNam
291
279
  }
292
280
  }
293
281
  //#endregion
294
- export { acquireRunLease as a, lostRefusal as c, runLease as d, waitFlagConflict as f, DEVICE_WAIT_POLL_MS as i, parseDeviceWait as l, DEVICE_BUSY as n, leaseExpiryText as o, waitForDevice as p, DEVICE_WAIT_LINE_MS as r, lostLine as s, DEBUG_VERIFY_STEP_MS as t, releaseLeaseOnSignal as u };
282
+ export { acquireRunLease as a, lostRefusal as c, runLease as d, waitFlagConflict as f, DEVICE_WAIT_POLL_MS as i, parseDeviceWait as l, DEVICE_BUSY as n, leaseExpiryText as o, waitForDevice as p, DEVICE_WAIT_LINE_MS as r, lostLine as s, DEBUG_VERIFY_STEP_MS as t, releaseLeaseOnAbort as u };
@@ -1,6 +1,6 @@
1
- import { B as deviceSlotKey } from "./config-BYDxlMY3.mjs";
2
- import { a as parseLease, f as selectPoolDevice, n as fileLeaseIo, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-BX1sJQ2E.mjs";
3
- import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-Cw2M4z51.mjs";
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)];
@@ -74,7 +74,7 @@ async function selectFromPool({ root, platform, slot = "default", idLabel, list,
74
74
  const until = deadline ?? now() + waitSeconds * 1e3;
75
75
  let lastLine = null;
76
76
  for (;;) {
77
- const { usable, leases, unreadable } = readPool(platform, list(), io);
77
+ const { usable, leases, unreadable } = readPool(platform, await list(), io);
78
78
  const selection = selectPoolDevice({
79
79
  candidates: usable,
80
80
  leases,
@@ -91,7 +91,7 @@ async function selectFromPool({ root, platform, slot = "default", idLabel, list,
91
91
  status: "refused",
92
92
  refusal: poolBusyRefusal([], leases, unreadable, now(), waitSeconds)
93
93
  };
94
- const { message, remedy } = noCandidates();
94
+ const { message, remedy } = await noCandidates();
95
95
  return {
96
96
  status: "refused",
97
97
  refusal: {