stim 1.25.0 → 1.27.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 (182) hide show
  1. package/README.md +1 -1
  2. package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
  3. package/dist/{act-BbHS3oV8.mjs → act-ROviTF_t.mjs} +415 -118
  4. package/dist/{activity-BpjwrQXU.mjs → activity-Cd-ysFes.mjs} +6 -7
  5. package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
  6. package/dist/{android-CNZgRC-4.mjs → android--HBgpvpW.mjs} +5 -5
  7. package/dist/{android-BGwuK3Mc.mjs → android-Cd6w7_qw.mjs} +134 -57
  8. package/dist/{android-saBeB4lr.mjs → android-Deb9X3_Y.mjs} +37 -15
  9. package/dist/{android-Cjcj8MCw.mjs → android-DriNoAVy.mjs} +99 -47
  10. package/dist/{android-cas-BVqh2Zep.mjs → android-cas-D5e6ecUg.mjs} +4 -4
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
  13. package/dist/api.d.mts +20 -7
  14. package/dist/api.mjs +42 -32
  15. package/dist/apk-signed-tail-BHQHx3Rm.mjs +142 -0
  16. package/dist/{artifact-Co8zixVx.mjs → artifact-0AGJYB9O.mjs} +28 -28
  17. package/dist/{artifact-DN8JNwqS.mjs → artifact-faemIZv5.mjs} +40 -30
  18. package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
  19. package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
  20. package/dist/auto-placement-z-H5pJza.mjs +350 -0
  21. package/dist/{browser-web-CCgZsHmI.mjs → browser-web-slD8AvLp.mjs} +16 -17
  22. package/dist/{build-cache-CKCzxzxA.mjs → build-cache-gBJ-WKzA.mjs} +141 -37
  23. package/dist/{build-CAiw8Ezm.mjs → build-hS0QyFlQ.mjs} +38 -31
  24. package/dist/{build-plan-zCuHGlA8.mjs → build-plan-CBqYbzYM.mjs} +7 -6
  25. package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
  26. package/dist/cache-manifest.mjs +1 -1
  27. package/dist/{budget-HyShrIpL.mjs → ccache-BWTze1Ls.mjs} +634 -1514
  28. package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
  29. package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
  30. package/dist/{cli-C4w607Pz.mjs → cli-ftXDLto1.mjs} +24 -23
  31. package/dist/cli.mjs +1 -1
  32. package/dist/{client-BQsmyp_-.mjs → client-xsdxrhWA.mjs} +77 -116
  33. package/dist/collector-run.d.mts +10 -9
  34. package/dist/collector-run.mjs +42 -27
  35. package/dist/{command-output-BBvS1H6v.mjs → command-output-Dj-WT4BP.mjs} +1 -1
  36. package/dist/{config-BZhXY15H.mjs → config-Cn94Jc0g.mjs} +343 -18
  37. package/dist/{launch-DscF1QfM.mjs → dependencies-BGokZ-Ng.mjs} +330 -279
  38. package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-C3OtgG94.mjs} +14 -7
  39. package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
  40. package/dist/{dev-client-CHoXXZeg.mjs → dev-client-BMca82xo.mjs} +2 -2
  41. package/dist/{device-F5-4z9ef.mjs → device-BJm0irrq.mjs} +16 -16
  42. package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-6LP7QsaA.mjs} +103 -25
  43. package/dist/device-host-worker.mjs +19 -21
  44. package/dist/{device-ios-DkHBrmvH.mjs → device-ios-534c14fz.mjs} +288 -28
  45. package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
  46. package/dist/{device-pool-BIg8MU8l.mjs → device-pool-BnQqvs6o.mjs} +3 -3
  47. package/dist/{device-B9FqTBYW.mjs → device-tM41-TUq.mjs} +25 -24
  48. package/dist/{doctor-A_Nr_fDe.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
  49. package/dist/{doctor-k3P3PizH.mjs → doctor-DyqE9n1J.mjs} +28 -16
  50. package/dist/{doctor-Bm8TVpGn.mjs → doctor-F-3VUUyN.mjs} +128 -35
  51. package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +9 -3
  52. package/dist/doctor-fingerprint.mjs +1 -1
  53. package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
  54. package/dist/{eas-build-CyDKNTBP.mjs → eas-build-CjNSWmjo.mjs} +4 -4
  55. package/dist/eas-fallback-9fqb46kW.mjs +87 -0
  56. package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
  57. package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
  58. package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
  59. package/dist/{gc-eaz403W6.mjs → gc-BRwAY3qT.mjs} +2 -2
  60. package/dist/{gc-B9jcnmIk.mjs → gc-CGZ1Yg88.mjs} +218 -72
  61. package/dist/{guide-DR0K0xW9.mjs → guide-_rfEh_zM.mjs} +839 -222
  62. package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
  63. package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-D7Pk_Oo1.mjs} +13 -9
  64. package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-B1gqQuva.mjs} +18 -12
  65. package/dist/hosted-logs-sync-Dg3qrZmV.mjs +195 -0
  66. package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
  67. package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CdgaiuyP.mjs} +17 -17
  68. package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-Cbvo5KEh.mjs} +21 -9
  69. package/dist/{ios-BRVM8b0P.mjs → ios-B5HlVMhQ.mjs} +138 -55
  70. package/dist/{ios-Dvt97HgQ.mjs → ios-Bk4mWbtS.mjs} +8 -8
  71. package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
  72. package/dist/{ios-BQzvJlzw.mjs → ios-E26qSpkb.mjs} +94 -11
  73. package/dist/{ios-device-CKSvk0bu.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
  74. package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
  75. package/dist/{ios-project-DCUDo06I.mjs → ios-project-D8Jcy_br.mjs} +22 -9
  76. package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
  77. package/dist/{ios-state-CT9nV5SP.mjs → ios-state-BZ03NFgF.mjs} +1 -1
  78. package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-Dg2a945i.mjs} +8 -7
  79. package/dist/{launch-D0lPvFFu.mjs → launch-CRyBeNsA.mjs} +53 -44
  80. package/dist/lightened-BCsdAGj_.mjs +171 -0
  81. package/dist/{logs-BsIRre8x.mjs → logs-CC_-ZzEE.mjs} +10 -174
  82. package/dist/{logs-Crs9y34Z.mjs → logs-aJQb-RDg.mjs} +112 -38
  83. package/dist/{macos-CcUlJPMu.mjs → macos-BGmTpnv9.mjs} +1 -1
  84. package/dist/{macos-D477nfzH.mjs → macos-DlCBhMw5.mjs} +73 -39
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +30 -13
  87. package/dist/{metro-1pJgCX4U.mjs → metro-CvyD-xwe.mjs} +4 -4
  88. package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-BnHdqMO_.mjs} +3 -4
  89. package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BCyMWA6b.mjs} +3 -3
  90. package/dist/{native-android-BvMizJn1.mjs → native-android-DlpxCyOP.mjs} +17 -18
  91. package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
  92. package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-DqaIBO5w.mjs} +9 -9
  93. package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
  94. package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
  95. package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -18
  96. package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
  97. package/dist/offload-worker.d.mts +3 -1
  98. package/dist/offload-worker.mjs +34 -25
  99. package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
  100. package/dist/{ownership-jxxz-19m.mjs → ownership-Bx-0cku-.mjs} +3 -3
  101. package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
  102. package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
  103. package/dist/{placement-log-DjOXJRIH.mjs → placement-log-BXUbiZM6.mjs} +3 -3
  104. package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
  105. package/dist/{ports-DtS1Amb0.mjs → ports-uUrghqWN.mjs} +3 -3
  106. package/dist/prebuild-BDpToDgR.mjs +1246 -0
  107. package/dist/{project-BiC68mIp.mjs → project-DYj-HVx6.mjs} +17 -18
  108. package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
  109. package/dist/pull-requests.mjs +1 -1
  110. package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-DDBccgJw.mjs} +56 -36
  111. package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
  112. package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-B-Mw6DcR.mjs} +50 -9
  113. package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-DjYwUF9U.mjs} +45 -25
  114. package/dist/{recordings-BaoQ0t-J.mjs → recordings-C20iUZfp.mjs} +1 -1
  115. package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
  116. package/dist/{reload-Beftw2X3.mjs → reload-DJBeF_rC.mjs} +1 -1
  117. package/dist/{reload-FbSgMF8x.mjs → reload-fUdkH2_p.mjs} +16 -16
  118. package/dist/{remote-BuZj6AyU.mjs → remote-y6n99WMW.mjs} +22 -9
  119. package/dist/{result-CR2vk2cj.mjs → result-CTqBw2Te.mjs} +32 -21
  120. package/dist/{run-BtzE09Dl.mjs → run-DaCeNKRm.mjs} +3 -3
  121. package/dist/{selection-D5cxEl3t.mjs → selection-Bs8phwhN.mjs} +183 -62
  122. package/dist/{server-bare-CH9X0RLn.mjs → server-bare-BOh-iZEj.mjs} +2 -2
  123. package/dist/{server-command-CaBbDNU2.mjs → server-command-8CuA51Cv.mjs} +6 -6
  124. package/dist/{server-expo-Ck8EIidM.mjs → server-expo-ABQs2XFA.mjs} +4 -4
  125. package/dist/server-expo-Ba_Y21vB.mjs +2 -0
  126. package/dist/{settings-B5tCoq9N.mjs → settings-BDVI8Ivc.mjs} +331 -62
  127. package/dist/{settings-DzH9mGQZ.mjs → settings-CMHhQNwI.mjs} +24 -3
  128. package/dist/settings-payload-cm60Zhib.mjs +257 -0
  129. package/dist/settings-write-BdNRLlBn.mjs +185 -0
  130. package/dist/settings.schema.json +84 -39
  131. package/dist/{simslim-BjxszUAb.mjs → simslim-DCQwzoPy.mjs} +4 -3
  132. package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
  133. package/dist/{stage-D8xlRU2D.mjs → stage-F4cAfJGi.mjs} +2 -2
  134. package/dist/{start-C1JLjkNw.mjs → start-DcqnF9p8.mjs} +1 -1
  135. package/dist/{start-YMpNwLhh.mjs → start-DrPwER_2.mjs} +27 -23
  136. package/dist/{state-DMRNP7-4.mjs → state-BX1y5syV.mjs} +4 -5
  137. package/dist/{state-DPaM3u5K.mjs → state-CZxLyetD.mjs} +2 -3
  138. package/dist/{stats-CP7STzZw.mjs → stats-GxuCbles.mjs} +5 -5
  139. package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
  140. package/dist/{status-Fect2w9R.mjs → status-7ULDEJ1e.mjs} +1 -1
  141. package/dist/{status-CRLiJ-O_.mjs → status-BfnK9pUd.mjs} +25 -26
  142. package/dist/{status-cNw6i0_t.mjs → status-Bj7ZYvvc.mjs} +1 -1
  143. package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-BfabQn03.mjs} +5 -5
  144. package/dist/status-worker.mjs +1 -1
  145. package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
  146. package/dist/{stop-COP6PQqw.mjs → stop-CH79S3IZ.mjs} +5 -6
  147. package/dist/{stop-Db9Kh-UA.mjs → stop-D-EAr25B.mjs} +25 -22
  148. package/dist/{stop-Br7LKxBE.mjs → stop-x1Yu3He4.mjs} +2 -2
  149. package/dist/supervisor-run.d.mts +1 -0
  150. package/dist/supervisor-run.mjs +17 -18
  151. package/dist/{support-qKcbgmI5.mjs → support-Be0UeVZU.mjs} +10 -10
  152. package/dist/{support-Cxj9CmII.mjs → support-CNg_YsOk.mjs} +6 -6
  153. package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
  154. package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
  155. package/dist/toolchain-CbCG6C5Z.mjs +2413 -0
  156. package/dist/toolchain-JYAOquPg.mjs +2 -0
  157. package/dist/{trigger-CBMe2YLH.mjs → trigger-DMou-X7j.mjs} +3 -3
  158. package/dist/trigger-qp2ji5wE.mjs +2 -0
  159. package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-C0RsbngN.mjs} +731 -728
  160. package/dist/{web-B4Yjyt1G.mjs → web-Cq_AQ4DK.mjs} +9 -10
  161. package/dist/web-Je6abcpz.mjs +2 -0
  162. package/dist/web-run.mjs +9 -9
  163. package/dist/windows-report.mjs +1 -1
  164. package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-BjqdjnJR.mjs} +46 -8
  165. package/dist/{workspaces-C9w4aeXF.mjs → workspaces-DFbj07jp.mjs} +1801 -76
  166. package/dist/{worktree-CclFIe1Z.mjs → worktree-COAJ3-OD.mjs} +934 -511
  167. package/dist/{worktree-Ct9Gk3KL.mjs → worktree-JGUd_53L.mjs} +1 -1
  168. package/package.json +8 -8
  169. package/dist/ccache-h1FKhZeg.mjs +0 -143
  170. package/dist/created-devices-D2Aca-xu.mjs +0 -52
  171. package/dist/eas-fallback-gaZi-dJL.mjs +0 -381
  172. package/dist/hosted-ios-RtVcJH3u.mjs +0 -15
  173. package/dist/native-run-D5OJsGwA.mjs +0 -276
  174. package/dist/paths-DQtTgsBf.mjs +0 -42
  175. package/dist/prebuild-JUaqOLpc.mjs +0 -501
  176. package/dist/server-expo-C16Zf2k7.mjs +0 -2
  177. package/dist/settings-write-n0zwfohx.mjs +0 -360
  178. package/dist/toolchain-DB1aeqxO.mjs +0 -2
  179. package/dist/toolchain-VzLJzZ7O.mjs +0 -908
  180. package/dist/trigger-BLsHgAGR.mjs +0 -2
  181. package/dist/web-DS4UDWvf.mjs +0 -2
  182. package/dist/xcode-CiIIDnuD.mjs +0 -910
