stim 1.20.2 → 1.22.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 (231) hide show
  1. package/README.md +141 -8
  2. package/dist/acquire-artifact-Co2k4f7O.mjs +171 -0
  3. package/dist/act-DsuqEkiM.mjs +2801 -0
  4. package/dist/activity-CMLmzp7o.mjs +1397 -0
  5. package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-DUFaTMdd.mjs} +23 -67
  6. package/dist/{android-DCKZrNvV.mjs → android-ByRMUoiJ.mjs} +157 -93
  7. package/dist/{android-Mz_Inn3w.mjs → android-C7sVmyI9.mjs} +299 -116
  8. package/dist/{android-Dlzxshgp.mjs → android-DGkNqa_c.mjs} +5 -5
  9. package/dist/{android-HqP1_vB_.mjs → android-DR5lZ2Az.mjs} +2 -2
  10. package/dist/android-cas-compiler.mjs +2 -2
  11. package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-ngferVq2.mjs} +7 -6
  12. package/dist/android-project-BCAAmMwz.mjs +12 -0
  13. package/dist/android-project-DVWyCbWU.d.mts +391 -0
  14. package/dist/api.d.mts +810 -64
  15. package/dist/api.mjs +782 -1
  16. package/dist/{artifact-HSwkIWEQ.mjs → artifact-8EY8SAPw.mjs} +240 -213
  17. package/dist/{artifact-D3czlUvT.mjs → artifact-DJPy518Y.mjs} +203 -164
  18. package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
  19. package/dist/{browser-web-CA-F1GQo.mjs → browser-web-Bcv99PBM.mjs} +194 -64
  20. package/dist/budget-Cvwn54qV.mjs +9285 -0
  21. package/dist/{build-DYDbfkk5.mjs → build-CabC3G23.mjs} +153 -98
  22. package/dist/build-cache-Dv7RN200.mjs +602 -0
  23. package/dist/build-plan-DUC8Ka9y.mjs +248 -0
  24. package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DSeQjt-Q.mjs} +2 -2
  25. package/dist/cache-manifest.mjs +1 -1
  26. package/dist/{ccache-zdKiYQ3E.mjs → ccache-Btwc36-I.mjs} +10 -9
  27. package/dist/{cdp-Dq_ypAlJ.mjs → cdp-3fwICjzi.mjs} +18 -5
  28. package/dist/{chrome-BnzZMqsR.mjs → chrome-Bbw689-6.mjs} +7 -4
  29. package/dist/{cli-CLP3diBm.mjs → cli-CHZa9Lvk.mjs} +20 -20
  30. package/dist/cli.mjs +1 -1
  31. package/dist/client-OyRoEuSr.mjs +1577 -0
  32. package/dist/collector-run.d.mts +4 -40
  33. package/dist/collector-run.mjs +9 -8
  34. package/dist/{command-output-BTy8hZ0F.mjs → command-output-gwpm28fu.mjs} +1 -1
  35. package/dist/config-DlrsduwG.mjs +955 -0
  36. package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-x9rN6bhs.mjs} +14 -4
  37. package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-1I9KZT1Y.mjs} +20 -5
  38. package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
  39. package/dist/{dev-client-DAWVIGBu.mjs → dev-client-BSDR5h3F.mjs} +2 -2
  40. package/dist/{device-BECOiufl.mjs → device-B-L3Fbxy.mjs} +91 -34
  41. package/dist/device-DklWZLqb.mjs +1068 -0
  42. package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-DK5_EwRS.mjs} +42 -13
  43. package/dist/device-host-worker.mjs +76 -79
  44. package/dist/{device-ios-COSi6oS1.mjs → device-ios-DoB6KFCO.mjs} +77 -51
  45. package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-xJPQ_QQG.mjs} +14 -26
  46. package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-BMkdsefq.mjs} +5 -5
  47. package/dist/{doctor-kfMBnUw6.mjs → doctor-Bo7BXLux.mjs} +271 -320
  48. package/dist/{doctor-CB8oZKCk.mjs → doctor-D5_EzwfA.mjs} +186 -91
  49. package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
  50. package/dist/doctor-fingerprint.mjs +19 -0
  51. package/dist/doctor-thjWAV0z.mjs +2 -0
  52. package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-N2wDotwQ.mjs} +40 -21
  53. package/dist/{eas-build-JyfqyHfC.mjs → eas-build-CwknaQYj.mjs} +53 -20
  54. package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-CSgAulr5.mjs} +41 -214
  55. package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-DlY_serQ.mjs} +230 -11
  56. package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-DBWO2rxE.mjs} +172 -82
  57. package/dist/exec-DEoAhcze.mjs +858 -0
  58. package/dist/exec-DnYc4HGH.d.mts +78 -0
  59. package/dist/{gc-qWOMdnER.mjs → gc-CXxN-4SE.mjs} +1091 -1029
  60. package/dist/gc-DnNDQyaP.mjs +3 -0
  61. package/dist/{guide-G9cAbVAc.mjs → guide-Br0LEfKy.mjs} +1165 -297
  62. package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-B-9f-jkd.mjs} +10 -8
  63. package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DZAPrcro.mjs} +34 -19
  64. package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
  65. package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-FIRx9X2f.mjs} +77 -43
  66. package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-_awYSpfv.mjs} +35 -22
  67. package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-BdzE668-.mjs} +49 -27
  68. package/dist/idle-C4cZ757K.d.mts +24 -0
  69. package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DDg3SdvY.mjs} +11 -10
  70. package/dist/ios-CDvlmUs7.d.mts +24 -0
  71. package/dist/{ios-BwVCF7oA.mjs → ios-Ds1clbIt.mjs} +8 -8
  72. package/dist/{ios-device-D7pi2Sca.mjs → ios-device--h_-8ENa.mjs} +51 -26
  73. package/dist/{ios-device-B5veSDDQ.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
  74. package/dist/{ios-RkW4pnQf.mjs → ios-hcBpnEGk.mjs} +200 -93
  75. package/dist/{ios-Ce7bc7br.mjs → ios-pm4nL6By.mjs} +160 -108
  76. package/dist/{ios-project-K9hY_Jab.mjs → ios-project-CZhKODF3.mjs} +13 -13
  77. package/dist/ios-signing-BtAffm0A.mjs +489 -0
  78. package/dist/{ios-state-CBLe1xYw.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
  79. package/dist/{ios-nOLJGVdy.mjs → ios-xtlRHaeB.mjs} +1 -1
  80. package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Bwhh4S7V.mjs} +30 -25
  81. package/dist/{launch-C3qJ6Agb.mjs → launch-BjxemNpK.mjs} +85 -543
  82. package/dist/{launch-F4sOqAhB.mjs → launch-CCzXlc8r.mjs} +91 -90
  83. package/dist/logs-BfwwadsZ.mjs +479 -0
  84. package/dist/logs-jTS_lHSo.mjs +248 -0
  85. package/dist/{macos-D7uDvO-z.mjs → macos-DVlSSyUg.mjs} +1 -1
  86. package/dist/macos-NfV2D7dO.mjs +694 -0
  87. package/dist/macos-run.mjs +1 -1
  88. package/dist/maintenance-run.mjs +123 -248
  89. package/dist/{metro-DnCEjCxs.mjs → metro-DiXtA3Ty.mjs} +107 -30
  90. package/dist/metro-gateway-CKZqKqx7.mjs +209 -0
  91. package/dist/{named-ports-4WopRPg-.mjs → named-ports-DkEzOfzO.mjs} +42 -90
  92. package/dist/native-android-CqgnOgsT.mjs +645 -0
  93. package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
  94. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +211 -0
  95. package/dist/native-inputs-TRTTTRxt.mjs +91 -0
  96. package/dist/native-run-NwUuxbkg.mjs +276 -0
  97. package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-B7KIafpM.mjs} +11 -9
  98. package/dist/native-source-Y0yLhFyQ.mjs +133 -0
  99. package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-D_VOfFL7.mjs} +26 -18
  100. package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-BYDOHWLN.mjs} +104 -60
  101. package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
  102. package/dist/offload-worker.d.mts +59 -41
  103. package/dist/offload-worker.mjs +478 -115
  104. package/dist/operation-exec-BW0em61G.mjs +171 -0
  105. package/dist/{ownership-DCtw_2IA.mjs → ownership-C5fo5Edb.mjs} +3 -3
  106. package/dist/{page-DRHy329N.mjs → page-DBL2PiUU.mjs} +12 -5
  107. package/dist/paths-BsJMoPP2.mjs +12 -0
  108. package/dist/paths-DQtTgsBf.mjs +42 -0
  109. package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BnGgJRRZ.mjs} +5 -5
  110. package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-DIsMtN-d.mjs} +15 -11
  111. package/dist/{ports-DdSUicVo.mjs → ports-Cy1RkmuQ.mjs} +3 -3
  112. package/dist/prebuild-D4JoEAEs.mjs +484 -0
  113. package/dist/{project-_phNIJfs.mjs → project-wM_XFTvE.mjs} +65 -37
  114. package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-W1IuLXDt.mjs} +102 -20
  115. package/dist/pull-request-eODyIqZF.d.mts +124 -0
  116. package/dist/pull-requests.d.mts +2 -120
  117. package/dist/pull-requests.mjs +2 -2
  118. package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-6OZ7MSM7.mjs} +121 -72
  119. package/dist/{gradle-DSrXb6lG.mjs → react-native-build-Dvd8hC21.mjs} +292 -15
  120. package/dist/react-native-doctor-DsoSF1Y9.mjs +234 -0
  121. package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-4u1Rn-GR.mjs} +71 -39
  122. package/dist/{recordings-D0d5aQt0.mjs → recordings-CQmfzAh7.mjs} +12 -9
  123. package/dist/registration-BcRgF6Ox.mjs +51 -0
  124. package/dist/{reload-C8JhxjSh.mjs → reload-BzkYabB-.mjs} +94 -47
  125. package/dist/reload-D7AVlb8N.mjs +2 -0
  126. package/dist/{remote-BiR6aYjy.mjs → remote-DjGDmlTZ.mjs} +26 -18
  127. package/dist/result-D2Ykz_iD.mjs +435 -0
  128. package/dist/{run-BtPgpKks.mjs → run-DidHghD1.mjs} +5 -5
  129. package/dist/selection-DSMbWEX2.mjs +620 -0
  130. package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CafzuyFB.mjs} +3 -4
  131. package/dist/{server-command-CTtCkmcQ.mjs → server-command-C6QjeupS.mjs} +14 -7
  132. package/dist/{server-expo-DsguMGUF.mjs → server-expo-CrjB29pq.mjs} +54 -11
  133. package/dist/server-expo-D58c9L0M.mjs +2 -0
  134. package/dist/{settings-B717odTD.mjs → settings-C7O8A6ZI.mjs} +309 -119
  135. package/dist/settings-DpR-1Wnn.mjs +114 -0
  136. package/dist/settings-write-CzD60rOD.mjs +360 -0
  137. package/dist/settings.schema.json +176 -16
  138. package/dist/{simslim-CCr3rE-A.mjs → simslim-BNckWpXi.mjs} +14 -12
  139. package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-CbfmNgM6.mjs} +15 -20
  140. package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
  141. package/dist/stage-Bps5oius.mjs +200 -0
  142. package/dist/{start-TXeMmmO2.mjs → start-Br-oxqMD.mjs} +1 -1
  143. package/dist/start-EojN4WFz.mjs +1364 -0
  144. package/dist/{state-D1Icyjlu.mjs → state--smjFSTL.mjs} +55 -13
  145. package/dist/{state-CG_OFoaA.mjs → state-08I3hw3_.mjs} +3 -2
  146. package/dist/{stats-BoY5sEPU.mjs → stats-D3GerlFW.mjs} +7 -13
  147. package/dist/stats-report-BzaPrRm6.mjs +16 -0
  148. package/dist/{status-BTA7kKiQ.mjs → status-BRROykC8.mjs} +7 -5
  149. package/dist/status-EvrK72L2.mjs +2 -0
  150. package/dist/{status-WgFbkRzj.mjs → status-WBDajew2.mjs} +554 -452
  151. package/dist/{status-watch-C23ILtf9.mjs → status-watch-Bg_u-pwR.mjs} +222 -25
  152. package/dist/status-worker.d.mts +1 -0
  153. package/dist/status-worker.mjs +19 -0
  154. package/dist/stim-desktop-D5OGpYZM.mjs +112 -0
  155. package/dist/{stop-DR6VoDIk.mjs → stop-DTZ9uTw3.mjs} +2 -2
  156. package/dist/{stop-DPEhunlw.mjs → stop-Dky10AEJ.mjs} +33 -23
  157. package/dist/{stop-BNmBMi1F.mjs → stop-Mv6W9FAk.mjs} +137 -98
  158. package/dist/supervisor-run.d.mts +8 -17
  159. package/dist/supervisor-run.mjs +56 -28
  160. package/dist/{support-CwjbFs9H.mjs → support-CNioewsd.mjs} +14 -14
  161. package/dist/{support-DMTqj3Hm.mjs → support-yUiOjnVY.mjs} +20 -13
  162. package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
  163. package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
  164. package/dist/toolchain-BY8X8HXx.mjs +2 -0
  165. package/dist/toolchain-DpJMHq0n.mjs +876 -0
  166. package/dist/{trigger-CigAYjeL.mjs → trigger-Cbyc41d_.mjs} +21 -6
  167. package/dist/trigger-yb_nFzPF.mjs +2 -0
  168. package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-CA3TgT3-.mjs} +263 -156
  169. package/dist/web-CZ07gd77.mjs +2 -0
  170. package/dist/{web-BDBMxDpx.mjs → web-DKx6yoFA.mjs} +20 -14
  171. package/dist/web-run.mjs +13 -12
  172. package/dist/windows-report.d.mts +1 -0
  173. package/dist/windows-report.mjs +18 -0
  174. package/dist/windows-report.ps1 +43 -0
  175. package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-U08dEzhG.mjs} +62 -58
  176. package/dist/{workspaces-C36s2jb9.mjs → workspaces-CpANmBlq.mjs} +1723 -1286
  177. package/dist/{worktree-CgvJYJ-Q.mjs → worktree-CHecZ4Oq.mjs} +1097 -547
  178. package/dist/worktree-ZqZVjD9K.mjs +2 -0
  179. package/dist/xcode-BXn9-xYx.mjs +896 -0
  180. package/package.json +7 -5
  181. package/shim/android-audio/Main.java +24 -0
  182. package/shim/android-audio/README.md +17 -0
  183. package/shim/android-audio.jar +0 -0
  184. package/shim/android-optimizations.gradle +7 -5
  185. package/dist/activity-BSV745Kz.mjs +0 -629
  186. package/dist/api-qvOzWyfO.mjs +0 -154
  187. package/dist/api-run.mjs +0 -294
  188. package/dist/app-install-BIKtMfPq.mjs +0 -896
  189. package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
  190. package/dist/budget-f7516Zk0.mjs +0 -4106
  191. package/dist/build-facts-DcLv2HSd.d.mts +0 -111
  192. package/dist/cancellation-C_22VQTH.mjs +0 -24
  193. package/dist/client-qQAaXSUs.mjs +0 -1771
  194. package/dist/config-BYDxlMY3.mjs +0 -562
  195. package/dist/device-DuiPJQSn.mjs +0 -290
  196. package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
  197. package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
  198. package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
  199. package/dist/exec-DqKo9GKJ.mjs +0 -268
  200. package/dist/git-DDfFzkMm.mjs +0 -45
  201. package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
  202. package/dist/logs-BGrEUaEs.mjs +0 -383
  203. package/dist/macos-Ch5VJmcS.mjs +0 -584
  204. package/dist/metro-gateway-CX9Xlkq2.mjs +0 -103
  205. package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
  206. package/dist/native-android-D5qc3-_v.mjs +0 -226
  207. package/dist/native-gradle-inputs-BsLRrl7u.mjs +0 -349
  208. package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
  209. package/dist/plan-C4TjdPsR.mjs +0 -260
  210. package/dist/prebuild-DYbucPXy.mjs +0 -212
  211. package/dist/preview-78a9kR_-.mjs +0 -1011
  212. package/dist/react-native-build-CtCccJtb.mjs +0 -239
  213. package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
  214. package/dist/remote-cache-OyOyVIS3.mjs +0 -526
  215. package/dist/result-CaJg5Iat.mjs +0 -186
  216. package/dist/server-expo-Bigriskl.mjs +0 -2
  217. package/dist/settings-BORNaaCO.mjs +0 -402
  218. package/dist/settings-vk3mJGSm.d.mts +0 -13
  219. package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
  220. package/dist/stage-KNTQopqv.mjs +0 -157
  221. package/dist/start-BWqzODpb.mjs +0 -1116
  222. package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
  223. package/dist/swiftpm-macos-DRNVJWlb.mjs +0 -119
  224. package/dist/tailnet-Dh-qiYzG.mjs +0 -265
  225. package/dist/toolchain-BFkAcstd.mjs +0 -2
  226. package/dist/toolchain-DxSsNssu.mjs +0 -1657
  227. package/dist/trigger-9_USgmxz.mjs +0 -2
  228. package/dist/web-Dq-i3wzJ.mjs +0 -2
  229. package/dist/worktree-DpLdCHga.mjs +0 -2
  230. package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
  231. package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
