stim 1.23.1 → 1.24.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 (169) hide show
  1. package/README.md +3 -2
  2. package/dist/{acquire-artifact-BzYRDgaP.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
  3. package/dist/{act-vxiMwdf5.mjs → act-Cyvm8xYc.mjs} +40 -25
  4. package/dist/{activity-BpWUPgUm.mjs → activity-Dq3ZcdD8.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
  6. package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
  7. package/dist/{android-DtfRGLcc.mjs → android-BZppyPe_.mjs} +66 -46
  8. package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
  9. package/dist/{android-CLi6DSiS.mjs → android-DcztblCT.mjs} +5 -5
  10. package/dist/{android-cas-ngferVq2.mjs → android-cas-BtCOrNqb.mjs} +3 -3
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/api.d.mts +21 -4
  13. package/dist/api.mjs +32 -31
  14. package/dist/{artifact-Xvgibgzq.mjs → artifact-BR5VNArK.mjs} +17 -16
  15. package/dist/{artifact-DBI3DALs.mjs → artifact-Bdt_n9Jc.mjs} +17 -16
  16. package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
  17. package/dist/{browser-web-BJN9ZHxB.mjs → browser-web-ycg9qWB8.mjs} +16 -17
  18. package/dist/{budget-3ivAK99e.mjs → budget-dPGuhNai.mjs} +101 -40
  19. package/dist/{build-Dv9s8Fz-.mjs → build-CaF574eS.mjs} +31 -28
  20. package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
  21. package/dist/{build-plan-BmbdHQbr.mjs → build-plan-JsDUq4w1.mjs} +8 -7
  22. package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-CH2EWGPB.mjs → ccache-CCn1S6qG.mjs} +6 -6
  25. package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
  26. package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
  27. package/dist/{cli-BkK6Wr5i.mjs → cli-xqAidP7O.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/{client-B4MMzfo_.mjs → client-18-ZowoT.mjs} +254 -28
  30. package/dist/collector-run.mjs +6 -6
  31. package/dist/{command-output-YKGWivpG.mjs → command-output-DxC0k2rk.mjs} +3 -2
  32. package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
  33. package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
  34. package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-C56ll9hY.mjs} +2 -2
  35. package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
  36. package/dist/{dev-client-BFxiDpkf.mjs → dev-client-w_fok0Ek.mjs} +3 -3
  37. package/dist/{device-B7ljwccX.mjs → device-4RUugw5X.mjs} +16 -16
  38. package/dist/{device-CiNYxqp6.mjs → device-BktRGdjS.mjs} +40 -44
  39. package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
  40. package/dist/device-host-worker.mjs +17 -17
  41. package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DzpSlZyd.mjs} +23 -52
  42. package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
  43. package/dist/{device-pool-B4iOXIrD.mjs → device-pool-CgBHk401.mjs} +3 -3
  44. package/dist/{doctor-DRu-8ld6.mjs → doctor-BZ6oxNum.mjs} +1 -1
  45. package/dist/{doctor-HUC1igzw.mjs → doctor-C33AzVfR.mjs} +28 -28
  46. package/dist/{doctor-C6t4Maue.mjs → doctor-DZgpqR6J.mjs} +14 -14
  47. package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
  48. package/dist/doctor-fingerprint.mjs +1 -1
  49. package/dist/{doctor-watchman-iGBpC6KM.mjs → doctor-watchman-B453A231.mjs} +5 -5
  50. package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CxKUNHsb.mjs} +4 -4
  51. package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
  52. package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
  53. package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
  54. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  55. package/dist/{gc-dDE4QPVu.mjs → gc-DDWEAj0w.mjs} +2 -2
  56. package/dist/{gc-BW8E1uSC.mjs → gc-yVKpAOKM.mjs} +205 -28
  57. package/dist/{guide-DYYEO3Wz.mjs → guide-Bggftwc5.mjs} +222 -59
  58. package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-D4dweBof.mjs} +4 -4
  59. package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
  60. package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
  61. package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
  62. package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
  63. package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-Doxbfzem.mjs} +58 -11
  64. package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
  65. package/dist/{ios-CWjqfSm_.mjs → ios-B1FXRCMX.mjs} +71 -44
  66. package/dist/{ios-DTOYZGMJ.mjs → ios-BItP6lkn.mjs} +8 -8
  67. package/dist/{ios-hcBpnEGk.mjs → ios-CVUFFZ6C.mjs} +70 -13
  68. package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
  69. package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
  70. package/dist/{ios-device-DFGuwF4U.mjs → ios-device-BI38NFFH.mjs} +3 -3
  71. package/dist/{ios-project-CSZYI1iu.mjs → ios-project-KYqeJURj.mjs} +5 -5
  72. package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
  73. package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-DlElquYD.mjs} +15 -7
  74. package/dist/{js-swap-BSBHldmm.mjs → js-swap-BvrQvXHY.mjs} +7 -6
  75. package/dist/{launch-CP2wDCVd.mjs → launch-BVlyQw3T.mjs} +51 -49
  76. package/dist/{launch-D-zq8SHG.mjs → launch-SfzGH_s9.mjs} +48 -29
  77. package/dist/{logs-pNvA2hHK.mjs → logs-DXE32kyb.mjs} +16 -9
  78. package/dist/{logs-By5aw3g9.mjs → logs-ovlU7m7N.mjs} +8 -6
  79. package/dist/{macos-CPMahOC2.mjs → macos-B3BveDrU.mjs} +1 -1
  80. package/dist/{macos-C67FZ2ft.mjs → macos-CCfhb-jT.mjs} +49 -42
  81. package/dist/macos-run.mjs +1 -1
  82. package/dist/maintenance-run.mjs +7 -7
  83. package/dist/{metro-DiXtA3Ty.mjs → metro-Bu8LBfzS.mjs} +4 -4
  84. package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-DtsOy-0P.mjs} +3 -4
  85. package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BWDuU5oQ.mjs} +3 -3
  86. package/dist/{native-android-_MWSs3PP.mjs → native-android-96BBizbq.mjs} +17 -17
  87. package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BcLYBZil.mjs} +5 -5
  88. package/dist/{native-run-Dv88i0aU.mjs → native-run-BmH7U8pr.mjs} +6 -6
  89. package/dist/{native-runtime-DBRfY_PN.mjs → native-runtime-DgtJkzIa.mjs} +10 -9
  90. package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
  91. package/dist/{native-xcode-inputs-CqViUh3r.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
  92. package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
  93. package/dist/offload-worker.d.mts +7 -2
  94. package/dist/offload-worker.mjs +75 -41
  95. package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
  96. package/dist/{ownership-C5fo5Edb.mjs → ownership-DxlZGDcV.mjs} +3 -3
  97. package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
  98. package/dist/phone-reverses-BdsdesVF.mjs +57 -0
  99. package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DUvqqsB-.mjs} +1 -1
  100. package/dist/{plan-placement-cr0fEU7b.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
  101. package/dist/{ports-DpXjKkSV.mjs → ports-D-E_OiAO.mjs} +3 -3
  102. package/dist/{prebuild-BligW0QS.mjs → prebuild-DmVCf5xb.mjs} +14 -9
  103. package/dist/{project-DhCtQWWU.mjs → project-Dz-hWkb-.mjs} +21 -17
  104. package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
  105. package/dist/pull-requests.mjs +1 -1
  106. package/dist/{react-native-android-ZlhQfhvq.mjs → react-native-android-DOinxgwB.mjs} +75 -32
  107. package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
  108. package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
  109. package/dist/{react-native-ios-C5W0SA6f.mjs → react-native-ios-D5zTIuH8.mjs} +38 -22
  110. package/dist/{recordings-CQmfzAh7.mjs → recordings-CdPwYwvs.mjs} +1 -1
  111. package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
  112. package/dist/{reload-COJWTbae.mjs → reload-C1TTVesC.mjs} +144 -42
  113. package/dist/{reload-QcwnYLYV.mjs → reload-Ck9RJeSq.mjs} +1 -1
  114. package/dist/{remote-DR8qUERM.mjs → remote-DEZ7AOVq.mjs} +7 -7
  115. package/dist/{result-utnBea7x.mjs → result-DqBrb12U.mjs} +40 -17
  116. package/dist/{run-DidHghD1.mjs → run-BIwoU44q.mjs} +2 -2
  117. package/dist/{selection-DSMbWEX2.mjs → selection-BLtvaqxc.mjs} +11 -5
  118. package/dist/{server-bare-CafzuyFB.mjs → server-bare-Z1ToVLPn.mjs} +2 -2
  119. package/dist/{server-command-B9o92sLM.mjs → server-command-C0pmjNdG.mjs} +5 -5
  120. package/dist/server-expo-CEntXzRw.mjs +2 -0
  121. package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Tt_hLRpy.mjs} +8 -5
  122. package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
  123. package/dist/{settings-PfJx8uK1.mjs → settings-kkt0vP4w.mjs} +1 -1
  124. package/dist/{settings-write-Chuy7Cte.mjs → settings-write--gj6MACV.mjs} +7 -7
  125. package/dist/settings.schema.json +13 -0
  126. package/dist/{simslim-BNckWpXi.mjs → simslim-CdWKT3vA.mjs} +2 -2
  127. package/dist/{slot-launch-B7AuoWJv.mjs → slot-launch-A1BgotaM.mjs} +6 -6
  128. package/dist/{stage-C4u17aES.mjs → stage-ERTMh88n.mjs} +2 -3
  129. package/dist/{start-CU8mCPC7.mjs → start-BKGrEhzG.mjs} +75 -35
  130. package/dist/{start-BL_BsiWt.mjs → start-Bmg_qmHi.mjs} +1 -1
  131. package/dist/{state--smjFSTL.mjs → state-B1ig0Kqy.mjs} +4 -4
  132. package/dist/{state-08I3hw3_.mjs → state-BfAltYJP.mjs} +2 -2
  133. package/dist/{stats-CO6sK0Nh.mjs → stats-B-ckuiUg.mjs} +5 -5
  134. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  135. package/dist/{status-_WPHzVft.mjs → status-DfFp6a76.mjs} +24 -24
  136. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  137. package/dist/{status-CrJutl6-.mjs → status-Pw-807f0.mjs} +1 -1
  138. package/dist/{status-watch-BHFasOZN.mjs → status-watch-XC7F-AMf.mjs} +5 -5
  139. package/dist/status-worker.mjs +1 -1
  140. package/dist/stim-clonefile.c +18 -0
  141. package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
  142. package/dist/{stop-iuFHjUST.mjs → stop-BFu7X_Do.mjs} +2 -2
  143. package/dist/{stop-BJ06ipTZ.mjs → stop-CL1kDHds.mjs} +55 -21
  144. package/dist/{stop-CR5689oB.mjs → stop-DhclRwOO.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +16 -16
  146. package/dist/{support-TWuQlHQo.mjs → support-B1W-hmC2.mjs} +8 -8
  147. package/dist/{support-CbXPbUMJ.mjs → support-B3tzVhKn.mjs} +6 -6
  148. package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-BWYPj9Sn.mjs} +4 -4
  149. package/dist/{swiftpm-macos-DbwGCpZg.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
  150. package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-BjgKdoEf.mjs} +1 -1
  151. package/dist/{toolchain-B9hCFCQw.mjs → toolchain-D3bmRMia.mjs} +57 -36
  152. package/dist/trigger-BLsHgAGR.mjs +2 -0
  153. package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
  154. package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-ol0ZypEu.mjs} +6 -6
  155. package/dist/{web-DRF_oFXk.mjs → web-BH7peScT.mjs} +12 -10
  156. package/dist/web-BdOFlTJr.mjs +2 -0
  157. package/dist/web-run.mjs +8 -9
  158. package/dist/windows-report.mjs +12 -1
  159. package/dist/windows-report.ps1 +1 -1
  160. package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CeBpIZgr.mjs} +11 -4
  161. package/dist/{workspaces-e41xsjKr.mjs → workspaces-CSV2Orf4.mjs} +36 -32
  162. package/dist/{worktree-BEwxVwKF.mjs → worktree-DEDUzO_L.mjs} +1 -1
  163. package/dist/{worktree-B4Nj3EGS.mjs → worktree-Dw8kfacb.mjs} +324 -99
  164. package/dist/{xcode-Rq744mBF.mjs → xcode-DHu41qQ4.mjs} +41 -27
  165. package/package.json +7 -7
  166. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
  167. package/dist/server-expo-Ddr8cG_c.mjs +0 -2
  168. package/dist/trigger-yb_nFzPF.mjs +0 -2
  169. package/dist/web-kDE9Myoy.mjs +0 -2