package/dist/api.mjs CHANGED
@@ -1,31 +1,32 @@
1
- import { D as ownership_claim_exports, T as trackReportResource, b as operationState, c as throwIfCancelled, l as WorkspaceProcessCleanupError, s as cancelledError, w as runReport } from "./exec-VFRpu1iA.mjs";
2
- import { d as workspaceDir, m as workspaceLogsDir$1, r as ensureWorkspaceStorageAsync } from "./paths-DQtTgsBf.mjs";
3
- import { E as upsertProject, O as withConfigLockAsync$1, p as getProject, q as validateDeviceSlot, y as refuseRelativeStimPaths } from "./config-BZhXY15H.mjs";
4
- import { l as phaseLine } from "./command-output-BBvS1H6v.mjs";
5
- import { a as recordWorkspaceUseAsync } from "./workspace-state-CPSp3mav.mjs";
6
- import { Pt as repoRootAsync, Y as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, at as unknownSettingKeys, p as cacheProviderSettingError, tt as settingShapeErrors } from "./settings-B5tCoq9N.mjs";
7
- import { c as projectProblem, f as projectRegistry, i as findProjectRoot$1, r as findCommandWorkspaceAsync, t as NO_PROJECT_REFUSAL } from "./project-BiC68mIp.mjs";
8
- import { n as macosDir } from "./state-DPaM3u5K.mjs";
9
- import { c as ensureHomeIdentity, s as workspaceShareURL } from "./stim-desktop-DS0mzR8U.mjs";
10
- import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
11
- import { B as recordFinishedBuild, H as startBuildProgress, U as tapBuildLog } from "./budget-HyShrIpL.mjs";
12
- import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-D5OJsGwA.mjs";
13
- import { c as resolveBuildPlacement } from "./selection-D5cxEl3t.mjs";
14
- import { c as stopWorkspaceNow } from "./stop-Db9Kh-UA.mjs";
15
- import { r as runReload } from "./reload-FbSgMF8x.mjs";
16
- import { c as startDevServer } from "./start-YMpNwLhh.mjs";
17
- import { s as recordDoctorCheck } from "./doctor-watchman-BovI1y3-.mjs";
18
- import { a as readDoctorReport } from "./doctor-k3P3PizH.mjs";
19
- import { h as warmWorktreeTarget, m as removeWorktreeTarget } from "./worktree-CclFIe1Z.mjs";
20
- import { i as readGcReport, n as executeGc, o as withGcMaintenanceClaim } from "./gc-B9jcnmIk.mjs";
21
- import { r as readWorkspaceLogs, t as followWorkspaceLogs } from "./logs-BsIRre8x.mjs";
22
- import { t as readProjectStats } from "./stats-report-n2U5plhk.mjs";
23
- import { n as buildAndroidOperation, t as buildIosOperation } from "./build-CAiw8Ezm.mjs";
24
- import { a as readAndroidBuildPlan, i as runAndroidOperation } from "./android-BGwuK3Mc.mjs";
25
- import { i as readIosBuildPlan, r as runIosOperation } from "./ios-BRVM8b0P.mjs";
26
- import { a as buildMacosBundle, i as planMacos, n as runMacos } from "./macos-D477nfzH.mjs";
27
- import { t as runWeb } from "./web-B4Yjyt1G.mjs";
28
- import { i as SettingsRefusal, o as readSettingsContext, s as readSettingsPayload, t as mutateSetting } from "./settings-write-n0zwfohx.mjs";
1
+ import { D as ownership_claim_exports, T as trackReportResource, b as operationState, c as throwIfCancelled, l as WorkspaceProcessCleanupError, s as cancelledError, w as runReport } from "./exec-aULwtNly.mjs";
2
+ import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir$1, v as ensureWorkspaceStorageAsync } from "./workspace-state-BjqdjnJR.mjs";
3
+ import { E as upsertProject, O as withConfigLockAsync$1, p as getProject, q as validateDeviceSlot, y as refuseRelativeStimPaths } from "./config-Cn94Jc0g.mjs";
4
+ import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
5
+ import { Lt as repoRootAsync, Z as resolveProjectSettingsAsync, _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, p as cacheProviderSettingError, rt as settingShapeErrors, st as unknownSettingKeys } from "./settings-BDVI8Ivc.mjs";
6
+ import { c as projectProblem, f as projectRegistry, i as findProjectRoot$1, r as findCommandWorkspaceAsync, t as NO_PROJECT_REFUSAL } from "./project-DYj-HVx6.mjs";
7
+ import { n as macosDir } from "./state-CZxLyetD.mjs";
8
+ import { c as ensureHomeIdentity, s as workspaceShareURL } from "./stim-desktop-CbWo21kb.mjs";
9
+ import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
10
+ import { Q as errorRemedy, X as tapBuildLog, Y as startBuildProgress, q as recordFinishedBuild } from "./workspaces-DFbj07jp.mjs";
11
+ import { ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CbCG6C5Z.mjs";
12
+ import { d as resolveBuildPlacement } from "./selection-Bs8phwhN.mjs";
13
+ import { c as stopWorkspaceNow } from "./stop-D-EAr25B.mjs";
14
+ import { r as runReload } from "./reload-fUdkH2_p.mjs";
15
+ import { h as warmWorktreeTarget, m as removeWorktreeTarget } from "./worktree-COAJ3-OD.mjs";
16
+ import { i as restoreLightenedDependencies } from "./lightened-BCsdAGj_.mjs";
17
+ import { c as startDevServer } from "./start-DrPwER_2.mjs";
18
+ import { s as recordDoctorCheck } from "./doctor-watchman-CxDbyrrt.mjs";
19
+ import { c as readSettingsPayload, s as readSettingsContext, t as SettingsRefusal } from "./settings-payload-cm60Zhib.mjs";
20
+ import { a as readDoctorReport } from "./doctor-DyqE9n1J.mjs";
21
+ import { i as readGcReport, n as executeGc, o as withGcMaintenanceClaim } from "./gc-CGZ1Yg88.mjs";
22
+ import { r as readWorkspaceLogs, t as followWorkspaceLogs } from "./logs-CC_-ZzEE.mjs";
23
+ import { t as readProjectStats } from "./stats-report-B86Cv7Uc.mjs";
24
+ import { n as buildAndroidOperation, t as buildIosOperation } from "./build-hS0QyFlQ.mjs";
25
+ import { a as readAndroidBuildPlan, i as runAndroidOperation } from "./android-Cd6w7_qw.mjs";
26
+ import { i as readIosBuildPlan, r as runIosOperation } from "./ios-B5HlVMhQ.mjs";
27
+ import { a as buildMacosBundle, i as planMacos, n as runMacos } from "./macos-DlCBhMw5.mjs";
28
+ import { t as runWeb } from "./web-Cq_AQ4DK.mjs";
29
+ import { t as mutateSetting } from "./settings-write-BdNRLlBn.mjs";
29
30
  import { randomBytes } from "node:crypto";
30
31
  import { mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync } from "node:fs";
31
32
  import { stripVTControlCharacters } from "node:util";
@@ -79,6 +80,7 @@ async function buildMacosOperation(context, root, options) {
79
80
  };
80
81
  let directory;
81
82
  let succeeded = false;
83
+ let remedy;
82
84
  try {
83
85
  const artifacts = join(workspaceDir(root), "artifacts");
84
86
  mkdirSync(artifacts, { recursive: true });
@@ -117,6 +119,7 @@ async function buildMacosOperation(context, root, options) {
117
119
  build.state = "failed";
118
120
  build.error = failure instanceof Error ? failure.message : String(failure);
119
121
  build.errorCode = failure.code;
122
+ remedy = errorRemedy(failure);
120
123
  throw failure;
121
124
  } finally {
122
125
  build.finishedAt = (/* @__PURE__ */ new Date()).toISOString();
@@ -137,7 +140,11 @@ async function buildMacosOperation(context, root, options) {
137
140
  builtOn: build.builtOn,
138
141
  offloadedTo: build.offloadedTo,
139
142
  offloadFallback: build.offloadFallback,
140
- compileSteps: progress.steps()
143
+ compileSteps: progress.steps(),
144
+ ...build.error ? { ledger: {
145
+ message: build.error,
146
+ remedy
147
+ } } : {}
141
148
  }, { artifactOnly: true });
142
149
  } catch (error) {
143
150
  note(phaseLine("state", `could not record the build: ${error?.message || error}`));
@@ -317,7 +324,7 @@ function createStim(options) {
317
324
  }), () => {});