@@ -1,6 +1,6 @@
1
- import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-BTy8hZ0F.mjs";
2
- import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-DMTqj3Hm.mjs";
3
- import { r as lastBuildRecord, t as androidFacts } from "./result-CaJg5Iat.mjs";
4
- import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-DCKZrNvV.mjs";
5
- import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-F4sOqAhB.mjs";
1
+ import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-gwpm28fu.mjs";
2
+ import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-yUiOjnVY.mjs";
3
+ import { r as lastBuildRecord, t as androidFacts } from "./result-D2Ykz_iD.mjs";
4
+ import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-ByRMUoiJ.mjs";
5
+ import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-CCzXlc8r.mjs";
6
6
  export { NO_DEVICE, NO_FINGERPRINT, androidDevClientScheme, androidFacts, androidSystemImageSetting, androidVariantSetting, apkDevClientFacts, apkPackage, collectorLogFile, androidCommand as default, displayPath, dumpApkManifest, findAapt, formatDuration, isReleaseVariant, killPreviousCollector, lastBuildRecord, noDeviceDiagnostic, parseXmltree, phaseLine, registerAndroid, resolveSystemImage, resolveVariant, runAndroid, runAndroidOperation, shortHash, startCollector };
@@ -1,5 +1,5 @@
1
- import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
2
- import { u as androidToolCwd } from "./android-Mz_Inn3w.mjs";
1
+ import { t as getExecutor } from "./exec-DEoAhcze.mjs";
2
+ import { u as androidToolCwd } from "./android-C7sVmyI9.mjs";
3
3
  //#region src/collector/android.ts
