stim 1.25.0 → 1.26.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 (158) hide show
  1. package/README.md +1 -1
  2. package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-DVsvSwf7.mjs} +1 -1
  3. package/dist/{act-BbHS3oV8.mjs → act-C-BqJEpu.mjs} +157 -35
  4. package/dist/{activity-BpjwrQXU.mjs → activity-Lnb_EoRY.mjs} +4 -5
  5. package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-DbXy5tg8.mjs} +4 -4
  6. package/dist/{android-saBeB4lr.mjs → android-B5P81yI-.mjs} +1 -1
  7. package/dist/{android-CNZgRC-4.mjs → android-CSbLRD53.mjs} +5 -5
  8. package/dist/{android-BGwuK3Mc.mjs → android-CiNQw3kq.mjs} +73 -49
  9. package/dist/{android-Cjcj8MCw.mjs → android-DTAcRwBC.mjs} +81 -34
  10. package/dist/{android-cas-BVqh2Zep.mjs → android-cas-BTVhZ0Qs.mjs} +4 -4
  11. package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
  12. package/dist/api.d.mts +8 -5
  13. package/dist/api.mjs +27 -27
  14. package/dist/apk-signed-tail-B46U9hXc.mjs +142 -0
  15. package/dist/{artifact-Co8zixVx.mjs → artifact-BxREhAaV.mjs} +23 -18
  16. package/dist/{artifact-DN8JNwqS.mjs → artifact-CsAP6AGK.mjs} +35 -20
  17. package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
  18. package/dist/{browser-web-CCgZsHmI.mjs → browser-web-rYPyqhTf.mjs} +11 -12
  19. package/dist/{budget-HyShrIpL.mjs → budget-k2mZGvvk.mjs} +196 -33
  20. package/dist/{build-CAiw8Ezm.mjs → build-DPhApsjV.mjs} +26 -23
  21. package/dist/{build-cache-CKCzxzxA.mjs → build-cache-DrXNCy3T.mjs} +103 -21
  22. package/dist/{build-plan-zCuHGlA8.mjs → build-plan-DrMMdayj.mjs} +5 -5
  23. package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-BEZ9Bpl1.mjs} +1 -1
  24. package/dist/cache-manifest.mjs +1 -1
  25. package/dist/{ccache-h1FKhZeg.mjs → ccache-Bx5TbxwG.mjs} +6 -6
  26. package/dist/{cli-C4w607Pz.mjs → cli-BBKFGOFl.mjs} +19 -19
  27. package/dist/cli.mjs +1 -1
  28. package/dist/{client-BQsmyp_-.mjs → client-D9CaRks-.mjs} +36 -61
  29. package/dist/collector-run.mjs +4 -4
  30. package/dist/{command-output-BBvS1H6v.mjs → command-output-BF5AR2dL.mjs} +1 -1
  31. package/dist/{config-BZhXY15H.mjs → config-BktkY_zC.mjs} +321 -15
  32. package/dist/{launch-DscF1QfM.mjs → dependencies-Dw6wfQdv.mjs} +258 -255
  33. package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-DFB41vfr.mjs} +1 -1
  34. package/dist/{dev-client-CHoXXZeg.mjs → dev-client-DXR_tPVY.mjs} +2 -2
  35. package/dist/{device-B9FqTBYW.mjs → device-BK-zwyd_.mjs} +13 -13
  36. package/dist/{device-F5-4z9ef.mjs → device-BcYeHSFu.mjs} +14 -14
  37. package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-DCSvUF0l.mjs} +10 -17
  38. package/dist/device-host-worker.mjs +11 -13
  39. package/dist/{device-ios-DkHBrmvH.mjs → device-ios-BLGfXQeK.mjs} +49 -17
  40. package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-BmvIl7bI.mjs} +4 -4
  41. package/dist/{device-pool-BIg8MU8l.mjs → device-pool-Dluix4H3.mjs} +3 -3
  42. package/dist/{doctor-k3P3PizH.mjs → doctor-Bhg1ii70.mjs} +14 -14
  43. package/dist/{doctor-A_Nr_fDe.mjs → doctor-Cp-BhzTS.mjs} +1 -1
  44. package/dist/{doctor-Bm8TVpGn.mjs → doctor-OnwP94ne.mjs} +72 -23
  45. package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-D3a04Mhu.mjs} +8 -2
  46. package/dist/doctor-fingerprint.mjs +1 -1
  47. package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-BStK05nt.mjs} +4 -4
  48. package/dist/{eas-build-CyDKNTBP.mjs → eas-build-Dsj93iM9.mjs} +2 -2
  49. package/dist/{eas-fallback-gaZi-dJL.mjs → eas-fallback-FwkeqqGi.mjs} +10 -10
  50. package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-B5vygTiD.mjs} +5 -5
  51. package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-BOOm9Db7.mjs} +8 -8
  52. package/dist/{gc-eaz403W6.mjs → gc-C_79zvz4.mjs} +2 -2
  53. package/dist/{gc-B9jcnmIk.mjs → gc-ldgr-hXU.mjs} +74 -43
  54. package/dist/{guide-DR0K0xW9.mjs → guide-D7K0X6KG.mjs} +272 -52
  55. package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-Bk54ej6n.mjs} +3 -3
  56. package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-fHO8yqzc.mjs} +5 -5
  57. package/dist/{hosted-ios-RtVcJH3u.mjs → hosted-ios-D55QhYaD.mjs} +1 -1
  58. package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-BfbmDM4M.mjs} +17 -11
  59. package/dist/hosted-logs-sync-B0pvmOk-.mjs +195 -0
  60. package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-CPl0OZ9h.mjs} +5 -5
  61. package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CpDB3-PO.mjs} +6 -7
  62. package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-FfxL1KdG.mjs} +22 -9
  63. package/dist/{ios-Dvt97HgQ.mjs → ios-B7-lToDu.mjs} +8 -8
  64. package/dist/{ios-BQzvJlzw.mjs → ios-WxpDJ5T1.mjs} +72 -5
  65. package/dist/{ios-device-CKSvk0bu.mjs → ios-device-CsyryvpT.mjs} +1 -1
  66. package/dist/{ios-BRVM8b0P.mjs → ios-ftxdQbJS.mjs} +74 -46
  67. package/dist/{ios-project-DCUDo06I.mjs → ios-project-Ty5pHl9O.mjs} +6 -6
  68. package/dist/{ios-state-CT9nV5SP.mjs → ios-state-Cw7-WQf2.mjs} +1 -1
  69. package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-BMhXYVDS.mjs} +4 -4
  70. package/dist/{launch-D0lPvFFu.mjs → launch-DOp8RjDz.mjs} +31 -26
  71. package/dist/{logs-BsIRre8x.mjs → logs-dQDki6Tt.mjs} +9 -173
  72. package/dist/{logs-Crs9y34Z.mjs → logs-s1dRIG1E.mjs} +85 -36
  73. package/dist/{macos-CcUlJPMu.mjs → macos-B0VEV3Gf.mjs} +1 -1
  74. package/dist/{macos-D477nfzH.mjs → macos-DBBPNnIA.mjs} +18 -19
  75. package/dist/macos-run.mjs +1 -1
  76. package/dist/maintenance-run.mjs +28 -11
  77. package/dist/{metro-1pJgCX4U.mjs → metro-CjC10t6E.mjs} +2 -2
  78. package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-B6_PgD0L.mjs} +2 -3
  79. package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BG0j1X4g.mjs} +2 -2
  80. package/dist/{native-android-BvMizJn1.mjs → native-android-CL2NGiik.mjs} +17 -17
  81. package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-btSUulme.mjs} +3 -3
  82. package/dist/{native-run-D5OJsGwA.mjs → native-run-BfIDFKLH.mjs} +2 -3
  83. package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-Dq3RBcON.mjs} +6 -7
  84. package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-BW7H8JGu.mjs} +2 -2
  85. package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-CBXJAxfC.mjs} +15 -16
  86. package/dist/offload-worker.d.mts +3 -1
  87. package/dist/offload-worker.mjs +31 -21
  88. package/dist/{ownership-jxxz-19m.mjs → ownership-BjYvMNX_.mjs} +2 -2
  89. package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-lmj6kcPm.mjs} +3 -3
  90. package/dist/{placement-log-DjOXJRIH.mjs → placement-log-DIFPQAXp.mjs} +1 -1
  91. package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-IiiSQhtz.mjs} +3 -3
  92. package/dist/{ports-DtS1Amb0.mjs → ports-C2_w1Z0Z.mjs} +3 -3
  93. package/dist/prebuild-gmouvmJZ.mjs +1247 -0
  94. package/dist/{project-BiC68mIp.mjs → project-BUu6Is4k.mjs} +15 -16
  95. package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-Cgg99REN.mjs} +47 -33
  96. package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-oNwqF5Wb.mjs} +7 -7
  97. package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-BhA3KUte.mjs} +49 -8
  98. package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-B-nf4rjN.mjs} +37 -23
  99. package/dist/{recordings-BaoQ0t-J.mjs → recordings-BldzVKq0.mjs} +1 -1
  100. package/dist/{reload-Beftw2X3.mjs → reload-C9OduiNc.mjs} +1 -1
  101. package/dist/{reload-FbSgMF8x.mjs → reload-CCR7KC_l.mjs} +14 -14
  102. package/dist/{remote-BuZj6AyU.mjs → remote-C8S7FlPF.mjs} +7 -7
  103. package/dist/{result-CR2vk2cj.mjs → result-7F5hEwQJ.mjs} +16 -16
  104. package/dist/{run-BtzE09Dl.mjs → run-BqB0v3pt.mjs} +1 -1
  105. package/dist/{selection-D5cxEl3t.mjs → selection-BNPBZ6T5.mjs} +155 -42
  106. package/dist/{server-bare-CH9X0RLn.mjs → server-bare-A75rDIdD.mjs} +1 -1
  107. package/dist/{server-command-CaBbDNU2.mjs → server-command-CssKFOD7.mjs} +4 -4
  108. package/dist/{server-expo-Ck8EIidM.mjs → server-expo-eQfOdydb.mjs} +2 -2
  109. package/dist/server-expo-wvcj5tiZ.mjs +2 -0
  110. package/dist/{settings-B5tCoq9N.mjs → settings-CosW5X-S.mjs} +1 -1
  111. package/dist/{settings-DzH9mGQZ.mjs → settings-OaGQF-ri.mjs} +1 -1
  112. package/dist/{settings-write-n0zwfohx.mjs → settings-write-QjYfSrjF.mjs} +5 -5
  113. package/dist/settings.schema.json +33 -6
  114. package/dist/{simslim-BjxszUAb.mjs → simslim-Bax1qcxu.mjs} +3 -2
  115. package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-CYCEhfBY.mjs} +6 -6
  116. package/dist/{stage-D8xlRU2D.mjs → stage-jKQ7CP_B.mjs} +1 -1
  117. package/dist/{start-C1JLjkNw.mjs → start-C_wefNKB.mjs} +1 -1
  118. package/dist/{start-YMpNwLhh.mjs → start-_BdJ32cZ.mjs} +9 -10
  119. package/dist/{state-DMRNP7-4.mjs → state-C1i2nMOP.mjs} +2 -3
  120. package/dist/{state-DPaM3u5K.mjs → state-C4OdpOTF.mjs} +1 -2
  121. package/dist/{stats-CP7STzZw.mjs → stats-tEpEEH-u.mjs} +4 -4
  122. package/dist/{status-cNw6i0_t.mjs → status-B9M7x4CZ.mjs} +1 -1
  123. package/dist/{status-Fect2w9R.mjs → status-CRXz-Gtj.mjs} +1 -1
  124. package/dist/{status-CRLiJ-O_.mjs → status-DQrqodLj.mjs} +22 -23
  125. package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-B5wDIH_o.mjs} +4 -4
  126. package/dist/status-worker.mjs +1 -1
  127. package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-6Dqp-gjX.mjs} +1 -1
  128. package/dist/{stop-Br7LKxBE.mjs → stop-CmdNhGlC.mjs} +2 -2
  129. package/dist/{stop-Db9Kh-UA.mjs → stop-DRqQVqDJ.mjs} +21 -19
  130. package/dist/{stop-COP6PQqw.mjs → stop-ySNQHXMG.mjs} +4 -5
  131. package/dist/supervisor-run.d.mts +1 -0
  132. package/dist/supervisor-run.mjs +14 -15
  133. package/dist/{support-Cxj9CmII.mjs → support-BGSCBoib.mjs} +4 -4
  134. package/dist/{support-qKcbgmI5.mjs → support-CVOCp0Ft.mjs} +9 -9
  135. package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-CfUzt_0Z.mjs} +1 -1
  136. package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-x6HPpl_2.mjs} +9 -9
  137. package/dist/toolchain-DoavrvIA.mjs +2 -0
  138. package/dist/toolchain-J4J8MrAr.mjs +2107 -0
  139. package/dist/trigger-DzJu208Q.mjs +2 -0
  140. package/dist/{trigger-CBMe2YLH.mjs → trigger-KVaWWNyn.mjs} +1 -1
  141. package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-DvhTX_eu.mjs} +3 -4
  142. package/dist/web-BFLueSh-.mjs +2 -0
  143. package/dist/{web-B4Yjyt1G.mjs → web-Bihbf7-u.mjs} +8 -9
  144. package/dist/web-run.mjs +4 -4
  145. package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-pUg3_RRA.mjs} +45 -7
  146. package/dist/{workspaces-C9w4aeXF.mjs → workspaces-g2lhdBXF.mjs} +17 -17
  147. package/dist/{worktree-CclFIe1Z.mjs → worktree-BKuklFh_.mjs} +34 -31
  148. package/dist/{worktree-Ct9Gk3KL.mjs → worktree-Bm4cb-nU.mjs} +1 -1
  149. package/package.json +8 -8
  150. package/dist/created-devices-D2Aca-xu.mjs +0 -52
  151. package/dist/paths-DQtTgsBf.mjs +0 -42
  152. package/dist/prebuild-JUaqOLpc.mjs +0 -501
  153. package/dist/server-expo-C16Zf2k7.mjs +0 -2
  154. package/dist/toolchain-DB1aeqxO.mjs +0 -2
  155. package/dist/toolchain-VzLJzZ7O.mjs +0 -908
  156. package/dist/trigger-BLsHgAGR.mjs +0 -2
  157. package/dist/web-DS4UDWvf.mjs +0 -2
  158. package/dist/xcode-CiIIDnuD.mjs +0 -910
