stim 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +60 -7
  2. package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-Co2k4f7O.mjs} +21 -3
  3. package/dist/{act-DHAw2A2S.mjs → act-DsuqEkiM.mjs} +298 -164
  4. package/dist/{activity-BzVfHSrY.mjs → activity-CMLmzp7o.mjs} +33 -12
  5. package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-DUFaTMdd.mjs} +7 -7
  6. package/dist/{android-BLgbNqox.mjs → android-ByRMUoiJ.mjs} +66 -52
  7. package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
  8. package/dist/{android-CV_GCELZ.mjs → android-DGkNqa_c.mjs} +5 -5
  9. package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
  12. package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
  13. package/dist/api.d.mts +132 -118
  14. package/dist/api.mjs +239 -42
  15. package/dist/{artifact-B8T3S5gi.mjs → artifact-8EY8SAPw.mjs} +40 -35
  16. package/dist/{artifact-DAuZ-FNU.mjs → artifact-DJPy518Y.mjs} +69 -40
  17. package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
  18. package/dist/{browser-web-QQzVjz3O.mjs → browser-web-Bcv99PBM.mjs} +187 -59
  19. package/dist/{budget-Bs6SxxzO.mjs → budget-Cvwn54qV.mjs} +830 -699
  20. package/dist/{build-CoPzQRNw.mjs → build-CabC3G23.mjs} +34 -27
  21. package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
  22. package/dist/{build-plan-CaFskB7_.mjs → build-plan-DUC8Ka9y.mjs} +74 -14
  23. package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
  24. package/dist/cache-manifest.mjs +1 -1
  25. package/dist/{ccache-BJRZ9pG3.mjs → ccache-Btwc36-I.mjs} +6 -6
  26. package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
  27. package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
  28. package/dist/{cli-0DYf8QhQ.mjs → cli-CHZa9Lvk.mjs} +20 -20
  29. package/dist/cli.mjs +1 -1
  30. package/dist/{client-UXD70ZbM.mjs → client-OyRoEuSr.mjs} +218 -47
  31. package/dist/collector-run.d.mts +1 -1
  32. package/dist/collector-run.mjs +6 -6
  33. package/dist/{command-output-B1UrjZHL.mjs → command-output-gwpm28fu.mjs} +1 -1
  34. package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
  35. package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
  36. package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
  37. package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
  38. package/dist/{dev-client-UOeESKm6.mjs → dev-client-BSDR5h3F.mjs} +2 -2
  39. package/dist/{device-ExJq8Ei7.mjs → device-B-L3Fbxy.mjs} +71 -14
  40. package/dist/{device-DCxH7_By.mjs → device-DklWZLqb.mjs} +16 -16
  41. package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-DK5_EwRS.mjs} +9 -10
  42. package/dist/device-host-worker.mjs +25 -32
  43. package/dist/{device-ios-DRUeKaFV.mjs → device-ios-DoB6KFCO.mjs} +39 -16
  44. package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-xJPQ_QQG.mjs} +5 -5
  45. package/dist/{device-pool-DMRpVX9a.mjs → device-pool-BMkdsefq.mjs} +3 -3
  46. package/dist/{doctor-DTvaDOda.mjs → doctor-Bo7BXLux.mjs} +24 -37
  47. package/dist/{doctor-Dhqebm0q.mjs → doctor-D5_EzwfA.mjs} +19 -16
  48. package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
  49. package/dist/doctor-fingerprint.mjs +1 -1
  50. package/dist/{doctor-BLHCYxzi.mjs → doctor-thjWAV0z.mjs} +1 -1
  51. package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-N2wDotwQ.mjs} +5 -5
  52. package/dist/{eas-build-BomfRnFT.mjs → eas-build-CwknaQYj.mjs} +4 -4
  53. package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-CSgAulr5.mjs} +27 -18
  54. package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-DlY_serQ.mjs} +8 -7
  55. package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-DBWO2rxE.mjs} +10 -10
  56. package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
  57. package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
  58. package/dist/{gc-_-dCXdyL.mjs → gc-CXxN-4SE.mjs} +587 -313
  59. package/dist/gc-DnNDQyaP.mjs +3 -0
  60. package/dist/{guide-Yqwt2bd6.mjs → guide-Br0LEfKy.mjs} +239 -43
  61. package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-B-9f-jkd.mjs} +6 -6
  62. package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-DZAPrcro.mjs} +4 -4
  63. package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
  64. package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-FIRx9X2f.mjs} +5 -5
  65. package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-_awYSpfv.mjs} +21 -12
  66. package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-BdzE668-.mjs} +27 -14
  67. package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
  68. package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DDg3SdvY.mjs} +7 -7
  69. package/dist/ios-CDvlmUs7.d.mts +24 -0
  70. package/dist/{ios-CQ68hG9s.mjs → ios-Ds1clbIt.mjs} +8 -8
  71. package/dist/{ios-device-CwFMehUS.mjs → ios-device--h_-8ENa.mjs} +3 -3
  72. package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
  73. package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
  74. package/dist/{ios-ubFsBzwq.mjs → ios-pm4nL6By.mjs} +59 -50
  75. package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CZhKODF3.mjs} +5 -5
  76. package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
  77. package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
  78. package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
  79. package/dist/{js-swap-Cc1dttps.mjs → js-swap-Bwhh4S7V.mjs} +7 -29
  80. package/dist/{launch-Zq2mOSDy.mjs → launch-BjxemNpK.mjs} +40 -39
  81. package/dist/{launch-CD1yVc7U.mjs → launch-CCzXlc8r.mjs} +16 -16
  82. package/dist/{logs-BS00Anxf.mjs → logs-BfwwadsZ.mjs} +151 -24
  83. package/dist/{logs-CMm05HxN.mjs → logs-jTS_lHSo.mjs} +10 -17
  84. package/dist/{macos-B65--pPd.mjs → macos-DVlSSyUg.mjs} +1 -1
  85. package/dist/{macos-C-0qJ6zq.mjs → macos-NfV2D7dO.mjs} +143 -46
  86. package/dist/macos-run.mjs +1 -1
  87. package/dist/maintenance-run.mjs +8 -8
  88. package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
  89. package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
  90. package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
  91. package/dist/{native-android-JACyjTZs.mjs → native-android-CqgnOgsT.mjs} +43 -242
  92. package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
  93. package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
  94. package/dist/{native-run-DY_RLx3C.mjs → native-run-NwUuxbkg.mjs} +4 -5
  95. package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-B7KIafpM.mjs} +8 -7
  96. package/dist/native-source-Y0yLhFyQ.mjs +133 -0
  97. package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-D_VOfFL7.mjs} +2 -3
  98. package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-BYDOHWLN.mjs} +27 -32
  99. package/dist/offload-worker.d.mts +65 -2
  100. package/dist/offload-worker.mjs +305 -73
  101. package/dist/operation-exec-BW0em61G.mjs +171 -0
  102. package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
  103. package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
  104. package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
  105. package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-DIsMtN-d.mjs} +12 -8
  106. package/dist/{ports-D-MmCTdv.mjs → ports-Cy1RkmuQ.mjs} +3 -3
  107. package/dist/{prebuild-uD_ipCxF.mjs → prebuild-D4JoEAEs.mjs} +49 -14
  108. package/dist/{project-BZNjmW_8.mjs → project-wM_XFTvE.mjs} +16 -16
  109. package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
  110. package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
  111. package/dist/pull-requests.d.mts +2 -2
  112. package/dist/pull-requests.mjs +2 -2
  113. package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-6OZ7MSM7.mjs} +71 -48
  114. package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-Dvd8hC21.mjs} +8 -8
  115. package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-DsoSF1Y9.mjs} +7 -7
  116. package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-4u1Rn-GR.mjs} +40 -26
  117. package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
  118. package/dist/registration-BcRgF6Ox.mjs +51 -0
  119. package/dist/{reload-CmTRFJaX.mjs → reload-BzkYabB-.mjs} +16 -15
  120. package/dist/{reload-DzjSl5P_.mjs → reload-D7AVlb8N.mjs} +1 -1
  121. package/dist/{remote-ByYkXdGD.mjs → remote-DjGDmlTZ.mjs} +18 -15
  122. package/dist/{result-DNiS-tTP.mjs → result-D2Ykz_iD.mjs} +24 -23
  123. package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
  124. package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
  125. package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
  126. package/dist/{server-command-CtzloH3v.mjs → server-command-C6QjeupS.mjs} +5 -5
  127. package/dist/{server-expo-DT_F_uVI.mjs → server-expo-CrjB29pq.mjs} +7 -5
  128. package/dist/server-expo-D58c9L0M.mjs +2 -0
  129. package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
  130. package/dist/{settings-T1gtc3bf.mjs → settings-DpR-1Wnn.mjs} +1 -1
  131. package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-CzD60rOD.mjs} +7 -6
  132. package/dist/settings.schema.json +13 -0
  133. package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
  134. package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-CbfmNgM6.mjs} +6 -6
  135. package/dist/{stage-BIS0ydsV.mjs → stage-Bps5oius.mjs} +21 -4
  136. package/dist/{start-RChynRDp.mjs → start-Br-oxqMD.mjs} +1 -1
  137. package/dist/{start-7lpH7hmN.mjs → start-EojN4WFz.mjs} +622 -393
  138. package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
  139. package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
  140. package/dist/{stats-53T7OTb9.mjs → stats-D3GerlFW.mjs} +5 -5
  141. package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
  142. package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
  143. package/dist/{status-CSi6tlRq.mjs → status-EvrK72L2.mjs} +1 -1
  144. package/dist/{status-BL7jVyAB.mjs → status-WBDajew2.mjs} +43 -29
  145. package/dist/{status-watch-GDCfqpTE.mjs → status-watch-Bg_u-pwR.mjs} +48 -16
  146. package/dist/status-worker.mjs +1 -1
  147. package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
  148. package/dist/{stop-Bk_1qiV6.mjs → stop-DTZ9uTw3.mjs} +2 -2
  149. package/dist/{stop-D7h6jAXQ.mjs → stop-Dky10AEJ.mjs} +31 -22
  150. package/dist/{stop-CPzlM1L-.mjs → stop-Mv6W9FAk.mjs} +15 -16
  151. package/dist/supervisor-run.d.mts +3 -3
  152. package/dist/supervisor-run.mjs +28 -36
  153. package/dist/{support-Dlu37g6H.mjs → support-CNioewsd.mjs} +10 -10
  154. package/dist/{support-67vraa1Q.mjs → support-yUiOjnVY.mjs} +8 -8
  155. package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
  156. package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
  157. package/dist/toolchain-BY8X8HXx.mjs +2 -0
  158. package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-DpJMHq0n.mjs} +9 -6
  159. package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
  160. package/dist/trigger-yb_nFzPF.mjs +2 -0
  161. package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
  162. package/dist/web-CZ07gd77.mjs +2 -0
  163. package/dist/{web-CJmIj6AI.mjs → web-DKx6yoFA.mjs} +11 -10
  164. package/dist/web-run.mjs +11 -9
  165. package/dist/windows-report.mjs +1 -1
  166. package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
  167. package/dist/{workspaces-BccMFmGQ.mjs → workspaces-CpANmBlq.mjs} +594 -266
  168. package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-CHecZ4Oq.mjs} +850 -551
  169. package/dist/worktree-ZqZVjD9K.mjs +2 -0
  170. package/dist/{xcode-Zlx3qjEs.mjs → xcode-BXn9-xYx.mjs} +5 -5
  171. package/package.json +7 -7
  172. package/shim/android-audio/Main.java +24 -0
  173. package/shim/android-audio/README.md +17 -0
  174. package/shim/android-audio.jar +0 -0
  175. package/dist/gc-C-WwL0yi.mjs +0 -3
  176. package/dist/git-C3iTsJaZ.mjs +0 -73
  177. package/dist/server-expo-C-90EhcG.mjs +0 -2
  178. package/dist/settings-DkdmlelE.d.mts +0 -15
  179. package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
  180. package/dist/toolchain-DhKwp9iI.mjs +0 -2
  181. package/dist/trigger-Bf3uDcpv.mjs +0 -2
  182. package/dist/web-DknQETPs.mjs +0 -2
  183. package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
  184. package/dist/worktree-CK2MpJW5.mjs +0 -2
