stim 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{acquire-artifact-ybouwJSR.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
- package/dist/{act-DG54PWtJ.mjs → act-Cyvm8xYc.mjs} +40 -25
- package/dist/{activity-B5RtpFda.mjs → activity-Dq3ZcdD8.mjs} +6 -6
- package/dist/{agent-device-usage-output-UJ5gC80l.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
- package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
- package/dist/{android-BoUJKbfz.mjs → android-BZppyPe_.mjs} +66 -46
- package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
- package/dist/{android-CHH4KLOR.mjs → android-DcztblCT.mjs} +5 -5
- package/dist/{android-cas-ngferVq2.mjs → android-cas-BtCOrNqb.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api.d.mts +22 -4
- package/dist/api.mjs +32 -31
- package/dist/{artifact-5RteZem7.mjs → artifact-BR5VNArK.mjs} +17 -16
- package/dist/{artifact-Dwdo7k1E.mjs → artifact-Bdt_n9Jc.mjs} +17 -16
- package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
- package/dist/{browser-web-CeEVlGug.mjs → browser-web-ycg9qWB8.mjs} +16 -17
- package/dist/{budget-DnPX3DXj.mjs → budget-dPGuhNai.mjs} +101 -40
- package/dist/{build-CqufZFqy.mjs → build-CaF574eS.mjs} +31 -28
- package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
- package/dist/{build-plan-C8CIvRyi.mjs → build-plan-JsDUq4w1.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-RcAy92gH.mjs → ccache-CCn1S6qG.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-D-J9fWGV.mjs → cli-xqAidP7O.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-yyso1bwi.mjs → client-18-ZowoT.mjs} +254 -28
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-Db8BqzxH.mjs → command-output-DxC0k2rk.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-C56ll9hY.mjs} +2 -2
- package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
- package/dist/{dev-client-BnYSDiKa.mjs → dev-client-w_fok0Ek.mjs} +3 -3
- package/dist/{device-BvzPUBs3.mjs → device-4RUugw5X.mjs} +16 -16
- package/dist/{device-CCkWmkAA.mjs → device-BktRGdjS.mjs} +40 -44
- package/dist/{device-capacity-CjaSdrhg.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
- package/dist/device-host-worker.mjs +17 -17
- package/dist/{device-ios-uOiEETX2.mjs → device-ios-DzpSlZyd.mjs} +23 -24
- package/dist/{device-lease-run-BgwPHc6u.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
- package/dist/{device-pool-C-ptmZTa.mjs → device-pool-CgBHk401.mjs} +3 -3
- package/dist/{doctor-pxxvipYC.mjs → doctor-BZ6oxNum.mjs} +1 -1
- package/dist/{doctor-8sr2tFOL.mjs → doctor-C33AzVfR.mjs} +28 -28
- package/dist/{doctor-D2SN3Ltx.mjs → doctor-DZgpqR6J.mjs} +17 -16
- package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-sy_RNhFt.mjs → doctor-watchman-B453A231.mjs} +5 -5
- package/dist/{eas-build-CyjU5K7E.mjs → eas-build-CxKUNHsb.mjs} +4 -4
- package/dist/{eas-fallback-DV3Wytf1.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
- package/dist/{eas-session-ledger-BzzsX97d.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
- package/dist/{error-diagnostics-C6sVoeqO.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
- package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
- package/dist/{gc-DLbzvTP2.mjs → gc-DDWEAj0w.mjs} +2 -2
- package/dist/{gc-CDoogxAI.mjs → gc-yVKpAOKM.mjs} +205 -28
- package/dist/{guide-BC37GcDG.mjs → guide-Bggftwc5.mjs} +252 -73
- package/dist/{hosted-android-CkclQig_.mjs → hosted-android-D4dweBof.mjs} +4 -4
- package/dist/{hosted-client-ByuMMO5s.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
- package/dist/{hosted-ios-DtYHeuYR.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
- package/dist/{hosted-logs-Br84qWy1.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
- package/dist/{hosted-macos-DdtYajZt.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
- package/dist/{hosted-native-UPI9zdZ4.mjs → hosted-native-Doxbfzem.mjs} +58 -11
- package/dist/{idle-shutdown-DO7oIRlc.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
- package/dist/{ios-DZZbNYlY.mjs → ios-B1FXRCMX.mjs} +71 -44
- package/dist/{ios-vbUOqGXu.mjs → ios-BItP6lkn.mjs} +8 -8
- package/dist/{ios-hcBpnEGk.mjs → ios-CVUFFZ6C.mjs} +70 -13
- 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-JC3uWM4K.mjs → ios-device-BI38NFFH.mjs} +3 -3
- package/dist/{ios-project-CVyNwjAF.mjs → ios-project-KYqeJURj.mjs} +5 -5
- package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
- package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-DlElquYD.mjs} +15 -7
- package/dist/{js-swap-C3QxUFJR.mjs → js-swap-BvrQvXHY.mjs} +7 -6
- package/dist/{launch-CHY3p-yz.mjs → launch-BVlyQw3T.mjs} +51 -49
- package/dist/{launch-Bz7JtaC4.mjs → launch-SfzGH_s9.mjs} +48 -29
- package/dist/{logs-mxqsWpJs.mjs → logs-DXE32kyb.mjs} +16 -9
- package/dist/{logs-CtNeNDuq.mjs → logs-ovlU7m7N.mjs} +8 -6
- package/dist/{macos-inNFbBWc.mjs → macos-B3BveDrU.mjs} +1 -1
- package/dist/{macos-u0BoHKnO.mjs → macos-CCfhb-jT.mjs} +49 -42
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-DiXtA3Ty.mjs → metro-Bu8LBfzS.mjs} +4 -4
- package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-DtsOy-0P.mjs} +3 -4
- package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BWDuU5oQ.mjs} +3 -3
- package/dist/{native-android-CdCSylTn.mjs → native-android-96BBizbq.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BcLYBZil.mjs} +5 -5
- package/dist/{native-run-BUTu8T7A.mjs → native-run-BmH7U8pr.mjs} +6 -6
- package/dist/{native-runtime-CRSOZxKY.mjs → native-runtime-DgtJkzIa.mjs} +10 -9
- package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
- package/dist/{native-xcode-inputs-G6rkkhxu.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
- package/dist/{native-xcode-ios-_os2PlCD.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
- package/dist/offload-worker.d.mts +7 -2
- package/dist/offload-worker.mjs +104 -43
- package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
- package/dist/{ownership-C5fo5Edb.mjs → ownership-DxlZGDcV.mjs} +3 -3
- package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
- package/dist/phone-reverses-BdsdesVF.mjs +57 -0
- package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DUvqqsB-.mjs} +1 -1
- package/dist/{plan-placement-BU42oOyT.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
- package/dist/{ports-BSmQKzW7.mjs → ports-D-E_OiAO.mjs} +3 -3
- package/dist/{prebuild-BFm63bQ0.mjs → prebuild-DmVCf5xb.mjs} +14 -9
- package/dist/{project-CTLNHCfE.mjs → project-Dz-hWkb-.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-CFgUroxW.mjs → react-native-android-DOinxgwB.mjs} +75 -32
- package/dist/{react-native-build-CmJkTljQ.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
- package/dist/{react-native-doctor-LTF-Xt8l.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
- package/dist/{react-native-ios-ChBF1MkB.mjs → react-native-ios-D5zTIuH8.mjs} +38 -22
- package/dist/{recordings-CQmfzAh7.mjs → recordings-CdPwYwvs.mjs} +1 -1
- package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
- package/dist/{reload-DF9hqUUB.mjs → reload-C1TTVesC.mjs} +144 -42
- package/dist/{reload-RBi1nj6Z.mjs → reload-Ck9RJeSq.mjs} +1 -1
- package/dist/{remote-BmvMCcJw.mjs → remote-DEZ7AOVq.mjs} +7 -7
- package/dist/{result-Cx5CRLvS.mjs → result-DqBrb12U.mjs} +40 -17
- package/dist/{run-DidHghD1.mjs → run-BIwoU44q.mjs} +2 -2
- package/dist/{selection-DSMbWEX2.mjs → selection-BLtvaqxc.mjs} +11 -5
- package/dist/{server-bare-CafzuyFB.mjs → server-bare-Z1ToVLPn.mjs} +2 -2
- package/dist/{server-command-BTiGPEjS.mjs → server-command-C0pmjNdG.mjs} +6 -6
- package/dist/server-expo-CEntXzRw.mjs +2 -0
- package/dist/{server-expo-D9lEz4aq.mjs → server-expo-Tt_hLRpy.mjs} +37 -13
- package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
- package/dist/{settings-eKF_vJJs.mjs → settings-kkt0vP4w.mjs} +1 -1
- package/dist/{settings-write-79mQRr9C.mjs → settings-write--gj6MACV.mjs} +7 -7
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-BNckWpXi.mjs → simslim-CdWKT3vA.mjs} +2 -2
- package/dist/{slot-launch-D7M2nE4b.mjs → slot-launch-A1BgotaM.mjs} +6 -6
- package/dist/{stage-DKNM4ZPd.mjs → stage-ERTMh88n.mjs} +2 -3
- package/dist/{start-bjfiScgz.mjs → start-BKGrEhzG.mjs} +75 -35
- package/dist/{start-CRfN1kWV.mjs → start-Bmg_qmHi.mjs} +1 -1
- package/dist/{state--smjFSTL.mjs → state-B1ig0Kqy.mjs} +4 -4
- package/dist/{state-08I3hw3_.mjs → state-BfAltYJP.mjs} +2 -2
- package/dist/{stats-DioA6cBU.mjs → stats-B-ckuiUg.mjs} +5 -5
- package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
- package/dist/{status-kzbeWk4x.mjs → status-DfFp6a76.mjs} +24 -24
- package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
- package/dist/{status-Eqx_20WC.mjs → status-Pw-807f0.mjs} +1 -1
- package/dist/{status-watch-BIqqbJ6q.mjs → status-watch-XC7F-AMf.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-B18d8KDw.mjs → stop-BFu7X_Do.mjs} +2 -2
- package/dist/{stop-B2uLQfoM.mjs → stop-CL1kDHds.mjs} +55 -21
- package/dist/{stop-DzLJc7Ei.mjs → stop-DhclRwOO.mjs} +5 -5
- package/dist/supervisor-run.mjs +16 -16
- package/dist/{support-BTpZ6RAJ.mjs → support-B1W-hmC2.mjs} +8 -8
- package/dist/{support-DTBV56gy.mjs → support-B3tzVhKn.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-BWYPj9Sn.mjs} +4 -4
- package/dist/{swiftpm-macos-r_WSKlXr.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
- package/dist/{toolchain-GVgnf8d1.mjs → toolchain-BjgKdoEf.mjs} +1 -1
- package/dist/{toolchain-CWeGJgCc.mjs → toolchain-D3bmRMia.mjs} +57 -36
- 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-ol0ZypEu.mjs} +6 -6
- package/dist/{web-CwREhjD-.mjs → web-BH7peScT.mjs} +12 -10
- package/dist/web-BdOFlTJr.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-CeBpIZgr.mjs} +11 -4
- package/dist/{workspaces-BxzYlo3P.mjs → workspaces-CSV2Orf4.mjs} +36 -32
- package/dist/{worktree-BxfVxG_b.mjs → worktree-DEDUzO_L.mjs} +1 -1
- package/dist/{worktree-8lqn_lBp.mjs → worktree-Dw8kfacb.mjs} +324 -99
- package/dist/{xcode-iQnROM5o.mjs → xcode-DHu41qQ4.mjs} +41 -27
- package/package.json +7 -7
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
- package/dist/server-expo-C-Buqvn_.mjs +0 -2
- package/dist/trigger-yb_nFzPF.mjs +0 -2
- package/dist/web-Cduk0NSE.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { n as TOOL_ERROR_PREFIX } from "./ios-device-
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { dn as INSTALL_ERROR, hn as appProcessFromPid } from "./budget-dPGuhNai.mjs";
|
|
3
|
+
import { n as TOOL_ERROR_PREFIX } from "./ios-device-B6HK951C.mjs";
|
|
4
4
|
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { l as workspaceAgentDeviceDir } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { i as formatDuration, l as phaseLine } from "./command-output-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-
|
|
6
|
-
import { i as deviceLabel } from "./support-
|
|
2
|
+
import { i as formatDuration, l as phaseLine } from "./command-output-DxC0k2rk.mjs";
|
|
3
|
+
import { a as workspaceLinkLine } from "./stim-desktop-DS0mzR8U.mjs";
|
|
4
|
+
import { B as recordFinishedBuild, Bn as UPLOAD_TIMEOUT_MS, Un as easAuthNote, Vn as cacheLevel, Wn as isEasAuthFailureText } from "./budget-dPGuhNai.mjs";
|
|
5
|
+
import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-DHu41qQ4.mjs";
|
|
6
|
+
import { i as deviceLabel } from "./support-B1W-hmC2.mjs";
|
|
7
7
|
import { buildDiagnostics } from "@stim-cli/core/state";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
//#region src/commands/ios/result.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { a as killOnAbort,
|
|
1
|
+
import { c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { a as killOnAbort, r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
|
|
3
3
|
import { X509Certificate } from "node:crypto";
|
|
4
4
|
import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-
|
|
1
|
+
import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
|
|
2
2
|
import { HOSTED_METRO_REQUESTS_KEY, hostedMetroRequests, hostedNativeRecords, isJsonObject, parseHostedNativePlacement, unreadableHostedNative } from "@stim-cli/core/state";
|
|
3
3
|
//#region src/device-host/ios-state.ts
|
|
4
4
|
function readHostedNative(root, platform, slot) {
|
|
@@ -42,6 +42,10 @@ function writeDevicePlacement(root, slot, platform, placement) {
|
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
+
/** Records the device placement after asynchronously acquiring the workspace state lock; no placement takes no lock. */
|
|
46
|
+
async function writeDevicePlacementAsync(root, slot, platform, placement) {
|
|
47
|
+
if (placement) await withWorkspaceStateLockAsync(root, () => writeDevicePlacement(root, slot, platform, placement));
|
|
48
|
+
}
|
|
45
49
|
function writeHostedNative(root, slot, host, platform) {
|
|
46
50
|
updateWorkspaceState(root, (state) => {
|
|
47
51
|
const slots = isJsonObject(state.deviceSlots) ? state.deviceSlots : {};
|
|
@@ -76,14 +80,18 @@ function writeHostedNative(root, slot, host, platform) {
|
|
|
76
80
|
function readHostedIos(root, slot) {
|
|
77
81
|
return readHostedNative(root, "ios", slot);
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
/** Records a hosted placement after asynchronously acquiring the workspace state lock. */
|
|
84
|
+
function writeHostedNativeAsync(root, slot, host, platform) {
|
|
85
|
+
return withWorkspaceStateLockAsync(root, () => writeHostedNative(root, slot, host, platform));
|
|
86
|
+
}
|
|
87
|
+
function writeHostedIosAsync(root, slot, host) {
|
|
88
|
+
return writeHostedNativeAsync(root, slot, host, "ios");
|
|
89
|
+
}
|
|
90
|
+
function writeHostedAndroidAsync(root, slot, host) {
|
|
91
|
+
return writeHostedNativeAsync(root, slot, host, "android");
|
|
81
92
|
}
|
|
82
93
|
function readHostedAndroid(root, slot) {
|
|
83
94
|
return readHostedNative(root, "android", slot);
|
|
84
95
|
}
|
|
85
|
-
function writeHostedAndroid(root, slot, host) {
|
|
86
|
-
writeHostedNative(root, slot, host, "android");
|
|
87
|
-
}
|
|
88
96
|
//#endregion
|
|
89
|
-
export {
|
|
97
|
+
export { writeHostedAndroidAsync as a, writeHostedNativeAsync as c, writeDevicePlacementAsync as i, readHostedIos as n, writeHostedIosAsync as o, readHostedNative as r, writeHostedNative as s, readHostedAndroid as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as spawnDeclared, b as operationState, c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
3
|
-
import { a as killOnAbort,
|
|
4
|
-
import { Ht as makeTemporaryDirectory, Ut as removeTemporaryEntry } from "./settings-
|
|
5
|
-
import {
|
|
6
|
-
import { t as cleanLine } from "./server-expo-
|
|
7
|
-
import { _ as tailLines, h as startBuildHeartbeat, r as HEARTBEAT_INTERVAL_MS } from "./xcode-
|
|
3
|
+
import { a as killOnAbort, t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
|
|
4
|
+
import { Ht as makeTemporaryDirectory, Ut as removeTemporaryEntry } from "./settings-RKwY33wv.mjs";
|
|
5
|
+
import { Qn as bundleInvocation } from "./budget-dPGuhNai.mjs";
|
|
6
|
+
import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-Tt_hLRpy.mjs";
|
|
7
|
+
import { _ as tailLines, h as startBuildHeartbeat, r as HEARTBEAT_INTERVAL_MS } from "./xcode-DHu41qQ4.mjs";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { basename, join } from "node:path";
|
|
@@ -312,6 +312,7 @@ async function swapJsBundle({ context, root, iosDir, isExpo, cachedAppPath, logW
|
|
|
312
312
|
],
|
|
313
313
|
env: {
|
|
314
314
|
...context?.env ?? process.env,
|
|
315
|
+
...expoTelemetryEnv(context?.env ?? process.env),
|
|
315
316
|
FORCE_COLOR: "0"
|
|
316
317
|
}
|
|
317
318
|
}));
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { o as cancellableSleep, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { B as deviceSlotFileKey, E as upsertProject, V as deviceSlotKey, p as getProject, u as getConcurrencyLimits, v as recordIosSchemeApprovals } from "./config-
|
|
4
|
-
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { B as deviceSlotFileKey, E as upsertProject, O as withConfigLockAsync, V as deviceSlotKey, p as getProject, u as getConcurrencyLimits, v as recordIosSchemeApprovals } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DxC0k2rk.mjs";
|
|
5
|
+
import { f as writeWorkspaceStateAsync, r as readWorkspaceState } from "./workspace-state-CeBpIZgr.mjs";
|
|
6
|
+
import { $ as settingOriginScope, G as resolveCacheProviderConfig, Ht as makeTemporaryDirectory, Nt as repoRootAsync, Ut as removeTemporaryEntry, Y as resolveSettings, ct as detectProviders, nt as settingsLayers, vt as gitCommonDirAsync } from "./settings-RKwY33wv.mjs";
|
|
7
|
+
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-Dz-hWkb-.mjs";
|
|
8
|
+
import { o as workspaceLinks } from "./stim-desktop-DS0mzR8U.mjs";
|
|
9
|
+
import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-Bu8LBfzS.mjs";
|
|
9
10
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { n as
|
|
20
|
-
import { n as
|
|
21
|
-
import { n as
|
|
22
|
-
import {
|
|
23
|
-
import { c as startDevServer, g as detectBundleId } from "./start-bjfiScgz.mjs";
|
|
11
|
+
import { Bt as bundleEntryPoint, Cn as installIosApp, Dn as launchIosApp, Fn as gateMetroOrigin, Gn as loadProjectProvider, Hn as checkEasAuth, Ht as ensureMetroReachable, J as recordCapacityRefusal, K as readRunEstimates, Kt as remoteIosDeps, On as restartedAppNote, Pn as readRemoteSimulatorArch, Qt as RELEASE_VERIFY_WAIT_MS, Ut as ensureRemoteBootOwned, X as recordRunStats, Xn as resolveRemote, Xt as LAUNCH_FATAL, Yn as resolveEasCliBin, Yt as LAUNCH_BUNDLING, Zn as uploadRemote, Zt as LAUNCH_UNVERIFIED, _n as devClientUrl, en as isBundleProof, fn as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, gn as clearOtherUserApps, in as unverifiedLaunchLines, nn as readMetroRecords, on as verifyLaunch, qt as resolveRemoteContext, rn as unattributedLaunchLines, sn as verifyReleaseLaunch, t as budgetGate, tn as readCollectorRecords, wn as iosAppProcess } from "./budget-dPGuhNai.mjs";
|
|
12
|
+
import { L as acquireBuildSlot, z as releaseBuildSlot } from "./workspaces-CSV2Orf4.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-Dq3ZcdD8.mjs";
|
|
14
|
+
import { T as untrackedNativeFiles, b as storeBuild, d as fingerprintProject, y as resolveBuild } from "./build-cache-HFUQ9eLz.mjs";
|
|
15
|
+
import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-CVUFFZ6C.mjs";
|
|
16
|
+
import { f as readBundleExecutable, m as resolveScheme, p as readBundleId } from "./xcode-DHu41qQ4.mjs";
|
|
17
|
+
import { h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-D3bmRMia.mjs";
|
|
18
|
+
import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-DlElquYD.mjs";
|
|
19
|
+
import { n as hostedMetroPortProbe } from "./hosted-native-Doxbfzem.mjs";
|
|
20
|
+
import { n as prepareHostedIos, t as placeHostedIos } from "./hosted-ios-Sn0djzg8.mjs";
|
|
21
|
+
import { n as verifyCollectorOwnership } from "./ownership-DxlZGDcV.mjs";
|
|
22
|
+
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-A1BgotaM.mjs";
|
|
23
|
+
import { c as startDevServer, g as detectBundleId } from "./start-BKGrEhzG.mjs";
|
|
24
24
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
25
|
-
import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-
|
|
26
|
-
import { a as acquireRunLease, c as lostRefusal, d as runLease, s as lostLine, t as DEBUG_VERIFY_STEP_MS, u as releaseLeaseOnAbort } from "./device-lease-run-
|
|
27
|
-
import { r as checkDeviceCapacity } from "./device-capacity-
|
|
28
|
-
import { n as clearIosAdoptionPending } from "./device-ios-
|
|
29
|
-
import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-
|
|
30
|
-
import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-
|
|
31
|
-
import { a as resolveEasDevelopmentBuild } from "./eas-build-
|
|
32
|
-
import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-
|
|
33
|
-
import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
34
|
-
import {
|
|
35
|
-
import { n as devClientTakesDevMenuParams, t as devClientScheme } from "./dev-client-
|
|
36
|
-
import { n as automaticDevicePlacement, t as checkEasFallback } from "./eas-fallback-
|
|
37
|
-
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-
|
|
38
|
-
import { t as selectFromPool } from "./device-pool-
|
|
39
|
-
import { o as reportIosResult } from "./ios-project-
|
|
40
|
-
import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-
|
|
41
|
-
import { i as swapJsBundle } from "./js-swap-
|
|
25
|
+
import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-AuCu-aAP.mjs";
|
|
26
|
+
import { a as acquireRunLease, c as lostRefusal, d as runLease, s as lostLine, t as DEBUG_VERIFY_STEP_MS, u as releaseLeaseOnAbort } from "./device-lease-run-DUtkbqBQ.mjs";
|
|
27
|
+
import { r as checkDeviceCapacity } from "./device-capacity-Ic-kdmEV.mjs";
|
|
28
|
+
import { n as clearIosAdoptionPending } from "./device-ios-DzpSlZyd.mjs";
|
|
29
|
+
import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-B1W-hmC2.mjs";
|
|
30
|
+
import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-4c_qXvQm.mjs";
|
|
31
|
+
import { a as resolveEasDevelopmentBuild } from "./eas-build-CxKUNHsb.mjs";
|
|
32
|
+
import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-BkKCZq4P.mjs";
|
|
33
|
+
import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-DgtJkzIa.mjs";
|
|
34
|
+
import { a as runPrebuild, n as planPrebuildAsync } from "./prebuild-DmVCf5xb.mjs";
|
|
35
|
+
import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-w_fok0Ek.mjs";
|
|
36
|
+
import { n as automaticDevicePlacement, t as checkEasFallback } from "./eas-fallback-LMxk9Kw0.mjs";
|
|
37
|
+
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-BktRGdjS.mjs";
|
|
38
|
+
import { t as selectFromPool } from "./device-pool-CgBHk401.mjs";
|
|
39
|
+
import { o as reportIosResult } from "./ios-project-KYqeJURj.mjs";
|
|
40
|
+
import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-BI38NFFH.mjs";
|
|
41
|
+
import { i as swapJsBundle } from "./js-swap-BvrQvXHY.mjs";
|
|
42
42
|
import { mkdirSync, openSync, writeFileSync } from "node:fs";
|
|
43
43
|
import { networkInterfaces } from "node:os";
|
|
44
44
|
import { basename, join } from "node:path";
|
|
@@ -257,8 +257,9 @@ const DEFAULT_DEPS = {
|
|
|
257
257
|
checkEasFallback,
|
|
258
258
|
prepareHostedIos,
|
|
259
259
|
placeHostedIos,
|
|
260
|
+
hostedMetroPortProbe,
|
|
260
261
|
readHostedIos,
|
|
261
|
-
writeHostedIos,
|
|
262
|
+
writeHostedIos: writeHostedIosAsync,
|
|
262
263
|
resolveEasDevelopmentBuild,
|
|
263
264
|
findProjectRoot,
|
|
264
265
|
resolveSettings,
|
|
@@ -269,9 +270,10 @@ const DEFAULT_DEPS = {
|
|
|
269
270
|
detectBundleId,
|
|
270
271
|
detectIsExpo,
|
|
271
272
|
devClientScheme,
|
|
273
|
+
hasDevClient,
|
|
272
274
|
devClientTakesDevMenuParams,
|
|
273
275
|
getProject,
|
|
274
|
-
upsertProject,
|
|
276
|
+
upsertProject: (...args) => withConfigLockAsync(() => upsertProject(...args)),
|
|
275
277
|
recordIosSchemeApprovals,
|
|
276
278
|
checkDeviceCapacity,
|
|
277
279
|
budgetGate,
|
|
@@ -342,8 +344,8 @@ const DEFAULT_DEPS = {
|
|
|
342
344
|
ensureWorkspaceStorage: ensureWorkspaceStorageSafely,
|
|
343
345
|
replaceCollector,
|
|
344
346
|
stopPreviousCollector,
|
|
345
|
-
writeWorkspaceLaunch,
|
|
346
|
-
writeWorkspaceState,
|
|
347
|
+
writeWorkspaceLaunch: writeWorkspaceLaunchAsync,
|
|
348
|
+
writeWorkspaceState: writeWorkspaceStateAsync,
|
|
347
349
|
createWriter: createNdjsonWriter,
|
|
348
350
|
recordStats: recordRunStats,
|
|
349
351
|
recordCapacityRefusal,
|
|
@@ -498,7 +500,7 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
498
500
|
phase("verify", `bundle loaded` + (verification.processAlive === true ? ", process alive" : "") + (verification.readiness ? "" : ", stable for 3s -- the first screen may still be rendering") + ` (${formatDuration(verification.waitedMs ?? 0)} total)`);
|
|
499
501
|
const hasAppErrors = reportLaunchErrors(verification.errors ?? [], note, root);
|
|
500
502
|
if (hasAppErrors && verification.processAlive === true && metroPort !== null) {
|
|
501
|
-
const reloadRemedy =
|
|
503
|
+
const reloadRemedy = remoteDevice ? `run \`agent-device metro reload --metro-port ${metroPort}\`.` : "run `stim reload ios`.";
|
|
502
504
|
note(chalk.yellow(phaseLine("remedy", `The native app is still running. Fix the JavaScript or TypeScript error; Fast Refresh should apply the edit. If the error screen remains, ${reloadRemedy} Do not run \`${runCommand}\` unless native inputs changed or the app process exits.`)));
|
|
503
505
|
}
|
|
504
506
|
return {
|
|
@@ -619,10 +621,10 @@ async function readRunExecutable(d, appPath, note) {
|
|
|
619
621
|
if (appPath && !executable) note(chalk.dim(`Could not read CFBundleExecutable from ${appPath}; the device log predicate falls back to the .app basename.`));
|
|
620
622
|
return executable;
|
|
621
623
|
}
|
|
622
|
-
function recordIosReloadTarget({ d, root, physical, remoteDevice, bundleId, udid, metroPort, release, runtimeKind, launchedAt, note }) {
|
|
624
|
+
async function recordIosReloadTarget({ d, root, physical, remoteDevice, bundleId, udid, metroPort, release, runtimeKind, launchedAt, note }) {
|
|
623
625
|
if (physical || remoteDevice) return;
|
|
624
626
|
try {
|
|
625
|
-
d.writeWorkspaceLaunch(root, "ios", {
|
|
627
|
+
await d.writeWorkspaceLaunch(root, "ios", {
|
|
626
628
|
appId: bundleId,
|
|
627
629
|
deviceId: udid,
|
|
628
630
|
metroPort,
|
|
@@ -680,7 +682,7 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
680
682
|
appPath
|
|
681
683
|
}
|
|
682
684
|
});
|
|
683
|
-
if (bundleId) d.upsertProject(root, { bundleId });
|
|
685
|
+
if (bundleId) await d.upsertProject(root, { bundleId });
|
|
684
686
|
enterPhase("device");
|
|
685
687
|
if (bootPending()) enterActivity("booting");
|
|
686
688
|
const booted = await bootPromise;
|
|
@@ -867,12 +869,12 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
867
869
|
bundleId
|
|
868
870
|
}
|
|
869
871
|
});
|
|
870
|
-
if (adopting) d.clearIosAdoptionPending(root, slot);
|
|
872
|
+
if (adopting) await d.clearIosAdoptionPending(root, slot);
|
|
871
873
|
installSkipped = Boolean(installed?.skipped);
|
|
872
874
|
const artifactDuration = installed?.artifactDurationMs === void 0 ? installTimer() : `(${formatDuration(installed.artifactDurationMs)})`;
|
|
873
875
|
phase("install", installSkipped ? `unchanged (${deviceShortName(device, udid)} already has this build) ${artifactDuration}` : `${basename(appPath)} -> ${deviceLabel(device, udid)} ${artifactDuration}`);
|
|
874
876
|
if (!remoteDevice && installed?.devClientPreparationDurationMs !== void 0) phase("install", `dev client prepared (${formatDuration(installed.devClientPreparationDurationMs)})`);
|
|
875
|
-
if (installed.schemeApprovals) d.recordIosSchemeApprovals(root, udid, installed.schemeApprovals, slot);
|
|
877
|
+
if (installed.schemeApprovals) await d.recordIosSchemeApprovals(root, udid, installed.schemeApprovals, slot);
|
|
876
878
|
dropSwapDir();
|
|
877
879
|
if (!remoteDevice) await d.replaceCollector({
|
|
878
880
|
root,
|
|
@@ -940,7 +942,7 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
940
942
|
}
|
|
941
943
|
phase("launch", `${bundleId}${restartedAppNote(launched.restartedPid)} ${launchTimer()}`);
|
|
942
944
|
}
|
|
943
|
-
recordIosReloadTarget({
|
|
945
|
+
await recordIosReloadTarget({
|
|
944
946
|
d,
|
|
945
947
|
root,
|
|
946
948
|
slot,
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { B as deviceSlotFileKey, C as saveConfig, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync, P as formatBytes, V as deviceSlotKey, _ as loadConfig, w as setDevice } from "./config-
|
|
3
|
-
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-
|
|
4
|
-
import { L as workspaceDevServerMode } from "./project-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-
|
|
12
|
-
import {
|
|
2
|
+
import { B as deviceSlotFileKey, C as saveConfig, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync, P as formatBytes, V as deviceSlotKey, _ as loadConfig, w as setDevice } from "./config-BZhXY15H.mjs";
|
|
3
|
+
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DxC0k2rk.mjs";
|
|
4
|
+
import { L as workspaceDevServerMode } from "./project-Dz-hWkb-.mjs";
|
|
5
|
+
import { o as workspaceLinks } from "./stim-desktop-DS0mzR8U.mjs";
|
|
6
|
+
import { i as androidDataFreeBytes, ot as trimAndroidCaches, tt as resetAdoptedAvd, u as androidToolCwd } from "./android-882m4hxX.mjs";
|
|
7
|
+
import { c as pidExists, f as signalProcessTree } from "./metro-Bu8LBfzS.mjs";
|
|
8
|
+
import { $t as VERIFY_TIMEOUT_MS, On as restartedAppNote, Qt as RELEASE_VERIFY_WAIT_MS, Sn as installConflictKind, Xt as LAUNCH_FATAL, Yt as LAUNCH_BUNDLING, Zt as LAUNCH_UNVERIFIED, in as unverifiedLaunchLines, ln as ADB_INSTALL_TIMEOUT_MS, mn as androidDevClientUrl, pn as androidAppProcess, rn as unattributedLaunchLines } from "./budget-dPGuhNai.mjs";
|
|
9
|
+
import { O as teardownOwnedAvd } from "./workspaces-CSV2Orf4.mjs";
|
|
10
|
+
import { _ as providerUploadOutcome } from "./build-cache-HFUQ9eLz.mjs";
|
|
11
|
+
import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-DxlZGDcV.mjs";
|
|
12
|
+
import { t as recordPhoneReverse } from "./phone-reverses-BdsdesVF.mjs";
|
|
13
|
+
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-A1BgotaM.mjs";
|
|
13
14
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
14
|
-
import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-
|
|
15
|
-
import { a as printNativeCrashReport, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-
|
|
16
|
-
import { i as launchOutcomeRecord } from "./native-runtime-
|
|
17
|
-
import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-
|
|
18
|
-
import { a as
|
|
15
|
+
import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-DUtkbqBQ.mjs";
|
|
16
|
+
import { a as printNativeCrashReport, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-BkKCZq4P.mjs";
|
|
17
|
+
import { i as launchOutcomeRecord } from "./native-runtime-DgtJkzIa.mjs";
|
|
18
|
+
import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-B3tzVhKn.mjs";
|
|
19
|
+
import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-DqBrb12U.mjs";
|
|
19
20
|
import { mkdirSync, openSync, statSync } from "node:fs";
|
|
20
21
|
import { basename, join } from "node:path";
|
|
21
22
|
import { ambientEnv } from "@stim-cli/core";
|
|
@@ -240,10 +241,7 @@ async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, veri
|
|
|
240
241
|
for (const line of launchErrorPreview(verification.errors ?? [], root)) phase("", chalk.red(line));
|
|
241
242
|
if (verification.processAlive === false && !verification.errors?.some((record) => record.event === "native_crash")) phase("logs", "No attributable native crash report captured yet. Run `stim logs --errors` again for delayed reports, or `stim logs --source device` for available output.");
|
|
242
243
|
if (nativeFatal || verification.processAlive === false) phase("remedy", chalk.yellow(`Fix the crash, then run \`${runCommand}\` again; it force-stops a crashed process that remains alive behind the system crash dialog. Metro reload cannot recover it.`));
|
|
243
|
-
else if (verification.processAlive === true && metroPort !== null) {
|
|
244
|
-
const reloadRemedy = physical ? `run \`agent-device metro reload --metro-port ${metroPort}\`.` : "run `stim reload android`.";
|
|
245
|
-
phase("remedy", chalk.yellow(`The native app is still running. ${deliveryFailed ? "Check the Metro logs and device connection, then" : "Fix the JavaScript or TypeScript error, then"} ${reloadRemedy} Do not run \`${runCommand}\` unless native inputs changed or the app process exits.`));
|
|
246
|
-
}
|
|
244
|
+
else if (verification.processAlive === true && metroPort !== null) phase("remedy", chalk.yellow(`The native app is still running. ${deliveryFailed ? "Check the Metro logs and device connection, then" : "Fix the JavaScript or TypeScript error, then"} run \`stim reload android\`. Do not run \`${runCommand}\` unless native inputs changed or the app process exits.`));
|
|
247
245
|
return { state: LAUNCH_FATAL };
|
|
248
246
|
}
|
|
249
247
|
if (verification?.verified) {
|
|
@@ -251,10 +249,7 @@ async function verifyAndroidMetroRun({ operation, root, slot, remoteDevice, veri
|
|
|
251
249
|
const report = launchErrorReport(verification.errors ?? [], root);
|
|
252
250
|
if (report.summary) phase("launch", chalk.dim(report.summary));
|
|
253
251
|
for (const line of report.lines) phase("launch", chalk.yellow(line));
|
|
254
|
-
if (report.lines.length > 0 && verification.processAlive === true && metroPort !== null) {
|
|
255
|
-
const reloadRemedy = physical ? `run \`agent-device metro reload --metro-port ${metroPort}\`.` : "run `stim reload android`.";
|
|
256
|
-
phase("remedy", chalk.yellow(`The native app is still running. Fix the JavaScript or TypeScript error; Fast Refresh should apply the edit. If the error screen remains, ${reloadRemedy} Do not run \`${runCommand}\` unless native inputs changed or the app process exits.`));
|
|
257
|
-
}
|
|
252
|
+
if (report.lines.length > 0 && verification.processAlive === true && metroPort !== null) phase("remedy", chalk.yellow(`The native app is still running. Fix the JavaScript or TypeScript error; Fast Refresh should apply the edit. If the error screen remains, run \`stim reload android\`. Do not run \`${runCommand}\` unless native inputs changed or the app process exits.`));
|
|
258
253
|
return {
|
|
259
254
|
state: true,
|
|
260
255
|
warning: report.lines.length > 0 ? "app errors detected; inspect the error above" : verification.readiness === "timed-out" || verification.readiness === "error" ? "app readiness not confirmed; inspect the UI and logs" : void 0
|
|
@@ -315,7 +310,7 @@ async function wipeAdoptedAvd(room, free) {
|
|
|
315
310
|
if (wiped.status !== "torn-down") throw new Error(`could not wipe it: ${wiped.reason ?? wiped.status}`);
|
|
316
311
|
const rebooted = await room.rebootDevice();
|
|
317
312
|
if (!rebooted.ok || !rebooted.serial) throw new Error(`it did not boot after its user data was wiped: ${rebooted.reason ?? "no serial"}`);
|
|
318
|
-
if ((await room.resolveAvdSerial(room.avdName)).serial !== rebooted.serial) throw new Error(`${rebooted.serial} is not running ${room.avdName} after the wipe`);
|
|
313
|
+
if ((await room.resolveAvdSerial(room.avdName, { preferredSerial: rebooted.serial })).serial !== rebooted.serial) throw new Error(`${rebooted.serial} is not running ${room.avdName} after the wipe`);
|
|
319
314
|
room.phase("device", `${room.avdName} (${rebooted.serial}) booted with wiped user data`);
|
|
320
315
|
return rebooted.serial;
|
|
321
316
|
}
|
|
@@ -353,13 +348,19 @@ async function installOnAdoptedAvd(room, serial, installApk) {
|
|
|
353
348
|
}
|
|
354
349
|
async function resolveInstallSerial({ root, slot, device, physical, remoteDevice, serial, resolveAvdSerial, waitForDeviceBoot, phase }) {
|
|
355
350
|
if (physical || remoteDevice || !device.owned || !device.avdName) return serial;
|
|
356
|
-
const resolved = await resolveAvdSerial(device.avdName, {
|
|
351
|
+
const resolved = await resolveAvdSerial(device.avdName, {
|
|
352
|
+
timeoutMs: 5e3,
|
|
353
|
+
preferredSerial: serial
|
|
354
|
+
});
|
|
357
355
|
if (!resolved.serial) throw new Error(`Could not verify a running owned AVD ${device.avdName} before installation.`);
|
|
358
356
|
if (resolved.serial !== serial) {
|
|
359
357
|
phase("device", `${device.avdName} changed serial (${serial} -> ${resolved.serial}); checking readiness before installation`);
|
|
360
358
|
const ready = await waitForDeviceBoot(resolved.serial, 6e4, { commandTimeoutMs: 5e3 });
|
|
361
359
|
if (!ready.ok) throw new Error(`Emulator ${resolved.serial} never reported boot completion. Diagnostic: ${JSON.stringify(ready.diagnostic)}`);
|
|
362
|
-
if ((await resolveAvdSerial(device.avdName, {
|
|
360
|
+
if ((await resolveAvdSerial(device.avdName, {
|
|
361
|
+
timeoutMs: 5e3,
|
|
362
|
+
preferredSerial: resolved.serial
|
|
363
|
+
})).serial !== resolved.serial) throw new Error(`Could not verify AVD ${device.avdName} still runs on ${resolved.serial} after checking readiness.`);
|
|
363
364
|
phase("device", `reopen agent-device on ${resolved.serial}`);
|
|
364
365
|
}
|
|
365
366
|
const consolePort = Number(resolved.serial.replace(/^emulator-/, ""));
|
|
@@ -499,7 +500,7 @@ async function finishAndroidRun({ operation, runtime, runtimePreparation, lease,
|
|
|
499
500
|
msg: installed.note
|
|
500
501
|
});
|
|
501
502
|
}
|
|
502
|
-
if (androidPackage) upsertProject(root, { androidPackage });
|
|
503
|
+
if (androidPackage) await withConfigLockAsync(() => upsertProject(root, { androidPackage }));
|
|
503
504
|
record.bundleId = androidPackage;
|
|
504
505
|
if (!androidPackage) return fail(LAUNCH_FAILED, "Could not determine this app's Android package name, so there is nothing to launch.", packageRemedy, { lastBuildStatus: true });
|
|
505
506
|
if (physical) raiseLeaseFor(0, false);
|
|
@@ -520,6 +521,15 @@ async function finishAndroidRun({ operation, runtime, runtimePreparation, lease,
|
|
|
520
521
|
physical,
|
|
521
522
|
msg: `launching ${androidPackage} on ${serial}`
|
|
522
523
|
});
|
|
524
|
+
await notePhoneReverse({
|
|
525
|
+
root,
|
|
526
|
+
slot,
|
|
527
|
+
serial,
|
|
528
|
+
metroPort,
|
|
529
|
+
physical,
|
|
530
|
+
remoteDevice,
|
|
531
|
+
runtimeKind: runtime.kind
|
|
532
|
+
}, out);
|
|
523
533
|
const launched = await runtime.launch(runtimePreparation, {
|
|
524
534
|
serial,
|
|
525
535
|
androidPackage,
|
|
@@ -548,7 +558,7 @@ async function finishAndroidRun({ operation, runtime, runtimePreparation, lease,
|
|
|
548
558
|
});
|
|
549
559
|
phase("launch", `${androidPackage}${restartedAppNote(launched.restartedPid)} ${launchTimer()}`);
|
|
550
560
|
if (!physical && !remoteDevice) try {
|
|
551
|
-
writeLaunch(root, "android", {
|
|
561
|
+
await writeLaunch(root, "android", {
|
|
552
562
|
appId: androidPackage,
|
|
553
563
|
deviceId: serial,
|
|
554
564
|
metroPort,
|
|
@@ -705,6 +715,15 @@ function localInstallRemedy({ reason, packageName, serial, useBuildCache }) {
|
|
|
705
715
|
function launchRemedy(remoteDevice, serial, packageName) {
|
|
706
716
|
return remoteDevice?.failureRemedy() ?? `Check the app installed correctly (\`adb -s ${serial} shell pm list packages ${packageName}\`).`;
|
|
707
717
|
}
|
|
718
|
+
async function notePhoneReverse(args, out) {
|
|
719
|
+
const { root, slot = "default", serial, metroPort } = args;
|
|
720
|
+
if (!args.physical || args.remoteDevice || args.runtimeKind !== "metro" || typeof metroPort !== "number") return;
|
|
721
|
+
try {
|
|
722
|
+
await recordPhoneReverse(root, slot, serial, metroPort);
|
|
723
|
+
} catch (error) {
|
|
724
|
+
out(phaseLine("state", chalk.yellow(`could not record the adb reverse on ${serial}: ${error instanceof Error ? error.message : error}`)));
|
|
725
|
+
}
|
|
726
|
+
}
|
|
708
727
|
function reportMetroRoute({ launched, remote, metroPort, androidPackage, serial, phase, writer }) {
|
|
709
728
|
if (remote) {
|
|
710
729
|
phase("metro", `public origin ${launched.jsLocation}`);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as process_identity_exports } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { G as projectDeviceSlots, _ as loadConfig$1 } from "./config-
|
|
4
|
-
import { n as pullHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-
|
|
5
|
-
import { l as phaseLine } from "./command-output-
|
|
6
|
-
import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-
|
|
7
|
-
import { l as connectHost } from "./hosted-client-
|
|
8
|
-
import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-
|
|
9
|
-
import "./hosted-macos-
|
|
10
|
-
import { i as captureWorkspaceCrashes } from "./error-diagnostics-
|
|
3
|
+
import { G as projectDeviceSlots, _ as loadConfig$1 } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { n as pullHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-CYIZ5ubJ.mjs";
|
|
5
|
+
import { l as phaseLine } from "./command-output-DxC0k2rk.mjs";
|
|
6
|
+
import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-Dq3ZcdD8.mjs";
|
|
7
|
+
import { l as connectHost } from "./hosted-client-BBTVe3X6.mjs";
|
|
8
|
+
import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-DlElquYD.mjs";
|
|
9
|
+
import "./hosted-macos-CXjsUNBR.mjs";
|
|
10
|
+
import { i as captureWorkspaceCrashes } from "./error-diagnostics-BkKCZq4P.mjs";
|
|
11
11
|
import { readdirSync, statSync, watch } from "node:fs";
|
|
12
12
|
import { homedir } from "node:os";
|
|
13
13
|
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
@@ -222,6 +222,7 @@ function followAgentActions(context, read, onRecord) {
|
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/device-host/hosted-logs-sync.ts
|
|
225
|
+
const WATCH_RECHECK_MS = 100;
|
|
225
226
|
function warn(context, machine, error) {
|
|
226
227
|
const text = `${warning(machine, error)}\n`;
|
|
227
228
|
if (context) context.output("stderr", text);
|
|
@@ -337,10 +338,12 @@ function followHostedLogs(root, failing, context) {
|
|
|
337
338
|
const stateFile = workspaceStateFile(root);
|
|
338
339
|
const home = resolve(configDir());
|
|
339
340
|
let watcher = null;
|
|
341
|
+
let recheck;
|
|
340
342
|
const observe = () => {
|
|
341
343
|
if (closed) return;
|
|
342
344
|
watcher?.close();
|
|
343
345
|
watcher = null;
|
|
346
|
+
clearTimeout(recheck);
|
|
344
347
|
let directory = dirname(stateFile);
|
|
345
348
|
for (;;) try {
|
|
346
349
|
const entry = relative(directory, stateFile).split(sep)[0];
|
|
@@ -355,6 +358,8 @@ function followHostedLogs(root, failing, context) {
|
|
|
355
358
|
});
|
|
356
359
|
next.unref();
|
|
357
360
|
watcher = next;
|
|
361
|
+
recheck = setTimeout(refresh, WATCH_RECHECK_MS);
|
|
362
|
+
recheck.unref();
|
|
358
363
|
return;
|
|
359
364
|
} catch (error) {
|
|
360
365
|
if (directory === home || !(error instanceof Error && "code" in error && error.code === "ENOENT")) return;
|
|
@@ -370,6 +375,7 @@ function followHostedLogs(root, failing, context) {
|
|
|
370
375
|
return () => {
|
|
371
376
|
closed = true;
|
|
372
377
|
watcher?.close();
|
|
378
|
+
clearTimeout(recheck);
|
|
373
379
|
clearInterval(timer);
|
|
374
380
|
for (const stop of stops.values()) stop();
|
|
375
381
|
};
|
|
@@ -456,6 +462,7 @@ async function followWorkspaceLogs(context, options, onRecord, onBackfill) {
|
|
|
456
462
|
const stopLog = followLogs({
|
|
457
463
|
dir: workspaceLogsDir$1(context.projectRoot),
|
|
458
464
|
offsets: view.sizes,
|
|
465
|
+
identities: view.identities,
|
|
459
466
|
criteria,
|
|
460
467
|
onRecord,
|
|
461
468
|
errorContext: options.errorsOnly ? "field" : void 0
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { W as parseDeviceSlotOption, _ as loadConfig$1, g as isPathPrefix } from "./config-
|
|
3
|
-
import { f as refuseNoProject, v as launchErrorPreview } from "./command-output-
|
|
4
|
-
import { r as readWorkspaceState$1 } from "./workspace-state-
|
|
5
|
-
import { n as findCommandWorkspace } from "./project-
|
|
2
|
+
import { W as parseDeviceSlotOption, _ as loadConfig$1, g as isPathPrefix } from "./config-BZhXY15H.mjs";
|
|
3
|
+
import { f as refuseNoProject, v as launchErrorPreview } from "./command-output-DxC0k2rk.mjs";
|
|
4
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
|
|
5
|
+
import { n as findCommandWorkspace } from "./project-Dz-hWkb-.mjs";
|
|
6
6
|
import { n as SOURCES$1, t as LEVELS$1 } from "./ndjson-CgE_o3Dl.mjs";
|
|
7
|
-
import { a as followAgentActions, i as followHostedLogs, n as openWorkspaceLogs } from "./logs-
|
|
8
|
-
import { t as errorDiagnostics } from "./error-diagnostics-
|
|
7
|
+
import { a as followAgentActions, i as followHostedLogs, n as openWorkspaceLogs } from "./logs-DXE32kyb.mjs";
|
|
8
|
+
import { t as errorDiagnostics } from "./error-diagnostics-BkKCZq4P.mjs";
|
|
9
9
|
import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
|
|
10
10
|
import { realpathSync } from "node:fs";
|
|
11
11
|
import { relative, sep } from "node:path";
|
|
@@ -166,6 +166,7 @@ function logsCommand(program) {
|
|
|
166
166
|
};
|
|
167
167
|
const { view, readAgent, hostedReachable } = await openWorkspaceLogs(context, query, Boolean(opts.follow));
|
|
168
168
|
const offsets = opts.follow ? view.sizes : null;
|
|
169
|
+
const identities = opts.follow ? view.identities : null;
|
|
169
170
|
let timeline = [];
|
|
170
171
|
let rawRecords;
|
|
171
172
|
try {
|
|
@@ -220,6 +221,7 @@ function logsCommand(program) {
|
|
|
220
221
|
const stop = followLogs({
|
|
221
222
|
dir,
|
|
222
223
|
offsets,
|
|
224
|
+
identities,
|
|
223
225
|
criteria,
|
|
224
226
|
onRecord: emit,
|
|
225
227
|
errorContext: opts.errors ? opts.json ? "field" : "msg" : void 0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as runMacos, r as waitForLaunchServices, t as macosCommand } from "./macos-
|
|
1
|
+
import { n as runMacos, r as waitForLaunchServices, t as macosCommand } from "./macos-CCfhb-jT.mjs";
|
|
2
2
|
export { macosCommand as default, runMacos, waitForLaunchServices };
|