@@ -1,46 +1,45 @@
1
- import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
2
- import { B as deviceSlotFileKey, W as parseDeviceSlotOption, q as validateDeviceSlot } from "./config-BZhXY15H.mjs";
3
- import { _ as stepTimer, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
4
- import { a as recordWorkspaceUseAsync } from "./workspace-state-CPSp3mav.mjs";
5
- import { C as iosSigningIdentitySha1Setting, M as metroPortSetting, P as metroWarmupUrlSetting, R as projectSettingsContextAsync, S as iosSigningIdentitySettingError, _ as iosLanHostSetting, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, it as tunnelModeSetting, v as iosLanHostSettingError, w as iosSigningIdentitySha1SettingError, x as iosSigningIdentitySetting, z as publicUrlSetting } from "./settings-B5tCoq9N.mjs";
6
- import { L as workspaceDevServerMode, t as NO_PROJECT_REFUSAL } from "./project-BiC68mIp.mjs";
7
- import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-Cjcj8MCw.mjs";
8
- import { G as createRunRecorder, H as startBuildProgress, Ln as exitAfterFlush, M as NO_BUILD_PROGRESS, U as tapBuildLog, V as runFailureRecord, W as thrownRunFailureRecord, Z as statsProjectKey$1, dn as DEFAULT_METRO_PORT, or as ownedSessionName, zn as runProcessOperation, zt as binOnPath } from "./budget-HyShrIpL.mjs";
9
- import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-D5OJsGwA.mjs";
10
- import { i as createIosSimSnapshot } from "./ios-BQzvJlzw.mjs";
1
+ import { a as recordWorkspaceUseAsync, k as workspaceLogsDir$1 } from "./workspace-state-pUg3_RRA.mjs";
2
+ import { B as deviceSlotFileKey, W as parseDeviceSlotOption, q as validateDeviceSlot } from "./config-BktkY_zC.mjs";
3
+ import { _ as stepTimer, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-BF5AR2dL.mjs";
4
+ import { C as iosSigningIdentitySha1Setting, M as metroPortSetting, P as metroWarmupUrlSetting, R as projectSettingsContextAsync, S as iosSigningIdentitySettingError, _ as iosLanHostSetting, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, it as tunnelModeSetting, v as iosLanHostSettingError, w as iosSigningIdentitySha1SettingError, x as iosSigningIdentitySetting, z as publicUrlSetting } from "./settings-CosW5X-S.mjs";
5
+ import { t as NO_PROJECT_REFUSAL } from "./project-BUu6Is4k.mjs";
6
+ import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-DTAcRwBC.mjs";
7
+ import { G as runFailureRecord, I as NO_BUILD_PROGRESS, J as thrownRunFailureRecord, K as startBuildProgress, Un as runProcessOperation, Ut as binOnPath, Vn as exitAfterFlush, Y as createRunRecorder, hn as DEFAULT_METRO_PORT, q as tapBuildLog, tt as statsProjectKey$1, ur as ownedSessionName } from "./budget-k2mZGvvk.mjs";
8
+ import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-BfIDFKLH.mjs";
9
+ import { i as createIosSimSnapshot } from "./ios-WxpDJ5T1.mjs";
11
10
  import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
12
- import { t as COMPILATION_CACHE_NOT_RUN } from "./xcode-CiIIDnuD.mjs";
13
- import { S as setRemoteLogSink, d as simulatorRuntime } from "./client-BQsmyp_-.mjs";
14
- import { a as parseBuildMachineOption } from "./selection-D5cxEl3t.mjs";
15
- import { r as hostedMetroSettings } from "./metro-gateway-Bp9gJQAN.mjs";
16
- import { i as writeDevicePlacementAsync } from "./ios-state-CT9nV5SP.mjs";
17
- import { t as devClientPortBusy } from "./hosted-native-BxTizGU2.mjs";
18
- import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-QeuJMlnJ.mjs";
19
- import { f as waitFlagConflict, o as leaseExpiryText } from "./device-lease-run-ogEeJ62K.mjs";
20
- import { _ as resolveIosWait, a as deviceModelRefusal, b as resolveSimulatorAppFlag, c as iosProjectPathError, d as ownedSimFailure, g as resolveIosBuildSetup, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, r as createIosDeviceWaitRun, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-qKcbgmI5.mjs";
21
- import { r as isEasBuildFailure } from "./eas-build-CyDKNTBP.mjs";
22
- import { r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-B9w_Qyz3.mjs";
23
- import "./dev-client-CHoXXZeg.mjs";
24
- import { t as didSetUpDevice } from "./device-B9FqTBYW.mjs";
11
+ import { k as COMPILATION_CACHE_NOT_RUN } from "./toolchain-J4J8MrAr.mjs";
12
+ import { S as setRemoteLogSink, d as simulatorRuntime } from "./client-D9CaRks-.mjs";
13
+ import { a as parseBuildMachineOption } from "./selection-BNPBZ6T5.mjs";
14
+ import { r as hostedMetroSettings } from "./metro-gateway-B6_PgD0L.mjs";
15
+ import { i as writeDevicePlacementAsync } from "./ios-state-Cw7-WQf2.mjs";
16
+ import { t as devClientPortBusy } from "./hosted-native-CpDB3-PO.mjs";
17
+ import { f as waitFlagConflict, o as leaseExpiryText } from "./device-lease-run-BmvIl7bI.mjs";
18
+ import { _ as resolveIosWait, a as deviceModelRefusal, b as resolveSimulatorAppFlag, c as iosProjectPathError, d as ownedSimFailure, g as resolveIosBuildSetup, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, r as createIosDeviceWaitRun, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-CVOCp0Ft.mjs";
19
+ import { r as isEasBuildFailure } from "./eas-build-Dsj93iM9.mjs";
20
+ import { r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-Dq3RBcON.mjs";
21
+ import "./dev-client-DXR_tPVY.mjs";
22
+ import { t as didSetUpDevice } from "./device-BK-zwyd_.mjs";
25
23
  import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
26
- import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-zCuHGlA8.mjs";
27
- import { a as lastBuildRecord, o as reportIosResult, s as writeLastBuild } from "./ios-project-DCUDo06I.mjs";
28
- import { t as acquireIosArtifact } from "./artifact-DN8JNwqS.mjs";
29
- import { a as hostedIosSelectors, i as hostedIosMetroNote, n as connectIosTarget, o as iosPlacementBudget, r as deviceRemoteConflict, s as selectIosPlacement, t as connectIosBackend } from "./remote-BuZj6AyU.mjs";
30
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, o as iosPoolNoCandidatesRefusal, r as iosDeviceBounds } from "./ios-device-CKSvk0bu.mjs";
31
- import { i as DEFAULT_DEPS, l as lanOriginUrlFor, s as chooseLanAddress, t as finishIosRun } from "./launch-DscF1QfM.mjs";
24
+ import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-DrMMdayj.mjs";
25
+ import { a as lastBuildRecord, o as reportIosResult, s as writeLastBuild } from "./ios-project-Ty5pHl9O.mjs";
26
+ import { t as acquireIosArtifact } from "./artifact-CsAP6AGK.mjs";
27
+ import { a as hostedIosSelectors, i as hostedIosMetroNote, n as connectIosTarget, o as iosPlacementBudget, r as deviceRemoteConflict, s as selectIosPlacement, t as connectIosBackend } from "./remote-C8S7FlPF.mjs";
28
+ import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, o as iosPoolNoCandidatesRefusal, r as iosDeviceBounds } from "./ios-device-CsyryvpT.mjs";
29
+ import { i as lanOriginUrlFor, l as verifyIosMetroRun, n as chooseLanAddress, o as finishIosRun, t as DEFAULT_DEPS } from "./dependencies-Dw6wfQdv.mjs";
32
30
  import { basename, join } from "node:path";
33
31
  import { workspaceId } from "@stim-cli/core";
34
32
  import { hostedIosStatus, parseMachine } from "@stim-cli/core/state";
35
33
  import chalk from "chalk";
36
34
  import { InvalidArgumentError } from "commander";
37
35
  //#region src/commands/ios/hosted.ts
38
- async function finishHostedIosRun({ target, d, artifact, root, slot, release, appMode, isExpo, metroCheck, metroPort, logsDir, fail, note, enterPhase, selectors, projectBundleId, ...report }) {
36
+ async function finishHostedIosRun({ target, d, artifact, root, slot, release, appMode, isExpo, metroCheck, metroPort, logsDir, fail, note, phase, enterPhase, enterActivity, selectors, projectBundleId, ...report }) {
39
37
  const bundleId = artifact.bundleId ?? (await d.readBundleId(artifact.path) || await projectBundleId());
40
38
  if (!bundleId) return fail({
41
39
  code: "STIM_INSTALL_FAILED",
42
40
  message: "The built app has no bundle identifier."
43
41
  });
42
+ const devClientScheme = appMode === "development" && isExpo ? d.devClientScheme(root, artifact.path) ?? void 0 : void 0;
44
43
  const launchedAt = d.now();
45
44
  let run;
46
45
  try {
@@ -53,7 +52,7 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
53
52
  selectors,
54
53
  release,
55
54
  mode: appMode,
56
- ...appMode === "development" && isExpo ? { devClientScheme: d.devClientScheme(root, artifact.path) ?? void 0 } : {},
55
+ ...appMode === "development" && isExpo ? { devClientScheme } : {},
57
56
  metroPort,
58
57
  reserved: (placement) => d.writeHostedIos(root, slot, placement),
59
58
  note,
@@ -76,23 +75,48 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
76
75
  launchedAt: new Date(launchedAt).toISOString()
77
76
  }, slot);
78
77
  let launched = run.launched;
79
- if (appMode === "development" && metroCheck) {
80
- const evidence = await d.verifyLaunch({
81
- requireBundleResponse: true,
82
- platform: "ios",
83
- logsDir,
84
- since: launchedAt,
85
- metroPort,
86
- mode: workspaceDevServerMode(root, isExpo),
87
- slot: launchSlotScope(root, slot),
88
- platformShared: (await siblingPlatformSlots(root, "ios", slot)).length > 0
89
- });
90
- if (evidence.fatal) return fail({
78
+ let launchWarning;
79
+ if (appMode === "development") {
80
+ const hostedLogs = d.followHostedLaunchLogs(root, slot, "ios", launchedAt);
81
+ let verification;
82
+ try {
83
+ verification = await verifyIosMetroRun({
84
+ root,
85
+ slot,
86
+ appPath: artifact.path,
87
+ d,
88
+ launched: {},
89
+ configuration: report.configuration,
90
+ phase,
91
+ note,
92
+ metroCheck,
93
+ logsDir,
94
+ launchedAt,
95
+ metroPort,
96
+ isExpo,
97
+ bundleId,
98
+ udid: run.placement.device?.udid ?? "",
99
+ scheme: devClientScheme,
100
+ physical: false,
101
+ appName: null,
102
+ lanAddress: null,
103
+ lanOrigin: null,
104
+ remoteDevice: true,
105
+ metroOrigin: null,
106
+ enterActivity,
107
+ hostedLogs
108
+ });
109
+ } finally {
110
+ hostedLogs.stop();
111
+ }
112
+ if (verification.state === "fatal") return fail({
91
113
  code: "STIM_LAUNCH_FAILED",
92
- message: "Metro could not deliver the hosted app bundle.",
93
- remedy: "Run stim logs --errors and fix the bundle error."
114
+ message: "The app failed its launch readiness check.",
115
+ remedy: `Read the launch error above or run \`stim logs --errors\`. The full timeline is in ${logsDir}.`,
116
+ logPath: logsDir
94
117
  });
95
- launched = evidence.verified ? true : evidence.requested ? "bundling" : "unverified";
118
+ launched = verification.state === true ? true : verification.state === "bundling" ? "bundling" : "unverified";
119
+ launchWarning = verification.warning;
96
120
  }
97
121
  if (launched === "unverified") note(`Launch on ${target.host.machine} is unverified; check the hosted app, then retry stim ios --remote ${target.host.machine}.`);
98
122
  const cache = artifact.cache;
@@ -126,6 +150,7 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
126
150
  useBuildCache: cache.readEnabled,
127
151
  waitedForBuild: cache.waitedForBuild,
128
152
  launchState: launched,
153
+ launchWarning,
129
154
  providerName: cache.providerName,
130
155
  buildMachine: cache.buildMachine,
131
156
  builtOn: cache.builtOn,
@@ -1093,7 +1118,9 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
1093
1118
  devServer,
1094
1119
  fail,
1095
1120
  note,
1121
+ phase,
1096
1122
  enterPhase: progress.step,
1123
+ enterActivity: progress.activity,
1097
1124
  selectors
1098
1125
  });
1099
1126
  if (!localBoot) {
@@ -1185,6 +1212,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
1185
1212
  } catch (error) {
1186
1213
  return reportRunFailure(error);
1187
1214
  } finally {
1215
+ artifact?.cancelFingerprintCheck();
1188
1216
  await artifact?.release();
1189
1217
  }
1190
1218
  } finally {
@@ -1,9 +1,9 @@
1
- import { l as workspaceAgentDeviceDir } from "./paths-DQtTgsBf.mjs";
2
- import { i as formatDuration, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
3
- import { a as workspaceLinkLine } from "./stim-desktop-DS0mzR8U.mjs";
4
- import { B as recordFinishedBuild, Gn as isEasAuthFailureText, Hn as cacheLevel, Vn as UPLOAD_TIMEOUT_MS, Wn as easAuthNote } from "./budget-HyShrIpL.mjs";
5
- import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-CiIIDnuD.mjs";
6
- import { i as deviceLabel } from "./support-qKcbgmI5.mjs";
1
+ import { w as workspaceAgentDeviceDir } from "./workspace-state-pUg3_RRA.mjs";
2
+ import { i as formatDuration, l as phaseLine } from "./command-output-BF5AR2dL.mjs";
3
+ import { a as workspaceLinkLine } from "./stim-desktop-6Dqp-gjX.mjs";
4
+ import { Gn as UPLOAD_TIMEOUT_MS, Jn as easAuthNote, Kn as cacheLevel, W as recordFinishedBuild, Yn as isEasAuthFailureText } from "./budget-k2mZGvvk.mjs";
5
+ import { P as compilationCacheActivityLine, k as COMPILATION_CACHE_NOT_RUN } from "./toolchain-J4J8MrAr.mjs";
6
+ import { i as deviceLabel } from "./support-CVOCp0Ft.mjs";
7
7
  import { buildDiagnostics } from "@stim-cli/core/state";
8
8
  import chalk from "chalk";
9
9
  //#region src/commands/ios/result.ts
@@ -1,4 +1,4 @@
1
- import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-CPSp3mav.mjs";
1
+ import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-pUg3_RRA.mjs";
2
2
  import { HOSTED_METRO_REQUESTS_KEY, hostedMetroRequests, hostedNativeRecords, isJsonObject, parseHostedNativePlacement, unreadableHostedNative } from "@stim-cli/core/state";
3
3
  //#region src/device-host/ios-state.ts
4
4
  function readHostedNative(root, platform, slot) {
@@ -1,10 +1,10 @@
1
1
  import { _ as spawnDeclared, b as operationState, c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
3
3
  import { a as killOnAbort, t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
4
- import { Ut as makeTemporaryDirectory, Wt as removeTemporaryEntry } from "./settings-B5tCoq9N.mjs";
5
- import { $n as bundleInvocation } from "./budget-HyShrIpL.mjs";
6
- import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-Ck8EIidM.mjs";
7
- import { _ as tailLines, h as startBuildHeartbeat, r as HEARTBEAT_INTERVAL_MS } from "./xcode-CiIIDnuD.mjs";
4
+ import { Ut as makeTemporaryDirectory, Wt as removeTemporaryEntry } from "./settings-CosW5X-S.mjs";
5
+ import { rr as bundleInvocation } from "./budget-k2mZGvvk.mjs";
6
+ import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-eQfOdydb.mjs";
7
+ import { G as tailLines, U as startBuildHeartbeat, j as HEARTBEAT_INTERVAL_MS } from "./toolchain-J4J8MrAr.mjs";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { basename, join } from "node:path";
@@ -1,22 +1,23 @@
1
- import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
2
- import { B as deviceSlotFileKey, C as saveConfig, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync, P as formatBytes, V as deviceSlotKey, _ as loadConfig, w as setDevice } from "./config-BZhXY15H.mjs";
3
- import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-BBvS1H6v.mjs";
4
- import { L as workspaceDevServerMode } from "./project-BiC68mIp.mjs";
5
- import { o as workspaceLinks } from "./stim-desktop-DS0mzR8U.mjs";
6
- import { i as androidDataFreeBytes, ot as trimAndroidCaches, tt as resetAdoptedAvd, u as androidToolCwd } from "./android-Cjcj8MCw.mjs";
7
- import { c as pidExists, f as signalProcessTree } from "./metro-1pJgCX4U.mjs";
8
- import { $t as RELEASE_VERIFY_WAIT_MS, Cn as installConflictKind, Xt as LAUNCH_FATAL, Yt as LAUNCH_BUNDLING, Zt as LAUNCH_UNVERIFIED, an as unverifiedLaunchLines, en as VERIFY_TIMEOUT_MS, hn as androidDevClientUrl, in as unattributedLaunchLines, kn as restartedAppNote, mn as androidAppProcess, un as ADB_INSTALL_TIMEOUT_MS } from "./budget-HyShrIpL.mjs";
9
- import { O as teardownOwnedAvd } from "./workspaces-C9w4aeXF.mjs";
10
- import { _ as providerUploadOutcome } from "./build-cache-CKCzxzxA.mjs";
11
- import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-jxxz-19m.mjs";
12
- import { t as recordPhoneReverse } from "./phone-reverses-CYb7RRAx.mjs";
13
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-QeuJMlnJ.mjs";
1
+ import { k as workspaceLogsDir } from "./workspace-state-pUg3_RRA.mjs";
2
+ import { B as deviceSlotFileKey, C as saveConfig, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync, P as formatBytes, V as deviceSlotKey, _ as loadConfig, w as setDevice } from "./config-BktkY_zC.mjs";
3
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-BF5AR2dL.mjs";
4
+ import { L as workspaceDevServerMode } from "./project-BUu6Is4k.mjs";
5
+ import { o as workspaceLinks } from "./stim-desktop-6Dqp-gjX.mjs";
6
+ import { i as androidDataFreeBytes, ot as trimAndroidCaches, tt as resetAdoptedAvd, u as androidToolCwd } from "./android-DTAcRwBC.mjs";
7
+ import { c as pidExists, f as signalProcessTree } from "./metro-CjC10t6E.mjs";
8
+ import { $t as LAUNCH_BUNDLING, Dn as installConflictKind, Nn as restartedAppNote, cn as unattributedLaunchLines, en as LAUNCH_FATAL, in as VERIFY_TIMEOUT_MS, ln as unverifiedLaunchLines, mn as ADB_INSTALL_TIMEOUT_MS, rn as RELEASE_VERIFY_WAIT_MS, tn as LAUNCH_UNVERIFIED, vn as androidAppProcess, yn as androidDevClientUrl } from "./budget-k2mZGvvk.mjs";
9
+ import { O as teardownOwnedAvd } from "./workspaces-g2lhdBXF.mjs";
10
+ import { b as providerUploadOutcome } from "./build-cache-DrXNCy3T.mjs";
11
+ import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-BjYvMNX_.mjs";
12
+ import { t as recordPhoneReverse } from "./phone-reverses-lmj6kcPm.mjs";
13
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-CYCEhfBY.mjs";
14
14
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
15
- import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-ogEeJ62K.mjs";
16
- import { a as printNativeCrashReport, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-B1Mj_-7h.mjs";
17
- import { i as launchOutcomeRecord } from "./native-runtime-B9w_Qyz3.mjs";
18
- import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-Cxj9CmII.mjs";
19
- import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-CR2vk2cj.mjs";
15
+ import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-BmvIl7bI.mjs";
16
+ import { a as printNativeCrashReport, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-BOOm9Db7.mjs";
17
+ import { f as settleFingerprintCheck } from "./prebuild-gmouvmJZ.mjs";
18
+ import { i as launchOutcomeRecord } from "./native-runtime-Dq3RBcON.mjs";
19
+ import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-BGSCBoib.mjs";
20
+ import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-7F5hEwQJ.mjs";
20
21
  import { mkdirSync, openSync, statSync } from "node:fs";
21
22
  import { basename, join } from "node:path";
22
23
  import { ambientEnv } from "@stim-cli/core";
@@ -186,12 +187,12 @@ async function verifyAndroidProcessRun({ operation, root, slot, remoteDevice, ve
186
187
  phase("", chalk.yellow(`${embeddedJavaScript ? "A release process" : "The app process"} exited before readiness. Run \`stim logs --errors\` for captured crash reports, or \`stim logs --source device\` for the full device output.`));
187
188
  return { state: LAUNCH_FATAL };
188
189
  }
189
- async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, verifyLaunched, serial, androidPackage, metroCheck, logsDir, launchedAt, metroPort, isExpo, physical, device, scheme, component = null, phase, enterActivity }) {
190
- const runCommand = nativeRunCommand("android", slot, {
190
+ async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, verifyLaunched, serial, androidPackage, metroCheck, logsDir, launchedAt, metroPort, isExpo, physical, device, scheme, component = null, phase, enterActivity, hostedLogs, hostedRunCommand }) {
191
+ const runCommand = hostedRunCommand ?? nativeRunCommand("android", slot, {
191
192
  physical,
192
193
  deviceId: serial
193
194
  });
194
- const readNativeCrashes = () => remoteDevice ? [] : captureNativeCrashes({
195
+ const readNativeCrashes = () => hostedLogs ? hostedLogs.readNativeCrashes() : remoteDevice ? [] : captureNativeCrashes({
195
196
  root,
196
197
  slot,
197
198
  platform: "android",
@@ -216,7 +217,9 @@ async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, veri
216
217
  platform: "android",
217
218
  mode: workspaceDevServerMode(root, isExpo),
218
219
  readNativeCrashes,
219
- processAlive: async () => {
220
+ readDeviceRecords: hostedLogs?.readDeviceRecords,
221
+ deviceLogsThrough: hostedLogs?.deviceLogsThrough,
222
+ processAlive: hostedLogs ? null : async () => {
220
223
  const running = await androidAppProcess(serial, androidPackage);
221
224
  return running.state === "unknown" ? null : running.state === "running";
222
225
  }
@@ -240,7 +243,7 @@ async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, veri
240
243
  phase("verify", chalk.red(`FATAL after ${formatDuration(verification.waitedMs ?? 0)}: ${reason}`));
241
244
  for (const line of launchErrorPreview(verification.errors ?? [], root)) phase("", chalk.red(line));
242
245
  if (verification.processAlive === false && !verification.errors?.some((record) => record.event === "native_crash")) phase("logs", "No attributable native crash report captured yet. Run `stim logs --errors` again for delayed reports, or `stim logs --source device` for available output.");
243
- if (nativeFatal || verification.processAlive === false) phase("remedy", chalk.yellow(`Fix the crash, then run \`${runCommand}\` again; it force-stops a crashed process that remains alive behind the system crash dialog. Metro reload cannot recover it.`));
246
+ if (nativeFatal || verification.processAlive === false) phase("remedy", chalk.yellow(hostedRunCommand ? `Fix the crash, then run \`${runCommand}\` again. Metro reload cannot recover it.` : `Fix the crash, then run \`${runCommand}\` again; it force-stops a crashed process that remains alive behind the system crash dialog. Metro reload cannot recover it.`));
244
247
  else if (verification.processAlive === true && metroPort !== null) phase("remedy", chalk.yellow(`The native app is still running. ${deliveryFailed ? "Check the Metro logs and device connection, then" : "Fix the JavaScript or TypeScript error, then"} run \`stim reload android\`. Do not run \`${runCommand}\` unless native inputs changed or the app process exits.`));
245
248
  return { state: LAUNCH_FATAL };
246
249
  }
@@ -288,7 +291,8 @@ async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, veri
288
291
  component,
289
292
  devClientUrl: scheme ? androidDevClientUrl(scheme, metroPort ?? 8081, physical) : null,
290
293
  devClient: Boolean(scheme),
291
- mode: workspaceDevServerMode(root, isExpo)
294
+ mode: workspaceDevServerMode(root, isExpo),
295
+ remote: Boolean(hostedLogs)
292
296
  })) phase("", chalk.yellow(line));
293
297
  return { state: LAUNCH_UNVERIFIED };
294
298
  }
@@ -374,7 +378,7 @@ async function resolveInstallSerial({ root, slot, device, physical, remoteDevice
374
378
  });
375
379
  return resolved.serial;
376
380
  }
377
- async function finishAndroidRun({ operation, runtime, runtimePreparation, lease, releaseLease, root, slot, json, metroCheck, useBuildCache, variant, release, isExpo, metroPort, logsDir, emuLog, device, physical, remoteDevice, bootPromise, resolveAvdSerial, waitForDeviceBoot, bootDuration, bootPending, apkPath, androidPackage: initialPackage, androidPackageProblem, record, waitedForBuild, ccache, uploadPending, providerUpload, providerName, remote, abandonedRemote: remoteWasAbandoned, started, startedAt, writer, phase, fail, readApkPackage, readProjectPackage, packageRemedy, install, launch, launchRelease, resolveDevClientScheme, verifyLaunched, verifyReleaseLaunched, spawn, kill, pidAlive, verifyCollector, writeLaunch, recordBuild, now, out, emit, recordRun, reclaimed, devServer, enterPhase, enterActivity, rebootDevice, dataFreeBytes = androidDataFreeBytes, trimCaches = trimAndroidCaches, wipeDevice = teardownOwnedAvd }) {
381
+ async function finishAndroidRun({ operation, runtime, runtimePreparation, lease, releaseLease, root, slot, json, metroCheck, useBuildCache, variant, release, isExpo, metroPort, logsDir, emuLog, device, physical, remoteDevice, bootPromise, resolveAvdSerial, waitForDeviceBoot, bootDuration, bootPending, apkPath, androidPackage: initialPackage, androidPackageProblem, record, waitedForBuild, ccache, uploadPending, fingerprintCheck, providerUpload, providerName, remote, abandonedRemote: remoteWasAbandoned, started, startedAt, writer, phase, fail, readApkPackage, readProjectPackage, packageRemedy, install, launch, launchRelease, resolveDevClientScheme, verifyLaunched, verifyReleaseLaunched, spawn, kill, pidAlive, verifyCollector, writeLaunch, recordBuild, now, out, emit, recordRun, reclaimed, devServer, enterPhase, enterActivity, rebootDevice, dataFreeBytes = androidDataFreeBytes, trimCaches = trimAndroidCaches, wipeDevice = teardownOwnedAvd }) {
378
382
  const { env, signal } = operation ?? {};
379
383
  let androidPackage = initialPackage;
380
384
  let leaseWarned = false;
@@ -590,6 +594,7 @@ async function finishAndroidRun({ operation, runtime, runtimePreparation, lease,
590
594
  const uploadWasAbandoned = await finishAndroidUpload(uploadPending, remote, phase);
591
595
  const providerOutcome = providerUploadOutcome(providerUpload ? await providerUpload : null, providerName, env);
592
596
  if (providerOutcome) phase("cache", providerOutcome.warn ? chalk.yellow(providerOutcome.line) : providerOutcome.line);
597
+ await settleFingerprintCheck(fingerprintCheck, "android", (line) => phase("fingerprint", chalk.yellow(line)), (entry) => writer.write(entry));
593
598
  persistLastBuild({
594
599
  recordBuild,
595
600
  root,
@@ -762,4 +767,4 @@ function diagnoseBootFailure(booted, logFile, runCommand, physical) {
762
767
  };
763
768
  }
764
769
  //#endregion
765
- export { killPreviousCollector as a, collectorLogFile as i, androidProcessRuntime as n, startCollector as o, finishAndroidRun as r, androidMetroRuntime as t };
770
+ export { collectorLogFile as a, verifyAndroidMetroRun as i, androidProcessRuntime as n, killPreviousCollector as o, finishAndroidRun as r, startCollector as s, androidMetroRuntime as t };
@@ -1,18 +1,13 @@
1
1
  import { S as process_identity_exports } from "./exec-VFRpu1iA.mjs";
2
- import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
3
- import { G as projectDeviceSlots, _ as loadConfig$1 } from "./config-BZhXY15H.mjs";
4
- import { n as pullHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-CWKGYWNX.mjs";
5
- import { l as phaseLine } from "./command-output-BBvS1H6v.mjs";
6
- import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-BpjwrQXU.mjs";
7
- import { l as connectHost } from "./hosted-client-rsRqysJc.mjs";
8
- import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-CT9nV5SP.mjs";
9
- import "./hosted-macos-d0pv9Tth.mjs";
10
- import { i as captureWorkspaceCrashes } from "./error-diagnostics-B1Mj_-7h.mjs";
2
+ import { k as workspaceLogsDir$1 } from "./workspace-state-pUg3_RRA.mjs";
3
+ import { G as projectDeviceSlots, _ as loadConfig$1 } from "./config-BktkY_zC.mjs";
4
+ import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-Lnb_EoRY.mjs";
5
+ import { i as captureWorkspaceCrashes } from "./error-diagnostics-BOOm9Db7.mjs";
6
+ import { n as followHostedLogs, r as syncHostedLogs } from "./hosted-logs-sync-B0pvmOk-.mjs";
11
7
  import { readdirSync, statSync, watch } from "node:fs";
12
8
  import { homedir } from "node:os";
13
9
  import { dirname, join, relative, resolve, sep } from "node:path";
14
- import { ambientWrite, configDir } from "@stim-cli/core";
15
- import { LEVELS, SOURCES, agentDeviceStateDirsAsync, buildCriteria, compileGrep, createAsyncAgentActionReader, followLogs, logFiles, openLogDir, parseSince, readMacosRecord, recordMatches, workspaceStateFile } from "@stim-cli/core/state";
10
+ import { LEVELS, SOURCES, agentDeviceStateDirsAsync, buildCriteria, compileGrep, createAsyncAgentActionReader, followLogs, logFiles, openLogDir, parseSince, readMacosRecord, recordMatches } from "@stim-cli/core/state";
16
11
  import { setImmediate } from "node:timers/promises";
17
12
  import { realpath } from "node:fs/promises";
18
13
  //#region src/devices/agent-actions.ts
@@ -221,166 +216,6 @@ function followAgentActions(context, read, onRecord) {
221
216
  return stop;
222
217
  }
223
218
  //#endregion
224
- //#region src/device-host/hosted-logs-sync.ts
225
- const WATCH_RECHECK_MS = 100;
226
- function warn(context, machine, error) {
227
- const text = `${warning(machine, error)}\n`;
228
- if (context) context.output("stderr", text);
229
- else ambientWrite("stderr", text);
230
- }
231
- function warning(machine, error) {
232
- const message = error.message.replace(/\.$/, "");
233
- const hint = message.includes("refused device-host.logs.query") ? ` If ${machine} runs an older stim-server, update it.` : "";
234
- return phaseLine("device", `Could not read the app's logs from ${machine}: ${message}. Showing the logs already copied here.${hint}`);
235
- }
236
- async function syncHostedMacosLogs(root, placement, slot, warnings, platform = "ios", context) {
237
- let host;
238
- const cancel = () => host?.connection.close();
239
- context?.signal.addEventListener("abort", cancel, { once: true });
240
- try {
241
- host = await connectHost(placement.machine, void 0, false, context?.signal);
242
- if (slot !== void 0) await pullHostedNativeLogs(root, slot, placement, host, false, platform, context?.signal);
243
- else await pullHostedMacosLogs(root, placement, host, void 0, void 0, false, context?.signal);
244
- return true;
245
- } catch (error) {
246
- context?.signal.throwIfAborted();
247
- if (!warnings?.has(placement.machine)) {
248
- warn(context, placement.machine, error);
249
- warnings?.add(placement.machine);
250
- }
251
- return false;
252
- } finally {
253
- context?.signal.removeEventListener("abort", cancel);
254
- host?.connection.close();
255
- }
256
- }
257
- function followHostedMacosLogs(root, { failing = false, intervalMs = 500, retryMs = 5e3, slot, platform = "ios", context } = {}) {
258
- let host;
259
- const controller = new AbortController();
260
- const signal = context ? AbortSignal.any([context.signal, controller.signal]) : controller.signal;
261
- const cancel = () => host?.connection.close();
262
- signal.addEventListener("abort", cancel, { once: true });
263
- let retryAt = 0;
264
- let stopped = false;
265
- let running = false;
266
- const tick = async () => {
267
- if (running || stopped || signal.aborted || Date.now() < retryAt) return;
268
- running = true;
269
- try {
270
- const placement = slot !== void 0 ? (platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))[slot] : readMacosRecord(root)?.host;
271
- if (!placement) {
272
- host?.connection.close();
273
- host = void 0;
274
- return;
275
- }
276
- host ??= await connectHost(placement.machine, void 0, false, signal);
277
- if (slot !== void 0) await pullHostedNativeLogs(root, slot, placement, host, false, platform, signal);
278
- else await pullHostedMacosLogs(root, placement, host, void 0, void 0, false, signal);
279
- failing = false;
280
- } catch (error) {
281
- host?.connection.close();
282
- host = void 0;
283
- if (signal.aborted) return;
284
- if (!failing) warn(context, (slot !== void 0 ? (platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))[slot] : readMacosRecord(root)?.host)?.machine ?? "the host", error);
285
- failing = true;
286
- retryAt = Date.now() + retryMs;
287
- } finally {
288
- running = false;
289
- }
290
- };
291
- const timer = setInterval(() => void tick(), intervalMs);
292
- return () => {
293
- stopped = true;
294
- controller.abort();
295
- signal.removeEventListener("abort", cancel);
296
- clearInterval(timer);
297
- host?.connection.close();
298
- };
299
- }
300
- async function syncHostedLogs(root, context) {
301
- const macos = readMacosRecord(root)?.host;
302
- const warnings = /* @__PURE__ */ new Set();
303
- return (await Promise.all([
304
- ...macos ? [syncHostedMacosLogs(root, macos, void 0, warnings, "ios", context)] : [],
305
- ...Object.entries(readHostedIos(root)).map(([slot, placement]) => syncHostedMacosLogs(root, placement, slot, warnings, "ios", context)),
306
- ...Object.entries(readHostedAndroid(root)).map(([slot, placement]) => syncHostedMacosLogs(root, placement, slot, warnings, "android", context))
307
- ])).every(Boolean);
308
- }
309
- function followHostedLogs(root, failing, context) {
310
- const stops = /* @__PURE__ */ new Map();
311
- let closed = false;
312
- const refresh = () => {
313
- if (closed) return;
314
- const active = /* @__PURE__ */ new Set();
315
- if (readMacosRecord(root)?.host) {
316
- active.add("macos");
317
- if (!stops.has("macos")) stops.set("macos", followHostedMacosLogs(root, {
318
- failing,
319
- context
320
- }));
321
- }
322
- for (const platform of ["ios", "android"]) for (const slot of Object.keys(platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))) {
323
- const key = `${platform}:${slot}`;
324
- active.add(key);
325
- if (!stops.has(key)) stops.set(key, followHostedMacosLogs(root, {
326
- failing,
327
- slot,
328
- platform,
329
- context
330
- }));
331
- }
332
- for (const [key, stop] of stops) {
333
- if (active.has(key)) continue;
334
- stop();
335
- stops.delete(key);
336
- }
337
- };
338
- const stateFile = workspaceStateFile(root);
339
- const home = resolve(configDir());
340
- let watcher = null;
341
- let recheck;
342
- const observe = () => {
343
- if (closed) return;
344
- watcher?.close();
345
- watcher = null;
346
- clearTimeout(recheck);
347
- let directory = dirname(stateFile);
348
- for (;;) try {
349
- const entry = relative(directory, stateFile).split(sep)[0];
350
- const next = watch(directory, (_event, name) => {
351
- if (name !== null && name.toString() !== entry) return;
352
- if (directory !== dirname(stateFile)) observe();
353
- refresh();
354
- });
355
- next.on("error", () => {
356
- next.close();
357
- if (watcher === next) watcher = null;
358
- });
359
- next.unref();
360
- watcher = next;
361
- recheck = setTimeout(refresh, WATCH_RECHECK_MS);
362
- recheck.unref();
363
- return;
364
- } catch (error) {
365
- if (directory === home || !(error instanceof Error && "code" in error && error.code === "ENOENT")) return;
366
- directory = dirname(directory);
367
- }
368
- };
369
- observe();
370
- refresh();
371
- const timer = setInterval(() => {
372
- observe();
373
- refresh();
374
- }, 1e4);
375
- return () => {
376
- closed = true;
377
- watcher?.close();
378
- clearTimeout(recheck);
379
- clearInterval(timer);
380
- for (const stop of stops.values()) stop();
381
- };
382
- }
383
- //#endregion
384
219
  //#region src/engine/logs.ts
385
220
  async function openWorkspaceLogs(context, options = {}, follow = false) {
386
221
  context.signal.throwIfAborted();
@@ -429,8 +264,9 @@ async function readWorkspaceLogs(context, options = {}) {
429
264
  await view.close();
430
265
  }
431
266
  }
267
+ const WORKSPACE_SOURCES = SOURCES.filter((source) => source !== "gc");
432
268
  function validateLogOptions(options) {
433
- const invalid = (options.tail !== void 0 && (!Number.isSafeInteger(options.tail) || options.tail < 0) ? "tail must be a non-negative integer." : options.sources?.some((source) => !SOURCES.includes(source)) ? `sources must contain only ${SOURCES.join(", ")}.` : options.minLevel !== void 0 && !LEVELS.includes(options.minLevel) ? `minLevel must be one of ${LEVELS.join(", ")}.` : void 0) ?? (options.since !== void 0 ? parseSince(options.since).error : void 0) ?? (options.grep !== void 0 ? compileGrep(options.grep).error : void 0);
269
+ const invalid = (options.tail !== void 0 && (!Number.isSafeInteger(options.tail) || options.tail < 0) ? "tail must be a non-negative integer." : options.sources?.some((source) => !WORKSPACE_SOURCES.includes(source)) ? `sources must contain only ${WORKSPACE_SOURCES.join(", ")}.` : options.minLevel !== void 0 && !LEVELS.includes(options.minLevel) ? `minLevel must be one of ${LEVELS.join(", ")}.` : void 0) ?? (options.since !== void 0 ? parseSince(options.since).error : void 0) ?? (options.grep !== void 0 ? compileGrep(options.grep).error : void 0);
434
270
  if (invalid) throw Object.assign(new Error(invalid), { code: "STIM_BAD_ARG" });
435
271
  }
436
272
  async function followWorkspaceLogs(context, options, onRecord, onBackfill) {
@@ -483,4 +319,4 @@ async function followWorkspaceLogs(context, options, onRecord, onBackfill) {
483
319
  return stop;
484
320
  }
485
321
  //#endregion
486
- export { followAgentActions as a, followHostedLogs as i, openWorkspaceLogs as n, readWorkspaceLogs as r, followWorkspaceLogs as t };
322
+ export { followAgentActions as i, openWorkspaceLogs as n, readWorkspaceLogs as r, followWorkspaceLogs as t };