@@ -1,3 +1,4 @@
1
+ import { StimContext } from "@stim-cli/core";
1
2
  //#region src/workspace/pull-request.d.ts
2
3
  interface GhPullRequest {
3
4
  number: number;
@@ -84,6 +85,8 @@ declare function parseRemoteRepo(url: string): string | null;
84
85
  * times out, every later lookup through the same function answers `unavailable` without running it again.
85
86
  */
86
87
  declare function pullRequestLookup(): (cwd: string, branch: string, head: string) => PullRequestLookup;
88
+ /** The same branch and commit lookup as `pullRequestLookup`, with nonblocking Git and GitHub probes. */
89
+ declare function pullRequestLookupAsync(operation?: StimContext): (cwd: string, branch: string, head: string) => Promise<PullRequestLookup>;
87
90
  /** A worktree whose pull request {@link pullRequestLookups} looks up: its path, branch and HEAD commit. */
88
91
  interface PullRequestQuery {
89
92
  cwd: string;
@@ -97,8 +100,9 @@ interface PullRequestQuery {
97
100
  * out or times out, every later call through the same function answers `unavailable` without running it again.
98
101
  * With `detail`, it also asks for each pull request's title, review decision and head commit check counts.
99
102
  */
100
- declare function pullRequestLookups({ detail }?: {
103
+ declare function pullRequestLookups({ detail, operation }?: {
101
104
  detail?: boolean;
105
+ operation?: StimContext;
102
106
  }): (repo: string, queries: readonly PullRequestQuery[]) => Promise<PullRequestLookup[]>;
103
107
  /** The merged or closed pull request whose commits include HEAD, which makes the worktree removable. */
104
108
  declare function endedPullRequest(lookup: PullRequestLookup | null): PullRequestFact | null;
@@ -117,4 +121,4 @@ interface WorktreeBranch {
117
121
  */
118
122
  declare function worktreePullRequests(): (worktrees: readonly WorktreeBranch[]) => Promise<Map<string, PullRequestFact | null>>;
119
123
  //#endregion
120
- export { PullRequestLookup as a, checkCounts as c, parseRemoteRepo as d, pullRequestLookup as f, worktreePullRequests as h, PullRequestFact as i, describePullRequest as l, selectPullRequest as m, GhCheckRollup as n, PullRequestQuery as o, pullRequestLookups as p, GhPullRequest as r, WorktreeBranch as s, CheckCounts as t, endedPullRequest as u };
124
+ export { PullRequestLookup as a, checkCounts as c, parseRemoteRepo as d, pullRequestLookup as f, worktreePullRequests as g, selectPullRequest as h, PullRequestFact as i, describePullRequest as l, pullRequestLookups as m, GhCheckRollup as n, PullRequestQuery as o, pullRequestLookupAsync as p, GhPullRequest as r, WorktreeBranch as s, CheckCounts as t, endedPullRequest as u };
@@ -1,2 +1,2 @@
1
- import { a as PullRequestLookup, c as checkCounts, d as parseRemoteRepo, f as pullRequestLookup, h as worktreePullRequests, i as PullRequestFact, l as describePullRequest, m as selectPullRequest, n as GhCheckRollup, o as PullRequestQuery, p as pullRequestLookups, r as GhPullRequest, s as WorktreeBranch, t as CheckCounts, u as endedPullRequest } from "./pull-request-zjCSAryH.mjs";
2
- export { CheckCounts, GhCheckRollup, GhPullRequest, PullRequestFact, PullRequestLookup, PullRequestQuery, WorktreeBranch, checkCounts, describePullRequest, endedPullRequest, parseRemoteRepo, pullRequestLookup, pullRequestLookups, selectPullRequest, worktreePullRequests };
1
+ import { a as PullRequestLookup, c as checkCounts, d as parseRemoteRepo, f as pullRequestLookup, g as worktreePullRequests, h as selectPullRequest, i as PullRequestFact, l as describePullRequest, m as pullRequestLookups, n as GhCheckRollup, o as PullRequestQuery, p as pullRequestLookupAsync, r as GhPullRequest, s as WorktreeBranch, t as CheckCounts, u as endedPullRequest } from "./pull-request-eODyIqZF.mjs";
2
+ export { CheckCounts, GhCheckRollup, GhPullRequest, PullRequestFact, PullRequestLookup, PullRequestQuery, WorktreeBranch, checkCounts, describePullRequest, endedPullRequest, parseRemoteRepo, pullRequestLookup, pullRequestLookupAsync, pullRequestLookups, selectPullRequest, worktreePullRequests };
@@ -1,2 +1,2 @@
1
- import { a as pullRequestLookup, c as worktreePullRequests, i as parseRemoteRepo, n as describePullRequest, o as pullRequestLookups, r as endedPullRequest, s as selectPullRequest, t as checkCounts } from "./pull-request-Lfetn8Kr.mjs";
2
- export { checkCounts, describePullRequest, endedPullRequest, parseRemoteRepo, pullRequestLookup, pullRequestLookups, selectPullRequest, worktreePullRequests };
1
+ import { a as pullRequestLookup, c as selectPullRequest, i as parseRemoteRepo, l as worktreePullRequests, n as describePullRequest, o as pullRequestLookupAsync, r as endedPullRequest, s as pullRequestLookups, t as checkCounts } from "./pull-request-W1IuLXDt.mjs";
2
+ export { checkCounts, describePullRequest, endedPullRequest, parseRemoteRepo, pullRequestLookup, pullRequestLookupAsync, pullRequestLookups, selectPullRequest, worktreePullRequests };
@@ -1,29 +1,31 @@
1
- import { s as spawnDeclared, t as getExecutor, u as operationState } from "./exec-_UbtCQcG.mjs";
2
- import { J as validateDeviceSlot, U as deviceSlotPlatforms, p as getProject } from "./config-CYcBF478.mjs";
1
+ import { _ as reportSignal, d as spawnDeclared, m as operationState, t as getExecutor } from "./exec-DEoAhcze.mjs";
2
+ import { H as deviceSlotPlatforms, p as getProject, q as validateDeviceSlot } from "./config-DlrsduwG.mjs";
3
3
  import { r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-B1UrjZHL.mjs";
5
- import { r as readWorkspaceState } from "./workspace-state-Cjuigeeu.mjs";
6
- import { $ as settingOriginScope, B as realpathInside, H as remoteEasFallbackSetting, R as publicUrlSetting, W as resolveAndroidLayout, Xt as removeTemporaryEntry, Yt as makeTemporaryDirectory, en as throwIfCancelled, m as defaultAndroidLayout, nt as settingsLayers, qt as killOnAbort, rt as tunnelModeSetting } from "./settings-CsJDEXgK.mjs";
7
- import { v as detectIsExpo } from "./project-BZNjmW_8.mjs";
8
- import { Bn as checkEasAuth, Jn as resolveRemote, Un as loadProjectProvider, Xn as bundleInvocation, Y as statsProjectKey } from "./budget-Bs6SxxzO.mjs";
9
- import { C as compareAssetManifests, S as captureAssetManifest, _ as storedAssetManifest, b as untrackedNativeFiles, c as fingerprintDiffRecord, g as storeBuild, h as resolveBuild, i as configInputsChanged, l as fingerprintProject, m as refingerprintAfterMutation, n as buildCacheKey, r as changedDuringBuildLine, s as filesystemBuildCapability, u as inputsChangedDuringBuild, w as readAssetManifest, x as assetDiffReason, y as untrackedMissLine } from "./build-cache-DmyR9Zzc.mjs";
10
- import { J as pickDefaultSystemImage, M as listAvds, O as hostSystemImageArch, P as listInstalledSystemImages, T as findBuildTool, W as ownedAvdSystemImage, l as androidSystemImageAbi, r as androidBuildToolName, z as ownedAvdDirectory } from "./android-DUYkNF4u.mjs";
11
- import { t as cleanLine } from "./server-expo-DT_F_uVI.mjs";
12
- import { o as resolveCcache } from "./ccache-BJRZ9pG3.mjs";
13
- import { _ as tailLines, h as startBuildHeartbeat, r as HEARTBEAT_INTERVAL_MS } from "./xcode-Zlx3qjEs.mjs";
14
- import { r as androidToolchainAsync, t as androidRequirements } from "./toolchain-Hp9sCpK4.mjs";
15
- import { c as readProductFlavors, n as buildAndroid, s as productFlavorRefusal } from "./react-native-build-rhk4smwQ.mjs";
16
- import { i as planEasDevelopmentBuild } from "./eas-build-BomfRnFT.mjs";
17
- import { h as detectAppIds, m as detectAndroidPackage } from "./start-7lpH7hmN.mjs";
18
- import { a as explainBuildMiss, i as staleNativeDirRefusal, n as recordPrebuild, o as fingerprintErrorMissReason, r as runPrebuild, t as planPrebuild } from "./prebuild-uD_ipCxF.mjs";
19
- import { a as PLATFORM, c as androidGradleProject, h as displayPath, i as NO_FINGERPRINT, l as androidJobLayout, o as androidBuildOptions, r as NO_DEVICE } from "./support-67vraa1Q.mjs";
4
+ import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-gwpm28fu.mjs";
5
+ import { a as killOnAbort, f as throwIfCancelled, t as runOperationFile } from "./operation-exec-BW0em61G.mjs";
6
+ import { r as readWorkspaceState } from "./workspace-state-U08dEzhG.mjs";
7
+ import { $ as settingOriginScope, B as realpathInside, H as remoteEasFallbackSetting, Ht as makeTemporaryDirectory, R as publicUrlSetting, Ut as removeTemporaryEntry, W as resolveAndroidLayout, m as defaultAndroidLayout, nt as settingsLayers, rt as tunnelModeSetting } from "./settings-C7O8A6ZI.mjs";
8
+ import { v as detectIsExpo } from "./project-wM_XFTvE.mjs";
9
+ import { Bn as checkEasAuth, Fn as processContext, Jn as resolveRemote, Un as loadProjectProvider, Xn as bundleInvocation, Y as statsProjectKey } from "./budget-Cvwn54qV.mjs";
10
+ import { C as compareAssetManifests, S as captureAssetManifest, _ as storedAssetManifest, b as untrackedNativeFiles, c as fingerprintDiffRecord, g as storeBuild, h as resolveBuild, i as configInputsChanged, l as fingerprintProject, m as refingerprintAfterMutation, n as buildCacheKey, r as changedDuringBuildLine, s as filesystemBuildCapability, u as inputsChangedDuringBuild, w as readAssetManifest, x as assetDiffReason, y as untrackedMissLine } from "./build-cache-Dv7RN200.mjs";
11
+ import { E as findBuildTool, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, V as ownedAvdDirectory, X as pickDefaultSystemImage, k as hostSystemImageArch, l as androidSystemImageAbi, r as androidBuildToolName } from "./android-C7sVmyI9.mjs";
12
+ import { t as cleanLine } from "./server-expo-CrjB29pq.mjs";
13
+ import { o as resolveCcache } from "./ccache-Btwc36-I.mjs";
14
+ import { _ as tailLines, h as startBuildHeartbeat, r as HEARTBEAT_INTERVAL_MS } from "./xcode-BXn9-xYx.mjs";
15
+ import { r as androidToolchainAsync, t as androidRequirements } from "./toolchain-DpJMHq0n.mjs";
16
+ import { h as detectAppIds, m as detectAndroidPackage } from "./start-EojN4WFz.mjs";
17
+ import { c as readProductFlavors, n as buildAndroid, s as productFlavorRefusal } from "./react-native-build-Dvd8hC21.mjs";
18
+ import { t as readDoctorFingerprint } from "./doctor-fingerprint-DZLoYFVb.mjs";
19
+ import { i as planEasDevelopmentBuild } from "./eas-build-CwknaQYj.mjs";
20
+ import { a as staleNativeDirRefusal, i as runPrebuild, n as planPrebuildAsync, o as explainBuildMiss, r as recordPrebuild, s as fingerprintErrorMissReason, t as planPrebuild } from "./prebuild-D4JoEAEs.mjs";
21
+ import { a as PLATFORM, c as androidGradleProject, h as displayPath, i as NO_FINGERPRINT, l as androidJobLayout, o as androidBuildOptions, r as NO_DEVICE } from "./support-yUiOjnVY.mjs";
20
22
  import { t as AndroidRecipeRefusal } from "./android-project-BCAAmMwz.mjs";
21
- import { c as resolveAndroidRunPlan } from "./result-DNiS-tTP.mjs";
22
- import { t as checkEasFallback } from "./eas-fallback-DJwZpy0c.mjs";
23
- import { n as androidProcessRuntime, t as androidMetroRuntime } from "./launch-CD1yVc7U.mjs";
24
- import { n as planFlagRefusal, r as planPayload, t as planCachedBuild } from "./build-plan-CaFskB7_.mjs";
25
- import { a as runOperationFile, n as detectEntryFile, r as refreshUpdatesManifestFile, t as UPDATES_MANIFEST_NAME } from "./js-swap-Cc1dttps.mjs";
26
- import { t as planHostedDevice } from "./plan-placement-Bwj-IjY1.mjs";
23
+ import { c as resolveAndroidRunPlan } from "./result-D2Ykz_iD.mjs";
24
+ import { t as checkEasFallback } from "./eas-fallback-CSgAulr5.mjs";
25
+ import { n as androidProcessRuntime, t as androidMetroRuntime } from "./launch-CCzXlc8r.mjs";
26
+ import { n as planFlagRefusal, r as planPayload, t as planCachedBuild } from "./build-plan-DUC8Ka9y.mjs";
27
+ import { n as detectEntryFile, r as refreshUpdatesManifestFile, t as UPDATES_MANIFEST_NAME } from "./js-swap-Bwhh4S7V.mjs";
28
+ import { t as planHostedDevice } from "./plan-placement-DIsMtN-d.mjs";
27
29
  import { constants, existsSync, mkdirSync, readFileSync, renameSync } from "node:fs";
28
30
  import { basename, dirname, isAbsolute, join, relative } from "node:path";
29
31
  import chalk from "chalk";
@@ -442,27 +444,24 @@ const DEFAULT_PLAN_DEPS = {
442
444
  listSystemImages: listInstalledSystemImages,
443
445
  avdSystemImage: ownedAvdSystemImage,
444
446
  avdDirectory: ownedAvdDirectory,
445
- listAvds,
447
+ listAvds: listAvdsAsync,
446
448
  loadCacheProvider,
447
449
  loadProjectProvider,
448
450
  checkEasAuth,
449
451
  resolveRemote,
450
- planPrebuild
452
+ planPrebuild: planPrebuildAsync
451
453
  };
452
- function note(line) {
453
- console.error(line);
454
- }
455
454
  function refuse(refusal, lines = []) {
456
455
  return {
457
456
  refusal,
458
457
  lines
459
458
  };
460
459
  }
461
- function emulatorImage(root, slot, requested, deps) {
460
+ async function emulatorImage(root, slot, requested, deps, signal) {
462
461
  const record = deviceSlotPlatforms(getProject(root), slot)?.android;
463
462
  if (record?.avdName && !record.setupIncomplete) {
464
463
  if (record.owned && deps.avdDirectory(record.avdName)) return { systemImage: deps.avdSystemImage(record.avdName) };
465
- if (!record.owned && avdListed(record.avdName, deps.listAvds)) return { systemImage: null };
464
+ if (!record.owned && await avdListed(record.avdName, deps.listAvds, signal)) return { systemImage: null };
466
465
  }
467
466
  let images;
468
467
  try {
@@ -483,22 +482,29 @@ function emulatorImage(root, slot, requested, deps) {
483
482
  remedy: `Install one, e.g.: sdkmanager "system-images;android-36;google_apis;${arch}", then try again.`
484
483
  } };
485
484
  }
486
- function avdListed(avdName, list) {
485
+ async function avdListed(avdName, list, signal) {
487
486
  try {
488
- return list({ timeoutMs: 1e4 }).includes(avdName);
487
+ return (await list({
488
+ timeoutMs: 1e4,
489
+ signal
490
+ })).includes(avdName);
489
491
  } catch {
492
+ signal?.throwIfAborted();
490
493
  return false;
491
494
  }
492
495
  }
493
- async function planReactNativeAndroid(root, opts, runtimeKind, { context: settingsContext, settings }, layout, variantProblem, overrides = {}) {
496
+ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settingsContext, settings }, layout, variantProblem, overrides = {}, operation = processContext(root)) {
497
+ const note = (line) => operation.output("stderr", `${line}\n`);
494
498
  const deps = {
495
499
  ...DEFAULT_PLAN_DEPS,
496
500
  ...overrides
497
501
  };
498
502
  const slot = validateDeviceSlot(opts.slot);
499
- const planned = resolveAndroidRunPlan({
503
+ const planned = await resolveAndroidRunPlan({
500
504
  settings,
501
505
  settingsContext,
506
+ env: operation?.env,
507
+ signal: operation?.signal,
502
508
  slot,
503
509
  easProfile: opts.easProfile,
504
510
  variant: opts.variant ?? null,
@@ -533,6 +539,9 @@ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settin
533
539
  };
534
540
  if (opts.easProfile !== void 0) {
535
541
  const eas = await planEasDevelopmentBuild({
542
+ context: operation,
543
+ env: operation?.env,
544
+ signal: operation?.signal,
536
545
  root,
537
546
  platform: PLATFORM,
538
547
  profile: opts.easProfile,
@@ -564,12 +573,14 @@ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settin
564
573
  remedy: "Run `stim android` to build with the CAS, or set optimizations.android.compilerCache to ccache."
565
574
  });
566
575
  const abiKeyed = build.targetAbiOnly && !build.release;
567
- const localImage = () => abiKeyed ? emulatorImage(root, slot, target.systemImage, deps) : { systemImage: null };
576
+ let localImageRead;
577
+ const localImage = () => localImageRead ??= abiKeyed ? emulatorImage(root, slot, target.systemImage, deps, operation.signal) : Promise.resolve({ systemImage: null });
568
578
  let image;
569
579
  let hostedAbi = null;
570
580
  let placement;
571
581
  if (target.kind === "hosted") {
572
582
  const hostedPlan = await planHostedDevice({
583
+ operation,
573
584
  root,
574
585
  slot,
575
586
  platform: "android",
@@ -578,14 +589,16 @@ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settin
578
589
  ...target.systemImage ? { systemImage: target.systemImage } : {},
579
590
  ...target.deviceProfile ? { deviceProfile: target.deviceProfile } : {}
580
591
  },
581
- sameKey: (choice) => {
592
+ sameKey: async (choice) => {
582
593
  if (build.targetAbiOnly && build.release) return !("architecture" in choice && choice.architecture);
583
594
  if (!abiKeyed) return true;
584
- const local = localImage();
595
+ const local = await localImage();
585
596
  if ("refusal" in local || !("systemImage" in choice)) return null;
586
597
  return androidSystemImageAbi(local.systemImage) === androidSystemImageAbi(choice.systemImage);
587
598
  },
588
599
  ...remoteEasFallbackSetting(settings) ? { eas: () => checkEasFallback({
600
+ operation,
601
+ env: operation?.env,
589
602
  root,
590
603
  platform: "android",
591
604
  slot,
@@ -603,8 +616,8 @@ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settin
603
616
  });
604
617
  placement = hostedPlan.placement;
605
618
  if (hostedPlan.kind === "hosted" && "architecture" in hostedPlan.choice) hostedAbi = hostedPlan.choice.architecture ?? null;
606
- image = hostedPlan.kind === "hosted" ? { systemImage: abiKeyed && "systemImage" in hostedPlan.choice ? hostedPlan.choice.systemImage : null } : localImage();
607
- } else image = localImage();
619
+ image = hostedPlan.kind === "hosted" ? { systemImage: abiKeyed && "systemImage" in hostedPlan.choice ? hostedPlan.choice.systemImage : null } : await localImage();
620
+ } else image = await localImage();
608
621
  if ("refusal" in image) return refuse(image.refusal);
609
622
  const { abi, runOptions, remoteRunOptions } = androidBuildOptions({
610
623
  release: build.release,
@@ -619,22 +632,30 @@ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settin
619
632
  });
620
633
  let fingerprint;
621
634
  try {
622
- fingerprint = await deps.fingerprint(root, {
635
+ fingerprint = operation && reportSignal(operation) ? await readDoctorFingerprint(operation, {
636
+ root,
637
+ platform: PLATFORM,
638
+ androidLayout: layout
639
+ }) : await deps.fingerprint(root, {
623
640
  platform: PLATFORM,
624
641
  androidLayout: layout
625
642
  });
626
643
  } catch (error) {
644
+ operation?.signal.throwIfAborted();
627
645
  return refuse({
628
646
  code: NO_FINGERPRINT,
629
647
  message: `@expo/fingerprint could not fingerprint ${root}: ${error?.message || error}`,
630
648
  remedy: "Fix the @expo/fingerprint error above, then retry."
631
649
  });
632
650
  }
633
- if (!fingerprint?.hash) return refuse({
634
- code: NO_FINGERPRINT,
635
- message: `@expo/fingerprint returned no hash for ${root}, so the build cache cannot be addressed.`,
636
- remedy: "Check the project native inputs and the @expo/fingerprint error above, then retry."
637
- });
651
+ if (!fingerprint?.hash) {
652
+ operation?.signal.throwIfAborted();
653
+ return refuse({
654
+ code: NO_FINGERPRINT,
655
+ message: `@expo/fingerprint returned no hash for ${root}, so the build cache cannot be addressed.`,
656
+ remedy: "Check the project native inputs and the @expo/fingerprint error above, then retry."
657
+ });
658
+ }
638
659
  const plan = await planCachedBuild({
639
660
  ...planTarget,
640
661
  isExpo,
@@ -646,6 +667,7 @@ async function planReactNativeAndroid(root, opts, runtimeKind, { context: settin
646
667
  expoRemote: abi || build.profile || !build.cache.remote ? null : { runOptions: remoteRunOptions }
647
668
  }, {
648
669
  ...deps,
670
+ operation,
649
671
  note
650
672
  });
651
673
  return placement ? {
@@ -664,7 +686,7 @@ function reactNativeAndroidProject(root, { context, settings }, dependencies = {
664
686
  variant
665
687
  });
666
688
  return {
667
- plan: (options, resolved) => planReactNativeAndroid(root, options, runtimeKind, resolved, layout, variantProblem, dependencies.plan),
689
+ plan: (options, resolved, operation) => planReactNativeAndroid(root, options, runtimeKind, resolved, layout, variantProblem, dependencies.plan, operation),
668
690
  isExpo,
669
691
  appIds: () => detectAppIds(root, void 0, layout.moduleDir),
670
692
  packageRemedy: `Set \`expo.android.package\` in app.json / app.config.js, or \`namespace\` in ${relative(root, layout.moduleDir) || "."}/build.gradle.`,
@@ -908,7 +930,7 @@ function reactNativeAndroidArtifact({ operation, root, buildLog, writer, setting
908
930
  };
909
931
  },
910
932
  untrackedLine: () => untrackedMissLine(untracked({ projectRoot: root })),
911
- legacyCache: target.abi || cas || profile || !buildPlan.cache.remote ? null : {
933
+ expoCache: target.abi || cas || profile || !buildPlan.cache.remote ? null : {
912
934
  load: () => loadProvider(root, {
913
935
  context: operation,
914
936
  isExpo
@@ -924,6 +946,7 @@ function reactNativeAndroidArtifact({ operation, root, buildLog, writer, setting
924
946
  }),
925
947
  request: {
926
948
  platform: "android",
949
+ cacheArtifact: buildPlan.cache.write && buildPlan.cache.remote,
927
950
  isExpo,
928
951
  android: {
929
952
  variant,
@@ -1,14 +1,14 @@
1
- import { s as spawnDeclared, t as getExecutor } from "./exec-_UbtCQcG.mjs";
1
+ import { d as spawnDeclared, t as getExecutor } from "./exec-DEoAhcze.mjs";
2
2
  import { o as sharedCompilationCache } from "./paths-DQtTgsBf.mjs";
3
3
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { l as phaseLine } from "./command-output-B1UrjZHL.mjs";
5
- import { qt as killOnAbort } from "./settings-CsJDEXgK.mjs";
6
- import { C as resolvePackageJson } from "./project-BZNjmW_8.mjs";
7
- import { r as register } from "./cache-manifest-DkkqguoK.mjs";
8
- import { o as androidHome } from "./android-DUYkNF4u.mjs";
4
+ import { l as phaseLine } from "./command-output-gwpm28fu.mjs";
5
+ import { a as killOnAbort } from "./operation-exec-BW0em61G.mjs";
6
+ import { C as resolvePackageJson } from "./project-wM_XFTvE.mjs";
7
+ import { r as register } from "./cache-manifest-DSeQjt-Q.mjs";
8
+ import { o as androidHome } from "./android-C7sVmyI9.mjs";
9
9
  import { p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
10
- import { a as readCcacheActivity, n as CCACHE_UNAVAILABLE } from "./ccache-BJRZ9pG3.mjs";
11
- import { a as buildXcode, d as pickXcodeProject, g as swiftPrefixMappingSupported, h as startBuildHeartbeat, i as SWIFT_PREFIX_MAPPING_MIN_SWIFT, l as parseSwiftVersion, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-Zlx3qjEs.mjs";
10
+ import { a as readCcacheActivity, n as CCACHE_UNAVAILABLE } from "./ccache-Btwc36-I.mjs";
11
+ import { a as buildXcode, d as pickXcodeProject, g as swiftPrefixMappingSupported, h as startBuildHeartbeat, i as SWIFT_PREFIX_MAPPING_MIN_SWIFT, l as parseSwiftVersion, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-BXn9-xYx.mjs";
12
12
  import { createHash } from "node:crypto";
13
13
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync } from "node:fs";
14
14
  import { dirname, isAbsolute, join, relative, sep } from "node:path";
@@ -1,10 +1,10 @@
1
- import { t as getExecutor } from "./exec-_UbtCQcG.mjs";
2
- import { l as phaseLine } from "./command-output-B1UrjZHL.mjs";
3
- import { K as resolveIosProjectDir, W as resolveAndroidLayout } from "./settings-CsJDEXgK.mjs";
4
- import { v as detectIsExpo } from "./project-BZNjmW_8.mjs";
5
- import { b as bundlerPin } from "./xcode-Zlx3qjEs.mjs";
6
- import { i as iosToolchainAsync, n as androidToolchain, r as androidToolchainAsync, t as androidRequirements } from "./toolchain-Hp9sCpK4.mjs";
7
- import { a as reactNativeDoctorFindings, i as mainCheckoutProjectRoot, n as detectFingerprintParity, r as detectLinkedLibraryGitMetadata, s as repairCxxLauncherState, t as checkMainCheckout } from "./doctor-DTvaDOda.mjs";
1
+ import { t as getExecutor } from "./exec-DEoAhcze.mjs";
2
+ import { l as phaseLine } from "./command-output-gwpm28fu.mjs";
3
+ import { K as resolveIosProjectDir, W as resolveAndroidLayout } from "./settings-C7O8A6ZI.mjs";
4
+ import { v as detectIsExpo } from "./project-wM_XFTvE.mjs";
5
+ import { b as bundlerPin } from "./xcode-BXn9-xYx.mjs";
6
+ import { a as iosToolchainAsync, n as androidToolchain, r as androidToolchainAsync, t as androidRequirements } from "./toolchain-DpJMHq0n.mjs";
7
+ import { a as reactNativeDoctorFindings, i as mainCheckoutProjectRoot, n as detectFingerprintParity, r as detectLinkedLibraryGitMetadata, s as repairCxxLauncherState, t as checkMainCheckout } from "./doctor-Bo7BXLux.mjs";
8
8
  import { existsSync, readdirSync } from "node:fs";
9
9
  import { join, relative } from "node:path";
10
10
  //#region src/diagnostics/doctor-ios-architectures.ts
@@ -1,32 +1,32 @@
1
- import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-B1UrjZHL.mjs";
2
- import { H as remoteEasFallbackSetting, K as resolveIosProjectDir, R as publicUrlSetting, U as remoteIosSetting, a as SETTING_SHAPE_REMEDY, et as settingShapeErrors, p as cacheProviderSettingError, rt as tunnelModeSetting } from "./settings-CsJDEXgK.mjs";
3
- import { Y as statsProjectKey } from "./budget-Bs6SxxzO.mjs";
4
- import { d as runCancellationSignal } from "./native-run-DY_RLx3C.mjs";
5
- import { c as fingerprintDiffRecord, i as configInputsChanged, m as refingerprintAfterMutation, n as buildCacheKey, r as changedDuringBuildLine, s as filesystemBuildCapability, u as inputsChangedDuringBuild, y as untrackedMissLine } from "./build-cache-DmyR9Zzc.mjs";
1
+ import { _ as reportSignal } from "./exec-DEoAhcze.mjs";
2
+ import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-gwpm28fu.mjs";
3
+ import { H as remoteEasFallbackSetting, K as resolveIosProjectDir, R as publicUrlSetting, U as remoteIosSetting, a as SETTING_SHAPE_REMEDY, et as settingShapeErrors, p as cacheProviderSettingError, rt as tunnelModeSetting } from "./settings-C7O8A6ZI.mjs";
4
+ import { Fn as processContext, Y as statsProjectKey } from "./budget-Cvwn54qV.mjs";
5
+ import { d as runCancellationSignal } from "./native-run-NwUuxbkg.mjs";
6
+ import { c as fingerprintDiffRecord, i as configInputsChanged, m as refingerprintAfterMutation, n as buildCacheKey, r as changedDuringBuildLine, s as filesystemBuildCapability, u as inputsChangedDuringBuild, y as untrackedMissLine } from "./build-cache-Dv7RN200.mjs";
6
7
  import { d as optimizationBuildProfile, l as artifactCachePolicy, p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
7
- import { b as bundlerPin } from "./xcode-Zlx3qjEs.mjs";
8
- import { i as iosToolchainAsync } from "./toolchain-Hp9sCpK4.mjs";
9
- import { a as deviceModelRefusal, c as iosProjectPathError, f as podAction, h as resolveDeviceType, l as iosProviderRunOptions, m as resolveConfiguration, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-Dlu37g6H.mjs";
10
- import { i as planEasDevelopmentBuild, n as easDeviceBuildRemedy } from "./eas-build-BomfRnFT.mjs";
11
- import { a as explainBuildMiss, i as staleNativeDirRefusal, n as recordPrebuild, o as fingerprintErrorMissReason } from "./prebuild-uD_ipCxF.mjs";
12
- import { r as planPayload, t as planCachedBuild } from "./build-plan-CaFskB7_.mjs";
13
- import { t as IosRecipeRefusal } from "./ios-project-WuwwBdvW.mjs";
14
- import { i as hostedIosSelectors } from "./remote-ByYkXdGD.mjs";
15
- import { c as copyAppAside, i as DEFAULT_DEPS, n as iosMetroRuntime, r as iosProcessRuntime, u as writeIpTxt } from "./launch-Zq2mOSDy.mjs";
16
- import { t as planHostedDevice } from "./plan-placement-Bwj-IjY1.mjs";
8
+ import { b as bundlerPin } from "./xcode-BXn9-xYx.mjs";
9
+ import { a as iosToolchainAsync } from "./toolchain-DpJMHq0n.mjs";
10
+ import { a as deviceModelRefusal, c as iosProjectPathError, f as podAction, h as resolveDeviceType, l as iosProviderRunOptions, m as resolveConfiguration, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-CNioewsd.mjs";
11
+ import { t as readDoctorFingerprint } from "./doctor-fingerprint-DZLoYFVb.mjs";
12
+ import { i as planEasDevelopmentBuild, n as easDeviceBuildRemedy } from "./eas-build-CwknaQYj.mjs";
13
+ import { a as staleNativeDirRefusal, o as explainBuildMiss, r as recordPrebuild, s as fingerprintErrorMissReason } from "./prebuild-D4JoEAEs.mjs";
14
+ import { r as planPayload, t as planCachedBuild } from "./build-plan-DUC8Ka9y.mjs";
15
+ import { t as IosRecipeRefusal } from "./ios-project-CZhKODF3.mjs";
16
+ import { a as hostedIosSelectors } from "./remote-DjGDmlTZ.mjs";
17
+ import { c as copyAppAside, i as DEFAULT_DEPS, n as iosMetroRuntime, r as iosProcessRuntime, u as writeIpTxt } from "./launch-BjxemNpK.mjs";
18
+ import { t as planHostedDevice } from "./plan-placement-DIsMtN-d.mjs";
17
19
  import { rmSync } from "node:fs";
18
20
  import chalk from "chalk";
19
21
  //#region src/integrations/react-native-ios-plan.ts
20
- function note(line) {
21
- console.error(line);
22
- }
23
22
  function refuse(refusal, lines = []) {
24
23
  return {
25
24
  refusal,
26
25
  lines
27
26
  };
28
27
  }
29
- async function planReactNativeIos(root, opts, d, schemeProblem, { context: settingsContext, settings }) {
28
+ async function planReactNativeIos(root, opts, d, schemeProblem, { context: settingsContext, settings }, operation = processContext(root)) {
29
+ const note = (line) => operation.output("stderr", `${line}\n`);
30
30
  const iosProject = resolveIosProjectDir(settings, root);
31
31
  const [shapeError, ...moreShapeErrors] = settingShapeErrors(settings);
32
32
  if (shapeError) return refuse({
@@ -66,7 +66,7 @@ async function planReactNativeIos(root, opts, d, schemeProblem, { context: setti
66
66
  const isExpo = d.detectIsExpo(root);
67
67
  const settingsLayersForOrigin = d.settingsLayers(settingsContext);
68
68
  const iosRemote = remoteIosSetting(settings);
69
- const modelRefusal = deviceModelRefusal({
69
+ const modelRefusal = await deviceModelRefusal({
70
70
  slot,
71
71
  deviceTypeFlag: opts.deviceType,
72
72
  runtimeFlag: opts.runtime,
@@ -77,11 +77,15 @@ async function planReactNativeIos(root, opts, d, schemeProblem, { context: setti
77
77
  physical: false,
78
78
  remoteBackend: iosRemote?.kind === "backend" ? iosRemote.backend : null,
79
79
  hosted: iosRemote?.kind === "machine",
80
- listRuntimes: d.listIosRuntimes
80
+ listRuntimes: d.listIosRuntimes,
81
+ signal: operation?.signal
81
82
  });
82
83
  if (modelRefusal) return refuse(modelRefusal);
83
84
  if (opts.easProfile !== void 0) {
84
85
  const eas = await planEasDevelopmentBuild({
86
+ context: operation,
87
+ env: operation?.env,
88
+ signal: operation?.signal,
85
89
  root,
86
90
  platform: "ios",
87
91
  profile: opts.easProfile,
@@ -118,11 +122,16 @@ async function planReactNativeIos(root, opts, d, schemeProblem, { context: setti
118
122
  const cachePolicy = artifactCachePolicy(optimizations, opts.buildCache !== false, isReleaseConfiguration(configuration));
119
123
  let fingerprint;
120
124
  try {
121
- fingerprint = await d.fingerprintProject(root, {
125
+ fingerprint = operation && reportSignal(operation) ? await readDoctorFingerprint(operation, {
126
+ root,
127
+ platform: "ios",
128
+ iosProjectPath: iosProject.relative
129
+ }) : await d.fingerprintProject(root, {
122
130
  platform: "ios",
123
131
  iosProjectPath: iosProject.relative
124
132
  });
125
133
  } catch (error) {
134
+ operation?.signal.throwIfAborted();
126
135
  note(chalk.dim(`Fingerprinting failed: ${error?.message || error}`));
127
136
  }
128
137
  if (!fingerprint?.hash) return refuse({
@@ -140,6 +149,7 @@ async function planReactNativeIos(root, opts, d, schemeProblem, { context: setti
140
149
  let placement;
141
150
  if (iosRemote?.kind === "machine") {
142
151
  const planned = await planHostedDevice({
152
+ operation,
143
153
  root,
144
154
  slot,
145
155
  platform: "ios",
@@ -147,6 +157,8 @@ async function planReactNativeIos(root, opts, d, schemeProblem, { context: setti
147
157
  selectors: hostedIosSelectors(resolveDeviceType(opts.deviceType, settings), resolveRuntime(opts.runtime, settings)),
148
158
  sameKey: (choice) => keyArch("runtime" in choice ? choice.architecture : null) === arch,
149
159
  ...remoteEasFallbackSetting(settings) ? { eas: () => d.checkEasFallback({
160
+ operation,
161
+ env: operation?.env,
150
162
  root,
151
163
  platform: "ios",
152
164
  slot,
@@ -183,6 +195,7 @@ async function planReactNativeIos(root, opts, d, schemeProblem, { context: setti
183
195
  providerConfig: d.resolveCacheProviderConfig(settingsContext),
184
196
  expoRemote: cachePolicy.remote && !buildProfile && !scheme ? { runOptions: iosProviderRunOptions(configuration, arch) } : null
185
197
  }, {
198
+ operation,
186
199
  loadCacheProvider: d.loadCacheProvider,
187
200
  loadProjectProvider: d.loadProjectProvider,
188
201
  checkEasAuth: d.checkEasAuth,
@@ -219,10 +232,10 @@ function reactNativeIosProject(root, settings, dependencies = {}) {
219
232
  const isExpo = d.detectIsExpo(root);
220
233
  const iosProject = resolveIosProjectDir(settings, root);
221
234
  return {
222
- plan: (options, resolved) => planReactNativeIos(root, options, {
235
+ plan: (options, resolved, operation) => planReactNativeIos(root, options, {
223
236
  ...DEFAULT_DEPS,
224
237
  ...dependencies
225
- }, (scheme) => reactNativeIosSchemeProblem(root, iosProject.dir, scheme, isExpo, d), resolved),
238
+ }, (scheme) => reactNativeIosSchemeProblem(root, iosProject.dir, scheme, isExpo, d), resolved, operation),
226
239
  isExpo,
227
240
  bundleId: () => d.detectBundleId(root, iosProject.dir),
228
241
  schemeProblem: (scheme) => reactNativeIosSchemeProblem(root, iosProject.dir, scheme, isExpo, d),
@@ -410,7 +423,7 @@ function reactNativeIosArtifact({ operation, root, logFile, configuration, build
410
423
  materialize,
411
424
  async prepare(beforePrepare) {
412
425
  mutatingSteps = [];
413
- const prebuild = d.planPrebuild(root, PLATFORM, {
426
+ const prebuild = await d.planPrebuild(root, PLATFORM, {
414
427
  isExpo,
415
428
  fingerprint,
416
429
  sources: fingerprintSources
@@ -563,7 +576,7 @@ function reactNativeIosArtifact({ operation, root, logFile, configuration, build
563
576
  projectRoot: root,
564
577
  iosProjectPath: iosProject.relative
565
578
  })),
566
- legacyCache: physical || !cachePolicy.remote || buildProfile || buildScheme ? null : {
579
+ expoCache: physical || !cachePolicy.remote || buildProfile || buildScheme ? null : {
567
580
  load: () => d.loadProjectProvider(root, {
568
581
  context: operation,
569
582
  isExpo
@@ -589,6 +602,7 @@ function reactNativeIosArtifact({ operation, root, logFile, configuration, build
589
602
  }),
590
603
  request: (runtime) => ({
591
604
  platform: "ios",
605
+ cacheArtifact: cachePolicy.write && cachePolicy.remote,
592
606
  runtime,
593
607
  configuration,
594
608
  scheme: buildScheme ?? null,
@@ -1,4 +1,4 @@
1
- import { bt as gitCommonDirOnDisk } from "./settings-CsJDEXgK.mjs";
1
+ import { yt as gitCommonDirOnDisk } from "./settings-C7O8A6ZI.mjs";
2
2
  import { existsSync } from "node:fs";
3
3
  import { loadConfig, recordingEnabled, workspaceRecordingsDir } from "@stim-cli/core/state";
4
4
  import { rm } from "node:fs/promises";
@@ -0,0 +1,51 @@
1
+ import { g as process_identity_exports } from "./exec-DEoAhcze.mjs";
2
+ import { readMacosRecord } from "@stim-cli/core/state";
3
+ //#region src/macos/registration.ts
4
+ function waitForMacosRegistration(root, launchId, child, deadline) {
5
+ return new Promise((resolve, reject) => {
6
+ let settled = false;
7
+ let repairTimer;
8
+ let deadlineTimer;
9
+ const finish = (record, error) => {
10
+ if (settled) return;
11
+ settled = true;
12
+ clearTimeout(repairTimer);
13
+ clearTimeout(deadlineTimer);
14
+ child.removeListener("exit", onExit);
15
+ child.removeListener("error", onError);
16
+ child.removeListener("message", onMessage);
17
+ child.removeListener("disconnect", check);
18
+ if (child.connected) child.disconnect();
19
+ if (error) reject(error);
20
+ else resolve(record);
21
+ };
22
+ const check = () => {
23
+ if (settled) return;
24
+ if (Date.now() >= deadline) return finish(null);
25
+ const current = readMacosRecord(root);
26
+ if (current?.launchId === launchId && current.app && current.supervisor && (0, process_identity_exports.inspectProcessIdentity)(current.app) === "same" && (0, process_identity_exports.inspectProcessIdentity)(current.supervisor) === "same") finish(current);
27
+ else if (child.exitCode !== null || child.signalCode !== null) finish(null);
28
+ };
29
+ const onExit = () => {
30
+ check();
31
+ finish(null);
32
+ };
33
+ const onError = (error) => finish(null, error);
34
+ const onMessage = (message) => {
35
+ if (message === "macos-registered") check();
36
+ };
37
+ const repair = () => {
38
+ check();
39
+ if (!settled) repairTimer = setTimeout(repair, 1e3);
40
+ };
41
+ child.once("exit", onExit);
42
+ child.once("error", onError);
43
+ child.on("message", onMessage);
44
+ child.once("disconnect", check);
45
+ deadlineTimer = setTimeout(() => finish(null), Math.max(0, deadline - Date.now()));
46
+ check();
47
+ if (!settled) repairTimer = setTimeout(repair, 100);
48
+ });
49
+ }
50
+ //#endregion
51
+ export { waitForMacosRegistration as t };
@@ -1,18 +1,19 @@
1
- import { U as deviceSlotPlatforms, W as parseDeviceSlotKey, p as getProject } from "./config-CYcBF478.mjs";
2
- import { f as refuseNoProject, l as phaseLine } from "./command-output-B1UrjZHL.mjs";
3
- import { a as recordWorkspaceUseAsync, r as readWorkspaceState$1 } from "./workspace-state-Cjuigeeu.mjs";
4
- import { $t as cancelledError, It as repoRootAsync, Qt as cancellableSleep, en as throwIfCancelled } from "./settings-CsJDEXgK.mjs";
5
- import { I as readWorkspaceLaunches, r as findCommandWorkspaceAsync } from "./project-BZNjmW_8.mjs";
6
- import { d as processCwds, f as resolveProjectMetro, g as isMetroRunning, o as listeningPidsAsync } from "./metro-DEXpIhHC.mjs";
7
- import { d as webFactsAsync, o as readWebRecord, r as cdpEndpoint } from "./state-C4ZtUisW.mjs";
8
- import { Sn as iosAppProcess, _n as ensureMetroReverse, dn as androidAppProcess } from "./budget-Bs6SxxzO.mjs";
9
- import { Q as resolveOwnedAvdSerialAsync } from "./android-DUYkNF4u.mjs";
10
- import { E as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-CpByZy12.mjs";
11
- import { f as probeHostedSession } from "./hosted-client-DB_gBPfY.mjs";
12
- import { r as readHostedNative } from "./ios-state-DvFX-K_l.mjs";
13
- import { r as reopenHostedAndroidMetro } from "./hosted-android-Bw-honsd.mjs";
14
- import { n as nativeRunCommand } from "./slot-launch-DF8VfT64.mjs";
15
- import { n as sendToOwnedPage, t as liveWebRecord } from "./page-CPaHeYqj.mjs";
1
+ import { H as deviceSlotPlatforms, U as parseDeviceSlotKey, p as getProject } from "./config-DlrsduwG.mjs";
2
+ import { f as refuseNoProject, l as phaseLine } from "./command-output-gwpm28fu.mjs";
3
+ import { d as cancelledError, f as throwIfCancelled, u as cancellableSleep } from "./operation-exec-BW0em61G.mjs";
4
+ import { a as recordWorkspaceUseAsync, r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
5
+ import { Nt as repoRootAsync } from "./settings-C7O8A6ZI.mjs";
6
+ import { I as readWorkspaceLaunches, r as findCommandWorkspaceAsync } from "./project-wM_XFTvE.mjs";
7
+ import { a as listeningPidsAsync, d as resolveProjectMetro, h as isMetroRunning, u as processCwds } from "./metro-DiXtA3Ty.mjs";
8
+ import { d as webFactsAsync, o as readWebRecord, r as cdpEndpoint } from "./state--smjFSTL.mjs";
9
+ import { Sn as iosAppProcess, _n as ensureMetroReverse, dn as androidAppProcess } from "./budget-Cvwn54qV.mjs";
10
+ import { et as resolveOwnedAvdSerialAsync } from "./android-C7sVmyI9.mjs";
11
+ import { E as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-hcBpnEGk.mjs";
12
+ import { f as probeHostedSession } from "./hosted-client-DZAPrcro.mjs";
13
+ import { r as readHostedNative } from "./ios-state-Dtw5K2aI.mjs";
14
+ import { r as reopenHostedAndroidMetro } from "./hosted-android-B-9f-jkd.mjs";
15
+ import { n as nativeRunCommand } from "./slot-launch-CbfmNgM6.mjs";
16
+ import { n as sendToOwnedPage, t as liveWebRecord } from "./page-DBL2PiUU.mjs";
16
17
  import { hostedAndroidDeviceName, hostedNativeRecords } from "@stim-cli/core/state";
17
18
  import { WebSocket } from "ws";
18
19
  import chalk from "chalk";
@@ -1,2 +1,2 @@
1
- import { n as reloadCommand, r as runReload, t as registerReload } from "./reload-CmTRFJaX.mjs";
1
+ import { n as reloadCommand, r as runReload, t as registerReload } from "./reload-BzkYabB-.mjs";
2
2
  export { reloadCommand as default, registerReload, runReload };