4
4
  const LEVEL_BY_LETTER = {
5
5
  V: "debug",
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
2
+ import { t as getExecutor } from "./exec-DEoAhcze.mjs";
3
+ import { createHash, randomUUID } from "node:crypto";
3
4
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
4
5
  import { join } from "node:path";
5
- import { createHash, randomUUID } from "node:crypto";
6
6
  import { once } from "node:events";
7
7
  //#region bin/android-cas-compiler.ts
8
8
  const context = process.env.STIM_ANDROID_CAS_CONTEXT;
@@ -1,13 +1,13 @@
1
- import { d as getConfigDir } from "./config-BYDxlMY3.mjs";
2
- import { r as register } from "./cache-manifest-XH-fvDUj.mjs";
3
- import { m as defaultAndroidLayout } from "./settings-B717odTD.mjs";
4
- import { D as withDirLock$1, p as ensureWorkspaceStorage } from "./workspace-state-DJt_MMvf.mjs";
1
+ import { n as ensureWorkspaceStorage, v as withDirLock$1 } from "./paths-DQtTgsBf.mjs";
2
+ import { d as getConfigDir } from "./config-DlrsduwG.mjs";
3
+ import { m as defaultAndroidLayout } from "./settings-C7O8A6ZI.mjs";
4
+ import { r as register } from "./cache-manifest-DSeQjt-Q.mjs";
5
+ import { createHash, randomUUID } from "node:crypto";
5
6
  import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
6
7
  import { join } from "node:path";
8
+ import { quotedPath } from "@stim-cli/core";
7
9
  import { isJsonObject, readJsonFile } from "@stim-cli/core/state";
8
10
  import { fileURLToPath, pathToFileURL } from "node:url";
9
- import { quotedPath } from "@stim-cli/core";
10
- import { createHash, randomUUID } from "node:crypto";
11
11
  //#region src/engine/android-cas.ts
12
12
  const CAS_TOOLCHAIN_FIELDS = [
13
13
  "clang",
@@ -144,6 +144,7 @@ function resolveAndroidCas(root, env = process.env, layout = defaultAndroidLayou
144
144
  });
145
145
  register({
146
146
  dir,
147
+ registeredBy: root,
147
148
  name: "android-cas",
148
149
  prune: "atomic",
149
150
  note: "Experimental Android compiler CAS"
@@ -0,0 +1,12 @@
1
+ //#region src/integrations/android-project.ts
2
+ var AndroidRecipeRefusal = class extends Error {
3
+ failure;
4
+ missReason;
5
+ constructor(failure, missReason) {
6
+ super(failure.message ?? failure.code);
7
+ this.failure = failure;
8
+ this.missReason = missReason;
9
+ }
10
+ };
11
+ //#endregion
12
+ export { AndroidRecipeRefusal as t };
@@ -0,0 +1,391 @@
1
+ import { n as SettingsObject, t as AndroidLayout } from "./ios-CDvlmUs7.mjs";
2
+ import { r as createNdjsonWriter } from "./exec-DnYc4HGH.mjs";
3
+ import { readFileSync, writeFileSync } from "node:fs";
4
+ import { StimContext, hostSimulatorArch } from "@stim-cli/core";
5
+ import { ANDROID_EMULATOR_APPS, BuildPhase, BuildPlanPayload, Endpoint, RunEstimates, SettingScope, WebViewport, machineCapacity } from "@stim-cli/core/state";
6
+ import "@stim-cli/core/noise-session";
7
+ import { readFileSync as readFileSync$1 } from "fs";
8
+ import { Command } from "commander";
9
+ import "@expo/fingerprint";
10
+ import { CacheProviderConfig, loadCacheProvider } from "@stim-cli/cache";
11
+ import { BuildReactNativeArtifactQuery, BuildSwiftpmArtifactQuery, GradleOffloadInputs, HelloResult } from "@stim-cli/core/protocol";
12
+ import { ChildProcess } from "node:child_process";
13
+ //#region src/engine/build-facts.d.ts
14
+ type CacheHitLevel = "local" | "remote" | false;
15
+ type LaunchStatus = boolean | "unverified" | "bundling";
16
+ interface LogsInfo {
17
+ dir?: string;
18
+ }
19
+ interface CompilationCacheActivity {
20
+ status: "reported" | "unavailable" | "not-run";
21
+ hits: number | null;
22
+ cacheableTasks: number | null;
23
+ hitRatePercent: number | null;
24
+ swiftTargetsWithoutExplicitModules?: number;
25
+ }
26
+ interface CcacheActivity {
27
+ status: "reported" | "unavailable" | "not-run";
28
+ hits: number | null;
29
+ misses: number | null;
30
+ hitRatePercent: number | null;
31
+ }
32
+ interface DevServerStart {
33
+ started: true;
34
+ reason: "not running" | "stopped (idle)";
35
+ }
36
+ interface RunLeaseFacts {
37
+ kind: string;
38
+ expiresAt: string;
39
+ }
40
+ interface IosFacts {
41
+ devicePlacement?: import("@stim-cli/core/state").DevicePlacement;
42
+ host?: import("@stim-cli/core/state").HostedIosStatus;
43
+ slot?: string;
44
+ platform: string;
45
+ udid: string;
46
+ deviceName: string | null;
47
+ deviceType: string | null;
48
+ runtime: string | null;
49
+ fingerprint?: string | null;
50
+ configuration: string | null;
51
+ scheme?: string;
52
+ cacheKey?: string | null;
53
+ cacheHit: CacheHitLevel;
54
+ cacheSkipped: boolean;
55
+ buildMachine?: string;
56
+ builtOn?: string;
57
+ /** The remote machine that compiled the app when the build was offloaded; absent otherwise. */
58
+ offloadedTo?: string;
59
+ /** Why the app was built here after the run considered offloading it; absent otherwise. */
60
+ offloadFallback?: string;
61
+ compilationCache: CompilationCacheActivity;
62
+ waitedForBuild: {
63
+ pid: number | null;
64
+ ms: number;
65
+ } | null;
66
+ appPath?: string | null;
67
+ bundleId?: string | null;
68
+ installSkipped: boolean;
69
+ launched: LaunchStatus;
70
+ metroPort?: number | null;
71
+ logs: LogsInfo;
72
+ agentDevice?: {
73
+ stateDir: string;
74
+ };
75
+ durationMs?: number;
76
+ webPreviewUrl?: string | null;
77
+ lease?: RunLeaseFacts | null;
78
+ devServer?: DevServerStart;
79
+ }
80
+ interface AndroidFacts {
81
+ devicePlacement?: import("@stim-cli/core/state").DevicePlacement;
82
+ host?: import("@stim-cli/core/state").HostedAndroidStatus;
83
+ slot?: string;
84
+ platform: string;
85
+ serial: string | null;
86
+ avdName: string | null;
87
+ deviceName: string | null;
88
+ systemImage: string | null;
89
+ deviceProfile: string | null;
90
+ fingerprint: string | null;
91
+ cacheKey: string | null;
92
+ variant: string | null;
93
+ metroPort: number | null;
94
+ cacheHit: CacheHitLevel;
95
+ cacheSkipped: boolean;
96
+ buildMachine?: string;
97
+ builtOn?: string;
98
+ /** The remote machine that compiled the APK when the build was offloaded; absent otherwise. */
99
+ offloadedTo?: string;
100
+ /** Why the APK was built here after the run considered offloading it; absent otherwise. */
101
+ offloadFallback?: string;
102
+ waitedForBuild: {
103
+ pid: number | null;
104
+ ms: number;
105
+ } | null;
106
+ appPath: string | null;
107
+ bundleId: string | null;
108
+ installSkipped: boolean;
109
+ launched: LaunchStatus;
110
+ ccache: CcacheActivity;
111
+ debugHttpHost: string | null;
112
+ debugHttpHostNote: string | null;
113
+ devClientUrl: string | null;
114
+ logs: string | null;
115
+ agentDevice?: {
116
+ stateDir: string;
117
+ };
118
+ durationMs: number | null;
119
+ lease?: RunLeaseFacts | null;
120
+ devServer?: DevServerStart;
121
+ }
122
+ //#endregion
123
+ //#region src/optimizations.d.ts
124
+ interface Optimizations {
125
+ buildCache: boolean;
126
+ remoteBuildCache: boolean;
127
+ releaseBundleSwap: boolean;
128
+ metroSharedCache: boolean;
129
+ metroWarmup: boolean;
130
+ ios: {
131
+ compilationCache: boolean;
132
+ swiftCompilationCache: boolean | null;
133
+ prefixMapping: boolean;
134
+ };
135
+ android: {
136
+ compilerCache: "ccache" | "cas" | "none";
137
+ casToolchain: string | null;
138
+ compilerCacheFallback: CompilerCacheFallback | null;
139
+ pch: "auto" | "on" | "off";
140
+ gradleBuildCache: boolean;
141
+ targetAbiOnly: boolean;
142
+ };
143
+ }
144
+ interface CompilerCacheFallback {
145
+ key: string;
146
+ reason: string;
147
+ fromEnvironment: boolean;
148
+ manifest: string | null;
149
+ }
150
+ declare function artifactCachePolicy(options: Optimizations, reuse: boolean, release: boolean): {
151
+ read: boolean;
152
+ write: boolean;
153
+ remote: boolean;
154
+ };
155
+ //#endregion
156
+ //#region src/engine/android-cas.d.ts
157
+ interface AndroidCasSetup {
158
+ id: string;
159
+ dir: string;
160
+ initScript: string;
161
+ env: Record<string, string>;
162
+ }
163
+ declare function resolveAndroidCas(root: string, env?: NodeJS.ProcessEnv, layout?: AndroidLayout): AndroidCasSetup | null;
164
+ //#endregion
165
+ //#region src/commands/android/types.d.ts
166
+ type AndroidWriter = ReturnType<typeof createNdjsonWriter>;
167
+ //#endregion
168
+ //#region src/diagnostics/doctor.d.ts
169
+ interface Finding {
170
+ code?: string;
171
+ level: "cost" | "note";
172
+ title: string;
173
+ detail: string;
174
+ fix: string | null;
175
+ }
176
+ type DoctorPlatform = "ios" | "android";
177
+ //#endregion
178
+ //#region src/budget.d.ts
179
+ type ReclaimStepName = "idle-devices" | "idle-dev-servers" | "workspace-outputs" | "stale-cache-entries";
180
+ interface ReclaimedStep {
181
+ step: ReclaimStepName;
182
+ targets: string[];
183
+ failures: number;
184
+ freedMb?: number;
185
+ }
186
+ interface BudgetReport {
187
+ budget: {
188
+ minFreeDiskGb: number;
189
+ hardFloorDiskGb: number;
190
+ maxCommittedMemoryGb: number;
191
+ maxLiveWorkspaces: number;
192
+ };
193
+ volumes: {
194
+ volume: string;
195
+ freeGb: number;
196
+ }[];
197
+ memory: {
198
+ committedGb: number;
199
+ liveWorkspaces: number;
200
+ } | null;
201
+ plan: ReclaimedStep[];
202
+ }
203
+ //#endregion
204
+ //#region src/commands/android/plan.d.ts
205
+ interface AndroidBuildPlan {
206
+ readonly build: {
207
+ readonly variant: string | null;
208
+ readonly release: boolean;
209
+ readonly profile: string | undefined;
210
+ readonly cas: ReturnType<typeof resolveAndroidCas>;
211
+ readonly cache: Readonly<ReturnType<typeof artifactCachePolicy>>;
212
+ readonly compilerCache: Optimizations["android"]["compilerCache"];
213
+ readonly gradleBuildCache: boolean;
214
+ readonly pch: Optimizations["android"]["pch"];
215
+ readonly targetAbiOnly: boolean;
216
+ };
217
+ readonly metroWarmup: boolean;
218
+ readonly cacheProviderConfig: CacheProviderConfig | null;
219
+ }
220
+ //#endregion
221
+ //#region src/offload/toolchain.d.ts
222
+ /** What must be identical on this Mac and a remote Mac for an iOS simulator build to come out the same. */
223
+ interface IosToolchain {
224
+ /** A digest of Stim's built code, so both sides prove they run the same Stim. */
225
+ stimBuild: string | null;
226
+ arch: string;
227
+ xcode: string | null;
228
+ simulatorSdk: string | null;
229
+ cocoapods: string | null;
230
+ }
231
+ /** A remote machine's toolchain, the simulator runtimes it can build for, and its JDK and Android SDK packages. */
232
+ interface WorkerToolchain extends IosToolchain {
233
+ /** The OS stim-server runs on, as Node names it; absent from a stim-server older than this field. */
234
+ os?: string;
235
+ macosSdk: string | null;
236
+ bundler: string | null;
237
+ runtimes: string[];
238
+ jdk: string | null;
239
+ androidSdk: {
240
+ ndk: string[];
241
+ buildTools: string[];
242
+ platforms: string[];
243
+ } | null;
244
+ }
245
+ /** One reason a remote machine cannot take this build now, with a stable `code` for doctor's JSON. */
246
+ interface OffloadProblem {
247
+ code: "unreachable" | "checkout" | "stim-build" | "arch" | "xcode" | "macos-sdk" | "simulator-sdk" | "cocoapods" | "bundler" | "runtime" | "jdk" | "android-sdk" | "ndk" | "build-tools" | "compile-sdk" | "disk" | "busy" | "platform";
248
+ reason: string;
249
+ }
250
+ //#endregion
251
+ //#region src/offload/tailnet.d.ts
252
+ type Access = "build" | "device-host";
253
+ /**
254
+ * How this machine proves itself to a remote stim-server: as a returning client that pins `serverKey`, or on first
255
+ * contact with the setup ticket the worker's `stim-server setup` approved. Both use this machine's client key.
256
+ */
257
+ type MachineAuth = {
258
+ access: Access;
259
+ serverKey: string;
260
+ } | {
261
+ access: Access;
262
+ ticket: string;
263
+ name: string;
264
+ /** Runs once the ticket's handshake authenticated the server key, before `hello`, so a lost reply can recover. */
265
+ onServerKey?: (serverKey: string) => void | Promise<void>;
266
+ };
267
+ type HelloReply = {
268
+ result: {
269
+ host?: {
270
+ name: string;
271
+ screenRecording: boolean;
272
+ accessibility: boolean;
273
+ } | null;
274
+ capabilities: string[];
275
+ features?: string[];
276
+ device: {
277
+ id: string;
278
+ name: string;
279
+ };
280
+ };
281
+ /** The server key the handshake authenticated. */
282
+ serverKey: string;
283
+ } | {
284
+ error: {
285
+ code: string;
286
+ message: string;
287
+ };
288
+ } | {
289
+ failed: string;
290
+ };
291
+ interface TailnetMachineIo {
292
+ /** `tailscale status --json`, or null when Tailscale is not running. */
293
+ status: () => unknown;
294
+ hello: (endpoint: Endpoint, auth: MachineAuth) => Promise<HelloReply>;
295
+ }
296
+ type GeneratedTickets = Map<string, {
297
+ ticket: string;
298
+ expiresAt: string;
299
+ }>;
300
+ //#endregion
301
+ //#region src/offload/build-machines.d.ts
302
+ /**
303
+ * Where this machine stands with one `remote.machines` entry, as `stim doctor --json` reports it under
304
+ * `remoteMachines`. `dnsName` is the peer's MagicDNS name when the name resolved; `deviceId` is the id the worker
305
+ * lists this machine under once it asked.
306
+ */
307
+ interface BuildMachineReport {
308
+ machine: string;
309
+ state: "invalid" | "tailscale-off" | "not-on-tailnet" | "key-changed" | "not-asked" | "pending" | "approved" | "revoked" | "lapsed" | "outdated" | "unreachable";
310
+ dnsName?: string;
311
+ deviceId?: string;
312
+ requestedAt?: string;
313
+ expiresAt?: string;
314
+ host?: NonNullable<HelloResult["host"]>;
315
+ /** For an approved machine: whether it would take this project's build now, and every reason it would not. */
316
+ offloadable?: boolean;
317
+ reasons?: string[];
318
+ /** The same reasons with the code of each, in the same order. */
319
+ problems?: OffloadProblem[];
320
+ /** The machine's reported capacity, when it answered an offer. */
321
+ capacity?: Record<string, unknown>;
322
+ }
323
+ interface BuildMachinesInspection {
324
+ findings: Finding[];
325
+ machines: BuildMachineReport[];
326
+ }
327
+ //#endregion
328
+ //#region src/offload/client.d.ts
329
+ /** The Gradle choices that shape the APK, so the machine builds what this machine's cache key describes. */
330
+ interface AndroidBuildOptions {
331
+ variant: string | null;
332
+ abi: string | null;
333
+ gradleBuildCache: boolean;
334
+ pch: "auto" | "on" | "off";
335
+ compilerCache: "ccache" | "none";
336
+ gradleRoot?: string | null;
337
+ module?: string | null;
338
+ }
339
+ //#endregion
340
+ //#region src/integrations/swiftpm-artifact-inputs.d.ts
341
+ interface SwiftpmArtifactToolchain {
342
+ swift: string;
343
+ sdk: string;
344
+ arch: string;
345
+ xcode: string;
346
+ }
347
+ //#endregion
348
+ //#region src/web/launch.d.ts
349
+ type WebLaunched = true | "bundling" | "unverified";
350
+ //#endregion
351
+ //#region src/integrations/native-gradle-artifact-inputs.d.ts
352
+ interface GradleArtifactInputs extends GradleOffloadInputs {
353
+ localFiles: string[];
354
+ environment: string[];
355
+ }
356
+ type GradleArtifactBuild = Pick<AndroidArtifactContext["buildPlan"], "variant" | "compilerCache" | "gradleBuildCache" | "pch" | "cas">;
357
+ interface NativeGradleArtifactReceipt {
358
+ source: string;
359
+ declaration: GradleArtifactInputs;
360
+ build: GradleArtifactBuild;
361
+ abi: string | null;
362
+ }
363
+ //#endregion
364
+ //#region src/integrations/android-project.d.ts
365
+ interface AndroidBuildTarget {
366
+ abi: string | null;
367
+ }
368
+ interface AndroidArtifactIdentity {
369
+ hash: string;
370
+ key: string;
371
+ }
372
+ interface AndroidArtifactContext {
373
+ operation?: StimContext;
374
+ artifactScope?: {
375
+ key: string;
376
+ validate(): Promise<void>;
377
+ record?(identity: AndroidArtifactIdentity, receipt: NativeGradleArtifactReceipt): void;
378
+ };
379
+ root: string;
380
+ buildLog: string;
381
+ writer: AndroidWriter;
382
+ settings: SettingsObject;
383
+ buildPlan: AndroidBuildPlan["build"];
384
+ target: AndroidBuildTarget;
385
+ phase: (label: unknown, text: string) => void;
386
+ out: (line: string) => void;
387
+ step: (phase: BuildPhase) => void;
388
+ estimates: () => RunEstimates;
389
+ }
390
+ //#endregion
391
+ export { IosFacts as _, BuildMachinesInspection as a, IosToolchain as c, DoctorPlatform as d, Finding as f, CompilationCacheActivity as g, CcacheActivity as h, AndroidBuildOptions as i, WorkerToolchain as l, AndroidFacts as m, WebLaunched as n, GeneratedTickets as o, Optimizations as p, SwiftpmArtifactToolchain as r, TailnetMachineIo as s, NativeGradleArtifactReceipt as t, BudgetReport as u };