stim 1.36.0 → 1.38.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 (167) hide show
  1. package/README.md +3 -1
  2. package/dist/{acquire-artifact-DGTHCd0Q.mjs → acquire-artifact-QKPDkesw.mjs} +2 -2
  3. package/dist/{act-CvN9xyV6.mjs → act-Bh3t-NuH.mjs} +28 -34
  4. package/dist/{activity-BpdDvA8Q.mjs → activity-CANftndU.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-pbhaW7_k.mjs → agent-device-usage-output-CuROXefb.mjs} +5 -5
  6. package/dist/{android-SJx1V3R3.mjs → android-27_JgJ1T.mjs} +7 -7
  7. package/dist/{android-B0qTdwnt.mjs → android-Biwc4Dck.mjs} +5 -5
  8. package/dist/{android-5wkcMFDG.mjs → android-DGLG_VQ3.mjs} +2 -2
  9. package/dist/{android-e9WP10cE.mjs → android-Z6Eev9rL.mjs} +51 -42
  10. package/dist/{android-cas-BS9_55U5.mjs → android-cas-BDAwwL82.mjs} +4 -4
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/{android-image-BZ57YL6R.mjs → android-image-BcUD6bPi.mjs} +3 -3
  13. package/dist/api.d.mts +12 -5
  14. package/dist/api.mjs +34 -31
  15. package/dist/{apk-signed-tail-eZyXIrnc.mjs → apk-signed-tail-DHMkXs4s.mjs} +2 -2
  16. package/dist/{artifact-C3srrGVU.mjs → artifact-Dc1GsK7o.mjs} +29 -15
  17. package/dist/{artifact-platform-DqCWUieN.mjs → artifact-platform-BaGL1i1X.mjs} +1 -1
  18. package/dist/{artifact-ubNdxo_K.mjs → artifact-sGoFVK1q.mjs} +12 -12
  19. package/dist/{auto-placement-CKFpFCuq.mjs → auto-placement-RNh4kx2T.mjs} +7 -7
  20. package/dist/{browser-web-B63vLrj6.mjs → browser-web-7Oj57Roa.mjs} +15 -15
  21. package/dist/{build-B_Dx9SKJ.mjs → build-DkE5vjp1.mjs} +29 -28
  22. package/dist/{build-cache-BW8T4oD2.mjs → build-cache-CJ65Efv7.mjs} +10 -7
  23. package/dist/{build-plan-CeIooJqn.mjs → build-plan-DWajg5l_.mjs} +8 -7
  24. package/dist/{cache-manifest-CxWkZmUr.mjs → cache-manifest-BO0TIcPV.mjs} +1 -1
  25. package/dist/cache-manifest.mjs +1 -1
  26. package/dist/{cdp-C216kOAn.mjs → cdp-CgT47_9A.mjs} +1 -1
  27. package/dist/{chrome-C8sC5tdl.mjs → chrome-DL5znvmo.mjs} +1 -1
  28. package/dist/{cli-COdXswmc.mjs → cli-BSlwv9hI.mjs} +21 -21
  29. package/dist/cli.mjs +1 -1
  30. package/dist/{client-KSWIeQLA.mjs → client-qwmHFSga.mjs} +16 -12
  31. package/dist/collector-run.mjs +7 -7
  32. package/dist/{command-output-T3cDctRE.mjs → command-output-DsjhOzJ3.mjs} +1 -1
  33. package/dist/{config-BA3TgoIP.mjs → config-CNmN-ndb.mjs} +2 -2
  34. package/dist/{dependencies-LH-7k1Vr.mjs → dependencies-oku1ZLep.mjs} +144 -71
  35. package/dist/{dependency-state-Blfp3AkG.mjs → dependency-state-CBhPJAs_.mjs} +2 -2
  36. package/dist/{detached-entry-tfrgGVWb.mjs → detached-entry-VqFeEE9W.mjs} +1 -1
  37. package/dist/{dev-client-MO_DjTZr.mjs → dev-client-DL5UtVdx.mjs} +2 -2
  38. package/dist/{device-DNTWFFB1.mjs → device-CxMwX0VO.mjs} +17 -16
  39. package/dist/{device-android-BB9Lugr8.mjs → device-android-CSlBXuh_.mjs} +9 -9
  40. package/dist/{device-capacity-CpAVcKgq.mjs → device-capacity-D_IlxZRL.mjs} +84 -37
  41. package/dist/device-host-worker.mjs +28 -16
  42. package/dist/{device-pool-BJToGG-q.mjs → device-pool-BEaTdtss.mjs} +3 -3
  43. package/dist/{device-provision-CxQDCtrc.mjs → device-provision-C9NPdCne.mjs} +10 -10
  44. package/dist/{device-BZWt_aPJ.mjs → device-yfuJ-v4s.mjs} +11 -11
  45. package/dist/{doctor-C-46SkBe.mjs → doctor-BAA3zN5U.mjs} +1 -1
  46. package/dist/{doctor-DV639Iw_.mjs → doctor-BQ1Kl44s.mjs} +15 -21
  47. package/dist/{doctor-CYZ45LnX.mjs → doctor-QNzDE4aW.mjs} +24 -24
  48. package/dist/{doctor-fingerprint-DqWvIhMb.mjs → doctor-fingerprint-Bo4z8YNP.mjs} +1 -1
  49. package/dist/doctor-fingerprint.mjs +1 -1
  50. package/dist/{doctor-watchman-TZxYt_98.mjs → doctor-watchman-B8e3s9ko.mjs} +5 -5
  51. package/dist/{eas-build-Xf5Jd6LR.mjs → eas-build-4rg9WpEg.mjs} +4 -4
  52. package/dist/{eas-fallback-DNYPNinw.mjs → eas-fallback-UGo0SG7T.mjs} +6 -6
  53. package/dist/{eas-session-ledger-CXZ4aix0.mjs → eas-session-ledger-BDpSdFDM.mjs} +6 -6
  54. package/dist/{error-diagnostics-CvB5bpPU.mjs → error-diagnostics-CW9xl6ot.mjs} +10 -10
  55. package/dist/{exec-CGuDzt40.mjs → exec-L37dbiIb.mjs} +7 -1
  56. package/dist/{gc-DiUhrVFo.mjs → gc-3DHVCn-k.mjs} +52 -36
  57. package/dist/{gc-8Qm_K1iy.mjs → gc-BQ5dXnC7.mjs} +2 -2
  58. package/dist/{guide-CuvHRP53.mjs → guide-DqJCc4vW.mjs} +209 -78
  59. package/dist/{hosted-android-D__HGVIO.mjs → hosted-android-gwLspaz6.mjs} +4 -4
  60. package/dist/{hosted-client-DMOOu8vD.mjs → hosted-client-B_h_bTlz.mjs} +4 -4
  61. package/dist/{hosted-logs-CClIktQM.mjs → hosted-logs-BpQSRDRU.mjs} +17 -10
  62. package/dist/{hosted-logs-sync-B7XCeqVm.mjs → hosted-logs-sync-D3L1hDpM.mjs} +5 -5
  63. package/dist/{hosted-macos-D4sDJIbB.mjs → hosted-macos-GK4O1s7x.mjs} +6 -6
  64. package/dist/{hosted-native-BiiUG_Q6.mjs → hosted-native-B6ur_0OJ.mjs} +8 -8
  65. package/dist/{ios-Qam0bT9n.mjs → ios-2Qr4_Zu2.mjs} +1 -1
  66. package/dist/{ios-BZuhvLGr.mjs → ios-Bi0bQiZ_.mjs} +8 -8
  67. package/dist/{ios-BhfpRfNf.mjs → ios-DQEzde6f.mjs} +23 -10
  68. package/dist/{ios-BhpUWyN7.mjs → ios-M7nRVb33.mjs} +100 -37
  69. package/dist/{ios-device-vhYL1N--.mjs → ios-device-BLm1BZB4.mjs} +3 -3
  70. package/dist/{ios-device-DLdEDWJj.mjs → ios-device-ygijU78G.mjs} +1 -1
  71. package/dist/{ios-project-Cz0S1Sz-.mjs → ios-project-Bsm-eqwv.mjs} +7 -7
  72. package/dist/ios-runtime-DLiKoOkd.mjs +150 -0
  73. package/dist/{ios-signing-BcH88ecn.mjs → ios-signing-rWR_Mu5Z.mjs} +3 -3
  74. package/dist/{ios-state-Avwz2cbZ.mjs → ios-state-tzD0s7pt.mjs} +1 -1
  75. package/dist/{js-swap-Desu2iII.mjs → js-swap-Cuky0ZAQ.mjs} +60 -13
  76. package/dist/{launch-6ckG9UrC.mjs → launch-B-pkNlqg.mjs} +48 -28
  77. package/dist/{lightened-B6TnpHMX.mjs → lightened-KHWHmzGs.mjs} +5 -5
  78. package/dist/{logs-B-DMy1K0.mjs → logs-B0etn-BD.mjs} +7 -7
  79. package/dist/{logs-CO0CJRiC.mjs → logs-HomiqPhV.mjs} +6 -6
  80. package/dist/{macos-CduEmWAK.mjs → macos-C5liDnbP.mjs} +1 -1
  81. package/dist/macos-run.mjs +1 -1
  82. package/dist/{macos-B1aCXhem.mjs → macos-zMxSibx5.mjs} +22 -23
  83. package/dist/maintenance-run.mjs +6 -6
  84. package/dist/{metro-DM3yJL1M.mjs → metro-Cj6W4qOO.mjs} +4 -4
  85. package/dist/{metro-request-O8Q-JvBg.mjs → metro-request-BWCl3Zco.mjs} +2 -2
  86. package/dist/{prebuild-Di2IhUue.mjs → miss-reason-CeHvzeVm.mjs} +12 -272
  87. package/dist/{named-ports-BvB_CO9B.mjs → named-ports-DZ8DrkH1.mjs} +3 -3
  88. package/dist/{native-android-28NOG2-y.mjs → native-android-DtWLzg6g.mjs} +18 -18
  89. package/dist/{native-gradle-artifact-inputs-DxVEtS6_.mjs → native-gradle-artifact-inputs-D4w20_6d.mjs} +5 -5
  90. package/dist/{native-runtime-C3_NkUlW.mjs → native-runtime-BfvvAJLd.mjs} +6 -6
  91. package/dist/{native-source-ChAGj7R1.mjs → native-source-D2ZfiQ6U.mjs} +1 -1
  92. package/dist/{native-xcode-inputs-BWFTw5cJ.mjs → native-xcode-inputs-BHvnAq4o.mjs} +3 -3
  93. package/dist/{native-xcode-ios-B4Qoc7-U.mjs → native-xcode-ios-CYxrg_kK.mjs} +18 -19
  94. package/dist/offload-worker.mjs +23 -22
  95. package/dist/{operation-exec-DKlBcKAL.mjs → operation-exec-DNynwpqO.mjs} +1 -1
  96. package/dist/{ownership-C3y8wLSl.mjs → ownership-BLgOimfp.mjs} +3 -3
  97. package/dist/{page-Dj8IqvGM.mjs → page-CoN9al_x.mjs} +2 -2
  98. package/dist/{phone-reverses-BhSxbqom.mjs → phone-reverses-vRveZKSG.mjs} +4 -4
  99. package/dist/{placement-log-B8RCSzOm.mjs → placement-log-CM0DSELs.mjs} +1 -1
  100. package/dist/{plan-placement-BI4r55aP.mjs → plan-placement-CIrvKq8y.mjs} +6 -6
  101. package/dist/{ports-DhOSyWm9.mjs → ports-CKORWlC0.mjs} +3 -3
  102. package/dist/{project-Clk1JAWL.mjs → project-DIo71tGq.mjs} +16 -16
  103. package/dist/{pull-request-BpMTNkMB.mjs → pull-request-m8cMZ3aE.mjs} +2 -2
  104. package/dist/pull-requests.mjs +1 -1
  105. package/dist/{react-native-android-bdHBMrnf.mjs → react-native-android-B7VYSlKj.mjs} +41 -36
  106. package/dist/{react-native-build-CJega_NM.mjs → react-native-build-CFYTYmG4.mjs} +13 -10
  107. package/dist/{react-native-doctor-CY7BGITE.mjs → react-native-doctor-CnpVfE0k.mjs} +6 -6
  108. package/dist/{react-native-ios-Bo5EDVel.mjs → react-native-ios-ByeXo_NP.mjs} +18 -18
  109. package/dist/{recorded-build-BuGL_fnm.mjs → recorded-build-B4prJjSD.mjs} +20 -2
  110. package/dist/{recordings-6i2-x8LU.mjs → recordings-Byu5SzlI.mjs} +1 -1
  111. package/dist/{registration-DKjJGQ6p.mjs → registration-C-3PDR3X.mjs} +1 -1
  112. package/dist/{reload-BvDuvygc.mjs → reload-DANrKhQR.mjs} +1 -1
  113. package/dist/{reload-A_axEbeS.mjs → reload-DTd9g1EG.mjs} +16 -16
  114. package/dist/{remote-PD6CM0xp.mjs → remote-BWuq9qHV.mjs} +4 -4
  115. package/dist/{remote-WK_swZEw.mjs → remote-NOM82XE0.mjs} +10 -10
  116. package/dist/{result-BkDpN5Mz.mjs → result-C-ISEJ5F.mjs} +17 -17
  117. package/dist/{run-CTFi4Nq2.mjs → run-DQwx6djG.mjs} +2 -2
  118. package/dist/{server-bare-W0aPsRZE.mjs → server-bare-B_wRfchQ.mjs} +2 -2
  119. package/dist/{server-command-S00-ddjK.mjs → server-command-DgXYowQf.mjs} +6 -6
  120. package/dist/{server-expo-cc-cmfsl.mjs → server-expo-ByBM8DVv.mjs} +10 -8
  121. package/dist/server-expo-D7rwjAFp.mjs +2 -0
  122. package/dist/{settings-C_Xu4RNZ.mjs → settings-BthPoY3t.mjs} +2 -2
  123. package/dist/{settings-Bap-qjnp.mjs → settings-Cz8kQJzr.mjs} +49 -12
  124. package/dist/{settings-payload-D5jjhmrw.mjs → settings-payload-BOcxsZ6k.mjs} +5 -5
  125. package/dist/{settings-write-C5huI-iS.mjs → settings-write-BuMPL1rd.mjs} +6 -6
  126. package/dist/settings.schema.json +32 -2
  127. package/dist/{simslim-DlBvwgeF.mjs → simslim-BMgpTRWe.mjs} +2 -2
  128. package/dist/{slot-launch-qEQVTth7.mjs → slot-launch-BIm9w8kH.mjs} +6 -6
  129. package/dist/{stage-CxVI_MlP.mjs → stage-CX1Byp3n.mjs} +6 -5
  130. package/dist/{start-CVzivp35.mjs → start-BZWr85b2.mjs} +1 -1
  131. package/dist/{start-YpT_JpQQ.mjs → start-DI0ofPO-.mjs} +12 -12
  132. package/dist/{state-B4B5P4LU.mjs → state-45P8Kd6Z.mjs} +2 -2
  133. package/dist/{state-B9VFI6r0.mjs → state-C2vELPyr.mjs} +4 -4
  134. package/dist/{stats-COoePEri.mjs → stats-BDljWVWU.mjs} +5 -5
  135. package/dist/{stats-report-BVRCqwWA.mjs → stats-report-Ci6TAfFm.mjs} +1 -1
  136. package/dist/{status-CIvU5-TF.mjs → status-BG2S-a1d.mjs} +1 -1
  137. package/dist/{status-CQWmNl1f.mjs → status-C2PdxK6q.mjs} +1 -1
  138. package/dist/{status-CIg0k7Qb.mjs → status-DEZjHP4q.mjs} +32 -34
  139. package/dist/{status-watch--rfZynD_.mjs → status-watch-Cs18eFkQ.mjs} +5 -5
  140. package/dist/status-worker.mjs +1 -1
  141. package/dist/{stim-desktop-D0P_bzmd.mjs → stim-desktop-DWGAfaud.mjs} +2 -2
  142. package/dist/{stop-BiI4_VFG.mjs → stop-B2zDplJa.mjs} +2 -2
  143. package/dist/{stop-C3d5qG7C.mjs → stop-BPrTEOaz.mjs} +16 -16
  144. package/dist/{stop-BEBBruvD.mjs → stop-DrxHVVX9.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +15 -15
  146. package/dist/{support-BJbXovoO.mjs → support-BeVRaMWT.mjs} +13 -14
  147. package/dist/{support-Vckdzrmk.mjs → support-DBKG3Yyb.mjs} +7 -7
  148. package/dist/{swiftpm-artifact-inputs-DbuF-Yrr.mjs → swiftpm-artifact-inputs-CfNAb6Vm.mjs} +4 -4
  149. package/dist/{swiftpm-macos-Bu8xeBfM.mjs → swiftpm-macos-xdHjJHIj.mjs} +11 -11
  150. package/dist/toolchain-CTsPS5tL.mjs +2 -0
  151. package/dist/{toolchain-DCnWAxQL.mjs → toolchain-CZvtCZ-m.mjs} +11 -8
  152. package/dist/trigger-Bp3lruF2.mjs +2 -0
  153. package/dist/{trigger-BtB4kbe0.mjs → trigger-G_gbfIVB.mjs} +2 -2
  154. package/dist/{warm-progress-DwsGBpph.mjs → warm-progress-D3a0KviW.mjs} +20 -16
  155. package/dist/{web-D2En0Wa5.mjs → web-BvAweypa.mjs} +9 -9
  156. package/dist/web-DDL3usMb.mjs +2 -0
  157. package/dist/web-run.mjs +8 -8
  158. package/dist/windows-report.mjs +1 -1
  159. package/dist/{workspace-state-BhwAJBgA.mjs → workspace-state-CHEN_xzy.mjs} +3 -3
  160. package/dist/{workspaces-Dh5N70qW.mjs → workspaces-BgAYIccE.mjs} +218 -54
  161. package/dist/{worktree-DLm4s2Ib.mjs → worktree-C0YZ6mnk.mjs} +1 -1
  162. package/dist/{worktree-Yw3EW77B.mjs → worktree-kGPE9Pcw.mjs} +339 -37
  163. package/package.json +7 -7
  164. package/dist/server-expo-BWJDa7Qb.mjs +0 -2
  165. package/dist/toolchain-CIRdNl-c.mjs +0 -2
  166. package/dist/trigger-D8B7QR0q.mjs +0 -2
  167. package/dist/web-Dpj70t4p.mjs +0 -2
@@ -1,57 +1,61 @@
1
- import { l as cancellableSleep, t as getExecutor, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
- import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-BhwAJBgA.mjs";
3
- import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-T3cDctRE.mjs";
4
- import { A as withConfigLockAsync, O as upsertProject, dt as deviceSlotFileKey, ft as deviceSlotKey, m as getProject, u as getConcurrencyLimits, y as recordIosSchemeApprovals } from "./config-BA3TgoIP.mjs";
5
- import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-Bap-qjnp.mjs";
6
- import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-Clk1JAWL.mjs";
7
- import { o as workspaceLinks } from "./stim-desktop-D0P_bzmd.mjs";
8
- import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-DM3yJL1M.mjs";
1
+ import { l as cancellableSleep, t as getExecutor, w as withDrainingCancellation } from "./exec-L37dbiIb.mjs";
2
+ import { f as writeWorkspaceStateAsync, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-CHEN_xzy.mjs";
3
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DsjhOzJ3.mjs";
4
+ import { A as withConfigLockAsync$1, O as upsertProject, dt as deviceSlotFileKey, ft as deviceSlotKey, m as getProject, u as getConcurrencyLimits, y as recordIosSchemeApprovals } from "./config-CNmN-ndb.mjs";
5
+ import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-Cz8kQJzr.mjs";
6
+ import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot$1, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-DIo71tGq.mjs";
7
+ import { o as workspaceLinks } from "./stim-desktop-DWGAfaud.mjs";
8
+ import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-Cj6W4qOO.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { Bn as readRemoteSimulatorArch, En as devClientUrl, In as launchIosApp, Jn as checkEasAuth, Jt as bundleEntryPoint, Ln as restartedAppNote, Mn as installIosApp, Nn as iosAppProcess, Tn as clearOtherUserApps, Vn as gateMetroOrigin, Xt as ensureMetroReachable, Zn as loadProjectProvider, Zt as ensureRemoteBootOwned, an as LAUNCH_UNVERIFIED, dn as readMetroRecords, en as remoteIosDeps, fn as unattributedLaunchLines, gn as verifyReleaseLaunch, hn as verifyLaunch, in as LAUNCH_FATAL, k as budgetGate, ln as isBundleProof, nr as resolveRemote, pn as unverifiedLaunchLines, r as checkDeviceCapacity, rn as LAUNCH_BUNDLING, rr as uploadRemote, sn as RELEASE_VERIFY_WAIT_MS, tn as resolveRemoteContext, tr as resolveEasCliBin, un as readCollectorRecords, xn as IOS_DEV_MENU_OFF_DEFAULTS_PLIST } from "./device-capacity-CpAVcKgq.mjs";
11
- import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-Dh5N70qW.mjs";
12
- import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-DCnWAxQL.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BpdDvA8Q.mjs";
14
- import { E as storeBuild, M as untrackedNativeFiles, T as resolveBuild, g as fingerprintProject, l as evictBuild } from "./build-cache-BW8T4oD2.mjs";
15
- import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-BhfpRfNf.mjs";
16
- import { C as clearIosAdoptionPending, G as lostLine, J as releaseLeaseOnAbort, K as lostRefusal, U as acquireRunLease, Y as runLease, i as deviceLabel, o as deviceShortName, t as appNameFromPath, z as DEBUG_VERIFY_STEP_MS } from "./support-BJbXovoO.mjs";
17
- import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-Avwz2cbZ.mjs";
18
- import { n as hostedMetroPortProbe } from "./hosted-native-BiiUG_Q6.mjs";
19
- import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-BhSxbqom.mjs";
20
- import { n as verifyCollectorOwnership } from "./ownership-C3y8wLSl.mjs";
21
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-qEQVTth7.mjs";
22
- import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-CJega_NM.mjs";
23
- import { c as startDevServer, g as detectBundleId } from "./start-YpT_JpQQ.mjs";
10
+ import { $t as ensureMetroReachable, Bn as restartedAppNote, Fn as installIosApp, In as iosAppProcess, On as clearOtherUserApps, Un as readRemoteSimulatorArch, Wn as gateMetroOrigin, Zn as checkEasAuth, Zt as bundleEntryPoint, ar as resolveRemote, cn as LAUNCH_UNVERIFIED, en as ensureRemoteBootOwned, er as loadProjectProvider, fn as isBundleProof, gn as unverifiedLaunchLines, hn as unattributedLaunchLines, in as resolveRemoteContext, ir as resolveEasCliBin, k as budgetGate, kn as devClientUrl, mn as readMetroRecords, on as LAUNCH_BUNDLING, or as uploadRemote, pn as readCollectorRecords, r as checkDeviceCapacity, rn as remoteIosDeps, sn as LAUNCH_FATAL, un as RELEASE_VERIFY_WAIT_MS, vn as verifyLaunch, wn as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, yn as verifyReleaseLaunch, zn as launchIosApp } from "./device-capacity-D_IlxZRL.mjs";
11
+ import { Ct as acquireBuildSlot, Et as releaseBuildSlot, at as readRunEstimates, lt as recordRunStats, st as recordCapacityRefusal } from "./workspaces-BgAYIccE.mjs";
12
+ import { B as resolveScheme, C as readPodState, E as runPodInstall, R as readBundleExecutable, S as podsAreStale, c as iosToolchainAsync, z as readBundleId } from "./toolchain-CZvtCZ-m.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-CANftndU.mjs";
14
+ import { E as storeBuild, M as untrackedNativeFiles, T as resolveBuild, g as fingerprintProject, l as evictBuild } from "./build-cache-CJ65Efv7.mjs";
15
+ import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData, w as resetIosKeychain } from "./ios-DQEzde6f.mjs";
16
+ import { C as clearIosAdoptionPending, G as lostLine, J as releaseLeaseOnAbort, K as lostRefusal, U as acquireRunLease, Y as runLease, i as deviceLabel, o as deviceShortName, t as appNameFromPath, z as DEBUG_VERIFY_STEP_MS } from "./support-BeVRaMWT.mjs";
17
+ import { l as call, u as connectHost } from "./hosted-client-B_h_bTlz.mjs";
18
+ import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-tzD0s7pt.mjs";
19
+ import { n as hostedMetroPortProbe } from "./hosted-native-B6ur_0OJ.mjs";
20
+ import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-vRveZKSG.mjs";
21
+ import { n as verifyCollectorOwnership } from "./ownership-BLgOimfp.mjs";
22
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-BIm9w8kH.mjs";
23
+ import { L as runPrebuild, P as planPrebuildAsync } from "./worktree-kGPE9Pcw.mjs";
24
+ import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-CFYTYmG4.mjs";
25
+ import { c as startDevServer, g as detectBundleId } from "./start-DI0ofPO-.mjs";
24
26
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
25
- import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-BcH88ecn.mjs";
26
- import { a as resolveEasDevelopmentBuild } from "./eas-build-Xf5Jd6LR.mjs";
27
- import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-vhYL1N--.mjs";
28
- import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-CvB5bpPU.mjs";
29
- import { t as followHostedLaunchLogs } from "./hosted-logs-sync-B7XCeqVm.mjs";
30
- import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-Di2IhUue.mjs";
31
- import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-C3_NkUlW.mjs";
32
- import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-MO_DjTZr.mjs";
33
- import { t as automaticDevicePlacement } from "./auto-placement-CKFpFCuq.mjs";
34
- import { t as checkEasFallback } from "./eas-fallback-DNYPNinw.mjs";
35
- import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-BZWt_aPJ.mjs";
36
- import { t as selectFromPool } from "./device-pool-BJToGG-q.mjs";
37
- import { s as reportIosResult } from "./ios-project-Cz0S1Sz-.mjs";
38
- import { i as swapJsBundle } from "./js-swap-Desu2iII.mjs";
27
+ import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-rWR_Mu5Z.mjs";
28
+ import { a as resolveEasDevelopmentBuild } from "./eas-build-4rg9WpEg.mjs";
29
+ import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-BLm1BZB4.mjs";
30
+ import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-CW9xl6ot.mjs";
31
+ import { t as followHostedLaunchLogs } from "./hosted-logs-sync-D3L1hDpM.mjs";
32
+ import { a as memoizedFingerprint } from "./miss-reason-CeHvzeVm.mjs";
33
+ import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-BfvvAJLd.mjs";
34
+ import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-DL5UtVdx.mjs";
35
+ import { t as automaticDevicePlacement } from "./auto-placement-RNh4kx2T.mjs";
36
+ import { t as checkEasFallback } from "./eas-fallback-UGo0SG7T.mjs";
37
+ import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-yfuJ-v4s.mjs";
38
+ import { t as selectFromPool } from "./device-pool-BEaTdtss.mjs";
39
+ import { s as reportIosResult } from "./ios-project-Bsm-eqwv.mjs";
40
+ import { t as ensureIosRuntime } from "./ios-runtime-DLiKoOkd.mjs";
41
+ import { a as swapJsBundle } from "./js-swap-Cuky0ZAQ.mjs";
39
42
  import { mkdirSync, openSync, writeFileSync } from "node:fs";
40
43
  import { networkInterfaces } from "node:os";
41
44
  import { basename, join } from "node:path";
42
45
  import { ambientEnv, hostSimulatorArch } from "@stim-cli/core";
46
+ import { DEVICE_HOST_LIMITS } from "@stim-cli/core/state";
43
47
  import chalk from "chalk";
44
48
  import { loadCacheProvider } from "@stim-cli/cache";
45
49
  //#region src/commands/ios/collector.ts
46
50
  function collectorLogFile(root, slot) {
47
- return join(workspaceLogsDir(root), `collector-${deviceSlotFileKey("ios", slot)}.log`);
51
+ return join(workspaceLogsDir$1(root), `collector-${deviceSlotFileKey("ios", slot)}.log`);
48
52
  }
49
53
  function collectorEntry() {
50
54
  return spawnEntry("collector-run");
51
55
  }
52
56
  const COLLECTOR_EXIT_WAIT_MS = 2e3;
53
57
  const COLLECTOR_POLL_MS = 25;
54
- async function stopPreviousCollector({ root, slot = "default", kill = (pid, signal) => signalProcessTree(pid, signal), alive = pidExists, readState = readWorkspaceState, verify = verifyCollectorOwnership, waitMs = COLLECTOR_EXIT_WAIT_MS, note = (_line) => {} }) {
58
+ async function stopPreviousCollector({ root, slot = "default", kill = (pid, signal) => signalProcessTree(pid, signal), alive = pidExists, readState = readWorkspaceState$1, verify = verifyCollectorOwnership, waitMs = COLLECTOR_EXIT_WAIT_MS, note = (_line) => {} }) {
55
59
  const previous = (readState(root)?.collectors)?.[deviceSlotKey("ios", slot)] || null;
56
60
  const previousPid = Number(previous?.pid) || null;
57
61
  let killed = null;
@@ -76,7 +80,7 @@ async function stopPreviousCollector({ root, slot = "default", kill = (pid, sign
76
80
  }
77
81
  return { killed };
78
82
  }
79
- async function replaceCollector({ root, slot = "default", udid, bundleId, appName, appExecutable, physical = false, payloadUrl = null, spawn = (cmd, args, opts) => getExecutor().spawn(cmd, args, opts), kill = (pid, signal) => process.kill(pid, signal), alive = pidExists, readState = readWorkspaceState, verify = verifyCollectorOwnership, waitMs = COLLECTOR_EXIT_WAIT_MS, note = (_line) => {} }) {
83
+ async function replaceCollector({ root, slot = "default", udid, bundleId, appName, appExecutable, physical = false, payloadUrl = null, spawn = (cmd, args, opts) => getExecutor().spawn(cmd, args, opts), kill = (pid, signal) => process.kill(pid, signal), alive = pidExists, readState = readWorkspaceState$1, verify = verifyCollectorOwnership, waitMs = COLLECTOR_EXIT_WAIT_MS, note = (_line) => {} }) {
80
84
  const { killed } = await stopPreviousCollector({
81
85
  root,
82
86
  slot,
@@ -105,7 +109,7 @@ async function replaceCollector({ root, slot = "default", udid, bundleId, appNam
105
109
  if (payloadUrl) args.push("--payload-url", payloadUrl);
106
110
  let stdio = "ignore";
107
111
  try {
108
- mkdirSync(workspaceLogsDir(root), { recursive: true });
112
+ mkdirSync(workspaceLogsDir$1(root), { recursive: true });
109
113
  const fd = openSync(collectorLogFile(root, slot), "a");
110
114
  stdio = [
111
115
  "ignore",
@@ -177,6 +181,10 @@ function missingCrashReportHint({ physical, remote, crashed }) {
177
181
  return crashed && !physical && !remote ? `No attributable native crash report captured yet. ${IOS_CRASH_REPORT_RETRY}` : "No attributable native crash report captured. Read `stim logs --source device` for available output.";
178
182
  }
179
183
  async function verifyIosProcessRun({ operation, root, slot, appPath, d, launched, configuration, phase, note, logsDir, launchedAt, bundleId, udid, physical, appName, remoteDevice, embeddedJavaScript }) {
184
+ if (remoteDevice) {
185
+ phase("verify", chalk.yellow("UNVERIFIED: remote adapter launch accepted; process verification is unavailable"));
186
+ return { state: LAUNCH_UNVERIFIED };
187
+ }
180
188
  const readNativeCrashes = () => remoteDevice ? [] : captureNativeCrashes({
181
189
  root,
182
190
  slot,
@@ -373,26 +381,58 @@ async function installsOverWifi(d, udid, selectedWireless, note) {
373
381
  if (wireless) note(phaseLine("device", `${current?.name ?? udid} is paired over Wi-Fi, so the install and launch go over the network and take longer than over a cable`));
374
382
  return wireless;
375
383
  }
376
- async function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }) {
384
+ async function cleanIosAppState({ d, device, udid, bundleId, devClient, adopting, cleanAppState, remote, runCommand, phase, note }) {
385
+ if (!adopting && (!cleanAppState || remote)) return null;
386
+ if (!adopting && !device.owned) return {
387
+ code: "STIM_BAD_ARG",
388
+ message: `cleanAppState clears only a simulator Stim owns, and ${deviceLabel(device, udid)} is not one.`,
389
+ remedy: "Run `stim gc --delete` to clear the assignment so Stim creates an owned simulator."
390
+ };
391
+ const failure = await sweepIosAppState({
392
+ d,
393
+ udid,
394
+ bundleId,
395
+ devClient,
396
+ resetKeychain: !adopting,
397
+ previous: adopting ? "the previous workspace" : "an earlier run",
398
+ phase,
399
+ note
400
+ });
401
+ if (!failure) return null;
402
+ return {
403
+ code: "STIM_INSTALL_FAILED",
404
+ message: adopting ? `${failure} Stim kept the adoption cleanup pending and did not install or launch the app.` : `${failure} Stim did not install or launch the app.`,
405
+ remedy: `Run \`${runCommand}\` again after simulator tooling is responsive.`
406
+ };
407
+ }
408
+ async function sweepIosAppState({ d, udid, bundleId, devClient, resetKeychain, previous, phase, note }) {
377
409
  const swept = await d.clearOtherUserApps({
378
410
  udid,
379
411
  keep: bundleId
380
412
  });
381
- if (swept.removed.length) phase("install", `removed ${swept.removed.join(", ")}, left by the previous workspace`);
413
+ if (swept.removed.length) phase("install", `removed ${swept.removed.join(", ")}, left by ${previous}`);
382
414
  if (swept.listed && swept.failed.length === 0) {
383
415
  if (swept.kept && bundleId) {
384
416
  try {
385
417
  await d.clearIosAppData(udid, bundleId, { defaultsPlist: devClient ? IOS_DEV_MENU_OFF_DEFAULTS_PLIST : null });
386
418
  } catch (error) {
387
- return `Could not clear the data ${bundleId} kept from the previous workspace: ${String(error?.message || error)}`;
419
+ return `Could not clear the data ${bundleId} kept from ${previous}: ${String(error?.message || error)}`;
420
+ }
421
+ phase("install", `cleared ${bundleId} data left by ${previous}`);
422
+ }
423
+ if (resetKeychain) {
424
+ try {
425
+ await d.resetIosKeychain(udid);
426
+ } catch (error) {
427
+ return `Could not reset the keychain on ${udid}: ${error instanceof Error ? error.message : String(error)}`;
388
428
  }
389
- phase("install", `cleared ${bundleId} data left by the previous workspace`);
429
+ phase("install", `reset the keychain on ${udid}`);
390
430
  }
391
431
  return null;
392
432
  }
393
- if (!swept.listed) return "Could not list apps left by the previous workspace.";
394
- for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by the previous workspace`)));
395
- return `Could not remove ${swept.failed.join(", ")}, left by the previous workspace.`;
433
+ if (!swept.listed) return `Could not list apps left by ${previous}.`;
434
+ for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by ${previous}`)));
435
+ return `Could not remove ${swept.failed.join(", ")}, left by ${previous}.`;
396
436
  }
397
437
  async function evictUnbindableCacheHit({ d, root, slot, udid, bundleId, appPath, launchedAt, logsDir, cacheHit, providerName, storeKey, runCommand, local, logFields, operation }) {
398
438
  if (!cacheHit || !storeKey || !bundleId || !local) return null;
@@ -450,7 +490,7 @@ function launchFailureRemedy(remoteDevice, udid, bundleId, logFile, reason) {
450
490
  if (reason && /system shell .*probably crashed/.test(reason)) return `SpringBoard, the simulator's system shell, is not running, and only a reboot brings it back. Run \`stim stop\`, then \`stim ios\` again. Repeated crashes leave SpringBoard reports in ~/Library/Logs/DiagnosticReports.`;
451
491
  return `If the simulator timed out, run \`stim doctor --platform ios\` and resolve any reported host memory pressure before retrying. Otherwise run \`xcrun simctl launch --terminate-running-process --console ${udid} ${bundleId}\` to see what the app reports, and check ${logFile}.`;
452
492
  }
453
- async function finishIosRun({ operation, output, projectBundleId, runtime, runtimePreparation, devicePlacement, artifact, d, root, slot, json, release, configuration, buildScheme, isExpo, metroCheck, metroPort, logsDir, logFile, device, udid, physical, wireless, lanAddress, lanOriginUrl, remoteDevice, bootPromise, bootDuration, bootPending, fail, phase, note, logWriter, elapsed, startedAt, closeWriter, lease, releaseLease, recordRun, reclaimed, devServer, enterPhase, enterActivity }) {
493
+ async function finishIosRun({ operation, output, projectBundleId, runtime, runtimePreparation, devicePlacement, artifact, d, root, slot, json, release, configuration, buildScheme, isExpo, metroCheck, metroPort, logsDir, logFile, device, udid, physical, wireless, lanAddress, lanOriginUrl, remoteDevice, cleanAppState, bootPromise, bootDuration, bootPending, fail, phase, note, logWriter, elapsed, startedAt, closeWriter, lease, releaseLease, recordRun, reclaimed, devServer, enterPhase, enterActivity }) {
454
494
  const { path: appPath, bundleId: initialBundleId, failureFields: buildFailure, cache } = artifact;
455
495
  const { hit: cacheHit, providerName, buildMachine, builtOn, offloadedTo, offloadFallback, readEnabled: useBuildCache, missReason, waitedForBuild, compilation: compilationCache } = cache;
456
496
  const storeHash = cache.identity?.fingerprint ?? null;
@@ -657,26 +697,27 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
657
697
  phase("launch", `${bundleId} pid ${launched.pid} ${launchTimer()}`);
658
698
  } else {
659
699
  const adopting = Boolean(device?.adoptionPending);
660
- if (adopting) {
661
- const cleanupFailure = await cleanAdoptedIosApps({
662
- d,
663
- udid,
664
- bundleId,
665
- devClient: Boolean(scheme),
666
- phase,
667
- note
668
- });
669
- if (cleanupFailure) return fail({
670
- code: "STIM_INSTALL_FAILED",
671
- message: `${cleanupFailure} Stim kept the adoption cleanup pending and did not install or launch the app.`,
672
- remedy: `Run \`${runCommand}\` again after simulator tooling is responsive.`,
673
- build: {
674
- ...buildFailure,
675
- appPath,
676
- bundleId
677
- }
678
- });
679
- }
700
+ const cleanupFailure = await cleanIosAppState({
701
+ d,
702
+ device,
703
+ udid,
704
+ bundleId,
705
+ devClient: Boolean(scheme),
706
+ adopting,
707
+ cleanAppState,
708
+ remote: Boolean(remoteDevice),
709
+ runCommand,
710
+ phase,
711
+ note
712
+ });
713
+ if (cleanupFailure) return fail({
714
+ ...cleanupFailure,
715
+ build: {
716
+ ...buildFailure,
717
+ appPath,
718
+ bundleId
719
+ }
720
+ });
680
721
  enterPhase("install");
681
722
  const installTimer = stepTimer(d.now);
682
723
  const installed = await d.installIosApp({
@@ -902,6 +943,35 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
902
943
  };
903
944
  }
904
945
  //#endregion
946
+ //#region src/device-host/ios-runtime.ts
947
+ async function installHostedIosRuntime(machine, runtime, note, signal) {
948
+ const host = await connectHost(machine, void 0, true, signal);
949
+ note(`Installing missing iOS ${runtime.replace(/^iOS /, "")} on ${machine} with Xcode (typically 8-10 GB; shared by its workspaces).`);
950
+ const heartbeat = setInterval(() => note(`Waiting for Xcode runtime installation on ${machine}; downloads can take several minutes.`), 3e4);
951
+ heartbeat.unref();
952
+ const close = () => host.connection.close();
953
+ signal?.addEventListener("abort", close, { once: true });
954
+ try {
955
+ signal?.throwIfAborted();
956
+ const result = await call(host, "device-host.runtime.install", { runtime }, DEVICE_HOST_LIMITS.imageInstallMs + 15e3);
957
+ signal?.throwIfAborted();
958
+ if (result.ok !== true) throw new Error(`${machine} did not confirm runtime installation.`);
959
+ return { ok: true };
960
+ } catch (error) {
961
+ signal?.throwIfAborted();
962
+ return {
963
+ ok: false,
964
+ code: "STIM_HOSTING_REFUSED",
965
+ message: error instanceof Error ? error.message : String(error),
966
+ remedy: `Check Xcode and free disk space on ${machine}; update stim-server there if it does not support runtime installation.`
967
+ };
968
+ } finally {
969
+ clearInterval(heartbeat);
970
+ signal?.removeEventListener("abort", close);
971
+ close();
972
+ }
973
+ }
974
+ //#endregion
905
975
  //#region src/engine/ios-lan.ts
906
976
  const IP_TXT = "ip.txt";
907
977
  function chooseLanAddress({ pinned = null, candidates }) {
@@ -1016,6 +1086,8 @@ function hostLanCandidates(interfaces = networkInterfaces) {
1016
1086
  //#endregion
1017
1087
  //#region src/commands/ios/dependencies.ts
1018
1088
  const DEFAULT_DEPS = {
1089
+ ensureIosRuntime,
1090
+ installHostedIosRuntime,
1019
1091
  projectRegistry,
1020
1092
  automaticDevicePlacement,
1021
1093
  checkEasFallback,
@@ -1025,7 +1097,7 @@ const DEFAULT_DEPS = {
1025
1097
  readHostedIos,
1026
1098
  writeHostedIos: writeHostedIosAsync,
1027
1099
  resolveEasDevelopmentBuild,
1028
- findProjectRoot,
1100
+ findProjectRoot: findProjectRoot$1,
1029
1101
  resolveSettings,
1030
1102
  settingsLayers,
1031
1103
  settingOriginScope,
@@ -1037,7 +1109,7 @@ const DEFAULT_DEPS = {
1037
1109
  hasDevClient,
1038
1110
  devClientTakesDevMenuParams,
1039
1111
  getProject,
1040
- upsertProject: (...args) => withConfigLockAsync(() => upsertProject(...args)),
1112
+ upsertProject: (...args) => withConfigLockAsync$1(() => upsertProject(...args)),
1041
1113
  recordIosSchemeApprovals,
1042
1114
  checkDeviceCapacity,
1043
1115
  budgetGate,
@@ -1055,7 +1127,7 @@ const DEFAULT_DEPS = {
1055
1127
  resolveProjectMetro,
1056
1128
  startDevServer,
1057
1129
  warmMetro,
1058
- readWorkspaceState,
1130
+ readWorkspaceState: readWorkspaceState$1,
1059
1131
  pidExists,
1060
1132
  getConcurrencyLimits,
1061
1133
  fingerprintProject,
@@ -1104,6 +1176,7 @@ const DEFAULT_DEPS = {
1104
1176
  installIosApp,
1105
1177
  clearOtherUserApps,
1106
1178
  clearIosAppData,
1179
+ resetIosKeychain,
1107
1180
  clearIosAdoptionPending,
1108
1181
  launchIosApp,
1109
1182
  verifyLaunch,
@@ -1,5 +1,5 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { Bt as repoRoot } from "./settings-Bap-qjnp.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { Bt as repoRoot } from "./settings-Cz8kQJzr.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { existsSync } from "node:fs";
5
5
  import { dirname, join, relative } from "node:path";
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
2
  import { openSync } from "node:fs";
3
3
  //#region src/detached-entry.ts
4
4
  const LOG_FILE_FLAG = "--log-file";
@@ -1,5 +1,5 @@
1
- import { C as resolvePackageJson, b as isPackageResolvable } from "./project-Clk1JAWL.mjs";
2
- import { $ as readBundleSchemes, Q as pickDevClientScheme } from "./toolchain-DCnWAxQL.mjs";
1
+ import { C as resolvePackageJson, b as isPackageResolvable } from "./project-DIo71tGq.mjs";
2
+ import { X as readBundleSchemes, Y as pickDevClientScheme } from "./toolchain-CZvtCZ-m.mjs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
5
5
  //#region src/commands/dev-client.ts
@@ -1,16 +1,16 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { r as readWorkspaceState$1 } from "./workspace-state-BhwAJBgA.mjs";
3
- import { r as clockTime } from "./command-output-T3cDctRE.mjs";
4
- import { ft as deviceSlotKey, gt as projectDeviceSlots, ht as parseDeviceSlotOption, m as getProject, pt as deviceSlotPlatforms } from "./config-BA3TgoIP.mjs";
5
- import { I as readWorkspaceLaunches, P as readRemoteSession, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-Clk1JAWL.mjs";
6
- import { $ as probeEmulatorSerial, A as getAvdNameForSerialAsync, E as emulatorProbeSession, P as listAdbDevicesAsync, Z as physicalDeviceModel, at as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, d as androidToolPath, it as resolveOwnedAvdSerialAsync, s as androidPoolCandidates, u as androidToolCwd } from "./android-SJx1V3R3.mjs";
7
- import { Wn as runProcessOperation } from "./device-capacity-CpAVcKgq.mjs";
8
- import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-BpdDvA8Q.mjs";
9
- import { D as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-BhfpRfNf.mjs";
10
- import { Z as waitForDevice, q as parseDeviceWait } from "./support-BJbXovoO.mjs";
11
- import { n as runProvision } from "./device-provision-CxQDCtrc.mjs";
12
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-vhYL1N--.mjs";
13
- import { t as selectFromPool } from "./device-pool-BJToGG-q.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { r as readWorkspaceState$1 } from "./workspace-state-CHEN_xzy.mjs";
3
+ import { r as clockTime } from "./command-output-DsjhOzJ3.mjs";
4
+ import { ft as deviceSlotKey, gt as projectDeviceSlots, ht as parseDeviceSlotOption, m as getProject, pt as deviceSlotPlatforms } from "./config-CNmN-ndb.mjs";
5
+ import { I as readWorkspaceLaunches, P as readRemoteSession, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-DIo71tGq.mjs";
6
+ import { $ as probeEmulatorSerial, A as getAvdNameForSerialAsync, E as emulatorProbeSession, P as listAdbDevicesAsync, Z as physicalDeviceModel, at as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, d as androidToolPath, it as resolveOwnedAvdSerialAsync, s as androidPoolCandidates, u as androidToolCwd } from "./android-27_JgJ1T.mjs";
7
+ import { qn as runProcessOperation } from "./device-capacity-D_IlxZRL.mjs";
8
+ import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-CANftndU.mjs";
9
+ import { D as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-DQEzde6f.mjs";
10
+ import { Z as waitForDevice, q as parseDeviceWait } from "./support-BeVRaMWT.mjs";
11
+ import { n as runProvision } from "./device-provision-C9NPdCne.mjs";
12
+ import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-BLm1BZB4.mjs";
13
+ import { t as selectFromPool } from "./device-pool-BEaTdtss.mjs";
14
14
  import { hostedNativeRecords } from "@stim-cli/core/state";
15
15
  import chalk from "chalk";
16
16
  //#region src/commands/device-tools.ts
@@ -53,6 +53,7 @@ const TARGET = "STIM_DEVICE_TOOL_TARGET";
53
53
  const UNSUPPORTED = "STIM_DEVICE_TOOL_UNSUPPORTED";
54
54
  const FAILED = "STIM_DEVICE_TOOL_FAILED";
55
55
  const DEFAULT_DEPS$1 = {
56
+ hostPlatform: process.platform,
56
57
  findProjectRoot: findProjectRoot$1,
57
58
  getProject,
58
59
  hostedSlots: (root, platform) => Object.keys(hostedNativeRecords(readWorkspaceState$1(root), platform)),
@@ -162,11 +163,12 @@ function describeError(error) {
162
163
  async function resolveToolTarget(platform, slot, root, d) {
163
164
  const slotText = slot === "default" ? "" : ` --slot ${slot}`;
164
165
  const runCommand = `stim ${platform}${slotText}`;
166
+ const localRemedy = platform === "ios" && d.hostPlatform !== "darwin" ? "Run device tools on a Mac with a local Stim-owned iOS simulator." : `Run \`${runCommand} --remote local\` to use a local device.`;
165
167
  const project = d.getProject(root);
166
168
  if (!project) return failure("STIM_NO_PROJECT", `No Stim environment is registered for ${root}.`, "Run `stim start` first.");
167
- if (d.hostedSlots(root, platform).includes(slot)) return failure(TARGET, `This workspace's ${platform} device${slotText ? ` in slot ${slot}` : ""} is hosted on another Mac, and device tools act only on the workspace's own local simulator or emulator.`, `Run \`${runCommand} --remote local\` to use a local device.`);
169
+ if (d.hostedSlots(root, platform).includes(slot)) return failure(TARGET, `This workspace's ${platform} device${slotText ? ` in slot ${slot}` : ""} is hosted on another Mac, and device tools act only on the workspace's own local simulator or emulator.`, localRemedy);
168
170
  const remote = d.readRemotePlatform(root);
169
- if (remote && (remote.platform === null || remote.platform === platform)) return failure(TARGET, `This workspace's remote device is EAS Simulator session ${remote.sessionId}, and device tools act only on the workspace's own local simulator or emulator.`, `Run \`${runCommand} --remote local\` to use a local device.`);
171
+ if (remote && (remote.platform === null || remote.platform === platform)) return failure(TARGET, `This workspace's remote device is EAS Simulator session ${remote.sessionId}, and device tools act only on the workspace's own local simulator or emulator.`, localRemedy);
170
172
  const records = deviceSlotPlatforms(project, slot);
171
173
  const launch = d.readLaunch(root, platform, slot);
172
174
  if (platform === "ios") {
@@ -199,7 +201,6 @@ async function resolveToolTarget(platform, slot, root, d) {
199
201
  function noOwnedDevice(platform, slot, runCommand) {
200
202
  return failure(TARGET, `This workspace has no owned ${platform} ${platform === "ios" ? "simulator" : "emulator"}${slot === "default" ? "" : ` in slot ${slot}`}. Device tools do not act on physical devices or devices Stim does not own.`, `Run \`${runCommand}\` to create and boot one.`);
201
203
  }
202
- /** Reads each permission's grant state out of `dumpsys package <id>`; a permission the dump does not list is omitted. */
203
204
  function parsePackagePermissions(dump, names) {
204
205
  const states = [];
205
206
  for (const name of names) {
@@ -1,12 +1,12 @@
1
- import { D as ownership_claim_exports, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { l as phaseLine } from "./command-output-T3cDctRE.mjs";
3
- import { A as withConfigLockAsync, N as acquireAvdClaim, T as setDevice, a as clearDevice, gt as projectDeviceSlots, i as clearAndroidBootPending, k as withConfigLock, pt as deviceSlotPlatforms, t as allConsolePortsAndSerials, v as loadConfig, x as releaseAndroidConsolePort } from "./config-BA3TgoIP.mjs";
4
- import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-Bap-qjnp.mjs";
5
- import { A as getAvdNameForSerialAsync, G as ownedAvdName, H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, V as nextConsolePort, W as ownedAvdMatchesConfiguration, _ as avdPoolConfiguration, b as bootAndroidEmulator, bt as parkedMaxSetting, ht as adoptParked, it as resolveOwnedAvdSerialAsync, n as OWNED_AVD_CONFIG_DEFAULTS, p as assertOwnedAvdStoppedAsync, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, vt as isLegacyDeletionClaim, xt as readParked, z as listInstalledSystemImages } from "./android-SJx1V3R3.mjs";
6
- import { c as pidExists } from "./metro-DM3yJL1M.mjs";
7
- import { _ as withDeviceBootAdmission, n as DeviceAdmissionRefusal, s as countLiveOwnedDevicesFrom } from "./device-capacity-CpAVcKgq.mjs";
8
- import { gt as teardownParkedAvd, pt as teardownOwnedAvd } from "./workspaces-Dh5N70qW.mjs";
9
- import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-BhfpRfNf.mjs";
1
+ import { D as ownership_claim_exports, t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { l as phaseLine } from "./command-output-DsjhOzJ3.mjs";
3
+ import { A as withConfigLockAsync, N as acquireAvdClaim, T as setDevice, a as clearDevice, gt as projectDeviceSlots, i as clearAndroidBootPending, k as withConfigLock, pt as deviceSlotPlatforms, t as allConsolePortsAndSerials, v as loadConfig, x as releaseAndroidConsolePort } from "./config-CNmN-ndb.mjs";
4
+ import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-Cz8kQJzr.mjs";
5
+ import { A as getAvdNameForSerialAsync, G as ownedAvdName, H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, V as nextConsolePort, W as ownedAvdMatchesConfiguration, _ as avdPoolConfiguration, b as bootAndroidEmulator, bt as parkedMaxSetting, ht as adoptParked, it as resolveOwnedAvdSerialAsync, n as OWNED_AVD_CONFIG_DEFAULTS, p as assertOwnedAvdStoppedAsync, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, vt as isLegacyDeletionClaim, xt as readParked, z as listInstalledSystemImages } from "./android-27_JgJ1T.mjs";
6
+ import { c as pidExists } from "./metro-Cj6W4qOO.mjs";
7
+ import { _ as withDeviceBootAdmission, n as DeviceAdmissionRefusal, s as countLiveOwnedDevicesFrom } from "./device-capacity-D_IlxZRL.mjs";
8
+ import { _t as teardownParkedAvd, mt as teardownOwnedAvd } from "./workspaces-BgAYIccE.mjs";
9
+ import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-DQEzde6f.mjs";
10
10
  import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { existsSync } from "node:fs";