stim 1.20.2 → 1.21.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 (217) hide show
  1. package/README.md +88 -8
  2. package/dist/acquire-artifact-CD4lbiWE.mjs +153 -0
  3. package/dist/act-DHAw2A2S.mjs +2667 -0
  4. package/dist/activity-BzVfHSrY.mjs +1376 -0
  5. package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-zh1vhbLp.mjs} +21 -65
  6. package/dist/{android-HqP1_vB_.mjs → android-BEJ8Jpl7.mjs} +2 -2
  7. package/dist/{android-DCKZrNvV.mjs → android-BLgbNqox.mjs} +128 -78
  8. package/dist/{android-Dlzxshgp.mjs → android-CV_GCELZ.mjs} +5 -5
  9. package/dist/{android-Mz_Inn3w.mjs → android-DUYkNF4u.mjs} +184 -102
  10. package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-Ct5b1xCK.mjs} +7 -6
  11. package/dist/android-cas-compiler.mjs +2 -2
  12. package/dist/android-project-BCAAmMwz.mjs +12 -0
  13. package/dist/api.d.mts +740 -8
  14. package/dist/api.mjs +585 -1
  15. package/dist/{artifact-HSwkIWEQ.mjs → artifact-B8T3S5gi.mjs} +223 -201
  16. package/dist/{artifact-D3czlUvT.mjs → artifact-DAuZ-FNU.mjs} +158 -148
  17. package/dist/{browser-web-CA-F1GQo.mjs → browser-web-QQzVjz3O.mjs} +26 -24
  18. package/dist/budget-Bs6SxxzO.mjs +9154 -0
  19. package/dist/{build-DYDbfkk5.mjs → build-CoPzQRNw.mjs} +144 -96
  20. package/dist/build-cache-DmyR9Zzc.mjs +602 -0
  21. package/dist/build-plan-CaFskB7_.mjs +188 -0
  22. package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DkkqguoK.mjs} +2 -2
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-zdKiYQ3E.mjs → ccache-BJRZ9pG3.mjs} +10 -9
  25. package/dist/{cdp-Dq_ypAlJ.mjs → cdp-CWmIUMbw.mjs} +18 -5
  26. package/dist/{chrome-BnzZMqsR.mjs → chrome-B6tfCta1.mjs} +7 -4
  27. package/dist/{cli-CLP3diBm.mjs → cli-0DYf8QhQ.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/client-B7QVOlCr.d.mts +253 -0
  30. package/dist/client-UXD70ZbM.mjs +1406 -0
  31. package/dist/collector-run.d.mts +4 -40
  32. package/dist/collector-run.mjs +9 -8
  33. package/dist/{command-output-BTy8hZ0F.mjs → command-output-B1UrjZHL.mjs} +1 -1
  34. package/dist/config-CYcBF478.mjs +949 -0
  35. package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-CqeBlrEn.mjs} +3 -3
  36. package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-BbKQW83h.mjs} +20 -5
  37. package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-DFRyG1_o.mjs} +1 -1
  38. package/dist/{dev-client-DAWVIGBu.mjs → dev-client-UOeESKm6.mjs} +2 -2
  39. package/dist/device-DCxH7_By.mjs +1068 -0
  40. package/dist/{device-BECOiufl.mjs → device-ExJq8Ei7.mjs} +35 -35
  41. package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-CMlqEcvw.mjs} +43 -13
  42. package/dist/device-host-worker.mjs +65 -61
  43. package/dist/{device-ios-COSi6oS1.mjs → device-ios-DRUeKaFV.mjs} +48 -45
  44. package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-C8raGFoP.mjs} +14 -26
  45. package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-DMRpVX9a.mjs} +5 -5
  46. package/dist/doctor-BLHCYxzi.mjs +2 -0
  47. package/dist/{doctor-kfMBnUw6.mjs → doctor-DTvaDOda.mjs} +281 -317
  48. package/dist/{doctor-CB8oZKCk.mjs → doctor-Dhqebm0q.mjs} +183 -91
  49. package/dist/doctor-fingerprint.mjs +19 -0
  50. package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-Cv1F10Kj.mjs} +40 -21
  51. package/dist/{eas-build-JyfqyHfC.mjs → eas-build-BomfRnFT.mjs} +53 -20
  52. package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-DJwZpy0c.mjs} +26 -208
  53. package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-op6A54yi.mjs} +229 -11
  54. package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-Bf0rZvG9.mjs} +172 -82
  55. package/dist/exec-H20xSg2T.d.mts +65 -0
  56. package/dist/exec-_UbtCQcG.mjs +750 -0
  57. package/dist/gc-C-WwL0yi.mjs +3 -0
  58. package/dist/{gc-qWOMdnER.mjs → gc-_-dCXdyL.mjs} +584 -796
  59. package/dist/git-C3iTsJaZ.mjs +73 -0
  60. package/dist/{guide-G9cAbVAc.mjs → guide-Yqwt2bd6.mjs} +941 -269
  61. package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-Bw-honsd.mjs} +8 -6
  62. package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DB_gBPfY.mjs} +34 -19
  63. package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CUvOf4Vr.mjs} +1 -1
  64. package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-DL_P5AdN.mjs} +77 -43
  65. package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-QI141yKk.mjs} +21 -17
  66. package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-Ksyjgzq-.mjs} +30 -21
  67. package/dist/idle-BVeRGroT.d.mts +24 -0
  68. package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DaKmZi0z.mjs} +11 -10
  69. package/dist/{ios-BwVCF7oA.mjs → ios-CQ68hG9s.mjs} +8 -8
  70. package/dist/{ios-RkW4pnQf.mjs → ios-CpByZy12.mjs} +140 -80
  71. package/dist/{ios-device-B5veSDDQ.mjs → ios-device-CXGP1bsD.mjs} +1 -1
  72. package/dist/{ios-device-D7pi2Sca.mjs → ios-device-CwFMehUS.mjs} +51 -26
  73. package/dist/{ios-project-K9hY_Jab.mjs → ios-project-WuwwBdvW.mjs} +13 -13
  74. package/dist/{ios-nOLJGVdy.mjs → ios-qNJt4dFm.mjs} +1 -1
  75. package/dist/ios-signing-DTTIChGs.mjs +489 -0
  76. package/dist/{ios-state-CBLe1xYw.mjs → ios-state-DvFX-K_l.mjs} +1 -1
  77. package/dist/{ios-Ce7bc7br.mjs → ios-ubFsBzwq.mjs} +129 -86
  78. package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Cc1dttps.mjs} +53 -26
  79. package/dist/{launch-F4sOqAhB.mjs → launch-CD1yVc7U.mjs} +91 -90
  80. package/dist/{launch-C3qJ6Agb.mjs → launch-Zq2mOSDy.mjs} +82 -541
  81. package/dist/logs-BS00Anxf.mjs +352 -0
  82. package/dist/logs-CMm05HxN.mjs +255 -0
  83. package/dist/{macos-D7uDvO-z.mjs → macos-B65--pPd.mjs} +1 -1
  84. package/dist/{macos-Ch5VJmcS.mjs → macos-C-0qJ6zq.mjs} +225 -212
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +122 -247
  87. package/dist/{metro-DnCEjCxs.mjs → metro-DEXpIhHC.mjs} +67 -12
  88. package/dist/{metro-gateway-CX9Xlkq2.mjs → metro-gateway-BMJNlj3E.mjs} +20 -12
  89. package/dist/{named-ports-4WopRPg-.mjs → named-ports-BWTzt6mu.mjs} +8 -63
  90. package/dist/native-android-JACyjTZs.mjs +844 -0
  91. package/dist/{native-gradle-inputs-BsLRrl7u.mjs → native-gradle-inputs-Bep9JcSF.mjs} +128 -140
  92. package/dist/native-inputs-TRTTTRxt.mjs +91 -0
  93. package/dist/native-run-DY_RLx3C.mjs +277 -0
  94. package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-Dg1Q7tfF.mjs} +9 -8
  95. package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-CB2iQeWq.mjs} +27 -18
  96. package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-CXX39F7o.mjs} +96 -47
  97. package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
  98. package/dist/offload-worker.d.mts +1 -46
  99. package/dist/offload-worker.mjs +197 -66
  100. package/dist/{ownership-DCtw_2IA.mjs → ownership-DEmM5vhh.mjs} +3 -3
  101. package/dist/{page-DRHy329N.mjs → page-CPaHeYqj.mjs} +7 -4
  102. package/dist/paths-BsJMoPP2.mjs +12 -0
  103. package/dist/paths-DQtTgsBf.mjs +42 -0
  104. package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BqGbTa61.mjs} +5 -5
  105. package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-Bwj-IjY1.mjs} +6 -6
  106. package/dist/{ports-DdSUicVo.mjs → ports-D-MmCTdv.mjs} +3 -3
  107. package/dist/prebuild-uD_ipCxF.mjs +449 -0
  108. package/dist/{project-_phNIJfs.mjs → project-BZNjmW_8.mjs} +65 -37
  109. package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-Lfetn8Kr.mjs} +2 -2
  110. package/dist/pull-request-zjCSAryH.d.mts +120 -0
  111. package/dist/pull-requests.d.mts +1 -119
  112. package/dist/pull-requests.mjs +1 -1
  113. package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-DuzH0cn3.mjs} +74 -48
  114. package/dist/{gradle-DSrXb6lG.mjs → react-native-build-rhk4smwQ.mjs} +292 -15
  115. package/dist/react-native-doctor-CQpuIMso.mjs +234 -0
  116. package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-Bhq1rJeV.mjs} +46 -28
  117. package/dist/{recordings-D0d5aQt0.mjs → recordings-DYteQSu4.mjs} +12 -9
  118. package/dist/{reload-C8JhxjSh.mjs → reload-CmTRFJaX.mjs} +93 -47
  119. package/dist/reload-DzjSl5P_.mjs +2 -0
  120. package/dist/{remote-BiR6aYjy.mjs → remote-ByYkXdGD.mjs} +15 -10
  121. package/dist/result-DNiS-tTP.mjs +434 -0
  122. package/dist/{run-BtPgpKks.mjs → run-D23HmJMs.mjs} +4 -5
  123. package/dist/selection-CSl9i5qU.mjs +619 -0
  124. package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CxTrvDg8.mjs} +3 -4
  125. package/dist/{server-command-CTtCkmcQ.mjs → server-command-CtzloH3v.mjs} +14 -7
  126. package/dist/server-expo-C-90EhcG.mjs +2 -0
  127. package/dist/{server-expo-DsguMGUF.mjs → server-expo-DT_F_uVI.mjs} +50 -9
  128. package/dist/{settings-B717odTD.mjs → settings-CsJDEXgK.mjs} +234 -24
  129. package/dist/{settings-vk3mJGSm.d.mts → settings-DkdmlelE.d.mts} +6 -4
  130. package/dist/settings-T1gtc3bf.mjs +114 -0
  131. package/dist/settings-write-HyVZ8eQ8.mjs +359 -0
  132. package/dist/settings.schema.json +163 -16
  133. package/dist/{simslim-CCr3rE-A.mjs → simslim-Cgk17SXV.mjs} +14 -12
  134. package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-DF8VfT64.mjs} +15 -20
  135. package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
  136. package/dist/stage-BIS0ydsV.mjs +183 -0
  137. package/dist/{start-BWqzODpb.mjs → start-7lpH7hmN.mjs} +63 -44
  138. package/dist/{start-TXeMmmO2.mjs → start-RChynRDp.mjs} +1 -1
  139. package/dist/{state-D1Icyjlu.mjs → state-C4ZtUisW.mjs} +40 -13
  140. package/dist/{state-CG_OFoaA.mjs → state-XMziexv2.mjs} +3 -2
  141. package/dist/{stats-BoY5sEPU.mjs → stats-53T7OTb9.mjs} +7 -13
  142. package/dist/stats-report-BFfMpWWF.mjs +16 -0
  143. package/dist/{status-WgFbkRzj.mjs → status-BL7jVyAB.mjs} +535 -447
  144. package/dist/status-CSi6tlRq.mjs +2 -0
  145. package/dist/{status-BTA7kKiQ.mjs → status-DqEUSSxs.mjs} +6 -4
  146. package/dist/{status-watch-C23ILtf9.mjs → status-watch-GDCfqpTE.mjs} +187 -22
  147. package/dist/status-worker.d.mts +1 -0
  148. package/dist/status-worker.mjs +19 -0
  149. package/dist/stim-desktop-C12we7lz.mjs +112 -0
  150. package/dist/{stop-DR6VoDIk.mjs → stop-Bk_1qiV6.mjs} +2 -2
  151. package/dist/{stop-BNmBMi1F.mjs → stop-CPzlM1L-.mjs} +138 -98
  152. package/dist/{stop-DPEhunlw.mjs → stop-D7h6jAXQ.mjs} +11 -10
  153. package/dist/supervisor-run.d.mts +8 -17
  154. package/dist/supervisor-run.mjs +63 -27
  155. package/dist/{support-DMTqj3Hm.mjs → support-67vraa1Q.mjs} +18 -11
  156. package/dist/{support-CwjbFs9H.mjs → support-Dlu37g6H.mjs} +12 -12
  157. package/dist/{swiftpm-macos-DRNVJWlb.mjs → swiftpm-macos-p8WZbxKU.mjs} +35 -24
  158. package/dist/toolchain-DhKwp9iI.mjs +2 -0
  159. package/dist/toolchain-Hp9sCpK4.mjs +873 -0
  160. package/dist/{trigger-CigAYjeL.mjs → trigger-BAahxUPq.mjs} +20 -5
  161. package/dist/trigger-Bf3uDcpv.mjs +2 -0
  162. package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-BHX5r0Ei.mjs} +250 -156
  163. package/dist/{web-BDBMxDpx.mjs → web-CJmIj6AI.mjs} +18 -13
  164. package/dist/web-DknQETPs.mjs +2 -0
  165. package/dist/web-run.mjs +11 -12
  166. package/dist/windows-report.d.mts +1 -0
  167. package/dist/windows-report.mjs +18 -0
  168. package/dist/windows-report.ps1 +43 -0
  169. package/dist/workspace-process-lock-1_1OoVW5.mjs +57 -0
  170. package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-Cjuigeeu.mjs} +62 -58
  171. package/dist/{workspaces-C36s2jb9.mjs → workspaces-BccMFmGQ.mjs} +1188 -1079
  172. package/dist/worktree-CK2MpJW5.mjs +2 -0
  173. package/dist/{worktree-CgvJYJ-Q.mjs → worktree-DQ6Zi2Mv.mjs} +304 -53
  174. package/dist/xcode-Zlx3qjEs.mjs +896 -0
  175. package/package.json +7 -5
  176. package/shim/android-optimizations.gradle +7 -5
  177. package/dist/activity-BSV745Kz.mjs +0 -629
  178. package/dist/api-qvOzWyfO.mjs +0 -154
  179. package/dist/api-run.mjs +0 -294
  180. package/dist/app-install-BIKtMfPq.mjs +0 -896
  181. package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
  182. package/dist/budget-f7516Zk0.mjs +0 -4106
  183. package/dist/build-facts-DcLv2HSd.d.mts +0 -111
  184. package/dist/cancellation-C_22VQTH.mjs +0 -24
  185. package/dist/client-qQAaXSUs.mjs +0 -1771
  186. package/dist/config-BYDxlMY3.mjs +0 -562
  187. package/dist/device-DuiPJQSn.mjs +0 -290
  188. package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
  189. package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
  190. package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
  191. package/dist/exec-DqKo9GKJ.mjs +0 -268
  192. package/dist/git-DDfFzkMm.mjs +0 -45
  193. package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
  194. package/dist/logs-BGrEUaEs.mjs +0 -383
  195. package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
  196. package/dist/native-android-D5qc3-_v.mjs +0 -226
  197. package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
  198. package/dist/plan-C4TjdPsR.mjs +0 -260
  199. package/dist/prebuild-DYbucPXy.mjs +0 -212
  200. package/dist/preview-78a9kR_-.mjs +0 -1011
  201. package/dist/react-native-build-CtCccJtb.mjs +0 -239
  202. package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
  203. package/dist/remote-cache-OyOyVIS3.mjs +0 -526
  204. package/dist/result-CaJg5Iat.mjs +0 -186
  205. package/dist/server-expo-Bigriskl.mjs +0 -2
  206. package/dist/settings-BORNaaCO.mjs +0 -402
  207. package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
  208. package/dist/stage-KNTQopqv.mjs +0 -157
  209. package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
  210. package/dist/tailnet-Dh-qiYzG.mjs +0 -265
  211. package/dist/toolchain-BFkAcstd.mjs +0 -2
  212. package/dist/toolchain-DxSsNssu.mjs +0 -1657
  213. package/dist/trigger-9_USgmxz.mjs +0 -2
  214. package/dist/web-Dq-i3wzJ.mjs +0 -2
  215. package/dist/worktree-DpLdCHga.mjs +0 -2
  216. package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
  217. package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
