stim 1.17.2 → 1.19.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 (162) hide show
  1. package/README.md +50 -1
  2. package/dist/{activity-IRvJY_ru.mjs → activity-BSw0x84R.mjs} +4 -4
  3. package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-Bjxu_VmX.mjs} +8 -8
  4. package/dist/{android-B9yaNKwa.mjs → android-BXc6BmEi.mjs} +658 -404
  5. package/dist/{android-B_YNZy61.mjs → android-BdQC6zs1.mjs} +9 -9
  6. package/dist/android-BvV1gGdN.mjs +4 -0
  7. package/dist/{android-DE4v59Mb.mjs → android-DE5g_5gv.mjs} +2 -2
  8. package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-C87geAg-.mjs} +5 -5
  9. package/dist/android-cas-compiler.mjs +2 -2
  10. package/dist/api-DIf_s86s.mjs +150 -0
  11. package/dist/api-run.d.mts +1 -0
  12. package/dist/api-run.mjs +145 -0
  13. package/dist/api.d.mts +218 -0
  14. package/dist/api.mjs +2 -0
  15. package/dist/{app-install-VPkI5WEg.mjs → app-install-CFI4ptUL.mjs} +33 -13
  16. package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
  17. package/dist/{web-Dl0KSRHf.mjs → browser-web-CDhqQxhv.mjs} +138 -176
  18. package/dist/{budget-DfcgFdQB.mjs → budget-Dz-kyXLv.mjs} +1391 -58
  19. package/dist/build-facts-B87vo-Im.d.mts +142 -0
  20. package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-DiwKSyv9.mjs} +3 -3
  21. package/dist/cache-manifest.mjs +1 -1
  22. package/dist/{chrome-BrcVWQyD.mjs → chrome-BTUOo8p2.mjs} +1 -1
  23. package/dist/cli-C9Zvgbdc.mjs +68 -0
  24. package/dist/cli.mjs +1 -1
  25. package/dist/{client-SvBdgObD.mjs → client-CuUo8Nvg.mjs} +381 -49
  26. package/dist/collector-run.d.mts +6 -0
  27. package/dist/collector-run.mjs +9 -9
  28. package/dist/{command-output-CDAIFD-8.mjs → command-output-Bt8ygHE7.mjs} +2 -2
  29. package/dist/{config-D0DbpZtM.mjs → config-DC5jEtd1.mjs} +9 -5
  30. package/dist/{created-devices-CpvzBL25.mjs → created-devices-D0s26Hx5.mjs} +2 -2
  31. package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-DKaS1OM9.mjs} +2 -2
  32. package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-pB_IPfV4.mjs} +1 -1
  33. package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CDY_zAmD.mjs} +2 -2
  34. package/dist/{device-C8IOoJPv.mjs → device-BHw0WlHl.mjs} +8 -8
  35. package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-BoN1jQkO.mjs} +25 -14
  36. package/dist/device-host-worker.mjs +19 -19
  37. package/dist/{gradle-dJpre3Yn.mjs → device-ios-B2ruohE-.mjs} +661 -107
  38. package/dist/{device-lease-DpoS36_u.mjs → device-lease-Cu7PtQpZ.mjs} +9 -9
  39. package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-D38SnZtt.mjs} +4 -4
  40. package/dist/{device-pool-3o7s5lo4.mjs → device-pool-CP4rAsHx.mjs} +3 -3
  41. package/dist/{device-remote-hFSkpfQu.mjs → device-remote-B5GiUifk.mjs} +15 -16
  42. package/dist/{doctor-CFv1fCrF.mjs → doctor-PRJH94v6.mjs} +61 -34
  43. package/dist/doctor-watchman-wZhyTdp4.mjs +259 -0
  44. package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics--v5HGOU0.mjs} +11 -11
  45. package/dist/{exec-CaErVv7t.mjs → exec-i8GDPwq9.mjs} +93 -6
  46. package/dist/{gc-DEmkg3Xh.mjs → gc-CyHMcKcn.mjs} +25 -471
  47. package/dist/{guide-CSmhMTf8.mjs → guide-dRaQJJk9.mjs} +681 -507
  48. package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bs7fytj7.mjs} +3 -3
  49. package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C5G4h_OJ.mjs} +2 -2
  50. package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-Bik035eL.mjs} +1 -1
  51. package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-CI9Az9a4.mjs} +9 -9
  52. package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-DABm3ScO.mjs} +5 -5
  53. package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DbV2aUVw.mjs} +13 -9
  54. package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-DYiMBn34.mjs} +7 -8
  55. package/dist/{ios-DSfnPfse.mjs → ios-BWbHFZVz.mjs} +19 -7
  56. package/dist/{ios-Cr1h5gnO.mjs → ios-DCrkgXEM.mjs} +1 -1
  57. package/dist/ios-DYUr9LGc.mjs +8 -0
  58. package/dist/ios-ITYno9rO.mjs +2241 -0
  59. package/dist/{ios-device-pAN4t54-.mjs → ios-device-CJ_ZOGky.mjs} +3 -3
  60. package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-CrW8aMb5.mjs} +1 -1
  61. package/dist/{ios-state-8L3lgum6.mjs → ios-state-By0XuLTQ.mjs} +1 -1
  62. package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-DCveSE6d.mjs} +5 -5
  63. package/dist/{logs-BAaS7gS2.mjs → logs-Bao1HOMy.mjs} +13 -13
  64. package/dist/{macos-BIRQS90f.mjs → macos-ciyBdTY5.mjs} +194 -132
  65. package/dist/macos-nIOATJmR.mjs +2 -0
  66. package/dist/macos-run.mjs +1 -1
  67. package/dist/maintenance-run.mjs +349 -47
  68. package/dist/manifest-CX0d1IkZ.mjs +148 -0
  69. package/dist/{metro-g8NqiJp-.mjs → metro-DI2AjPF_.mjs} +196 -43
  70. package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-BxpJLIwh.mjs} +4 -4
  71. package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
  72. package/dist/{build-plan-BDsSi09V.mjs → miss-reason-CjQCOKqq.mjs} +207 -249
  73. package/dist/{named-ports-C8m8EQs2.mjs → named-ports-B4iWH4E-.mjs} +70 -8
  74. package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-BGxsbfny.mjs} +6 -6
  75. package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
  76. package/dist/offload-worker.d.mts +3 -45
  77. package/dist/offload-worker.mjs +11 -11
  78. package/dist/{ownership-DyRQru0q.mjs → ownership-EB0ySdGK.mjs} +3 -3
  79. package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
  80. package/dist/placement-log-Dxe34rJm.mjs +88 -0
  81. package/dist/plan-placement-BVY59qa8.mjs +290 -0
  82. package/dist/{ports-4nYqxPWC.mjs → ports-ByPc0_97.mjs} +3 -3
  83. package/dist/{prebuild-D7RUMkwN.mjs → prebuild-BKJ3wJI1.mjs} +5 -5
  84. package/dist/preview-BbSottmO.mjs +986 -0
  85. package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
  86. package/dist/project-B5eQ1USs.mjs +612 -0
  87. package/dist/{pull-request-pxnDCQzn.mjs → pull-request-IHNdMnG8.mjs} +1 -1
  88. package/dist/pull-requests.mjs +1 -1
  89. package/dist/react-native-ios-BMh2i25I.mjs +2 -0
  90. package/dist/react-native-ios-CSpIxexZ.mjs +2083 -0
  91. package/dist/{recordings-BNgsD1Tr.mjs → recordings-Bv8McZN4.mjs} +1 -1
  92. package/dist/{reload-DcRxj3qG.mjs → reload-rAPdqeRR.mjs} +14 -15
  93. package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-N3hAEaAL.mjs} +5 -5
  94. package/dist/{run-CkE9y0nc.mjs → run-lAkle1-c.mjs} +5 -5
  95. package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-CkIjnegq.mjs} +5 -6
  96. package/dist/server-expo-DGsdUGX2.mjs +2 -0
  97. package/dist/{server-expo-CHTyXD0G.mjs → server-expo-n3tUi3Em.mjs} +5 -6
  98. package/dist/{settings-SR9OmW9h.mjs → settings-2am7TSxp.mjs} +5 -5
  99. package/dist/{settings-Cfd-0r2d.mjs → settings-CxgngUZk.mjs} +116 -103
  100. package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
  101. package/dist/settings.schema.json +198 -9
  102. package/dist/{simslim-BWNrc3M3.mjs → simslim-D9LkJxIO.mjs} +7 -7
  103. package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-HV_KtPIw.mjs} +6 -6
  104. package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
  105. package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
  106. package/dist/{stage-CzaiwFsI.mjs → stage-BgaZJVZY.mjs} +14 -3
  107. package/dist/{start-AlfCPRVU.mjs → start-D8NbxNBb.mjs} +1 -1
  108. package/dist/{start-DUz3mYdb.mjs → start-DtxthMfI.mjs} +34 -27
  109. package/dist/{state-PeQiJuIu.mjs → state-D2KtnALG.mjs} +4 -4
  110. package/dist/{state-DyaNTgfR.mjs → state-Tp4uImDS.mjs} +5 -3
  111. package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
  112. package/dist/{stats-Bq4fJOdB.mjs → stats-8EJ5ivFT.mjs} +6 -6
  113. package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
  114. package/dist/{status-BA2pehwf.mjs → status-BOyp0CUl.mjs} +31 -34
  115. package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-C65jk_q2.mjs} +1 -1
  116. package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-DbmUjsLv.mjs} +1 -1
  117. package/dist/stop-D0UIpZuh.mjs +72 -0
  118. package/dist/{stop-zF1y04f2.mjs → stop-DRipAg-e.mjs} +2 -2
  119. package/dist/{stop-DQIasgKp.mjs → stop-zDlknFoz.mjs} +79 -33
  120. package/dist/supervisor-run.d.mts +24 -22
  121. package/dist/supervisor-run.mjs +21 -22
  122. package/dist/{support-CsJNVfOc.mjs → support-CNqYkV0y.mjs} +7 -7
  123. package/dist/{support-WvD__tSV.mjs → support-DsNaFg6D.mjs} +5 -5
  124. package/dist/swiftpm-macos-aJzPAj1t.mjs +119 -0
  125. package/dist/{toolchain-DNyR3NPq.mjs → toolchain-C3xSoyUl.mjs} +475 -269
  126. package/dist/{trigger-Bemu8ytw.mjs → trigger-CAhmG-4s.mjs} +6 -6
  127. package/dist/trigger-CoalsMTV.mjs +2 -0
  128. package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-pFLB2e6P.mjs} +135 -38
  129. package/dist/{status-CzS4bPO9.mjs → watchman-BL1IdOtq.mjs} +75 -7
  130. package/dist/web-DFpFeZu5.mjs +2 -0
  131. package/dist/web-DbbrPUn0.mjs +127 -0
  132. package/dist/web-run.mjs +10 -10
  133. package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-CR9X86xJ.mjs} +3 -3
  134. package/dist/{ownership-BMLqyBgJ.mjs → workspaces-Djb2gfi9.mjs} +661 -23
  135. package/dist/{worktree-Be_7NLKy.mjs → worktree-BL4M1rhB.mjs} +252 -50
  136. package/dist/{worktree-j3IcFAI5.mjs → worktree-DV-A0LNL.mjs} +1 -1
  137. package/package.json +10 -5
  138. package/shim/bundle-response.cjs +2 -1
  139. package/shim/bundle-response.d.cts +1 -1
  140. package/shim/expo-metro-config.cjs +1 -1
  141. package/dist/build-progress-D0WkjCPd.mjs +0 -1036
  142. package/dist/build-slots-41v_d2x9.mjs +0 -142
  143. package/dist/cli-CYXb29oE.mjs +0 -51
  144. package/dist/deps-iKw0eD4P.mjs +0 -438
  145. package/dist/device-ios-C2Um-XUR.mjs +0 -412
  146. package/dist/errors-B6W7FkxQ.mjs +0 -15
  147. package/dist/guide-status-Du-ZQ3FD.mjs +0 -125
  148. package/dist/idle-BXG__1BA.mjs +0 -176
  149. package/dist/in-use-CvGOUn-x.mjs +0 -130
  150. package/dist/ios-BJ4XUSe1.mjs +0 -3867
  151. package/dist/native-run-D1Q56rAD.mjs +0 -158
  152. package/dist/preview-B-g9d7kV.mjs +0 -318
  153. package/dist/process-identity-BmRm1qV0.mjs +0 -12
  154. package/dist/project-D47Rh0ly.mjs +0 -276
  155. package/dist/server-expo-CeakhI8P.mjs +0 -2
  156. package/dist/state-BKa8wNN5.mjs +0 -148
  157. package/dist/stop-BIiM49EY.mjs +0 -48
  158. package/dist/stop-cause-rhmGfwvt.mjs +0 -97
  159. package/dist/trigger-CXts6qt1.mjs +0 -2
  160. package/dist/watchman-APYjXSQa.mjs +0 -48
  161. package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
  162. package/dist/workspaces-Bcib97-6.mjs +0 -306
