stim 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +3 -2
  2. package/dist/{acquire-artifact-ybouwJSR.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
  3. package/dist/{act-DG54PWtJ.mjs → act-Cyvm8xYc.mjs} +40 -25
  4. package/dist/{activity-B5RtpFda.mjs → activity-Dq3ZcdD8.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-UJ5gC80l.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
  6. package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
  7. package/dist/{android-BoUJKbfz.mjs → android-BZppyPe_.mjs} +66 -46
  8. package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
  9. package/dist/{android-CHH4KLOR.mjs → android-DcztblCT.mjs} +5 -5
  10. package/dist/{android-cas-ngferVq2.mjs → android-cas-BtCOrNqb.mjs} +3 -3
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/api.d.mts +22 -4
  13. package/dist/api.mjs +32 -31
  14. package/dist/{artifact-5RteZem7.mjs → artifact-BR5VNArK.mjs} +17 -16
  15. package/dist/{artifact-Dwdo7k1E.mjs → artifact-Bdt_n9Jc.mjs} +17 -16
  16. package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
  17. package/dist/{browser-web-CeEVlGug.mjs → browser-web-ycg9qWB8.mjs} +16 -17
  18. package/dist/{budget-DnPX3DXj.mjs → budget-dPGuhNai.mjs} +101 -40
  19. package/dist/{build-CqufZFqy.mjs → build-CaF574eS.mjs} +31 -28
  20. package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
  21. package/dist/{build-plan-C8CIvRyi.mjs → build-plan-JsDUq4w1.mjs} +8 -7
  22. package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-RcAy92gH.mjs → ccache-CCn1S6qG.mjs} +6 -6
  25. package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
  26. package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
  27. package/dist/{cli-D-J9fWGV.mjs → cli-xqAidP7O.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/{client-yyso1bwi.mjs → client-18-ZowoT.mjs} +254 -28
  30. package/dist/collector-run.mjs +6 -6
  31. package/dist/{command-output-Db8BqzxH.mjs → command-output-DxC0k2rk.mjs} +3 -2
  32. package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
  33. package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
  34. package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-C56ll9hY.mjs} +2 -2
  35. package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
  36. package/dist/{dev-client-BnYSDiKa.mjs → dev-client-w_fok0Ek.mjs} +3 -3
  37. package/dist/{device-BvzPUBs3.mjs → device-4RUugw5X.mjs} +16 -16
  38. package/dist/{device-CCkWmkAA.mjs → device-BktRGdjS.mjs} +40 -44
  39. package/dist/{device-capacity-CjaSdrhg.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
  40. package/dist/device-host-worker.mjs +17 -17
  41. package/dist/{device-ios-uOiEETX2.mjs → device-ios-DzpSlZyd.mjs} +23 -24
  42. package/dist/{device-lease-run-BgwPHc6u.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
  43. package/dist/{device-pool-C-ptmZTa.mjs → device-pool-CgBHk401.mjs} +3 -3
  44. package/dist/{doctor-pxxvipYC.mjs → doctor-BZ6oxNum.mjs} +1 -1
  45. package/dist/{doctor-8sr2tFOL.mjs → doctor-C33AzVfR.mjs} +28 -28
  46. package/dist/{doctor-D2SN3Ltx.mjs → doctor-DZgpqR6J.mjs} +17 -16
  47. package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
  48. package/dist/doctor-fingerprint.mjs +1 -1
  49. package/dist/{doctor-watchman-sy_RNhFt.mjs → doctor-watchman-B453A231.mjs} +5 -5
  50. package/dist/{eas-build-CyjU5K7E.mjs → eas-build-CxKUNHsb.mjs} +4 -4
  51. package/dist/{eas-fallback-DV3Wytf1.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
  52. package/dist/{eas-session-ledger-BzzsX97d.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
  53. package/dist/{error-diagnostics-C6sVoeqO.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
  54. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  55. package/dist/{gc-DLbzvTP2.mjs → gc-DDWEAj0w.mjs} +2 -2
  56. package/dist/{gc-CDoogxAI.mjs → gc-yVKpAOKM.mjs} +205 -28
  57. package/dist/{guide-BC37GcDG.mjs → guide-Bggftwc5.mjs} +252 -73
  58. package/dist/{hosted-android-CkclQig_.mjs → hosted-android-D4dweBof.mjs} +4 -4
  59. package/dist/{hosted-client-ByuMMO5s.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
  60. package/dist/{hosted-ios-DtYHeuYR.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
  61. package/dist/{hosted-logs-Br84qWy1.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
  62. package/dist/{hosted-macos-DdtYajZt.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
  63. package/dist/{hosted-native-UPI9zdZ4.mjs → hosted-native-Doxbfzem.mjs} +58 -11
  64. package/dist/{idle-shutdown-DO7oIRlc.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
  65. package/dist/{ios-DZZbNYlY.mjs → ios-B1FXRCMX.mjs} +71 -44
  66. package/dist/{ios-vbUOqGXu.mjs → ios-BItP6lkn.mjs} +8 -8
  67. package/dist/{ios-hcBpnEGk.mjs → ios-CVUFFZ6C.mjs} +70 -13
  68. package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
  69. package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
  70. package/dist/{ios-device-JC3uWM4K.mjs → ios-device-BI38NFFH.mjs} +3 -3
  71. package/dist/{ios-project-CVyNwjAF.mjs → ios-project-KYqeJURj.mjs} +5 -5
  72. package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
  73. package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-DlElquYD.mjs} +15 -7
  74. package/dist/{js-swap-C3QxUFJR.mjs → js-swap-BvrQvXHY.mjs} +7 -6
  75. package/dist/{launch-CHY3p-yz.mjs → launch-BVlyQw3T.mjs} +51 -49
  76. package/dist/{launch-Bz7JtaC4.mjs → launch-SfzGH_s9.mjs} +48 -29
  77. package/dist/{logs-mxqsWpJs.mjs → logs-DXE32kyb.mjs} +16 -9
  78. package/dist/{logs-CtNeNDuq.mjs → logs-ovlU7m7N.mjs} +8 -6
  79. package/dist/{macos-inNFbBWc.mjs → macos-B3BveDrU.mjs} +1 -1
  80. package/dist/{macos-u0BoHKnO.mjs → macos-CCfhb-jT.mjs} +49 -42
  81. package/dist/macos-run.mjs +1 -1
  82. package/dist/maintenance-run.mjs +7 -7
  83. package/dist/{metro-DiXtA3Ty.mjs → metro-Bu8LBfzS.mjs} +4 -4
  84. package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-DtsOy-0P.mjs} +3 -4
  85. package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BWDuU5oQ.mjs} +3 -3
  86. package/dist/{native-android-CdCSylTn.mjs → native-android-96BBizbq.mjs} +17 -17
  87. package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BcLYBZil.mjs} +5 -5
  88. package/dist/{native-run-BUTu8T7A.mjs → native-run-BmH7U8pr.mjs} +6 -6
  89. package/dist/{native-runtime-CRSOZxKY.mjs → native-runtime-DgtJkzIa.mjs} +10 -9
  90. package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
  91. package/dist/{native-xcode-inputs-G6rkkhxu.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
  92. package/dist/{native-xcode-ios-_os2PlCD.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
  93. package/dist/offload-worker.d.mts +7 -2
  94. package/dist/offload-worker.mjs +104 -43
  95. package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
  96. package/dist/{ownership-C5fo5Edb.mjs → ownership-DxlZGDcV.mjs} +3 -3
  97. package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
  98. package/dist/phone-reverses-BdsdesVF.mjs +57 -0
  99. package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DUvqqsB-.mjs} +1 -1
  100. package/dist/{plan-placement-BU42oOyT.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
  101. package/dist/{ports-BSmQKzW7.mjs → ports-D-E_OiAO.mjs} +3 -3
  102. package/dist/{prebuild-BFm63bQ0.mjs → prebuild-DmVCf5xb.mjs} +14 -9
  103. package/dist/{project-CTLNHCfE.mjs → project-Dz-hWkb-.mjs} +21 -17
  104. package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
  105. package/dist/pull-requests.mjs +1 -1
  106. package/dist/{react-native-android-CFgUroxW.mjs → react-native-android-DOinxgwB.mjs} +75 -32
  107. package/dist/{react-native-build-CmJkTljQ.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
  108. package/dist/{react-native-doctor-LTF-Xt8l.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
  109. package/dist/{react-native-ios-ChBF1MkB.mjs → react-native-ios-D5zTIuH8.mjs} +38 -22
  110. package/dist/{recordings-CQmfzAh7.mjs → recordings-CdPwYwvs.mjs} +1 -1
  111. package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
  112. package/dist/{reload-DF9hqUUB.mjs → reload-C1TTVesC.mjs} +144 -42
  113. package/dist/{reload-RBi1nj6Z.mjs → reload-Ck9RJeSq.mjs} +1 -1
  114. package/dist/{remote-BmvMCcJw.mjs → remote-DEZ7AOVq.mjs} +7 -7
  115. package/dist/{result-Cx5CRLvS.mjs → result-DqBrb12U.mjs} +40 -17
  116. package/dist/{run-DidHghD1.mjs → run-BIwoU44q.mjs} +2 -2
  117. package/dist/{selection-DSMbWEX2.mjs → selection-BLtvaqxc.mjs} +11 -5
  118. package/dist/{server-bare-CafzuyFB.mjs → server-bare-Z1ToVLPn.mjs} +2 -2
  119. package/dist/{server-command-BTiGPEjS.mjs → server-command-C0pmjNdG.mjs} +6 -6
  120. package/dist/server-expo-CEntXzRw.mjs +2 -0
  121. package/dist/{server-expo-D9lEz4aq.mjs → server-expo-Tt_hLRpy.mjs} +37 -13
  122. package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
  123. package/dist/{settings-eKF_vJJs.mjs → settings-kkt0vP4w.mjs} +1 -1
  124. package/dist/{settings-write-79mQRr9C.mjs → settings-write--gj6MACV.mjs} +7 -7
  125. package/dist/settings.schema.json +13 -0
  126. package/dist/{simslim-BNckWpXi.mjs → simslim-CdWKT3vA.mjs} +2 -2
  127. package/dist/{slot-launch-D7M2nE4b.mjs → slot-launch-A1BgotaM.mjs} +6 -6
  128. package/dist/{stage-DKNM4ZPd.mjs → stage-ERTMh88n.mjs} +2 -3
  129. package/dist/{start-bjfiScgz.mjs → start-BKGrEhzG.mjs} +75 -35
  130. package/dist/{start-CRfN1kWV.mjs → start-Bmg_qmHi.mjs} +1 -1
  131. package/dist/{state--smjFSTL.mjs → state-B1ig0Kqy.mjs} +4 -4
  132. package/dist/{state-08I3hw3_.mjs → state-BfAltYJP.mjs} +2 -2
  133. package/dist/{stats-DioA6cBU.mjs → stats-B-ckuiUg.mjs} +5 -5
  134. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  135. package/dist/{status-kzbeWk4x.mjs → status-DfFp6a76.mjs} +24 -24
  136. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  137. package/dist/{status-Eqx_20WC.mjs → status-Pw-807f0.mjs} +1 -1
  138. package/dist/{status-watch-BIqqbJ6q.mjs → status-watch-XC7F-AMf.mjs} +5 -5
  139. package/dist/status-worker.mjs +1 -1
  140. package/dist/stim-clonefile.c +18 -0
  141. package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
  142. package/dist/{stop-B18d8KDw.mjs → stop-BFu7X_Do.mjs} +2 -2
  143. package/dist/{stop-B2uLQfoM.mjs → stop-CL1kDHds.mjs} +55 -21
  144. package/dist/{stop-DzLJc7Ei.mjs → stop-DhclRwOO.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +16 -16
  146. package/dist/{support-BTpZ6RAJ.mjs → support-B1W-hmC2.mjs} +8 -8
  147. package/dist/{support-DTBV56gy.mjs → support-B3tzVhKn.mjs} +6 -6
  148. package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-BWYPj9Sn.mjs} +4 -4
  149. package/dist/{swiftpm-macos-r_WSKlXr.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
  150. package/dist/{toolchain-GVgnf8d1.mjs → toolchain-BjgKdoEf.mjs} +1 -1
  151. package/dist/{toolchain-CWeGJgCc.mjs → toolchain-D3bmRMia.mjs} +57 -36
  152. package/dist/trigger-BLsHgAGR.mjs +2 -0
  153. package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
  154. package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-ol0ZypEu.mjs} +6 -6
  155. package/dist/{web-CwREhjD-.mjs → web-BH7peScT.mjs} +12 -10
  156. package/dist/web-BdOFlTJr.mjs +2 -0
  157. package/dist/web-run.mjs +8 -9
  158. package/dist/windows-report.mjs +12 -1
  159. package/dist/windows-report.ps1 +1 -1
  160. package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CeBpIZgr.mjs} +11 -4
  161. package/dist/{workspaces-BxzYlo3P.mjs → workspaces-CSV2Orf4.mjs} +36 -32
  162. package/dist/{worktree-BxfVxG_b.mjs → worktree-DEDUzO_L.mjs} +1 -1
  163. package/dist/{worktree-8lqn_lBp.mjs → worktree-Dw8kfacb.mjs} +324 -99
  164. package/dist/{xcode-iQnROM5o.mjs → xcode-DHu41qQ4.mjs} +41 -27
  165. package/package.json +7 -7
  166. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
  167. package/dist/server-expo-C-Buqvn_.mjs +0 -2
  168. package/dist/trigger-yb_nFzPF.mjs +0 -2
  169. package/dist/web-Cduk0NSE.mjs +0 -2
@@ -1,18 +1,20 @@
1
- import { h as withDrainingCancellation, t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { c as throwIfCancelled, t as getExecutor, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
2
2
  import { i as sharedBuildCache } from "./paths-DQtTgsBf.mjs";
3
- import { a as killOnAbort, c as gitQuiet, f as throwIfCancelled, o as git, r as childEnvironment } from "./operation-exec-BW0em61G.mjs";
4
- import { m as defaultAndroidLayout } from "./settings-C7O8A6ZI.mjs";
5
- import { r as register } from "./cache-manifest-DSeQjt-Q.mjs";
3
+ import { a as killOnAbort, c as gitQuiet, o as git, r as childEnvironment, s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
4
+ import { m as defaultAndroidLayout } from "./settings-RKwY33wv.mjs";
5
+ import { r as register } from "./cache-manifest-BPXRONJz.mjs";
6
6
  import { createHash } from "node:crypto";
7
7
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
  import { artifactIn, buildCacheKey, resolveArtifact, storeArtifactAsync } from "@stim-cli/core";
10
- import { join as join$1, posix as posix$1, relative as relative$1, sep as sep$1 } from "path";
11
- import { existsSync as existsSync$1, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1, rmSync as rmSync$1, statSync as statSync$1 } from "fs";
12
- import { writeFile } from "node:fs/promises";
10
+ import { isAbsolute as isAbsolute$1, join as join$1, posix as posix$1, relative as relative$1, resolve as resolve$1, sep as sep$1 } from "path";
11
+ import { existsSync as existsSync$1, lstatSync as lstatSync$1, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1, rmSync as rmSync$1, statSync as statSync$1 } from "fs";
12
+ import { readdir, writeFile } from "node:fs/promises";
13
13
  import { isDeepStrictEqual } from "util";
14
14
  import * as expoFingerprint from "@expo/fingerprint";
15
15
  import { loadConfigAsync } from "@expo/fingerprint/build/Config.js";
16
+ import { normalizeOptionsAsync } from "@expo/fingerprint/build/Options.js";
17
+ import { isIgnoredPathWithMatchObjects } from "@expo/fingerprint/build/utils/Path.js";
16
18
  import { buildUploadTimeoutMs } from "@stim-cli/cache";
17
19
  const ASSET_MANIFEST_FILE = "assets-manifest.json";
18
20
  const MAX_DEPTH = 4;
@@ -174,7 +176,22 @@ const FINGERPRINT_PLATFORMS = /* @__PURE__ */ new Set(["ios", "android"]);
174
176
  * a lockfile with machine paths, a generated report -- belongs in that
175
177
  * project's `.fingerprintignore`, which still applies on top of this.
176
178
  */
177
- const DEFAULT_FINGERPRINT_IGNORES = ["**/android/local.properties", "**/android/.idea/**"];
179
+ const DEFAULT_FINGERPRINT_IGNORES = [
180
+ "**/android/local.properties",
181
+ "**/android/.idea/**",
182
+ "**/*.xcodeproj/xcuserdata/**/*"
183
+ ];
184
+ /**
185
+ * `react-native bundle` output, ignored only while an ignore pattern matches it: a committed copy can be a native
186
+ * resource, while a Debug build loads JS from Metro and a release cache hit injects the current JS. The match skips
187
+ * the index, so a force-added copy counts the same on a build worker, whose mirror index is empty. A build worker
188
+ * has only the synced .gitignore files, so the client sends the paths it ignored (`ignoredFingerprintPaths`) for
189
+ * those it ignores through .git/info/exclude or a global excludes file.
190
+ */
191
+ const BUNDLE_OUTPUT_IGNORES = {
192
+ "ios/main.jsbundle": "ios/main.jsbundle",
193
+ "ios/assets": "ios/assets/**/*"
194
+ };
178
195
  const APP_ROOT_IOS_SKIPPED = /* @__PURE__ */ new Set([
179
196
  "node_modules",
180
197
  "Pods",
@@ -184,10 +201,12 @@ const APP_ROOT_IOS_SKIPPED = /* @__PURE__ */ new Set([
184
201
  ".DS_Store",
185
202
  ".stim.json"
186
203
  ]);
187
- function gitIgnoredNames(projectRoot, names) {
204
+ const appRootNames = (entries) => entries.filter((name) => !APP_ROOT_IOS_SKIPPED.has(name) && !name.startsWith(".watchman-cookie-"));
205
+ function gitIgnoredNames(projectRoot, names, noIndex = false) {
188
206
  if (names.length === 0) return /* @__PURE__ */ new Set();
189
207
  const out = gitQuiet(projectRoot, [
190
208
  "check-ignore",
209
+ ...noIndex ? ["--no-index"] : [],
191
210
  "--",
192
211
  ...names
193
212
  ]);
@@ -211,7 +230,7 @@ function iosProjectFingerprintOptions(projectRoot, iosProjectPath, { list = (dir
211
230
  reasons
212
231
  }];
213
232
  if (appRoot) {
214
- const names = list(projectRoot).filter((name) => !APP_ROOT_IOS_SKIPPED.has(name) && !name.startsWith(".watchman-cookie-"));
233
+ const names = appRootNames(list(projectRoot));
215
234
  const skip = ignored(projectRoot, names);
216
235
  extraSources = names.filter((name) => !skip.has(name)).toSorted((a, b) => a.localeCompare(b)).map((filePath) => ({
217
236
  type: isDirectory(join$1(projectRoot, filePath)) ? "dir" : "file",
@@ -274,17 +293,51 @@ function androidProjectFingerprintOptions(projectRoot, layout, exists = existsSy
274
293
  ].map((dir) => `${moduleRel}/${dir}/**/*`)
275
294
  };
276
295
  }
277
- async function fingerprintProject(projectRoot, { platform, iosProjectPath = "ios", androidLayout = null, createFingerprint = expoFingerprint.createFingerprintAsync, debug = false } = {}) {
296
+ /**
297
+ * The bundle output and, with `ios.projectPath` '.', the top-level entries that git ignores here for an iOS
298
+ * fingerprint, as the paths a build worker needs to ignore the same ones: it has no .git/info/exclude or global
299
+ * excludes file.
300
+ */
301
+ function ignoredFingerprintPaths(projectRoot, { platform, iosProjectPath = "ios" }) {
302
+ if (platform !== "ios") return [];
303
+ const appRoot = iosProjectPath === "." ? gitIgnoredNames(projectRoot, appRootNames(readdirSync$1(projectRoot))) : [];
304
+ return [...gitIgnoredNames(projectRoot, Object.keys(BUNDLE_OUTPUT_IGNORES), true), ...appRoot].toSorted();
305
+ }
306
+ /**
307
+ * With `ios.projectPath` '.', the top-level entries that git tracks here although an ignore pattern matches them, as
308
+ * the names a build worker must count: its mirror index is empty, so its own `check-ignore` skips them.
309
+ */
310
+ function trackedFingerprintPaths(projectRoot, { platform, iosProjectPath = "ios" }) {
311
+ if (platform !== "ios" || iosProjectPath !== ".") return [];
312
+ const names = appRootNames(readdirSync$1(projectRoot));
313
+ const ignored = gitIgnoredNames(projectRoot, names);
314
+ const matched = gitIgnoredNames(projectRoot, names, true);
315
+ return names.filter((name) => matched.has(name) && !ignored.has(name)).toSorted();
316
+ }
317
+ async function fingerprintOptions(projectRoot, { platform, iosProjectPath = "ios", androidLayout = null, ignoredPaths = [], trackedPaths = [] }) {
318
+ const ignoredHere = (names, noIndex = false) => /* @__PURE__ */ new Set([...gitIgnoredNames(projectRoot, names, noIndex), ...ignoredPaths.filter((path) => names.includes(path))]);
319
+ const ignoredAtAppRoot = (names) => new Set([...ignoredHere(names)].filter((name) => !trackedPaths.includes(name)));
278
320
  const platforms = platform && FINGERPRINT_PLATFORMS.has(platform) ? { platforms: [platform] } : void 0;
279
- const ios = platform === "ios" ? iosProjectFingerprintOptions(projectRoot, iosProjectPath) : androidLayout?.custom ? androidProjectFingerprintOptions(projectRoot, androidLayout) : {};
321
+ const ios = platform === "ios" ? iosProjectFingerprintOptions(projectRoot, iosProjectPath, { ignored: (_, names) => ignoredAtAppRoot(names) }) : androidLayout?.custom ? androidProjectFingerprintOptions(projectRoot, androidLayout) : {};
280
322
  if (ios.extraSources) ios.extraSources = [...(await loadConfigAsync(projectRoot, true))?.extraSources ?? [], ...ios.extraSources];
281
- const result = await createFingerprint(projectRoot, {
323
+ const bundleOutput = platform === "android" ? [] : [...ignoredHere(Object.keys(BUNDLE_OUTPUT_IGNORES), true)].map((path) => BUNDLE_OUTPUT_IGNORES[path]);
324
+ return {
282
325
  ...platforms,
283
- ...debug ? { debug } : {},
284
326
  ...ios.extraSources ? { extraSources: ios.extraSources } : {},
285
- ignorePaths: [...DEFAULT_FINGERPRINT_IGNORES, ...ios.ignorePaths ?? []],
327
+ ignorePaths: [
328
+ ...DEFAULT_FINGERPRINT_IGNORES,
329
+ ...bundleOutput,
330
+ ...ios.ignorePaths ?? []
331
+ ],
286
332
  silent: true
287
- });
333
+ };
334
+ }
335
+ async function fingerprintProject(projectRoot, { createFingerprint = expoFingerprint.createFingerprintAsync, debug = false, ...target } = {}) {
336
+ const options = await fingerprintOptions(projectRoot, target);
337
+ const result = await createFingerprint(projectRoot, debug ? {
338
+ ...options,
339
+ debug
340
+ } : options);
288
341
  const hash = result?.hash ?? null;
289
342
  if (!hash) return null;
290
343
  return {
@@ -292,6 +345,84 @@ async function fingerprintProject(projectRoot, { platform, iosProjectPath = "ios
292
345
  sources: Array.isArray(result?.sources) ? result.sources : []
293
346
  };
294
347
  }
348
+ /** The env files @expo/env loads for the config, in the mode @expo/fingerprint's config loader sets. */
349
+ function expoEnvFiles(env = {}) {
350
+ if (/^(1|true)$/i.test(env.EXPO_NO_DOTENV ?? "")) return [];
351
+ const mode = env.NODE_ENV || "development";
352
+ return [
353
+ `.env.${mode}.local`,
354
+ ...mode === "test" ? [] : [".env.local"],
355
+ `.env.${mode}`,
356
+ ".env"
357
+ ];
358
+ }
359
+ const inNodeModules = (path) => path.split("/").includes("node_modules");
360
+ /**
361
+ * Absolute paths of the files git ignores that a fingerprint with `sources` hashed or the Expo config loader read:
362
+ * the inputs a checkout of the tracked and untracked files lacks. Files under node_modules are left out, because a
363
+ * dependency install recreates them.
364
+ */
365
+ async function gitignoredFingerprintInputs(projectRoot, sources, target, { env, signal } = {}) {
366
+ const found = /* @__PURE__ */ new Set();
367
+ if (sources.some((source) => source.type === "contents" && source.id === "expoConfig")) {
368
+ for (const name of expoEnvFiles(env)) if (lstatSync$1(join$1(projectRoot, name), { throwIfNoEntry: false })?.isFile()) found.add(name);
369
+ }
370
+ const top = realpathSync$1(await gitAsync(projectRoot, ["rev-parse", "--show-toplevel"], { signal }));
371
+ const base = realpathSync$1(projectRoot);
372
+ const pathspecs = sources.flatMap((source) => {
373
+ if (source.type === "contents" || inNodeModules(source.filePath)) return [];
374
+ const inRepo = relative$1(top, resolve$1(base, source.filePath));
375
+ return isAbsolute$1(inRepo) || inRepo === ".." || inRepo.startsWith(`..${sep$1}`) ? [] : [posix$1.normalize(source.filePath)];
376
+ });
377
+ if (pathspecs.length) {
378
+ const { ignorePathMatchObjects, ignoreDirMatchObjects } = await normalizeOptionsAsync(projectRoot, await fingerprintOptions(projectRoot, target));
379
+ const addFile = (path) => {
380
+ if (!isIgnoredPathWithMatchObjects(path, ignorePathMatchObjects)) found.add(path);
381
+ };
382
+ const walk = async (dir) => {
383
+ if (isIgnoredPathWithMatchObjects(dir, ignoreDirMatchObjects)) return;
384
+ for (const entry of await readdir(join$1(projectRoot, dir), { withFileTypes: true })) {
385
+ signal?.throwIfAborted();
386
+ const path = posix$1.join(dir, entry.name);
387
+ if (entry.isDirectory()) {
388
+ if (entry.name !== "node_modules") await walk(path);
389
+ } else if (entry.isFile()) addFile(path);
390
+ }
391
+ };
392
+ const inSource = (path) => pathspecs.some((spec) => spec === "." || path === spec || path.startsWith(`${spec}/`));
393
+ const listed = await gitAsync(projectRoot, [
394
+ "--literal-pathspecs",
395
+ "ls-files",
396
+ "-z",
397
+ "--others",
398
+ "--ignored",
399
+ "--exclude-standard",
400
+ "--directory",
401
+ "--",
402
+ ...pathspecs
403
+ ], {
404
+ untrimmed: true,
405
+ timeoutMs: 12e4,
406
+ signal
407
+ });
408
+ for (const listedPath of listed.split("\0")) {
409
+ if (!listedPath || inNodeModules(listedPath)) continue;
410
+ const directory = listedPath.endsWith("/");
411
+ const path = directory ? listedPath.slice(0, -1) : listedPath;
412
+ if (inSource(path)) {
413
+ if (directory) await walk(path);
414
+ else addFile(path);
415
+ continue;
416
+ }
417
+ for (const spec of pathspecs.filter((each) => each.startsWith(`${path}/`))) {
418
+ const stat = lstatSync$1(join$1(projectRoot, spec), { throwIfNoEntry: false });
419
+ if (stat?.isDirectory()) await walk(spec);
420
+ else if (stat?.isFile()) addFile(spec);
421
+ }
422
+ }
423
+ }
424
+ return [...found].toSorted().map((path) => join$1(projectRoot, path));
425
+ }
295
426
  function registerOnce(root, registeredBy) {
296
427
  try {
297
428
  register({
@@ -498,13 +629,15 @@ function diffFingerprintSources({ previous, previousHash = null, current, differ
498
629
  } catch {}
499
630
  return compareSourceLists(previous, current.sources);
500
631
  }
501
- async function refingerprintAfterMutation({ projectRoot, platform, previousHash, iosProjectPath, androidLayout, fingerprint = fingerprintProject }) {
632
+ async function refingerprintAfterMutation({ projectRoot, platform, previousHash, iosProjectPath, androidLayout, ignoredPaths, trackedPaths, fingerprint = fingerprintProject }) {
502
633
  let computed = null;
503
634
  try {
504
635
  computed = await fingerprint(projectRoot, {
505
636
  platform,
506
637
  ...iosProjectPath ? { iosProjectPath } : {},
507
- ...androidLayout ? { androidLayout } : {}
638
+ ...androidLayout ? { androidLayout } : {},
639
+ ...ignoredPaths ? { ignoredPaths } : {},
640
+ ...trackedPaths ? { trackedPaths } : {}
508
641
  });
509
642
  } catch {
510
643
  return null;
@@ -599,4 +732,4 @@ function fingerprintDiffRecord({ changed, previousHash, hash }) {
599
732
  };
600
733
  }
601
734
  //#endregion
602
- export { compareAssetManifests as C, captureAssetManifest as S, storedAssetManifest as _, diffFingerprintSources as a, untrackedNativeFiles as b, fingerprintDiffRecord as c, prepareProviderDownloadDir as d, providerDownloadPath as f, storeBuild as g, resolveBuild as h, configInputsChanged as i, fingerprintProject as l, refingerprintAfterMutation as m, buildCacheKey as n, entryDir as o, providerUploadOutcome as p, changedDuringBuildLine as r, filesystemBuildCapability as s, artifactIn as t, inputsChangedDuringBuild as u, storedSources as v, readAssetManifest as w, assetDiffReason as x, untrackedMissLine as y };
735
+ export { trackedFingerprintPaths as C, captureAssetManifest as D, assetDiffReason as E, compareAssetManifests as O, storedSources as S, untrackedNativeFiles as T, providerUploadOutcome as _, configInputsChanged as a, storeBuild as b, expoConfigContents as c, fingerprintProject as d, gitignoredFingerprintInputs as f, providerDownloadPath as g, prepareProviderDownloadDir as h, compareSourceLists as i, readAssetManifest as k, filesystemBuildCapability as l, inputsChangedDuringBuild as m, buildCacheKey as n, diffFingerprintSources as o, ignoredFingerprintPaths as p, changedDuringBuildLine as r, entryDir as s, artifactIn as t, fingerprintDiffRecord as u, refingerprintAfterMutation as v, untrackedMissLine as w, storedAssetManifest as x, resolveBuild as y };
@@ -1,9 +1,9 @@
1
- import { y as trackReportResource } from "./exec-DEoAhcze.mjs";
2
- import { i as formatDuration, l as phaseLine, m as shortHash, u as plural } from "./command-output-Db8BqzxH.mjs";
3
- import { Ht as makeTemporaryDirectory, Wt as removeTemporaryEntryAsync } from "./settings-C7O8A6ZI.mjs";
4
- import { G as readStats, L as estimateBuild, Vn as easAuthNote } from "./budget-DnPX3DXj.mjs";
5
- import { o as entryDir, t as artifactIn } from "./build-cache-Dv7RN200.mjs";
6
- import { a as staleNativeDirRefusal, c as predictBuildMiss } from "./prebuild-BFm63bQ0.mjs";
1
+ import { T as trackReportResource } from "./exec-VFRpu1iA.mjs";
2
+ import { i as formatDuration, l as phaseLine, m as shortHash, u as plural } from "./command-output-DxC0k2rk.mjs";
3
+ import { Ht as makeTemporaryDirectory, Wt as removeTemporaryEntryAsync } from "./settings-RKwY33wv.mjs";
4
+ import { L as estimateBuild, Un as easAuthNote, q as readStats } from "./budget-dPGuhNai.mjs";
5
+ import { s as entryDir, t as artifactIn } from "./build-cache-HFUQ9eLz.mjs";
6
+ import { l as predictBuildMiss, o as staleNativeDirRefusal } from "./prebuild-DmVCf5xb.mjs";
7
7
  import chalk from "chalk";
8
8
  import { PROVIDER_LOAD_TIMEOUT_ENV, PROVIDER_LOAD_TIMEOUT_MS, buildResolveTimeoutMs, resolveTieredBuild, timeoutFromEnv } from "@stim-cli/cache";
9
9
  //#region src/commands/build-plan.ts
@@ -106,9 +106,10 @@ async function finishProviderDownload(pending, destinationDir, cleanupFailure) {
106
106
  }
107
107
  async function expoRemoteHit(lookup, deps) {
108
108
  if (!lookup.expoRemote) return null;
109
- const { root, platform, isExpo, fingerprint } = lookup;
109
+ const { root, platform, isExpo, fingerprint, sources } = lookup;
110
110
  const loaded = await deps.loadProjectProvider(root, {
111
111
  isExpo,
112
+ sources,
112
113
  context: deps.operation
113
114
  });
114
115
  if (loaded?.unavailable) {
@@ -1,4 +1,4 @@
1
- import { d as getConfigDir } from "./config-DlrsduwG.mjs";
1
+ import { d as getConfigDir } from "./config-BZhXY15H.mjs";
2
2
  import { cacheDirRefusal, readCacheManifest, updateCacheManifest } from "@stim-cli/core";
3
3
  import { join, resolve } from "path";
4
4
  import { existsSync } from "fs";
@@ -1,2 +1,2 @@
1
- import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-DSeQjt-Q.mjs";
1
+ import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-BPXRONJz.mjs";
2
2
  export { manifestPath, readManifest, register, registeredCaches, unregister };
@@ -1,10 +1,10 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { a as sharedCcache, m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
3
- import { _ as loadConfig } from "./config-DlrsduwG.mjs";
4
- import { l as phaseLine } from "./command-output-Db8BqzxH.mjs";
5
- import { m as defaultAndroidLayout } from "./settings-C7O8A6ZI.mjs";
6
- import { r as register } from "./cache-manifest-DSeQjt-Q.mjs";
7
- import { o as machineNumber } from "./budget-DnPX3DXj.mjs";
3
+ import { _ as loadConfig } from "./config-BZhXY15H.mjs";
4
+ import { l as phaseLine } from "./command-output-DxC0k2rk.mjs";
5
+ import { m as defaultAndroidLayout } from "./settings-RKwY33wv.mjs";
6
+ import { r as register } from "./cache-manifest-BPXRONJz.mjs";
7
+ import { o as machineNumber } from "./budget-dPGuhNai.mjs";
8
8
  import { readFileSync, realpathSync } from "node:fs";
9
9
  import { isAbsolute, join, relative } from "node:path";
10
10
  import chalk from "chalk";
@@ -1,4 +1,4 @@
1
- import { d as cancelledError, f as throwIfCancelled } from "./operation-exec-BW0em61G.mjs";
1
+ import { c as throwIfCancelled, s as cancelledError } from "./exec-VFRpu1iA.mjs";
2
2
  import { WebSocket } from "ws";
3
3
  //#region src/web/cdp.ts
4
4
  const COMMAND_TIMEOUT_MS = 15e3;
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { existsSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
@@ -1,27 +1,27 @@
1
- import { b as debugLog } from "./exec-DEoAhcze.mjs";
2
- import { y as refuseRelativeStimPaths } from "./config-DlrsduwG.mjs";
1
+ import { E as debugLog } from "./exec-VFRpu1iA.mjs";
2
+ import { y as refuseRelativeStimPaths } from "./config-BZhXY15H.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { runId } from "@stim-cli/core/state";
5
5
  import { Command } from "commander";
6
6
  //#region bin/cli.ts
7
7
  const commands = /* @__PURE__ */ new Map([
8
- ["doctor", () => import("./doctor-pxxvipYC.mjs")],
9
- ["worktree", () => import("./worktree-BxfVxG_b.mjs")],
10
- ["start", () => import("./start-CRfN1kWV.mjs")],
11
- ["ports", () => import("./ports-BSmQKzW7.mjs")],
12
- ["stop", () => import("./stop-B18d8KDw.mjs")],
13
- ["ios", () => import("./ios-vbUOqGXu.mjs")],
14
- ["android", () => import("./android-CHH4KLOR.mjs")],
15
- ["web", () => import("./web-Cduk0NSE.mjs")],
16
- ["macos", () => import("./macos-inNFbBWc.mjs")],
17
- ["reload", () => import("./reload-RBi1nj6Z.mjs")],
18
- ["device", () => import("./device-BvzPUBs3.mjs")],
19
- ["logs", () => import("./logs-CtNeNDuq.mjs")],
20
- ["settings", () => import("./settings-eKF_vJJs.mjs")],
21
- ["status", () => import("./status-Eqx_20WC.mjs")],
22
- ["stats", () => import("./stats-DioA6cBU.mjs")],
23
- ["gc", () => import("./gc-DLbzvTP2.mjs")],
24
- ["guide", () => import("./guide-BC37GcDG.mjs")]
8
+ ["doctor", () => import("./doctor-BZ6oxNum.mjs")],
9
+ ["worktree", () => import("./worktree-DEDUzO_L.mjs")],
10
+ ["start", () => import("./start-Bmg_qmHi.mjs")],
11
+ ["ports", () => import("./ports-D-E_OiAO.mjs")],
12
+ ["stop", () => import("./stop-BFu7X_Do.mjs")],
13
+ ["ios", () => import("./ios-BItP6lkn.mjs")],
14
+ ["android", () => import("./android-DcztblCT.mjs")],
15
+ ["web", () => import("./web-BdOFlTJr.mjs")],
16
+ ["macos", () => import("./macos-B3BveDrU.mjs")],
17
+ ["reload", () => import("./reload-Ck9RJeSq.mjs")],
18
+ ["device", () => import("./device-4RUugw5X.mjs")],
19
+ ["logs", () => import("./logs-ovlU7m7N.mjs")],
20
+ ["settings", () => import("./settings-kkt0vP4w.mjs")],
21
+ ["status", () => import("./status-Pw-807f0.mjs")],
22
+ ["stats", () => import("./stats-B-ckuiUg.mjs")],
23
+ ["gc", () => import("./gc-DDWEAj0w.mjs")],
24
+ ["guide", () => import("./guide-Bggftwc5.mjs")]
25
25
  ]);
26
26
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
27
27
  const program = new Command();
@@ -52,7 +52,7 @@ try {
52
52
  }));
53
53
  }
54
54
  try {
55
- const { triggerMaintenance } = await import("./trigger-yb_nFzPF.mjs");
55
+ const { triggerMaintenance } = await import("./trigger-BLsHgAGR.mjs");
56
56
  triggerMaintenance(action.name());
57
57
  } catch {}
58
58
  });
package/dist/cli.mjs CHANGED
@@ -4,6 +4,6 @@ const encode = (version) => version.split(".", 3).reduce((sum, part) => sum * 1e
4
4
  if (encode(process.versions.node) < encode("22.12.0")) {
5
5
  process.stderr.write(`STIM_NODE_UNSUPPORTED: Stim needs Node 22.12.0 or later; this is Node ${process.versions.node} at ${process.execPath}. To run Stim where a project pins an older Node, see https://stim.appandflow.com/docs/requirements#older-node-pins\n`);
6
6
  process.exitCode = 1;
7
- } else import("./cli-D-J9fWGV.mjs");
7
+ } else import("./cli-xqAidP7O.mjs");
8
8
  //#endregion
9
9
  export {};