@@ -1,48 +1,54 @@
1
- import { E as upsertProject, p as getProject, u as getConcurrencyLimits } from "./config-BYDxlMY3.mjs";
2
- import { K as resolveProjectSettings, W as resolveCacheProviderConfig, a as SETTING_SHAPE_REMEDY } from "./settings-B717odTD.mjs";
3
- import { _ as waitForBuild, g as releaseBuildLock, j as providerUploadOutcome, m as acquireBuildLock } from "./device-lease-BX1sJQ2E.mjs";
4
- import { i as recordWorkspaceUse, w as workspaceLogsDir, x as workspaceDir } from "./workspace-state-DJt_MMvf.mjs";
5
- import { l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
6
- import { _ as detectIsExpo, d as projectRegistry } from "./project-_phNIJfs.mjs";
7
- import { D as hostSystemImageArch } from "./android-Mz_Inn3w.mjs";
8
- import { F as acquireBuildSlot, L as releaseBuildSlot } from "./workspaces-C36s2jb9.mjs";
9
- import { At as createRunRecorder, Dt as recordFinishedBuild, Ft as recordRunStats, It as statsProjectKey, Ot as startBuildProgress, jt as readRunEstimates, kt as tapBuildLog } from "./budget-f7516Zk0.mjs";
10
- import { S as withNativeBuildRun, x as runCancellationSignal } from "./tailnet-Dh-qiYzG.mjs";
11
- import { n as cancelledError, r as throwIfCancelled } from "./cancellation-C_22VQTH.mjs";
12
- import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
13
- import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DzkMYh8Q.mjs";
14
- import { i as checkEasAuth, m as uploadRemote, p as resolveRemote } from "./remote-cache-OyOyVIS3.mjs";
15
- import { f as setRemoteLogSink, y as resolveBuildPlacement } from "./client-qQAaXSUs.mjs";
16
- import { m as listIosRuntimes } from "./ios-RkW4pnQf.mjs";
17
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-k8dTIrbK.mjs";
18
- import { A as readBundleId } from "./toolchain-DxSsNssu.mjs";
19
- import { n as resolveAndroidBuildPlan } from "./plan-C4TjdPsR.mjs";
20
- import { t as acquireAndroidArtifact } from "./artifact-D3czlUvT.mjs";
21
- import { i as persistLastBuild, n as finishAndroidUpload } from "./result-CaJg5Iat.mjs";
22
- import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-CwjbFs9H.mjs";
23
- import { a as lastBuildRecord } from "./ios-project-K9hY_Jab.mjs";
24
- import { t as acquireIosArtifact } from "./artifact-HSwkIWEQ.mjs";
25
- import { constants, copyFileSync, cpSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
1
+ import { d as withDrainingCancellation } from "./exec-_UbtCQcG.mjs";
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-CYcBF478.mjs";
4
+ import { l as phaseLine } from "./command-output-B1UrjZHL.mjs";
5
+ import { i as recordWorkspaceUse } from "./workspace-state-Cjuigeeu.mjs";
6
+ import { $t as cancelledError, G as resolveCacheProviderConfig, J as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, en as throwIfCancelled } from "./settings-CsJDEXgK.mjs";
7
+ import { f as projectRegistry, v as detectIsExpo } from "./project-BZNjmW_8.mjs";
8
+ import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
9
+ 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-Bs6SxxzO.mjs";
10
+ import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-DY_RLx3C.mjs";
11
+ import { F as acquireBuildSlot, L as releaseBuildSlot } from "./workspaces-BccMFmGQ.mjs";
12
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BzVfHSrY.mjs";
13
+ import { p as providerUploadOutcome } from "./build-cache-DmyR9Zzc.mjs";
14
+ import { O as hostSystemImageArch } from "./android-DUYkNF4u.mjs";
15
+ import { m as listIosRuntimes } from "./ios-CpByZy12.mjs";
16
+ import { s as workspaceShareURL } from "./stim-desktop-C12we7lz.mjs";
17
+ import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-ccaPc4ox.mjs";
18
+ import { p as readBundleId } from "./xcode-Zlx3qjEs.mjs";
19
+ import { f as setRemoteLogSink } from "./client-UXD70ZbM.mjs";
20
+ import { s as resolveBuildPlacement } from "./selection-CSl9i5qU.mjs";
21
+ import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-Dlu37g6H.mjs";
22
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-Dg1Q7tfF.mjs";
23
+ import { t as acquireAndroidArtifact } from "./artifact-DAuZ-FNU.mjs";
24
+ import { i as persistLastBuild, n as finishAndroidUpload, s as resolveAndroidBuildPlan } from "./result-DNiS-tTP.mjs";
25
+ import { a as lastBuildRecord } from "./ios-project-WuwwBdvW.mjs";
26
+ import { t as acquireIosArtifact } from "./artifact-B8T3S5gi.mjs";
27
+ import { constants, promises } from "node:fs";
26
28
  import { basename, join } from "node:path";
27
- import { loadCacheProvider } from "@stim-cli/cache";
28
29
  import { hostSimulatorArch } from "@stim-cli/core";
30
+ import { loadCacheProvider } from "@stim-cli/cache";
29
31
  //#region src/commands/android/build.ts
30
- const note$1 = (line) => console.error(line);
31
- async function buildAndroidOperation(root, options) {
32
+ async function buildAndroidOperation(context, root, options, { cacheArtifacts = true } = {}) {
33
+ const note = (line) => context.output("stderr", `${line}\n`);
32
34
  const selected = projectRegistry.selectAndroid(root);
33
35
  if ("problem" in selected) throw Object.assign(new Error(selected.problem.message), {
34
36
  code: "STIM_NO_PROJECT",
35
37
  remedy: selected.problem.remedy
36
38
  });
37
- const { context: settingsContext, settings } = resolveProjectSettings(root);
39
+ const { context: settingsContext, settings } = await resolveProjectSettingsAsync(root, {
40
+ env: context.env,
41
+ signal: runCancellationSignal(context) ?? context.signal
42
+ });
38
43
  const integration = await selected.load({
39
44
  context: settingsContext,
40
45
  settings
41
46
  });
42
- const phase = (label, line) => note$1(phaseLine(label, line));
47
+ const phase = (label, line) => note(phaseLine(label, line));
43
48
  const plan = resolveAndroidBuildPlan({
44
49
  settings,
45
50
  settingsContext,
51
+ env: context.env,
46
52
  variant: options.variant ?? null,
47
53
  buildCache: options.buildCache !== false
48
54
  }, {
@@ -62,13 +68,13 @@ async function buildAndroidOperation(root, options) {
62
68
  "all"
63
69
  ].includes(options.abi)) throw Object.assign(/* @__PURE__ */ new Error("Android build abi must be arm64-v8a, armeabi-v7a, x86, x86_64 or all."), { code: "STIM_BAD_ARG" });
64
70
  const abi = options.abi === "all" ? null : options.abi ?? (plan.plan.build.targetAbiOnly && !plan.plan.build.release ? hostSystemImageArch() : null);
65
- await ensureWorkspaceStorageSafely(root, { note: note$1 });
66
- return withNativeBuildRun(root, {
71
+ await ensureWorkspaceStorageSafely(root, { note });
72
+ return withDrainingCancellation(context, context.signal, () => withNativeBuildRun(context, root, {
67
73
  command: "build",
68
74
  platform: "android"
69
75
  }, async (claim) => {
70
76
  if (!getProject(root)) upsertProject(root, {});
71
- recordWorkspaceUse(root);
77
+ recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
72
78
  const started = Date.now();
73
79
  const startedAt = new Date(started).toISOString();
74
80
  const progress = startBuildProgress({
@@ -76,7 +82,7 @@ async function buildAndroidOperation(root, options) {
76
82
  platform: "android",
77
83
  slot: "default",
78
84
  claim,
79
- note: note$1
85
+ note
80
86
  });
81
87
  const logs = workspaceLogsDir(root);
82
88
  const buildLog = join(logs, "build-artifact-android.ndjson");
@@ -84,7 +90,7 @@ async function buildAndroidOperation(root, options) {
84
90
  truncate: true,
85
91
  fields: { platform: "android" }
86
92
  }), progress);
87
- setRemoteLogSink((entry) => writer.write(entry));
93
+ setRemoteLogSink(context, (entry) => writer.write(entry));
88
94
  const projectKey = statsProjectKey({
89
95
  root,
90
96
  commonDir: settingsContext.gitCommonDir,
@@ -94,7 +100,7 @@ async function buildAndroidOperation(root, options) {
94
100
  platform: "android",
95
101
  write: recordRunStats,
96
102
  now: Date.now,
97
- note: note$1,
103
+ note,
98
104
  phases: () => progress.durations(),
99
105
  deviceSetup: () => false
100
106
  });
@@ -106,7 +112,8 @@ async function buildAndroidOperation(root, options) {
106
112
  };
107
113
  let artifact;
108
114
  let directory;
109
- let succeeded = false;
115
+ let built = null;
116
+ let failureAfterCleanup = null;
110
117
  const finishRecord = (status, errorCode) => persistLastBuild({
111
118
  root,
112
119
  record,
@@ -114,15 +121,18 @@ async function buildAndroidOperation(root, options) {
114
121
  durationMs: Date.now() - started,
115
122
  status,
116
123
  errorCode,
117
- out: note$1,
124
+ out: note,
118
125
  recordBuild: (at, entry) => recordFinishedBuild(at, entry, { artifactOnly: true })
119
126
  });
120
127
  try {
121
128
  const acquired = await acquireAndroidArtifact({
129
+ context,
122
130
  root,
123
131
  buildLog,
124
132
  writer,
125
133
  recipe: integration.artifact({
134
+ operation: context,
135
+ cacheArtifacts,
126
136
  root,
127
137
  buildLog,
128
138
  writer,
@@ -130,7 +140,7 @@ async function buildAndroidOperation(root, options) {
130
140
  buildPlan: plan.plan.build,
131
141
  target: { abi },
132
142
  phase,
133
- out: note$1,
143
+ out: note,
134
144
  step: progress.step,
135
145
  estimates: () => readRunEstimates({
136
146
  projectKey,
@@ -142,12 +152,12 @@ async function buildAndroidOperation(root, options) {
142
152
  cacheProviderConfig: plan.plan.cacheProviderConfig,
143
153
  requestedBuildCache: options.buildCache !== false,
144
154
  easBuild: null,
145
- androidPackage: integration.appIds().androidPackage,
155
+ androidPackage: (await integration.appIds()).androidPackage,
146
156
  record,
147
157
  maxBuilds: getConcurrencyLimits().maxBuilds,
148
158
  progress: {
149
159
  phase,
150
- out: note$1,
160
+ out: note,
151
161
  stats,
152
162
  step: progress.step,
153
163
  miss: progress.miss,
@@ -170,29 +180,22 @@ async function buildAndroidOperation(root, options) {
170
180
  });
171
181
  if (!acquired.ok) throw Object.assign(new Error(acquired.failure.message ?? "Android build failed."), acquired.failure, { details: acquired.failure.extra });
172
182
  artifact = acquired.artifact;
173
- throwIfCancelled(runCancellationSignal(), "Android build");
183
+ throwIfCancelled(runCancellationSignal(context), "Android build");
174
184
  if (!artifact.apkPath) throw Object.assign(/* @__PURE__ */ new Error("The Android build produced no APK."), { code: "STIM_BUILD_FAILED" });
175
185
  const artifacts = join(workspaceDir(root), "artifacts");
176
- mkdirSync(artifacts, { recursive: true });
177
- directory = mkdtempSync(join(artifacts, "android-"));
186
+ await promises.mkdir(artifacts, { recursive: true });
187
+ directory = await promises.mkdtemp(join(artifacts, "android-"));
178
188
  const apkPath = join(directory, "app.apk");
179
- copyFileSync(artifact.apkPath, apkPath, constants.COPYFILE_FICLONE);
189
+ await promises.copyFile(artifact.apkPath, apkPath, constants.COPYFILE_FICLONE);
190
+ throwIfCancelled(runCancellationSignal(context), "Android build");
180
191
  await finishAndroidUpload(artifact.uploadPending, artifact.remote, phase);
181
- const uploaded = providerUploadOutcome(artifact.providerUpload ? await artifact.providerUpload : null, artifact.providerName);
192
+ const uploaded = providerUploadOutcome(artifact.providerUpload ? await artifact.providerUpload : null, artifact.providerName, context.env);
182
193
  if (uploaded) phase("cache", uploaded.line);
183
- throwIfCancelled(runCancellationSignal(), "Android build");
194
+ const links = { workspace: await workspaceShareURL(root, { platform: "android" }, runCancellationSignal(context) ?? context.signal) };
195
+ throwIfCancelled(runCancellationSignal(context), "Android build");
184
196
  record.appPath = apkPath;
185
197
  record.bundleId = artifact.androidPackage;
186
- finishRecord("ok");
187
- stats.record({
188
- failed: false,
189
- cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
190
- durationMs: Date.now() - started,
191
- offloadedTo: record.offloadedTo,
192
- waited: artifact.waitedForBuild
193
- });
194
- succeeded = true;
195
- return {
198
+ built = {
196
199
  apkPath,
197
200
  androidPackage: artifact.androidPackage,
198
201
  variant: plan.plan.build.variant ?? "debug",
@@ -204,10 +207,11 @@ async function buildAndroidOperation(root, options) {
204
207
  builtOn: record.builtOn ?? null,
205
208
  ccache: artifact.ccache,
206
209
  durationMs: Date.now() - started,
207
- logs: { dir: logs }
210
+ logs: { dir: logs },
211
+ links
208
212
  };
209
213
  } catch (error) {
210
- const failure = runCancellationSignal()?.aborted ? cancelledError("Android build", error) : error;
214
+ const failure = runCancellationSignal(context)?.aborted ? cancelledError("Android build", error) : error;
211
215
  finishRecord("failed", failure.code);
212
216
  stats.record({
213
217
  failed: true,
@@ -215,33 +219,56 @@ async function buildAndroidOperation(root, options) {
215
219
  });
216
220
  throw failure;
217
221
  } finally {
218
- artifact?.release();
219
- if (!succeeded && directory) rmSync(directory, {
222
+ await artifact?.release();
223
+ failureAfterCleanup = built && runCancellationSignal(context)?.aborted ? cancelledError("Android build") : null;
224
+ if (failureAfterCleanup) {
225
+ finishRecord("failed", failureAfterCleanup.code);
226
+ stats.record({
227
+ failed: true,
228
+ durationMs: Date.now() - started
229
+ });
230
+ }
231
+ if ((!built || failureAfterCleanup) && directory) await promises.rm(directory, {
220
232
  recursive: true,
221
233
  force: true
222
234
  });
235
+ if (built && !failureAfterCleanup) {
236
+ finishRecord("ok");
237
+ stats.record({
238
+ failed: false,
239
+ cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
240
+ durationMs: Date.now() - started,
241
+ offloadedTo: record.offloadedTo,
242
+ waited: artifact?.waitedForBuild
243
+ });
244
+ }
223
245
  writer.close();
224
246
  progress.clear();
225
247
  }
226
- }, { write: (line) => phase("lock", line) });
248
+ if (failureAfterCleanup) throw failureAfterCleanup;
249
+ return built;
250
+ }, { write: (line) => phase("lock", line) }));
227
251
  }
228
252
  //#endregion
229
253
  //#region src/commands/ios/build.ts
230
- const note = (line) => console.error(line);
231
- async function buildIosOperation(root, options) {
254
+ async function buildIosOperation(context, root, options) {
255
+ const note = (line) => context.output("stderr", `${line}\n`);
232
256
  const selected = projectRegistry.selectIos(root);
233
257
  if ("problem" in selected) throw Object.assign(new Error(selected.problem.message), {
234
258
  code: "STIM_NO_PROJECT",
235
259
  remedy: selected.problem.remedy
236
260
  });
237
- const { context, settings } = resolveProjectSettings(root);
261
+ const { context: settingsContext, settings } = await resolveProjectSettingsAsync(root, {
262
+ env: context.env,
263
+ signal: runCancellationSignal(context) ?? context.signal
264
+ });
238
265
  const projectPathError = iosProjectPathError(settings, root, () => detectIsExpo(root));
239
266
  if (projectPathError) throw Object.assign(new Error(projectPathError), {
240
267
  code: "STIM_BAD_ARG",
241
268
  remedy: SETTING_SHAPE_REMEDY
242
269
  });
243
270
  const integration = await selected.load(settings);
244
- const setup = resolveIosBuildSetup(options.remoteBuild, settings, (label, message) => note(phaseLine(label, message)));
271
+ const setup = resolveIosBuildSetup(options.remoteBuild, settings, (label, message) => note(phaseLine(label, message)), context.env);
245
272
  if (!setup.ok) {
246
273
  const { failure } = setup;
247
274
  throw Object.assign(new Error(failure.message ?? failure.code), failure, { details: failure });
@@ -249,7 +276,7 @@ async function buildIosOperation(root, options) {
249
276
  const { buildMachine, optimizations } = setup;
250
277
  const configuration = resolveConfiguration(options.configuration, settings);
251
278
  const buildScheme = resolveSchemeSelection(options, settings);
252
- const problem = integration.schemeProblem(buildScheme, configuration);
279
+ const problem = await integration.schemeProblem(buildScheme, configuration);
253
280
  if (problem) throw Object.assign(new Error(problem.message ?? problem.code), problem);
254
281
  if (options.arch !== void 0 && ![
255
282
  "arm64",
@@ -265,12 +292,12 @@ async function buildIosOperation(root, options) {
265
292
  const cache = artifactCachePolicy(optimizations, options.buildCache !== false, integration.runtimeKind(configuration) === "embedded-js");
266
293
  const phase = (label, line) => note(phaseLine(label, line));
267
294
  await ensureWorkspaceStorageSafely(root, { note });
268
- return withNativeBuildRun(root, {
295
+ return withDrainingCancellation(context, context.signal, () => withNativeBuildRun(context, root, {
269
296
  command: "build",
270
297
  platform: "ios"
271
298
  }, async (claim) => {
272
299
  if (!getProject(root)) upsertProject(root, {});
273
- recordWorkspaceUse(root);
300
+ recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
274
301
  const started = Date.now();
275
302
  const startedAt = new Date(started).toISOString();
276
303
  const progress = startBuildProgress({
@@ -286,11 +313,11 @@ async function buildIosOperation(root, options) {
286
313
  truncate: true,
287
314
  fields: { platform: "ios" }
288
315
  }), progress);
289
- setRemoteLogSink((entry) => writer.write(entry));
316
+ setRemoteLogSink(context, (entry) => writer.write(entry));
290
317
  const projectKey = statsProjectKey({
291
318
  root,
292
- commonDir: context.gitCommonDir,
293
- repoRoot: context.repoRoot
319
+ commonDir: settingsContext.gitCommonDir,
320
+ repoRoot: settingsContext.repoRoot
294
321
  });
295
322
  const stats = createRunRecorder({
296
323
  platform: "ios",
@@ -304,7 +331,8 @@ async function buildIosOperation(root, options) {
304
331
  progress.estimate(projectKey);
305
332
  let artifact;
306
333
  let directory;
307
- let succeeded = false;
334
+ let built = null;
335
+ let failureAfterCleanup = null;
308
336
  const finish = (status, appPath, errorCode) => {
309
337
  try {
310
338
  recordFinishedBuild(root, lastBuildRecord({
@@ -330,12 +358,14 @@ async function buildIosOperation(root, options) {
330
358
  };
331
359
  try {
332
360
  const acquired = await acquireIosArtifact({
361
+ context,
333
362
  root,
334
363
  logFile,
335
364
  configuration,
336
365
  buildMachine,
337
366
  physical: false,
338
367
  recipe: integration.artifact({
368
+ operation: context,
339
369
  root,
340
370
  logFile,
341
371
  configuration,
@@ -366,7 +396,7 @@ async function buildIosOperation(root, options) {
366
396
  }),
367
397
  cache: {
368
398
  policy: cache,
369
- providerConfig: resolveCacheProviderConfig(context),
399
+ providerConfig: resolveCacheProviderConfig(settingsContext),
370
400
  disabledByFlag: options.buildCache === false
371
401
  },
372
402
  easBuild: null,
@@ -397,29 +427,26 @@ async function buildIosOperation(root, options) {
397
427
  });
398
428
  if (!acquired.ok) throw Object.assign(new Error(acquired.failure.message ?? "The iOS build failed."), acquired.failure);
399
429
  artifact = acquired.artifact;
400
- artifact.bundleId ??= readBundleId(artifact.path) ?? integration.bundleId();
401
- throwIfCancelled(runCancellationSignal(), "iOS build");
430
+ artifact.bundleId ??= await readBundleId(artifact.path) ?? await integration.bundleId();
431
+ throwIfCancelled(runCancellationSignal(context), "iOS build");
402
432
  const artifacts = join(workspaceDir(root), "artifacts");
403
- mkdirSync(artifacts, { recursive: true });
404
- directory = mkdtempSync(join(artifacts, "ios-"));
433
+ await promises.mkdir(artifacts, { recursive: true });
434
+ directory = await promises.mkdtemp(join(artifacts, "ios-"));
405
435
  const appPath = join(directory, basename(artifact.path));
406
- cpSync(artifact.path, appPath, {
436
+ await promises.cp(artifact.path, appPath, {
407
437
  recursive: true,
408
438
  verbatimSymlinks: true,
409
- mode: constants.COPYFILE_FICLONE
439
+ mode: constants.COPYFILE_FICLONE,
440
+ filter: () => {
441
+ throwIfCancelled(runCancellationSignal(context), "iOS build");
442
+ return true;
443
+ }
410
444
  });
445
+ throwIfCancelled(runCancellationSignal(context), "iOS build");
411
446
  await artifact.completeUploads();
412
- throwIfCancelled(runCancellationSignal(), "iOS build");
413
- finish("ok", appPath);
414
- stats.record({
415
- failed: false,
416
- durationMs: Date.now() - started,
417
- cacheHit: artifact.cache.hit === "local" || artifact.cache.hit === "remote" ? artifact.cache.hit : false,
418
- offloadedTo: artifact.cache.offloadedTo,
419
- waited: artifact.cache.waitedForBuild
420
- });
421
- succeeded = true;
422
- return {
447
+ const links = { workspace: await workspaceShareURL(root, { platform: "ios" }, runCancellationSignal(context) ?? context.signal) };
448
+ throwIfCancelled(runCancellationSignal(context), "iOS build");
449
+ built = {
423
450
  appPath,
424
451
  bundleId: artifact.bundleId,
425
452
  configuration: configuration ?? "Debug",
@@ -432,10 +459,11 @@ async function buildIosOperation(root, options) {
432
459
  builtOn: artifact.cache.builtOn ?? null,
433
460
  compilationCache: artifact.cache.compilation,
434
461
  durationMs: Date.now() - started,
435
- logs: { dir: logs }
462
+ logs: { dir: logs },
463
+ links
436
464
  };
437
465
  } catch (error) {
438
- const failure = runCancellationSignal()?.aborted ? cancelledError("iOS build", error) : error;
466
+ const failure = runCancellationSignal(context)?.aborted ? cancelledError("iOS build", error) : error;
439
467
  finish("failed", void 0, failure.code);
440
468
  stats.record({
441
469
  failed: true,
@@ -443,15 +471,35 @@ async function buildIosOperation(root, options) {
443
471
  });
444
472
  throw failure;
445
473
  } finally {
446
- artifact?.release();
447
- if (!succeeded && directory) rmSync(directory, {
474
+ await artifact?.release();
475
+ failureAfterCleanup = built && runCancellationSignal(context)?.aborted ? cancelledError("iOS build") : null;
476
+ if (failureAfterCleanup) {
477
+ finish("failed", void 0, failureAfterCleanup.code);
478
+ stats.record({
479
+ failed: true,
480
+ durationMs: Date.now() - started
481
+ });
482
+ }
483
+ if ((!built || failureAfterCleanup) && directory) await promises.rm(directory, {
448
484
  recursive: true,
449
485
  force: true
450
486
  });
487
+ if (built && !failureAfterCleanup) {
488
+ finish("ok", built.appPath);
489
+ stats.record({
490
+ failed: false,
491
+ durationMs: Date.now() - started,
492
+ cacheHit: artifact?.cache.hit === "local" || artifact?.cache.hit === "remote" ? artifact?.cache.hit : false,
493
+ offloadedTo: artifact?.cache.offloadedTo,
494
+ waited: artifact?.cache.waitedForBuild
495
+ });
496
+ }
451
497
  writer.close();
452
498
  progress.clear();
453
499
  }
454
- }, { write: (line) => phase("lock", line) });
500
+ if (failureAfterCleanup) throw failureAfterCleanup;
501
+ return built;
502
+ }, { write: (line) => phase("lock", line) }));
455
503
  }
456
504
  //#endregion
457
505
  export { buildAndroidOperation as n, buildIosOperation as t };