@@ -1,6 +1,6 @@
1
- import { a as call, o as connectHost } from "./hosted-client-Bp4knSwu.mjs";
2
- import { i as requestHostedMetro } from "./metro-gateway-C-ijGI2F.mjs";
3
- import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-1Ebbig4w.mjs";
1
+ import { a as call, o as connectHost } from "./hosted-client-C5G4h_OJ.mjs";
2
+ import { i as requestHostedMetro } from "./metro-gateway-BxpJLIwh.mjs";
3
+ import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-DbV2aUVw.mjs";
4
4
  //#region src/device-host/hosted-android.ts
5
5
  async function prepareHostedAndroid(machine, selectors, recorded) {
6
6
  return await prepareHostedNative(machine, selectors, recorded, "android");
@@ -1,8 +1,8 @@
1
- import { _ as configuredMachines, t as BuildConnection, x as pinnedEndpoint$1 } from "./client-SvBdgObD.mjs";
2
- import { createHash } from "node:crypto";
1
+ import { I as pinnedEndpoint$1, M as configuredMachines, t as BuildConnection } from "./client-CuUo8Nvg.mjs";
3
2
  import { lstatSync, readFileSync, readdirSync, readlinkSync } from "node:fs";
4
3
  import { join } from "node:path";
5
4
  import { HOSTED_APP_CHUNK_BYTES, hostedMacosAppSlot, isJsonObject, readDeviceHostMachines } from "@stim-cli/core/state";
5
+ import { createHash } from "node:crypto";
6
6
  //#region src/device-host/hosted-client.ts
7
7
  const CONNECT_TIMEOUT_MS = 1e4;
8
8
  /** Covers 90s stop + 15s final logs + three 10s worker group-settle bounds, with 45s for polling and transport. */
@@ -1,4 +1,4 @@
1
- import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-1Ebbig4w.mjs";
1
+ import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-DbV2aUVw.mjs";
2
2
  //#region src/device-host/hosted-ios.ts
3
3
  async function prepareHostedIos(machine, selectors, recorded) {
4
4
  return await prepareHostedNative(machine, selectors, recorded, "ios");
@@ -1,15 +1,15 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { L as deviceSlotFileKey, W as validateDeviceSlot } from "./config-D0DbpZtM.mjs";
3
- import { l as phaseLine } from "./command-output-CDAIFD-8.mjs";
4
- import { v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-DqcCbpE7.mjs";
5
- import { t as macosDir } from "./state-DyaNTgfR.mjs";
6
- import { r as createNdjsonWriter } from "./ndjson-PclOIwVY.mjs";
7
- import { b as parseMachine$1 } from "./client-SvBdgObD.mjs";
8
- import { a as call } from "./hosted-client-Bp4knSwu.mjs";
1
+ import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
2
+ import { l as phaseLine } from "./command-output-Bt8ygHE7.mjs";
3
+ import { L as deviceSlotFileKey, W as validateDeviceSlot } from "./config-DC5jEtd1.mjs";
4
+ import { v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-CR9X86xJ.mjs";
5
+ import { n as macosDir } from "./state-Tp4uImDS.mjs";
6
+ import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
7
+ import { F as parseMachine$1 } from "./client-CuUo8Nvg.mjs";
8
+ import { a as call } from "./hosted-client-C5G4h_OJ.mjs";
9
9
  import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { dirname, join } from "node:path";
11
- import { LOG_ROTATE_BYTES, withDirLock } from "@stim-cli/core";
12
11
  import { isJsonObject, parseHostedAgentGrant, parseHostedLogsCursor } from "@stim-cli/core/state";
12
+ import { LOG_ROTATE_BYTES, withDirLock } from "@stim-cli/core";
13
13
  //#region src/device-host/hosted-agent.ts
14
14
  function agentAccess(file, credential, grant, note, platform = "macos") {
15
15
  const parsed = grant === void 0 ? null : parseHostedAgentGrant(grant);
@@ -1,11 +1,11 @@
1
- import { l as phaseLine } from "./command-output-CDAIFD-8.mjs";
2
- import { t as macosDir } from "./state-DyaNTgfR.mjs";
3
- import { a as call, c as hostedSession, d as sha256, f as sleep, i as bundleManifest, m as upload, n as SESSION_TIMEOUT_MS, o as connectHost, p as unknownSession, r as attach, s as heldNoLonger, t as INSTALL_TIMEOUT_MS, u as settle } from "./hosted-client-Bp4knSwu.mjs";
4
- import { i as agentAccess, r as closeAgentConnection, t as pullHostedMacosLogs } from "./hosted-logs-OcgIBvCT.mjs";
5
- import { randomUUID } from "node:crypto";
1
+ import { l as phaseLine } from "./command-output-Bt8ygHE7.mjs";
2
+ import { n as macosDir } from "./state-Tp4uImDS.mjs";
3
+ import { a as call, c as hostedSession, d as sha256, f as sleep, i as bundleManifest, m as upload, n as SESSION_TIMEOUT_MS, o as connectHost, p as unknownSession, r as attach, s as heldNoLonger, t as INSTALL_TIMEOUT_MS, u as settle } from "./hosted-client-C5G4h_OJ.mjs";
4
+ import { i as agentAccess, r as closeAgentConnection, t as pullHostedMacosLogs } from "./hosted-logs-CI9Az9a4.mjs";
6
5
  import { rmSync } from "node:fs";
7
6
  import { join } from "node:path";
8
7
  import { hostedMacosBundleId, parseHostedMacosDevice, validHostedAppArguments } from "@stim-cli/core/state";
8
+ import { randomUUID } from "node:crypto";
9
9
  //#region src/device-host/hosted-macos.ts
10
10
  const HANDOFF_TIMEOUT_MS = 3e5;
11
11
  const agentRemoteConfig = (root) => join(macosDir(root), "agent-device-remote.json");
@@ -1,12 +1,12 @@
1
- import { r as readWorkspaceState$1, v as workspaceDir } from "./workspace-state-DqcCbpE7.mjs";
2
- import { a as call, c as hostedSession, d as sha256, f as sleep, i as bundleManifest, m as upload, n as SESSION_TIMEOUT_MS, o as connectHost, p as unknownSession, r as attach, s as heldNoLonger, t as INSTALL_TIMEOUT_MS, u as settle } from "./hosted-client-Bp4knSwu.mjs";
3
- import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-gateway-C-ijGI2F.mjs";
4
- import { i as agentAccess, n as pullHostedNativeLogs, r as closeAgentConnection } from "./hosted-logs-OcgIBvCT.mjs";
5
- import { s as writeHostedNative } from "./ios-state-8L3lgum6.mjs";
6
- import { randomUUID } from "node:crypto";
1
+ import { r as readWorkspaceState$1, v as workspaceDir } from "./workspace-state-CR9X86xJ.mjs";
2
+ import { a as call, c as hostedSession, d as sha256, f as sleep, i as bundleManifest, m as upload, n as SESSION_TIMEOUT_MS, o as connectHost, p as unknownSession, r as attach, s as heldNoLonger, t as INSTALL_TIMEOUT_MS, u as settle } from "./hosted-client-C5G4h_OJ.mjs";
3
+ import { i as agentAccess, n as pullHostedNativeLogs, r as closeAgentConnection } from "./hosted-logs-CI9Az9a4.mjs";
4
+ import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-gateway-BxpJLIwh.mjs";
5
+ import { s as writeHostedNative } from "./ios-state-By0XuLTQ.mjs";
7
6
  import { readFileSync, rmSync } from "node:fs";
8
7
  import { join } from "node:path";
9
- import { hostedNativeRecords, isJsonObject, parseHostedAndroidDevice, parseHostedChoice, parseHostedDevice, parseHostedNativeOffer, parseHostedNativePlacement, unreadableHostedNative } from "@stim-cli/core/state";
8
+ import { hostedNativeRecords, isJsonObject, parseHostedAndroidDevice, parseHostedChoice, parseHostedDevice, parseHostedNativeOffer, parseHostedNativePlacement, requireAutomaticMachine, unreadableHostedNative } from "@stim-cli/core/state";
9
+ import { randomUUID } from "node:crypto";
10
10
  //#region src/device-host/hosted-native.ts
11
11
  function hostingRefusal(machine, error) {
12
12
  return Object.assign(/* @__PURE__ */ new Error(`${machine}: ${error instanceof Error ? error.message : String(error)}`), {
@@ -47,7 +47,7 @@ async function prepareHostedNative(machine, selectors, recorded, platform = "ios
47
47
  const offer = await call(host, "device-host.offer", {
48
48
  platform,
49
49
  ...selectors
50
- }, 3e3);
50
+ }, 45e3);
51
51
  const parsedOffer = parseHostedNativeOffer(offer);
52
52
  const choice = platform === "ios" ? offer.platform === "ios" ? parseHostedChoice(offer.choice) : null : parsedOffer?.platform === "android" ? parsedOffer.choice : null;
53
53
  if (typeof offer.declined === "string") throw new Error(offer.declined);
@@ -68,16 +68,18 @@ async function prepareHostedNative(machine, selectors, recorded, platform = "ios
68
68
  }
69
69
  async function reserveHostedNative(host, target, params, platform) {
70
70
  try {
71
+ if (target.selection?.selected === "auto") requireAutomaticMachine("device", host.machine);
71
72
  return hostedSession(host, await call(host, "device-host.reserve", params), platform);
72
73
  } catch (error) {
73
74
  if (target.selection?.selected !== "auto") throw error;
74
75
  throw Object.assign(/* @__PURE__ */ new Error(`${error instanceof Error ? error.message : String(error)} Retry stim ${platform} --remote auto; the build already targets ${host.machine}'s architecture.`), { remedy: `Retry stim ${platform} --remote auto.` });
75
76
  }
76
77
  }
77
- async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId, selectors, release, devClientScheme, reserved, note, metro = requestHostedMetro, metroPort, platform = "ios" }) {
78
+ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId, selectors, release, devClientScheme, reserved, note, enterPhase = () => {}, metro = requestHostedMetro, metroPort, platform = "ios" }) {
78
79
  let host = target.host;
79
80
  try {
80
81
  if (!release && metro === requestHostedMetro) requireHostedMetro(root);
82
+ enterPhase("device");
81
83
  host = await connectHost(host.machine, void 0, true);
82
84
  target.host = host;
83
85
  let session = (target.session ? await attach(host, target.session.id, void 0, platform) : null) ?? await reserveHostedNative(host, target, {
@@ -153,6 +155,7 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
153
155
  size: manifest.length
154
156
  }
155
157
  };
158
+ enterPhase("install");
156
159
  note(`Delivering ${files.length} files to ${host.machine} (${"runtime" in device ? device.runtime : device.systemImage}, ${device.architecture})`);
157
160
  await upload(host, ids, (await call(host, "device-host.app.offer", offer)).missing, content);
158
161
  let missing = (await call(host, "device-host.app.offer", offer)).missing;
@@ -181,6 +184,7 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
181
184
  }
182
185
  }
183
186
  await upload(host, ids, missing, content);
187
+ enterPhase("launch");
184
188
  note(`Launching on ${host.machine}`);
185
189
  let delivery = await call(host, "device-host.app.launch", ids);
186
190
  const deadline = Date.now() + INSTALL_TIMEOUT_MS;
@@ -1,11 +1,10 @@
1
- import { R as deviceSlotKey, _ as loadConfig$1 } from "./config-D0DbpZtM.mjs";
2
- import { o as formatLongDuration } from "./command-output-CDAIFD-8.mjs";
3
- import { a as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-DqcCbpE7.mjs";
4
- import { o as canonicalPath } from "./in-use-CvGOUn-x.mjs";
5
- import { m as workspaceDeviceLastUseAt } from "./activity-IRvJY_ru.mjs";
6
- import { u as listAllIosSims } from "./ios-DSfnPfse.mjs";
7
- import { g as teardownOwnedIosSim, m as teardownOwnedAvd } from "./ownership-BMLqyBgJ.mjs";
8
- import { n as collectOwnedDeviceActivity, s as workspaceBuildInProgress } from "./idle-BXG__1BA.mjs";
1
+ import { o as formatLongDuration } from "./command-output-Bt8ygHE7.mjs";
2
+ import { R as deviceSlotKey, _ as loadConfig$1 } from "./config-DC5jEtd1.mjs";
3
+ import { a as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-CR9X86xJ.mjs";
4
+ import { E as workspaceBuildInProgress, S as collectOwnedDeviceActivity } from "./budget-Dz-kyXLv.mjs";
5
+ import { D as teardownOwnedAvd, L as canonicalPath, k as teardownOwnedIosSim } from "./workspaces-Djb2gfi9.mjs";
6
+ import { m as workspaceDeviceLastUseAt } from "./activity-BSw0x84R.mjs";
7
+ import { d as listAllIosSims } from "./ios-BWbHFZVz.mjs";
9
8
  import { DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, readDeviceIdleShutdowns } from "@stim-cli/core/state";
10
9
  //#region src/devices/idle-shutdown.ts
11
10
  const SIM_LIST_TIMEOUT_MS = 1e4;
@@ -1,14 +1,14 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { _ as loadConfig$1 } from "./config-D0DbpZtM.mjs";
1
+ import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
3
2
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { r as recordCreatedDevice, t as forgetCreatedDevice } from "./created-devices-CpvzBL25.mjs";
5
- import { at as isStimOwnedSim } from "./android-B_YNZy61.mjs";
6
- import { n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-Cnz8CPnl.mjs";
7
- import { createHash } from "node:crypto";
3
+ import { _ as loadConfig$1 } from "./config-DC5jEtd1.mjs";
4
+ import { r as recordCreatedDevice, t as forgetCreatedDevice } from "./created-devices-D0s26Hx5.mjs";
5
+ import { at as isStimOwnedSim } from "./android-BdQC6zs1.mjs";
6
+ import { n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-C65jk_q2.mjs";
8
7
  import { closeSync, existsSync, lstatSync, mkdtempSync, openSync, readSync, readdirSync, rmSync, writeFileSync } from "node:fs";
9
8
  import { dirname, isAbsolute, join, resolve } from "node:path";
10
9
  import { IOS_SIMULATOR_APPS, settingDefinition } from "@stim-cli/core/state";
11
10
  import { tmpdir } from "node:os";
11
+ import { createHash } from "node:crypto";
12
12
  //#region src/engine/installed-artifact.ts
13
13
  const READ_CHUNK_BYTES = 1048576;
14
14
  const DEVICE_PATH_TIMEOUT_MS = 3e4;
@@ -260,6 +260,18 @@ function listAllIosSims({ timeoutMs = 3e4, includeUnavailable = false } = {}) {
260
260
  killSignal: "SIGKILL"
261
261
  }), { includeUnavailable });
262
262
  }
263
+ function createIosSimSnapshot() {
264
+ let cached = null;
265
+ return {
266
+ read() {
267
+ cached ??= listAllIosSims({ includeUnavailable: true });
268
+ return cached;
269
+ },
270
+ invalidate() {
271
+ cached = null;
272
+ }
273
+ };
274
+ }
263
275
  async function listAllIosSimsAsync({ timeoutMs = 3e4 } = {}) {
264
276
  return parseSimctlList(await getExecutor().runFileAsync("xcrun", SIMCTL_LIST_ARGS, {
265
277
  timeoutMs,
@@ -717,4 +729,4 @@ function listIosRuntimes() {
717
729
  }));
718
730
  }
719
731
  //#endregion
720
- export { hostMemoryPressureAdvice as A, resolveIosCreation as C, uninstallIosApp as D, shutdownIosSim as E, deviceHoldsApk as M, deviceHoldsBundle as N, configuredIosSimulatorViewer as O, resetIosPrivacy as S, sanitizeDeviceLabel as T, parseRuntimeVersion as _, deleteIosSim as a, renameIosSim as b, iosRuntimeMatches as c, listAllIosSimsAsync as d, listIosDeviceTypes as f, parkedSimName as g, ownedSimName as h, createOwnedIosSim as i, readHostMemoryPressure as j, parseIosSimulatorApp as k, iosSimulatorFailureAdvice as l, listUserApps as m, bootIosSim as n, deleteParkedIosSim as o, listIosRuntimes as p, clearIosAppData as r, eraseIosSim as s, IOS_BOOT_TIMEOUT_MS as t, listAllIosSims as u, parseSimctlList as v, resolveOwnedIosSim as w, resetIosKeychain as x, pickDefaultIosCreation as y };
732
+ export { parseIosSimulatorApp as A, resetIosPrivacy as C, shutdownIosSim as D, sanitizeDeviceLabel as E, readHostMemoryPressure as M, deviceHoldsApk as N, uninstallIosApp as O, deviceHoldsBundle as P, resetIosKeychain as S, resolveOwnedIosSim as T, parkedSimName as _, createOwnedIosSim as a, pickDefaultIosCreation as b, eraseIosSim as c, listAllIosSims as d, listAllIosSimsAsync as f, ownedSimName as g, listUserApps as h, createIosSimSnapshot as i, hostMemoryPressureAdvice as j, configuredIosSimulatorViewer as k, iosRuntimeMatches as l, listIosRuntimes as m, bootIosSim as n, deleteIosSim as o, listIosDeviceTypes as p, clearIosAppData as r, deleteParkedIosSim as s, IOS_BOOT_TIMEOUT_MS as t, iosSimulatorFailureAdvice as u, parseRuntimeVersion as v, resolveIosCreation as w, renameIosSim as x, parseSimctlList as y };
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
1
+ import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
2
2
  //#region src/collector/ios.ts
3
3
  const MESSAGE_TYPE_LEVEL = {
4
4
  Debug: "debug",
@@ -0,0 +1,8 @@
1
+ import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-Bt8ygHE7.mjs";
2
+ import { D as schemesFromInfoPlist, T as pickDevClientScheme } from "./app-install-CFI4ptUL.mjs";
3
+ import { t as devClientScheme } from "./dev-client-CDY_zAmD.mjs";
4
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-BGxsbfny.mjs";
5
+ import { a as cacheDescription, c as lastBuildRecord, f as collectorEntry, p as replaceCollector, s as iosFacts, u as writeLastBuild } from "./react-native-ios-CSpIxexZ.mjs";
6
+ import { d as podAction, g as resolveRuntime, i as deviceLabel, l as isReleaseConfiguration, m as resolveDeviceType, n as buildLogFile, p as resolveConfiguration, s as iosConfigurationSetting, t as appNameFromPath } from "./support-CNqYkV0y.mjs";
7
+ import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-ITYno9rO.mjs";
8
+ export { appNameFromPath, buildLogFile, cacheDescription, collectorEntry, iosCommand as default, devClientScheme, deviceLabel, ensureWorkspaceStorageSafely, formatDuration, iosConfigurationSetting, iosFacts, isReleaseConfiguration, lastBuildRecord, phaseLine, pickDevClientScheme, podAction, registerIos, replaceCollector, resolveConfiguration, resolveDeviceType, resolveRuntime, runIosOperation, schemesFromInfoPlist, shortHash, shortUdid, writeLastBuild };