stim 1.26.0 → 1.28.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-DVsvSwf7.mjs → acquire-artifact-CKByBnTD.mjs} +2 -2
- package/dist/{act-C-BqJEpu.mjs → act-8iswyfRa.mjs} +319 -126
- package/dist/{activity-Lnb_EoRY.mjs → activity-DRMg4_mD.mjs} +6 -6
- package/dist/{agent-device-usage-output-DbXy5tg8.mjs → agent-device-usage-output-tE90fDdo.mjs} +5 -5
- package/dist/{android-CiNQw3kq.mjs → android-CHmSU4B4.mjs} +101 -45
- package/dist/{android-DTAcRwBC.mjs → android-CsPs-7Mg.mjs} +23 -18
- package/dist/{android-B5P81yI-.mjs → android-D577ApKG.mjs} +37 -15
- package/dist/{android-CSbLRD53.mjs → android-YWCbmkVK.mjs} +5 -5
- package/dist/{android-cas-BTVhZ0Qs.mjs → android-cas-_aDifWW0.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api.d.mts +14 -4
- package/dist/api.mjs +39 -29
- package/dist/{apk-signed-tail-B46U9hXc.mjs → apk-signed-tail-CQbwM0qO.mjs} +2 -2
- package/dist/{artifact-CsAP6AGK.mjs → artifact-DYtHjxsn.mjs} +19 -24
- package/dist/{artifact-BxREhAaV.mjs → artifact-bFkfD3vf.mjs} +18 -23
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/auto-placement-BVqs8AJi.mjs +350 -0
- package/dist/{browser-web-rYPyqhTf.mjs → browser-web-BUaLcafY.mjs} +16 -16
- package/dist/{build-DPhApsjV.mjs → build-cQURy_KW.mjs} +35 -31
- package/dist/{build-cache-DrXNCy3T.mjs → build-cache-CZULpXVl.mjs} +43 -21
- package/dist/{build-plan-DrMMdayj.mjs → build-plan-CxoYfxsc.mjs} +7 -6
- package/dist/{cache-manifest-BEZ9Bpl1.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-k2mZGvvk.mjs → ccache-Bm_A1xX9.mjs} +562 -1604
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-BBKFGOFl.mjs → cli-CpbaLDa7.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-D9CaRks-.mjs → client-YxCer6ab.mjs} +84 -65
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BF5AR2dL.mjs → command-output-C8R1KIvi.mjs} +1 -1
- package/dist/{config-BktkY_zC.mjs → config-Cn94Jc0g.mjs} +23 -4
- package/dist/{dependencies-Dw6wfQdv.mjs → dependencies-DKeMzwXY.mjs} +108 -60
- package/dist/{dependency-state-DFB41vfr.mjs → dependency-state-CojA2o0t.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-DXR_tPVY.mjs → dev-client-D-BW5uiq.mjs} +2 -2
- package/dist/{device-BK-zwyd_.mjs → device-CgXfbcz5.mjs} +25 -24
- package/dist/{device-capacity-DCSvUF0l.mjs → device-capacity-Cd8lMSn3.mjs} +175 -22
- package/dist/{device-BcYeHSFu.mjs → device-eeK95Lir.mjs} +16 -16
- package/dist/device-host-worker.mjs +22 -20
- package/dist/{device-ios-BLGfXQeK.mjs → device-ios-Cc9ulihb.mjs} +251 -23
- package/dist/{device-lease-run-BmvIl7bI.mjs → device-lease-run-Mtzp4THX.mjs} +5 -5
- package/dist/{device-pool-Dluix4H3.mjs → device-pool-eRz6DtCg.mjs} +3 -3
- package/dist/{doctor-Bhg1ii70.mjs → doctor-Bz_ouYAW.mjs} +28 -16
- package/dist/{doctor-Cp-BhzTS.mjs → doctor-C2QyhejJ.mjs} +1 -1
- package/dist/{doctor-fingerprint-D3a04Mhu.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BStK05nt.mjs → doctor-watchman-BTW82PDC.mjs} +5 -5
- package/dist/{doctor-OnwP94ne.mjs → doctor-xf7ht-5n.mjs} +76 -32
- package/dist/{eas-build-Dsj93iM9.mjs → eas-build-Dm6q68QY.mjs} +4 -4
- package/dist/eas-fallback-DajNpxf-.mjs +87 -0
- package/dist/{eas-session-ledger-B5vygTiD.mjs → eas-session-ledger-CBFo_Uo1.mjs} +37 -8
- package/dist/{error-diagnostics-BOOm9Db7.mjs → error-diagnostics-D1QfyJzQ.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-ldgr-hXU.mjs → gc-DM5oMm-J.mjs} +161 -45
- package/dist/{gc-C_79zvz4.mjs → gc-PLFwb0k4.mjs} +2 -2
- package/dist/{guide-D7K0X6KG.mjs → guide-C4I46XAk.mjs} +674 -213
- package/dist/{hosted-android-Bk54ej6n.mjs → hosted-android-DlaKLbW0.mjs} +6 -7
- package/dist/{hosted-client-fHO8yqzc.mjs → hosted-client-DDRm9hPJ.mjs} +51 -20
- package/dist/{hosted-logs-BfbmDM4M.mjs → hosted-logs-bSebOKbz.mjs} +8 -8
- package/dist/{hosted-logs-sync-B0pvmOk-.mjs → hosted-logs-sync-B0c53W_c.mjs} +5 -5
- package/dist/{hosted-macos-CPl0OZ9h.mjs → hosted-macos-B7-8Pv4H.mjs} +6 -6
- package/dist/{hosted-native-CpDB3-PO.mjs → hosted-native-CDe33CSr.mjs} +22 -18
- package/dist/{idle-shutdown-FfxL1KdG.mjs → idle-shutdown-CQ0QwU9J.mjs} +7 -8
- package/dist/{ios-WxpDJ5T1.mjs → ios-B1DYuOjh.mjs} +27 -11
- package/dist/{ios-B7-lToDu.mjs → ios-B1HvafEG.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-device-CsyryvpT.mjs → ios-device-B4elVFKi.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-Ty5pHl9O.mjs → ios-project-CR4mZ7CH.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-Cw7-WQf2.mjs → ios-state-BPHqMDdZ.mjs} +1 -1
- package/dist/{ios-ftxdQbJS.mjs → ios-tg4tp3q1.mjs} +94 -37
- package/dist/{js-swap-BMhXYVDS.mjs → js-swap-CVpSW1fn.mjs} +8 -7
- package/dist/{launch-DOp8RjDz.mjs → launch-DoySmhjz.mjs} +42 -38
- package/dist/lightened-DFAJgfIk.mjs +171 -0
- package/dist/{logs-s1dRIG1E.mjs → logs-BGsW7iPe.mjs} +46 -21
- package/dist/{logs-dQDki6Tt.mjs → logs-DI5ILkYB.mjs} +7 -7
- package/dist/{macos-DBBPNnIA.mjs → macos-Bo9st9Di.mjs} +73 -38
- package/dist/{macos-B0VEV3Gf.mjs → macos-C12RMJQF.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-CjC10t6E.mjs → metro-BnhXV2Mj.mjs} +4 -4
- package/dist/{metro-gateway-B6_PgD0L.mjs → metro-request-DXyKjVDF.mjs} +26 -47
- package/dist/{named-ports-BG0j1X4g.mjs → named-ports-Phoi2POD.mjs} +3 -3
- package/dist/{native-android-CL2NGiik.mjs → native-android-vxgtLD7w.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-btSUulme.mjs → native-gradle-artifact-inputs-BN96IVw8.mjs} +5 -5
- package/dist/{native-runtime-Dq3RBcON.mjs → native-runtime-DG4Rodzj.mjs} +9 -8
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-BW7H8JGu.mjs → native-xcode-inputs-BKarCoKg.mjs} +3 -3
- package/dist/{native-xcode-ios-CBXJAxfC.mjs → native-xcode-ios-8A-efGa5.mjs} +17 -17
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.mjs +23 -24
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-BjYvMNX_.mjs → ownership-DJCq48IJ.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-lmj6kcPm.mjs → phone-reverses-BzTa8g1F.mjs} +18 -4
- package/dist/{placement-log-DIFPQAXp.mjs → placement-log-Cvhta5ib.mjs} +3 -3
- package/dist/{plan-placement-IiiSQhtz.mjs → plan-placement-WkZdccuN.mjs} +36 -10
- package/dist/{ports-C2_w1Z0Z.mjs → ports-UV4mJgyC.mjs} +3 -3
- package/dist/{prebuild-gmouvmJZ.mjs → prebuild-k8d_tqOq.mjs} +16 -17
- package/dist/{project-BUu6Is4k.mjs → project-Sui52ywT.mjs} +17 -17
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-Cgg99REN.mjs → react-native-android-DANlGGQf.mjs} +32 -26
- package/dist/{react-native-build-oNwqF5Wb.mjs → react-native-build-jUHnIfZ9.mjs} +9 -9
- package/dist/{react-native-doctor-BhA3KUte.mjs → react-native-doctor-DCWRjS7K.mjs} +6 -6
- package/dist/{react-native-ios-B-nf4rjN.mjs → react-native-ios-BwMsFMXi.mjs} +23 -17
- package/dist/{recordings-BldzVKq0.mjs → recordings-iy0mkm7b.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-C9OduiNc.mjs → reload-Bj7QyuDy.mjs} +1 -1
- package/dist/{reload-CCR7KC_l.mjs → reload-c_uEyc_X.mjs} +16 -16
- package/dist/{remote-C8S7FlPF.mjs → remote-DFlpAqdV.mjs} +23 -10
- package/dist/{result-7F5hEwQJ.mjs → result-BIcXREyC.mjs} +32 -21
- package/dist/{run-BqB0v3pt.mjs → run-y2HwyNvg.mjs} +3 -3
- package/dist/{selection-BNPBZ6T5.mjs → selection-CXgM_VK_.mjs} +37 -29
- package/dist/{server-bare-A75rDIdD.mjs → server-bare-2N4vSRZG.mjs} +2 -2
- package/dist/{server-command-CssKFOD7.mjs → server-command-qneHPcRI.mjs} +6 -6
- package/dist/{server-expo-eQfOdydb.mjs → server-expo-Ccm9zB0o.mjs} +4 -4
- package/dist/server-expo-WulkyAwT.mjs +2 -0
- package/dist/{settings-CosW5X-S.mjs → settings-CY5JZlNN.mjs} +375 -62
- package/dist/{settings-OaGQF-ri.mjs → settings-Cfd_Q6ys.mjs} +24 -3
- package/dist/settings-payload-DwQiEMCn.mjs +257 -0
- package/dist/settings-write-CJpjkeAd.mjs +185 -0
- package/dist/settings.schema.json +51 -33
- package/dist/{simslim-Bax1qcxu.mjs → simslim-DCQwzoPy.mjs} +2 -2
- package/dist/{slot-launch-CYCEhfBY.mjs → slot-launch-BpmanOnk.mjs} +6 -6
- package/dist/{stage-jKQ7CP_B.mjs → stage-CmugrSG5.mjs} +2 -2
- package/dist/{start-C_wefNKB.mjs → start-CHH3zgIU.mjs} +1 -1
- package/dist/{start-_BdJ32cZ.mjs → start-DYLk6GXn.mjs} +27 -22
- package/dist/{state-C1i2nMOP.mjs → state-B2QJbDwz.mjs} +4 -4
- package/dist/{state-C4OdpOTF.mjs → state-BXC1Lfxw.mjs} +2 -2
- package/dist/{stats-tEpEEH-u.mjs → stats-DxKqhcGp.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-CRXz-Gtj.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-DQrqodLj.mjs → status-BHCkOZga.mjs} +51 -28
- package/dist/{status-B9M7x4CZ.mjs → status-D_Ljc89p.mjs} +1 -1
- package/dist/{status-watch-B5wDIH_o.mjs → status-watch-BmsPqYSU.mjs} +18 -7
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-6Dqp-gjX.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-DRqQVqDJ.mjs → stop-D-dGE9gh.mjs} +21 -20
- package/dist/{stop-ySNQHXMG.mjs → stop-DQvE-P76.mjs} +10 -6
- package/dist/{stop-CmdNhGlC.mjs → stop-b2pouxAO.mjs} +2 -2
- package/dist/supervisor-run.mjs +237 -63
- package/dist/{support-BGSCBoib.mjs → support-04IhBUTT.mjs} +6 -6
- package/dist/{support-CVOCp0Ft.mjs → support-BtlJKjyQ.mjs} +12 -11
- package/dist/{swiftpm-artifact-inputs-CfUzt_0Z.mjs → swiftpm-artifact-inputs-Cj2UpmPN.mjs} +4 -4
- package/dist/{swiftpm-macos-x6HPpl_2.mjs → swiftpm-macos-BhF2stxY.mjs} +11 -12
- package/dist/{toolchain-J4J8MrAr.mjs → toolchain-mLA_km-b.mjs} +321 -15
- package/dist/{toolchain-DoavrvIA.mjs → toolchain-qktiV8xc.mjs} +1 -1
- package/dist/{trigger-KVaWWNyn.mjs → trigger-DMou-X7j.mjs} +2 -2
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-DvhTX_eu.mjs → warm-progress-B0Vpuvpl.mjs} +731 -727
- package/dist/{web-Bihbf7-u.mjs → web-BYmK0TjL.mjs} +9 -9
- package/dist/web-CrVLVQZY.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-pUg3_RRA.mjs → workspace-state-kIZrdlSg.mjs} +3 -3
- package/dist/{workspaces-g2lhdBXF.mjs → workspaces-CmOcceDN.mjs} +1879 -74
- package/dist/{worktree-BKuklFh_.mjs → worktree-2dk5edza.mjs} +933 -534
- package/dist/worktree-nliAoHxB.mjs +2 -0
- package/package.json +7 -7
- package/dist/ccache-Bx5TbxwG.mjs +0 -143
- package/dist/eas-fallback-FwkeqqGi.mjs +0 -381
- package/dist/hosted-ios-D55QhYaD.mjs +0 -15
- package/dist/native-run-BfIDFKLH.mjs +0 -275
- package/dist/server-expo-wvcj5tiZ.mjs +0 -2
- package/dist/settings-write-QjYfSrjF.mjs +0 -360
- package/dist/trigger-DzJu208Q.mjs +0 -2
- package/dist/web-BFLueSh-.mjs +0 -2
- package/dist/worktree-Bm4cb-nU.mjs +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as reportSignal, D as ownership_claim_exports, S as process_identity_exports, T as trackReportResource, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-
|
|
2
|
-
import { t as runOperationFile } from "./operation-exec-
|
|
1
|
+
import { C as reportSignal, D as ownership_claim_exports, S as process_identity_exports, T as trackReportResource, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { ambientEnv, configDir, ensurePrivateDir } from "@stim-cli/core";
|
|
5
|
-
import { allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, findEnclosingWorktreeRoot, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
|
|
5
|
+
import { allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
|
|
6
6
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
|
|
7
7
|
import { request } from "node:https";
|
|
8
8
|
import { WebSocket } from "ws";
|
|
@@ -548,6 +548,25 @@ async function diagnoseOutcome(io, input) {
|
|
|
548
548
|
pinged
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
|
+
/**
|
|
552
|
+
* The diagnosis `stim doctor` gives for a machine that resolved to a tailnet peer but did not connect, without
|
|
553
|
+
* doctor's `tailscale ping`: the connection has already waited out its timeout. Reads `tailscale status` only here,
|
|
554
|
+
* after the failure. Null when Tailscale no longer lists the machine.
|
|
555
|
+
*/
|
|
556
|
+
async function diagnoseConnectFailure(machine, failure, signal) {
|
|
557
|
+
const parsed = parseMachine(machine);
|
|
558
|
+
if (!parsed) return null;
|
|
559
|
+
const peer = findPeer(await tailscaleStatusAsync(signal), parsed.name);
|
|
560
|
+
if (typeof peer === "string") return null;
|
|
561
|
+
return diagnoseOutcome({ startup: peerStartup }, {
|
|
562
|
+
entry: machine,
|
|
563
|
+
peer,
|
|
564
|
+
port: parsed.port,
|
|
565
|
+
target: endpoint(peer, parsed.port),
|
|
566
|
+
reason: failure.failure,
|
|
567
|
+
...failure.transport ? { transport: failure.transport } : {}
|
|
568
|
+
});
|
|
569
|
+
}
|
|
551
570
|
/** Why `status` is null, as a diagnosis of the Tailscale layer; falls back to the daemon being unavailable. */
|
|
552
571
|
async function diagnoseTailscale(io) {
|
|
553
572
|
const reading = readTailscale(io.rawStatus ? await io.rawStatus() : null);
|
|
@@ -1258,4 +1277,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
|
|
|
1258
1277
|
return result;
|
|
1259
1278
|
}
|
|
1260
1279
|
//#endregion
|
|
1261
|
-
export {
|
|
1280
|
+
export { endpoint$1 as $, writeConfigSettingAsync as A, deviceSlotFileKey as B, saveConfig as C, withConfigLock$1 as D, upsertProject as E, isOnMountedVolume as F, projectDeviceSlots as G, deviceSlotPlatforms as H, listMountedVolumes as I, SERVER_OUTDATED as J, removeSlotDevice as K, measuredDirectorySizeAsync as L, directorySize as M, directorySizeAsync as N, withConfigLockAsync$1 as O, formatBytes as P, doctorIo as Q, volumeRootFor as R, removeProject as S, setSupervisor as T, parseDeviceSlotKey as U, deviceSlotKey as V, parseDeviceSlotOption as W, diagnoseOutcome as X, diagnoseConnectFailure as Y, diagnoseTailscale as Z, loadConfig$1 as _, clearDevice as a, realIo as at, releaseAndroidConsolePort as b, ensureConfig as c, setupRemedy as ct, getConfigDir as d, notOnTailnetDiagnosis as dt, findPeer$1 as et, getConfigPath$1 as f, readHostPermissions as ft, isPathPrefix$1 as g, getRepoSettings as h, clearAndroidBootPending as i, reachMachine as it, acquireAvdClaim as j, writeConfigSetting as k, findEnclosingWorktreeRoot as l, tailscaleStatusAsync as lt, getProjectSettings as m, allMetroPorts as n, outdatedServer as nt, clearSupervisor as o, resolveEndpoint as ot, getProject as p, validateDeviceSlot as q, claimMetroPort as r, parseMachine$1 as rt, configCorruptRepair as s, sayHello as st, allConsolePortsAndSerials as t, openAuthenticated as tt, getConcurrencyLimits as u, diagnosisFinding as ut, recordIosSchemeApprovals as v, setDevice as w, releaseMetroPort as x, refuseRelativeStimPaths as y, assignSlotDevice as z };
|
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import { o as cancellableSleep, t as getExecutor } from "./exec-
|
|
2
|
-
import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-
|
|
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-
|
|
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 { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-
|
|
7
|
-
import { o as workspaceLinks } from "./stim-desktop-
|
|
8
|
-
import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-
|
|
17
|
-
import { n as hostedMetroPortProbe } from "./hosted-native-
|
|
18
|
-
import {
|
|
19
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
20
|
-
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-
|
|
21
|
-
import {
|
|
1
|
+
import { o as cancellableSleep, t as getExecutor, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-kIZrdlSg.mjs";
|
|
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-Cn94Jc0g.mjs";
|
|
4
|
+
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-C8R1KIvi.mjs";
|
|
5
|
+
import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-CY5JZlNN.mjs";
|
|
6
|
+
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-Sui52ywT.mjs";
|
|
7
|
+
import { o as workspaceLinks } from "./stim-desktop-CbWo21kb.mjs";
|
|
8
|
+
import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-BnhXV2Mj.mjs";
|
|
9
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
10
|
+
import { An as checkEasAuth, At as ensureRemoteBootOwned, Bt as RELEASE_VERIFY_WAIT_MS, Cn as gateMetroOrigin, Dt as bundleEntryPoint, Gt as unattributedLaunchLines, Ht as isBundleProof, It as LAUNCH_BUNDLING, Jt as verifyLaunch, Kt as unverifiedLaunchLines, Ln as resolveEasCliBin, Lt as LAUNCH_FATAL, Nn as loadProjectProvider, Nt as remoteIosDeps, Pt as resolveRemoteContext, Rn as resolveRemote, Rt as LAUNCH_UNVERIFIED, Sn as readRemoteSimulatorArch, Ut as readCollectorRecords, Wt as readMetroRecords, Yt as verifyReleaseLaunch, an as devClientUrl, c as budgetGate, dn as installIosApp, en as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, fn as iosAppProcess, gn as restartedAppNote, hn as launchIosApp, in as clearOtherUserApps, kt as ensureMetroReachable, zn as uploadRemote } from "./ccache-Bm_A1xX9.mjs";
|
|
11
|
+
import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-CmOcceDN.mjs";
|
|
12
|
+
import { B as readBundleExecutable, H as resolveScheme, O as runPodInstall, T as readPodState, V as readBundleId, w as podsAreStale } from "./toolchain-mLA_km-b.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-DRMg4_mD.mjs";
|
|
14
|
+
import { A as untrackedNativeFiles, C as resolveBuild, c as evictBuild, m as fingerprintProject, w as storeBuild } from "./build-cache-CZULpXVl.mjs";
|
|
15
|
+
import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-B1DYuOjh.mjs";
|
|
16
|
+
import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-BPHqMDdZ.mjs";
|
|
17
|
+
import { n as hostedMetroPortProbe } from "./hosted-native-CDe33CSr.mjs";
|
|
18
|
+
import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-BzTa8g1F.mjs";
|
|
19
|
+
import { n as verifyCollectorOwnership } from "./ownership-DJCq48IJ.mjs";
|
|
20
|
+
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-BpmanOnk.mjs";
|
|
21
|
+
import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-jUHnIfZ9.mjs";
|
|
22
|
+
import { c as startDevServer, g as detectBundleId } from "./start-DYLk6GXn.mjs";
|
|
22
23
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
23
|
-
import { a as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { a as
|
|
29
|
-
import { a as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-
|
|
37
|
-
import { t as selectFromPool } from "./device-pool-
|
|
38
|
-
import {
|
|
39
|
-
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-
|
|
40
|
-
import { i as swapJsBundle } from "./js-swap-
|
|
24
|
+
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-Mtzp4THX.mjs";
|
|
25
|
+
import { r as checkDeviceCapacity } from "./device-capacity-Cd8lMSn3.mjs";
|
|
26
|
+
import { n as clearIosAdoptionPending } from "./device-ios-Cc9ulihb.mjs";
|
|
27
|
+
import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-BtlJKjyQ.mjs";
|
|
28
|
+
import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-BJzvDPfU.mjs";
|
|
29
|
+
import { a as resolveEasDevelopmentBuild } from "./eas-build-Dm6q68QY.mjs";
|
|
30
|
+
import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-D1QfyJzQ.mjs";
|
|
31
|
+
import { t as followHostedLaunchLogs } from "./hosted-logs-sync-B0c53W_c.mjs";
|
|
32
|
+
import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-k8d_tqOq.mjs";
|
|
33
|
+
import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-DG4Rodzj.mjs";
|
|
34
|
+
import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-D-BW5uiq.mjs";
|
|
35
|
+
import { t as automaticDevicePlacement } from "./auto-placement-BVqs8AJi.mjs";
|
|
36
|
+
import { t as checkEasFallback } from "./eas-fallback-DajNpxf-.mjs";
|
|
37
|
+
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-CgXfbcz5.mjs";
|
|
38
|
+
import { t as selectFromPool } from "./device-pool-eRz6DtCg.mjs";
|
|
39
|
+
import { s as reportIosResult } from "./ios-project-CR4mZ7CH.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-B4elVFKi.mjs";
|
|
41
|
+
import { i as swapJsBundle } from "./js-swap-CVpSW1fn.mjs";
|
|
41
42
|
import { mkdirSync, openSync, writeFileSync } from "node:fs";
|
|
42
43
|
import { networkInterfaces } from "node:os";
|
|
43
44
|
import { basename, join } from "node:path";
|
|
@@ -231,7 +232,8 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
231
232
|
return running.state === "unknown" ? null : running.state === "running";
|
|
232
233
|
};
|
|
233
234
|
const siblings = metroCheck ? await siblingPlatformSlots(root, "ios", slot) : [];
|
|
234
|
-
const verification = metroCheck ? await d.verifyLaunch({
|
|
235
|
+
const verification = metroCheck ? await withDrainingCancellation(operation, operation?.signal, () => d.verifyLaunch({
|
|
236
|
+
signal: operation?.signal,
|
|
235
237
|
requireBundleResponse: true,
|
|
236
238
|
slot: launchSlotScope(root, slot),
|
|
237
239
|
appPid: physical || remoteDevice ? null : launched?.pid,
|
|
@@ -251,7 +253,7 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
251
253
|
const running = await iosAppProcess(udid, bundleId);
|
|
252
254
|
return running.state === "unknown" ? null : running.state === "running";
|
|
253
255
|
}
|
|
254
|
-
}) : {
|
|
256
|
+
})) : {
|
|
255
257
|
verified: false,
|
|
256
258
|
skipped: true
|
|
257
259
|
};
|
|
@@ -395,6 +397,27 @@ async function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }
|
|
|
395
397
|
for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by the previous workspace`)));
|
|
396
398
|
return `Could not remove ${swept.failed.join(", ")}, left by the previous workspace.`;
|
|
397
399
|
}
|
|
400
|
+
async function evictUnbindableCacheHit({ d, root, slot, udid, bundleId, appPath, launchedAt, logsDir, cacheHit, providerName, storeKey, runCommand, local, logFields, operation }) {
|
|
401
|
+
if (!cacheHit || !storeKey || !bundleId || !local) return null;
|
|
402
|
+
const symbol = (await captureNativeCrashes({
|
|
403
|
+
root,
|
|
404
|
+
slot,
|
|
405
|
+
platform: "ios",
|
|
406
|
+
deviceId: udid,
|
|
407
|
+
appId: bundleId,
|
|
408
|
+
since: launchedAt,
|
|
409
|
+
appPath
|
|
410
|
+
}, logsDir, operation?.signal, operation?.env)).map(bundleBindFailure).find(Boolean);
|
|
411
|
+
if (!symbol || !await d.evictBuild("ios", storeKey)) return null;
|
|
412
|
+
const provider = cacheHit === "remote" || Boolean(providerName);
|
|
413
|
+
return {
|
|
414
|
+
code: "STIM_LAUNCH_FAILED",
|
|
415
|
+
message: `The cached app cannot start: dyld could not bind ${symbol} between two parts of the app itself.`,
|
|
416
|
+
remedy: `Stim removed the cache entry ${storeKey}${provider ? ", but the cache provider may still hold its copy" : ""}. Run \`${runCommand}\`${provider ? " with `--no-build-cache`" : ""} again to build the app fresh. If the fresh app crashes the same way, the project's own native code is the cause.`,
|
|
417
|
+
logPath: logsDir,
|
|
418
|
+
build: logFields
|
|
419
|
+
};
|
|
420
|
+
}
|
|
398
421
|
function installMayBeProven(adopting, parkedCacheKey, storeKey) {
|
|
399
422
|
return !adopting || !parkedCacheKey || parkedCacheKey === storeKey;
|
|
400
423
|
}
|
|
@@ -425,8 +448,9 @@ async function recordIosReloadTarget({ d, root, physical, remoteDevice, bundleId
|
|
|
425
448
|
function installFailureRemedy(remoteDevice) {
|
|
426
449
|
return remoteDevice?.failureRemedy() ?? "Check that the simulator is booted and that the app was built for the simulator SDK.";
|
|
427
450
|
}
|
|
428
|
-
function launchFailureRemedy(remoteDevice, udid, bundleId, logFile) {
|
|
451
|
+
function launchFailureRemedy(remoteDevice, udid, bundleId, logFile, reason) {
|
|
429
452
|
if (remoteDevice) return remoteDevice.failureRemedy();
|
|
453
|
+
if (reason && /system shell .*probably crashed/.test(reason)) return `SpringBoard, the simulator's system shell, is not running, and only a reboot brings it back. Run \`stim stop\`, then \`stim ios\` again. Repeated crashes leave SpringBoard reports in ~/Library/Logs/DiagnosticReports.`;
|
|
430
454
|
return `If the simulator timed out, run \`stim doctor --platform ios\` and resolve any reported host memory pressure before retrying. Otherwise run \`xcrun simctl launch --terminate-running-process --console ${udid} ${bundleId}\` to see what the app reports, and check ${logFile}.`;
|
|
431
455
|
}
|
|
432
456
|
async function finishIosRun({ operation, output, projectBundleId, runtime, runtimePreparation, devicePlacement, artifact, d, root, slot, json, release, configuration, buildScheme, isExpo, metroCheck, metroPort, logsDir, logFile, device, udid, physical, wireless, lanAddress, lanOriginUrl, remoteDevice, bootPromise, bootDuration, bootPending, fail, phase, note, logWriter, elapsed, startedAt, closeWriter, lease, releaseLease, recordRun, reclaimed, devServer, enterPhase, enterActivity }) {
|
|
@@ -488,6 +512,27 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
488
512
|
let installSkipped = false;
|
|
489
513
|
let launched;
|
|
490
514
|
let launchedAt = d.now();
|
|
515
|
+
const evictUnbound = () => evictUnbindableCacheHit({
|
|
516
|
+
d,
|
|
517
|
+
root,
|
|
518
|
+
slot,
|
|
519
|
+
udid,
|
|
520
|
+
bundleId,
|
|
521
|
+
appPath,
|
|
522
|
+
launchedAt,
|
|
523
|
+
logsDir,
|
|
524
|
+
cacheHit,
|
|
525
|
+
providerName,
|
|
526
|
+
storeKey,
|
|
527
|
+
runCommand,
|
|
528
|
+
local: !physical && !remoteDevice,
|
|
529
|
+
logFields: {
|
|
530
|
+
...buildFailure,
|
|
531
|
+
appPath,
|
|
532
|
+
bundleId
|
|
533
|
+
},
|
|
534
|
+
operation
|
|
535
|
+
});
|
|
491
536
|
if (physical) {
|
|
492
537
|
const overWifi = await installsOverWifi(d, udid, wireless, note);
|
|
493
538
|
const bounds = iosDeviceBounds(overWifi);
|
|
@@ -715,10 +760,12 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
715
760
|
since: launchedAt,
|
|
716
761
|
appPath
|
|
717
762
|
}, logsDir, (line) => note(chalk.red(phaseLine("launch", line))), Boolean(remoteDevice), operation?.signal, operation?.env);
|
|
763
|
+
const evicted = await evictUnbound();
|
|
764
|
+
if (evicted) return fail(evicted);
|
|
718
765
|
return fail({
|
|
719
766
|
code: launched.code || "STIM_LAUNCH_FAILED",
|
|
720
767
|
message: launched.reason,
|
|
721
|
-
remedy: launchFailureRemedy(remoteDevice, udid, bundleId, logFile),
|
|
768
|
+
remedy: launchFailureRemedy(remoteDevice, udid, bundleId, logFile, launched.reason),
|
|
722
769
|
build: {
|
|
723
770
|
...buildFailure,
|
|
724
771
|
appPath,
|
|
@@ -781,25 +828,25 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
781
828
|
metroOrigin: typeof launched?.jsLocation === "string" ? launched.jsLocation : null,
|
|
782
829
|
enterActivity
|
|
783
830
|
});
|
|
784
|
-
if (launchState === "fatal")
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
} : launchOutcomeRecord({
|
|
831
|
+
if (launchState === "fatal") {
|
|
832
|
+
const evicted = await evictUnbound();
|
|
833
|
+
if (evicted) return fail(evicted);
|
|
834
|
+
return fail({
|
|
835
|
+
code: "STIM_LAUNCH_FAILED",
|
|
836
|
+
message: "The app failed its launch readiness check.",
|
|
837
|
+
remedy: `Read the launch error above or run \`stim logs --errors\`. The full timeline is in ${logsDir}.`,
|
|
838
|
+
logPath: logsDir,
|
|
839
|
+
build: {
|
|
840
|
+
...buildFailure,
|
|
841
|
+
appPath,
|
|
842
|
+
bundleId
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
logWriter().write(launchOutcomeRecord({
|
|
801
847
|
launchState,
|
|
802
848
|
release: runtime.kind === "embedded-js",
|
|
849
|
+
process: runtime.kind === "process",
|
|
803
850
|
bundleId,
|
|
804
851
|
configuration,
|
|
805
852
|
metroPort,
|
|
@@ -1017,6 +1064,7 @@ const DEFAULT_DEPS = {
|
|
|
1017
1064
|
fingerprintProject,
|
|
1018
1065
|
memoizedFingerprint,
|
|
1019
1066
|
untrackedNativeFiles,
|
|
1067
|
+
evictBuild,
|
|
1020
1068
|
resolveBuild,
|
|
1021
1069
|
storeBuild,
|
|
1022
1070
|
resolveCacheProviderConfig,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { Bt as repoRoot } from "./settings-CY5JZlNN.mjs";
|
|
3
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
4
|
import { existsSync } from "node:fs";
|
|
4
5
|
import { dirname, join, relative } from "node:path";
|
|
5
6
|
//#region src/dependency-state.ts
|
|
6
|
-
function
|
|
7
|
+
function installedNpmTreeProblems(projectRoot) {
|
|
7
8
|
try {
|
|
8
9
|
getExecutor().runFile("npm", [
|
|
9
10
|
"ls",
|
|
@@ -14,9 +15,15 @@ function installedNpmTreeIsValid(projectRoot) {
|
|
|
14
15
|
cwd: projectRoot,
|
|
15
16
|
timeoutMs: 3e4
|
|
16
17
|
});
|
|
17
|
-
return
|
|
18
|
-
} catch {
|
|
19
|
-
|
|
18
|
+
return "";
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const stdout = error instanceof Error && "stdout" in error ? error.stdout : "";
|
|
21
|
+
let problems;
|
|
22
|
+
try {
|
|
23
|
+
problems = JSON.parse(String(stdout ?? ""))?.problems;
|
|
24
|
+
} catch {}
|
|
25
|
+
if (!Array.isArray(problems)) return randomUUID();
|
|
26
|
+
return createHash("sha256").update(problems.map(String).toSorted().join("\n")).digest("hex");
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
async function installedNpmTreeIsValidAsync(projectRoot) {
|
|
@@ -88,4 +95,4 @@ function hasInstalledDependencies(projectRoot, markers = [
|
|
|
88
95
|
return markers.some((entry) => existsSync(join(projectRoot, entry)));
|
|
89
96
|
}
|
|
90
97
|
//#endregion
|
|
91
|
-
export {
|
|
98
|
+
export { installedNpmTreeProblems as i, hasInstalledDependencies as n, installedNpmTreeIsValidAsync as r, dependencyState as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as resolvePackageJson, b as isPackageResolvable } from "./project-
|
|
2
|
-
import {
|
|
1
|
+
import { C as resolvePackageJson, b as isPackageResolvable } from "./project-Sui52ywT.mjs";
|
|
2
|
+
import { bn as readBundleSchemes, yn as pickDevClientScheme } from "./ccache-Bm_A1xX9.mjs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/commands/dev-client.ts
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, t as getExecutor } from "./exec-
|
|
2
|
-
import { D as withConfigLock$1, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as acquireAvdClaim, t as allConsolePortsAndSerials, w as setDevice } from "./config-
|
|
3
|
-
import { l as phaseLine } from "./command-output-
|
|
4
|
-
import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-
|
|
5
|
-
import { s as ownedDeviceLabel } from "./project-
|
|
6
|
-
import {
|
|
7
|
-
import { c as pidExists } from "./metro-
|
|
8
|
-
import {
|
|
9
|
-
import { h as tailLines } from "./activity-
|
|
10
|
-
import { B as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-
|
|
14
|
-
import { t as reconcileSimSlim } from "./simslim-
|
|
1
|
+
import { D as ownership_claim_exports, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { D as withConfigLock$1, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as acquireAvdClaim, t as allConsolePortsAndSerials, w as setDevice } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { l as phaseLine } from "./command-output-C8R1KIvi.mjs";
|
|
4
|
+
import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-CY5JZlNN.mjs";
|
|
5
|
+
import { s as ownedDeviceLabel } from "./project-Sui52ywT.mjs";
|
|
6
|
+
import { B as ownedAvdDeviceProfile, F as listAvdsAsync, H as ownedAvdMatchesConfiguration, I as listInstalledSystemImages, K as ownedAvdSystemImage, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, _ as avdPoolConfiguration, b as configureNewOwnedAvd, ct as waitForBoot, gt as isLegacyDeletionClaim, j as listAdbDevicesAsync, n as OWNED_AVD_CONFIG_DEFAULTS, nt as resolveOwnedAvdSerialAsync, p as assertOwnedAvdStoppedAsync, pt as adoptParked, t as DEFAULT_AVD_DEVICE_PROFILE, vt as parkedMaxSetting, x as createOwnedAvd, y as bootAndroidEmulator, yt as readParked, z as nextConsolePort } from "./android-CsPs-7Mg.mjs";
|
|
7
|
+
import { c as pidExists } from "./metro-BnhXV2Mj.mjs";
|
|
8
|
+
import { gt as teardownParkedAvd, pt as teardownOwnedAvd } from "./workspaces-CmOcceDN.mjs";
|
|
9
|
+
import { h as tailLines } from "./activity-DRMg4_mD.mjs";
|
|
10
|
+
import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-B1DYuOjh.mjs";
|
|
11
|
+
import { g as withDeviceBootAdmission, n as DeviceAdmissionRefusal, o as countLiveOwnedDevicesFrom } from "./device-capacity-Cd8lMSn3.mjs";
|
|
12
|
+
import { t as clearDeviceIdleShutdown } from "./idle-shutdown-CQ0QwU9J.mjs";
|
|
13
|
+
import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-Cc9ulihb.mjs";
|
|
14
|
+
import { t as reconcileSimSlim } from "./simslim-DCQwzoPy.mjs";
|
|
15
15
|
import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
|
|
16
16
|
import { randomUUID } from "node:crypto";
|
|
17
17
|
import { existsSync } from "node:fs";
|
|
@@ -202,7 +202,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
|
|
|
202
202
|
await withConfigLockAsync$1(assertReservation);
|
|
203
203
|
const resolved = await resolveOwnedAvdSerialAsync(avdName);
|
|
204
204
|
if (resolved.missing || resolved.notOwned) throw new Error(`AVD ${avdName} could not be verified for recovery. Retry after checking its registration.`, { cause: error });
|
|
205
|
-
if (!resolved.serial)
|
|
205
|
+
if (!resolved.serial) await assertOwnedAvdStoppedAsync(avdName);
|
|
206
206
|
prepared = {
|
|
207
207
|
avdName,
|
|
208
208
|
created: false,
|
|
@@ -377,7 +377,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
|
|
|
377
377
|
}
|
|
378
378
|
if (resolved.notOwned || resolved.serial) continue;
|
|
379
379
|
try {
|
|
380
|
-
|
|
380
|
+
await assertOwnedAvdStoppedAsync(parked.name);
|
|
381
381
|
} catch (error) {
|
|
382
382
|
out(phaseLine("device", `kept parked ${parked.name}: ${String(error?.message || error)}`));
|
|
383
383
|
continue;
|
|
@@ -485,8 +485,8 @@ function claimAndroidConsolePort({ projectPath, slot, avdName, deviceName, liveP
|
|
|
485
485
|
return claim;
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
|
-
function liveAndroidConsolePorts() {
|
|
489
|
-
const adbLive =
|
|
488
|
+
async function liveAndroidConsolePorts() {
|
|
489
|
+
const adbLive = await listAdbDevicesAsync();
|
|
490
490
|
return [...adbLive.emulators.map((e) => e.consolePort), ...adbLive.unhealthy.map((u) => u.consolePort).filter((p) => p != null)];
|
|
491
491
|
}
|
|
492
492
|
async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, projectPath, slot, deviceName, out, logFile = null, alive = pidExists }) {
|
|
@@ -494,7 +494,7 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
|
|
|
494
494
|
platform: "android",
|
|
495
495
|
key: avdName
|
|
496
496
|
}, async () => {
|
|
497
|
-
const livePorts = liveAndroidConsolePorts();
|
|
497
|
+
const livePorts = await liveAndroidConsolePorts();
|
|
498
498
|
const claim = await withConfigLockAsync$1(() => claimAndroidConsolePort({
|
|
499
499
|
projectPath,
|
|
500
500
|
slot,
|
|
@@ -599,10 +599,10 @@ function reportAndroidMemoryPressure(out) {
|
|
|
599
599
|
async function androidBootRemedy(pressure) {
|
|
600
600
|
let count = null;
|
|
601
601
|
try {
|
|
602
|
-
const live =
|
|
603
|
-
sims: () => process.platform === "darwin" ?
|
|
604
|
-
adb: () => ({
|
|
605
|
-
...
|
|
602
|
+
const live = await countLiveOwnedDevicesFrom({
|
|
603
|
+
sims: () => process.platform === "darwin" ? listAllIosSimsAsync({ timeoutMs: 2e3 }) : [],
|
|
604
|
+
adb: async () => ({
|
|
605
|
+
...await listAdbDevicesAsync({ timeoutMs: 2e3 }),
|
|
606
606
|
unhealthy: []
|
|
607
607
|
}),
|
|
608
608
|
booting: []
|
|
@@ -685,7 +685,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
|
|
|
685
685
|
out
|
|
686
686
|
}));
|
|
687
687
|
const boot = async () => {
|
|
688
|
-
const livePorts = liveAndroidConsolePorts();
|
|
688
|
+
const livePorts = await liveAndroidConsolePorts();
|
|
689
689
|
const claim = await withConfigLockAsync$1(() => claimAndroidConsolePort({
|
|
690
690
|
projectPath,
|
|
691
691
|
slot,
|
|
@@ -785,6 +785,7 @@ async function ensureBooted({ platform, device, simulatorApp, timeoutMs, pollMs
|
|
|
785
785
|
if (platform === "ios") return ensureIosBooted({
|
|
786
786
|
device,
|
|
787
787
|
projectPath,
|
|
788
|
+
slot,
|
|
788
789
|
deviceSlotWait,
|
|
789
790
|
simulatorApp,
|
|
790
791
|
timeoutMs: timeoutMs ?? 6e5,
|