stim 1.20.2 → 1.21.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 (217) hide show
  1. package/README.md +88 -8
  2. package/dist/acquire-artifact-CD4lbiWE.mjs +153 -0
  3. package/dist/act-DHAw2A2S.mjs +2667 -0
  4. package/dist/activity-BzVfHSrY.mjs +1376 -0
  5. package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-zh1vhbLp.mjs} +21 -65
  6. package/dist/{android-HqP1_vB_.mjs → android-BEJ8Jpl7.mjs} +2 -2
  7. package/dist/{android-DCKZrNvV.mjs → android-BLgbNqox.mjs} +128 -78
  8. package/dist/{android-Dlzxshgp.mjs → android-CV_GCELZ.mjs} +5 -5
  9. package/dist/{android-Mz_Inn3w.mjs → android-DUYkNF4u.mjs} +184 -102
  10. package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-Ct5b1xCK.mjs} +7 -6
  11. package/dist/android-cas-compiler.mjs +2 -2
  12. package/dist/android-project-BCAAmMwz.mjs +12 -0
  13. package/dist/api.d.mts +740 -8
  14. package/dist/api.mjs +585 -1
  15. package/dist/{artifact-HSwkIWEQ.mjs → artifact-B8T3S5gi.mjs} +223 -201
  16. package/dist/{artifact-D3czlUvT.mjs → artifact-DAuZ-FNU.mjs} +158 -148
  17. package/dist/{browser-web-CA-F1GQo.mjs → browser-web-QQzVjz3O.mjs} +26 -24
  18. package/dist/budget-Bs6SxxzO.mjs +9154 -0
  19. package/dist/{build-DYDbfkk5.mjs → build-CoPzQRNw.mjs} +144 -96
  20. package/dist/build-cache-DmyR9Zzc.mjs +602 -0
  21. package/dist/build-plan-CaFskB7_.mjs +188 -0
  22. package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DkkqguoK.mjs} +2 -2
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-zdKiYQ3E.mjs → ccache-BJRZ9pG3.mjs} +10 -9
  25. package/dist/{cdp-Dq_ypAlJ.mjs → cdp-CWmIUMbw.mjs} +18 -5
  26. package/dist/{chrome-BnzZMqsR.mjs → chrome-B6tfCta1.mjs} +7 -4
  27. package/dist/{cli-CLP3diBm.mjs → cli-0DYf8QhQ.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/client-B7QVOlCr.d.mts +253 -0
  30. package/dist/client-UXD70ZbM.mjs +1406 -0
  31. package/dist/collector-run.d.mts +4 -40
  32. package/dist/collector-run.mjs +9 -8
  33. package/dist/{command-output-BTy8hZ0F.mjs → command-output-B1UrjZHL.mjs} +1 -1
  34. package/dist/config-CYcBF478.mjs +949 -0
  35. package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-CqeBlrEn.mjs} +3 -3
  36. package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-BbKQW83h.mjs} +20 -5
  37. package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-DFRyG1_o.mjs} +1 -1
  38. package/dist/{dev-client-DAWVIGBu.mjs → dev-client-UOeESKm6.mjs} +2 -2
  39. package/dist/device-DCxH7_By.mjs +1068 -0
  40. package/dist/{device-BECOiufl.mjs → device-ExJq8Ei7.mjs} +35 -35
  41. package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-CMlqEcvw.mjs} +43 -13
  42. package/dist/device-host-worker.mjs +65 -61
  43. package/dist/{device-ios-COSi6oS1.mjs → device-ios-DRUeKaFV.mjs} +48 -45
  44. package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-C8raGFoP.mjs} +14 -26
  45. package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-DMRpVX9a.mjs} +5 -5
  46. package/dist/doctor-BLHCYxzi.mjs +2 -0
  47. package/dist/{doctor-kfMBnUw6.mjs → doctor-DTvaDOda.mjs} +281 -317
  48. package/dist/{doctor-CB8oZKCk.mjs → doctor-Dhqebm0q.mjs} +183 -91
  49. package/dist/doctor-fingerprint.mjs +19 -0
  50. package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-Cv1F10Kj.mjs} +40 -21
  51. package/dist/{eas-build-JyfqyHfC.mjs → eas-build-BomfRnFT.mjs} +53 -20
  52. package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-DJwZpy0c.mjs} +26 -208
  53. package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-op6A54yi.mjs} +229 -11
  54. package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-Bf0rZvG9.mjs} +172 -82
  55. package/dist/exec-H20xSg2T.d.mts +65 -0
  56. package/dist/exec-_UbtCQcG.mjs +750 -0
  57. package/dist/gc-C-WwL0yi.mjs +3 -0
  58. package/dist/{gc-qWOMdnER.mjs → gc-_-dCXdyL.mjs} +584 -796
  59. package/dist/git-C3iTsJaZ.mjs +73 -0
  60. package/dist/{guide-G9cAbVAc.mjs → guide-Yqwt2bd6.mjs} +941 -269
  61. package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-Bw-honsd.mjs} +8 -6
  62. package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DB_gBPfY.mjs} +34 -19
  63. package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CUvOf4Vr.mjs} +1 -1
  64. package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-DL_P5AdN.mjs} +77 -43
  65. package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-QI141yKk.mjs} +21 -17
  66. package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-Ksyjgzq-.mjs} +30 -21
  67. package/dist/idle-BVeRGroT.d.mts +24 -0
  68. package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DaKmZi0z.mjs} +11 -10
  69. package/dist/{ios-BwVCF7oA.mjs → ios-CQ68hG9s.mjs} +8 -8
  70. package/dist/{ios-RkW4pnQf.mjs → ios-CpByZy12.mjs} +140 -80
  71. package/dist/{ios-device-B5veSDDQ.mjs → ios-device-CXGP1bsD.mjs} +1 -1
  72. package/dist/{ios-device-D7pi2Sca.mjs → ios-device-CwFMehUS.mjs} +51 -26
  73. package/dist/{ios-project-K9hY_Jab.mjs → ios-project-WuwwBdvW.mjs} +13 -13
  74. package/dist/{ios-nOLJGVdy.mjs → ios-qNJt4dFm.mjs} +1 -1
  75. package/dist/ios-signing-DTTIChGs.mjs +489 -0
  76. package/dist/{ios-state-CBLe1xYw.mjs → ios-state-DvFX-K_l.mjs} +1 -1
  77. package/dist/{ios-Ce7bc7br.mjs → ios-ubFsBzwq.mjs} +129 -86
  78. package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Cc1dttps.mjs} +53 -26
  79. package/dist/{launch-F4sOqAhB.mjs → launch-CD1yVc7U.mjs} +91 -90
  80. package/dist/{launch-C3qJ6Agb.mjs → launch-Zq2mOSDy.mjs} +82 -541
  81. package/dist/logs-BS00Anxf.mjs +352 -0
  82. package/dist/logs-CMm05HxN.mjs +255 -0
  83. package/dist/{macos-D7uDvO-z.mjs → macos-B65--pPd.mjs} +1 -1
  84. package/dist/{macos-Ch5VJmcS.mjs → macos-C-0qJ6zq.mjs} +225 -212
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +122 -247
  87. package/dist/{metro-DnCEjCxs.mjs → metro-DEXpIhHC.mjs} +67 -12
  88. package/dist/{metro-gateway-CX9Xlkq2.mjs → metro-gateway-BMJNlj3E.mjs} +20 -12
  89. package/dist/{named-ports-4WopRPg-.mjs → named-ports-BWTzt6mu.mjs} +8 -63
  90. package/dist/native-android-JACyjTZs.mjs +844 -0
  91. package/dist/{native-gradle-inputs-BsLRrl7u.mjs → native-gradle-inputs-Bep9JcSF.mjs} +128 -140
  92. package/dist/native-inputs-TRTTTRxt.mjs +91 -0
  93. package/dist/native-run-DY_RLx3C.mjs +277 -0
  94. package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-Dg1Q7tfF.mjs} +9 -8
  95. package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-CB2iQeWq.mjs} +27 -18
  96. package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-CXX39F7o.mjs} +96 -47
  97. package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
  98. package/dist/offload-worker.d.mts +1 -46
  99. package/dist/offload-worker.mjs +197 -66
  100. package/dist/{ownership-DCtw_2IA.mjs → ownership-DEmM5vhh.mjs} +3 -3
  101. package/dist/{page-DRHy329N.mjs → page-CPaHeYqj.mjs} +7 -4
  102. package/dist/paths-BsJMoPP2.mjs +12 -0
  103. package/dist/paths-DQtTgsBf.mjs +42 -0
  104. package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BqGbTa61.mjs} +5 -5
  105. package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-Bwj-IjY1.mjs} +6 -6
  106. package/dist/{ports-DdSUicVo.mjs → ports-D-MmCTdv.mjs} +3 -3
  107. package/dist/prebuild-uD_ipCxF.mjs +449 -0
  108. package/dist/{project-_phNIJfs.mjs → project-BZNjmW_8.mjs} +65 -37
  109. package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-Lfetn8Kr.mjs} +2 -2
  110. package/dist/pull-request-zjCSAryH.d.mts +120 -0
  111. package/dist/pull-requests.d.mts +1 -119
  112. package/dist/pull-requests.mjs +1 -1
  113. package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-DuzH0cn3.mjs} +74 -48
  114. package/dist/{gradle-DSrXb6lG.mjs → react-native-build-rhk4smwQ.mjs} +292 -15
  115. package/dist/react-native-doctor-CQpuIMso.mjs +234 -0
  116. package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-Bhq1rJeV.mjs} +46 -28
  117. package/dist/{recordings-D0d5aQt0.mjs → recordings-DYteQSu4.mjs} +12 -9
  118. package/dist/{reload-C8JhxjSh.mjs → reload-CmTRFJaX.mjs} +93 -47
  119. package/dist/reload-DzjSl5P_.mjs +2 -0
  120. package/dist/{remote-BiR6aYjy.mjs → remote-ByYkXdGD.mjs} +15 -10
  121. package/dist/result-DNiS-tTP.mjs +434 -0
  122. package/dist/{run-BtPgpKks.mjs → run-D23HmJMs.mjs} +4 -5
  123. package/dist/selection-CSl9i5qU.mjs +619 -0
  124. package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CxTrvDg8.mjs} +3 -4
  125. package/dist/{server-command-CTtCkmcQ.mjs → server-command-CtzloH3v.mjs} +14 -7
  126. package/dist/server-expo-C-90EhcG.mjs +2 -0
  127. package/dist/{server-expo-DsguMGUF.mjs → server-expo-DT_F_uVI.mjs} +50 -9
  128. package/dist/{settings-B717odTD.mjs → settings-CsJDEXgK.mjs} +234 -24
  129. package/dist/{settings-vk3mJGSm.d.mts → settings-DkdmlelE.d.mts} +6 -4
  130. package/dist/settings-T1gtc3bf.mjs +114 -0
  131. package/dist/settings-write-HyVZ8eQ8.mjs +359 -0
  132. package/dist/settings.schema.json +163 -16
  133. package/dist/{simslim-CCr3rE-A.mjs → simslim-Cgk17SXV.mjs} +14 -12
  134. package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-DF8VfT64.mjs} +15 -20
  135. package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
  136. package/dist/stage-BIS0ydsV.mjs +183 -0
  137. package/dist/{start-BWqzODpb.mjs → start-7lpH7hmN.mjs} +63 -44
  138. package/dist/{start-TXeMmmO2.mjs → start-RChynRDp.mjs} +1 -1
  139. package/dist/{state-D1Icyjlu.mjs → state-C4ZtUisW.mjs} +40 -13
  140. package/dist/{state-CG_OFoaA.mjs → state-XMziexv2.mjs} +3 -2
  141. package/dist/{stats-BoY5sEPU.mjs → stats-53T7OTb9.mjs} +7 -13
  142. package/dist/stats-report-BFfMpWWF.mjs +16 -0
  143. package/dist/{status-WgFbkRzj.mjs → status-BL7jVyAB.mjs} +535 -447
  144. package/dist/status-CSi6tlRq.mjs +2 -0
  145. package/dist/{status-BTA7kKiQ.mjs → status-DqEUSSxs.mjs} +6 -4
  146. package/dist/{status-watch-C23ILtf9.mjs → status-watch-GDCfqpTE.mjs} +187 -22
  147. package/dist/status-worker.d.mts +1 -0
  148. package/dist/status-worker.mjs +19 -0
  149. package/dist/stim-desktop-C12we7lz.mjs +112 -0
  150. package/dist/{stop-DR6VoDIk.mjs → stop-Bk_1qiV6.mjs} +2 -2
  151. package/dist/{stop-BNmBMi1F.mjs → stop-CPzlM1L-.mjs} +138 -98
  152. package/dist/{stop-DPEhunlw.mjs → stop-D7h6jAXQ.mjs} +11 -10
  153. package/dist/supervisor-run.d.mts +8 -17
  154. package/dist/supervisor-run.mjs +63 -27
  155. package/dist/{support-DMTqj3Hm.mjs → support-67vraa1Q.mjs} +18 -11
  156. package/dist/{support-CwjbFs9H.mjs → support-Dlu37g6H.mjs} +12 -12
  157. package/dist/{swiftpm-macos-DRNVJWlb.mjs → swiftpm-macos-p8WZbxKU.mjs} +35 -24
  158. package/dist/toolchain-DhKwp9iI.mjs +2 -0
  159. package/dist/toolchain-Hp9sCpK4.mjs +873 -0
  160. package/dist/{trigger-CigAYjeL.mjs → trigger-BAahxUPq.mjs} +20 -5
  161. package/dist/trigger-Bf3uDcpv.mjs +2 -0
  162. package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-BHX5r0Ei.mjs} +250 -156
  163. package/dist/{web-BDBMxDpx.mjs → web-CJmIj6AI.mjs} +18 -13
  164. package/dist/web-DknQETPs.mjs +2 -0
  165. package/dist/web-run.mjs +11 -12
  166. package/dist/windows-report.d.mts +1 -0
  167. package/dist/windows-report.mjs +18 -0
  168. package/dist/windows-report.ps1 +43 -0
  169. package/dist/workspace-process-lock-1_1OoVW5.mjs +57 -0
  170. package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-Cjuigeeu.mjs} +62 -58
  171. package/dist/{workspaces-C36s2jb9.mjs → workspaces-BccMFmGQ.mjs} +1188 -1079
  172. package/dist/worktree-CK2MpJW5.mjs +2 -0
  173. package/dist/{worktree-CgvJYJ-Q.mjs → worktree-DQ6Zi2Mv.mjs} +304 -53
  174. package/dist/xcode-Zlx3qjEs.mjs +896 -0
  175. package/package.json +7 -5
  176. package/shim/android-optimizations.gradle +7 -5
  177. package/dist/activity-BSV745Kz.mjs +0 -629
  178. package/dist/api-qvOzWyfO.mjs +0 -154
  179. package/dist/api-run.mjs +0 -294
  180. package/dist/app-install-BIKtMfPq.mjs +0 -896
  181. package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
  182. package/dist/budget-f7516Zk0.mjs +0 -4106
  183. package/dist/build-facts-DcLv2HSd.d.mts +0 -111
  184. package/dist/cancellation-C_22VQTH.mjs +0 -24
  185. package/dist/client-qQAaXSUs.mjs +0 -1771
  186. package/dist/config-BYDxlMY3.mjs +0 -562
  187. package/dist/device-DuiPJQSn.mjs +0 -290
  188. package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
  189. package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
  190. package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
  191. package/dist/exec-DqKo9GKJ.mjs +0 -268
  192. package/dist/git-DDfFzkMm.mjs +0 -45
  193. package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
  194. package/dist/logs-BGrEUaEs.mjs +0 -383
  195. package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
  196. package/dist/native-android-D5qc3-_v.mjs +0 -226
  197. package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
  198. package/dist/plan-C4TjdPsR.mjs +0 -260
  199. package/dist/prebuild-DYbucPXy.mjs +0 -212
  200. package/dist/preview-78a9kR_-.mjs +0 -1011
  201. package/dist/react-native-build-CtCccJtb.mjs +0 -239
  202. package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
  203. package/dist/remote-cache-OyOyVIS3.mjs +0 -526
  204. package/dist/result-CaJg5Iat.mjs +0 -186
  205. package/dist/server-expo-Bigriskl.mjs +0 -2
  206. package/dist/settings-BORNaaCO.mjs +0 -402
  207. package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
  208. package/dist/stage-KNTQopqv.mjs +0 -157
  209. package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
  210. package/dist/tailnet-Dh-qiYzG.mjs +0 -265
  211. package/dist/toolchain-BFkAcstd.mjs +0 -2
  212. package/dist/toolchain-DxSsNssu.mjs +0 -1657
  213. package/dist/trigger-9_USgmxz.mjs +0 -2
  214. package/dist/web-Dq-i3wzJ.mjs +0 -2
  215. package/dist/worktree-DpLdCHga.mjs +0 -2
  216. package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
  217. package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
