stim 1.20.1 → 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 +94 -11
  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-VPaOgGaF.mjs → agent-device-usage-output-zh1vhbLp.mjs} +21 -66
  6. package/dist/{android-CZh6ElG5.mjs → android-BEJ8Jpl7.mjs} +3 -3
  7. package/dist/{android-CLbBJ2ve.mjs → android-BLgbNqox.mjs} +128 -79
  8. package/dist/{android-eXfIjKJr.mjs → android-CV_GCELZ.mjs} +5 -5
  9. package/dist/{android-DE8-JfGW.mjs → android-DUYkNF4u.mjs} +188 -106
  10. package/dist/{android-cas-BFpS84v2.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-Ctb2jpw6.mjs → artifact-B8T3S5gi.mjs} +223 -201
  16. package/dist/{artifact-DXk_Fle_.mjs → artifact-DAuZ-FNU.mjs} +158 -148
  17. package/dist/{browser-web-xQWC2RWl.mjs → browser-web-QQzVjz3O.mjs} +28 -26
  18. package/dist/budget-Bs6SxxzO.mjs +9154 -0
  19. package/dist/{build-COBA1tBc.mjs → build-CoPzQRNw.mjs} +144 -101
  20. package/dist/build-cache-DmyR9Zzc.mjs +602 -0
  21. package/dist/build-plan-CaFskB7_.mjs +188 -0
  22. package/dist/{cache-manifest-qA3dT2x2.mjs → cache-manifest-DkkqguoK.mjs} +10 -5
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-CtbqWxIC.mjs → ccache-BJRZ9pG3.mjs} +10 -9
  25. package/dist/{cdp-Dq_ypAlJ.mjs → cdp-CWmIUMbw.mjs} +18 -5
  26. package/dist/{chrome-Dp2lMLBe.mjs → chrome-B6tfCta1.mjs} +7 -4
  27. package/dist/{cli-sGqlPu1n.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 -39
  32. package/dist/collector-run.mjs +9 -9
  33. package/dist/{command-output-CPDq_90S.mjs → command-output-B1UrjZHL.mjs} +1 -1
  34. package/dist/config-CYcBF478.mjs +949 -0
  35. package/dist/{created-devices-CXBMtoj5.mjs → created-devices-CqeBlrEn.mjs} +3 -3
  36. package/dist/{dependency-state-B2m8eqsS.mjs → dependency-state-BbKQW83h.mjs} +20 -5
  37. package/dist/{detached-entry-BXq4fIl-.mjs → detached-entry-DFRyG1_o.mjs} +1 -1
  38. package/dist/{dev-client-BqYjMIaC.mjs → dev-client-UOeESKm6.mjs} +2 -2
  39. package/dist/device-DCxH7_By.mjs +1068 -0
  40. package/dist/{device-D4DqjSZZ.mjs → device-ExJq8Ei7.mjs} +35 -36
  41. package/dist/{device-capacity-DrwHwR97.mjs → device-capacity-CMlqEcvw.mjs} +43 -14
  42. package/dist/device-host-worker.mjs +65 -62
  43. package/dist/{device-ios-DE8KJd3b.mjs → device-ios-DRUeKaFV.mjs} +49 -49
  44. package/dist/{device-lease-run-Baelt3nc.mjs → device-lease-run-C8raGFoP.mjs} +14 -26
  45. package/dist/{device-pool-DtK9S6AD.mjs → device-pool-DMRpVX9a.mjs} +5 -5
  46. package/dist/doctor-BLHCYxzi.mjs +2 -0
  47. package/dist/{doctor-Dunu3Nv1.mjs → doctor-DTvaDOda.mjs} +317 -344
  48. package/dist/{doctor-DiP9HsIP.mjs → doctor-Dhqebm0q.mjs} +183 -91
  49. package/dist/doctor-fingerprint.mjs +19 -0
  50. package/dist/{doctor-watchman-XJzT8tK-.mjs → doctor-watchman-Cv1F10Kj.mjs} +40 -23
  51. package/dist/{eas-build-0gadvrca.mjs → eas-build-BomfRnFT.mjs} +53 -20
  52. package/dist/{build-plan-CRjAA6Qi.mjs → eas-fallback-DJwZpy0c.mjs} +26 -208
  53. package/dist/{watchman-CqmaGcIb.mjs → eas-session-ledger-op6A54yi.mjs} +229 -11
  54. package/dist/{error-diagnostics-BhQtoLrZ.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-D5cz5G0k.mjs → gc-_-dCXdyL.mjs} +625 -786
  59. package/dist/git-C3iTsJaZ.mjs +73 -0
  60. package/dist/{guide-DakjcoUt.mjs → guide-Yqwt2bd6.mjs} +990 -280
  61. package/dist/{hosted-android-C-D8Dj0_.mjs → hosted-android-Bw-honsd.mjs} +8 -6
  62. package/dist/{hosted-client--hNFgixu.mjs → hosted-client-DB_gBPfY.mjs} +47 -24
  63. package/dist/{hosted-ios-Chx9XQyI.mjs → hosted-ios-CUvOf4Vr.mjs} +1 -1
  64. package/dist/{hosted-logs-Bkz0Hxzh.mjs → hosted-logs-DL_P5AdN.mjs} +77 -43
  65. package/dist/{hosted-macos-ckTjN-0V.mjs → hosted-macos-QI141yKk.mjs} +21 -15
  66. package/dist/{hosted-native-3KXZ5-qn.mjs → hosted-native-Ksyjgzq-.mjs} +31 -20
  67. package/dist/idle-BVeRGroT.d.mts +24 -0
  68. package/dist/{idle-shutdown-DhAUyf5s.mjs → idle-shutdown-DaKmZi0z.mjs} +11 -10
  69. package/dist/{ios-BDBN-xpf.mjs → ios-CQ68hG9s.mjs} +8 -8
  70. package/dist/{ios-o896T9PE.mjs → ios-CpByZy12.mjs} +141 -81
  71. package/dist/{ios-device-B1B14xND.mjs → ios-device-CXGP1bsD.mjs} +1 -1
  72. package/dist/{ios-device-BWHKGaJq.mjs → ios-device-CwFMehUS.mjs} +60 -35
  73. package/dist/{ios-project-BeOXKPt2.mjs → ios-project-WuwwBdvW.mjs} +13 -13
  74. package/dist/{ios-VGvNdsv2.mjs → ios-qNJt4dFm.mjs} +1 -1
  75. package/dist/ios-signing-DTTIChGs.mjs +489 -0
  76. package/dist/{ios-state-BsXMwo5y.mjs → ios-state-DvFX-K_l.mjs} +1 -1
  77. package/dist/{ios-CQ8bHQXB.mjs → ios-ubFsBzwq.mjs} +129 -86
  78. package/dist/{js-swap-Z_mSuRrx.mjs → js-swap-Cc1dttps.mjs} +60 -33
  79. package/dist/{launch-V1zqiOYn.mjs → launch-CD1yVc7U.mjs} +92 -91
  80. package/dist/{launch-BootbMk4.mjs → launch-Zq2mOSDy.mjs} +87 -545
  81. package/dist/logs-BS00Anxf.mjs +352 -0
  82. package/dist/logs-CMm05HxN.mjs +255 -0
  83. package/dist/macos-B65--pPd.mjs +2 -0
  84. package/dist/{macos-D7irBW3A.mjs → macos-C-0qJ6zq.mjs} +244 -215
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +122 -247
  87. package/dist/{metro-_ZIE3Axg.mjs → metro-DEXpIhHC.mjs} +71 -17
  88. package/dist/{metro-gateway-BzlQZQmU.mjs → metro-gateway-BMJNlj3E.mjs} +20 -12
  89. package/dist/{named-ports-O1TIl7tx.mjs → named-ports-BWTzt6mu.mjs} +8 -64
  90. package/dist/native-android-JACyjTZs.mjs +844 -0
  91. package/dist/{native-gradle-inputs-BQnIdAlL.mjs → native-gradle-inputs-Bep9JcSF.mjs} +128 -147
  92. package/dist/native-inputs-TRTTTRxt.mjs +91 -0
  93. package/dist/native-run-DY_RLx3C.mjs +277 -0
  94. package/dist/{native-runtime-D024BAvm.mjs → native-runtime-Dg1Q7tfF.mjs} +10 -10
  95. package/dist/{native-xcode-inputs-UElfGs59.mjs → native-xcode-inputs-CB2iQeWq.mjs} +28 -20
  96. package/dist/{native-xcode-ios-CjS-nDVY.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 +213 -86
  100. package/dist/{ownership-BrjepDiv.mjs → ownership-DEmM5vhh.mjs} +3 -3
  101. package/dist/{page-Bv9s2KwY.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-BItXET1x.mjs → placement-log-BqGbTa61.mjs} +5 -5
  105. package/dist/{plan-placement-B466UYMU.mjs → plan-placement-Bwj-IjY1.mjs} +6 -6
  106. package/dist/{ports-BFRL6JTj.mjs → ports-D-MmCTdv.mjs} +3 -3
  107. package/dist/prebuild-uD_ipCxF.mjs +449 -0
  108. package/dist/{project-DX8fXyw_.mjs → project-BZNjmW_8.mjs} +65 -38
  109. package/dist/{pull-request-vOhLNmIb.mjs → pull-request-Lfetn8Kr.mjs} +5 -18
  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-CuXM3QS8.mjs → react-native-android-DuzH0cn3.mjs} +83 -53
  114. package/dist/{gradle-CZZo1TSA.mjs → react-native-build-rhk4smwQ.mjs} +292 -15
  115. package/dist/react-native-doctor-CQpuIMso.mjs +234 -0
  116. package/dist/{react-native-ios-DtVO4qf2.mjs → react-native-ios-Bhq1rJeV.mjs} +46 -28
  117. package/dist/{recordings-Bk-VivUV.mjs → recordings-DYteQSu4.mjs} +12 -9
  118. package/dist/{reload-D9V7D8gP.mjs → reload-CmTRFJaX.mjs} +95 -49
  119. package/dist/reload-DzjSl5P_.mjs +2 -0
  120. package/dist/{remote-CZiTijxG.mjs → remote-ByYkXdGD.mjs} +15 -10
  121. package/dist/result-DNiS-tTP.mjs +434 -0
  122. package/dist/{run-ClC8UVB5.mjs → run-D23HmJMs.mjs} +4 -5
  123. package/dist/selection-CSl9i5qU.mjs +619 -0
  124. package/dist/{server-bare-dWjAarki.mjs → server-bare-CxTrvDg8.mjs} +3 -4
  125. package/dist/{server-command-DnJYLnr4.mjs → server-command-CtzloH3v.mjs} +14 -7
  126. package/dist/server-expo-C-90EhcG.mjs +2 -0
  127. package/dist/{server-expo-CUuzP9Mp.mjs → server-expo-DT_F_uVI.mjs} +51 -15
  128. package/dist/{settings-Bbztm4oV.mjs → settings-CsJDEXgK.mjs} +301 -132
  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-ChMfe8rg.mjs → simslim-Cgk17SXV.mjs} +14 -13
  134. package/dist/{slot-launch-CeCRr6MK.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-CRkG-mZ7.mjs → start-7lpH7hmN.mjs} +66 -48
  138. package/dist/{start-mh6bS27z.mjs → start-RChynRDp.mjs} +1 -1
  139. package/dist/{state-lqxdOH_g.mjs → state-C4ZtUisW.mjs} +41 -14
  140. package/dist/{state-BUpAmt2r.mjs → state-XMziexv2.mjs} +3 -2
  141. package/dist/{stats-CaB1MxMi.mjs → stats-53T7OTb9.mjs} +7 -13
  142. package/dist/stats-report-BFfMpWWF.mjs +16 -0
  143. package/dist/{status-C7vzkInu.mjs → status-BL7jVyAB.mjs} +538 -467
  144. package/dist/status-CSi6tlRq.mjs +2 -0
  145. package/dist/{status-BDGHwkCs.mjs → status-DqEUSSxs.mjs} +6 -4
  146. package/dist/{status-watch-ZaVqRdtW.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-BU7JaFCg.mjs → stop-Bk_1qiV6.mjs} +2 -2
  151. package/dist/{stop-BO80KJoT.mjs → stop-CPzlM1L-.mjs} +138 -99
  152. package/dist/{stop-Cftw_sXJ.mjs → stop-D7h6jAXQ.mjs} +11 -10
  153. package/dist/supervisor-run.d.mts +8 -17
  154. package/dist/supervisor-run.mjs +63 -28
  155. package/dist/{support-Ca6PZbpr.mjs → support-67vraa1Q.mjs} +18 -11
  156. package/dist/{support-Co0wk8Cv.mjs → support-Dlu37g6H.mjs} +12 -12
  157. package/dist/{swiftpm-macos-siFSkmCO.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-C0MWBi8O.mjs → trigger-BAahxUPq.mjs} +20 -5
  161. package/dist/trigger-Bf3uDcpv.mjs +2 -0
  162. package/dist/{warm-progress-5FAXkXIg.mjs → warm-progress-BHX5r0Ei.mjs} +252 -176
  163. package/dist/{web-BTjzE8mc.mjs → web-CJmIj6AI.mjs} +18 -13
  164. package/dist/web-DknQETPs.mjs +2 -0
  165. package/dist/web-run.mjs +16 -17
  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-CvgTFe-h.mjs → workspace-state-Cjuigeeu.mjs} +70 -56
  171. package/dist/{workspaces-C4kqIOlx.mjs → workspaces-BccMFmGQ.mjs} +1188 -1080
  172. package/dist/worktree-CK2MpJW5.mjs +2 -0
  173. package/dist/{worktree-DtRsh6go.mjs → worktree-DQ6Zi2Mv.mjs} +368 -110
  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-BaMpUQ4-.mjs +0 -629
  178. package/dist/api-run.mjs +0 -296
  179. package/dist/api-zuX3ynYN.mjs +0 -154
  180. package/dist/app-install-Cg9YJy3x.mjs +0 -873
  181. package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
  182. package/dist/budget-RFbwFpG5.mjs +0 -4109
  183. package/dist/build-facts-DcLv2HSd.d.mts +0 -111
  184. package/dist/client-zqjFd79D.mjs +0 -1779
  185. package/dist/config-D0LhTY3S.mjs +0 -524
  186. package/dist/device-BgNj-qVj.mjs +0 -290
  187. package/dist/device-lease-C309csaB.mjs +0 -1228
  188. package/dist/device-remote-DjsNw8DD.mjs +0 -1272
  189. package/dist/eas-session-ledger-DJDeL4Uq.mjs +0 -205
  190. package/dist/exec-B81Qodjn.mjs +0 -254
  191. package/dist/launch-verify-Dl78EVgR.mjs +0 -428
  192. package/dist/logs-Bh4eqCCc.mjs +0 -384
  193. package/dist/macos-kivF8qKz.mjs +0 -2
  194. package/dist/miss-reason-SuTptY-I.mjs +0 -238
  195. package/dist/native-android-D94RlJ-X.mjs +0 -226
  196. package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
  197. package/dist/plan-Jwu_vr-F.mjs +0 -260
  198. package/dist/prebuild-DB_zLOLc.mjs +0 -213
  199. package/dist/preview-BRLFRhTz.mjs +0 -1004
  200. package/dist/process-identity-Biv3arCO.mjs +0 -40
  201. package/dist/react-native-build-JUF31S8U.mjs +0 -239
  202. package/dist/react-native-doctor-BQHqiXaQ.mjs +0 -78
  203. package/dist/remote-cache-fxcl5C-L.mjs +0 -526
  204. package/dist/result-BrfgXtdO.mjs +0 -186
  205. package/dist/server-expo-Dvkd7JcF.mjs +0 -2
  206. package/dist/settings-BuKMOANA.mjs +0 -402
  207. package/dist/spawn-claims-Kqiifsk2.mjs +0 -72
  208. package/dist/stage-BNKKdDNc.mjs +0 -157
  209. package/dist/stim-desktop-8GQX2OV8.mjs +0 -63
  210. package/dist/tailnet-D7-tE_ug.mjs +0 -265
  211. package/dist/toolchain-B12psPA2.mjs +0 -2
  212. package/dist/toolchain-SqehyPLw.mjs +0 -1657
  213. package/dist/trigger-SHLOWJ4O.mjs +0 -2
  214. package/dist/web-CHN5gh34.mjs +0 -2
  215. package/dist/worktree-Cgnm6vZt.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,40 +0,0 @@