@@ -1,29 +1,29 @@
1
- import { _ as reportSignal, t as getExecutor, y as trackReportResource } from "./exec-DEoAhcze.mjs";
1
+ import { C as reportSignal, T as trackReportResource, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { i as sharedBuildCache, u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
3
- import { _ as loadConfig$1, nt as realIo, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
4
- import { d as quotedPath, u as plural } from "./command-output-YKGWivpG.mjs";
5
- import { l as gitQuietAsync, o as git } from "./operation-exec-BW0em61G.mjs";
6
- import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
7
- import { D as mergeSettingsLayers, Et as listWorktreesAsync, Gt as temporaryRoot, Ht as makeTemporaryDirectory, I as projectSettingsContext, It as resolveSourceCheckoutAsync, K as resolveIosProjectDir, Mt as repoRoot, Nt as repoRootAsync, Ot as locallyKnownUpstreamAsync, Q as settingOrigin, T as iosSimSlimProfileSetting, U as remoteIosSetting, V as remoteAndroidSetting, Vt as filesystemDevice, W as resolveAndroidLayout, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, at as webSettings, et as settingShapeErrors, ht as dirtyFingerprintFiles, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, it as unknownSettingKeys, m as defaultAndroidLayout, nt as settingsLayers, r as PATH_SETTINGS, tt as settingValueAt, vt as gitCommonDirAsync } from "./settings-C7O8A6ZI.mjs";
8
- import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-DhCtQWWU.mjs";
9
- import { Bn as checkEasAuth$1, Gn as providerFromConfig, Ht as readInstalledEasCliVersionAsync, Wn as ownerFromConfig, er as MIN_EAS_CLI_SIMULATOR_VERSION, nr as easCliUpgradeRemedy, qn as resolveEasCliBin, tr as easCliSupport } from "./budget-3ivAK99e.mjs";
10
- import { L as listBuildSlots } from "./workspaces-e41xsjKr.mjs";
11
- import { N as listBuildLocks } from "./activity-BpWUPgUm.mjs";
12
- import { a as diffFingerprintSources, l as fingerprintProject } from "./build-cache-Dv7RN200.mjs";
13
- import { _t as parkedMaxSetting, dt as POOL_SETTING_REMEDY, k as hostSystemImageArch, o as androidHome } from "./android-C7sVmyI9.mjs";
14
- import { F as readHostMemoryPressureAsync, M as hostMemoryPressureAdvice } from "./ios-hcBpnEGk.mjs";
3
+ import { _ as loadConfig$1, nt as realIo, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-BZhXY15H.mjs";
4
+ import { d as quotedPath, u as plural } from "./command-output-DxC0k2rk.mjs";
5
+ import { l as gitQuietAsync, o as git } from "./operation-exec-CUZifp6Z.mjs";
6
+ import { r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
7
+ import { D as mergeSettingsLayers, Et as listWorktreesAsync, Gt as temporaryRoot, Ht as makeTemporaryDirectory, I as projectSettingsContext, It as resolveSourceCheckoutAsync, K as resolveIosProjectDir, Mt as repoRoot, Nt as repoRootAsync, Ot as locallyKnownUpstreamAsync, Q as settingOrigin, T as iosSimSlimProfileSetting, U as remoteIosSetting, V as remoteAndroidSetting, Vt as filesystemDevice, W as resolveAndroidLayout, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, at as webSettings, et as settingShapeErrors, ht as dirtyFingerprintFiles, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, it as unknownSettingKeys, m as defaultAndroidLayout, nt as settingsLayers, r as PATH_SETTINGS, tt as settingValueAt, vt as gitCommonDirAsync } from "./settings-RKwY33wv.mjs";
8
+ import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-Dz-hWkb-.mjs";
9
+ import { ft as POOL_SETTING_REMEDY, k as hostSystemImageArch, o as androidHome, vt as parkedMaxSetting } from "./android-882m4hxX.mjs";
10
+ import { Hn as checkEasAuth$1, Kn as ownerFromConfig, Wt as readInstalledEasCliVersionAsync, Yn as resolveEasCliBin, ir as easCliUpgradeRemedy, nr as MIN_EAS_CLI_SIMULATOR_VERSION, qn as providerFromConfig, rr as easCliSupport } from "./budget-dPGuhNai.mjs";
11
+ import { R as listBuildSlots } from "./workspaces-CSV2Orf4.mjs";
12
+ import { N as listBuildLocks } from "./activity-Dq3ZcdD8.mjs";
13
+ import { d as fingerprintProject, o as diffFingerprintSources } from "./build-cache-HFUQ9eLz.mjs";
14
+ import { I as readHostMemoryPressureAsync, M as hostMemoryPressureAdvice } from "./ios-CVUFFZ6C.mjs";
15
15
  import { p as resolveOptimizations, u as compilerCacheFallbackMessage } from "./errors-ccaPc4ox.mjs";
16
- import { i as projectCmakeLauncher } from "./ccache-CH2EWGPB.mjs";
17
- import { x as podInstallCommand } from "./xcode-Rq744mBF.mjs";
18
- import { h as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-CelbTO_y.mjs";
19
- import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-DH0QsZYZ.mjs";
20
- import { t as readDoctorFingerprint } from "./doctor-fingerprint-DZLoYFVb.mjs";
21
- import { i as probeSigningIdentities } from "./ios-signing-BtAffm0A.mjs";
22
- import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-Bbw689-6.mjs";
23
- import { i as installedNpmTreeIsValidAsync, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-1I9KZT1Y.mjs";
24
- import { n as simslimIsOnPath } from "./simslim-BNckWpXi.mjs";
25
- import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-DMWSSvxq.mjs";
26
- import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-ngferVq2.mjs";
16
+ import { i as projectCmakeLauncher } from "./ccache-CCn1S6qG.mjs";
17
+ import { x as podInstallCommand } from "./xcode-DHu41qQ4.mjs";
18
+ import { g as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-AuCu-aAP.mjs";
19
+ import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-Ic-kdmEV.mjs";
20
+ import { t as readDoctorFingerprint } from "./doctor-fingerprint-zlujA1Gs.mjs";
21
+ import { i as probeSigningIdentities } from "./ios-signing-4c_qXvQm.mjs";
22
+ import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-BvV8ssI3.mjs";
23
+ import { i as installedNpmTreeIsValidAsync, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-C56ll9hY.mjs";
24
+ import { n as simslimIsOnPath } from "./simslim-CdWKT3vA.mjs";
25
+ import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-CxKUNHsb.mjs";
26
+ import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-BtCOrNqb.mjs";
27
27
  import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, rmSync } from "node:fs";
28
28
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
29
29
  import { LAST_BUILD_KEYS, isJsonObject, readBuildHistory, readJsonObject, readStats, settingDefinition } from "@stim-cli/core/state";
@@ -509,12 +509,12 @@ async function checkMainCheckout(projectRoot, { npmTreeValid, brokenPods = void
509
509
  podsState = "stale";
510
510
  }
511
511
  if (podsState) {
512
- const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot)}`;
512
+ const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot, iosRoot)}`;
513
513
  findings.push(finding("cost", `The source checkout CocoaPods state is ${podsState}`, `ios/Pods cannot be reused safely because its Manifest.lock ${podsState === "missing" ? "is absent" : "does not match ios/Podfile.lock"}.`, `Run \`${podCommand}\` before creating native worktrees, or let \`stim worktree warm --refresh\` run it from a linked worktree.`));
514
514
  }
515
515
  const broken = brokenPods === void 0 && existsSync$1(podsRoot) ? await brokenPodLinks(podsRoot) : brokenPods || [];
516
516
  if (broken.length) {
517
- const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot, "--clean-install")}`;
517
+ const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot, iosRoot, "--clean-install")}`;
518
518
  findings.push(finding("cost", "The source checkout CocoaPods state has broken links", `${broken.length} symlink${broken.length === 1 ? "" : "s"} under ios/Pods point to missing files. Worktrees copy these broken links and can fail during compilation. First: ${broken[0]}.`, `Run \`${podCommand}\` before creating native worktrees.`));
519
519
  }
520
520
  }
@@ -904,7 +904,7 @@ function checkAndroidPathRoom(projectRoot, platform, host, hostArch = process.ar
904
904
  if (!room) return null;
905
905
  return {
906
906
  code: "android-path-room",
907
- ...finding("cost", "The project path leaves no room for Android native object paths", `${androidPathRoomMessage(room)} \`stim android\` refuses to build here with STIM_PATH_TOO_LONG, because Gradle would fail deep inside ninja instead.`, androidPathRoomRemedy(room))
907
+ ...finding("cost", "The project path leaves no room for Android native object paths", `${androidPathRoomMessage(room)} \`stim android\` refuses to run an emulator here with STIM_PATH_TOO_LONG, before it prepares the device, because Gradle would fail deep inside ninja instead.`, androidPathRoomRemedy(room))
908
908
  };
909
909
  }
910
910
  function hasAndroidProject(layout) {
@@ -965,7 +965,7 @@ function countActiveBuilds() {
965
965
  function checkFingerprintParity({ projectHash, worktreeHash, changed = [], dirtyFiles = [] } = {}) {
966
966
  if (!projectHash || !worktreeHash || projectHash === worktreeHash) return null;
967
967
  const names = changed.slice(0, 3).join(", ");
968
- return finding("note", "This checkout does not fingerprint like a fresh worktree of HEAD", `A clean detached worktree of HEAD computes a different @expo/fingerprint hash than this checkout, so worktrees will MISS the cache entries this checkout fills (and vice versa) until the two agree.${changed.length ? ` The differing source${changed.length === 1 ? "" : "s"}: ${names}${changed.length > 3 ? ` (and ${changed.length - 3} more)` : ""}.` : ""} ${dirtyFiles.length ? `The likely cause is uncommitted changes to tracked fingerprint inputs -- git reports ${dirtyFiles.slice(0, 3).join(", ")}${dirtyFiles.length > 3 ? ` (and ${dirtyFiles.length - 3} more)` : ""} dirty in this checkout.` : "The likely cause is uncommitted changes to tracked fingerprint inputs (this check compared against a clean worktree of HEAD)."} (To measure this, doctor ran a real fingerprint twice and briefly created a temporary git worktree -- .git/worktrees metadata was touched and cleaned up.)`, "Commit the dirty fingerprint inputs, or list the build-irrelevant ones in .fingerprintignore (same syntax as .gitignore, at the project root; Stim already ignores android/local.properties and android/.idea). Only the ones that genuinely cannot change the native build belong there -- generated reports, local env files, a lockfile whose checksums embed absolute machine paths. Never ignore a real native input (a Podfile, a gradle file, the app config) to force a hit: that trades a slow build for a wrong one.");
968
+ return finding("note", "This checkout does not fingerprint like a fresh worktree of HEAD", `A clean detached worktree of HEAD computes a different @expo/fingerprint hash than this checkout, so worktrees will MISS the cache entries this checkout fills (and vice versa) until the two agree.${changed.length ? ` The differing source${changed.length === 1 ? "" : "s"}: ${names}${changed.length > 3 ? ` (and ${changed.length - 3} more)` : ""}.` : ""} ${dirtyFiles.length ? `The likely cause is uncommitted changes to tracked fingerprint inputs -- git reports ${dirtyFiles.slice(0, 3).join(", ")}${dirtyFiles.length > 3 ? ` (and ${dirtyFiles.length - 3} more)` : ""} dirty in this checkout.` : "The likely cause is uncommitted changes to tracked fingerprint inputs (this check compared against a clean worktree of HEAD)."} (To measure this, doctor ran a real fingerprint twice and briefly created a temporary git worktree -- .git/worktrees metadata was touched and cleaned up.)`, "Commit the dirty fingerprint inputs, or list the build-irrelevant ones in .fingerprintignore (same syntax as .gitignore, at the project root; Stim already ignores android/local.properties, android/.idea, *.xcodeproj/xcuserdata, and ios/main.jsbundle and ios/assets while a .gitignore pattern matches them). Only the ones that genuinely cannot change the native build belong there -- generated reports, local env files, a lockfile whose checksums embed absolute machine paths. Never ignore a real native input (a Podfile, a gradle file, the app config) to force a hit: that trades a slow build for a wrong one.");
969
969
  }
970
970
  function fingerprintConfigSkipped(root) {
971
971
  const file = ["fingerprint.config.js", "fingerprint.config.cjs"].find((name) => existsSync$1(join$1(root, name)));
@@ -1,17 +1,17 @@
1
- import { Y as doctorIo, _ as loadConfig$1, p as getProject } from "./config-DlrsduwG.mjs";
2
- import { f as refuseNoProject, l as phaseLine } from "./command-output-YKGWivpG.mjs";
3
- import { L as projectSettingsContextAsync, Mt as repoRoot } from "./settings-C7O8A6ZI.mjs";
4
- import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-DhCtQWWU.mjs";
5
- import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-BQF9Yyy9.mjs";
6
- import { a as inspectBudget, cr as inspectWatchmanMemory, fr as memorySweepIsScoped, n as budgetLine } from "./budget-3ivAK99e.mjs";
7
- import { L as memoryCulpritFindings, R as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-hcBpnEGk.mjs";
8
- import { c as detectXcodeMajorAsync } from "./xcode-Rq744mBF.mjs";
9
- import { s as offloadCheck } from "./client-B4MMzfo_.mjs";
10
- import { c as inspectBuildMachines, f as inspectDeviceHostMachines } from "./selection-DSMbWEX2.mjs";
11
- import { r as maintenanceStatus, t as maintenanceLine } from "./status-BRROykC8.mjs";
12
- import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-iGBpC6KM.mjs";
13
- import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-HUC1igzw.mjs";
14
- import { h as resolveDeviceType, v as resolveRuntime } from "./support-TWuQlHQo.mjs";
1
+ import { Y as doctorIo, _ as loadConfig$1, p as getProject } from "./config-BZhXY15H.mjs";
2
+ import { f as refuseNoProject, l as phaseLine } from "./command-output-DxC0k2rk.mjs";
3
+ import { L as projectSettingsContextAsync, Mt as repoRoot } from "./settings-RKwY33wv.mjs";
4
+ import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-Dz-hWkb-.mjs";
5
+ import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-Ck6YXPAO.mjs";
6
+ import { a as inspectBudget, mr as memorySweepIsScoped, n as budgetLine, ur as inspectWatchmanMemory } from "./budget-dPGuhNai.mjs";
7
+ import { B as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation, z as memoryCulpritFindings } from "./ios-CVUFFZ6C.mjs";
8
+ import { c as detectXcodeMajorAsync } from "./xcode-DHu41qQ4.mjs";
9
+ import { s as offloadCheck } from "./client-18-ZowoT.mjs";
10
+ import { l as inspectBuildMachines, p as inspectDeviceHostMachines } from "./selection-BLtvaqxc.mjs";
11
+ import { r as maintenanceStatus, t as maintenanceLine } from "./status-Fect2w9R.mjs";
12
+ import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-B453A231.mjs";
13
+ import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-C33AzVfR.mjs";
14
+ import { h as resolveDeviceType, v as resolveRuntime } from "./support-B1W-hmC2.mjs";
15
15
  import { isJsonObject, maintenanceNdjsonFile, readHostedAppMetadata, readHostedSessions } from "@stim-cli/core/state";
16
16
  import { dirname, join, sep } from "path";
17
17
  import chalk from "chalk";
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { fileURLToPath } from "node:url";
3
3
  //#region src/doctor-fingerprint.ts
4
4
  async function readDoctorFingerprint(operation, request) {
@@ -1,4 +1,4 @@
1
- import { l as fingerprintProject } from "./build-cache-Dv7RN200.mjs";
1
+ import { d as fingerprintProject } from "./build-cache-HFUQ9eLz.mjs";
2
2
  import * as fingerprint from "@expo/fingerprint";
3
3
  //#region bin/doctor-fingerprint.ts
4
4
  let input = "";
@@ -1,8 +1,8 @@
1
- import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-DlrsduwG.mjs";
2
- import { l as gitQuietAsync } from "./operation-exec-BW0em61G.mjs";
3
- import { Et as listWorktreesAsync, Nt as repoRootAsync } from "./settings-C7O8A6ZI.mjs";
4
- import { f as projectRegistry } from "./project-DhCtQWWU.mjs";
5
- import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-BQF9Yyy9.mjs";
1
+ import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-BZhXY15H.mjs";
2
+ import { l as gitQuietAsync } from "./operation-exec-CUZifp6Z.mjs";
3
+ import { Et as listWorktreesAsync, Nt as repoRootAsync } from "./settings-RKwY33wv.mjs";
4
+ import { f as projectRegistry } from "./project-Dz-hWkb-.mjs";
5
+ import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-Ck6YXPAO.mjs";
6
6
  import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
7
7
  import { dirname, isAbsolute, join, relative, sep } from "node:path";
8
8
  import { isJsonObject } from "@stim-cli/core/state";
@@ -1,7 +1,7 @@
1
- import { t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
- import { a as killOnAbort, f as throwIfCancelled, r as childEnvironment } from "./operation-exec-BW0em61G.mjs";
3
- import { Zn as remoteCliInvocation, nr as easCliUpgradeRemedy, qn as resolveEasCliBin, tr as easCliSupport } from "./budget-3ivAK99e.mjs";
4
- import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-BpWUPgUm.mjs";
1
+ import { D as ownership_claim_exports, c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
+ import { a as killOnAbort, r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
3
+ import { $n as remoteCliInvocation, Yn as resolveEasCliBin, ir as easCliUpgradeRemedy, rr as easCliSupport } from "./budget-dPGuhNai.mjs";
4
+ import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-Dq3ZcdD8.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { existsSync, realpathSync, statSync } from "node:fs";
7
7
  //#region src/engine/eas-build.ts
@@ -1,15 +1,15 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
2
- import { _ as loadConfig$1, p as getProject } from "./config-DlrsduwG.mjs";
3
- import { f as throwIfCancelled, r as childEnvironment } from "./operation-exec-BW0em61G.mjs";
4
- import { ct as detectProviders, lt as planMetroReach } from "./settings-C7O8A6ZI.mjs";
5
- import { M as readMetroTunnel, P as readRemoteSession } from "./project-DhCtQWWU.mjs";
6
- import { $n as MIN_EAS_CLI_DEVICE_VERSION, Hn as isEasAuthFailureText, Ht as readInstalledEasCliVersionAsync, Qn as remoteCommand, er as MIN_EAS_CLI_SIMULATOR_VERSION, qn as resolveEasCliBin, s as peekBudget, tr as easCliSupport } from "./budget-3ivAK99e.mjs";
7
- import { F as readHostMemoryPressureAsync } from "./ios-hcBpnEGk.mjs";
8
- import { d as hostingMachines, o as resolveBuildMachine, r as namedBuildMachine } from "./selection-DSMbWEX2.mjs";
9
- import { c as call, l as connectHost, p as requireHostedAppMode } from "./hosted-client-Bt-tndxV.mjs";
10
- import { r as readHostedNative, s as writeHostedNative } from "./ios-state-Dtw5K2aI.mjs";
11
- import { n as prepareHostedNative } from "./hosted-native-BmQC6U_x.mjs";
12
- import { c as peekDeviceSlots } from "./device-capacity-DH0QsZYZ.mjs";
1
+ import { c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
+ import { _ as loadConfig$1, p as getProject } from "./config-BZhXY15H.mjs";
3
+ import { r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
4
+ import { ct as detectProviders, lt as planMetroReach } from "./settings-RKwY33wv.mjs";
5
+ import { M as readMetroTunnel, P as readRemoteSession } from "./project-Dz-hWkb-.mjs";
6
+ import { Wn as isEasAuthFailureText, Wt as readInstalledEasCliVersionAsync, Yn as resolveEasCliBin, er as remoteCommand, nr as MIN_EAS_CLI_SIMULATOR_VERSION, rr as easCliSupport, s as peekBudget, tr as MIN_EAS_CLI_DEVICE_VERSION } from "./budget-dPGuhNai.mjs";
7
+ import { I as readHostMemoryPressureAsync } from "./ios-CVUFFZ6C.mjs";
8
+ import { f as hostingMachines, i as namedBuildMachine, s as resolveBuildMachine } from "./selection-BLtvaqxc.mjs";
9
+ import { c as call, l as connectHost, p as requireHostedAppMode } from "./hosted-client-BBTVe3X6.mjs";
10
+ import { c as writeHostedNativeAsync, r as readHostedNative } from "./ios-state-DlElquYD.mjs";
11
+ import { i as prepareHostedNative } from "./hosted-native-Doxbfzem.mjs";
12
+ import { c as peekDeviceSlots } from "./device-capacity-Ic-kdmEV.mjs";
13
13
  import { ambientEnv } from "@stim-cli/core";
14
14
  import { automaticMachineEnabled, isJsonObject, machineCapacity, parseHostedChoice, parseHostedNativeOffer } from "@stim-cli/core/state";
15
15
  //#region src/device-host/placement.ts
@@ -219,7 +219,7 @@ function viaEas(code, reason, skipped) {
219
219
  skipped
220
220
  };
221
221
  }
222
- async function automaticDevicePlacement({ root, slot, platform, selectors, appMode, buildMachine, noWait, eas, signal }, { machines = () => hostingMachines(void 0, signal), read = readHostedNative, write = writeHostedNative, resume = prepareHostedNative, peek = () => peekDeviceSlots({
222
+ async function automaticDevicePlacement({ root, slot, platform, selectors, appMode, buildMachine, noWait, eas, signal }, { machines = () => hostingMachines(void 0, signal), read = readHostedNative, write = writeHostedNativeAsync, resume = prepareHostedNative, peek = () => peekDeviceSlots({
223
223
  platform,
224
224
  project: getProject(root),
225
225
  slot
@@ -238,7 +238,7 @@ async function automaticDevicePlacement({ root, slot, platform, selectors, appMo
238
238
  skipped: [],
239
239
  sticky: true
240
240
  };
241
- write(root, slot, null, platform);
241
+ await write(root, slot, null, platform);
242
242
  }
243
243
  const devices = peek();
244
244
  if (devices.localLive) return {
@@ -1,9 +1,9 @@
1
- import { _ as reportSignal, t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { C as reportSignal, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { l as workspaceAgentDeviceDir, v as withDirLock$1, y as withDirLockAsync$1 } from "./paths-DQtTgsBf.mjs";
3
- import { G as projectDeviceSlots, V as deviceSlotKey } from "./config-DlrsduwG.mjs";
4
- import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-YKGWivpG.mjs";
5
- import { n as isInsideProject } from "./metro-DiXtA3Ty.mjs";
6
- import { r as cdpEndpoint } from "./state--smjFSTL.mjs";
3
+ import { G as projectDeviceSlots, V as deviceSlotKey } from "./config-BZhXY15H.mjs";
4
+ import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-DxC0k2rk.mjs";
5
+ import { n as isInsideProject } from "./metro-Bu8LBfzS.mjs";
6
+ import { r as cdpEndpoint } from "./state-B1ig0Kqy.mjs";
7
7
  import { accessSync, constants, existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
8
8
  import { delimiter, dirname, join, resolve } from "node:path";
9
9
  import { workspaceId } from "@stim-cli/core";
@@ -681,11 +681,11 @@ function writeLedger(root, ledger) {
681
681
  throw error;
682
682
  }
683
683
  }
684
- function recordEasSessionClaim(claim, root = easMachineStateRoot()) {
684
+ function easSessionClaimWrite(claim, root) {
685
685
  assertEasMachineRootWritable(root);
686
686
  const normalized = validEasSessionClaim(claim.sessionId, claim);
687
687
  if (!normalized) throw new Error(`Invalid EAS session claim for ${claim.sessionId}.`);
688
- withDirLock$1(easSessionLedgerLock(root), () => {
688
+ return () => {
689
689
  const current = readEasSessionLedger(root);
690
690
  if (!current.safe) throw new Error(current.notice ?? "EAS ownership ledger is unreadable.");
691
691
  current.claims.set(normalized.sessionId, normalized);
@@ -693,7 +693,11 @@ function recordEasSessionClaim(claim, root = easMachineStateRoot()) {
693
693
  version: 1,
694
694
  claims: Object.fromEntries(current.claims)
695
695
  });
696
- }, { ensureParent: () => mkdirSync(dirname(easSessionLedgerLock(root)), { recursive: true }) });
696
+ };
697
+ }
698
+ /** Records the claim after waiting for the ledger lock without blocking the event loop. */
699
+ async function recordEasSessionClaim(claim, root = easMachineStateRoot()) {
700
+ await withDirLockAsync$1(easSessionLedgerLock(root), easSessionClaimWrite(claim, root), { ensureParent: () => mkdirSync(dirname(easSessionLedgerLock(root)), { recursive: true }) });
697
701
  }
698
702
  function removeEasSessionClaim(sessionId, root = easMachineStateRoot(), when = () => true) {
699
703
  const file = easSessionLedgerFile(root);
@@ -1,41 +1,21 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
2
- import { v as withDirLock$1 } from "./paths-DQtTgsBf.mjs";
3
- import { H as deviceSlotPlatforms, V as deviceSlotKey, p as getProject } from "./config-DlrsduwG.mjs";
4
- import { v as launchErrorPreview } from "./command-output-YKGWivpG.mjs";
5
- import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
6
- import { I as readWorkspaceLaunches } from "./project-DhCtQWWU.mjs";
7
- import { d as resolveProjectMetro } from "./metro-DiXtA3Ty.mjs";
8
- import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-BpWUPgUm.mjs";
9
- import { o as androidHome, u as androidToolCwd } from "./android-C7sVmyI9.mjs";
10
- import { r as deviceConsoleLevel } from "./ios-device-BXZ0c7Kb.mjs";
11
- import { n as parseLogcatLine } from "./android-DR5lZ2Az.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
+ import { H as deviceSlotPlatforms, V as deviceSlotKey, p as getProject } from "./config-BZhXY15H.mjs";
3
+ import { v as launchErrorPreview } from "./command-output-DxC0k2rk.mjs";
4
+ import { r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
5
+ import { I as readWorkspaceLaunches } from "./project-Dz-hWkb-.mjs";
6
+ import { o as androidHome, u as androidToolCwd } from "./android-882m4hxX.mjs";
7
+ import { d as resolveProjectMetro } from "./metro-Bu8LBfzS.mjs";
8
+ import { i as parseLogcatLine, n as androidLogGroups, r as isAndroidCrashText } from "./android-CX5IcRuf.mjs";
9
+ import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-Dq3ZcdD8.mjs";
10
+ import { r as deviceConsoleLevel } from "./ios-device-B6HK951C.mjs";
12
11
  import { createHash, randomUUID } from "node:crypto";
13
- import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
12
+ import { existsSync, readFileSync, renameSync } from "node:fs";
14
13
  import { homedir } from "node:os";
15
14
  import { basename, dirname, join, resolve, sep } from "node:path";
16
15
  import { withDirLockAsync } from "@stim-cli/core";
17
16
  import { NATIVE_CRASH_LOG_PREFIX, attachExpoErrorContext, readLogRecords, readLogTimeline } from "@stim-cli/core/state";
18
17
  import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
19
18
  //#region src/diagnostics/diagnostic-store.ts
20
- /** Publishes an immutable diagnostic snapshot atomically; existing evidence wins. */
21
- function writeDiagnosticOnce(path, content) {
22
- mkdirSync(dirname(path), { recursive: true });
23
- withDirLock$1(`${path}.lock`, () => {
24
- if (existsSync(path)) return;
25
- const temporary = `${path}.${randomUUID()}.tmp`;
26
- try {
27
- writeFileSync(temporary, content, { flag: "wx" });
28
- renameSync(temporary, path);
29
- } finally {
30
- try {
31
- unlinkSync(temporary);
32
- } catch {}
33
- }
34
- }, {
35
- waitMs: 100,
36
- pollMs: 10
37
- });
38
- }
39
19
  /** Publishes an immutable diagnostic snapshot without blocking on content writes or lock contention. */
40
20
  async function writeDiagnosticOnceAsync(path, content, signal) {
41
21
  signal?.throwIfAborted();
@@ -111,19 +91,13 @@ function parseIosCrash(text, target) {
111
91
  /** Extracts crash-buffer groups only when their own process header names the target app. */
112
92
  function parseAndroidCrashes(text, target, clockOffsetMs) {
113
93
  const entries = text.split("\n").map((line) => parseLogcatLine(line, { clockOffsetMs })).filter((record) => record !== null && Number(record.ts) >= target.since && Number(record.ts) <= (target.until ?? Infinity));
114
- const groups = [];
115
- for (const entry of entries) {
116
- const last = groups.at(-1);
117
- if (!last || entry.proc !== last.at(-1)?.proc || /^\s*(?:FATAL EXCEPTION:|\*\*\* \*\*\*)/.test(entry.msg ?? "")) groups.push([entry]);
118
- else last.push(entry);
119
- }
120
- return groups.flatMap((group) => {
94
+ return androidLogGroups(entries).flatMap((group) => {
121
95
  const messages = group.map((record) => record.msg ?? "");
122
96
  const process = messages.map((line) => /^\s*(?:Process: (.+?), PID: \d+|pid: \d+, tid: \d+, name: .*?>>> (.*?) <<<)/.exec(line)).find(Boolean);
123
97
  const appId = process?.[1] ?? process?.[2];
124
98
  if (appId !== target.appId) return [];
125
99
  const msg = messages.join("\n");
126
- if (!/FATAL EXCEPTION:|signal \d+ \(/.test(msg)) return [];
100
+ if (!isAndroidCrashText(msg)) return [];
127
101
  return [{
128
102
  ts: group[0].ts,
129
103
  deviceTs: group[0].deviceTs,
@@ -590,6 +564,7 @@ async function symbolicateErrors(records, { port, timeoutMs = 2e3, request = fet
590
564
  }
591
565
  //#endregion
592
566
  //#region src/diagnostics/error-diagnostics.ts
567
+ const SOURCE_LOCATION = /(?<![^\s()"\\])[^\s()"\\]+:\d+:\d+/g;
593
568
  function key(record) {
594
569
  return createHash("sha256").update(JSON.stringify(record)).digest("hex");
595
570
  }
@@ -648,12 +623,12 @@ function mergeErrorCopies(records, root) {
648
623
  record.msg,
649
624
  record.stack,
650
625
  record.componentStack
651
- ]).replaceAll(root ? `${root}/` : "\0", "").matchAll(/[^\s()"\\]+:\d+:\d+/g)].map(([location]) => location));
626
+ ]).replaceAll(root ? `${root}/` : "\0", "").matchAll(SOURCE_LOCATION)].map(([location]) => location));
652
627
  const existing = title && locations.size ? result.findIndex((other) => !(Array.isArray(other.mirroredSources) ? other.mirroredSources : [other.src]).includes(record.src) && (!other.platform || !record.platform || other.platform === record.platform) && errorTitle(other) === title && typeof other.ts === "number" && typeof record.ts === "number" && Math.abs(other.ts - record.ts) < 1e3 && [...JSON.stringify([
653
628
  other.msg,
654
629
  other.stack,
655
630
  other.componentStack
656
- ]).replaceAll(root ? `${root}/` : "\0", "").matchAll(/[^\s()"\\]+:\d+:\d+/g)].some(([location]) => locations.has(location))) : -1;
631
+ ]).replaceAll(root ? `${root}/` : "\0", "").matchAll(SOURCE_LOCATION)].some(([location]) => locations.has(location))) : -1;
657
632
  if (existing < 0) result.push(record);
658
633
  else {
659
634
  const prior = result[existing];
@@ -732,7 +707,7 @@ async function errorDiagnostics(input, { root, logsDir, port, allowRequest = fal
732
707
  rendered[entry.index] = value;
733
708
  if (bundleLocations(value).length === bundleLocations(entry.record).length) continue;
734
709
  try {
735
- writeDiagnosticOnce(join(directory, `${key(entry.record)}.json`), JSON.stringify({
710
+ await writeDiagnosticOnceAsync(join(directory, `${key(entry.record)}.json`), JSON.stringify({
736
711
  original: key(entry.record),
737
712
  rendered: value
738
713
  }));
@@ -1,8 +1,11 @@
1
1
  import { createRequire } from "node:module";
2
+ import { randomUUID } from "node:crypto";
3
+ import { existsSync, rmSync } from "node:fs";
4
+ import { availableParallelism, loadavg, tmpdir } from "node:os";
2
5
  import { join } from "node:path";
3
6
  import { ambientContext, ambientEnv } from "@stim-cli/core";
4
7
  import { createDebugLog, runId } from "@stim-cli/core/state";
5
- import { basename as basename$1, delimiter as delimiter$1, resolve as resolve$1 } from "path";
8
+ import { basename as basename$1, delimiter as delimiter$1, join as join$1, resolve as resolve$1 } from "path";
6
9
  import { execSync } from "child_process";
7
10
  import spawn from "cross-spawn";
8
11
  import which from "which";
@@ -122,7 +125,8 @@ async function runReport(context, work, timeoutMs = 6e4) {
122
125
  const expireCleanup = () => {
123
126
  state.failure ??= [...pending.values()].find((failure) => failure !== void 0) ?? Object.assign(/* @__PURE__ */ new Error("Report cleanup did not finish within 35 seconds."), {
124
127
  code: "STIM_CLAIM_UNAVAILABLE",
125
- reportCleanup: true
128
+ reportCleanup: true,
129
+ remedy: "Check that the child processes the report started and their descendants have stopped"
126
130
  });
127
131
  };
128
132
  let cleanupTimer;
@@ -346,10 +350,58 @@ async function withWorkspaceProcessLock(root, name, fn, { now = Date.now, signal
346
350
  }
347
351
  }
348
352
  //#endregion
353
+ //#region src/cancellation.ts
354
+ function cancelledError(what, cause) {
355
+ return Object.assign(new Error(`The ${what} was cancelled.`, cause === void 0 ? void 0 : { cause }), { code: "STIM_CANCELLED" });
356
+ }
357
+ function throwIfCancelled(signal, what) {
358
+ if (signal?.aborted) throw cancelledError(what);
359
+ }
360
+ function cancellableSleep(ms, { signal, what = "wait", ref = true } = {}) {
361
+ return new Promise((resolve, reject) => {
362
+ if (signal?.aborted) return reject(cancelledError(what));
363
+ const onAbort = () => {
364
+ clearTimeout(timer);
365
+ reject(cancelledError(what));
366
+ };
367
+ const timer = setTimeout(() => {
368
+ signal?.removeEventListener("abort", onAbort);
369
+ resolve();
370
+ }, ms);
371
+ if (!ref) timer.unref();
372
+ signal?.addEventListener("abort", onAbort, { once: true });
373
+ });
374
+ }
375
+ //#endregion
376
+ //#region src/process-group-exit.ts
377
+ const BASE_MS = 5e3;
378
+ function loadScaledBudgetMs(baseMs, capMs) {
379
+ const loadPerCpu = (loadavg()[0] ?? 0) / availableParallelism();
380
+ return Math.min(capMs, baseMs * Math.max(1, loadPerCpu));
381
+ }
382
+ function groupExitBudgetMs(capMs = 6e4) {
383
+ return loadScaledBudgetMs(BASE_MS, capMs);
384
+ }
385
+ async function waitForGroupExit(pid, budgetMs) {
386
+ const deadline = performance.now() + budgetMs;
387
+ while ((0, ownership_claim_exports.processGroupAlive)(pid)) {
388
+ if (performance.now() >= deadline) return false;
389
+ await cancellableSleep(25);
390
+ }
391
+ return true;
392
+ }
393
+ //#endregion
349
394
  //#region src/exec.ts
350
395
  const MAX_BUFFER = 67108864;
396
+ const REPORT_CHILD_EXIT_CAP_MS = 15e3;
397
+ const REPORT_JOB_PHASE_MS = 3e4;
398
+ function startsInReportJob(file, opts, containProcessTree) {
399
+ return process.platform === "win32" && (containProcessTree || Boolean(reportSignal(ambientContext()))) && Boolean(executableIn(file, opts.env ?? ambientEnv(), opts.cwd ?? process.cwd()));
400
+ }
351
401
  function spawnReportProbe(file, args, opts, containProcessTree = false) {
352
- if (process.platform !== "win32" || !containProcessTree && !reportSignal(ambientContext()) || !executableIn(file, opts.env ?? ambientEnv(), opts.cwd ?? process.cwd())) return spawn(file, args, opts);
402
+ return startsInReportJob(file, opts, containProcessTree) ? spawnReportJob(file, args, opts) : spawn(file, args, opts);
403
+ }
404
+ function spawnReportJob(file, args, opts, markers) {
353
405
  const env = opts.env ?? ambientEnv();
354
406
  const systemRoot = process.env.SystemRoot ?? process.env.SYSTEMROOT;
355
407
  if (!systemRoot) throw new Error("SystemRoot is required to contain Windows report probes.");
@@ -370,7 +422,8 @@ function spawnReportProbe(file, args, opts, containProcessTree = false) {
370
422
  file,
371
423
  args,
372
424
  node: process.execPath,
373
- entry: fileURLToPath(new URL("../dist/windows-report.mjs", import.meta.url))
425
+ entry: fileURLToPath(new URL("../dist/windows-report.mjs", import.meta.url)),
426
+ ...markers
374
427
  })
375
428
  }
376
429
  });
@@ -413,7 +466,8 @@ function reportChild(child, signal, failed) {
413
466
  const refuse = (message) => {
414
467
  const failure = Object.assign(new Error(message), {
415
468
  code: "STIM_CLAIM_UNAVAILABLE",
416
- reportCleanup: true
469
+ reportCleanup: true,
470
+ remedy: `Check whether the report child${pid === void 0 ? "" : ` ${pid}${process.platform === "win32" ? "" : ` (\`ps -p ${pid}\`)`}`} and its descendants are still running and stop them if they are`
417
471
  });
418
472
  const error = failed?.(failure) ?? failure;
419
473
  child.stdin?.destroy();
@@ -466,16 +520,13 @@ function reportChild(child, signal, failed) {
466
520
  if (!ended) {
467
521
  let timer;
468
522
  await Promise.race([nativeClosed, new Promise((resolve) => {
469
- timer = setTimeout(resolve, 1e3);
523
+ timer = setTimeout(resolve, groupExitBudgetMs(REPORT_CHILD_EXIT_CAP_MS));
470
524
  })]);
471
525
  clearTimeout(timer);
526
+ if (!ended) await new Promise((resolve) => setImmediate(resolve));
472
527
  if (!ended) refuse(`Report child ${pid} did not close within the cleanup budget.`);
473
528
  }
474
- if (pid !== void 0 && process.platform !== "win32") {
475
- const deadline = performance.now() + 1e3;
476
- while ((0, ownership_claim_exports.processGroupAlive)(pid) && performance.now() < deadline) await setTimeout$1(25);
477
- if ((0, ownership_claim_exports.processGroupAlive)(pid)) refuse(`Report child ${pid} still has descendants after cleanup.`);
478
- }
529
+ if (pid !== void 0 && process.platform !== "win32" && !await waitForGroupExit(pid, groupExitBudgetMs(REPORT_CHILD_EXIT_CAP_MS))) refuse(`Report child ${pid} still has descendants after cleanup.`);
479
530
  })();
480
531
  if (report) trackReportResource(context, closed, cancel, signal);
481
532
  else {
@@ -642,26 +693,42 @@ const defaultExecutor = {
642
693
  clearDeclaration = resolveDeclaration;
643
694
  retainDeclaration = rejectDeclaration;
644
695
  }) : void 0;
645
- const start = () => spawnReportProbe(file, args, opts, containProcessTree || Boolean(report));
696
+ const contained = startsInReportJob(file, opts, containProcessTree || Boolean(report));
697
+ const base = contained && timeout !== void 0 ? join$1(tmpdir(), `stim-report-${process.pid}-${randomUUID()}`) : null;
698
+ const markers = base ? {
699
+ started: `${base}.started`,
700
+ closed: `${base}.closed`
701
+ } : void 0;
702
+ const start = () => contained ? spawnReportJob(file, args, opts, markers) : spawn(file, args, opts);
646
703
  const child = declareFor ? spawnDeclared(declareFor, start, declaration ? { until: declaration } : {}) : start();
647
704
  let lifetime;
648
705
  let cancel;
649
706
  let timer;
707
+ let poll;
708
+ let phase = markers ? "starting" : "running";
709
+ const stopTimers = () => {
710
+ clearTimeout(timer);
711
+ clearInterval(poll);
712
+ for (const marker of Object.values(markers ?? {})) try {
713
+ rmSync(marker, { force: true });
714
+ } catch {}
715
+ };
650
716
  try {
651
717
  lifetime = reportChild(child, report, (error) => {
652
718
  const failure = claims.length ? Object.assign(new WorkspaceProcessCleanupError(claims, error.message, "Verify the child and its descendants have stopped."), { reportCleanup: true }) : error;
653
- clearTimeout(timer);
719
+ stopTimers();
654
720
  return failure;
655
721
  });
656
722
  cancel = lifetime?.cancel;
657
723
  if (cleanupOnExit && cancel) child.once("exit", () => {
658
- clearTimeout(timer);
724
+ stopTimers();
659
725
  cancel?.().catch(reject);
660
726
  });
661
727
  lifetime?.closed.catch(reject);
662
728
  if (declaration) lifetime?.closed.then(clearDeclaration, retainDeclaration);
663
729
  onSpawn?.(child);
664
730
  } catch (error) {
731
+ stopTimers();
665
732
  if (cancel) cancel().then(() => lifetime?.closed).then(() => reject(error), reject);
666
733
  else {
667
734
  if (!report) child.kill("SIGKILL");
@@ -697,24 +764,42 @@ const defaultExecutor = {
697
764
  }
698
765
  }
699
766
  };
700
- timer = timeout === void 0 ? void 0 : setTimeout(() => {
701
- timedOut = true;
702
- if (cancel) cancel().catch(reject);
703
- else {
704
- child.kill(killSignal ?? "SIGTERM");
705
- child.stdin?.destroy();
706
- child.stdout?.destroy();
707
- child.stderr?.destroy();
708
- }
709
- }, timeout);
767
+ const arm = (ms) => {
768
+ clearTimeout(timer);
769
+ timer = setTimeout(() => {
770
+ timedOut = true;
771
+ clearInterval(poll);
772
+ if (cancel) cancel().catch(reject);
773
+ else {
774
+ child.kill(killSignal ?? "SIGTERM");
775
+ child.stdin?.destroy();
776
+ child.stdout?.destroy();
777
+ child.stderr?.destroy();
778
+ }
779
+ }, ms);
780
+ };
781
+ if (timeout !== void 0 && markers) {
782
+ arm(REPORT_JOB_PHASE_MS);
783
+ poll = setInterval(() => {
784
+ if (phase === "starting" && existsSync(markers.started)) {
785
+ phase = "running";
786
+ arm(timeout);
787
+ }
788
+ if (phase === "running" && existsSync(markers.closed)) {
789
+ phase = "closing";
790
+ arm(REPORT_JOB_PHASE_MS);
791
+ clearInterval(poll);
792
+ }
793
+ }, 50);
794
+ } else if (timeout !== void 0) arm(timeout);
710
795
  child.stdout?.on("data", (chunk) => capture(stdout, chunk));
711
796
  child.stderr?.on("data", (chunk) => capture(stderr, chunk));
712
797
  child.on("error", (error) => {
713
- clearTimeout(timer);
798
+ stopTimers();
714
799
  reject(redactError(error, redact));
715
800
  });
716
801
  const finish = async (status, signal) => {
717
- clearTimeout(timer);
802
+ stopTimers();
718
803
  await lifetime?.closed;
719
804
  const discardOutput = (timedOut || overflowed || report?.aborted) && redact?.some(Boolean);
720
805
  const out = discardOutput ? "" : Buffer.concat(stdout).toString("utf-8");
@@ -726,7 +811,10 @@ const defaultExecutor = {
726
811
  stderr: err
727
812
  };
728
813
  if (report?.aborted) reject(report.reason);
729
- else if (timedOut) reject(redactError(nameTimeout(Object.assign(new Error(command), result, { code: "ETIMEDOUT" }), command, timeoutMs), redact));
814
+ else if (timedOut && phase !== "running") {
815
+ const message = `The Windows report job did not ${phase === "starting" ? "start" : "exit"} within ${REPORT_JOB_PHASE_MS}ms: ${command}`;
816
+ reject(redactError(Object.assign(new Error(message), result, { code: "ETIMEDOUT" }), redact));
817
+ } else if (timedOut) reject(redactError(nameTimeout(Object.assign(new Error(command), result, { code: "ETIMEDOUT" }), command, timeoutMs), redact));
730
818
  else if (overflowed) reject(redactError(Object.assign(/* @__PURE__ */ new Error(`Command output exceeded ${MAX_BUFFER} bytes: ${command}`), result, { code: "ENOBUFS" }), redact));
731
819
  else if (status !== 0 || rejectStderr && err.trim()) reject(redactError(Object.assign(/* @__PURE__ */ new Error(`Command failed: ${command}${err ? `\n${err}` : ""}`), result), redact));
732
820
  else resolve(detachedSilent ? "" : untrimmed ? out : out.trim());
@@ -855,4 +943,4 @@ function getExecutor() {
855
943
  return active;
856
944
  }
857
945
  //#endregion
858
- export { __require as C, __commonJSMin as S, reportSignal as _, workspaceProcessLockError as a, debugLog as b, declareSpawnsOn as c, spawnDeclared as d, stopDeclaringSpawnsOn as f, process_identity_exports as g, withDrainingCancellation as h, withWorkspaceProcessLock as i, refuseDeclaredSpawns as l, operationState as m, isTimeoutError as n, workspaceProcessLockPath as o, isTermination as p, WorkspaceProcessCleanupError as r, allowDeclaredSpawns as s, getExecutor as t, signalDeclaredSpawns as u, runReport as v, ownership_claim_exports as x, trackReportResource as y };
946
+ export { reportSignal as C, ownership_claim_exports as D, debugLog as E, __commonJSMin as O, process_identity_exports as S, trackReportResource as T, spawnDeclared as _, waitForGroupExit as a, operationState as b, throwIfCancelled as c, workspaceProcessLockError as d, workspaceProcessLockPath as f, signalDeclaredSpawns as g, refuseDeclaredSpawns as h, loadScaledBudgetMs as i, __require as k, WorkspaceProcessCleanupError as l, declareSpawnsOn as m, isTimeoutError as n, cancellableSleep as o, allowDeclaredSpawns as p, groupExitBudgetMs as r, cancelledError as s, getExecutor as t, withWorkspaceProcessLock as u, stopDeclaringSpawnsOn as v, runReport as w, withDrainingCancellation as x, isTermination as y };