@@ -1,25 +1,27 @@
1
- import { H as parseDeviceSlotKey, T as setSupervisor, W as projectDeviceSlots, k as process_identity_exports, o as clearSupervisor, p as getProject } from "./config-BYDxlMY3.mjs";
2
- import { J as runnableMetroCommand, K as resolveProjectSettings } from "./settings-B717odTD.mjs";
3
- import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-BX1sJQ2E.mjs";
4
- import { E as workspaceStateFile, a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, w as workspaceLogsDir$1 } from "./workspace-state-DJt_MMvf.mjs";
5
- import { A as clearWorkspaceSupervisor, C as MODE_BARE, E as clearExpoMetroTunnel, L as writePidFile, M as readPidFile, T as MODE_EXPO, _ as detectIsExpo, u as nativeProjectIntegration, w as MODE_COMMAND } from "./project-_phNIJfs.mjs";
6
- import { z as ownedAvdSerialResolver } from "./android-Mz_Inn3w.mjs";
7
- import { f as withIdleWorkspace } from "./workspaces-C36s2jb9.mjs";
8
- import { dt as devServerStopLevel, ft as devServerStopRecord, g as workspaceBuildInProgress, gt as vanishedSupervisorMessage, lt as describeDevServerStop } from "./budget-f7516Zk0.mjs";
9
- import { a as withWorkspaceProcessLock } from "./named-ports-4WopRPg-.mjs";
10
- import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
11
- import { t as describeError } from "./errors-DzkMYh8Q.mjs";
12
- import { t as relaunchWithLogFile } from "./detached-entry-B9C_zeQC.mjs";
13
- import { n as parseTriggerCount, o as runWatchman, r as parseWatchRoots, t as parseSubscriberNames } from "./watchman-CPQFZLXY.mjs";
14
- import { m as workspaceDeviceLastUseAt, r as createActivityReader } from "./activity-BSV745Kz.mjs";
15
- import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DtxhPTKe.mjs";
16
- import { d as probeHostedSession } from "./hosted-client-ZEKpS9vw.mjs";
17
- import { t as clearHostedMetro } from "./metro-gateway-CX9Xlkq2.mjs";
18
- import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
19
- import { dirname, isAbsolute, join, resolve, sep } from "node:path";
1
+ import { p as process_identity_exports } from "./exec-_UbtCQcG.mjs";
2
+ import { g as workspaceStateFile$1, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
3
+ import { K as projectDeviceSlots, T as setSupervisor, W as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-CYcBF478.mjs";
4
+ import { c as withWorkspaceStateLock, d as writeWorkspaceState, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-Cjuigeeu.mjs";
5
+ import { X as runnableMetroCommand, q as resolveProjectSettings } from "./settings-CsJDEXgK.mjs";
6
+ import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-BZNjmW_8.mjs";
7
+ import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
8
+ import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-op6A54yi.mjs";
9
+ import { A as workspaceBuildInProgress, _ as devServerStopRecord, g as devServerStopLevel, m as describeDevServerStop, x as vanishedSupervisorMessage } from "./budget-Bs6SxxzO.mjs";
10
+ import { f as withIdleWorkspace } from "./workspaces-BccMFmGQ.mjs";
11
+ import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-BzVfHSrY.mjs";
12
+ import { H as ownedAvdSerialResolver } from "./android-DUYkNF4u.mjs";
13
+ import { t as withWorkspaceProcessLock } from "./workspace-process-lock-1_1OoVW5.mjs";
14
+ import { t as describeError } from "./errors-ccaPc4ox.mjs";
15
+ import { f as probeHostedSession } from "./hosted-client-DB_gBPfY.mjs";
16
+ import { t as clearHostedMetro } from "./metro-gateway-BMJNlj3E.mjs";
17
+ import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DaKmZi0z.mjs";
18
+ import { t as relaunchWithLogFile } from "./detached-entry-DFRyG1_o.mjs";
19
+ import { t as triggerMaintenance } from "./trigger-BAahxUPq.mjs";
20
+ import { existsSync, readFileSync, realpathSync, statSync, watch } from "node:fs";
21
+ import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
22
+ import { LOG_ROTATE_BYTES, createMetroGateway } from "@stim-cli/core";
20
23
  import { DEV_SERVER_STOP_REQUEST_KEY, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, IDLE_STOP_KEY, hostedAndroidPlacements, hostedIosPlacements, hostedMetroGateways, hostedMetroRequests, hostedNativeRecords, parseHostedNativePlacement, readDevServerStopRequest } from "@stim-cli/core/state";
21
24
  import { fileURLToPath } from "node:url";
22
- import { LOG_ROTATE_BYTES, createMetroGateway } from "@stim-cli/core";
23
25
  //#region src/supervisor/hosted-metro.ts
24
26
  function reconcileHostedMetro(requests, active) {
25
27
  const same = (session) => JSON.stringify(requests[session]) === JSON.stringify(active[session]);
@@ -35,8 +37,10 @@ function watchHostedMetro(root, metroPort, processToken) {
35
37
  let running = Promise.resolve();
36
38
  let probingAt = 0;
37
39
  let probing = false;
40
+ let probeTimer;
38
41
  let stamp = "";
39
42
  let cached = null;
43
+ let queued = false;
40
44
  updateWorkspaceState(root, (state) => state.supervisor?.processToken === processToken ? {
41
45
  ...state,
42
46
  supervisor: {
@@ -45,7 +49,7 @@ function watchHostedMetro(root, metroPort, processToken) {
45
49
  }
46
50
  } : state);
47
51
  const readState = () => {
48
- const file = statSync(workspaceStateFile(root));
52
+ const file = statSync(workspaceStateFile$1(root));
49
53
  const next = `${file.ino}:${file.mtimeMs}:${file.ctimeMs}:${file.size}`;
50
54
  if (next !== stamp) {
51
55
  cached = readWorkspaceState$1(root);
@@ -121,23 +125,47 @@ function watchHostedMetro(root, metroPort, processToken) {
121
125
  }
122
126
  }
123
127
  if (!probing && Date.now() >= probingAt) {
128
+ clearTimeout(probeTimer);
124
129
  probingAt = Date.now() + 1e4;
125
130
  probing = true;
126
131
  Promise.all(placements.map(async (placement) => {
127
132
  if ((await probeHostedSession(placement)).state === "stopped" && !closed) clearHostedMetro(root, placement.session);
128
133
  })).catch(() => {}).finally(() => {
129
134
  probing = false;
135
+ if (!closed) {
136
+ probeTimer = setTimeout(tick, Math.max(0, probingAt - Date.now()));
137
+ probeTimer.unref();
138
+ }
130
139
  });
131
140
  }
132
141
  };
133
142
  const tick = () => {
134
- running = running.then(reconcile).catch(() => {});
143
+ if (closed || queued) return;
144
+ queued = true;
145
+ running = running.then(() => {
146
+ queued = false;
147
+ return reconcile();
148
+ }).catch(() => {});
135
149
  };
136
- const timer = setInterval(tick, 500);
150
+ const stateFile = workspaceStateFile$1(root);
151
+ let watcher = null;
152
+ try {
153
+ watcher = watch(dirname(stateFile), (_event, name) => {
154
+ if (name === null || name.toString() === basename(stateFile)) tick();
155
+ });
156
+ watcher.on("error", () => {
157
+ watcher?.close();
158
+ watcher = null;
159
+ });
160
+ watcher.unref();
161
+ } catch {}
162
+ const timer = setInterval(tick, 1e4);
137
163
  timer.unref();
138
164
  tick();
139
165
  return async () => {
140
166
  closed = true;
167
+ watcher?.close();
168
+ clearTimeout(probeTimer);
141
169
  clearInterval(timer);
142
170
  await running;
143
171
  await Promise.all([...bridges.values()].map((bridge) => bridge.close()));
@@ -409,6 +437,7 @@ function trackMetroWatchRoots({ workspaceRoot, writer, watchman = runWatchman, p
409
437
  }
410
438
  //#endregion
411
439
  //#region src/supervisor/run.ts
440
+ const MAINTENANCE_TRIGGER_MS = 6e4;
412
441
  const USAGE = "Usage: run.js --root <path> --port <n> [--tunnel] [--reset-cache] [--idle-stop-minutes <n>] [--device-idle-minutes <n>]";
413
442
  function parseArgs(argv) {
414
443
  let root;
@@ -518,6 +547,11 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
518
547
  let stopWatchingIdle = null;
519
548
  let stopWatchingDevices = null;
520
549
  let closeHostedMetro = null;
550
+ const maintenanceTimer = setInterval(() => triggerMaintenance("supervisor", {
551
+ argv: [],
552
+ warn: false
553
+ }), MAINTENANCE_TRIGGER_MS);
554
+ maintenanceTimer.unref?.();
521
555
  const stopCause = (trigger) => {
522
556
  const request = readDevServerStopRequest(readWorkspaceState$1(root));
523
557
  return devServerStopRecord(trigger, request?.processToken === processToken ? request : null, new Date(now()).toISOString());
@@ -525,6 +559,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
525
559
  const finish = (code, event, level, msg, stop) => {
526
560
  stopWatchingIdle?.();
527
561
  stopWatchingDevices?.();
562
+ clearInterval(maintenanceTimer);
528
563
  writer.write({
529
564
  src: "metro",
530
565
  level,
@@ -561,6 +596,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
561
596
  stopping = true;
562
597
  stopWatchingIdle?.();
563
598
  stopWatchingDevices?.();
599
+ clearInterval(maintenanceTimer);
564
600
  await closeHostedMetro?.();
565
601
  await watchRoots.beforeClose();
566
602
  try {
@@ -601,7 +637,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
601
637
  try {
602
638
  let start;
603
639
  if (command) {
604
- const startServer = startCommand ?? (await import("./server-command-CTtCkmcQ.mjs")).startCommandServer;
640
+ const startServer = startCommand ?? (await import("./server-command-CtzloH3v.mjs")).startCommandServer;
605
641
  start = (opts) => startServer({
606
642
  ...opts,
607
643
  command
@@ -677,8 +713,8 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
677
713
  hasDue: () => deviceIdle.due(root, deviceIdleMs).length > 0,
678
714
  onDue: async () => {
679
715
  try {
680
- await withIdleWorkspace(root, () => {
681
- if (!stopping) shutDownIdleDevices(deviceIdleMs);
716
+ await withIdleWorkspace(root, async () => {
717
+ if (!stopping) await shutDownIdleDevices(deviceIdleMs);
682
718
  }, {
683
719
  purpose: "device idle shutdown",
684
720
  supervisor: false,
@@ -699,7 +735,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
699
735
  const idleMinutes = idleMinutesNow();
700
736
  if (stopping || idleMinutes === null) return;
701
737
  if (deviceIdleMinutes > 0) try {
702
- shutDownIdleDevices(Math.min(deviceIdleMs, idleStopMinutes * 6e4));
738
+ await shutDownIdleDevices(Math.min(deviceIdleMs, idleStopMinutes * 6e4));
703
739
  } catch (err) {
704
740
  stderr(`Stim supervisor: could not shut down idle devices: ${describeError(err)}`);
705
741
  }
@@ -1,8 +1,9 @@
1
- import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
2
- import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-Mz_Inn3w.mjs";
3
- import { E as pickDevClientScheme } from "./app-install-BIKtMfPq.mjs";
4
- import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-CBUAcRyQ.mjs";
5
- import { t as devClientScheme } from "./dev-client-DAWVIGBu.mjs";
1
+ import { t as getExecutor } from "./exec-_UbtCQcG.mjs";
2
+ import { qt as killOnAbort } from "./settings-CsJDEXgK.mjs";
3
+ import { kn as pickDevClientScheme } from "./budget-Bs6SxxzO.mjs";
4
+ import { C as emulatorFailureRemedy, I as memoizeEmulatorProbe, J as pickDefaultSystemImage, O as hostSystemImageArch, S as emulatorDiskSpaceRemedy, T as findBuildTool, X as profileNeedsFoldFeature, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-DUYkNF4u.mjs";
5
+ import { d as unknownAndroidSystemImageRefusal, s as layerNote, u as unknownAndroidDeviceProfileRefusal } from "./device-capacity-CMlqEcvw.mjs";
6
+ import { t as devClientScheme } from "./dev-client-UOeESKm6.mjs";
6
7
  import { existsSync, readFileSync, readdirSync } from "node:fs";
7
8
  import { relative } from "node:path";
8
9
  //#region src/commands/android/support.ts
@@ -133,9 +134,10 @@ function findAapt(home = androidHome(), { readDir = readdirSync, exists = exists
133
134
  version: found.version
134
135
  } : null;
135
136
  }
136
- function dumpApkManifest(apkPath, { exec = null, aapt = null } = {}) {
137
+ async function dumpApkManifest(apkPath, { exec = null, aapt = null, context } = {}) {
137
138
  if (typeof apkPath !== "string" || apkPath.trim() === "") return null;
138
- const tool = aapt || findAapt();
139
+ context?.signal.throwIfAborted();
140
+ const tool = aapt || findAapt(androidHome(context?.env));
139
141
  if (!tool) return null;
140
142
  const e = exec || getExecutor();
141
143
  const args = tool.tool === "aapt2" ? [
@@ -151,7 +153,11 @@ function dumpApkManifest(apkPath, { exec = null, aapt = null } = {}) {
151
153
  "AndroidManifest.xml"
152
154
  ];
153
155
  try {
154
- const out = e.runFile(tool.path, args, { timeoutMs: 3e4 });
156
+ const out = await e.runFileAsync(tool.path, args, {
157
+ timeoutMs: 3e4,
158
+ declareFor: context,
159
+ onSpawn: killOnAbort(context?.signal)
160
+ });
155
161
  return typeof out === "string" && out.includes("E: manifest") ? out : null;
156
162
  } catch {
157
163
  return null;
@@ -221,10 +227,11 @@ function apkDevClientFacts(text) {
221
227
  });
222
228
  return facts;
223
229
  }
224
- function androidDevClientScheme(root, apkPath, { exec = null, dump = dumpApkManifest, aapt = null } = {}) {
225
- const text = dump(apkPath, {
230
+ async function androidDevClientScheme(root, apkPath, { exec = null, dump = dumpApkManifest, aapt = null, context } = {}) {
231
+ const text = await dump(apkPath, {
226
232
  exec,
227
- aapt
233
+ aapt,
234
+ context
228
235
  });
229
236
  if (text) {
230
237
  const facts = apkDevClientFacts(text);
@@ -1,13 +1,13 @@
1
- import { Q as settingShapeErrors, a as SETTING_SHAPE_REMEDY, b as iosProjectDirSettingError, nt as unknownSettingKeys, p as cacheProviderSettingError, y as iosProjectDirSetting } from "./settings-B717odTD.mjs";
2
- import { w as workspaceLogsDir } from "./workspace-state-DJt_MMvf.mjs";
3
- import { h as shortUdid, l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
4
- import { p as resolveOptimizations } from "./errors-DzkMYh8Q.mjs";
5
- import { y as resolveBuildPlacement } from "./client-qQAaXSUs.mjs";
6
- import { j as parseIosSimulatorApp } from "./ios-RkW4pnQf.mjs";
7
- import { F as describeDiagnostic } from "./toolchain-DxSsNssu.mjs";
8
- import { d as unknownIosDeviceTypeRefusal, f as unknownIosRuntimeRefusal, o as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-CBUAcRyQ.mjs";
9
- import { l as parseDeviceWait } from "./device-lease-run-Cw2M4z51.mjs";
10
- import { t as IosDeviceMismatchError } from "./device-ios-COSi6oS1.mjs";
1
+ import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
2
+ import { h as shortUdid, l as phaseLine } from "./command-output-B1UrjZHL.mjs";
3
+ import { a as SETTING_SHAPE_REMEDY, b as iosProjectDirSettingError, et as settingShapeErrors, it as unknownSettingKeys, p as cacheProviderSettingError, y as iosProjectDirSetting } from "./settings-CsJDEXgK.mjs";
4
+ import { j as parseIosSimulatorApp } from "./ios-CpByZy12.mjs";
5
+ import { p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
6
+ import { y as describeDiagnostic } from "./xcode-Zlx3qjEs.mjs";
7
+ import { s as resolveBuildPlacement } from "./selection-CSl9i5qU.mjs";
8
+ import { l as parseDeviceWait } from "./device-lease-run-C8raGFoP.mjs";
9
+ import { f as unknownIosDeviceTypeRefusal, p as unknownIosRuntimeRefusal, s as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-CMlqEcvw.mjs";
10
+ import { t as IosDeviceMismatchError } from "./device-ios-DRUeKaFV.mjs";
11
11
  import { basename, join } from "node:path";
12
12
  import chalk from "chalk";
13
13
  function buildLogFile(root) {
@@ -18,7 +18,7 @@ function iosProjectPathError(settings, root, isExpo) {
18
18
  if (error || !iosProjectDirSetting(settings, root).custom || !isExpo()) return error;
19
19
  return "ios.projectPath applies to bare React Native apps only: expo prebuild generates and builds ios/. Remove it for this Expo app.";
20
20
  }
21
- function resolveIosBuildSetup(remoteBuild, settings, warn) {
21
+ function resolveIosBuildSetup(remoteBuild, settings, warn, env) {
22
22
  const [shapeError, ...lines] = settingShapeErrors(settings);
23
23
  if (shapeError) return {
24
24
  ok: false,
@@ -39,7 +39,7 @@ function resolveIosBuildSetup(remoteBuild, settings, warn) {
39
39
  };
40
40
  let optimizations;
41
41
  try {
42
- optimizations = resolveOptimizations(settings);
42
+ optimizations = resolveOptimizations(settings, env);
43
43
  } catch (error) {
44
44
  return {
45
45
  ok: false,
@@ -1,26 +1,28 @@
1
- import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
2
- import { Dt as repoRoot } from "./settings-B717odTD.mjs";
3
- import { a as spawnDeclared } from "./spawn-claims-DVS5RkMS.mjs";
4
- import { s as macosToolchain } from "./toolchain-DxSsNssu.mjs";
5
- import { i as validateInfoPlist, n as setBundleName, r as stageBundle, t as resolveBundleExtras } from "./stage-KNTQopqv.mjs";
6
- import { t as logLines } from "./run-BtPgpKks.mjs";
1
+ import { s as spawnDeclared, t as getExecutor } from "./exec-_UbtCQcG.mjs";
2
+ import { It as repoRootAsync } from "./settings-CsJDEXgK.mjs";
3
+ import { c as macosToolchainAsync } from "./toolchain-Hp9sCpK4.mjs";
4
+ import { i as validateInfoPlist, n as setBundleName, r as stageBundle, t as resolveBundleExtras } from "./stage-BIS0ydsV.mjs";
5
+ import { t as logLines } from "./run-D23HmJMs.mjs";
7
6
  import { existsSync, realpathSync } from "node:fs";
8
7
  import { join, relative, resolve } from "node:path";
9
8
  //#region src/integrations/swiftpm-macos.ts
10
9
  function swiftpmMacosProject(root) {
11
- return { prepare(settings) {
10
+ return { async prepare(context, settings) {
12
11
  const macos = settings.macos;
13
12
  if (!macos?.product || !macos.infoPlist) throw Object.assign(/* @__PURE__ */ new Error("Set macos.product and macos.infoPlist explicitly in .stim.json. See stim guide macos."), { code: "STIM_BAD_ARG" });
14
13
  const { product, infoPlist } = macos;
15
- const { bundleId } = validateInfoPlist(root, product, infoPlist);
16
- const repository = realpathSync(repoRoot(root) ?? root);
14
+ const { bundleId } = await validateInfoPlist(context, root, product, infoPlist);
15
+ const repository = realpathSync(await repoRootAsync(root, {
16
+ env: context.env,
17
+ signal: context.signal
18
+ }) ?? root);
17
19
  const extras = resolveBundleExtras(root, repository, macos.resources, macos.assetCatalog);
18
20
  return {
19
21
  product,
20
22
  arguments: macos.arguments ?? [],
21
23
  bundleId,
22
24
  async compile({ scratch, writer, note }) {
23
- await tool(root, [
25
+ await tool(context, root, [
24
26
  "build",
25
27
  "-c",
26
28
  "debug",
@@ -31,7 +33,7 @@ function swiftpmMacosProject(root) {
31
33
  "--jobs",
32
34
  "2"
33
35
  ], writer, note);
34
- return tool(root, [
36
+ return tool(context, root, [
35
37
  "build",
36
38
  "-c",
37
39
  "debug",
@@ -40,37 +42,46 @@ function swiftpmMacosProject(root) {
40
42
  "--show-bin-path"
41
43
  ], writer, () => {}, true);
42
44
  },
43
- stage: (bin, bundle, id, displayName) => stageBundle(root, product, infoPlist, bin, bundle, id, extras, displayName),
44
- validateFetched(bundle, id, displayName) {
45
+ stage: (bin, bundle, id, displayName) => stageBundle(context, root, product, infoPlist, bin, bundle, id, extras, displayName),
46
+ async validateFetched(bundle, id, displayName) {
45
47
  const executable = join(bundle, "Contents", "MacOS", product);
46
- const plist = JSON.parse(getExecutor().runFile("plutil", [
48
+ const plist = JSON.parse(await getExecutor().runFileAsync("plutil", [
47
49
  "-convert",
48
50
  "json",
49
51
  "-o",
50
52
  "-",
51
53
  join(bundle, "Contents", "Info.plist")
52
- ], { timeoutMs: 1e4 }));
54
+ ], {
55
+ timeoutMs: 1e4,
56
+ declareFor: context
57
+ }));
53
58
  if (plist.CFBundleIdentifier !== id || plist.CFBundleExecutable !== product || !existsSync(executable)) throw new Error("The fetched macOS bundle does not match the requested identity and executable.");
54
59
  for (const destination of [...Object.keys(extras.resources), ...extras.assetCatalog ? ["Assets.car"] : []]) if (!existsSync(join(bundle, "Contents", "Resources", destination))) throw new Error(`The fetched macOS bundle lacks declared resource ${destination}.`);
55
60
  if (displayName !== void 0) {
56
- setBundleName(join(bundle, "Contents", "Info.plist"), displayName);
57
- getExecutor().runFile("codesign", [
61
+ await setBundleName(context, join(bundle, "Contents", "Info.plist"), displayName);
62
+ await getExecutor().runFileAsync("codesign", [
58
63
  "--force",
59
64
  "--sign",
60
65
  "-",
61
66
  bundle
62
- ], { timeoutMs: "unbounded" });
67
+ ], {
68
+ timeoutMs: "unbounded",
69
+ declareFor: context
70
+ });
63
71
  }
64
- getExecutor().runFile("codesign", [
72
+ await getExecutor().runFileAsync("codesign", [
65
73
  "--verify",
66
74
  "--strict",
67
75
  bundle
68
- ], { timeoutMs: "unbounded" });
76
+ ], {
77
+ timeoutMs: "unbounded",
78
+ declareFor: context
79
+ });
69
80
  },
70
81
  offload: {
71
- target: () => ({
82
+ target: async () => ({
72
83
  platform: "macos",
73
- local: macosToolchain()
84
+ local: await macosToolchainAsync()
74
85
  }),
75
86
  request: (id) => ({
76
87
  platform: "macos",
@@ -84,8 +95,8 @@ function swiftpmMacosProject(root) {
84
95
  };
85
96
  } };
86
97
  }
87
- async function tool(root, args, writer, note, capture = false) {
88
- const child = spawnDeclared(() => getExecutor().spawn("swift", args, {
98
+ async function tool(context, root, args, writer, note, capture = false) {
99
+ const child = spawnDeclared(context, () => getExecutor().spawn("swift", args, {
89
100
  cwd: root,
90
101
  detached: true,
91
102
  stdio: [
@@ -0,0 +1,2 @@
1
+ import { c as macosToolchainAsync, s as macosToolchain } from "./toolchain-Hp9sCpK4.mjs";
2
+ export { macosToolchain, macosToolchainAsync };