stim 1.23.1 → 1.25.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.
- package/README.md +3 -2
- package/dist/{acquire-artifact-BzYRDgaP.mjs → acquire-artifact-zA4S7RHE.mjs} +2 -2
- package/dist/{act-vxiMwdf5.mjs → act-BbHS3oV8.mjs} +41 -26
- package/dist/{activity-BpWUPgUm.mjs → activity-BpjwrQXU.mjs} +6 -6
- package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-Bnkerfod.mjs} +5 -5
- package/dist/{android-DtfRGLcc.mjs → android-BGwuK3Mc.mjs} +75 -50
- package/dist/{android-CLi6DSiS.mjs → android-CNZgRC-4.mjs} +5 -5
- package/dist/{android-C7sVmyI9.mjs → android-Cjcj8MCw.mjs} +140 -46
- package/dist/{android-cas-ngferVq2.mjs → android-cas-BVqh2Zep.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-DVWyCbWU.d.mts → android-project-CTYaETc0.d.mts} +6 -2
- package/dist/{android-DR5lZ2Az.mjs → android-saBeB4lr.mjs} +13 -3
- package/dist/api.d.mts +22 -5
- package/dist/api.mjs +32 -31
- package/dist/{artifact-Xvgibgzq.mjs → artifact-Co8zixVx.mjs} +19 -17
- package/dist/{artifact-DBI3DALs.mjs → artifact-DN8JNwqS.mjs} +18 -17
- package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
- package/dist/{browser-web-BJN9ZHxB.mjs → browser-web-CCgZsHmI.mjs} +16 -17
- package/dist/{budget-3ivAK99e.mjs → budget-HyShrIpL.mjs} +149 -47
- package/dist/{build-Dv9s8Fz-.mjs → build-CAiw8Ezm.mjs} +33 -29
- package/dist/{build-cache-Dv7RN200.mjs → build-cache-CKCzxzxA.mjs} +172 -21
- package/dist/{build-plan-BmbdHQbr.mjs → build-plan-zCuHGlA8.mjs} +8 -7
- package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-CH2EWGPB.mjs → ccache-h1FKhZeg.mjs} +6 -6
- package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
- package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
- package/dist/{cli-BkK6Wr5i.mjs → cli-C4w607Pz.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-B4MMzfo_.mjs → client-BQsmyp_-.mjs} +274 -39
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-YKGWivpG.mjs → command-output-BBvS1H6v.mjs} +3 -2
- package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
- package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
- package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-BwNCYG5Q.mjs} +2 -2
- package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
- package/dist/{dev-client-BFxiDpkf.mjs → dev-client-CHoXXZeg.mjs} +3 -3
- package/dist/{device-CiNYxqp6.mjs → device-B9FqTBYW.mjs} +81 -54
- package/dist/{device-B7ljwccX.mjs → device-F5-4z9ef.mjs} +16 -16
- package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-ZYaRALv5.mjs} +20 -16
- package/dist/device-host-worker.mjs +17 -17
- package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DkHBrmvH.mjs} +32 -50
- package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-ogEeJ62K.mjs} +6 -6
- package/dist/{device-pool-B4iOXIrD.mjs → device-pool-BIg8MU8l.mjs} +3 -3
- package/dist/{doctor-DRu-8ld6.mjs → doctor-A_Nr_fDe.mjs} +1 -1
- package/dist/{doctor-HUC1igzw.mjs → doctor-Bm8TVpGn.mjs} +37 -31
- package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-C6t4Maue.mjs → doctor-k3P3PizH.mjs} +14 -14
- package/dist/{doctor-watchman-iGBpC6KM.mjs → doctor-watchman-BovI1y3-.mjs} +5 -5
- package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CyDKNTBP.mjs} +4 -4
- package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-gaZi-dJL.mjs} +16 -15
- package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-BMCA1gdO.mjs} +12 -8
- package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-B1Mj_-7h.mjs} +17 -42
- package/dist/{errors-ccaPc4ox.mjs → errors-DHm_U5gv.mjs} +2 -1
- package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
- package/dist/{gc-BW8E1uSC.mjs → gc-B9jcnmIk.mjs} +205 -28
- package/dist/{gc-dDE4QPVu.mjs → gc-eaz403W6.mjs} +2 -2
- package/dist/{guide-DYYEO3Wz.mjs → guide-DR0K0xW9.mjs} +328 -89
- package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-Bvb2-ZxD.mjs} +4 -4
- package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-rsRqysJc.mjs} +4 -4
- package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-RtVcJH3u.mjs} +1 -1
- package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CWKGYWNX.mjs} +11 -6
- package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-d0pv9Tth.mjs} +7 -7
- package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-BxTizGU2.mjs} +58 -11
- package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BIyfl0Zj.mjs} +10 -10
- package/dist/{ios-hcBpnEGk.mjs → ios-BQzvJlzw.mjs} +122 -17
- package/dist/{ios-CWjqfSm_.mjs → ios-BRVM8b0P.mjs} +81 -49
- package/dist/{ios-DTOYZGMJ.mjs → ios-Dvt97HgQ.mjs} +8 -8
- package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
- package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
- package/dist/{ios-device-DFGuwF4U.mjs → ios-device-CKSvk0bu.mjs} +3 -3
- package/dist/{ios-project-CSZYI1iu.mjs → ios-project-DCUDo06I.mjs} +5 -5
- package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
- package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-CT9nV5SP.mjs} +15 -7
- package/dist/{js-swap-BSBHldmm.mjs → js-swap-Z9HbC4cj.mjs} +7 -6
- package/dist/{launch-D-zq8SHG.mjs → launch-D0lPvFFu.mjs} +49 -30
- package/dist/{launch-CP2wDCVd.mjs → launch-DscF1QfM.mjs} +52 -50
- package/dist/{logs-pNvA2hHK.mjs → logs-BsIRre8x.mjs} +16 -9
- package/dist/{logs-By5aw3g9.mjs → logs-Crs9y34Z.mjs} +8 -6
- package/dist/{macos-CPMahOC2.mjs → macos-CcUlJPMu.mjs} +1 -1
- package/dist/{macos-C67FZ2ft.mjs → macos-D477nfzH.mjs} +49 -42
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-DiXtA3Ty.mjs → metro-1pJgCX4U.mjs} +4 -4
- package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-Bp9gJQAN.mjs} +3 -4
- package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BVbn8SvC.mjs} +3 -3
- package/dist/{native-android-_MWSs3PP.mjs → native-android-BvMizJn1.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BJscK4vN.mjs} +5 -5
- package/dist/{native-run-Dv88i0aU.mjs → native-run-D5OJsGwA.mjs} +6 -6
- package/dist/{native-runtime-DBRfY_PN.mjs → native-runtime-B9w_Qyz3.mjs} +10 -9
- package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
- package/dist/{native-xcode-inputs-CqViUh3r.mjs → native-xcode-inputs-Cv4l-obn.mjs} +2 -2
- package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-DGrg90hE.mjs} +21 -20
- package/dist/offload-worker.d.mts +12 -4
- package/dist/offload-worker.mjs +78 -43
- package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
- package/dist/{ownership-C5fo5Edb.mjs → ownership-jxxz-19m.mjs} +3 -3
- package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
- package/dist/phone-reverses-CYb7RRAx.mjs +57 -0
- package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DjOXJRIH.mjs} +1 -1
- package/dist/{plan-placement-cr0fEU7b.mjs → plan-placement-BqKgKHCi.mjs} +3 -3
- package/dist/{ports-DpXjKkSV.mjs → ports-DtS1Amb0.mjs} +3 -3
- package/dist/{prebuild-BligW0QS.mjs → prebuild-JUaqOLpc.mjs} +14 -9
- package/dist/{project-DhCtQWWU.mjs → project-BiC68mIp.mjs} +21 -17
- package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-ZlhQfhvq.mjs → react-native-android-DRYqoJc4.mjs} +76 -32
- package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-CwZB-agu.mjs} +23 -20
- package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-BCrytK7h.mjs} +10 -9
- package/dist/{react-native-ios-C5W0SA6f.mjs → react-native-ios-Cr1buNFo.mjs} +41 -24
- package/dist/{recordings-CQmfzAh7.mjs → recordings-BaoQ0t-J.mjs} +1 -1
- package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
- package/dist/{reload-QcwnYLYV.mjs → reload-Beftw2X3.mjs} +1 -1
- package/dist/{reload-COJWTbae.mjs → reload-FbSgMF8x.mjs} +144 -42
- package/dist/{remote-DR8qUERM.mjs → remote-BuZj6AyU.mjs} +16 -7
- package/dist/{result-utnBea7x.mjs → result-CR2vk2cj.mjs} +41 -18
- package/dist/{run-DidHghD1.mjs → run-BtzE09Dl.mjs} +2 -2
- package/dist/{selection-DSMbWEX2.mjs → selection-D5cxEl3t.mjs} +13 -7
- package/dist/{server-bare-CafzuyFB.mjs → server-bare-CH9X0RLn.mjs} +56 -4
- package/dist/{server-command-B9o92sLM.mjs → server-command-CaBbDNU2.mjs} +5 -5
- package/dist/server-expo-C16Zf2k7.mjs +2 -0
- package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Ck8EIidM.mjs} +14 -9
- package/dist/{settings-C7O8A6ZI.mjs → settings-B5tCoq9N.mjs} +132 -39
- package/dist/{settings-PfJx8uK1.mjs → settings-DzH9mGQZ.mjs} +1 -1
- package/dist/{settings-write-Chuy7Cte.mjs → settings-write-n0zwfohx.mjs} +7 -7
- package/dist/settings.schema.json +51 -0
- package/dist/{simslim-BNckWpXi.mjs → simslim-BjxszUAb.mjs} +22 -7
- package/dist/{slot-launch-B7AuoWJv.mjs → slot-launch-QeuJMlnJ.mjs} +6 -6
- package/dist/{stage-C4u17aES.mjs → stage-D8xlRU2D.mjs} +2 -3
- package/dist/{start-BL_BsiWt.mjs → start-C1JLjkNw.mjs} +1 -1
- package/dist/{start-CU8mCPC7.mjs → start-YMpNwLhh.mjs} +75 -35
- package/dist/{state--smjFSTL.mjs → state-DMRNP7-4.mjs} +4 -4
- package/dist/{state-08I3hw3_.mjs → state-DPaM3u5K.mjs} +2 -2
- package/dist/{stats-CO6sK0Nh.mjs → stats-CP7STzZw.mjs} +5 -5
- package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
- package/dist/{status-_WPHzVft.mjs → status-CRLiJ-O_.mjs} +24 -24
- package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
- package/dist/{status-CrJutl6-.mjs → status-cNw6i0_t.mjs} +1 -1
- package/dist/{status-watch-BHFasOZN.mjs → status-watch-Bc2J4TZn.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/stim-clonefile.c +18 -0
- package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
- package/dist/{stop-iuFHjUST.mjs → stop-Br7LKxBE.mjs} +2 -2
- package/dist/{stop-CR5689oB.mjs → stop-COP6PQqw.mjs} +5 -5
- package/dist/{stop-BJ06ipTZ.mjs → stop-Db9Kh-UA.mjs} +109 -56
- package/dist/supervisor-run.mjs +17 -17
- package/dist/{support-CbXPbUMJ.mjs → support-Cxj9CmII.mjs} +6 -6
- package/dist/{support-TWuQlHQo.mjs → support-qKcbgmI5.mjs} +14 -11
- package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-iY9fsmOc.mjs} +4 -4
- package/dist/{swiftpm-macos-DbwGCpZg.mjs → swiftpm-macos-Bp_sn9P4.mjs} +15 -14
- package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-DB1aeqxO.mjs} +1 -1
- package/dist/{toolchain-B9hCFCQw.mjs → toolchain-VzLJzZ7O.mjs} +69 -37
- package/dist/trigger-BLsHgAGR.mjs +2 -0
- package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
- package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-BV3ZPmcY.mjs} +6 -6
- package/dist/{web-DRF_oFXk.mjs → web-B4Yjyt1G.mjs} +12 -10
- package/dist/web-DS4UDWvf.mjs +2 -0
- package/dist/web-run.mjs +8 -9
- package/dist/windows-report.mjs +12 -1
- package/dist/windows-report.ps1 +1 -1
- package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CPSp3mav.mjs} +11 -4
- package/dist/{workspaces-e41xsjKr.mjs → workspaces-C9w4aeXF.mjs} +36 -32
- package/dist/{worktree-B4Nj3EGS.mjs → worktree-CclFIe1Z.mjs} +324 -99
- package/dist/{worktree-BEwxVwKF.mjs → worktree-Ct9Gk3KL.mjs} +1 -1
- package/dist/{xcode-Rq744mBF.mjs → xcode-CiIIDnuD.mjs} +42 -28
- package/package.json +7 -7
- package/shim/bundle-response.cjs +53 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +23 -1
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
- package/dist/server-expo-Ddr8cG_c.mjs +0 -2
- package/dist/trigger-yb_nFzPF.mjs +0 -2
- package/dist/web-kDE9Myoy.mjs +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { r as childEnvironment } from "./operation-exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
|
|
3
|
+
import { o as androidHome } from "./android-Cjcj8MCw.mjs";
|
|
4
|
+
import { n as buildCacheKey } from "./build-cache-CKCzxzxA.mjs";
|
|
5
|
+
import { _ as nativeGradleLocalSourceDigest, h as gradleOffloadInputs } from "./client-BQsmyp_-.mjs";
|
|
5
6
|
import { n as fingerprintNativeInputs } from "./native-inputs-TRTTTRxt.mjs";
|
|
6
|
-
import { r as nativeGradleLocalSourceDigest, t as gradleOffloadInputs } from "./native-gradle-inputs-Dnh84Zbd.mjs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
9
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, b as operationState, g as signalDeclaredSpawns, h as refuseDeclaredSpawns, p as allowDeclaredSpawns, u as withWorkspaceProcessLock, y as isTermination } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
4
|
-
import { o as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey } from "./workspace-state-
|
|
3
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
|
|
4
|
+
import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey } from "./workspace-state-CPSp3mav.mjs";
|
|
5
5
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
6
6
|
import { existsSync, mkdirSync } from "node:fs";
|
|
7
7
|
import { basename, dirname, join } from "node:path";
|
|
@@ -226,12 +226,12 @@ function cancelOnAbort({ context, root, claim, write, controller }) {
|
|
|
226
226
|
requestListeners.set(claim.claimId, onRequest);
|
|
227
227
|
const watch = setInterval(onRequest, REQUEST_POLL_MS);
|
|
228
228
|
watch.unref();
|
|
229
|
-
return () => {
|
|
229
|
+
return async () => {
|
|
230
230
|
clearInterval(watch);
|
|
231
231
|
requestListeners.delete(claim.claimId);
|
|
232
232
|
context.signal.removeEventListener("abort", onAbort);
|
|
233
233
|
allowDeclaredSpawns(context);
|
|
234
|
-
clearNativeRunCancel(root, claim.claimId);
|
|
234
|
+
await withWorkspaceStateLockAsync(root, () => clearNativeRunCancel(root, claim.claimId)).catch(() => {});
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
@@ -257,7 +257,7 @@ function withNativeBuildRun(context, root, details, fn, { write }) {
|
|
|
257
257
|
try {
|
|
258
258
|
return await fn(claim);
|
|
259
259
|
} finally {
|
|
260
|
-
dispose();
|
|
260
|
+
await dispose();
|
|
261
261
|
state.runSignal = void 0;
|
|
262
262
|
}
|
|
263
263
|
}, {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as phaseLine } from "./command-output-
|
|
3
|
-
import { r as readWorkspaceState$1 } from "./workspace-state-
|
|
4
|
-
import {
|
|
5
|
-
import { d as resolveProjectMetro } from "./metro-
|
|
6
|
-
import { Yt as
|
|
7
|
-
import { c as startDevServer } from "./start-
|
|
1
|
+
import { r as ensureWorkspaceStorageAsync } from "./paths-DQtTgsBf.mjs";
|
|
2
|
+
import { l as phaseLine } from "./command-output-BBvS1H6v.mjs";
|
|
3
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-CPSp3mav.mjs";
|
|
4
|
+
import { M as metroPortSetting } from "./settings-B5tCoq9N.mjs";
|
|
5
|
+
import { d as resolveProjectMetro } from "./metro-1pJgCX4U.mjs";
|
|
6
|
+
import { Yt as LAUNCH_BUNDLING, Zt as LAUNCH_UNVERIFIED } from "./budget-HyShrIpL.mjs";
|
|
7
|
+
import { c as startDevServer } from "./start-YMpNwLhh.mjs";
|
|
8
8
|
import { readIdleStop } from "@stim-cli/core/state";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
//#region src/commands/native-runtime.ts
|
|
11
|
-
async function ensureDevServer({ root, port, settings, settingsContext, remote, env, note, resolve = resolveProjectMetro, start = startDevServer, readState = readWorkspaceState$1 }) {
|
|
11
|
+
async function ensureDevServer({ root, port, settings, settingsContext, remote, hostedPorts, env, note, resolve = resolveProjectMetro, start = startDevServer, readState = readWorkspaceState$1 }) {
|
|
12
12
|
const pin = metroPortSetting(settings, env);
|
|
13
13
|
const canReuse = !pin.error && (pin.port === null || pin.port === port);
|
|
14
14
|
const held = port === null || !canReuse ? null : (await resolve(port, root)).metro;
|
|
@@ -26,6 +26,7 @@ async function ensureDevServer({ root, port, settings, settingsContext, remote,
|
|
|
26
26
|
settings,
|
|
27
27
|
settingsContext,
|
|
28
28
|
remote,
|
|
29
|
+
hostedPorts,
|
|
29
30
|
out: note,
|
|
30
31
|
note
|
|
31
32
|
});
|
|
@@ -52,7 +53,7 @@ async function ensureDevServer({ root, port, settings, settingsContext, remote,
|
|
|
52
53
|
}
|
|
53
54
|
async function ensureWorkspaceStorageSafely(root, { note = (_line) => {} } = {}) {
|
|
54
55
|
try {
|
|
55
|
-
return
|
|
56
|
+
return await ensureWorkspaceStorageAsync(root);
|
|
56
57
|
} catch (err) {
|
|
57
58
|
note(chalk.dim(`Could not prepare this workspace's Stim state: ${err?.message || err}`));
|
|
58
59
|
throw err;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as gitAsync } from "./operation-exec-
|
|
1
|
+
import { s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
|
|
2
2
|
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { createReadStream } from "node:fs";
|
|
@@ -85,10 +85,13 @@ async function nativeFileDigest(path, signal) {
|
|
|
85
85
|
sha256: hash.digest("hex")
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
/**
|
|
89
|
-
|
|
88
|
+
/**
|
|
89
|
+
* The exact source a build needs: tracked and untracked, not ignored, as `git ls-files -co --exclude-standard`, and
|
|
90
|
+
* the repository-relative `ignored` paths it also reads.
|
|
91
|
+
*/
|
|
92
|
+
async function sourceManifest(repoRoot, strict = false, signal, ignored = []) {
|
|
90
93
|
const files = [];
|
|
91
|
-
for (const path of await gitVisiblePaths(repoRoot, signal)) {
|
|
94
|
+
for (const path of /* @__PURE__ */ new Set([...await gitVisiblePaths(repoRoot, signal), ...ignored])) {
|
|
92
95
|
signal?.throwIfAborted();
|
|
93
96
|
const absolute = join(repoRoot, path);
|
|
94
97
|
let stat;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as workspaceDir, u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { a as killOnAbort, l as gitQuietAsync, r as childEnvironment } from "./operation-exec-
|
|
3
|
-
import { h as pbxString, m as pbxReferences } from "./project-
|
|
2
|
+
import { a as killOnAbort, l as gitQuietAsync, r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
|
|
3
|
+
import { h as pbxString, m as pbxReferences } from "./project-BiC68mIp.mjs";
|
|
4
4
|
import { n as fingerprintNativeInputs, t as NativeInputError } from "./native-inputs-TRTTTRxt.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { o as sharedCompilationCache } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-
|
|
5
|
-
import { r as register } from "./cache-manifest-
|
|
6
|
-
import {
|
|
7
|
-
import { d as runCancellationSignal } from "./native-run-
|
|
8
|
-
import {
|
|
9
|
-
import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-
|
|
10
|
-
import { a as buildXcode, l as parseSwiftVersion, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-
|
|
11
|
-
import { a as nativeTransferRefusal } from "./client-
|
|
12
|
-
import { _ as runCaptured, a as iosToolchainAsync, h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-
|
|
13
|
-
import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-
|
|
14
|
-
import { r as gateProfileForDevice } from "./ios-signing-
|
|
15
|
-
import {
|
|
16
|
-
import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-
|
|
17
|
-
import { t as IosRecipeRefusal } from "./ios-project-
|
|
18
|
-
import { i as DEFAULT_DEPS, r as iosProcessRuntime } from "./launch-
|
|
19
|
-
import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-
|
|
3
|
+
import { K as resolveCacheProviderConfig, Pt as repoRootAsync, W as remoteIosSetting, tt as settingShapeErrors } from "./settings-B5tCoq9N.mjs";
|
|
4
|
+
import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-BiC68mIp.mjs";
|
|
5
|
+
import { r as register } from "./cache-manifest-BPXRONJz.mjs";
|
|
6
|
+
import { Rn as processContext, Z as statsProjectKey } from "./budget-HyShrIpL.mjs";
|
|
7
|
+
import { d as runCancellationSignal } from "./native-run-D5OJsGwA.mjs";
|
|
8
|
+
import { l as filesystemBuildCapability, n as buildCacheKey } from "./build-cache-CKCzxzxA.mjs";
|
|
9
|
+
import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
|
|
10
|
+
import { a as buildXcode, l as parseSwiftVersion, p as readBundleId, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-CiIIDnuD.mjs";
|
|
11
|
+
import { a as nativeTransferRefusal } from "./client-BQsmyp_-.mjs";
|
|
12
|
+
import { _ as runCaptured, a as iosToolchainAsync, h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-VzLJzZ7O.mjs";
|
|
13
|
+
import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-qKcbgmI5.mjs";
|
|
14
|
+
import { r as gateProfileForDevice } from "./ios-signing-4c_qXvQm.mjs";
|
|
15
|
+
import { s as explainBuildMiss, u as skippedMissReason } from "./prebuild-JUaqOLpc.mjs";
|
|
16
|
+
import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-zCuHGlA8.mjs";
|
|
17
|
+
import { t as IosRecipeRefusal } from "./ios-project-DCUDo06I.mjs";
|
|
18
|
+
import { i as DEFAULT_DEPS, r as iosProcessRuntime } from "./launch-DscF1QfM.mjs";
|
|
19
|
+
import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-Cv4l-obn.mjs";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { join } from "node:path";
|
|
22
22
|
//#region src/integrations/native-xcode-ios.ts
|
|
@@ -132,7 +132,8 @@ function nativeRecipe(root, context) {
|
|
|
132
132
|
},
|
|
133
133
|
cache: () => filesystemBuildCapability({
|
|
134
134
|
context: context.operation,
|
|
135
|
-
sources: snapshot ? nativeXcodeSources(snapshot) : null
|
|
135
|
+
sources: snapshot ? nativeXcodeSources(snapshot) : null,
|
|
136
|
+
readAppId: (path) => readBundleId(path)
|
|
136
137
|
}),
|
|
137
138
|
async prepare(beforePrepare) {
|
|
138
139
|
const pods = readPodState(root, root);
|
|
@@ -322,7 +323,7 @@ function nativeRecipe(root, context) {
|
|
|
322
323
|
platform: "ios",
|
|
323
324
|
native: "xcode",
|
|
324
325
|
local: {
|
|
325
|
-
...await iosToolchainAsync(root,
|
|
326
|
+
...await iosToolchainAsync(root, null),
|
|
326
327
|
...context.target.hostedArchitecture ? { arch: context.target.hostedArchitecture === "x86_64" ? "x64" : "arm64" } : {}
|
|
327
328
|
},
|
|
328
329
|
runtime,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { c as IosToolchain, g as CompilationCacheActivity, h as CcacheActivity, i as AndroidBuildOptions, l as WorkerToolchain, p as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt } from "./android-project-
|
|
1
|
+
import { c as IosToolchain, g as CompilationCacheActivity, h as CcacheActivity, i as AndroidBuildOptions, l as WorkerToolchain, p as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt } from "./android-project-CTYaETc0.mjs";
|
|
2
2
|
import { StimContext } from "@stim-cli/core";
|
|
3
|
-
import { BuildReactNativeArtifactQuery, BuildStartParams, BuildSwiftpmArtifactQuery } from "@stim-cli/core/protocol";
|
|
3
|
+
import { BuildFingerprintSource, BuildReactNativeArtifactQuery, BuildStartParams, BuildSwiftpmArtifactQuery } from "@stim-cli/core/protocol";
|
|
4
4
|
//#region src/offload/react-native-artifact.d.ts
|
|
5
5
|
type ArtifactTools = (IosToolchain & {
|
|
6
6
|
os: string;
|
|
7
|
-
}) | Pick<WorkerToolchain, "stimBuild" | "os" | "arch" | "jdk" | "androidSdk"
|
|
7
|
+
}) | (Pick<WorkerToolchain, "stimBuild" | "os" | "arch" | "jdk" | "androidSdk"> & {
|
|
8
|
+
compat: number;
|
|
9
|
+
});
|
|
8
10
|
interface ArtifactReceipt {
|
|
9
11
|
identity: {
|
|
10
12
|
hash: string;
|
|
@@ -76,7 +78,6 @@ interface WorkerJob {
|
|
|
76
78
|
} | null;
|
|
77
79
|
swiftpmCache: string;
|
|
78
80
|
project: string;
|
|
79
|
-
packageName: string | null;
|
|
80
81
|
isExpo: boolean;
|
|
81
82
|
configuration: string | null;
|
|
82
83
|
scheme: string | null;
|
|
@@ -84,8 +85,15 @@ interface WorkerJob {
|
|
|
84
85
|
runtime: string | null;
|
|
85
86
|
android: AndroidBuildOptions | null;
|
|
86
87
|
expectedFingerprint: string | null;
|
|
88
|
+
/** The client's sources of `expectedFingerprint`, when its stim-server forwards them. */
|
|
89
|
+
expectedSources?: BuildFingerprintSource[];
|
|
90
|
+
/** The paths the client's git ignored for `expectedFingerprint`, which this checkout's git may not. */
|
|
91
|
+
expectedIgnored?: string[];
|
|
92
|
+
/** The top-level entries the client counted although an ignore pattern matches them; this checkout has no index. */
|
|
93
|
+
expectedTracked?: string[];
|
|
87
94
|
cacheArtifact?: boolean;
|
|
88
95
|
stimBuild?: string;
|
|
96
|
+
compat?: number;
|
|
89
97
|
native?: BuildStartParams["native"];
|
|
90
98
|
optimizations: Optimizations["ios"] | null;
|
|
91
99
|
/** How long the client's Gradle daemon stays warm after an Android build; 0 or absent stops it when the build ends. */
|
package/dist/offload-worker.mjs
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { d as workspaceDir, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { k as writeConfigSetting } from "./config-
|
|
3
|
+
import { k as writeConfigSetting } from "./config-BZhXY15H.mjs";
|
|
4
4
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { o as git, s as gitAsync } from "./operation-exec-
|
|
6
|
-
import { d as androidLayoutSetting, y as iosProjectDirSetting } from "./settings-
|
|
7
|
-
import { f as projectRegistry, g as selectNativeXcodeProject } from "./project-
|
|
5
|
+
import { o as git, s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
|
|
6
|
+
import { d as androidLayoutSetting, y as iosProjectDirSetting } from "./settings-B5tCoq9N.mjs";
|
|
7
|
+
import { f as projectRegistry, g as selectNativeXcodeProject } from "./project-BiC68mIp.mjs";
|
|
8
8
|
import { o as parseNdjsonText } from "./ndjson-CgE_o3Dl.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { _ as
|
|
12
|
-
import { n as CCACHE_UNAVAILABLE, o as resolveCcache } from "./ccache-
|
|
13
|
-
import {
|
|
14
|
-
import { f as workerToolchain, h as readPodState, i as availableIphone, m as podsAreStale, v as runPodInstall } from "./toolchain-
|
|
9
|
+
import { Rn as processContext } from "./budget-HyShrIpL.mjs";
|
|
10
|
+
import { d as fingerprintProject, i as compareSourceLists, v as refingerprintAfterMutation } from "./build-cache-CKCzxzxA.mjs";
|
|
11
|
+
import { _ as unmetNodePin, g as projectNodeLine, h as pathNodeVersion, v as withProjectNode } from "./server-expo-Ck8EIidM.mjs";
|
|
12
|
+
import { n as CCACHE_UNAVAILABLE, o as resolveCcache } from "./ccache-h1FKhZeg.mjs";
|
|
13
|
+
import { C as COMPILATION_CACHE_CORRUPT, b as validateGradleManifest, f as reactNativeArtifactReceipt, g as gradleStateDirectories, h as gradleOffloadInputs, m as reactNativeBuildQuery, p as reactNativeArtifactToolchain, v as nativeGradleOutputs, w as clearCorruptCompilationCache, x as verifyGradleTransfer } from "./client-BQsmyp_-.mjs";
|
|
14
|
+
import { f as workerToolchain, h as readPodState, i as availableIphone, m as podsAreStale, v as runPodInstall } from "./toolchain-VzLJzZ7O.mjs";
|
|
15
15
|
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
16
|
-
import { a as sourceManifest, o as verifyNativeTransfer } from "./native-source-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { r as
|
|
26
|
-
import {
|
|
27
|
-
import { a as nativeGradleWorkerArtifactIdentity, i as nativeGradleArtifactSnapshotFromReceipt, o as nativeGradleWorkerScope } from "./native-gradle-artifact-inputs-DHFnmrVf.mjs";
|
|
16
|
+
import { a as sourceManifest, o as verifyNativeTransfer } from "./native-source-D-4Dh4JU.mjs";
|
|
17
|
+
import { n as buildAndroid, o as gradlewPath, r as buildIos, u as assembleTaskFor } from "./react-native-build-CwZB-agu.mjs";
|
|
18
|
+
import { f as podAction } from "./support-qKcbgmI5.mjs";
|
|
19
|
+
import { a as runPrebuild, r as recordPrebuild, t as planPrebuild } from "./prebuild-JUaqOLpc.mjs";
|
|
20
|
+
import { g as dumpApkManifest, p as apkPackage } from "./support-Cxj9CmII.mjs";
|
|
21
|
+
import { n as buildAndroidOperation, t as buildIosOperation } from "./build-CAiw8Ezm.mjs";
|
|
22
|
+
import { i as stageBundle, n as resolveBundleExtras } from "./stage-D8xlRU2D.mjs";
|
|
23
|
+
import { t as logLines } from "./run-BtzE09Dl.mjs";
|
|
24
|
+
import { r as nativeXcodeMetadataDirectories } from "./native-xcode-inputs-Cv4l-obn.mjs";
|
|
25
|
+
import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-iY9fsmOc.mjs";
|
|
26
|
+
import { a as nativeGradleWorkerArtifactIdentity, i as nativeGradleArtifactSnapshotFromReceipt, o as nativeGradleWorkerScope } from "./native-gradle-artifact-inputs-BJscK4vN.mjs";
|
|
28
27
|
import { createHash } from "node:crypto";
|
|
29
28
|
import { chmodSync, constants, copyFileSync, cpSync, createReadStream, createWriteStream, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
|
|
30
29
|
import { isDeepStrictEqual } from "node:util";
|
|
31
30
|
import { basename, delimiter, dirname, join, relative, resolve, sep } from "node:path";
|
|
32
|
-
import { dependencyInstall, withAmbientContext } from "@stim-cli/core";
|
|
31
|
+
import { dependencyInstall, reusableDependencies, withAmbientContext } from "@stim-cli/core";
|
|
33
32
|
import { isJsonObject, windowsShortDir, windowsShortDirKey } from "@stim-cli/core/state";
|
|
34
33
|
import { realpath } from "node:fs/promises";
|
|
35
34
|
import { pipeline } from "node:stream/promises";
|
|
@@ -482,9 +481,35 @@ async function materialize(job, src) {
|
|
|
482
481
|
renameSync(tmp, recordFile);
|
|
483
482
|
return {
|
|
484
483
|
written,
|
|
485
|
-
removed
|
|
484
|
+
removed,
|
|
485
|
+
record: next
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
+
/** The synced files whose content no longer matches the manifest, such as a lockfile pod install rewrote. */
|
|
489
|
+
function rewrittenFiles(src, manifest, record) {
|
|
490
|
+
return manifest.flatMap((entry) => {
|
|
491
|
+
if (entry.kind === "directory") return [];
|
|
492
|
+
const target = join(src, entry.path);
|
|
493
|
+
const stat = lstatSync(target, { throwIfNoEntry: false });
|
|
494
|
+
const known = record[entry.path];
|
|
495
|
+
if (stat && known && stat.mtimeMs === known.mtimeMs && stat.size === known.size) return [];
|
|
496
|
+
if (!stat) return [entry.path];
|
|
497
|
+
const content = stat.isSymbolicLink() ? readlinkSync(target) : stat.isFile() ? readFileSync(target) : null;
|
|
498
|
+
return content !== null && createHash("sha256").update(content).digest("hex") === entry.sha256 ? [] : [entry.path];
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
function namedList(names) {
|
|
502
|
+
const shown = names.slice(0, 3).join(", ");
|
|
503
|
+
return names.length > 3 ? `${shown} and ${names.length - 3} more` : shown;
|
|
504
|
+
}
|
|
505
|
+
function fingerprintMismatch(job, there, sources, mutated) {
|
|
506
|
+
const differing = job.expectedSources ? compareSourceLists(job.expectedSources, [...sources]).map((change) => change.name) : [];
|
|
507
|
+
return [
|
|
508
|
+
`the checkout there fingerprints ${there.slice(0, 12)}, here ${job.expectedFingerprint?.slice(0, 12)}`,
|
|
509
|
+
...mutated.files.length ? [`${mutated.steps.join(" and ")} there rewrote ${namedList(mutated.files)}`] : [],
|
|
510
|
+
...differing.length ? [`differing sources: ${namedList(differing)}`] : []
|
|
511
|
+
].join("; ");
|
|
512
|
+
}
|
|
488
513
|
/**
|
|
489
514
|
* Puts the Node that `root`, or the nearest directory above it in `src`, pins first on this worker's `PATH`, and
|
|
490
515
|
* reports which Node the build runs on.
|
|
@@ -510,17 +535,15 @@ function useXcodeNode(iosDir) {
|
|
|
510
535
|
}
|
|
511
536
|
/** Installs JavaScript dependencies when the lockfile, or the install command, changed since the last install. */
|
|
512
537
|
async function ensureDependencies(job, src) {
|
|
513
|
-
const install = dependencyInstall(src,
|
|
538
|
+
const install = dependencyInstall(src, relative(src, realpathSync(join(src, job.project))));
|
|
514
539
|
if (!install) return;
|
|
515
540
|
const { command, args, digest, lockfile } = install;
|
|
516
|
-
const marker = join(job.area,
|
|
541
|
+
const marker = join(job.area, install.marker);
|
|
517
542
|
const installed = () => writeFileSync(join(job.area, "lockfile"), lockfile);
|
|
518
|
-
if (
|
|
519
|
-
|
|
520
|
-
}
|
|
521
|
-
note("deps", `${command} ${args.join(" ")}`);
|
|
543
|
+
if (reusableDependencies(job.area, job.project, lockfile)) return installed();
|
|
544
|
+
note("deps", `${command} ${args.join(" ")}${install.dir === "." ? "" : ` in ${install.dir}`}`);
|
|
522
545
|
const child = getExecutor().spawn(command, args, {
|
|
523
|
-
cwd: src,
|
|
546
|
+
cwd: join(src, install.dir),
|
|
524
547
|
env: {
|
|
525
548
|
...process.env,
|
|
526
549
|
CI: "1"
|
|
@@ -722,7 +745,9 @@ async function build(job) {
|
|
|
722
745
|
const initial = await time("fingerprintMs", () => fingerprintProject(realRoot, {
|
|
723
746
|
platform,
|
|
724
747
|
iosProjectPath: iosProject.relative,
|
|
725
|
-
androidLayout
|
|
748
|
+
androidLayout,
|
|
749
|
+
ignoredPaths: job.expectedIgnored,
|
|
750
|
+
trackedPaths: job.expectedTracked
|
|
726
751
|
}));
|
|
727
752
|
if (!initial) return failed("no-fingerprint", "The remote machine could not fingerprint the project.");
|
|
728
753
|
const plan = planPrebuild(realRoot, platform, {
|
|
@@ -737,7 +762,7 @@ async function build(job) {
|
|
|
737
762
|
recordPrebuild(realRoot, platform, null);
|
|
738
763
|
const result = await time("prebuildMs", () => runPrebuild(realRoot, platform, log, { clean: plan === "regenerate" }));
|
|
739
764
|
if (result?.failed) return nodeFailed("prebuild-failed", result.reason ?? "expo prebuild failed.");
|
|
740
|
-
mutations.push("prebuild");
|
|
765
|
+
mutations.push("expo prebuild");
|
|
741
766
|
}
|
|
742
767
|
if (platform === "ios") {
|
|
743
768
|
useXcodeNode(iosProject.dir);
|
|
@@ -750,24 +775,31 @@ async function build(job) {
|
|
|
750
775
|
onHeartbeat: (line) => note("pods", line)
|
|
751
776
|
}));
|
|
752
777
|
if (result?.failed) return failed("pods-failed", result.reason ?? "pod install failed.");
|
|
753
|
-
mutations.push("
|
|
778
|
+
mutations.push("pod install");
|
|
754
779
|
}
|
|
755
780
|
}
|
|
756
781
|
fingerprint = initial.hash;
|
|
782
|
+
let sources = initial.sources;
|
|
757
783
|
if (mutations.length) {
|
|
758
784
|
const after = await time("fingerprintMs", () => refingerprintAfterMutation({
|
|
759
785
|
projectRoot: realRoot,
|
|
760
786
|
platform,
|
|
761
787
|
previousHash: initial.hash,
|
|
762
788
|
iosProjectPath: iosProject.relative,
|
|
763
|
-
androidLayout
|
|
789
|
+
androidLayout,
|
|
790
|
+
ignoredPaths: job.expectedIgnored,
|
|
791
|
+
trackedPaths: job.expectedTracked
|
|
764
792
|
}));
|
|
765
793
|
if (!after) return failed("no-fingerprint", `No fingerprint after ${mutations.join(", ")}.`);
|
|
766
794
|
fingerprint = after.hash;
|
|
767
|
-
|
|
795
|
+
sources = after.sources;
|
|
796
|
+
if (mutations.includes("expo prebuild")) recordPrebuild(realRoot, platform, after.hash);
|
|
768
797
|
}
|
|
769
|
-
if (fingerprint !== job.expectedFingerprint) return failed("fingerprint-mismatch",
|
|
770
|
-
|
|
798
|
+
if (fingerprint !== job.expectedFingerprint) return failed("fingerprint-mismatch", fingerprintMismatch(job, fingerprint, sources, {
|
|
799
|
+
steps: mutations,
|
|
800
|
+
files: mutations.length ? rewrittenFiles(src, job.manifest, mirrored.record) : []
|
|
801
|
+
}));
|
|
802
|
+
const tools = job.cacheArtifact ? await reactNativeArtifactToolchain(platform, realRoot, iosProject.dir) : null;
|
|
771
803
|
const query = tools ? reactNativeBuildQuery(job, fingerprint, job.project, tools) : null;
|
|
772
804
|
const receipt = query ? reactNativeArtifactReceipt(query, tools) : null;
|
|
773
805
|
compiled = platform === "android" ? await compileAndroid(job, realRoot, log, time, androidLayout) : await compileIos(job, realRoot, log, time);
|
|
@@ -778,10 +810,12 @@ async function build(job) {
|
|
|
778
810
|
platform,
|
|
779
811
|
previousHash: builtFingerprint,
|
|
780
812
|
iosProjectPath: iosProject.relative,
|
|
781
|
-
androidLayout
|
|
813
|
+
androidLayout,
|
|
814
|
+
ignoredPaths: job.expectedIgnored,
|
|
815
|
+
trackedPaths: job.expectedTracked
|
|
782
816
|
}));
|
|
783
817
|
if (!settled || settled.moved) return failed("fingerprint-moved", "The inputs changed during the build there.");
|
|
784
|
-
const after = query && receipt ? reactNativeArtifactReceipt(query, await reactNativeArtifactToolchain(platform, realRoot)) : null;
|
|
818
|
+
const after = query && receipt ? reactNativeArtifactReceipt(query, await reactNativeArtifactToolchain(platform, realRoot, iosProject.dir)) : null;
|
|
785
819
|
if (receipt && after && isDeepStrictEqual(receipt, after)) compiled.reactNativeArtifact = receipt;
|
|
786
820
|
}
|
|
787
821
|
try {
|
|
@@ -1086,10 +1120,11 @@ async function compileMacos(context, job, root, log, time) {
|
|
|
1086
1120
|
};
|
|
1087
1121
|
try {
|
|
1088
1122
|
const extras = resolveBundleExtras(src, src, options.resources, options.assetCatalog);
|
|
1089
|
-
const
|
|
1123
|
+
const stim = job.compat ? { compat: job.compat } : job.stimBuild ? { stimBuild: job.stimBuild } : null;
|
|
1124
|
+
const query = job.cacheArtifact && options.artifactInputs && job.expectedFingerprint && stim ? {
|
|
1090
1125
|
project: job.project,
|
|
1091
1126
|
sourceDigest: job.expectedFingerprint,
|
|
1092
|
-
|
|
1127
|
+
...stim,
|
|
1093
1128
|
inputs: options.artifactInputs,
|
|
1094
1129
|
build: {
|
|
1095
1130
|
product: options.product,
|
|
@@ -1,28 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as operationState, c as throwIfCancelled, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { sep } from "node:path";
|
|
3
|
-
//#region src/cancellation.ts
|
|
4
|
-
function cancelledError(what, cause) {
|
|
5
|
-
return Object.assign(new Error(`The ${what} was cancelled.`, cause === void 0 ? void 0 : { cause }), { code: "STIM_CANCELLED" });
|
|
6
|
-
}
|
|
7
|
-
function throwIfCancelled(signal, what) {
|
|
8
|
-
if (signal?.aborted) throw cancelledError(what);
|
|
9
|
-
}
|
|
10
|
-
function cancellableSleep(ms, { signal, what = "wait", ref = true } = {}) {
|
|
11
|
-
return new Promise((resolve, reject) => {
|
|
12
|
-
if (signal?.aborted) return reject(cancelledError(what));
|
|
13
|
-
const onAbort = () => {
|
|
14
|
-
clearTimeout(timer);
|
|
15
|
-
reject(cancelledError(what));
|
|
16
|
-
};
|
|
17
|
-
const timer = setTimeout(() => {
|
|
18
|
-
signal?.removeEventListener("abort", onAbort);
|
|
19
|
-
resolve();
|
|
20
|
-
}, ms);
|
|
21
|
-
if (!ref) timer.unref();
|
|
22
|
-
signal?.addEventListener("abort", onAbort, { once: true });
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
3
|
//#region src/workspace/git.ts
|
|
27
4
|
const GIT_TIMEOUT_MS = 1e4;
|
|
28
5
|
const GIT_CONCURRENCY = 6;
|
|
@@ -168,4 +145,4 @@ async function runOperationFileQuiet(context, executor, file, args, options) {
|
|
|
168
145
|
}
|
|
169
146
|
}
|
|
170
147
|
//#endregion
|
|
171
|
-
export { killOnAbort as a, gitQuiet as c,
|
|
148
|
+
export { killOnAbort as a, gitQuiet as c, gitPath as i, gitQuietAsync as l, runOperationFileQuiet as n, git as o, childEnvironment as r, gitAsync as s, runOperationFile as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as withWorkspaceStateLock, d as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-
|
|
3
|
-
import { c as pidExists } from "./metro-
|
|
1
|
+
import { S as process_identity_exports } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { c as withWorkspaceStateLock, d as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-CPSp3mav.mjs";
|
|
3
|
+
import { c as pidExists } from "./metro-1pJgCX4U.mjs";
|
|
4
4
|
import { realpathSync } from "node:fs";
|
|
5
5
|
//#region src/collector/state.ts
|
|
6
6
|
function collectorRoot(root) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as connectOwnedBrowser } from "./cdp-3fwICjzi.mjs";
|
|
1
|
+
import { S as process_identity_exports, c as throwIfCancelled } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { t as connectOwnedBrowser } from "./cdp-BG3FJCCx.mjs";
|
|
4
3
|
//#region src/web/page.ts
|
|
5
4
|
/** The record of a verified live browser: its supervisor and Chrome are the processes the record names. */
|
|
6
5
|
function liveWebRecord(record) {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { U as parseDeviceSlotKey, V as deviceSlotKey } from "./config-BZhXY15H.mjs";
|
|
2
|
+
import { r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-CPSp3mav.mjs";
|
|
3
|
+
import { $ as removeMetroReverses } from "./android-Cjcj8MCw.mjs";
|
|
4
|
+
import { isJsonObject } from "@stim-cli/core/state";
|
|
5
|
+
//#region src/devices/phone-reverses.ts
|
|
6
|
+
const KEY = "phoneReverses";
|
|
7
|
+
function readRecords(state) {
|
|
8
|
+
const raw = state?.[KEY];
|
|
9
|
+
const records = {};
|
|
10
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return records;
|
|
11
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
12
|
+
if (!isJsonObject(value)) continue;
|
|
13
|
+
const entry = value;
|
|
14
|
+
if (typeof entry.serial !== "string" || !Array.isArray(entry.ports) || !parseDeviceSlotKey(key)) continue;
|
|
15
|
+
records[key] = {
|
|
16
|
+
serial: entry.serial,
|
|
17
|
+
ports: entry.ports.filter((port) => Number.isSafeInteger(port) && port > 0)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return records;
|
|
21
|
+
}
|
|
22
|
+
async function recordPhoneReverse(root, slot, serial, port) {
|
|
23
|
+
const key = deviceSlotKey("android", slot);
|
|
24
|
+
await updateWorkspaceStateAsync(root, (state) => {
|
|
25
|
+
const records = readRecords(state);
|
|
26
|
+
const previous = records[key]?.serial === serial ? records[key].ports : [];
|
|
27
|
+
records[key] = {
|
|
28
|
+
serial,
|
|
29
|
+
ports: [.../* @__PURE__ */ new Set([...previous, port])]
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
...state,
|
|
33
|
+
[KEY]: records
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async function removePhoneReverses(root, { slot, operation } = {}) {
|
|
38
|
+
const records = Object.entries(readRecords(readWorkspaceState$1(root))).filter(([key]) => slot === void 0 || parseDeviceSlotKey(key)?.slot === slot);
|
|
39
|
+
for (const [, { serial, ports }] of records) await removeMetroReverses(serial, ports, operation);
|
|
40
|
+
if (records.length === 0) return;
|
|
41
|
+
await updateWorkspaceStateAsync(root, (state) => {
|
|
42
|
+
const remaining = readRecords(state);
|
|
43
|
+
for (const [key, done] of records) {
|
|
44
|
+
const current = remaining[key];
|
|
45
|
+
if (current?.serial !== done.serial) continue;
|
|
46
|
+
current.ports = current.ports.filter((port) => !done.ports.includes(port));
|
|
47
|
+
if (current.ports.length === 0) delete remaining[key];
|
|
48
|
+
}
|
|
49
|
+
const { [KEY]: _, ...rest } = state;
|
|
50
|
+
return Object.keys(remaining).length ? {
|
|
51
|
+
...rest,
|
|
52
|
+
[KEY]: remaining
|
|
53
|
+
} : rest;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { removePhoneReverses as n, recordPhoneReverse as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as buildPlacementSettings } from "./selection-
|
|
1
|
+
import { n as buildPlacementSettings } from "./selection-D5cxEl3t.mjs";
|
|
2
2
|
//#region src/placement-log.ts
|
|
3
3
|
/** `machine` is `local` when the run stays on this machine. */
|
|
4
4
|
function placementRecord(input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as readHostedNative } from "./ios-state-
|
|
3
|
-
import { i as probeHost, n as automaticDevicePlacement } from "./eas-fallback-
|
|
1
|
+
import { f as hostingMachines } from "./selection-D5cxEl3t.mjs";
|
|
2
|
+
import { r as readHostedNative } from "./ios-state-CT9nV5SP.mjs";
|
|
3
|
+
import { i as probeHost, n as automaticDevicePlacement } from "./eas-fallback-gaZi-dJL.mjs";
|
|
4
4
|
import { automaticMachineEnabled } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/device-host/plan-placement.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as getProject } from "./config-
|
|
2
|
-
import { n as findCommandWorkspace } from "./project-
|
|
3
|
-
import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-
|
|
1
|
+
import { p as getProject } from "./config-BZhXY15H.mjs";
|
|
2
|
+
import { n as findCommandWorkspace } from "./project-BiC68mIp.mjs";
|
|
3
|
+
import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-BVbn8SvC.mjs";
|
|
4
4
|
//#region src/commands/ports.ts
|
|
5
5
|
async function inProject(action) {
|
|
6
6
|
try {
|