1
- import { createRequire } from "node:module";
2
- //#region \0rolldown/runtime.js
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
8
- var __exportAll = (all, no_symbols) => {
9
- let target = {};
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
14
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
15
- return target;
16
- };
17
- var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
19
- key = keys[i];
20
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
- get: ((k) => from[k]).bind(null, key),
22
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
- });
24
- }
25
- return to;
26
- };
27
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
28
- var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
29
- //#endregion
30
- //#region src/ownership-claim.ts
31
- var ownership_claim_exports = /* @__PURE__ */ __exportAll({});
32
- import * as import__stim_cli_core_ownership_claim from "@stim-cli/core/ownership-claim";
33
- __reExport(ownership_claim_exports, import__stim_cli_core_ownership_claim);
34
- //#endregion
35
- //#region src/process-identity.ts
36
- var process_identity_exports = /* @__PURE__ */ __exportAll({});
37
- import * as import__stim_cli_core_process_identity from "@stim-cli/core/process-identity";
38
- __reExport(process_identity_exports, import__stim_cli_core_process_identity);
39
- //#endregion
40
- export { __require as i, ownership_claim_exports as n, __commonJSMin as r, process_identity_exports as t };
@@ -1,239 +0,0 @@
1
- import { r as register } from "./cache-manifest-qA3dT2x2.mjs";
2
- import { g as sharedCompilationCache } from "./workspace-state-CvgTFe-h.mjs";
3
- import { l as phaseLine } from "./command-output-CPDq_90S.mjs";
4
- import { S as resolvePackageJson } from "./project-DX8fXyw_.mjs";
5
- import { p as resolveOptimizations } from "./errors-DzkMYh8Q.mjs";
6
- import { a as buildGradle, i as assembleTaskFor, n as BUILD_ERROR, o as parseProductFlavors, s as variantNameOf, t as ASSEMBLE_TASK } from "./gradle-CZZo1TSA.mjs";
7
- import { C as compilationCacheSettings, N as swiftPrefixMappingSupported, O as pickXcodeProject, T as detectXcodeMajor, b as SWIFT_PREFIX_MAPPING_MIN_SWIFT, w as detectSwiftVersion, x as buildXcode } from "./toolchain-SqehyPLw.mjs";
8
- import { existsSync, readFileSync, readdirSync } from "node:fs";
9
- import { join, relative } from "node:path";
10
- import chalk from "chalk";
11
- /** The ABI name a build for every ABI has to fit; `stim android` narrows a build to the device's. */
12
- const LONGEST_ANDROID_ABI = "armeabi-v7a";
13
- function androidPathRoom(root, { abi = null, variant = null, platform = process.platform } = {}) {
14
- if (platform !== "win32") return null;
15
- const abiName = abi ?? LONGEST_ANDROID_ABI;
16
- const tail = 198 + (/release$/i.test(variant ?? "") ? 14 : 5) - 5 + abiName.length;
17
- const longest = root.length + tail;
18
- if (longest < 240) return null;
19
- return {
20
- root,
21
- abi: abiName,
22
- longest,
23
- maxRootLength: 239 - tail
24
- };
25
- }
26
- function androidPathRoomMessage({ root, abi, longest, maxRootLength }) {
27
- return `The project root ${root} is ${root.length} characters, so the longest known Android native object path (react_codegen_safeareacontext for ${abi}) reaches ${longest} characters, past the 239 the NDK's ninja can be given on Windows; the root can be at most ${maxRootLength} characters.`;
28
- }
29
- function androidPathRoomRemedy({ root }) {
30
- return `Map the project to a drive letter (\`subst X: "${root}"\`) and run Stim from X:\\, or move it under a shorter root.`;
31
- }
32
- //#endregion
33
- //#region src/integrations/react-native-build.ts
34
- function gradlewPath(layout) {
35
- return join(layout.gradleRoot, process.platform === "win32" ? "gradlew.bat" : "gradlew");
36
- }
37
- function apkOutputsDir(layout) {
38
- return join(layout.moduleDir, "build", "outputs", "apk");
39
- }
40
- function discoverAndroidProject(root, layout) {
41
- const dir = layout.gradleRoot;
42
- if (!existsSync(dir)) return {
43
- failed: true,
44
- code: BUILD_ERROR,
45
- reason: `No ${relative(root, dir) || "."}/ directory in ${root}.`,
46
- remedy: "Generate it (`npx expo prebuild -p android`, which `stim android` runs itself on an Expo project) or check out the native sources."
47
- };
48
- const gradlew = gradlewPath(layout);
49
- if (!existsSync(gradlew)) return {
50
- failed: true,
51
- code: BUILD_ERROR,
52
- reason: `${gradlew} does not exist, so there is no gradle wrapper to build with.`,
53
- remedy: `Restore the wrapper (\`gradle wrapper\` in ${relative(root, dir) || "."}/, or regenerate the project with \`npx expo prebuild -p android --clean\`).`
54
- };
55
- return {
56
- androidDir: dir,
57
- gradlew
58
- };
59
- }
60
- function readProductFlavors(layout) {
61
- return parseProductFlavors(readOrNull(join(layout.moduleDir, "build.gradle")));
62
- }
63
- function productFlavorRefusal({ flavors, variant }) {
64
- if (variant) return null;
65
- if (!flavors.known || flavors.dimensions.length === 0) return null;
66
- let combinations = [[]];
67
- for (const group of flavors.dimensions) combinations = combinations.flatMap((combination) => group.map((flavor) => combination.concat(flavor)));
68
- if (combinations.length < 2) return null;
69
- const count = flavors.dimensions.reduce((total, group) => total + group.length, 0);
70
- const variants = combinations.map((combination) => variantNameOf(combination.concat("debug")));
71
- return {
72
- code: "STIM_BAD_ARG",
73
- reason: `android/app/build.gradle declares ${count} product flavors, so \`./gradlew ${ASSEMBLE_TASK}\` builds an APK for each of them and nothing says which flavor to install.`,
74
- remedy: `Pass \`--variant ${variants[0]}\` or set the android.variant setting -- e.g. {"android": {"variant": "${variants[0]}"}} in .stim.json. The debug variants are: ${variants.join(", ")}.`
75
- };
76
- }
77
- function readOrNull(path) {
78
- try {
79
- return readFileSync(path, "utf-8");
80
- } catch {
81
- return null;
82
- }
83
- }
84
- async function buildAndroid({ root, layout, logWriter, variant = null, abi = null }, options = {}) {
85
- const project = discoverAndroidProject(root, layout);
86
- if (project.failed) return {
87
- ok: false,
88
- code: project.code,
89
- reason: project.reason,
90
- remedy: project.remedy,
91
- diagnostics: [],
92
- truncated: 0,
93
- lastLines: [],
94
- durationMs: 0
95
- };
96
- const room = androidPathRoom(root, {
97
- abi,
98
- variant,
99
- platform: options.platform ?? process.platform
100
- });
101
- return buildGradle({
102
- root,
103
- logWriter,
104
- variant,
105
- project: {
106
- directory: project.androidDir,
107
- gradlew: project.gradlew,
108
- module: layout.module,
109
- outputsDir: apkOutputsDir(layout)
110
- },
111
- task: layout.custom ? `${layout.module}:${assembleTaskFor(variant)}` : assembleTaskFor(variant),
112
- projectArgs: abi ? [`-PreactNativeArchitectures=${abi}`] : [],
113
- preflightFailure: room ? {
114
- code: "STIM_PATH_TOO_LONG",
115
- reason: androidPathRoomMessage(room),
116
- remedy: androidPathRoomRemedy(room)
117
- } : null
118
- }, options);
119
- }
120
- const PREBUILD_REMEDY = "Generate it with `npx expo prebuild -p ios` (stim ios does this automatically for an Expo project with no ios/ directory), or commit the native project.";
121
- function buildFailure(message, remedy) {
122
- return { error: {
123
- code: "STIM_BUILD_FAILED",
124
- message,
125
- remedy
126
- } };
127
- }
128
- function discoverXcodeProject(root, dir) {
129
- let entries;
130
- try {
131
- entries = readdirSync(dir);
132
- } catch {
133
- return buildFailure(`No ${relative(root, dir) || "."}/ directory in ${root}.`, PREBUILD_REMEDY);
134
- }
135
- const picked = pickXcodeProject(entries);
136
- if (!picked) return buildFailure(`${dir} contains no .xcworkspace and no .xcodeproj.`, PREBUILD_REMEDY);
137
- return {
138
- ...picked,
139
- dir,
140
- appRoot: root,
141
- path: join(dir, picked.file)
142
- };
143
- }
144
- function ccacheEnabled(podfileProperties) {
145
- if (!podfileProperties || typeof podfileProperties !== "object") return false;
146
- return podfileProperties["apple.ccacheEnabled"] === "true";
147
- }
148
- function readPodfileProperties(iosDir) {
149
- try {
150
- const parsed = JSON.parse(readFileSync(join(iosDir, "Podfile.properties.json"), "utf-8"));
151
- return parsed && typeof parsed === "object" ? parsed : null;
152
- } catch {
153
- return null;
154
- }
155
- }
156
- const SWIFT_CACHE_MIN_REACT_NATIVE = {
157
- major: 0,
158
- minor: 87
159
- };
160
- function reactNativeSupportsSwiftCache(version) {
161
- if (!version) return false;
162
- const min = SWIFT_CACHE_MIN_REACT_NATIVE;
163
- return version.major > min.major || version.major === min.major && version.minor >= min.minor;
164
- }
165
- function parseReactNativeVersion(packageJson) {
166
- if (!packageJson || typeof packageJson !== "object") return null;
167
- const raw = packageJson.version;
168
- const m = typeof raw === "string" ? /^(\d+)\.(\d+)\./.exec(raw) : null;
169
- if (!m || m[1] === void 0 || m[2] === void 0) return null;
170
- return {
171
- major: parseInt(m[1], 10),
172
- minor: parseInt(m[2], 10)
173
- };
174
- }
175
- function detectReactNativeVersion(root) {
176
- const file = resolvePackageJson(root, "react-native");
177
- if (!file) return null;
178
- try {
179
- return parseReactNativeVersion(JSON.parse(readFileSync(file, "utf-8")));
180
- } catch {
181
- return null;
182
- }
183
- }
184
- function reactNativeCompilationCacheSettings({ reactNativeVersion = null, ...options }) {
185
- return compilationCacheSettings({
186
- ...options,
187
- swiftCacheCompatible: reactNativeSupportsSwiftCache(reactNativeVersion)
188
- });
189
- }
190
- function resolveCompilationCacheSettings({ root, iosDir, derivedDataPath, exec = null, casPath = sharedCompilationCache(), optimizations = resolveOptimizations({}, {}).ios, onNote = (line) => console.error(line) }) {
191
- const xcodeMajor = detectXcodeMajor(exec);
192
- const ccache = ccacheEnabled(readPodfileProperties(iosDir));
193
- const probe = xcodeMajor !== null && xcodeMajor >= 26 && !ccache && optimizations.compilationCache && optimizations.swiftCompilationCache !== false;
194
- const swiftVersion = probe ? detectSwiftVersion(exec) : null;
195
- const reactNativeVersion = probe ? detectReactNativeVersion(root) : null;
196
- const settings = reactNativeCompilationCacheSettings({
197
- workspaceRoot: root,
198
- derivedDataPath,
199
- casPath,
200
- xcodeMajor,
201
- swiftVersion,
202
- reactNativeVersion,
203
- ccache,
204
- optimizations
205
- });
206
- if (settings.length > 0 && optimizations.compilationCache) {
207
- register({
208
- dir: casPath,
209
- name: "Xcode compilation cache",
210
- prune: "atomic",
211
- note: "shared Xcode compilation cache"
212
- });
213
- const swift = settings.includes("SWIFT_ENABLE_COMPILE_CACHE=YES") ? settings.includes("SWIFT_ENABLE_PREFIX_MAPPING=YES") ? "Swift on" : "Swift on, unmapped" : swiftVersion && !swiftPrefixMappingSupported(swiftVersion) ? `Swift off, ${swiftVersion.major}.${swiftVersion.minor} < ${SWIFT_PREFIX_MAPPING_MIN_SWIFT.major}.${SWIFT_PREFIX_MAPPING_MIN_SWIFT.minor}` : swiftVersion && reactNativeVersion && !reactNativeSupportsSwiftCache(reactNativeVersion) ? `Swift off, react-native ${reactNativeVersion.major}.${reactNativeVersion.minor} < ${SWIFT_CACHE_MIN_REACT_NATIVE.major}.${SWIFT_CACHE_MIN_REACT_NATIVE.minor}` : "Swift off";
214
- onNote(chalk.dim(phaseLine("cache", `compilation cache on (CAS at ${casPath}, ${swift})`)));
215
- }
216
- return settings;
217
- }
218
- async function buildIos(inputs) {
219
- const { root, iosDir, logWriter, udid, destination, now = () => Date.now() } = inputs;
220
- if (!root || typeof root !== "string") throw new TypeError("buildIos requires {root}");
221
- if (!logWriter || typeof logWriter.write !== "function") throw new TypeError("buildIos requires {logWriter} with a write() method");
222
- if (!udid && !destination) throw new TypeError("buildIos requires {udid} (or an explicit {destination})");
223
- const startedAt = now();
224
- return buildXcode({
225
- ...inputs,
226
- startedAt,
227
- project: inputs.project ?? discoverXcodeProject(root, iosDir),
228
- compilationCache: inputs.compilationCache === void 0 ? ({ derivedDataPath, exec }) => resolveCompilationCacheSettings({
229
- root,
230
- iosDir,
231
- derivedDataPath,
232
- exec,
233
- optimizations: inputs.optimizations,
234
- onNote: inputs.onNote
235
- }) : inputs.compilationCache
236
- });
237
- }
238
- //#endregion
239
- export { discoverXcodeProject as a, readProductFlavors as c, androidPathRoomRemedy as d, ccacheEnabled as i, androidPathRoom as l, buildAndroid as n, gradlewPath as o, buildIos as r, productFlavorRefusal as s, apkOutputsDir as t, androidPathRoomMessage as u };
@@ -1,78 +0,0 @@
1
- import { G as resolveIosProjectDir, U as resolveAndroidLayout } from "./settings-Bbztm4oV.mjs";
2
- import { l as phaseLine } from "./command-output-CPDq_90S.mjs";
3
- import { _ as detectIsExpo } from "./project-DX8fXyw_.mjs";
4
- import { I as bundlerPin, i as iosToolchainAsync, n as androidToolchain, t as androidRequirements } from "./toolchain-SqehyPLw.mjs";
5
- import { a as repairCxxLauncherState, n as detectLinkedLibraryGitMetadata, r as reactNativeDoctorFindings, t as detectFingerprintParity } from "./doctor-Dunu3Nv1.mjs";
6
- import { existsSync } from "node:fs";
7
- //#region src/integrations/react-native-doctor.ts
8
- function reactNativeProjectDoctor(root) {
9
- return {
10
- inspect: reactNativeDoctorFindings,
11
- async inspectAsync({ options: { platform }, settings }) {
12
- const parity = await detectFingerprintParity(root, {
13
- platform,
14
- iosProjectPath: resolveIosProjectDir(settings, root).relative
15
- });
16
- const linkedGit = await detectLinkedLibraryGitMetadata(root, { platform });
17
- return [parity, linkedGit?.code === parity?.code ? null : linkedGit].filter((finding) => finding !== null);
18
- },
19
- offloadTargets({ options: { platform, host = process.platform }, settings, repoRoot }, iosRuntime) {
20
- const checksIos = platform !== "android" && host === "darwin";
21
- const androidDir = resolveAndroidLayout(settings, root, repoRoot ?? root).gradleRoot;
22
- const checksAndroid = platform === "android" || platform === void 0 && (existsSync(androidDir) || detectIsExpo(root));
23
- if (!checksIos && !checksAndroid) return null;
24
- return async () => {
25
- const targets = [];
26
- if (checksIos) {
27
- const [local, runtime] = await Promise.all([iosToolchainAsync(root), iosRuntime()]);
28
- targets.push({
29
- platform: "ios",
30
- local,
31
- runtime,
32
- cocoapodsPinned: bundlerPin(root) !== null
33
- });
34
- }
35
- if (checksAndroid) targets.push({
36
- platform: "android",
37
- local: androidToolchain(),
38
- requires: androidRequirements(root)
39
- });
40
- return targets;
41
- };
42
- },
43
- repair: (platform, settings, repoRoot) => platform === "ios" ? {
44
- removed: [],
45
- refused: []
46
- } : repairCxxLauncherState(root, settings, resolveAndroidLayout(settings, root, repoRoot ?? root)),
47
- successLines: reactNativeDoctorSuccessLines
48
- };
49
- }
50
- function reactNativeDoctorSuccessLines(platform) {
51
- const lines = [
52
- "",
53
- "Project",
54
- phaseLine("project", "source checkout, dependencies, local upstream, nested worktrees Watchman would crawl")
55
- ];
56
- if (platform !== "android") {
57
- lines.push("", "iOS");
58
- lines.push(phaseLine("setup", "CocoaPods, warm state, effective Debug simulator architectures"));
59
- lines.push(phaseLine("caches", "Metro, Xcode compilation, ccache, build provider"));
60
- lines.push(phaseLine("devices", "remote device, SimSlim profile"));
61
- }
62
- if (platform !== "ios") {
63
- lines.push("", "Android");
64
- lines.push(phaseLine("setup", "Android SDK, warm state"));
65
- lines.push(phaseLine("caches", "Metro, Gradle, ccache, build provider"));
66
- lines.push(phaseLine("devices", "remote device"));
67
- }
68
- lines.push("", "Expo and React Native");
69
- lines.push(phaseLine("services", "EAS session"));
70
- lines.push(phaseLine("fingerprint", "parity when dependencies are absent"));
71
- lines.push("", "Handled automatically");
72
- const suppliedCaches = platform === "ios" ? "Metro transform store, Xcode compilation cache" : platform === "android" ? "Metro transform store, Gradle build cache, ccache" : "Metro transform store, Xcode compilation cache, Gradle build cache, ccache";
73
- lines.push(phaseLine("caches", suppliedCaches));
74
- lines.push(phaseLine("meaning", "missing project cache settings are healthy"));
75
- return lines;
76
- }
77
- //#endregion
78
- export { reactNativeProjectDoctor };