stim 1.23.1 → 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-BzYRDgaP.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
  3. package/dist/{act-vxiMwdf5.mjs → act-Cyvm8xYc.mjs} +40 -25
  4. package/dist/{activity-BpWUPgUm.mjs → activity-Dq3ZcdD8.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
  6. package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
  7. package/dist/{android-DtfRGLcc.mjs → android-BZppyPe_.mjs} +66 -46
  8. package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
  9. package/dist/{android-CLi6DSiS.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 +21 -4
  13. package/dist/api.mjs +32 -31
  14. package/dist/{artifact-Xvgibgzq.mjs → artifact-BR5VNArK.mjs} +17 -16
  15. package/dist/{artifact-DBI3DALs.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-BJN9ZHxB.mjs → browser-web-ycg9qWB8.mjs} +16 -17
  18. package/dist/{budget-3ivAK99e.mjs → budget-dPGuhNai.mjs} +101 -40
  19. package/dist/{build-Dv9s8Fz-.mjs → build-CaF574eS.mjs} +31 -28
  20. package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
  21. package/dist/{build-plan-BmbdHQbr.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-CH2EWGPB.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-BkK6Wr5i.mjs → cli-xqAidP7O.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/{client-B4MMzfo_.mjs → client-18-ZowoT.mjs} +254 -28
  30. package/dist/collector-run.mjs +6 -6
  31. package/dist/{command-output-YKGWivpG.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-BFxiDpkf.mjs → dev-client-w_fok0Ek.mjs} +3 -3
  37. package/dist/{device-B7ljwccX.mjs → device-4RUugw5X.mjs} +16 -16
  38. package/dist/{device-CiNYxqp6.mjs → device-BktRGdjS.mjs} +40 -44
  39. package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
  40. package/dist/device-host-worker.mjs +17 -17
  41. package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DzpSlZyd.mjs} +23 -52
  42. package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
  43. package/dist/{device-pool-B4iOXIrD.mjs → device-pool-CgBHk401.mjs} +3 -3
  44. package/dist/{doctor-DRu-8ld6.mjs → doctor-BZ6oxNum.mjs} +1 -1
  45. package/dist/{doctor-HUC1igzw.mjs → doctor-C33AzVfR.mjs} +28 -28
  46. package/dist/{doctor-C6t4Maue.mjs → doctor-DZgpqR6J.mjs} +14 -14
  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-iGBpC6KM.mjs → doctor-watchman-B453A231.mjs} +5 -5
  50. package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CxKUNHsb.mjs} +4 -4
  51. package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
  52. package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
  53. package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
  54. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  55. package/dist/{gc-dDE4QPVu.mjs → gc-DDWEAj0w.mjs} +2 -2
  56. package/dist/{gc-BW8E1uSC.mjs → gc-yVKpAOKM.mjs} +205 -28
  57. package/dist/{guide-DYYEO3Wz.mjs → guide-Bggftwc5.mjs} +222 -59
  58. package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-D4dweBof.mjs} +4 -4
  59. package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
  60. package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
  61. package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
  62. package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
  63. package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-Doxbfzem.mjs} +58 -11
  64. package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
  65. package/dist/{ios-CWjqfSm_.mjs → ios-B1FXRCMX.mjs} +71 -44
  66. package/dist/{ios-DTOYZGMJ.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-DFGuwF4U.mjs → ios-device-BI38NFFH.mjs} +3 -3
  71. package/dist/{ios-project-CSZYI1iu.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-BSBHldmm.mjs → js-swap-BvrQvXHY.mjs} +7 -6
  75. package/dist/{launch-CP2wDCVd.mjs → launch-BVlyQw3T.mjs} +51 -49
  76. package/dist/{launch-D-zq8SHG.mjs → launch-SfzGH_s9.mjs} +48 -29
  77. package/dist/{logs-pNvA2hHK.mjs → logs-DXE32kyb.mjs} +16 -9
  78. package/dist/{logs-By5aw3g9.mjs → logs-ovlU7m7N.mjs} +8 -6
  79. package/dist/{macos-CPMahOC2.mjs → macos-B3BveDrU.mjs} +1 -1
  80. package/dist/{macos-C67FZ2ft.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-_MWSs3PP.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-Dv88i0aU.mjs → native-run-BmH7U8pr.mjs} +6 -6
  89. package/dist/{native-runtime-DBRfY_PN.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-CqViUh3r.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
  92. package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
  93. package/dist/offload-worker.d.mts +7 -2
  94. package/dist/offload-worker.mjs +75 -41
  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-cr0fEU7b.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
  101. package/dist/{ports-DpXjKkSV.mjs → ports-D-E_OiAO.mjs} +3 -3
  102. package/dist/{prebuild-BligW0QS.mjs → prebuild-DmVCf5xb.mjs} +14 -9
  103. package/dist/{project-DhCtQWWU.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-ZlhQfhvq.mjs → react-native-android-DOinxgwB.mjs} +75 -32
  107. package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
  108. package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
  109. package/dist/{react-native-ios-C5W0SA6f.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-COJWTbae.mjs → reload-C1TTVesC.mjs} +144 -42
  113. package/dist/{reload-QcwnYLYV.mjs → reload-Ck9RJeSq.mjs} +1 -1
  114. package/dist/{remote-DR8qUERM.mjs → remote-DEZ7AOVq.mjs} +7 -7
  115. package/dist/{result-utnBea7x.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-B9o92sLM.mjs → server-command-C0pmjNdG.mjs} +5 -5
  120. package/dist/server-expo-CEntXzRw.mjs +2 -0
  121. package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Tt_hLRpy.mjs} +8 -5
  122. package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
  123. package/dist/{settings-PfJx8uK1.mjs → settings-kkt0vP4w.mjs} +1 -1
  124. package/dist/{settings-write-Chuy7Cte.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-B7AuoWJv.mjs → slot-launch-A1BgotaM.mjs} +6 -6
  128. package/dist/{stage-C4u17aES.mjs → stage-ERTMh88n.mjs} +2 -3
  129. package/dist/{start-CU8mCPC7.mjs → start-BKGrEhzG.mjs} +75 -35
  130. package/dist/{start-BL_BsiWt.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-CO6sK0Nh.mjs → stats-B-ckuiUg.mjs} +5 -5
  134. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  135. package/dist/{status-_WPHzVft.mjs → status-DfFp6a76.mjs} +24 -24
  136. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  137. package/dist/{status-CrJutl6-.mjs → status-Pw-807f0.mjs} +1 -1
  138. package/dist/{status-watch-BHFasOZN.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-iuFHjUST.mjs → stop-BFu7X_Do.mjs} +2 -2
  143. package/dist/{stop-BJ06ipTZ.mjs → stop-CL1kDHds.mjs} +55 -21
  144. package/dist/{stop-CR5689oB.mjs → stop-DhclRwOO.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +16 -16
  146. package/dist/{support-TWuQlHQo.mjs → support-B1W-hmC2.mjs} +8 -8
  147. package/dist/{support-CbXPbUMJ.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-DbwGCpZg.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
  150. package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-BjgKdoEf.mjs} +1 -1
  151. package/dist/{toolchain-B9hCFCQw.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-DRF_oFXk.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-e41xsjKr.mjs → workspaces-CSV2Orf4.mjs} +36 -32
  162. package/dist/{worktree-BEwxVwKF.mjs → worktree-DEDUzO_L.mjs} +1 -1
  163. package/dist/{worktree-B4Nj3EGS.mjs → worktree-Dw8kfacb.mjs} +324 -99
  164. package/dist/{xcode-Rq744mBF.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-Ddr8cG_c.mjs +0 -2
  168. package/dist/trigger-yb_nFzPF.mjs +0 -2
  169. package/dist/web-kDE9Myoy.mjs +0 -2
@@ -1,40 +1,50 @@
1
- import { c as declareSpawnsOn, d as spawnDeclared, f as stopDeclaringSpawnsOn, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, _ as spawnDeclared, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn } from "./exec-VFRpu1iA.mjs";
2
2
  import { u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
3
3
  import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { a as formatElapsed, l as phaseLine } from "./command-output-YKGWivpG.mjs";
5
- import { a as killOnAbort } from "./operation-exec-BW0em61G.mjs";
6
- import { d as runCancellationSignal, h as shareCompilationCache } from "./native-run-Dv88i0aU.mjs";
4
+ import { a as formatElapsed, l as phaseLine } from "./command-output-DxC0k2rk.mjs";
5
+ import { a as killOnAbort } from "./operation-exec-CUZifp6Z.mjs";
6
+ import { d as runCancellationSignal, h as shareCompilationCache } from "./native-run-BmH7U8pr.mjs";
7
7
  import { p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
8
- import { t as cleanLine } from "./server-expo-BXrWxNYh.mjs";
8
+ import { t as cleanLine } from "./server-expo-Tt_hLRpy.mjs";
9
9
  import { createHash } from "node:crypto";
10
10
  import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
11
- import { basename, isAbsolute, join, relative, resolve, sep } from "node:path";
11
+ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
12
12
  import { ambientContext } from "@stim-cli/core";
13
13
  //#region src/engine/bundler.ts
14
- const COCOAPODS_SPEC = /^ {4}cocoapods \(/m;
15
- function bundlerPin(root) {
16
- const gemfile = join(root, "Gemfile");
17
- const lockfile = join(root, "Gemfile.lock");
18
- if (!existsSync(gemfile)) return null;
14
+ const COCOAPODS_SPEC = /^ {4}cocoapods \(([^)\s]+)/m;
15
+ /**
16
+ * The Bundler pin `pod install` in `directory` runs under: the nearest Gemfile from `directory` up to `root`, as
17
+ * Bundler finds it, when its Gemfile.lock resolves cocoapods.
18
+ */
19
+ function bundlerPin(root, directory = root) {
20
+ for (let dir = directory;; dir = dirname(dir)) {
21
+ const gemfile = join(dir, "Gemfile");
22
+ if (existsSync(gemfile)) return lockedCocoapods(gemfile, join(dir, "Gemfile.lock"));
23
+ const up = relative(root, dir);
24
+ if (!up || up.startsWith("..") || dirname(dir) === dir) return null;
25
+ }
26
+ }
27
+ function lockedCocoapods(gemfile, lockfile) {
19
28
  let lock;
20
29
  try {
21
30
  lock = readFileSync(lockfile, "utf-8");
22
31
  } catch {
23
32
  return null;
24
33
  }
25
- if (!COCOAPODS_SPEC.test(lock)) return null;
26
- return {
34
+ const cocoapods = COCOAPODS_SPEC.exec(lock)?.[1];
35
+ return cocoapods ? {
27
36
  gemfile,
28
- lockfile
29
- };
37
+ lockfile,
38
+ cocoapods
39
+ } : null;
30
40
  }
31
- function podInstallCommand(root, ...args) {
41
+ function podInstallCommand(root, directory, ...args) {
32
42
  const pod = [
33
43
  "pod",
34
44
  "install",
35
45
  ...args
36
46
  ].join(" ");
37
- return bundlerPin(root) ? `bundle exec ${pod}` : pod;
47
+ return bundlerPin(root, directory) ? `bundle exec ${pod}` : pod;
38
48
  }
39
49
  const BUILD_FAILED = "** BUILD FAILED **";
40
50
  const POSITIONED = /^(\S[^\t]*?):(\d+):(?:(\d+):)?\s*(?:fatal\s+)?error:\s+(.+)$/;
@@ -60,9 +70,9 @@ const CAS_CORRUPT = /not a IncludeTreeRoot node kind/;
60
70
  const COMPILATION_CACHE_CORRUPTION = /OnDiskCAS: corrupt internal reference|CAS operation failed|not a IncludeTreeRoot node kind/;
61
71
  const DEVICE_SIGNING_REMEDY = "Set a team for the target's configuration in Xcode > Signing & Capabilities, then run `stim device provision ios`, which lists the Apple Developer account changes and asks before making them (agents run it only with the user's go-ahead), or build once from Xcode to install the profile. Builds never pass -allowProvisioningUpdates, because registering a device or minting a profile changes your Apple Developer account.";
62
72
  const SIMULATOR_SIGNING_REMEDY = "Stim builds for the simulator here, which needs no signing. Check CODE_SIGNING_REQUIRED / DEVELOPMENT_TEAM in the target's configuration, or build for a phone with `stim ios --device`.";
63
- function remedyFor(message, root, sdk) {
73
+ function remedyFor(message, pods, sdk) {
64
74
  if (CAS_CORRUPT.test(message)) return "The compilation cache holds a damaged object. Run `stim gc --delete --cache \"compilation cache\"` to empty that cache, then build again. The next build is a cold one.";
65
- if (PODS_OUT_OF_SYNC.test(message)) return `Run \`${root ? podInstallCommand(root) : "pod install"}\` in ios/ (stim ios does this when Podfile.lock and Pods/Manifest.lock disagree), then build again.`;
75
+ if (PODS_OUT_OF_SYNC.test(message)) return `Run \`${pods ? podInstallCommand(pods.root, pods.directory) : "pod install"}\` in ios/ (stim ios does this when Podfile.lock and Pods/Manifest.lock disagree), then build again.`;
66
76
  if (NO_SUCH_SCHEME.test(message)) return "Run `xcodebuild -list` in ios/ to see the schemes this project defines, and share the app scheme so it is visible to the build.";
67
77
  for (const pattern of SIGNING) if (pattern.test(message)) return sdk.startsWith("iphoneos") ? DEVICE_SIGNING_REMEDY : SIMULATOR_SIGNING_REMEDY;
68
78
  return null;
@@ -74,21 +84,25 @@ function fileFromPrefix(prefix) {
74
84
  if (!head.includes("/")) return null;
75
85
  return head;
76
86
  }
77
- function makeDiagnostic({ file = null, line = null, column = null, message }, root, sdk) {
87
+ function makeDiagnostic({ file = null, line = null, column = null, message }, pods, sdk) {
78
88
  const text = String(message).trim();
79
89
  const out = { message: text };
80
90
  if (file) out.file = file;
81
91
  if (line !== null && line !== void 0) out.line = line;
82
92
  if (column !== null && column !== void 0) out.column = column;
83
93
  out.message = text;
84
- const remedy = remedyFor(text, root, sdk);
94
+ const remedy = remedyFor(text, pods, sdk);
85
95
  if (remedy) out.remedy = remedy;
86
96
  return out;
87
97
  }
88
98
  function dedupeKey(d) {
89
99
  return `${d.file || ""}|${d.line || ""}|${d.column || ""}|${d.message}`;
90
100
  }
91
- function createXcodeDiagnosticCollector(root = null, sdk = "iphonesimulator") {
101
+ function createXcodeDiagnosticCollector(root = null, sdk = "iphonesimulator", podDirectory = root) {
102
+ const pods = root ? {
103
+ root,
104
+ directory: podDirectory ?? root
105
+ } : null;
92
106
  const out = [];
93
107
  const seen = /* @__PURE__ */ new Set();
94
108
  let finished = false;
@@ -106,7 +120,7 @@ function createXcodeDiagnosticCollector(root = null, sdk = "iphonesimulator") {
106
120
  const sym = UNDEFINED_SYMBOL.exec(raw);
107
121
  if (sym) {
108
122
  const symbol = sym[1];
109
- if (symbol !== void 0) add(makeDiagnostic({ message: undefinedSymbolMessage(symbol) }, root, sdk));
123
+ if (symbol !== void 0) add(makeDiagnostic({ message: undefinedSymbolMessage(symbol) }, pods, sdk));
110
124
  return;
111
125
  }
112
126
  if (/^\s+\S/.test(line) && !/^\S/.test(line)) return;
@@ -122,7 +136,7 @@ function createXcodeDiagnosticCollector(root = null, sdk = "iphonesimulator") {
122
136
  }
123
137
  const ld = LD_ERROR.exec(raw);
124
138
  if (ld) {
125
- add(makeDiagnostic({ message: `ld: ${ld[1]}` }, root, sdk));
139
+ add(makeDiagnostic({ message: `ld: ${ld[1]}` }, pods, sdk));
126
140
  return;
127
141
  }
128
142
  const positioned = POSITIONED.exec(raw);
@@ -134,7 +148,7 @@ function createXcodeDiagnosticCollector(root = null, sdk = "iphonesimulator") {
134
148
  line: Number(positioned[2]),
135
149
  column: positioned[3] === void 0 ? null : Number(positioned[3]),
136
150
  message: posMsg
137
- }, root, sdk));
151
+ }, pods, sdk));
138
152
  return;
139
153
  }
140
154
  const plain = UNPOSITIONED.exec(raw);
@@ -144,7 +158,7 @@ function createXcodeDiagnosticCollector(root = null, sdk = "iphonesimulator") {
144
158
  add(makeDiagnostic({
145
159
  file: fileFromPrefix(plain[1] || ""),
146
160
  message: plainMsg
147
- }, root, sdk));
161
+ }, pods, sdk));
148
162
  }
149
163
  };
150
164
  return {
@@ -636,7 +650,7 @@ async function buildXcode({ context = ambientContext(), root, udid = null, logWr
636
650
  msg: `xcodebuild ${args.join(" ")}`,
637
651
  event: "build_start"
638
652
  });
639
- const diagnosticCollector = createXcodeDiagnosticCollector(root, sdk);
653
+ const diagnosticCollector = createXcodeDiagnosticCollector(root, sdk, resolvedTarget.dir || root);
640
654
  const tail = [];
641
655
  let transcriptLines = 0;
642
656
  let compilationCacheActivity = COMPILATION_CACHE_UNAVAILABLE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stim",
3
- "version": "1.23.1",
3
+ "version": "1.24.0",
4
4
  "description": "Stim: fast, isolated React Native environments for coding agents",
5
5
  "keywords": [
6
6
  "agent",
@@ -53,11 +53,11 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@expo/fingerprint": "^0.20.10",
56
- "@stim-cli/agent-driver": "^1.23.1",
57
- "@stim-cli/agent-driver-agent-device": "^1.23.1",
58
- "@stim-cli/cache": "^1.23.1",
59
- "@stim-cli/core": "^1.23.1",
60
- "@stim-cli/metro": "^1.23.1",
56
+ "@stim-cli/agent-driver": "^1.24.0",
57
+ "@stim-cli/agent-driver-agent-device": "^1.24.0",
58
+ "@stim-cli/cache": "^1.24.0",
59
+ "@stim-cli/core": "^1.24.0",
60
+ "@stim-cli/metro": "^1.24.0",
61
61
  "@xmldom/xmldom": "0.9.12",
62
62
  "chalk": "^6.0.0",
63
63
  "commander": "^15.0.0",
@@ -66,7 +66,7 @@
66
66
  "ws": "^8.21.3"
67
67
  },
68
68
  "devDependencies": {
69
- "@stim-cli/expo-build-cache": "1.23.1",
69
+ "@stim-cli/expo-build-cache": "1.24.0",
70
70
  "@types/cross-spawn": "^6.0.6",
71
71
  "@types/which": "^3.0.4",
72
72
  "@types/ws": "^8.18.1",
@@ -1,211 +0,0 @@
1
- import { s as gitAsync } from "./operation-exec-BW0em61G.mjs";
2
- import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
3
- import { a as sourceManifest, i as nativeTransferManifest, r as nativeFileDigest } from "./native-source-Y0yLhFyQ.mjs";
4
- import { createHash } from "node:crypto";
5
- import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
6
- import { access, lstat, readFile, readlink, realpath } from "node:fs/promises";
7
- //#region src/integrations/native-gradle-inputs.ts
8
- function containedPath(path) {
9
- return typeof path === "string" && path.length > 0 && !path.includes("\\") && !path.includes(":") && !path.includes("\0") && !path.split("/").some((part) => !part || part === "." || part === ".." || part.toLowerCase() === ".git");
10
- }
11
- function gradleOffloadInputs(value) {
12
- const input = value;
13
- if (!input || typeof input !== "object" || input.complete !== true || Object.keys(input).some((key) => ![
14
- "complete",
15
- "ignored",
16
- "outputs"
17
- ].includes(key)) || !Array.isArray(input.ignored) || !input.ignored.every(containedPath) || !Array.isArray(input.outputs) || !input.outputs.every(containedPath)) throw new Error("Native Gradle offload requires android.offloadInputs with complete: true, ignored: [exact repository-relative files], and outputs: [generated repository-relative directories].");
18
- const ignored = [...new Set(input.ignored)].toSorted();
19
- const outputs = [...new Set(input.outputs)].toSorted();
20
- if (ignored.some((path) => path.split("/").at(-1) === "local.properties")) throw new Error("local.properties is machine-local; remove it from android.offloadInputs.ignored.");
21
- if (outputs.some((path) => path.split("/").some((part) => part === ".gradle" || part === ".kotlin"))) throw new Error("Gradle project state is worker-owned and cannot be declared as a generated output.");
22
- for (const output of outputs) if (outputs.some((other) => other !== output && output.startsWith(`${other}/`))) throw new Error(`Generated output ${output} is nested inside another output declaration.`);
23
- return {
24
- complete: true,
25
- ignored,
26
- outputs
27
- };
28
- }
29
- const below = (path, directory) => path === directory || path.startsWith(`${directory}/`);
30
- function gradleStateDirectories(project) {
31
- return [".gradle", ".kotlin"].map((name) => project ? `${project}/${name}` : name);
32
- }
33
- async function statIfPresent(path) {
34
- try {
35
- return await lstat(path);
36
- } catch (error) {
37
- if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
38
- throw error;
39
- }
40
- }
41
- async function requireRealParents(repository, path, signal) {
42
- const parts = path.split("/");
43
- for (let index = 1; index < parts.length; index++) {
44
- signal?.throwIfAborted();
45
- const stat = await statIfPresent(join(repository, ...parts.slice(0, index)));
46
- if (stat && !stat.isDirectory()) throw new Error(`Native input ${path} has a non-directory parent.`);
47
- }
48
- }
49
- async function nativeGradleTransfer(root, value, signal) {
50
- return nativeGradleInventory(root, value, [], signal, true);
51
- }
52
- async function nativeGradleLocalSourceDigest(root, value, localFiles, signal) {
53
- const { project, digest } = await nativeGradleInventory(root, value, localFiles, signal, false);
54
- return createHash("sha256").update(JSON.stringify({
55
- project,
56
- digest
57
- })).digest("hex");
58
- }
59
- async function nativeGradleInventory(root, value, localFiles, signal, transfer) {
60
- signal?.throwIfAborted();
61
- const declaration = gradleOffloadInputs(value);
62
- const repository = await realpath(await gitAsync(root, ["rev-parse", "--show-toplevel"], { signal }));
63
- const realRoot = await realpath(root);
64
- const project = relative(repository, realRoot).split(sep).join("/");
65
- const local = localFiles.map((path) => resolve(realRoot, relative(root, path)));
66
- if (project && !containedPath(project)) throw new Error("The native Gradle project leaves its repository.");
67
- if (transfer && (await statIfPresent(join(repository, project, "buildSrc")))?.isDirectory()) throw new Error("Native Gradle offload does not support buildSrc: AGP does not report its build directories, so the worker cannot keep them.");
68
- const state = gradleStateDirectories(project);
69
- const files = new Map((await sourceManifest(repository, true, signal)).map((file) => [file.path, file]));
70
- for (const path of declaration.ignored) {
71
- await requireRealParents(repository, path, signal);
72
- const absolute = join(repository, path);
73
- const stat = await lstat(absolute);
74
- if (!stat.isFile() && !stat.isSymbolicLink()) throw new Error(`Ignored native input ${path} must be an exact file or link, not a directory.`);
75
- if (stat.isSymbolicLink()) {
76
- const content = Buffer.from(await readlink(absolute));
77
- files.set(path, {
78
- path,
79
- kind: "link",
80
- size: content.length,
81
- sha256: createHash("sha256").update(content).digest("hex")
82
- });
83
- } else files.set(path, {
84
- path,
85
- kind: stat.mode & 73 ? "exec" : "file",
86
- ...await nativeFileDigest(absolute, signal)
87
- });
88
- }
89
- for (const file of files.values()) {
90
- if (local.includes(resolve(repository, file.path))) {
91
- files.delete(file.path);
92
- continue;
93
- }
94
- if (!containedPath(file.path)) throw new Error(`Native input ${file.path} is not a contained relative path.`);
95
- await requireRealParents(repository, file.path, signal);
96
- if (state.some((path) => below(file.path, path))) throw new Error("Gradle project state cannot be transferred as source.");
97
- if (declaration.outputs.some((output) => below(file.path, output) || below(output, file.path))) throw new Error(`Native input ${file.path} overlaps a declared generated output.`);
98
- if (file.path.split("/").at(-1) === "local.properties") {
99
- if (file.kind === "link") throw new Error(`Native input ${file.path} is a machine-local properties link.`);
100
- if ((await readFile(join(repository, file.path), {
101
- encoding: "utf8",
102
- signal
103
- })).split(/\r?\n/).some((line) => line.trim() && !/^\s*[#!]/.test(line) && !/^\s*sdk\.dir\s*[:=].*[^\\]$/.test(line))) throw new Error(`Native input ${file.path} contains unsupported machine-local properties.`);
104
- files.delete(file.path);
105
- continue;
106
- }
107
- }
108
- for (const file of files.values()) if (file.kind === "link") {
109
- const absolute = join(repository, file.path);
110
- const target = await readlink(absolute);
111
- const resolved = await realpath(resolve(dirname(absolute), target));
112
- const destination = relative(repository, resolved).split(sep).join("/");
113
- if (isAbsolute(target) || !containedPath(destination) || !files.has(destination)) throw new Error(`Native input ${file.path} links to a target outside the declared source inventory.`);
114
- }
115
- for (const output of declaration.outputs) {
116
- await requireRealParents(repository, output, signal);
117
- const stat = await statIfPresent(join(repository, output));
118
- if (stat && !stat.isDirectory()) throw new Error(`Generated output ${output} is not a real directory.`);
119
- if (state.some((path) => below(output, path) || below(path, output))) throw new Error(`Generated output ${output} overlaps Gradle project state.`);
120
- }
121
- const empty = createHash("sha256").update("").digest("hex");
122
- for (const path of files.keys()) {
123
- const parts = path.split("/");
124
- for (let index = 1; index < parts.length; index++) {
125
- const directory = parts.slice(0, index).join("/");
126
- files.set(directory, {
127
- path: directory,
128
- kind: "directory",
129
- size: 0,
130
- sha256: empty
131
- });
132
- }
133
- }
134
- const selected = [...files.values()].toSorted((a, b) => a.path.localeCompare(b.path));
135
- return {
136
- repository,
137
- project,
138
- declaration,
139
- files: selected,
140
- digest: manifestDigest(selected)
141
- };
142
- }
143
- async function canonicalParent(path) {
144
- const missing = [];
145
- while (!await access(path).then(() => true, () => false) && dirname(path) !== path) {
146
- missing.unshift(basename(path));
147
- path = dirname(path);
148
- }
149
- return join(await realpath(path), ...missing);
150
- }
151
- async function nativeGradleOutputs(repository, declaration, reported, signal) {
152
- signal?.throwIfAborted();
153
- if (!Array.isArray(reported) || !reported.every((path) => typeof path === "string" && isAbsolute(path))) throw new Error("AGP did not report the configured native Gradle build directories.");
154
- const real = await realpath(repository);
155
- const reportedPaths = /* @__PURE__ */ new Set();
156
- for (const absolute of reported) {
157
- const resolved = resolve(absolute);
158
- const canonical = join(await canonicalParent(dirname(resolved)), basename(resolved));
159
- const path = relative(real, canonical).split(sep).join("/");
160
- if (!containedPath(path)) throw new Error("A Gradle build directory leaves the transferred repository.");
161
- await requireRealParents(repository, path, signal);
162
- const stat = await statIfPresent(join(repository, path));
163
- if (stat && !stat.isDirectory()) throw new Error(`Gradle build directory ${path} is not a real directory.`);
164
- reportedPaths.add(path);
165
- }
166
- for (const output of declaration.outputs) if (!reportedPaths.has(output)) throw new Error(`Declared output ${output} was not reported by AGP.`);
167
- for (const path of reportedPaths) if ((await statIfPresent(join(repository, path)))?.isDirectory() && !declaration.outputs.some((output) => below(path, output))) throw new Error(`Gradle build directory ${path} is not declared; add it to android.offloadInputs.outputs.`);
168
- const outputs = [];
169
- for (const path of declaration.outputs) {
170
- signal?.throwIfAborted();
171
- if ((await statIfPresent(join(repository, path)))?.isDirectory()) outputs.push(path);
172
- }
173
- return outputs;
174
- }
175
- function validateGradleManifest(project, declaration, files) {
176
- gradleOffloadInputs(declaration);
177
- if (project && !containedPath(project)) throw new Error("The native Gradle project leaves its repository.");
178
- const excluded = [...declaration.outputs, ...gradleStateDirectories(project)];
179
- for (const file of files) if (!containedPath(file.path) || excluded.some((path) => below(file.path, path) || file.kind !== "directory" && below(path, file.path))) throw new Error(`Native source ${file.path} overlaps worker outputs or leaves the repository.`);
180
- for (const path of declaration.ignored) if (!files.some((file) => file.path === path && file.kind !== "directory")) throw new Error(`Declared ignored input ${path} is missing from the transfer.`);
181
- }
182
- async function verifyGradleTransfer(repository, project, declaration, files, digest, signal) {
183
- signal?.throwIfAborted();
184
- validateGradleManifest(project, declaration, files);
185
- const excluded = [...declaration.outputs, ...gradleStateDirectories(project)];
186
- for (const path of excluded) {
187
- await requireRealParents(repository, path, signal);
188
- const stat = await statIfPresent(join(repository, path));
189
- if (stat && !stat.isDirectory()) throw new Error(`Worker output ${path} is not a real directory.`);
190
- }
191
- const markers = excluded.flatMap((path) => path.split("/").slice(0, -1).map((_, index) => join(repository, ...path.split("/").slice(0, index + 1))));
192
- const snapshot = await fingerprintNativeInputs([{
193
- name: "repository",
194
- path: repository
195
- }], {
196
- excluded: [join(repository, ".git"), ...excluded.map((path) => join(repository, path))],
197
- ignoredDirectoryMarkers: markers.filter((path) => !files.some((file) => join(repository, file.path) === path)),
198
- parameters: null,
199
- signal
200
- });
201
- const known = new Set(files.map((file) => file.path));
202
- for (const entry of snapshot.entries) {
203
- if (!entry.path.startsWith("repository/") || entry.path.includes("/@target")) continue;
204
- const parts = entry.path.slice(11).split("/");
205
- const index = parts.findIndex((_, depth) => !known.has(parts.slice(0, depth + 1).join("/")));
206
- if (index >= 0 && (index < parts.length - 1 || entry.kind === "directory")) throw new Error(`Native Gradle directory ${parts.slice(0, index + 1).join("/")} is outside the source transfer and not a declared output reported by AGP; such directories, for example, included builds or externalNativeBuild staging, are not supported for remote builds.`);
207
- }
208
- return manifestDigest(await nativeTransferManifest(repository, snapshot, files, signal)) === digest;
209
- }
210
- //#endregion
211
- export { nativeGradleTransfer as a, nativeGradleOutputs as i, gradleStateDirectories as n, validateGradleManifest as o, nativeGradleLocalSourceDigest as r, verifyGradleTransfer as s, gradleOffloadInputs as t };
@@ -1,2 +0,0 @@
1
- import { p as startExpoServer } from "./server-expo-BXrWxNYh.mjs";
2
- export { startExpoServer };
@@ -1,2 +0,0 @@
1
- import { t as triggerMaintenance } from "./trigger-Cbyc41d_.mjs";
2
- export { triggerMaintenance };
@@ -1,2 +0,0 @@
1
- import { n as webCommand, t as runWeb } from "./web-DRF_oFXk.mjs";
2
- export { webCommand as default, runWeb };