stim 1.28.0 → 1.30.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/dist/{acquire-artifact-CKByBnTD.mjs → acquire-artifact-CrZ4rEbI.mjs} +1 -1
- package/dist/{act-8iswyfRa.mjs → act-BaKjDWGw.mjs} +479 -29
- package/dist/{activity-DRMg4_mD.mjs → activity-BTaUf0tc.mjs} +6 -5
- package/dist/{agent-device-usage-output-tE90fDdo.mjs → agent-device-usage-output-DYBpO17K.mjs} +4 -4
- package/dist/{android-YWCbmkVK.mjs → android-BCYLwmH6.mjs} +5 -5
- package/dist/{android-D577ApKG.mjs → android-BEQUDpOg.mjs} +1 -1
- package/dist/{android-CHmSU4B4.mjs → android-BWqdDK6R.mjs} +44 -42
- package/dist/{android-CsPs-7Mg.mjs → android-DdKG6lyD.mjs} +44 -35
- package/dist/{android-cas-_aDifWW0.mjs → android-cas-BH6K12__.mjs} +4 -4
- package/dist/{android-project-DUGMbq28.d.mts → android-project-CCEQyYJK.d.mts} +6 -2
- package/dist/api.d.mts +7 -4
- package/dist/api.mjs +27 -27
- package/dist/{apk-signed-tail-CQbwM0qO.mjs → apk-signed-tail-B8kw4a8K.mjs} +2 -2
- package/dist/{artifact-DYtHjxsn.mjs → artifact-DTHXcmQ3.mjs} +12 -12
- package/dist/{artifact-bFkfD3vf.mjs → artifact-M6W2l-xh.mjs} +12 -12
- package/dist/{auto-placement-BVqs8AJi.mjs → auto-placement-CZaWDmcY.mjs} +10 -10
- package/dist/{browser-web-BUaLcafY.mjs → browser-web-JQ7lFej3.mjs} +12 -12
- package/dist/{build-cQURy_KW.mjs → build-C2ZWoCmg.mjs} +23 -23
- package/dist/{build-cache-CZULpXVl.mjs → build-cache-DlC3owap.mjs} +4 -4
- package/dist/{build-plan-CxoYfxsc.mjs → build-plan-J3iRR3gI.mjs} +6 -6
- package/dist/{cache-manifest-DEjqGGat.mjs → cache-manifest-evF_zJ9U.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-Bm_A1xX9.mjs → ccache-B8gY50-h.mjs} +18 -18
- package/dist/{cli-CpbaLDa7.mjs → cli-xRPXJPtA.mjs} +19 -19
- package/dist/cli.mjs +1 -1
- package/dist/{client-YxCer6ab.mjs → client-DrHykA24.mjs} +5 -5
- package/dist/collector-run.mjs +5 -5
- package/dist/{command-output-C8R1KIvi.mjs → command-output-BBW8eWPL.mjs} +1 -1
- package/dist/{config-Cn94Jc0g.mjs → config-AbUjIBOQ.mjs} +121 -19
- package/dist/{dependencies-DKeMzwXY.mjs → dependencies-vUh9mp5z.mjs} +39 -38
- package/dist/{dependency-state-CojA2o0t.mjs → dependency-state-CPKAKCZ8.mjs} +1 -1
- package/dist/{dev-client-D-BW5uiq.mjs → dev-client-CASgAOu7.mjs} +2 -2
- package/dist/device-ChnO7bR9.mjs +761 -0
- package/dist/device-CsIdRXfm.mjs +175 -0
- package/dist/{device-CgXfbcz5.mjs → device-android-CcdQqQWg.mjs} +28 -195
- package/dist/{device-capacity-Cd8lMSn3.mjs → device-capacity-C5C_jOQd.mjs} +11 -11
- package/dist/device-host-worker.mjs +44 -35
- package/dist/{device-ios-Cc9ulihb.mjs → device-ios-DbmtPIiw.mjs} +28 -18
- package/dist/{device-lease-run-Mtzp4THX.mjs → device-lease-run-Do6zYA7y.mjs} +4 -4
- package/dist/{device-pool-eRz6DtCg.mjs → device-pool-CpoYiCGO.mjs} +3 -3
- package/dist/{device-eeK95Lir.mjs → device-provision-B5Ms94qY.mjs} +11 -302
- package/dist/{doctor-xf7ht-5n.mjs → doctor-CJSB5q-s.mjs} +20 -20
- package/dist/{doctor-Bz_ouYAW.mjs → doctor-CLE4AZEI.mjs} +20 -15
- package/dist/{doctor-C2QyhejJ.mjs → doctor-CpfbYh3Q.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BTW82PDC.mjs → doctor-watchman-D1IyMle9.mjs} +4 -4
- package/dist/{eas-build-Dm6q68QY.mjs → eas-build-DIDOHw2P.mjs} +2 -2
- package/dist/{eas-fallback-DajNpxf-.mjs → eas-fallback-DVS9oBSc.mjs} +4 -4
- package/dist/{eas-session-ledger-CBFo_Uo1.mjs → eas-session-ledger-CW3l-inB.mjs} +5 -5
- package/dist/{error-diagnostics-D1QfyJzQ.mjs → error-diagnostics-XJ9eWdtq.mjs} +8 -8
- package/dist/{gc-PLFwb0k4.mjs → gc-BVIcxCxE.mjs} +2 -2
- package/dist/{gc-DM5oMm-J.mjs → gc-Co7PE36D.mjs} +80 -18
- package/dist/{guide-C4I46XAk.mjs → guide-DkepBgHT.mjs} +235 -34
- package/dist/{hosted-android-DlaKLbW0.mjs → hosted-android-Du7NxufJ.mjs} +3 -3
- package/dist/{hosted-client-DDRm9hPJ.mjs → hosted-client-Cect92SZ.mjs} +3 -3
- package/dist/{hosted-logs-bSebOKbz.mjs → hosted-logs-Opcjv1Lr.mjs} +17 -8
- package/dist/{hosted-logs-sync-B0c53W_c.mjs → hosted-logs-sync-wsI7N1Hv.mjs} +7 -11
- package/dist/{hosted-macos-B7-8Pv4H.mjs → hosted-macos-BP9Kucat.mjs} +5 -5
- package/dist/{hosted-native-CDe33CSr.mjs → hosted-native-DmdLSmvu.mjs} +9 -8
- package/dist/{idle-shutdown-CQ0QwU9J.mjs → idle-shutdown-BcMN_cLm.mjs} +7 -7
- package/dist/{ios-B1HvafEG.mjs → ios-BFkBHuRT.mjs} +8 -8
- package/dist/{ios-tg4tp3q1.mjs → ios-CG0IsLtt.mjs} +29 -29
- package/dist/{ios-B1DYuOjh.mjs → ios-CXnoVO_z.mjs} +4 -4
- package/dist/{ios-device-B4elVFKi.mjs → ios-device-ClSfuu-_.mjs} +1 -1
- package/dist/{ios-project-CR4mZ7CH.mjs → ios-project-BM9TbTE7.mjs} +7 -7
- package/dist/{ios-state-BPHqMDdZ.mjs → ios-state-Ce_dystM.mjs} +1 -1
- package/dist/{js-swap-CVpSW1fn.mjs → js-swap-9Rx-5Nqz.mjs} +4 -4
- package/dist/{launch-DoySmhjz.mjs → launch-DvJV1Mx4.mjs} +19 -19
- package/dist/{lightened-DFAJgfIk.mjs → lightened-23pqe7LS.mjs} +4 -4
- package/dist/{logs-BGsW7iPe.mjs → logs-DJgZlf2K.mjs} +9 -8
- package/dist/{logs-DI5ILkYB.mjs → logs-Pkeh3wZk.mjs} +7 -6
- package/dist/{macos-Bo9st9Di.mjs → macos-DPvPQadc.mjs} +20 -20
- package/dist/{macos-C12RMJQF.mjs → macos-Du07NsOB.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -9
- package/dist/{metro-BnhXV2Mj.mjs → metro-BMQHczcf.mjs} +2 -2
- package/dist/{metro-request-DXyKjVDF.mjs → metro-request-BtF7ox53.mjs} +1 -1
- package/dist/{named-ports-Phoi2POD.mjs → named-ports-DcktE2Pw.mjs} +2 -2
- package/dist/{native-android-vxgtLD7w.mjs → native-android-CBOM1_gB.mjs} +16 -16
- package/dist/{native-gradle-artifact-inputs-BN96IVw8.mjs → native-gradle-artifact-inputs-D_iAfPuS.mjs} +3 -3
- package/dist/{native-runtime-DG4Rodzj.mjs → native-runtime-D4cTwU0Z.mjs} +6 -6
- package/dist/{native-xcode-inputs-BKarCoKg.mjs → native-xcode-inputs-BF-ogSnG.mjs} +2 -2
- package/dist/{native-xcode-ios-8A-efGa5.mjs → native-xcode-ios-DwJBfMP6.mjs} +15 -15
- package/dist/{ndjson-Dy2W4vRa.mjs → ndjson-CrjIsGzw.mjs} +2 -2
- package/dist/offload-worker.d.mts +1 -1
- package/dist/offload-worker.mjs +22 -22
- package/dist/{ownership-DJCq48IJ.mjs → ownership-Dtz9G5Gl.mjs} +2 -2
- package/dist/{phone-reverses-BzTa8g1F.mjs → phone-reverses-CvhhkGMH.mjs} +4 -4
- package/dist/{placement-log-Cvhta5ib.mjs → placement-log-CRR_TE1r.mjs} +1 -1
- package/dist/{plan-placement-WkZdccuN.mjs → plan-placement-CdLc-pTb.mjs} +6 -6
- package/dist/{ports-UV4mJgyC.mjs → ports-g4N_cfyg.mjs} +3 -3
- package/dist/{prebuild-k8d_tqOq.mjs → prebuild-DBJMhwSS.mjs} +9 -9
- package/dist/{project-Sui52ywT.mjs → project-DPQjnpcI.mjs} +15 -15
- package/dist/{react-native-android-DANlGGQf.mjs → react-native-android-idMWOwkX.mjs} +24 -24
- package/dist/{react-native-build-jUHnIfZ9.mjs → react-native-build-BSoh4HkH.mjs} +7 -7
- package/dist/{react-native-doctor-DCWRjS7K.mjs → react-native-doctor-CYibY8-4.mjs} +9 -8
- package/dist/{react-native-ios-BwMsFMXi.mjs → react-native-ios-13KIIOOy.mjs} +16 -15
- package/dist/{recordings-iy0mkm7b.mjs → recordings-CHMaF73C.mjs} +1 -1
- package/dist/{reload-Bj7QyuDy.mjs → reload-B9DZOjcV.mjs} +1 -1
- package/dist/{reload-c_uEyc_X.mjs → reload-BUQI3dSu.mjs} +14 -14
- package/dist/{remote-DFlpAqdV.mjs → remote-C-RGHhAP.mjs} +8 -8
- package/dist/{result-BIcXREyC.mjs → result-W4HCum4A.mjs} +16 -16
- package/dist/{run-y2HwyNvg.mjs → run-BQAmrohh.mjs} +2 -2
- package/dist/{selection-CXgM_VK_.mjs → selection-PCMT97XD.mjs} +105 -62
- package/dist/{server-bare-2N4vSRZG.mjs → server-bare-CEQdB_F4.mjs} +37 -1
- package/dist/{server-command-qneHPcRI.mjs → server-command-oqi3TDy7.mjs} +5 -5
- package/dist/server-expo-BUFAq2In.mjs +2 -0
- package/dist/{server-expo-Ccm9zB0o.mjs → server-expo-C1K07shx.mjs} +8 -5
- package/dist/{settings-Cfd_Q6ys.mjs → settings-CKlMOmhj.mjs} +2 -2
- package/dist/{settings-CY5JZlNN.mjs → settings-D776ygML.mjs} +1 -1
- package/dist/{settings-Djl-mpjX.mjs → settings-D9LtQaUw.mjs} +2 -1
- package/dist/{settings-payload-DwQiEMCn.mjs → settings-payload-CE-NZ6Lq.mjs} +4 -4
- package/dist/{settings-write-CJpjkeAd.mjs → settings-write-D7Xwa_-M.mjs} +5 -5
- package/dist/settings.schema.json +58 -9
- package/dist/{simslim-DCQwzoPy.mjs → simslim-CbpHERcv.mjs} +1 -1
- package/dist/{slot-launch-BpmanOnk.mjs → slot-launch-CeIK1iUI.mjs} +6 -6
- package/dist/{stage-CmugrSG5.mjs → stage-Blqe6bWb.mjs} +1 -1
- package/dist/{start-DYLk6GXn.mjs → start-B7J5a9nS.mjs} +11 -11
- package/dist/{start-CHH3zgIU.mjs → start-CvP2pJjc.mjs} +1 -1
- package/dist/{state-BXC1Lfxw.mjs → state-C2AUjjhg.mjs} +1 -1
- package/dist/{state-B2QJbDwz.mjs → state-D5ZxwCGJ.mjs} +2 -2
- package/dist/{stats-DxKqhcGp.mjs → stats-Uo7l8OAk.mjs} +4 -4
- package/dist/{status-7ULDEJ1e.mjs → status-CK7ZoEhV.mjs} +2 -2
- package/dist/{status-D_Ljc89p.mjs → status-CqJI1TgG.mjs} +1 -1
- package/dist/{status-BHCkOZga.mjs → status-_rWXFSO7.mjs} +24 -24
- package/dist/{status-watch-BmsPqYSU.mjs → status-watch-CnSyXUmj.mjs} +4 -4
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-CbWo21kb.mjs → stim-desktop-CYXLFpFS.mjs} +1 -1
- package/dist/{stop-b2pouxAO.mjs → stop-Bogo9oO2.mjs} +2 -2
- package/dist/{stop-DQvE-P76.mjs → stop-CMVfaA-6.mjs} +4 -4
- package/dist/{stop-D-dGE9gh.mjs → stop-CnF9ixYe.mjs} +20 -19
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +23 -19
- package/dist/{support-04IhBUTT.mjs → support-BGqpYMV8.mjs} +15 -11
- package/dist/{support-BtlJKjyQ.mjs → support-DUevTPur.mjs} +9 -9
- package/dist/{swiftpm-artifact-inputs-Cj2UpmPN.mjs → swiftpm-artifact-inputs-BcJk6-3u.mjs} +1 -1
- package/dist/{swiftpm-macos-BhF2stxY.mjs → swiftpm-macos-DBrmoocG.mjs} +8 -8
- package/dist/toolchain-Cw9VVHOY.mjs +2 -0
- package/dist/{toolchain-mLA_km-b.mjs → toolchain-DLdoyxIt.mjs} +19 -11
- package/dist/{trigger-DMou-X7j.mjs → trigger-CfnOfpDd.mjs} +1 -1
- package/dist/trigger-DBZ-GBrl.mjs +2 -0
- package/dist/{warm-progress-B0Vpuvpl.mjs → warm-progress-DQ2wQZKp.mjs} +3 -3
- package/dist/web-CI_qCRPw.mjs +2 -0
- package/dist/{web-BYmK0TjL.mjs → web-g9U7L1sR.mjs} +8 -8
- package/dist/web-run.mjs +5 -5
- package/dist/{workspace-state-kIZrdlSg.mjs → workspace-state-DGwkPXwq.mjs} +2 -2
- package/dist/{workspaces-CmOcceDN.mjs → workspaces-7_RWoi6c.mjs} +11 -11
- package/dist/{worktree-nliAoHxB.mjs → worktree-DEet9H3p.mjs} +1 -1
- package/dist/{worktree-2dk5edza.mjs → worktree-qKJ3x07S.mjs} +25 -25
- package/package.json +7 -7
- package/shim/bundle-response.cjs +37 -0
- package/dist/server-expo-WulkyAwT.mjs +0 -2
- package/dist/toolchain-qktiV8xc.mjs +0 -2
- package/dist/trigger-qp2ji5wE.mjs +0 -2
- package/dist/web-CrVLVQZY.mjs +0 -2
package/dist/supervisor-run.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { S as process_identity_exports, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { c as withWorkspaceStateLock, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-
|
|
3
|
-
import { G as projectDeviceSlots, T as setSupervisor, U as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-
|
|
4
|
-
import { $ as runnableMetroCommand, X as resolveProjectSettings } from "./settings-
|
|
5
|
-
import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-
|
|
6
|
-
import { W as ownedAvdSerialResolver } from "./android-
|
|
7
|
-
import { i as createNdjsonWriter } from "./ndjson-
|
|
8
|
-
import { C as devServerStopLevel, O as vanishedSupervisorMessage, w as devServerStopRecord, x as describeDevServerStop } from "./ccache-
|
|
9
|
-
import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-
|
|
10
|
-
import { B as workspaceBuildInProgress, v as withIdleWorkspace } from "./workspaces-
|
|
11
|
-
import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-
|
|
2
|
+
import { c as withWorkspaceStateLock, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { G as projectDeviceSlots, T as setSupervisor, U as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
4
|
+
import { $ as runnableMetroCommand, X as resolveProjectSettings } from "./settings-D776ygML.mjs";
|
|
5
|
+
import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-DPQjnpcI.mjs";
|
|
6
|
+
import { W as ownedAvdSerialResolver } from "./android-DdKG6lyD.mjs";
|
|
7
|
+
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
8
|
+
import { C as devServerStopLevel, O as vanishedSupervisorMessage, w as devServerStopRecord, x as describeDevServerStop } from "./ccache-B8gY50-h.mjs";
|
|
9
|
+
import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-CW3l-inB.mjs";
|
|
10
|
+
import { B as workspaceBuildInProgress, v as withIdleWorkspace } from "./workspaces-7_RWoi6c.mjs";
|
|
11
|
+
import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-BTaUf0tc.mjs";
|
|
12
12
|
import { t as describeError } from "./errors-DHm_U5gv.mjs";
|
|
13
|
-
import { d as hostConnector, p as probeHostedSession } from "./hosted-client-
|
|
14
|
-
import { o as watchWorkspaceState, t as clearHostedMetro } from "./metro-request-
|
|
13
|
+
import { d as hostConnector, p as probeHostedSession } from "./hosted-client-Cect92SZ.mjs";
|
|
14
|
+
import { o as watchWorkspaceState, t as clearHostedMetro } from "./metro-request-BtF7ox53.mjs";
|
|
15
15
|
import { t as relaunchWithLogFile } from "./detached-entry-BPlSaCwC.mjs";
|
|
16
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-
|
|
17
|
-
import { t as triggerMaintenance } from "./trigger-
|
|
16
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-BcMN_cLm.mjs";
|
|
17
|
+
import { t as triggerMaintenance } from "./trigger-CfnOfpDd.mjs";
|
|
18
18
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
19
19
|
import { dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
20
20
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
@@ -802,7 +802,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
802
802
|
try {
|
|
803
803
|
let start;
|
|
804
804
|
if (command) {
|
|
805
|
-
const startServer = startCommand ?? (await import("./server-command-
|
|
805
|
+
const startServer = startCommand ?? (await import("./server-command-oqi3TDy7.mjs")).startCommandServer;
|
|
806
806
|
start = (opts) => startServer({
|
|
807
807
|
...opts,
|
|
808
808
|
command
|
|
@@ -848,13 +848,17 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
848
848
|
return null;
|
|
849
849
|
}
|
|
850
850
|
const serverPid = server.serverPid;
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
const hmrUpdates = server.observesRequests === true;
|
|
852
|
+
if (serverPid || hmrUpdates) {
|
|
853
|
+
const serverProcessToken = serverPid ? (0, process_identity_exports.captureProcessToken)(serverPid) : null;
|
|
853
854
|
withWorkspaceStateLock(root, () => {
|
|
854
855
|
if (readWorkspaceState$1(root)?.supervisor?.processToken === processToken) writeWorkspaceState(root, { supervisor: {
|
|
855
856
|
...record,
|
|
856
|
-
serverPid
|
|
857
|
-
|
|
857
|
+
...serverPid ? {
|
|
858
|
+
serverPid,
|
|
859
|
+
...serverProcessToken ? { serverProcessToken } : {}
|
|
860
|
+
} : {},
|
|
861
|
+
...hmrUpdates ? { hmrUpdates } : {}
|
|
858
862
|
} });
|
|
859
863
|
});
|
|
860
864
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
2
|
import { a as killOnAbort } from "./operation-exec-Dp4FuIGR.mjs";
|
|
3
|
-
import { C as emulatorDiskSpaceRemedy,
|
|
4
|
-
import { yn as pickDevClientScheme } from "./ccache-
|
|
5
|
-
import { f as unknownAndroidDeviceProfileRefusal, l as layerNote, p as unknownAndroidSystemImageRefusal } from "./device-capacity-
|
|
6
|
-
import { t as devClientScheme } from "./dev-client-
|
|
3
|
+
import { A as hostSystemImageArch, C as emulatorDiskSpaceRemedy, D as findBuildTool, E as extractEmulatorFailure, Q as profileNeedsFoldFeature, T as emulatorProbeSession, X as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as emulatorFailureRemedy } from "./android-DdKG6lyD.mjs";
|
|
4
|
+
import { yn as pickDevClientScheme } from "./ccache-B8gY50-h.mjs";
|
|
5
|
+
import { f as unknownAndroidDeviceProfileRefusal, l as layerNote, p as unknownAndroidSystemImageRefusal } from "./device-capacity-C5C_jOQd.mjs";
|
|
6
|
+
import { t as devClientScheme } from "./dev-client-CASgAOu7.mjs";
|
|
7
7
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
8
|
import { relative } from "node:path";
|
|
9
9
|
//#region src/commands/android/support.ts
|
|
@@ -271,14 +271,18 @@ function displayPath(root, path) {
|
|
|
271
271
|
return rel && !rel.startsWith("..") ? rel : path;
|
|
272
272
|
}
|
|
273
273
|
async function pooledAndroidDevice({ root, selectPool, listDevices, isEmulatorDevice, deviceModel, waitSeconds, noWait, now, warn }) {
|
|
274
|
-
const
|
|
274
|
+
const probed = emulatorProbeSession(isEmulatorDevice);
|
|
275
275
|
const pooled = await selectPool({
|
|
276
276
|
root,
|
|
277
277
|
platform: PLATFORM,
|
|
278
278
|
idLabel: "serial",
|
|
279
|
-
list:
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
list: async () => {
|
|
280
|
+
const adb = await listDevices();
|
|
281
|
+
return (await probed((isEmulator) => androidPoolCandidates(adb, isEmulator))).map((entry) => ({ id: entry.serial }));
|
|
282
|
+
},
|
|
283
|
+
noCandidates: async () => {
|
|
284
|
+
const adb = await listDevices();
|
|
285
|
+
const resolved = await probed((isEmulator) => androidPoolNoCandidatesRefusal(adb, isEmulator));
|
|
282
286
|
return {
|
|
283
287
|
message: resolved.error,
|
|
284
288
|
remedy: resolved.remedy
|
|
@@ -300,7 +304,7 @@ async function pooledAndroidDevice({ root, selectPool, listDevices, isEmulatorDe
|
|
|
300
304
|
}
|
|
301
305
|
return { device: {
|
|
302
306
|
serial: pooled.candidate.id,
|
|
303
|
-
deviceName: deviceModel(pooled.candidate.id) ?? pooled.candidate.id,
|
|
307
|
+
deviceName: await deviceModel(pooled.candidate.id) ?? pooled.candidate.id,
|
|
304
308
|
owned: false
|
|
305
309
|
} };
|
|
306
310
|
}
|
|
@@ -313,9 +317,9 @@ function androidJobLayout(layout) {
|
|
|
313
317
|
module: layout.module
|
|
314
318
|
} : {};
|
|
315
319
|
}
|
|
316
|
-
function androidBuildOptions({ release, physical, device, variant, deviceAbi, compiler, buildProfile, targetAbiOnly = true, hostedAbi = null, gradleProject = null }) {
|
|
320
|
+
async function androidBuildOptions({ release, physical, device, variant, deviceAbi, compiler, buildProfile, targetAbiOnly = true, hostedAbi = null, gradleProject = null }) {
|
|
317
321
|
let abi = targetAbiOnly ? hostedAbi : null;
|
|
318
|
-
if (targetAbiOnly && !release && physical && device.serial) abi = deviceAbi(device.serial);
|
|
322
|
+
if (targetAbiOnly && !release && physical && device.serial) abi = await deviceAbi(device.serial);
|
|
319
323
|
if (targetAbiOnly && !release && !physical) abi = androidSystemImageAbi(device.systemImage);
|
|
320
324
|
const runOptions = {};
|
|
321
325
|
if (variant) runOptions.variant = variant;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { k as workspaceLogsDir } from "./workspace-state-
|
|
2
|
-
import { h as shortUdid, l as phaseLine } from "./command-output-
|
|
3
|
-
import { _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, b as iosProjectDirSetting, p as cacheProviderSettingError, rt as settingShapeErrors, st as unknownSettingKeys, x as iosProjectDirSettingError } from "./settings-
|
|
4
|
-
import {
|
|
5
|
-
import { P as parseIosSimulatorApp } from "./ios-
|
|
1
|
+
import { k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
2
|
+
import { h as shortUdid, l as phaseLine } from "./command-output-BBW8eWPL.mjs";
|
|
3
|
+
import { _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, b as iosProjectDirSetting, p as cacheProviderSettingError, rt as settingShapeErrors, st as unknownSettingKeys, x as iosProjectDirSettingError } from "./settings-D776ygML.mjs";
|
|
4
|
+
import { J as describeDiagnostic } from "./toolchain-DLdoyxIt.mjs";
|
|
5
|
+
import { P as parseIosSimulatorApp } from "./ios-CXnoVO_z.mjs";
|
|
6
6
|
import { p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
|
|
7
|
-
import { d as resolveBuildPlacement } from "./selection-
|
|
8
|
-
import { l as parseDeviceWait } from "./device-lease-run-
|
|
9
|
-
import { h as unknownIosRuntimeRefusal, l as layerNote, m as unknownIosDeviceTypeRefusal, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-
|
|
10
|
-
import { t as IosDeviceMismatchError } from "./device-ios-
|
|
7
|
+
import { d as resolveBuildPlacement } from "./selection-PCMT97XD.mjs";
|
|
8
|
+
import { l as parseDeviceWait } from "./device-lease-run-Do6zYA7y.mjs";
|
|
9
|
+
import { h as unknownIosRuntimeRefusal, l as layerNote, m as unknownIosDeviceTypeRefusal, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-C5C_jOQd.mjs";
|
|
10
|
+
import { t as IosDeviceMismatchError } from "./device-ios-DbmtPIiw.mjs";
|
|
11
11
|
import { basename, join } from "node:path";
|
|
12
12
|
import chalk from "chalk";
|
|
13
13
|
function buildLogFile(root) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
2
|
import { s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
|
|
3
|
-
import { n as buildCacheKey } from "./build-cache-
|
|
3
|
+
import { n as buildCacheKey } from "./build-cache-DlC3owap.mjs";
|
|
4
4
|
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
5
5
|
import { a as sourceManifest, r as nativeFileDigest } from "./native-source-D1AzWiuP.mjs";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { T as trackReportResource, _ as spawnDeclared, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { y as sharedBuildCache } from "./workspace-state-
|
|
3
|
-
import { J as resolveCacheProviderConfig, Vt as repoRootAsync, it as settingValueAt, z as projectSettingsContextAsync } from "./settings-
|
|
4
|
-
import { r as register } from "./cache-manifest-
|
|
5
|
-
import {
|
|
6
|
-
import "./build-cache-
|
|
2
|
+
import { y as sharedBuildCache } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { J as resolveCacheProviderConfig, Vt as repoRootAsync, it as settingValueAt, z as projectSettingsContextAsync } from "./settings-D776ygML.mjs";
|
|
4
|
+
import { r as register } from "./cache-manifest-evF_zJ9U.mjs";
|
|
5
|
+
import { h as macosToolchainAsync, st as runCancellationSignal } from "./toolchain-DLdoyxIt.mjs";
|
|
6
|
+
import "./build-cache-DlC3owap.mjs";
|
|
7
7
|
import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
|
|
8
8
|
import { r as nativeFileDigest } from "./native-source-D1AzWiuP.mjs";
|
|
9
|
-
import { a as validateInfoPlist, i as stageBundle, n as resolveBundleExtras, r as setBundleName, t as reidentifyBundle } from "./stage-
|
|
9
|
+
import { a as validateInfoPlist, i as stageBundle, n as resolveBundleExtras, r as setBundleName, t as reidentifyBundle } from "./stage-Blqe6bWb.mjs";
|
|
10
10
|
import { t as validateMacosArtifactPlatform } from "./artifact-platform-BO2Uvk_A.mjs";
|
|
11
|
-
import { t as logLines } from "./run-
|
|
12
|
-
import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-
|
|
11
|
+
import { t as logLines } from "./run-BQAmrohh.mjs";
|
|
12
|
+
import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-BcJk6-3u.mjs";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { createReadStream, createWriteStream, existsSync, realpathSync } from "node:fs";
|
|
15
15
|
import { tmpdir } from "node:os";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, _ as spawnDeclared, b as operationState, g as signalDeclaredSpawns, h as refuseDeclaredSpawns, m as declareSpawnsOn, p as allowDeclaredSpawns, t as getExecutor, u as withWorkspaceProcessLock, v as stopDeclaringSpawnsOn, y as isTermination } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { E as workspaceDir, T as workspaceDerivedData, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-
|
|
2
|
+
import { E as workspaceDir, T as workspaceDerivedData, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
3
|
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
4
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-BBW8eWPL.mjs";
|
|
5
5
|
import { a as killOnAbort } from "./operation-exec-Dp4FuIGR.mjs";
|
|
6
|
-
import { o as androidHome } from "./android-
|
|
6
|
+
import { o as androidHome } from "./android-DdKG6lyD.mjs";
|
|
7
7
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
8
8
|
import { p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
|
|
9
|
-
import { t as cleanLine } from "./server-expo-
|
|
9
|
+
import { t as cleanLine } from "./server-expo-C1K07shx.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -2226,13 +2226,20 @@ function cocoapodsInstall(here) {
|
|
|
2226
2226
|
lead: here ? `install CocoaPods (this Mac has ${here}; \`gem install cocoapods -v ${here}\` instead of Homebrew installs that version)` : "install CocoaPods"
|
|
2227
2227
|
};
|
|
2228
2228
|
}
|
|
2229
|
+
/**
|
|
2230
|
+
* Whether this machine has no Xcode and no simulator SDK, so an iOS app it asks for can only be built, and only run,
|
|
2231
|
+
* on a remote Mac: that Mac's own Xcode, simulator SDK and CocoaPods are the build's toolchain.
|
|
2232
|
+
*/
|
|
2233
|
+
function buildsOnlyOnWorker(local) {
|
|
2234
|
+
return !local.xcode && !local.simulatorSdk;
|
|
2235
|
+
}
|
|
2229
2236
|
function cocoapodsDifference(target, worker) {
|
|
2230
2237
|
if (target.native || target.cocoapodsPinned) return null;
|
|
2231
2238
|
if (worker.os !== void 0 && worker.os !== "darwin") return null;
|
|
2232
2239
|
const here = target.local.cocoapods;
|
|
2233
2240
|
if (!worker.cocoapods) return {
|
|
2234
2241
|
code: "cocoapods",
|
|
2235
|
-
reason: versionMismatch("CocoaPods", null, here),
|
|
2242
|
+
reason: buildsOnlyOnWorker(target.local) ? "no CocoaPods there" : versionMismatch("CocoaPods", null, here),
|
|
2236
2243
|
...cocoapodsInstall(here)
|
|
2237
2244
|
};
|
|
2238
2245
|
return here && worker.cocoapods !== here ? {
|
|
@@ -2380,7 +2387,7 @@ function toolchainMismatches(target, worker) {
|
|
|
2380
2387
|
});
|
|
2381
2388
|
return out;
|
|
2382
2389
|
}
|
|
2383
|
-
if (worker.arch !== local.arch) out.push({
|
|
2390
|
+
if (worker.arch !== local.arch && !(target.platform === "ios" && target.runsOnWorker)) out.push({
|
|
2384
2391
|
code: "arch",
|
|
2385
2392
|
reason: `CPU ${worker.arch} there, ${local.arch} here`
|
|
2386
2393
|
});
|
|
@@ -2395,12 +2402,13 @@ function toolchainMismatches(target, worker) {
|
|
|
2395
2402
|
return out;
|
|
2396
2403
|
}
|
|
2397
2404
|
const ios = target.local;
|
|
2398
|
-
const
|
|
2405
|
+
const onWorker = buildsOnlyOnWorker(ios);
|
|
2406
|
+
const xcode = onWorker ? worker.xcode ? null : xcodeProblem(ios, worker, true) : !ios.xcode || worker.xcode !== ios.xcode ? xcodeProblem(ios, worker) : null;
|
|
2399
2407
|
if (xcode) out.push(xcode);
|
|
2400
|
-
const selection = xcode !== null && diagnosesXcode(ios, worker);
|
|
2401
|
-
if ((!ios.simulatorSdk || worker.simulatorSdk !== ios.simulatorSdk) && !selection) out.push({
|
|
2408
|
+
const selection = xcode !== null && (onWorker ? worker.developerDir !== void 0 : diagnosesXcode(ios, worker));
|
|
2409
|
+
if ((onWorker ? !worker.simulatorSdk : !ios.simulatorSdk || worker.simulatorSdk !== ios.simulatorSdk) && !selection) out.push({
|
|
2402
2410
|
code: "simulator-sdk",
|
|
2403
|
-
reason: versionMismatch("simulator SDK", worker.simulatorSdk, ios.simulatorSdk)
|
|
2411
|
+
reason: onWorker ? "no simulator SDK there" : versionMismatch("simulator SDK", worker.simulatorSdk, ios.simulatorSdk)
|
|
2404
2412
|
});
|
|
2405
2413
|
if (!target.native && target.cocoapodsPinned && !worker.bundler) out.push({
|
|
2406
2414
|
code: "bundler",
|
|
@@ -2410,4 +2418,4 @@ function toolchainMismatches(target, worker) {
|
|
|
2410
2418
|
return out;
|
|
2411
2419
|
}
|
|
2412
2420
|
//#endregion
|
|
2413
|
-
export {
|
|
2421
|
+
export { cancelledFailure as $, COMPILATION_CACHE_NOT_RUN as A, pickXcodeProject as B, DEPS_ERROR as C, readRubyVersion as D, readPodState as E, compilationCacheActivityLine as F, swiftPrefixMappingSupported as G, readBundleId as H, compilationCacheSettings as I, describeDiagnostic as J, tailLines as K, detectXcodeMajorAsync as L, HEARTBEAT_INTERVAL_MS as M, SWIFT_PREFIX_MAPPING_MIN_SWIFT as N, runCaptured as O, buildXcode as P, NATIVE_RUN_WAIT_MS as Q, parseSwiftVersion as R, workerToolchain as S, podsAreStale as T, resolveScheme as U, readBundleExecutable as V, startBuildHeartbeat as W, podInstallCommand as X, bundlerPin as Y, NATIVE_RUN_LOCK as Z, parseXcodeVersionPlist as _, buildsOnlyOnWorker as a, requestNativeRunCancel as at, toolchainNotes as b, iosToolchainAsync as c, withNativeBuildRun as ct, jdkHomes as d, clearNativeRunCancel as et, jdkMajor as f, parseAndroidRequirements as g, macosToolchainAsync as h, availableIphone as i, nativeRunWaitNotice as it, COMPILATION_CACHE_UNAVAILABLE as j, runPodInstall as k, iphoneRuntimes as l, cacheUser as lt, macosToolchain as m, androidToolchain as n, describeNativeRunHolder as nt, cocoapodsDifference as o, runCancellation as ot, listXcodeApps as p, xcodebuildArgs as q, androidToolchainAsync as r, nativeRunHolder as rt, cocoapodsInstall as s, runCancellationSignal as st, androidRequirements as t, decideStopAction as tt, jdkCandidates as u, claimForEmptying as ut, sdkDownloadDisabled as v, POD_MISSING_REASON as w, useJdkMajor as x, toolchainMismatches as y, parseXcodeMajor as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { t as resolveMaintenanceSettings } from "./settings-
|
|
2
|
+
import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
|
|
3
3
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
4
4
|
import { n as windowsLauncherArgs } from "./detached-entry-BPlSaCwC.mjs";
|
|
5
5
|
import { n as stampAttempt, r as due, t as capChildLog } from "./attempt-ClyJlZPT.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, E as debugLog, l as WorkspaceProcessCleanupError, n as isTimeoutError, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { E as workspaceDir, M as withDirLock, _ as ensureWorkspaceStorage, h as discoverAgentSessions, m as attributeAgentSessions, o as updateWorkspaceState, p as agentKey } from "./workspace-state-
|
|
2
|
+
import { E as workspaceDir, M as withDirLock, _ as ensureWorkspaceStorage, h as discoverAgentSessions, m as attributeAgentSessions, o as updateWorkspaceState, p as agentKey } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
3
|
import { l as gitQuietAsync, o as git$1, s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
|
|
4
|
-
import { Ct as gitCommonDirOnDisk, Ot as linkedWorktreesOnDisk } from "./settings-
|
|
5
|
-
import { V as ownedAvdDirectory } from "./android-
|
|
4
|
+
import { Ct as gitCommonDirOnDisk, Ot as linkedWorktreesOnDisk } from "./settings-D776ygML.mjs";
|
|
5
|
+
import { V as ownedAvdDirectory } from "./android-DdKG6lyD.mjs";
|
|
6
6
|
import { s as pullRequestLookups } from "./pull-request-BzLmzAIQ.mjs";
|
|
7
7
|
import { clearClaimChild, markClaimChildPending, releaseClaim, setClaimChild, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-
|
|
2
|
-
import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-
|
|
3
|
-
import { f as refuseNoProject, l as phaseLine } from "./command-output-
|
|
4
|
-
import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, rt as settingShapeErrors } from "./settings-
|
|
5
|
-
import { f as projectRegistry, n as findCommandWorkspace } from "./project-
|
|
6
|
-
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-
|
|
7
|
-
import { o as readWebRecord, r as cdpEndpoint } from "./state-
|
|
1
|
+
import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
2
|
+
import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-BBW8eWPL.mjs";
|
|
4
|
+
import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, rt as settingShapeErrors } from "./settings-D776ygML.mjs";
|
|
5
|
+
import { f as projectRegistry, n as findCommandWorkspace } from "./project-DPQjnpcI.mjs";
|
|
6
|
+
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
|
|
7
|
+
import { o as readWebRecord, r as cdpEndpoint } from "./state-D5ZxwCGJ.mjs";
|
|
8
8
|
import { t as liveWebRecord } from "./page-CQJlcj3x.mjs";
|
|
9
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
9
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-D4cTwU0Z.mjs";
|
|
10
10
|
import chalk from "chalk";
|
|
11
11
|
//#region src/commands/web.ts
|
|
12
12
|
const printNote = (line) => console.error(line);
|
package/dist/web-run.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, S as process_identity_exports, o as cancellableSleep, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { Tt as recordCreatedDevice } from "./android-
|
|
3
|
-
import { f as signalProcessTree } from "./metro-
|
|
4
|
-
import { i as createNdjsonWriter } from "./ndjson-
|
|
5
|
-
import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-
|
|
6
|
-
import { l as probeWebDrivers } from "./activity-
|
|
2
|
+
import { Tt as recordCreatedDevice } from "./android-DdKG6lyD.mjs";
|
|
3
|
+
import { f as signalProcessTree } from "./metro-BMQHczcf.mjs";
|
|
4
|
+
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
5
|
+
import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-D5ZxwCGJ.mjs";
|
|
6
|
+
import { l as probeWebDrivers } from "./activity-BTaUf0tc.mjs";
|
|
7
7
|
import { t as connectOwnedBrowser } from "./cdp-C3svvXiE.mjs";
|
|
8
8
|
import { t as relaunchWithLogFile } from "./detached-entry-BPlSaCwC.mjs";
|
|
9
9
|
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-DyDWurWG.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as process_identity_exports, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-
|
|
3
|
-
import { lt as workspaceHiddenSetting } from "./settings-
|
|
2
|
+
import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-AbUjIBOQ.mjs";
|
|
3
|
+
import { lt as workspaceHiddenSetting } from "./settings-D776ygML.mjs";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, S as process_identity_exports, b as operationState, c as throwIfCancelled, d as workspaceProcessLockError, f as workspaceProcessLockPath, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, o as cancellableSleep, t as getExecutor, u as withWorkspaceProcessLock, v as stopDeclaringSpawnsOn } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { A as workspaceName$1, E as workspaceDir, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, u as workspaceLastUsed, w as workspaceAgentDeviceDir } from "./workspace-state-
|
|
3
|
-
import { D as withConfigLock$1, F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, I as listMountedVolumes, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, _ as loadConfig$1, d as getConfigDir, g as isPathPrefix$1, j as acquireAvdClaim, p as getProject } from "./config-
|
|
2
|
+
import { A as workspaceName$1, E as workspaceDir, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, u as workspaceLastUsed, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { D as withConfigLock$1, F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, I as listMountedVolumes, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, _ as loadConfig$1, d as getConfigDir, g as isPathPrefix$1, j as acquireAvdClaim, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
4
4
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { a as formatElapsed, d as quotedPath$1, l as phaseLine, o as formatLongDuration, u as plural } from "./command-output-
|
|
5
|
+
import { a as formatElapsed, d as quotedPath$1, l as phaseLine, o as formatLongDuration, u as plural } from "./command-output-BBW8eWPL.mjs";
|
|
6
6
|
import { c as gitQuiet, l as gitQuietAsync, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
7
|
-
import { Pt as lockReason, Vt as repoRootAsync, Xt as worktreeLockAsync, Yt as worktreeLock, pt as resolveTailscaleBinary } from "./settings-
|
|
8
|
-
import { a as macosRuntimeClaim, n as macosDir } from "./state-
|
|
9
|
-
import { Ct as forgetCreatedDeviceAsync, G as ownedAvdSerialResolverAsync, H as ownedAvdMatchesConfiguration, K as ownedAvdSystemImage,
|
|
10
|
-
import { c as pidExists, f as signalProcessTree, p as signalProcessTreeAsync } from "./metro-
|
|
11
|
-
import { _ as chromeProcessStateAsync, c as webClaimRoot, i as clearWebRecord, o as readWebRecord, p as webProfileDir, t as CDP_PORT_LABEL, u as webFacts, v as liveProfileHolder, y as removeSingletonFiles } from "./state-
|
|
7
|
+
import { Pt as lockReason, Vt as repoRootAsync, Xt as worktreeLockAsync, Yt as worktreeLock, pt as resolveTailscaleBinary } from "./settings-D776ygML.mjs";
|
|
8
|
+
import { a as macosRuntimeClaim, n as macosDir } from "./state-C2AUjjhg.mjs";
|
|
9
|
+
import { Ct as forgetCreatedDeviceAsync, G as ownedAvdSerialResolverAsync, H as ownedAvdMatchesConfiguration, K as ownedAvdSystemImage, M as listAdbDevicesAsync, R as listOrphanedAvdDirectories, S as deleteAvd, St as forgetCreatedDevice, Tt as recordCreatedDevice, V as ownedAvdDirectory, W as ownedAvdSerialResolver, _t as parkSim, bt as removeParkedAfter, g as avdPathExists, ht as eraseParkedAfter, it as shutdownAndroidEmulator, lt as wipeAvdUserData, nt as resolveOwnedAvdSerialAsync, p as assertOwnedAvdStoppedAsync, st as waitForAndroidEmulatorShutdown, ut as isStimOwnedAvd, v as avdStorageRoots, wt as readCreatedDevices$1, yt as readParked } from "./android-DdKG6lyD.mjs";
|
|
10
|
+
import { c as pidExists, f as signalProcessTree, p as signalProcessTreeAsync } from "./metro-BMQHczcf.mjs";
|
|
11
|
+
import { _ as chromeProcessStateAsync, c as webClaimRoot, i as clearWebRecord, o as readWebRecord, p as webProfileDir, t as CDP_PORT_LABEL, u as webFacts, v as liveProfileHolder, y as removeSingletonFiles } from "./state-D5ZxwCGJ.mjs";
|
|
12
12
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
13
|
-
import { N as listBuildLocks, d as readAgentDeviceRecords, i as createActivityReaderAsync, r as createActivityReader, s as idleForMs, t as agentDeviceDaemon } from "./activity-
|
|
14
|
-
import { C as renameIosSim, D as resolveOwnedIosSim, c as eraseIosSim, f as listAllIosSimsAsync, k as shutdownIosSim, o as deleteIosSim, p as listIosDeviceTypesAsync, s as deleteParkedIosSim, v as parkedSimName, y as parseRuntimeVersion } from "./ios-
|
|
15
|
-
import { r as releaseBrowserPort } from "./named-ports-
|
|
13
|
+
import { N as listBuildLocks, d as readAgentDeviceRecords, i as createActivityReaderAsync, r as createActivityReader, s as idleForMs, t as agentDeviceDaemon } from "./activity-BTaUf0tc.mjs";
|
|
14
|
+
import { C as renameIosSim, D as resolveOwnedIosSim, c as eraseIosSim, f as listAllIosSimsAsync, k as shutdownIosSim, o as deleteIosSim, p as listIosDeviceTypesAsync, s as deleteParkedIosSim, v as parkedSimName, y as parseRuntimeVersion } from "./ios-CXnoVO_z.mjs";
|
|
15
|
+
import { r as releaseBrowserPort } from "./named-ports-DcktE2Pw.mjs";
|
|
16
16
|
import { createHash, randomUUID } from "node:crypto";
|
|
17
17
|
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, watch, writeFileSync } from "node:fs";
|
|
18
18
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as nestedWorktrees, c as registerRemove, d as removalPath, f as removalRemedy, g as worktreeCommand, h as warmedWorkspace, i as excludeWatchmanCookies, l as registerWarm, m as warmWorktreeTarget, n as dependencyInstallCommand, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, t as customIosDirs, u as removalBlockers } from "./worktree-
|
|
1
|
+
import { a as nestedWorktrees, c as registerRemove, d as removalPath, f as removalRemedy, g as worktreeCommand, h as warmedWorkspace, i as excludeWatchmanCookies, l as registerWarm, m as warmWorktreeTarget, n as dependencyInstallCommand, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, t as customIosDirs, u as removalBlockers } from "./worktree-qKJ3x07S.mjs";
|
|
2
2
|
export { customIosDirs, worktreeCommand as default, dependencyInstallCommand, excludePodChurn, excludeWatchmanCookies, nestedWorktrees, porcelainPath, reclaimKeys, registerRemove, registerWarm, removalBlockers, removalPath, removalRemedy, removeWorktreeTarget, warmWorktreeTarget, warmedWorkspace };
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, S as process_identity_exports, b as operationState, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, n as isTimeoutError, t as getExecutor, v as stopDeclaringSpawnsOn } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { E as workspaceDir, a as recordWorkspaceUseAsync, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, w as workspaceAgentDeviceDir } from "./workspace-state-
|
|
3
|
-
import { E as upsertProject, G as projectDeviceSlots, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, S as removeProject, _ as loadConfig$1, a as clearDevice, d as getConfigDir, g as isPathPrefix$1, j as acquireAvdClaim, p as getProject } from "./config-
|
|
4
|
-
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-
|
|
2
|
+
import { E as workspaceDir, a as recordWorkspaceUseAsync, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { E as upsertProject, G as projectDeviceSlots, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, S as removeProject, _ as loadConfig$1, a as clearDevice, d as getConfigDir, g as isPathPrefix$1, j as acquireAvdClaim, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
4
|
+
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-BBW8eWPL.mjs";
|
|
5
5
|
import { c as gitQuiet, l as gitQuietAsync, o as git, r as childEnvironment, s as gitAsync, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
6
|
-
import { Ct as gitCommonDirOnDisk, Dt as isPodInstallChurn, Et as hasUncommittedWorkAsync, Ft as matchWorktreeEntry, Gt as restoreFileAsync, Ht as resolveFullRef, It as nativeCanonicalPath, Jt as warmWorktreePaths, Kt as sourceCheckoutOf, Lt as podsOutOfSync, Mt as locallyKnownUpstream, Q as resolveSettings, Rt as readWorktreeExclude, St as gitCommonDirAsync, Tt as hasRemoteAsync, Ut as resolveFullRefAsync, V as readCommittedSettings, X as resolveProjectSettings, Y as resolveIosProjectDir, _ as inertSettingWarning, _t as deleteBranchAsync, a as SETTING_SHAPE_REMEDY, bt as dirtyPathsAsync, gt as cloneIgnoredEntries, ht as branchExistsAsync, jt as listWorktreesAsync, nn as moveIgnoredTreesToTrash, qt as unpushedCommitsAsync, rn as restoreTrashedTrees, rt as settingShapeErrors, st as unknownSettingKeys, tn as disposeTrash, vt as depsOutOfSync, wt as hasPopulatedSubmodulesAsync, zt as removeWorktreeAsync } from "./settings-
|
|
7
|
-
import { F as readRemoteSessionId, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, i as findProjectRoot$1, k as clearRemoteSession, o as isMobileProject } from "./project-
|
|
8
|
-
import { t as macosAppPresent } from "./state-
|
|
9
|
-
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-
|
|
10
|
-
import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-
|
|
11
|
-
import { c as pidExists, d as resolveProjectMetro, p as signalProcessTreeAsync, r as killMetroTreeAsync } from "./metro-
|
|
12
|
-
import { A as diskPressureLevel, D as requestDevServerStop, En as runProcessOperation, G as planCacheEmptying, Ln as resolveEasCliBin, N as lowestFree, Ot as endRecordedSession, _ as resolveBudget, g as readVolumeSpaceAsync, h as readVolumeSpace, k as withdrawDevServerStopRequest, p as machineNumber, ur as discoverCaches } from "./ccache-
|
|
13
|
-
import { o as readWebRecord } from "./state-
|
|
14
|
-
import { C as stopTunnel, E as withManagedRemoteWorktreeRemovalLock, O as withManagedTunnelRemovalLock, _ as emptyWorkspaceDir, ht as teardownOwnedIosSim, mt as teardownOwnedBrowser, o as collectWorkspaceOutputs, pt as teardownOwnedAvd, v as withIdleWorkspace, x as resolveSupervisorTarget } from "./workspaces-
|
|
6
|
+
import { Ct as gitCommonDirOnDisk, Dt as isPodInstallChurn, Et as hasUncommittedWorkAsync, Ft as matchWorktreeEntry, Gt as restoreFileAsync, Ht as resolveFullRef, It as nativeCanonicalPath, Jt as warmWorktreePaths, Kt as sourceCheckoutOf, Lt as podsOutOfSync, Mt as locallyKnownUpstream, Q as resolveSettings, Rt as readWorktreeExclude, St as gitCommonDirAsync, Tt as hasRemoteAsync, Ut as resolveFullRefAsync, V as readCommittedSettings, X as resolveProjectSettings, Y as resolveIosProjectDir, _ as inertSettingWarning, _t as deleteBranchAsync, a as SETTING_SHAPE_REMEDY, bt as dirtyPathsAsync, gt as cloneIgnoredEntries, ht as branchExistsAsync, jt as listWorktreesAsync, nn as moveIgnoredTreesToTrash, qt as unpushedCommitsAsync, rn as restoreTrashedTrees, rt as settingShapeErrors, st as unknownSettingKeys, tn as disposeTrash, vt as depsOutOfSync, wt as hasPopulatedSubmodulesAsync, zt as removeWorktreeAsync } from "./settings-D776ygML.mjs";
|
|
7
|
+
import { F as readRemoteSessionId, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, i as findProjectRoot$1, k as clearRemoteSession, o as isMobileProject } from "./project-DPQjnpcI.mjs";
|
|
8
|
+
import { t as macosAppPresent } from "./state-C2AUjjhg.mjs";
|
|
9
|
+
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
|
|
10
|
+
import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-DdKG6lyD.mjs";
|
|
11
|
+
import { c as pidExists, d as resolveProjectMetro, p as signalProcessTreeAsync, r as killMetroTreeAsync } from "./metro-BMQHczcf.mjs";
|
|
12
|
+
import { A as diskPressureLevel, D as requestDevServerStop, En as runProcessOperation, G as planCacheEmptying, Ln as resolveEasCliBin, N as lowestFree, Ot as endRecordedSession, _ as resolveBudget, g as readVolumeSpaceAsync, h as readVolumeSpace, k as withdrawDevServerStopRequest, p as machineNumber, ur as discoverCaches } from "./ccache-B8gY50-h.mjs";
|
|
13
|
+
import { o as readWebRecord } from "./state-D5ZxwCGJ.mjs";
|
|
14
|
+
import { C as stopTunnel, E as withManagedRemoteWorktreeRemovalLock, O as withManagedTunnelRemovalLock, _ as emptyWorkspaceDir, ht as teardownOwnedIosSim, mt as teardownOwnedBrowser, o as collectWorkspaceOutputs, pt as teardownOwnedAvd, v as withIdleWorkspace, x as resolveSupervisorTarget } from "./workspaces-7_RWoi6c.mjs";
|
|
15
15
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
16
|
-
import {
|
|
17
|
-
import { D as releaseWorkspaceLeases, t as agentDeviceDaemon } from "./activity-
|
|
18
|
-
import { R as readHostMemoryPressure, z as readHostMemoryPressureAsync } from "./ios-
|
|
19
|
-
import { t as clearNamedPorts } from "./named-ports-
|
|
20
|
-
import { t as resolveMaintenanceSettings } from "./settings-
|
|
21
|
-
import { i as stopHostedAndroid } from "./hosted-android-
|
|
22
|
-
import { a as stopHostedIos, n as removePhoneReverses } from "./phone-reverses-
|
|
23
|
-
import { r as stopMacosApp } from "./stop-
|
|
24
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
16
|
+
import { C as DEPS_ERROR, E as readPodState, M as HEARTBEAT_INTERVAL_MS, O as runCaptured, T as podsAreStale, X as podInstallCommand, k as runPodInstall, lt as cacheUser } from "./toolchain-DLdoyxIt.mjs";
|
|
17
|
+
import { D as releaseWorkspaceLeases, t as agentDeviceDaemon } from "./activity-BTaUf0tc.mjs";
|
|
18
|
+
import { R as readHostMemoryPressure, z as readHostMemoryPressureAsync } from "./ios-CXnoVO_z.mjs";
|
|
19
|
+
import { t as clearNamedPorts } from "./named-ports-DcktE2Pw.mjs";
|
|
20
|
+
import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
|
|
21
|
+
import { i as stopHostedAndroid } from "./hosted-android-Du7NxufJ.mjs";
|
|
22
|
+
import { a as stopHostedIos, n as removePhoneReverses } from "./phone-reverses-CvhhkGMH.mjs";
|
|
23
|
+
import { r as stopMacosApp } from "./stop-CMVfaA-6.mjs";
|
|
24
|
+
import { n as verifyCollectorOwnership } from "./ownership-Dtz9G5Gl.mjs";
|
|
25
25
|
import { o as pullRequestLookupAsync, r as endedPullRequest } from "./pull-request-BzLmzAIQ.mjs";
|
|
26
|
-
import { c as mergeStateAsync, d as forgetStatusMeasures, t as startWarmProgress } from "./warm-progress-
|
|
27
|
-
import { r as workspaceRecordingEnabled } from "./recordings-
|
|
28
|
-
import { i as installedNpmTreeProblems, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-
|
|
29
|
-
import { a as discoverXcodeProject } from "./react-native-build-
|
|
26
|
+
import { c as mergeStateAsync, d as forgetStatusMeasures, t as startWarmProgress } from "./warm-progress-DQ2wQZKp.mjs";
|
|
27
|
+
import { r as workspaceRecordingEnabled } from "./recordings-CHMaF73C.mjs";
|
|
28
|
+
import { i as installedNpmTreeProblems, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-CPKAKCZ8.mjs";
|
|
29
|
+
import { a as discoverXcodeProject } from "./react-native-build-BSoh4HkH.mjs";
|
|
30
30
|
import { claimRemoveCommand, clearFreeClaimSet, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
31
31
|
import { createHash, randomUUID } from "node:crypto";
|
|
32
32
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stim",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Stim: fast, isolated React Native environments for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@expo/fingerprint": "^0.21.5",
|
|
56
|
-
"@stim-cli/agent-driver": "1.
|
|
57
|
-
"@stim-cli/agent-driver-agent-device": "1.
|
|
58
|
-
"@stim-cli/cache": "1.
|
|
59
|
-
"@stim-cli/core": "1.
|
|
60
|
-
"@stim-cli/metro": "1.
|
|
56
|
+
"@stim-cli/agent-driver": "1.30.0",
|
|
57
|
+
"@stim-cli/agent-driver-agent-device": "1.30.0",
|
|
58
|
+
"@stim-cli/cache": "1.30.0",
|
|
59
|
+
"@stim-cli/core": "1.30.0",
|
|
60
|
+
"@stim-cli/metro": "1.30.0",
|
|
61
61
|
"@xmldom/xmldom": "0.9.12",
|
|
62
62
|
"chalk": "^6.0.0",
|
|
63
63
|
"commander": "^15.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"ws": "^8.21.3"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@stim-cli/expo-build-cache": "1.
|
|
69
|
+
"@stim-cli/expo-build-cache": "1.30.0",
|
|
70
70
|
"@types/cross-spawn": "^6.0.6",
|
|
71
71
|
"@types/which": "^3.0.4",
|
|
72
72
|
"@types/ws": "^8.18.1",
|
package/shim/bundle-response.cjs
CHANGED
|
@@ -9,6 +9,12 @@ const PROGRESS_PART = /^\{"done":(\d+),"total":(\d+),"percent":(\d+)\}$/;
|
|
|
9
9
|
const PROGRESS_INTERVAL_MS = 1000;
|
|
10
10
|
const MANIFEST_PATHS = new Set(['/', '/manifest', '/index.exp']);
|
|
11
11
|
const observedServers = new WeakSet();
|
|
12
|
+
// Metro's HmrServer reports no reporter event when it pushes a change: it sends `update-start` with
|
|
13
|
+
// `isInitialUpdate: false` over the `/hot` websocket, and `isInitialUpdate: true` when a client registers.
|
|
14
|
+
// https://github.com/facebook/metro/blob/main/packages/metro/src/HmrServer.js (`_handleFileChange`)
|
|
15
|
+
const HMR_UPDATE = ['"type":"update-start"', '"isInitialUpdate":false'];
|
|
16
|
+
const HMR_UPDATE_INTERVAL_MS = 60_000;
|
|
17
|
+
const hmrServers = new WeakSet();
|
|
12
18
|
|
|
13
19
|
function clientPidFromLsof(output, clientPort, serverPort) {
|
|
14
20
|
const connection = new RegExp(`:${clientPort}->\\S*:${serverPort}$`);
|
|
@@ -78,8 +84,39 @@ function observeManifestRequests(server, write) {
|
|
|
78
84
|
});
|
|
79
85
|
}
|
|
80
86
|
|
|
87
|
+
function observeHmrUpdates(server, write) {
|
|
88
|
+
if (!server || hmrServers.has(server)) return;
|
|
89
|
+
hmrServers.add(server);
|
|
90
|
+
let recordedAt = 0;
|
|
91
|
+
server.prependListener('upgrade', (req, socket) => {
|
|
92
|
+
let pathname;
|
|
93
|
+
try {
|
|
94
|
+
pathname = new URL(req.url, 'http://localhost').pathname;
|
|
95
|
+
} catch {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (pathname !== '/hot') return;
|
|
99
|
+
const send = socket.write;
|
|
100
|
+
socket.write = function (chunk, ...rest) {
|
|
101
|
+
const now = Date.now();
|
|
102
|
+
if (
|
|
103
|
+
now - recordedAt >= HMR_UPDATE_INTERVAL_MS &&
|
|
104
|
+
(typeof chunk === 'string' || Buffer.isBuffer(chunk)) &&
|
|
105
|
+
HMR_UPDATE.every((part) => chunk.includes(part))
|
|
106
|
+
) {
|
|
107
|
+
recordedAt = now;
|
|
108
|
+
try {
|
|
109
|
+
write({ ts: now, src: 'metro', level: 'debug', event: 'hmr_update', msg: 'HMR update sent to the app' });
|
|
110
|
+
} catch {}
|
|
111
|
+
}
|
|
112
|
+
return send.call(this, chunk, ...rest);
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
81
117
|
function bundleResponseMiddleware(write, { runLsof, manifests = false } = {}) {
|
|
82
118
|
return (req, res, next) => {
|
|
119
|
+
observeHmrUpdates(req.socket.server, write);
|
|
83
120
|
if (req.method === 'GET' && req.url === '/_stim/metro-warmup') {
|
|
84
121
|
if (manifests) observeManifestRequests(req.socket.server, write);
|
|
85
122
|
res.end('ready');
|
package/dist/web-CrVLVQZY.mjs
DELETED