318
325
  return task;
319
326
  }),
320
- gc: ({ signal, olderThan, cache, worktrees } = {}) => {
327
+ gc: ({ signal, olderThan, cache, worktrees, measureBuildState } = {}) => {
321
328
  if (olderThan !== void 0 && !Number.isSafeInteger(olderThan)) return Promise.reject(new StimError({
322
329
  code: "STIM_BAD_ARG",
323
330
  message: "olderThan must be a whole number of days."
@@ -326,7 +333,8 @@ function createStim(options) {
326
333
  const result = await readGcReport({
327
334
  olderThan,
328
335
  cache,
329
- worktrees
336
+ worktrees,
337
+ measureBuildState
330
338
  }, {
331
339
  operation: context,
332
340
  easLedgerRoot: join(context.env.HOME || context.env.USERPROFILE || homedir(), ".stim", "machine", "eas")
@@ -611,6 +619,8 @@ async function start(context, options) {
611
619
  });
612
620
  const root = findProjectRoot$1(context.projectRoot);
613
621
  if (!root) throw new StimError(NO_PROJECT_REFUSAL);
622
+ const lightened = await restoreLightenedDependencies(root, context);
623
+ if (lightened) throw new StimError(lightened);
614
624
  const problem = projectProblem(root, "dev-server");
615
625
  if (problem) throw new StimError({
616
626
  code: "STIM_NO_PROJECT",
@@ -632,7 +642,7 @@ async function start(context, options) {
632
642
  message: shapeErrors.join("\n"),
633
643
  remedy: SETTING_SHAPE_REMEDY
634
644
  });
635
- for (const key of unknownSettingKeys(settings)) note(context)(`Warning: setting "${key}" is not read by Stim and will be ignored.`);
645
+ for (const key of unknownSettingKeys(settings)) note(context)(inertSettingWarning(settings, key));
636
646
  const cacheError = cacheProviderSettingError(settings);
637
647
  if (cacheError) note(context)(`Warning: ${cacheError} No cache provider is used.`);
638
648
  await ensureWorkspaceStorageAsync(root, context.signal);
@@ -0,0 +1,142 @@
1
+ import { y as sharedBuildCache } from "./workspace-state-BjqdjnJR.mjs";
2
+ import { E as findBuildTool } from "./android-DriNoAVy.mjs";
3
+ import { createHash, randomUUID } from "node:crypto";
4
+ import { closeSync, fstatSync, openSync, readFileSync, readSync, realpathSync, renameSync, rmSync } from "node:fs";
5
+ import { basename, dirname, join } from "node:path";
6
+ import { writeFile } from "node:fs/promises";
7
+ //#region src/engine/apk-signed-tail.ts
8
+ const SIGNED_TAIL_FILE = "apk-signed-tail.json";
9
+ const EOCD_SIGNATURE = 101010256;
10
+ const EOCD_MIN_BYTES = 22;
11
+ const EOCD_SEARCH_BYTES = 65557;
12
+ const SIGNING_BLOCK_FOOTER_BYTES = 24;
13
+ const SIGNING_BLOCK_MAGIC = "APK Sig Block 42";
14
+ const SIGNATURE_SCHEME_IDS = /* @__PURE__ */ new Set([1896449818, 4031998144]);
15
+ const SHA256_HEX = /^[0-9a-f]{64}$/;
16
+ const VERIFIED_V2_OR_V3 = /^Verified using v[23] scheme \(APK Signature Scheme v[23]\): true\s*$/m;
17
+ /**
18
+ * The offset where an APK's v2 or v3 signing block starts, or null when the file has no such block, is ZIP64, or is
19
+ * malformed. https://source.android.com/docs/security/features/apksigning/v2#apk-signing-block
20
+ */
21
+ function signingBlockOffset(size, read) {
22
+ if (size < EOCD_MIN_BYTES) return null;
23
+ const searched = Math.min(size, EOCD_SEARCH_BYTES);
24
+ const end = read(size - searched, searched);
25
+ let eocd = -1;
26
+ for (let i = end.length - EOCD_MIN_BYTES; i >= 0; i--) if (end.readUInt32LE(i) === EOCD_SIGNATURE && i + EOCD_MIN_BYTES + end.readUInt16LE(i + 20) === end.length) {
27
+ eocd = i;
28
+ break;
29
+ }
30
+ if (eocd < 0) return null;
31
+ const directoryOffset = end.readUInt32LE(eocd + 16);
32
+ if (directoryOffset === 4294967295 || directoryOffset < 32) return null;
33
+ const footer = read(directoryOffset - SIGNING_BLOCK_FOOTER_BYTES, SIGNING_BLOCK_FOOTER_BYTES);
34
+ if (footer.subarray(8).toString("latin1") !== SIGNING_BLOCK_MAGIC) return null;
35
+ const blockSize = footer.readBigUInt64LE(0);
36
+ if (blockSize < BigInt(SIGNING_BLOCK_FOOTER_BYTES) || blockSize + 8n > BigInt(directoryOffset)) return null;
37
+ const start = directoryOffset - Number(blockSize) - 8;
38
+ const pairs = read(start, Number(blockSize) + 8 - SIGNING_BLOCK_FOOTER_BYTES);
39
+ if (pairs.readBigUInt64LE(0) !== blockSize) return null;
40
+ let position = 8;
41
+ while (position + 12 <= pairs.length) {
42
+ const length = pairs.readBigUInt64LE(position);
43
+ if (length < 4n || length > BigInt(pairs.length - position - 8)) return null;
44
+ if (SIGNATURE_SCHEME_IDS.has(pairs.readUInt32LE(position + 8))) return start;
45
+ position += 8 + Number(length);
46
+ }
47
+ return null;
48
+ }
49
+ function readSignedTail(apkPath) {
50
+ let fd = null;
51
+ try {
52
+ fd = openSync(apkPath, "r");
53
+ const open = fd;
54
+ const size = fstatSync(open).size;
55
+ const read = (position, length) => {
56
+ const buffer = Buffer.alloc(length);
57
+ if (readSync(open, buffer, 0, length, position) !== length) throw new Error("short read");
58
+ return buffer;
59
+ };
60
+ const tailOffset = signingBlockOffset(size, read);
61
+ if (tailOffset === null) return null;
62
+ const tailSha256 = createHash("sha256").update(read(tailOffset, size - tailOffset)).digest("hex");
63
+ return {
64
+ file: basename(apkPath),
65
+ size,
66
+ tailOffset,
67
+ tailSha256
68
+ };
69
+ } catch {
70
+ return null;
71
+ } finally {
72
+ if (fd !== null) try {
73
+ closeSync(fd);
74
+ } catch {}
75
+ }
76
+ }
77
+ const apksignerPath = () => findBuildTool(["apksigner"])?.path ?? null;
78
+ async function computeSignedTail(apkPath, run, findSigner = apksignerPath) {
79
+ const tail = readSignedTail(apkPath);
80
+ if (!tail) return null;
81
+ const signer = findSigner();
82
+ if (!signer) return null;
83
+ try {
84
+ if (!VERIFIED_V2_OR_V3.test(String(await run(signer, [
85
+ "verify",
86
+ "--verbose",
87
+ apkPath
88
+ ])))) return null;
89
+ } catch {
90
+ return null;
91
+ }
92
+ const after = readSignedTail(apkPath);
93
+ return after && after.size === tail.size && after.tailSha256 === tail.tailSha256 ? tail : null;
94
+ }
95
+ function recordedSignedTail(apkPath) {
96
+ try {
97
+ const parsed = JSON.parse(readFileSync(join(dirname(apkPath), SIGNED_TAIL_FILE), "utf-8"));
98
+ if (!parsed || typeof parsed !== "object" || !("file" in parsed) || !("size" in parsed) || !("tailOffset" in parsed) || !("tailSha256" in parsed)) return null;
99
+ const { file, size, tailOffset, tailSha256 } = parsed;
100
+ if (file !== basename(apkPath) || typeof size !== "number" || typeof tailOffset !== "number" || typeof tailSha256 !== "string" || !SHA256_HEX.test(tailSha256) || !Number.isSafeInteger(size) || !Number.isSafeInteger(tailOffset) || tailOffset < 0 || tailOffset >= size) return null;
101
+ const current = readSignedTail(apkPath);
102
+ if (!current || current.size !== size || current.tailOffset !== tailOffset || current.tailSha256 !== tailSha256) return null;
103
+ return {
104
+ file,
105
+ size,
106
+ tailOffset,
107
+ tailSha256
108
+ };
109
+ } catch {
110
+ return null;
111
+ }
112
+ }
113
+ async function writeSignedTail(dir, tail) {
114
+ const target = join(dir, SIGNED_TAIL_FILE);
115
+ const temporary = `${target}.${randomUUID()}.tmp`;
116
+ try {
117
+ await writeFile(temporary, JSON.stringify(tail));
118
+ renameSync(temporary, target);
119
+ } catch (error) {
120
+ rmSync(temporary, { force: true });
121
+ throw error;
122
+ }
123
+ }
124
+ function inBuildCacheEntry(apkPath) {
125
+ try {
126
+ return realpathSync(dirname(dirname(apkPath))) === realpathSync(join(sharedBuildCache(), "android"));
127
+ } catch {
128
+ return false;
129
+ }
130
+ }
131
+ async function signedTailFor(apkPath, run, findSigner) {
132
+ const recorded = recordedSignedTail(apkPath);
133
+ if (recorded || !inBuildCacheEntry(apkPath)) return recorded;
134
+ const computed = await computeSignedTail(apkPath, run, findSigner);
135
+ if (!computed) return null;
136
+ try {
137
+ await writeSignedTail(dirname(apkPath), computed);
138
+ } catch {}
139
+ return computed;
140
+ }
141
+ //#endregion
142
+ export { signedTailFor as n, writeSignedTail as r, computeSignedTail as t };
@@ -1,17 +1,16 @@
1
- import { D as ownership_claim_exports, c as throwIfCancelled, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
2
- import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
3
- import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-BBvS1H6v.mjs";
4
- import { Bn as RESOLVE_TIMEOUT_MS, Gn as isEasAuthFailureText, Wn as easAuthNote } from "./budget-HyShrIpL.mjs";
5
- import { d as runCancellationSignal, r as cancelledFailure } from "./native-run-D5OJsGwA.mjs";
6
- import { g as providerDownloadPath, h as prepareProviderDownloadDir } from "./build-cache-CKCzxzxA.mjs";
7
- import { n as CCACHE_UNAVAILABLE, r as ccacheActivityLine, t as CCACHE_NOT_RUN } from "./ccache-h1FKhZeg.mjs";
8
- import { c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-BQsmyp_-.mjs";
9
- import { i as namedBuildMachine, o as requireLocalBuild, r as fingerprintMismatchRemedy, t as OffloadRefusal } from "./selection-D5cxEl3t.mjs";
10
- import { f as formatDiagnostic } from "./react-native-build-CwZB-agu.mjs";
11
- import { u as skippedMissReason } from "./prebuild-JUaqOLpc.mjs";
12
- import { t as buildPlacementRecord } from "./placement-log-DjOXJRIH.mjs";
13
- import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-zA4S7RHE.mjs";
14
- import { a as PLATFORM, h as displayPath } from "./support-Cxj9CmII.mjs";
1
+ import { D as ownership_claim_exports, c as throwIfCancelled, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
+ import { E as workspaceDir } from "./workspace-state-BjqdjnJR.mjs";
3
+ import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-Dj-WT4BP.mjs";
4
+ import { Dn as RESOLVE_TIMEOUT_MS, Mn as isEasAuthFailureText, jn as easAuthNote, n as CCACHE_UNAVAILABLE, r as ccacheActivityLine, t as CCACHE_NOT_RUN } from "./ccache-BWTze1Ls.mjs";
5
+ import { Q as cancelledFailure, ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
6
+ import { b as providerDownloadPath, y as prepareProviderDownloadDir } from "./build-cache-gBJ-WKzA.mjs";
7
+ import { c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-xsdxrhWA.mjs";
8
+ import { a as missingPackageManagerRemedy, i as fingerprintMismatchRemedy, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, t as OffloadRefusal } from "./selection-Bs8phwhN.mjs";
9
+ import { f as formatDiagnostic } from "./react-native-build-DaK2IFyP.mjs";
10
+ import { u as skippedMissReason } from "./prebuild-BDpToDgR.mjs";
11
+ import { t as buildPlacementRecord } from "./placement-log-BXUbiZM6.mjs";
12
+ import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-BKN2Yuhg.mjs";
13
+ import { a as PLATFORM, h as displayPath } from "./support-CNg_YsOk.mjs";
15
14
  import { t as AndroidRecipeRefusal } from "./android-project-BCAAmMwz.mjs";
16
15
  import { rmSync } from "node:fs";
17
16
  import { join } from "node:path";
@@ -47,7 +46,7 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
47
46
  }
48
47
  }));
49
48
  if (namedBuildMachine(buildMachine)) throw new OffloadRefusal(buildMachine, reason, info.remedy);
50
- requireLocalBuild(buildMachine);
49
+ requireLocalBuild(buildMachine, reason);
51
50
  record.offloadFallback = reason;
52
51
  phase("build", `${line} -> building here`);
53
52
  };
@@ -295,7 +294,7 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
295
294
  try {
296
295
  slotWaitMs = (await run.takeBuildSlot({
297
296
  signal,
298
- automatic: buildMachine === "auto",
297
+ automatic: automaticBuild(buildMachine),
299
298
  max: maxBuilds,
300
299
  out,
301
300
  waitingFor: (info) => waitingFor?.(info, "build-slot")
@@ -319,12 +318,11 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
319
318
  hereReason = cacheIneligible;
320
319
  return null;
321
320
  }
322
- const { mode, machines, localEnabled } = buildPlacementCandidates(buildMachine);
321
+ const { machines, localEnabled } = buildPlacementCandidates(buildMachine);
323
322
  if (localEnabled && machines.length === 0 && !namedBuildMachine(buildMachine) && buildMachine !== "local") return null;
324
323
  const unsupported = targetOffloadRefusal ?? (recipe.offload ? recipe.offload.unsupported : "this project integration does not support offloaded builds");
325
324
  const here = machineCapacity();
326
325
  const placement = offloadPlacement({
327
- mode,
328
326
  localEnabled,
329
327
  machines: machines.length,
330
328
  here,
@@ -335,7 +333,6 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
335
333
  hereReason = placement.reason;
336
334
  if (placement.code === "this-mac-free" && cachePolicy.read && cachePolicy.remote && (recipe.offload?.uncachedArtifacts || recipe.offload && !recipe.offload.request.native)) return {
337
335
  cacheOnly: true,
338
- mode,
339
336
  here,
340
337
  code: placement.code,
341
338
  reason: placement.reason,
@@ -349,12 +346,11 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
349
346
  reason: placement.reason
350
347
  }
351
348
  }));
352
- if (mode !== "off") phase("build", `placement: here (${placement.reason})`);
349
+ if (buildMachine !== "local") phase("build", `placement: here (${placement.reason})`);
353
350
  return null;
354
351
  }
355
352
  return {
356
353
  cacheOnly: false,
357
- mode,
358
354
  here,
359
355
  code: placement.code,
360
356
  reason: placement.reason,
@@ -377,7 +373,6 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
377
373
  const choice = await chooseBuildMachine({
378
374
  projectRoot: root,
379
375
  target,
380
- mode: candidate.mode,
381
376
  here: candidate.here,
382
377
  note: (line) => phase("build", chalk.dim(`offload: ${line}`)),
383
378
  machines: candidate.machines,
@@ -506,7 +501,7 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
506
501
  fallBack(`${choice.machine}: ${why}`, `offload failed: ${why}`, {
507
502
  code: "offload-failed",
508
503
  machine: choice.machine,
509
- remedy: outcome.ok ? void 0 : fingerprintMismatchRemedy(outcome.reason)
504
+ remedy: outcome.ok ? void 0 : fingerprintMismatchRemedy(outcome.reason) ?? missingPackageManagerRemedy(choice.machine, outcome.reason)
510
505
  });
511
506
  writer.write({
512
507
  src: "build",
@@ -780,11 +775,14 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
780
775
  now
781
776
  }
782
777
  });
783
- if (!acquired.ok) return {
784
- ok: false,
785
- failure: acquired.failure,
786
- ccache: ccacheActivity
787
- };
778
+ if (!acquired.ok) {
779
+ recipe.fingerprintCheck?.()?.cancel();
780
+ return {
781
+ ok: false,
782
+ failure: acquired.failure,
783
+ ccache: ccacheActivity
784
+ };
785
+ }
788
786
  return {
789
787
  ok: true,
790
788
  artifact: {
@@ -792,7 +790,9 @@ async function acquireAndroidArtifact({ context, root, buildLog, writer, recipe,
792
790
  handoff,
793
791
  androidPackage,
794
792
  apkPackage: record.cacheHit && storeKey ? entryAppId(PLATFORM, storeKey) : null,
793
+ fingerprintCheck: recipe.fingerprintCheck?.() ?? null,
795
794
  release: async () => {
795
+ recipe.fingerprintCheck?.()?.cancel();
796
796
  await settleArtifactUploads(providerUpload, uploadPending);
797
797
  acquired.release();
798
798
  },
@@ -1,17 +1,16 @@
1
- import { D as ownership_claim_exports, c as throwIfCancelled, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
2
- import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
3
- import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-BBvS1H6v.mjs";
4
- import { Bn as RESOLVE_TIMEOUT_MS, Gn as isEasAuthFailureText, Wn as easAuthNote } from "./budget-HyShrIpL.mjs";
5
- import { d as runCancellationSignal, r as cancelledFailure } from "./native-run-D5OJsGwA.mjs";
6
- import { _ as providerUploadOutcome, g as providerDownloadPath, h as prepareProviderDownloadDir, x as storedAppId } from "./build-cache-CKCzxzxA.mjs";
7
- import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-CiIIDnuD.mjs";
8
- import { C as COMPILATION_CACHE_CORRUPT, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText, w as clearCorruptCompilationCache } from "./client-BQsmyp_-.mjs";
9
- import { i as namedBuildMachine, o as requireLocalBuild, r as fingerprintMismatchRemedy, t as OffloadRefusal } from "./selection-D5cxEl3t.mjs";
10
- import { S as xcodeFailureReport, p as printDiagnostics } from "./support-qKcbgmI5.mjs";
11
- import { u as skippedMissReason } from "./prebuild-JUaqOLpc.mjs";
12
- import { t as buildPlacementRecord } from "./placement-log-DjOXJRIH.mjs";
13
- import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-zA4S7RHE.mjs";
14
- import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-DCUDo06I.mjs";
1
+ import { D as ownership_claim_exports, c as throwIfCancelled, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
+ import { E as workspaceDir } from "./workspace-state-BjqdjnJR.mjs";
3
+ import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-Dj-WT4BP.mjs";
4
+ import { Dn as RESOLVE_TIMEOUT_MS, Mn as isEasAuthFailureText, jn as easAuthNote } from "./ccache-BWTze1Ls.mjs";
5
+ import { P as compilationCacheActivityLine, Q as cancelledFailure, k as COMPILATION_CACHE_NOT_RUN, ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
6
+ import { T as storedAppId, b as providerDownloadPath, x as providerUploadOutcome, y as prepareProviderDownloadDir } from "./build-cache-gBJ-WKzA.mjs";
7
+ import { C as COMPILATION_CACHE_CORRUPT, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, s as offloadCheck, u as remotePhaseText, w as clearCorruptCompilationCache } from "./client-xsdxrhWA.mjs";
8
+ import { a as missingPackageManagerRemedy, c as podsFailedRemedy, h as predictedRefusal, i as fingerprintMismatchRemedy, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, t as OffloadRefusal } from "./selection-Bs8phwhN.mjs";
9
+ import { S as xcodeFailureReport, p as printDiagnostics } from "./support-Be0UeVZU.mjs";
10
+ import { f as settleFingerprintCheck, u as skippedMissReason } from "./prebuild-BDpToDgR.mjs";
11
+ import { t as buildPlacementRecord } from "./placement-log-BXUbiZM6.mjs";
12
+ import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-BKN2Yuhg.mjs";
13
+ import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-D8Jcy_br.mjs";
15
14
  import { rmSync } from "node:fs";
16
15
  import { join } from "node:path";
17
16
  import { machineCapacity } from "@stim-cli/core/state";
@@ -64,7 +63,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
64
63
  }
65
64
  }));
66
65
  if (namedBuildMachine(buildMachine)) throw new OffloadRefusal(buildMachine, reason, info.remedy);
67
- requireLocalBuild(buildMachine);
66
+ requireLocalBuild(buildMachine, reason);
68
67
  offloadFallback = reason;
69
68
  buildFailure = {
70
69
  ...buildFailure,
@@ -289,7 +288,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
289
288
  try {
290
289
  slotWaitMs = (await run.takeBuildSlot({
291
290
  signal,
292
- automatic: buildMachine === "auto",
291
+ automatic: automaticBuild(buildMachine),
293
292
  max: maxBuilds,
294
293
  out: note,
295
294
  waitingFor: (info) => waitingFor?.(info, "build-slot")
@@ -314,9 +313,9 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
314
313
  hereReason = cacheIneligible;
315
314
  return null;
316
315
  }
317
- const { mode, machines, localEnabled } = buildPlacementCandidates(buildMachine);
316
+ const { machines, localEnabled } = buildPlacementCandidates(buildMachine);
318
317
  if (localEnabled && machines.length === 0 && !namedBuildMachine(buildMachine) && buildMachine !== "local") return null;
319
- const { runtime, unsupported } = mode === "off" && !namedBuildMachine(buildMachine) ? {
318
+ const { runtime, unsupported } = buildMachine === "local" ? {
320
319
  runtime: null,
321
320
  unsupported: null
322
321
  } : await recipe.offload?.context() ?? {
@@ -325,7 +324,6 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
325
324
  };
326
325
  const here = machineCapacity();
327
326
  const placement = offloadPlacement({
328
- mode,
329
327
  localEnabled,
330
328
  machines: machines.length,
331
329
  here,
@@ -336,7 +334,6 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
336
334
  hereReason = placement.reason;
337
335
  if (placement.code === "this-mac-free" && runtime && useBuildCache && cachePolicy.remote && recipe.offload !== void 0) return {
338
336
  cacheOnly: true,
339
- mode,
340
337
  here,
341
338
  code: placement.code,
342
339
  reason: placement.reason,
@@ -351,12 +348,18 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
351
348
  reason: placement.reason
352
349
  }
353
350
  }));
354
- if (mode !== "off") phase("build", `placement: here (${placement.reason})`);
351
+ if (buildMachine !== "local") phase("build", `placement: here (${placement.reason})`);
355
352
  return null;
356
353
  }
354
+ const named = machines.find((each) => each.machine === buildMachine);
355
+ const offload = recipe.offload;
356
+ if (placement.code === "named" && named && offload && runtime) {
357
+ const { problems } = await offloadCheck(root, async () => [await offload.target(runtime)])(named);
358
+ const predicted = predictedRefusal(buildMachine, problems);
359
+ if (predicted) throw new OffloadRefusal(buildMachine, predicted.reason, predicted.remedy);
360
+ }
357
361
  return {
358
362
  cacheOnly: false,
359
- mode,
360
363
  here,
361
364
  code: placement.code,
362
365
  reason: placement.reason,
@@ -364,15 +367,17 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
364
367
  machines
365
368
  };
366
369
  }
370
+ let localCocoapods = null;
367
371
  /** Asks the paired machines once the post-mutation key is known; null builds here. */
368
372
  async function chooseMachine(candidate) {
369
373
  const offload = recipe.offload;
370
374
  if (!offload) return null;
371
375
  let asked = [];
376
+ const target = await offload.target(candidate.runtime);
377
+ localCocoapods = target.platform === "ios" ? target.local.cocoapods : null;
372
378
  const choice = await chooseBuildMachine({
373
379
  projectRoot: root,
374
- target: await offload.target(candidate.runtime),
375
- mode: candidate.mode,
380
+ target,
376
381
  here: candidate.here,
377
382
  note: (line) => note(chalk.dim(phaseLine("build", `offload: ${line}`))),
378
383
  machines: candidate.machines,
@@ -484,7 +489,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
484
489
  fallBack(`${choice.machine}: ${why}`, `offload failed: ${why}`, {
485
490
  code: corrupt === void 0 ? "offload-failed" : COMPILATION_CACHE_CORRUPT,
486
491
  machine: choice.machine,
487
- remedy: outcome.ok ? void 0 : fingerprintMismatchRemedy(outcome.reason)
492
+ remedy: outcome.ok ? void 0 : fingerprintMismatchRemedy(outcome.reason) ?? missingPackageManagerRemedy(choice.machine, outcome.reason) ?? podsFailedRemedy(choice.machine, outcome.reason, localCocoapods)
488
493
  });
489
494
  logWriter().write({
490
495
  src: "build",
@@ -778,11 +783,14 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
778
783
  logFile,
779
784
  deps: d
780
785
  });
781
- if (!acquired.ok) return {
782
- ok: false,
783
- failure: acquired.failure,
784
- compilationCache
785
- };
786
+ if (!acquired.ok) {
787
+ recipe.fingerprintCheck?.()?.cancel();
788
+ return {
789
+ ok: false,
790
+ failure: acquired.failure,
791
+ compilationCache
792
+ };
793
+ }
786
794
  appPath = acquired.artifact;
787
795
  return {
788
796
  ok: true,
@@ -822,8 +830,10 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
822
830
  if (outcome.warn) note(chalk.yellow(phaseLine("cache", outcome.line)));
823
831
  else phase("cache", outcome.line);
824
832
  }
833
+ await settleFingerprintCheck(recipe.fingerprintCheck?.() ?? null, "ios", (line) => note(chalk.yellow(phaseLine("fingerprint", line))), (record) => logWriter().write(record));
825
834
  return abandonedRemote || uploadWasAbandoned;
826
835
  },
836
+ cancelFingerprintCheck: () => recipe.fingerprintCheck?.()?.cancel(),
827
837
  release: async () => {
828
838
  await settleArtifactUploads(providerUpload, uploadPending);
829
839
  acquired.release();
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
1
+ import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
2
  import { join } from "node:path";
3
3
  //#region src/macos/artifact-platform.ts
4
4
  async function validateMacosArtifactPlatform(context, bundle, product, signal, nodeArch = process.arch) {
@@ -10,13 +10,15 @@ function due(state, settings, now, attemptedAt) {
10
10
  pressure: settings.pressureCheckMinutes * 6e4,
11
11
  size: settings.sizeCheckMinutes * 6e4,
12
12
  worktree: settings.removeFinishedWorktrees ? settings.worktreeCheckMinutes * 6e4 : Infinity,
13
- sweep: settings.sweepHours > 0 ? settings.sweepHours * 36e5 : Infinity
13
+ sweep: settings.sweepHours > 0 ? settings.sweepHours * 36e5 : Infinity,
14
+ idle: settings.idleCheckMinutes * 6e4
14
15
  };
15
16
  return [
16
17
  "pressure",
17
18
  "size",
18
19
  "worktree",
19
- "sweep"
20
+ "sweep",
21
+ "idle"
20
22
  ].filter((check) => {
21
23
  if (intervalMs[check] === Infinity || elapsed(state?.deferredAt?.[check]) < DEFERRED_RETRY_MS) return false;
22
24
  return elapsed(state?.lastAt[check]) >= intervalMs[check];