stim 1.23.0 → 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-ybouwJSR.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
  3. package/dist/{act-DG54PWtJ.mjs → act-Cyvm8xYc.mjs} +40 -25
  4. package/dist/{activity-B5RtpFda.mjs → activity-Dq3ZcdD8.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-UJ5gC80l.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
  6. package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
  7. package/dist/{android-BoUJKbfz.mjs → android-BZppyPe_.mjs} +66 -46
  8. package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
  9. package/dist/{android-CHH4KLOR.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 +22 -4
  13. package/dist/api.mjs +32 -31
  14. package/dist/{artifact-5RteZem7.mjs → artifact-BR5VNArK.mjs} +17 -16
  15. package/dist/{artifact-Dwdo7k1E.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-CeEVlGug.mjs → browser-web-ycg9qWB8.mjs} +16 -17
  18. package/dist/{budget-DnPX3DXj.mjs → budget-dPGuhNai.mjs} +101 -40
  19. package/dist/{build-CqufZFqy.mjs → build-CaF574eS.mjs} +31 -28
  20. package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
  21. package/dist/{build-plan-C8CIvRyi.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-RcAy92gH.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-D-J9fWGV.mjs → cli-xqAidP7O.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/{client-yyso1bwi.mjs → client-18-ZowoT.mjs} +254 -28
  30. package/dist/collector-run.mjs +6 -6
  31. package/dist/{command-output-Db8BqzxH.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-BnYSDiKa.mjs → dev-client-w_fok0Ek.mjs} +3 -3
  37. package/dist/{device-BvzPUBs3.mjs → device-4RUugw5X.mjs} +16 -16
  38. package/dist/{device-CCkWmkAA.mjs → device-BktRGdjS.mjs} +40 -44
  39. package/dist/{device-capacity-CjaSdrhg.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
  40. package/dist/device-host-worker.mjs +17 -17
  41. package/dist/{device-ios-uOiEETX2.mjs → device-ios-DzpSlZyd.mjs} +23 -24
  42. package/dist/{device-lease-run-BgwPHc6u.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
  43. package/dist/{device-pool-C-ptmZTa.mjs → device-pool-CgBHk401.mjs} +3 -3
  44. package/dist/{doctor-pxxvipYC.mjs → doctor-BZ6oxNum.mjs} +1 -1
  45. package/dist/{doctor-8sr2tFOL.mjs → doctor-C33AzVfR.mjs} +28 -28
  46. package/dist/{doctor-D2SN3Ltx.mjs → doctor-DZgpqR6J.mjs} +17 -16
  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-sy_RNhFt.mjs → doctor-watchman-B453A231.mjs} +5 -5
  50. package/dist/{eas-build-CyjU5K7E.mjs → eas-build-CxKUNHsb.mjs} +4 -4
  51. package/dist/{eas-fallback-DV3Wytf1.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
  52. package/dist/{eas-session-ledger-BzzsX97d.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
  53. package/dist/{error-diagnostics-C6sVoeqO.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
  54. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  55. package/dist/{gc-DLbzvTP2.mjs → gc-DDWEAj0w.mjs} +2 -2
  56. package/dist/{gc-CDoogxAI.mjs → gc-yVKpAOKM.mjs} +205 -28
  57. package/dist/{guide-BC37GcDG.mjs → guide-Bggftwc5.mjs} +252 -73
  58. package/dist/{hosted-android-CkclQig_.mjs → hosted-android-D4dweBof.mjs} +4 -4
  59. package/dist/{hosted-client-ByuMMO5s.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
  60. package/dist/{hosted-ios-DtYHeuYR.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
  61. package/dist/{hosted-logs-Br84qWy1.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
  62. package/dist/{hosted-macos-DdtYajZt.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
  63. package/dist/{hosted-native-UPI9zdZ4.mjs → hosted-native-Doxbfzem.mjs} +58 -11
  64. package/dist/{idle-shutdown-DO7oIRlc.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
  65. package/dist/{ios-DZZbNYlY.mjs → ios-B1FXRCMX.mjs} +71 -44
  66. package/dist/{ios-vbUOqGXu.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-JC3uWM4K.mjs → ios-device-BI38NFFH.mjs} +3 -3
  71. package/dist/{ios-project-CVyNwjAF.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-C3QxUFJR.mjs → js-swap-BvrQvXHY.mjs} +7 -6
  75. package/dist/{launch-CHY3p-yz.mjs → launch-BVlyQw3T.mjs} +51 -49
  76. package/dist/{launch-Bz7JtaC4.mjs → launch-SfzGH_s9.mjs} +48 -29
  77. package/dist/{logs-mxqsWpJs.mjs → logs-DXE32kyb.mjs} +16 -9
  78. package/dist/{logs-CtNeNDuq.mjs → logs-ovlU7m7N.mjs} +8 -6
  79. package/dist/{macos-inNFbBWc.mjs → macos-B3BveDrU.mjs} +1 -1
  80. package/dist/{macos-u0BoHKnO.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-CdCSylTn.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-BUTu8T7A.mjs → native-run-BmH7U8pr.mjs} +6 -6
  89. package/dist/{native-runtime-CRSOZxKY.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-G6rkkhxu.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
  92. package/dist/{native-xcode-ios-_os2PlCD.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
  93. package/dist/offload-worker.d.mts +7 -2
  94. package/dist/offload-worker.mjs +104 -43
  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-BU42oOyT.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
  101. package/dist/{ports-BSmQKzW7.mjs → ports-D-E_OiAO.mjs} +3 -3
  102. package/dist/{prebuild-BFm63bQ0.mjs → prebuild-DmVCf5xb.mjs} +14 -9
  103. package/dist/{project-CTLNHCfE.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-CFgUroxW.mjs → react-native-android-DOinxgwB.mjs} +75 -32
  107. package/dist/{react-native-build-CmJkTljQ.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
  108. package/dist/{react-native-doctor-LTF-Xt8l.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
  109. package/dist/{react-native-ios-ChBF1MkB.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-DF9hqUUB.mjs → reload-C1TTVesC.mjs} +144 -42
  113. package/dist/{reload-RBi1nj6Z.mjs → reload-Ck9RJeSq.mjs} +1 -1
  114. package/dist/{remote-BmvMCcJw.mjs → remote-DEZ7AOVq.mjs} +7 -7
  115. package/dist/{result-Cx5CRLvS.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-BTiGPEjS.mjs → server-command-C0pmjNdG.mjs} +6 -6
  120. package/dist/server-expo-CEntXzRw.mjs +2 -0
  121. package/dist/{server-expo-D9lEz4aq.mjs → server-expo-Tt_hLRpy.mjs} +37 -13
  122. package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
  123. package/dist/{settings-eKF_vJJs.mjs → settings-kkt0vP4w.mjs} +1 -1
  124. package/dist/{settings-write-79mQRr9C.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-D7M2nE4b.mjs → slot-launch-A1BgotaM.mjs} +6 -6
  128. package/dist/{stage-DKNM4ZPd.mjs → stage-ERTMh88n.mjs} +2 -3
  129. package/dist/{start-bjfiScgz.mjs → start-BKGrEhzG.mjs} +75 -35
  130. package/dist/{start-CRfN1kWV.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-DioA6cBU.mjs → stats-B-ckuiUg.mjs} +5 -5
  134. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  135. package/dist/{status-kzbeWk4x.mjs → status-DfFp6a76.mjs} +24 -24
  136. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  137. package/dist/{status-Eqx_20WC.mjs → status-Pw-807f0.mjs} +1 -1
  138. package/dist/{status-watch-BIqqbJ6q.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-B18d8KDw.mjs → stop-BFu7X_Do.mjs} +2 -2
  143. package/dist/{stop-B2uLQfoM.mjs → stop-CL1kDHds.mjs} +55 -21
  144. package/dist/{stop-DzLJc7Ei.mjs → stop-DhclRwOO.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +16 -16
  146. package/dist/{support-BTpZ6RAJ.mjs → support-B1W-hmC2.mjs} +8 -8
  147. package/dist/{support-DTBV56gy.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-r_WSKlXr.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
  150. package/dist/{toolchain-GVgnf8d1.mjs → toolchain-BjgKdoEf.mjs} +1 -1
  151. package/dist/{toolchain-CWeGJgCc.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-CwREhjD-.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-BxzYlo3P.mjs → workspaces-CSV2Orf4.mjs} +36 -32
  162. package/dist/{worktree-BxfVxG_b.mjs → worktree-DEDUzO_L.mjs} +1 -1
  163. package/dist/{worktree-8lqn_lBp.mjs → worktree-Dw8kfacb.mjs} +324 -99
  164. package/dist/{xcode-iQnROM5o.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-C-Buqvn_.mjs +0 -2
  168. package/dist/trigger-yb_nFzPF.mjs +0 -2
  169. package/dist/web-Cduk0NSE.mjs +0 -2
@@ -1,22 +1,21 @@
1
- import { g as process_identity_exports, i as withWorkspaceProcessLock, r as WorkspaceProcessCleanupError, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, S as process_identity_exports, c as throwIfCancelled, l as WorkspaceProcessCleanupError, s as cancelledError, t as getExecutor, u as withWorkspaceProcessLock } from "./exec-VFRpu1iA.mjs";
2
2
  import { d as workspaceDir, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
3
- import { p as getProject } from "./config-DlrsduwG.mjs";
4
- import { l as phaseLine } from "./command-output-Db8BqzxH.mjs";
5
- import { d as cancelledError, f as throwIfCancelled } from "./operation-exec-BW0em61G.mjs";
6
- import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
7
- import { a as SETTING_SHAPE_REMEDY, at as webSettings, j as metroPortSetting } from "./settings-C7O8A6ZI.mjs";
8
- import { b as isPackageResolvable, v as detectIsExpo } from "./project-CTLNHCfE.mjs";
3
+ import { p as getProject } from "./config-BZhXY15H.mjs";
4
+ import { l as phaseLine } from "./command-output-DxC0k2rk.mjs";
5
+ import { l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
6
+ import { a as SETTING_SHAPE_REMEDY, at as webSettings, j as metroPortSetting } from "./settings-RKwY33wv.mjs";
7
+ import { b as isPackageResolvable, v as detectIsExpo } from "./project-Dz-hWkb-.mjs";
8
+ import { d as resolveProjectMetro } from "./metro-Bu8LBfzS.mjs";
9
9
  import { s as readNdjsonGenerations$1 } from "./ndjson-CgE_o3Dl.mjs";
10
- import { d as resolveProjectMetro } from "./metro-DiXtA3Ty.mjs";
11
- import { f as webLogFile, m as webSupervisorLogFile, o as readWebRecord, s as updateWebRecord } from "./state--smjFSTL.mjs";
12
- import { en as readMetroRecords } from "./budget-DnPX3DXj.mjs";
13
- import { E as teardownBrowserHeld, h as resolveSupervisorTarget } from "./workspaces-BxzYlo3P.mjs";
14
- import { i as reserveBrowserPort, n as getNamedPort } from "./named-ports-DkEzOfzO.mjs";
15
- import { n as sendToOwnedPage, t as liveWebRecord } from "./page-DBL2PiUU.mjs";
16
- import { o as resolveWorkspaceMetroPort } from "./start-bjfiScgz.mjs";
10
+ import { f as webLogFile, m as webSupervisorLogFile, o as readWebRecord, s as updateWebRecord } from "./state-B1ig0Kqy.mjs";
11
+ import { nn as readMetroRecords } from "./budget-dPGuhNai.mjs";
12
+ import { D as teardownBrowserHeld, g as resolveSupervisorTarget } from "./workspaces-CSV2Orf4.mjs";
13
+ import { i as reserveBrowserPort, n as getNamedPort } from "./named-ports-BWDuU5oQ.mjs";
14
+ import { n as sendToOwnedPage, t as liveWebRecord } from "./page-CzEA_-5_.mjs";
15
+ import { o as resolveWorkspaceMetroPort } from "./start-BKGrEhzG.mjs";
17
16
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
18
- import { n as windowsLauncherArgs } from "./detached-entry-BwNEtIrP.mjs";
19
- import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-Bbw689-6.mjs";
17
+ import { n as windowsLauncherArgs } from "./detached-entry-KmieOKgN.mjs";
18
+ import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-BvV8ssI3.mjs";
20
19
  import { randomUUID } from "node:crypto";
21
20
  import { mkdirSync, openSync, statSync, watch } from "node:fs";
22
21
  import { ambientEnv } from "@stim-cli/core";
@@ -260,7 +259,7 @@ async function launchOwnedBrowser({ url, config }, { root, note, signal }) {
260
259
  const since = Date.now();
261
260
  try {
262
261
  await sendToOwnedPage(live, "Page.navigate", { url }, signal);
263
- updateWebRecord(root, live, { url });
262
+ await withWorkspaceStateLockAsync(root, () => updateWebRecord(root, live, { url }));
264
263
  note(chalk.dim(phaseLine("device", `reusing the owned Chrome (pid ${live.chromeProcess?.pid})`)));
265
264
  return {
266
265
  ok: true,
@@ -1,25 +1,26 @@
1
- import { a as workspaceProcessLockError, b as debugLog, g as process_identity_exports, i as withWorkspaceProcessLock, m as operationState, n as isTimeoutError, p as isTermination, r as WorkspaceProcessCleanupError, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, E as debugLog, S as process_identity_exports, b as operationState, c as throwIfCancelled, d as workspaceProcessLockError, l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, s as cancelledError, t as getExecutor, u as withWorkspaceProcessLock, y as isTermination } from "./exec-VFRpu1iA.mjs";
2
2
  import { d as workspaceDir, f as workspaceId$1, g as workspaceStateFile$1, i as sharedBuildCache, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
3
- import { D as withConfigLock$1, F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, L as measuredDirectorySizeAsync, M as directorySize, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, _ as loadConfig$1, a as clearDevice, d as getConfigDir, o as clearSupervisor, p as getProject } from "./config-DlrsduwG.mjs";
3
+ import { D as withConfigLock$1, F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, L as measuredDirectorySizeAsync, M as directorySize, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, _ as loadConfig$1, a as clearDevice, d as getConfigDir, o as clearSupervisor, p as getProject } from "./config-BZhXY15H.mjs";
4
4
  import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
5
- import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-Db8BqzxH.mjs";
6
- import { a as killOnAbort, d as cancelledError, f as throwIfCancelled, n as runOperationFileQuiet, r as childEnvironment, t as runOperationFile, u as cancellableSleep } from "./operation-exec-BW0em61G.mjs";
7
- import { d as writeWorkspaceState, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-U08dEzhG.mjs";
8
- import { J as resolveProjectSettingsAsync, d as androidLayoutSetting, lt as planMetroReach } from "./settings-C7O8A6ZI.mjs";
9
- import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-CTLNHCfE.mjs";
5
+ import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-DxC0k2rk.mjs";
6
+ import { a as killOnAbort, n as runOperationFileQuiet, r as childEnvironment, t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
7
+ import { d as writeWorkspaceState, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-CeBpIZgr.mjs";
8
+ import { J as resolveProjectSettingsAsync, d as androidLayoutSetting, lt as planMetroReach } from "./settings-RKwY33wv.mjs";
9
+ import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-Dz-hWkb-.mjs";
10
+ import { F as listAvdsAsync, G as ownedAvdSerialResolverAsync, I as listInstalledSystemImages, J as parseAvdSystemImage, V as ownedAvdDirectory, W as ownedAvdSerialResolver, d as androidToolPath, dt as isStimOwnedSim, m as avdIniPaths, mt as dropParked, o as androidHome, q as parseAvdDeviceProfile, ut as isStimOwnedAvd, v as avdStorageRoots, yt as readParked } from "./android-882m4hxX.mjs";
11
+ import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-Bu8LBfzS.mjs";
10
12
  import { r as createNdjsonWriter, s as readNdjsonGenerations$1 } from "./ndjson-CgE_o3Dl.mjs";
11
- import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-DiXtA3Ty.mjs";
12
- import { C as environmentState, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as formatSpace, y as capacity } from "./eas-session-ledger-BzzsX97d.mjs";
13
- import { i as registeredCaches } from "./cache-manifest-DSeQjt-Q.mjs";
13
+ import { C as environmentState, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as formatSpace, y as capacity } from "./eas-session-ledger-Ck6YXPAO.mjs";
14
+ import { i as registeredCaches } from "./cache-manifest-BPXRONJz.mjs";
14
15
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
15
- import { c as nativeRunWaitNotice, d as runCancellationSignal, m as claimForEmptying } from "./native-run-BUTu8T7A.mjs";
16
- import { A as teardownParkedAvd, D as teardownOwnedAvd, F as writeUsageCache, L as listBuildSlots, M as probePublicHttp, N as canonical, P as measureDu, T as eraseParkedIosSim, a as collectWorkspaceOutputs, f as withIdleWorkspace, h as resolveSupervisorTarget, j as teardownParkedIosSim, k as teardownOwnedIosSim, r as clearWorkspaceOutputs, w as eraseParkedAvd, z as GC_OUTPUT } from "./workspaces-BxzYlo3P.mjs";
17
- import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, i as createActivityReaderAsync, o as envDir, p as readHostProcessTableAsync, r as createActivityReader, s as idleForMs, x as listLeaseFiles } from "./activity-B5RtpFda.mjs";
18
- import { F as listAvdsAsync, G as ownedAvdSerialResolverAsync, I as listInstalledSystemImages, J as parseAvdSystemImage, V as ownedAvdDirectory, W as ownedAvdSerialResolver, d as androidToolPath, lt as isStimOwnedAvd, m as avdIniPaths, o as androidHome, pt as dropParked, q as parseAvdDeviceProfile, ut as isStimOwnedSim, v as avdStorageRoots, vt as readParked } from "./android-C7sVmyI9.mjs";
19
- import { B as deviceHoldsBundle, D as sanitizeDeviceLabel, b as parseSimctlList, f as listAllIosSimsAsync, g as listUserApps, k as uninstallIosApp, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion, z as deviceHoldsApk } from "./ios-hcBpnEGk.mjs";
16
+ import { c as nativeRunWaitNotice, d as runCancellationSignal, m as claimForEmptying } from "./native-run-BmH7U8pr.mjs";
17
+ import { A as teardownOwnedIosSim, B as GC_OUTPUT, E as eraseParkedIosSim, F as measureDu, I as writeUsageCache, M as teardownParkedIosSim, N as probePublicHttp, O as teardownOwnedAvd, P as canonical, R as listBuildSlots, T as eraseParkedAvd, a as collectWorkspaceOutputs, g as resolveSupervisorTarget, j as teardownParkedAvd, p as withIdleWorkspace, r as clearWorkspaceOutputs } from "./workspaces-CSV2Orf4.mjs";
18
+ import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, i as createActivityReaderAsync, o as envDir, p as readHostProcessTableAsync, r as createActivityReader, s as idleForMs, x as listLeaseFiles } from "./activity-Dq3ZcdD8.mjs";
19
+ import { c as expoConfigContents } from "./build-cache-HFUQ9eLz.mjs";
20
+ import { D as sanitizeDeviceLabel, H as deviceHoldsBundle, V as deviceHoldsApk, b as parseSimctlList, f as listAllIosSimsAsync, g as listUserApps, k as uninstallIosApp, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion } from "./ios-CVUFFZ6C.mjs";
20
21
  import { n as supervisorError } from "./errors-ccaPc4ox.mjs";
21
- import { n as expoBinFromPackage, r as expoBinPath, s as findBinUpward } from "./server-expo-D9lEz4aq.mjs";
22
- import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-BXZ0c7Kb.mjs";
22
+ import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-Tt_hLRpy.mjs";
23
+ import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-B6HK951C.mjs";
23
24
  import { createRequire } from "node:module";
24
25
  import { randomUUID } from "node:crypto";
25
26
  import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, statfsSync, writeFileSync } from "node:fs";
@@ -2224,7 +2225,10 @@ async function readProjectConfig(root, { context, run = null, timeoutMs = CONFIG
2224
2225
  "config",
2225
2226
  "--json",
2226
2227
  root
2227
- ], { timeoutMs });
2228
+ ], {
2229
+ timeoutMs,
2230
+ env: expoTelemetryEnv(context?.env ?? process.env)
2231
+ });
2228
2232
  } catch (err) {
2229
2233
  if (err instanceof Error && "code" in err && err.code === "STIM_CLAIM_UNAVAILABLE") throw err;
2230
2234
  context?.signal.throwIfAborted();
@@ -2239,9 +2243,24 @@ async function readProjectConfig(root, { context, run = null, timeoutMs = CONFIG
2239
2243
  return { unavailable: `\`expo config --json\` did not print JSON: ${firstLine(err)}` };
2240
2244
  }
2241
2245
  }
2242
- async function loadProjectProvider(projectRoot, { context, isExpo = true, run = null, requireFrom = null, timeoutMs = CONFIG_TIMEOUT_MS } = {}) {
2246
+ /**
2247
+ * The app config the fingerprint already evaluated, for a dynamic config. @expo/fingerprint's ExpoConfigEASProject
2248
+ * skip removes `owner`, so a missing owner under the EAS provider cannot be told from a stripped one and is read from
2249
+ * `expo config --json` instead.
2250
+ */
2251
+ function fingerprintedConfig(projectRoot, sources) {
2252
+ if (!sources || !dynamicConfigFile(projectRoot)) return null;
2253
+ const config = expoConfigContents(sources);
2254
+ if (!config) return null;
2255
+ if (normalizeProvider(providerFromConfig(config))?.reference === "eas-build-cache-provider" && ownerFromConfig(config) === null) return null;
2256
+ return {
2257
+ config,
2258
+ source: "fingerprint"
2259
+ };
2260
+ }
2261
+ async function loadProjectProvider(projectRoot, { context, isExpo = true, run = null, requireFrom = null, timeoutMs = CONFIG_TIMEOUT_MS, sources } = {}) {
2243
2262
  if (!isExpo) return { none: true };
2244
- const read = await readProjectConfig(projectRoot, {
2263
+ const read = fingerprintedConfig(projectRoot, sources) ?? await readProjectConfig(projectRoot, {
2245
2264
  context,
2246
2265
  run,
2247
2266
  timeoutMs
@@ -2779,9 +2798,9 @@ async function writeIosDevMenuOffDefaults(udid, bundleId, exec) {
2779
2798
  "false"
2780
2799
  ], { timeoutMs: 6e4 });
2781
2800
  }
2782
- function describeIosSimulatorFailure(error, exec) {
2801
+ async function describeIosSimulatorFailure(error, exec) {
2783
2802
  const detail = describe$1(error);
2784
- return error?.code === "ETIMEDOUT" ? `${detail}. ${iosSimulatorFailureAdvice(exec)}` : detail;
2803
+ return error?.code === "ETIMEDOUT" ? `${detail}. ${await iosSimulatorFailureAdvice(exec)}` : detail;
2785
2804
  }
2786
2805
  async function installIosApp({ udid, appPath, bundleId = null, devClientScheme = null, schemeApprovals = [], proveInstalled = true }, { exec = null, now = null } = {}) {
2787
2806
  const e = exec || getExecutor();
@@ -2805,7 +2824,7 @@ async function installIosApp({ udid, appPath, bundleId = null, devClientScheme =
2805
2824
  return {
2806
2825
  failed: true,
2807
2826
  code: INSTALL_ERROR,
2808
- reason: `simctl install failed for ${appPath}: ${describeIosSimulatorFailure(err, e)}`
2827
+ reason: `simctl install failed for ${appPath}: ${await describeIosSimulatorFailure(err, e)}`
2809
2828
  };
2810
2829
  }
2811
2830
  const artifactFinishedAt = now?.();
@@ -2831,7 +2850,7 @@ async function installIosApp({ udid, appPath, bundleId = null, devClientScheme =
2831
2850
  return {
2832
2851
  failed: true,
2833
2852
  code: INSTALL_ERROR,
2834
- reason: `Installed ${bundleId}, but could not prepare the dev client: ${describeIosSimulatorFailure(err, e)}`
2853
+ reason: `Installed ${bundleId}, but could not prepare the dev client: ${await describeIosSimulatorFailure(err, e)}`
2835
2854
  };
2836
2855
  }
2837
2856
  const devClientPreparationDurationMs = now && preparationStartedAt !== void 0 ? now() - preparationStartedAt : void 0;
@@ -2911,7 +2930,7 @@ function appProcessFromPid(pid) {
2911
2930
  pid
2912
2931
  };
2913
2932
  }
2914
- async function iosAppProcess(udid, bundleId, { exec = null } = {}) {
2933
+ async function iosAppProcess(udid, bundleId, { exec = null, timeoutMs = 2e3 } = {}) {
2915
2934
  const e = exec || getExecutor();
2916
2935
  const started = performance.now();
2917
2936
  let probe = { state: "unknown" };
@@ -2923,7 +2942,7 @@ async function iosAppProcess(udid, bundleId, { exec = null } = {}) {
2923
2942
  udid,
2924
2943
  "launchctl",
2925
2944
  "list"
2926
- ], { timeoutMs: 2e3 });
2945
+ ], { timeoutMs });
2927
2946
  const label = `UIKitApplication:${bundleId}[`;
2928
2947
  probe = { state: "stopped" };
2929
2948
  for (const line of out.split("\n")) {
@@ -2987,7 +3006,7 @@ async function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null,
2987
3006
  return {
2988
3007
  failed: true,
2989
3008
  code: LAUNCH_ERROR,
2990
- reason: `simctl terminate ${bundleId} failed, so the running app (pid ${running.pid}) was not restarted: ${describeIosSimulatorFailure(err, e)}`
3009
+ reason: `simctl terminate ${bundleId} failed, so the running app (pid ${running.pid}) was not restarted: ${await describeIosSimulatorFailure(err, e)}`
2991
3010
  };
2992
3011
  }
2993
3012
  restart.restartedPid = running.pid;
@@ -3008,7 +3027,7 @@ async function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null,
3008
3027
  return {
3009
3028
  failed: true,
3010
3029
  code: LAUNCH_ERROR,
3011
- reason: `Could not point ${bundleId} at Metro port ${metroPort} (defaults write RCT_jsLocation): ${describeIosSimulatorFailure(err, e)}`
3030
+ reason: `Could not point ${bundleId} at Metro port ${metroPort} (defaults write RCT_jsLocation): ${await describeIosSimulatorFailure(err, e)}`
3012
3031
  };
3013
3032
  }
3014
3033
  if (devClientScheme) {
@@ -3020,7 +3039,7 @@ async function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null,
3020
3039
  return {
3021
3040
  failed: true,
3022
3041
  code: LAUNCH_ERROR,
3023
- reason: `Could not turn off ${bundleId}'s dev menu before opening it (defaults write): ${describeIosSimulatorFailure(err, e)}`
3042
+ reason: `Could not turn off ${bundleId}'s dev menu before opening it (defaults write): ${await describeIosSimulatorFailure(err, e)}`
3024
3043
  };
3025
3044
  }
3026
3045
  let launchedWithInitialUrl = false;
@@ -3069,7 +3088,7 @@ async function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null,
3069
3088
  return {
3070
3089
  failed: true,
3071
3090
  code: LAUNCH_ERROR,
3072
- reason: `simctl ${launchedWithInitialUrl ? `launch ${bundleId}` : `openurl ${url}`} failed: ${describeIosSimulatorFailure(err, e)}`
3091
+ reason: `simctl ${launchedWithInitialUrl ? `launch ${bundleId}` : `openurl ${url}`} failed: ${await describeIosSimulatorFailure(err, e)}`
3073
3092
  };
3074
3093
  }
3075
3094
  }
@@ -3098,7 +3117,7 @@ async function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null,
3098
3117
  return {
3099
3118
  failed: true,
3100
3119
  code: LAUNCH_ERROR,
3101
- reason: `simctl launch ${bundleId} failed: ${describeIosSimulatorFailure(err, e)}`
3120
+ reason: `simctl launch ${bundleId} failed: ${await describeIosSimulatorFailure(err, e)}`
3102
3121
  };
3103
3122
  }
3104
3123
  }
@@ -4052,6 +4071,7 @@ function resolveMetroOrigin({ metroPort, publicUrl = null, mode = "auto", isExpo
4052
4071
  remedy: "This is a Stim bug: the tunnel step did not run before the launch."
4053
4072
  };
4054
4073
  }
4074
+ const EAS_PROJECT_NOT_CONFIGURED = /EAS project not configured/i;
4055
4075
  function describe(err) {
4056
4076
  const e = err;
4057
4077
  const stderr = typeof e?.stderr === "string" ? e.stderr.trim() : "";
@@ -4137,7 +4157,8 @@ function remoteDeviceDeps(ctx) {
4137
4157
  reason: cleanup.reason ?? `Could not verify recorded EAS session ${recorded.sessionId}.`,
4138
4158
  remedy: "Inspect the recorded session, then run `stim stop` again."
4139
4159
  };
4140
- clearRemoteSession(ctx.root, recorded.sessionId);
4160
+ const sessionId = recorded.sessionId;
4161
+ await withWorkspaceStateLockAsync(ctx.root, () => clearRemoteSession(ctx.root, sessionId));
4141
4162
  }
4142
4163
  }
4143
4164
  }
@@ -4168,9 +4189,16 @@ function remoteDeviceDeps(ctx) {
4168
4189
  remedy: `Run \`eas simulator:list --name ${name}\` and stop any running session with \`eas simulator:stop --id <id>\`, then retry.`
4169
4190
  };
4170
4191
  }
4192
+ const failure = describe(err);
4193
+ if (EAS_PROJECT_NOT_CONFIGURED.test(failure)) return {
4194
+ failed: true,
4195
+ code: "STIM_REMOTE_EAS_UNAVAILABLE",
4196
+ reason: "The Expo app is not linked to an EAS project, so no EAS Simulator session was created.",
4197
+ remedy: `Link it with \`eas init --id <project-id> --non-interactive\` (existing project) or \`eas init --account <account-name> --non-interactive\` (new project), then run \`stim ${ctx.platform ?? "ios"} --remote eas\` again.`
4198
+ };
4171
4199
  return {
4172
4200
  failed: true,
4173
- reason: `eas sim failed: ${describe(err)}`
4201
+ reason: `eas sim failed: ${failure}`
4174
4202
  };
4175
4203
  }
4176
4204
  const created = parseCreatedSession(stdout);
@@ -4379,6 +4407,18 @@ async function resolveRemoteContext({ root, backend, platform = "ios", easBin, e
4379
4407
  code: "STIM_BAD_ARG"
4380
4408
  };
4381
4409
  }
4410
+ let sessionMaxMinutes = maxDurationMinutes;
4411
+ if (backend === "eas" && sessionMaxMinutes === null) {
4412
+ const setting = settingDefinition("remote.easMaxDurationMinutes");
4413
+ const configured = loadConfig$1()?.remote?.easMaxDurationMinutes;
4414
+ const problem = setting && configured !== void 0 ? settingValueError(setting, configured) : null;
4415
+ if (problem) return {
4416
+ failed: `Invalid remote.easMaxDurationMinutes value ${JSON.stringify(configured)}. Expected ${problem}.`,
4417
+ remedy: "Run `stim settings set remote.easMaxDurationMinutes <minutes> --scope machine`, then retry.",
4418
+ code: "STIM_BAD_ARG"
4419
+ };
4420
+ sessionMaxMinutes = typeof configured === "number" ? configured : Number(setting?.default);
4421
+ }
4382
4422
  return { ctx: {
4383
4423
  root,
4384
4424
  label: `${ownedDeviceLabel(root)}-${workspaceId$1(root)}`,
@@ -4387,7 +4427,7 @@ async function resolveRemoteContext({ root, backend, platform = "ios", easBin, e
4387
4427
  easBin: easBin ?? "",
4388
4428
  agentDeviceBin,
4389
4429
  operation,
4390
- maxDurationMinutes,
4430
+ maxDurationMinutes: sessionMaxMinutes,
4391
4431
  deviceType: backend === "eas" ? deviceType : null,
4392
4432
  publicMetroUrl: null,
4393
4433
  existingDaemon
@@ -4504,7 +4544,7 @@ async function ensureRemoteBootOwned({ root, platform, sessionName, startedAt, d
4504
4544
  const sessionId = createdSessionId();
4505
4545
  if (!sessionId) return booted;
4506
4546
  try {
4507
- recordEasSessionClaim({
4547
+ await recordEasSessionClaim({
4508
4548
  sessionId,
4509
4549
  name: sessionName,
4510
4550
  platform,
@@ -4513,7 +4553,7 @@ async function ensureRemoteBootOwned({ root, platform, sessionName, startedAt, d
4513
4553
  stateFile: workspaceStateFile$1(root)
4514
4554
  }, ledgerRoot);
4515
4555
  const preview = webPreviewUrl();
4516
- writeState(root, { remoteDevice: {
4556
+ await writeState(root, { remoteDevice: {
4517
4557
  platform,
4518
4558
  sessionId,
4519
4559
  startedAt,
@@ -5777,8 +5817,8 @@ async function deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRe
5777
5817
  projectPath: d.project,
5778
5818
  slot: d.slot
5779
5819
  } } : {},
5780
- ..."project" in d ? { onRemoved: () => {
5781
- if (clearDevice(d.project, d.kind, d.slot, d.id)) output.log(chalk.dim(` cleared the ${d.kind} record for ${d.project}`));
5820
+ ..."project" in d ? { onRemoved: async () => {
5821
+ if (await withConfigLockAsync$1(() => clearDevice(d.project, d.kind, d.slot, d.id))) output.log(chalk.dim(` cleared the ${d.kind} record for ${d.project}`));
5782
5822
  } } : {},
5783
5823
  ..."orphanedDirectory" in d ? { orphanedDirectory: d.orphanedDirectory } : {}
5784
5824
  });
@@ -5811,7 +5851,7 @@ async function deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRe
5811
5851
  for (const d of staleDevices) {
5812
5852
  const status = await reap(d);
5813
5853
  if (d.kind === "ios" && (status === "torn-down" || status === "missing")) {
5814
- clearDevice(d.project, d.kind, d.slot, d.id);
5854
+ await withConfigLockAsync$1(() => clearDevice(d.project, d.kind, d.slot, d.id));
5815
5855
  output.log(chalk.dim(` cleared the ${d.kind} record for ${d.project}`));
5816
5856
  }
5817
5857
  }
@@ -7645,6 +7685,7 @@ const NO_BUILD_PROGRESS = {
7645
7685
  waitingFor: () => {},
7646
7686
  output: () => {},
7647
7687
  durations: () => ({}),
7688
+ phase: () => null,
7648
7689
  steps: () => null,
7649
7690
  clear: () => {}
7650
7691
  };
@@ -7671,6 +7712,23 @@ function tapBuildLog(writer, progress) {
7671
7712
  }
7672
7713
  };
7673
7714
  }
7715
+ function runFailureRecord({ code, message, phase }) {
7716
+ return {
7717
+ src: "build",
7718
+ level: "error",
7719
+ event: "run_failed",
7720
+ ...code ? { code } : {},
7721
+ ...phase ? { phase } : {},
7722
+ msg: [code, message].filter(Boolean).join(": ") || "the run failed"
7723
+ };
7724
+ }
7725
+ function thrownRunFailureRecord(error, phase) {
7726
+ return runFailureRecord({
7727
+ code: typeof error === "object" && error !== null && "code" in error && typeof error.code === "string" ? error.code : void 0,
7728
+ message: error instanceof Error ? error.message : String(error),
7729
+ phase
7730
+ });
7731
+ }
7674
7732
  const DETAIL_WRITE_MS = 2e3;
7675
7733
  function toolLine(record) {
7676
7734
  if (!record || typeof record !== "object") return null;
@@ -7853,6 +7911,9 @@ function startBuildProgress({ root, platform, slot, claim, now = Date.now, note
7853
7911
  durations() {
7854
7912
  return phaseDurations(record.phases, now());
7855
7913
  },
7914
+ phase() {
7915
+ return record.phase;
7916
+ },
7856
7917
  steps() {
7857
7918
  const detail = parser.detail("");
7858
7919
  return detail?.unit === "steps" ? detail.total : null;
@@ -9282,4 +9343,4 @@ function budgetLine(report) {
9282
9343
  return `${report.volumes.length ? `${report.volumes.map((v) => `${v.freeGb} GB free on ${v.volume}`).join(", ")} (reclaims below ${Math.max(budget.minFreeDiskGb, budget.hardFloorDiskGb)} GB, ${budget.hardFloorDiskGb ? `refuses below ${budget.hardFloorDiskGb} GB` : "never refuses"})` : "disk budget off"}; ${report.memory ? `roughly ${report.memory.committedGb} GB of a ${budget.maxCommittedMemoryGb} GB memory budget committed` : "memory budget off"}`;
9283
9344
  }
9284
9345
  //#endregion
9285
- export { includesRecordings as $, MIN_EAS_CLI_DEVICE_VERSION as $n, readCollectorRecords as $t, workspaceBuildInProgress as A, readBundleSchemes as An, unverifiedDeviceCommand as At, recordFinishedBuild as B, checkEasAuth as Bn, ensureMetroReachable as Bt, collectIdleDevices as C, launchAndroidApp as Cn, describeParkedSims as Ct, idleDeviceLines as D, reverseMetroPorts as Dn, findOrphanedDevices as Dt, collectOwnedDeviceActivityAsync as E, restartedAppNote as En, eraseParkedDevices as Et, buildStatusLine as F, processContext as Fn, withRemoteSessionGcLocks as Ft, readStats$1 as G, providerFromConfig as Gn, resolveRemoteContext as Gt, tapBuildLog as H, isEasAuthFailureText as Hn, readInstalledEasCliVersionAsync as Ht, bundlingActivity as I, runProcessOperation as In, REMOTE_SESSION_ERROR as It, recordRunStats as J, resolveRemote as Jn, LAUNCH_FATAL as Jt, recordCapacityRefusal as K, readProjectConfig as Kn, withEasProjectLock as Kt, estimateBuild as L, RESOLVE_TIMEOUT_MS as Ln, binOnPath as Lt, NO_BUILD_PROGRESS as M, readRemoteSimulatorArch as Mn, collectEasSessionSweep as Mt, activeBuildState as N, gateMetroOrigin as Nn, deleteEasSessions as Nt, parseIdleDuration as O, writeDebugHttpHost as On, findStaleDeviceRecords as Ot, buildReport as P, exitAfterFlush as Pn, describeError as Pt, includesParkedDevices as Q, remoteCommand as Qn, isBundleProof as Qt, parseActiveBuild as R, UPLOAD_TIMEOUT_MS as Rn, bundleEntryPoint as Rt, withdrawDevServerStopRequest as S, iosAppProcess as Sn, sizeCaches as Sr, deleteProjectDevices as St, collectOwnedDeviceActivity as T, launchIosApp as Tn, deviceSweepIsScoped as Tt, createRunRecorder as U, loadProjectProvider as Un, remoteAndroidDeps as Ut, startBuildProgress as V, easAuthNote as Vn, ensureRemoteBootOwned as Vt, readRunEstimates as W, ownerFromConfig as Wn, remoteIosDeps as Wt, emptyCaches as X, bundleInvocation as Xn, RELEASE_VERIFY_WAIT_MS as Xt, statsProjectKey$1 as Y, uploadRemote as Yn, LAUNCH_UNVERIFIED as Yt, includesArchives as Z, remoteCliInvocation as Zn, VERIFY_TIMEOUT_MS as Zt, devServerStopRecord as _, ensureMetroReverse as _n, phase as _r, collectDeviceLeases as _t, inspectBudget as a, verifyReleaseLaunch as an, GRADLE_DAEMONS_KIND as ar, selectsBeyondCaches as at, requestDevServerStop as b, installConflictKind as bn, discoverCaches as br, deleteParkedAvds as bt, readVolumeSpace as c, DEFAULT_METRO_PORT as cn, inspectWatchmanMemory as cr, deleteGradleVersion as ct, trimmableCaches as d, androidAppProcess as dn, memoryScope as dr, gradleVersionsPending as dt, readMetroRecords as en, MIN_EAS_CLI_SIMULATOR_VERSION as er, includesWorkspaceOutputs as et, stopOwnedMetro as f, androidDevClientUrl as fn, memorySweepIsScoped as fr, includesGradleVersions as ft, devServerStopLevel as g, deviceShellArg as gn, stopIdleGradleDaemons as gr, DEVICE_LIST_TIMEOUT_MS$1 as gt, describeMetroLastStop as h, devClientUrl as hn, scopedMemoryReport as hr, collectInventory as ht, enforceBudget as i, verifyLaunch as in, parseArchiveSelector as ir, selectCaches as it, ACTIVE_BUILD_KEY as j, schemesFromInfoPlist as jn, withAndroidAvdSizes as jt, shutDownIdleDevices as k, pickDevClientScheme as kn, findStaleProjectDevices as kt, readVolumeSpaceAsync as l, INSTALL_ERROR as ln, memoryCacheKind as lr, deleteGradleVersions as lt, describeDevServerStop as m, clearOtherUserApps as mn, reclaimMemory as mr, getMachineCacheReport as mt, budgetLine as n, unverifiedLaunchLines as nn, easCliUpgradeRemedy as nr, planCacheEmptying as nt, machineNumber as o, APP_READINESS_TIMEOUT_MS as on, WATCHMAN_KIND as or, trimCaches as ot, stopOwnedMetroForReset as p, appProcessFromPid as pn, memoryWorkPending as pr, waitForGradleExit as pt, recordCapacityWait as q, resolveEasCliBin as qn, LAUNCH_BUNDLING as qt, cacheLabel as r, verifyAndroidReleaseLaunch as rn, ownedSessionName as rr, previewScopedEmptying as rt, peekBudget as s, ADB_INSTALL_TIMEOUT_MS as sn, collectMemoryReport as sr, collectGradleVersions as st, budgetGate as t, unattributedLaunchLines as tn, easCliSupport as tr, isWorkspacesScope as tt, resolveBudget as u, IOS_DEV_MENU_OFF_DEFAULTS_PLIST as un, memoryLines as ur, gradleVersionLines as ut, logVanishedSupervisor as v, hasMetroReverse as vn, attributeMachineUsage as vr, collectParkedAvds as vt, collectIdleDevicesAsync as w, launchAndroidReleaseApp as wn, describeUnverifiableDevices as wt, vanishedSupervisorMessage as x, installIosApp as xn, pruneCache as xr, deleteParkedSims as xt, metroLastStop as y, installAndroidApp as yn, readFootprints as yr, collectParkedSims as yt, recordBuildPhase as z, cacheLevel as zn, endRecordedSession as zt };
9346
+ export { includesArchives as $, remoteCliInvocation as $n, VERIFY_TIMEOUT_MS as $t, workspaceBuildInProgress as A, writeDebugHttpHost as An, findStaleDeviceRecords as At, recordFinishedBuild as B, UPLOAD_TIMEOUT_MS as Bn, bundleEntryPoint as Bt, collectIdleDevices as C, installIosApp as Cn, pruneCache as Cr, deleteParkedSims as Ct, idleDeviceLines as D, launchIosApp as Dn, deviceSweepIsScoped as Dt, collectOwnedDeviceActivityAsync as E, launchAndroidReleaseApp as En, describeUnverifiableDevices as Et, buildStatusLine as F, gateMetroOrigin as Fn, deleteEasSessions as Ft, createRunRecorder as G, loadProjectProvider as Gn, remoteAndroidDeps as Gt, startBuildProgress as H, checkEasAuth as Hn, ensureMetroReachable as Ht, bundlingActivity as I, exitAfterFlush as In, describeError as It, recordCapacityRefusal as J, readProjectConfig as Jn, withEasProjectLock as Jt, readRunEstimates as K, ownerFromConfig as Kn, remoteIosDeps as Kt, estimateBuild as L, processContext as Ln, withRemoteSessionGcLocks as Lt, NO_BUILD_PROGRESS as M, readBundleSchemes as Mn, unverifiedDeviceCommand as Mt, activeBuildState as N, schemesFromInfoPlist as Nn, withAndroidAvdSizes as Nt, parseIdleDuration as O, restartedAppNote as On, eraseParkedDevices as Ot, buildReport as P, readRemoteSimulatorArch as Pn, collectEasSessionSweep as Pt, emptyCaches as Q, bundleInvocation as Qn, RELEASE_VERIFY_WAIT_MS as Qt, parseActiveBuild as R, runProcessOperation as Rn, REMOTE_SESSION_ERROR as Rt, withdrawDevServerStopRequest as S, installConflictKind as Sn, discoverCaches as Sr, deleteParkedAvds as St, collectOwnedDeviceActivity as T, launchAndroidApp as Tn, describeParkedSims as Tt, tapBuildLog as U, easAuthNote as Un, ensureRemoteBootOwned as Ut, runFailureRecord as V, cacheLevel as Vn, endRecordedSession as Vt, thrownRunFailureRecord as W, isEasAuthFailureText as Wn, readInstalledEasCliVersionAsync as Wt, recordRunStats as X, resolveRemote as Xn, LAUNCH_FATAL as Xt, recordCapacityWait as Y, resolveEasCliBin as Yn, LAUNCH_BUNDLING as Yt, statsProjectKey$1 as Z, uploadRemote as Zn, LAUNCH_UNVERIFIED as Zt, devServerStopRecord as _, devClientUrl as _n, scopedMemoryReport as _r, collectInventory as _t, inspectBudget as a, verifyAndroidReleaseLaunch as an, ownedSessionName as ar, previewScopedEmptying as at, requestDevServerStop as b, hasMetroReverse as bn, attributeMachineUsage as br, collectParkedAvds as bt, readVolumeSpace as c, APP_READINESS_TIMEOUT_MS as cn, WATCHMAN_KIND as cr, trimCaches as ct, trimmableCaches as d, INSTALL_ERROR as dn, memoryCacheKind as dr, deleteGradleVersions as dt, isBundleProof as en, remoteCommand as er, includesParkedDevices as et, stopOwnedMetro as f, IOS_DEV_MENU_OFF_DEFAULTS_PLIST as fn, memoryLines as fr, gradleVersionLines as ft, devServerStopLevel as g, clearOtherUserApps as gn, reclaimMemory as gr, getMachineCacheReport as gt, describeMetroLastStop as h, appProcessFromPid as hn, memoryWorkPending as hr, waitForGradleExit as ht, enforceBudget as i, unverifiedLaunchLines as in, easCliUpgradeRemedy as ir, planCacheEmptying as it, ACTIVE_BUILD_KEY as j, pickDevClientScheme as jn, findStaleProjectDevices as jt, shutDownIdleDevices as k, reverseMetroPorts as kn, findOrphanedDevices as kt, readVolumeSpaceAsync as l, ADB_INSTALL_TIMEOUT_MS as ln, collectMemoryReport as lr, collectGradleVersions as lt, describeDevServerStop as m, androidDevClientUrl as mn, memorySweepIsScoped as mr, includesGradleVersions as mt, budgetLine as n, readMetroRecords as nn, MIN_EAS_CLI_SIMULATOR_VERSION as nr, includesWorkspaceOutputs as nt, machineNumber as o, verifyLaunch as on, parseArchiveSelector as or, selectCaches as ot, stopOwnedMetroForReset as p, androidAppProcess as pn, memoryScope as pr, gradleVersionsPending as pt, readStats$1 as q, providerFromConfig as qn, resolveRemoteContext as qt, cacheLabel as r, unattributedLaunchLines as rn, easCliSupport as rr, isWorkspacesScope as rt, peekBudget as s, verifyReleaseLaunch as sn, GRADLE_DAEMONS_KIND as sr, selectsBeyondCaches as st, budgetGate as t, readCollectorRecords as tn, MIN_EAS_CLI_DEVICE_VERSION as tr, includesRecordings as tt, resolveBudget as u, DEFAULT_METRO_PORT as un, inspectWatchmanMemory as ur, deleteGradleVersion as ut, logVanishedSupervisor as v, deviceShellArg as vn, stopIdleGradleDaemons as vr, DEVICE_LIST_TIMEOUT_MS$1 as vt, collectIdleDevicesAsync as w, iosAppProcess as wn, sizeCaches as wr, deleteProjectDevices as wt, vanishedSupervisorMessage as x, installAndroidApp as xn, readFootprints as xr, collectParkedSims as xt, metroLastStop as y, ensureMetroReverse as yn, phase as yr, collectDeviceLeases as yt, recordBuildPhase as z, RESOLVE_TIMEOUT_MS as zn, binOnPath as zt };
@@ -1,30 +1,29 @@
1
- import { h as withDrainingCancellation } from "./exec-DEoAhcze.mjs";
1
+ import { c as throwIfCancelled, s as cancelledError, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
2
2
  import { d as workspaceDir, m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
3
- import { E as upsertProject, p as getProject, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
4
- import { l as phaseLine } from "./command-output-Db8BqzxH.mjs";
5
- import { d as cancelledError, f as throwIfCancelled } from "./operation-exec-BW0em61G.mjs";
6
- import { i as recordWorkspaceUse } from "./workspace-state-U08dEzhG.mjs";
7
- import { G as resolveCacheProviderConfig, J as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-C7O8A6ZI.mjs";
8
- import { f as projectRegistry, v as detectIsExpo } from "./project-CTLNHCfE.mjs";
3
+ import { E as upsertProject, O as withConfigLockAsync, p as getProject, u as getConcurrencyLimits } from "./config-BZhXY15H.mjs";
4
+ import { l as phaseLine } from "./command-output-DxC0k2rk.mjs";
5
+ import { a as recordWorkspaceUseAsync } from "./workspace-state-CeBpIZgr.mjs";
6
+ import { G as resolveCacheProviderConfig, J as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-RKwY33wv.mjs";
7
+ import { f as projectRegistry, v as detectIsExpo } from "./project-Dz-hWkb-.mjs";
8
+ import { s as workspaceShareURL } from "./stim-desktop-DS0mzR8U.mjs";
9
+ import { k as hostSystemImageArch } from "./android-882m4hxX.mjs";
9
10
  import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
10
- import { B as recordFinishedBuild, Bn as checkEasAuth, H as tapBuildLog, J as recordRunStats, Jn as resolveRemote, U as createRunRecorder, V as startBuildProgress, W as readRunEstimates, Y as statsProjectKey, Yn as uploadRemote } from "./budget-DnPX3DXj.mjs";
11
- import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-BUTu8T7A.mjs";
12
- import { I as acquireBuildSlot, R as releaseBuildSlot } from "./workspaces-BxzYlo3P.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-B5RtpFda.mjs";
14
- import { p as providerUploadOutcome } from "./build-cache-Dv7RN200.mjs";
15
- import { k as hostSystemImageArch } from "./android-C7sVmyI9.mjs";
16
- import { m as listIosRuntimes } from "./ios-hcBpnEGk.mjs";
17
- import { s as workspaceShareURL } from "./stim-desktop-D5OGpYZM.mjs";
11
+ import { B as recordFinishedBuild, G as createRunRecorder, H as startBuildProgress, Hn as checkEasAuth, K as readRunEstimates, U as tapBuildLog, X as recordRunStats, Xn as resolveRemote, Z as statsProjectKey, Zn as uploadRemote } from "./budget-dPGuhNai.mjs";
12
+ import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-BmH7U8pr.mjs";
13
+ import { L as acquireBuildSlot, z as releaseBuildSlot } from "./workspaces-CSV2Orf4.mjs";
14
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-Dq3ZcdD8.mjs";
15
+ import { _ as providerUploadOutcome } from "./build-cache-HFUQ9eLz.mjs";
16
+ import { m as listIosRuntimes } from "./ios-CVUFFZ6C.mjs";
18
17
  import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-ccaPc4ox.mjs";
19
- import { p as readBundleId } from "./xcode-iQnROM5o.mjs";
20
- import { h as setRemoteLogSink } from "./client-yyso1bwi.mjs";
21
- import { s as resolveBuildPlacement } from "./selection-DSMbWEX2.mjs";
22
- import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-BTpZ6RAJ.mjs";
23
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-CRSOZxKY.mjs";
24
- import { t as acquireAndroidArtifact } from "./artifact-5RteZem7.mjs";
25
- import { i as persistLastBuild, n as finishAndroidUpload, s as resolveAndroidBuildPlan } from "./result-Cx5CRLvS.mjs";
26
- import { a as lastBuildRecord } from "./ios-project-CVyNwjAF.mjs";
27
- import { t as acquireIosArtifact } from "./artifact-Dwdo7k1E.mjs";
18
+ import { p as readBundleId } from "./xcode-DHu41qQ4.mjs";
19
+ import { S as setRemoteLogSink } from "./client-18-ZowoT.mjs";
20
+ import { c as resolveBuildPlacement } from "./selection-BLtvaqxc.mjs";
21
+ import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-B1W-hmC2.mjs";
22
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DgtJkzIa.mjs";
23
+ import { t as acquireAndroidArtifact } from "./artifact-BR5VNArK.mjs";
24
+ import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-DqBrb12U.mjs";
25
+ import { a as lastBuildRecord } from "./ios-project-KYqeJURj.mjs";
26
+ import { t as acquireIosArtifact } from "./artifact-Bdt_n9Jc.mjs";
28
27
  import { constants, promises } from "node:fs";
29
28
  import { basename, join } from "node:path";
30
29
  import { hostSimulatorArch } from "@stim-cli/core";
@@ -74,8 +73,10 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
74
73
  command: "build",
75
74
  platform: "android"
76
75
  }, async (claim) => {
77
- if (!getProject(root)) upsertProject(root, {});
78
- recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
76
+ await withConfigLockAsync(() => {
77
+ if (!getProject(root)) upsertProject(root, {});
78
+ });
79
+ await recordWorkspaceUseAsync(root, /* @__PURE__ */ new Date(), context.env, context.cwd, context.signal);
79
80
  const started = Date.now();
80
81
  const startedAt = new Date(started).toISOString();
81
82
  const progress = startBuildProgress({
@@ -303,8 +304,10 @@ async function buildIosOperation(context, root, options) {
303
304
  command: "build",
304
305
  platform: "ios"
305
306
  }, async (claim) => {
306
- if (!getProject(root)) upsertProject(root, {});
307
- recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
307
+ await withConfigLockAsync(() => {
308
+ if (!getProject(root)) upsertProject(root, {});
309
+ });
310
+ await recordWorkspaceUseAsync(root, /* @__PURE__ */ new Date(), context.env, context.cwd, context.signal);
308
311
  const started = Date.now();
309
312
  const startedAt = new Date(started).toISOString();
310
313
  const progress = startBuildProgress({