stim 1.17.2 → 1.19.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 +50 -1
- package/dist/{activity-IRvJY_ru.mjs → activity-BSw0x84R.mjs} +4 -4
- package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-Bjxu_VmX.mjs} +8 -8
- package/dist/{android-B9yaNKwa.mjs → android-BXc6BmEi.mjs} +658 -404
- package/dist/{android-B_YNZy61.mjs → android-BdQC6zs1.mjs} +9 -9
- package/dist/android-BvV1gGdN.mjs +4 -0
- package/dist/{android-DE4v59Mb.mjs → android-DE5g_5gv.mjs} +2 -2
- package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-C87geAg-.mjs} +5 -5
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/api-DIf_s86s.mjs +150 -0
- package/dist/api-run.d.mts +1 -0
- package/dist/api-run.mjs +145 -0
- package/dist/api.d.mts +218 -0
- package/dist/api.mjs +2 -0
- package/dist/{app-install-VPkI5WEg.mjs → app-install-CFI4ptUL.mjs} +33 -13
- package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
- package/dist/{web-Dl0KSRHf.mjs → browser-web-CDhqQxhv.mjs} +138 -176
- package/dist/{budget-DfcgFdQB.mjs → budget-Dz-kyXLv.mjs} +1391 -58
- package/dist/build-facts-B87vo-Im.d.mts +142 -0
- package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-DiwKSyv9.mjs} +3 -3
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{chrome-BrcVWQyD.mjs → chrome-BTUOo8p2.mjs} +1 -1
- package/dist/cli-C9Zvgbdc.mjs +68 -0
- package/dist/cli.mjs +1 -1
- package/dist/{client-SvBdgObD.mjs → client-CuUo8Nvg.mjs} +381 -49
- package/dist/collector-run.d.mts +6 -0
- package/dist/collector-run.mjs +9 -9
- package/dist/{command-output-CDAIFD-8.mjs → command-output-Bt8ygHE7.mjs} +2 -2
- package/dist/{config-D0DbpZtM.mjs → config-DC5jEtd1.mjs} +9 -5
- package/dist/{created-devices-CpvzBL25.mjs → created-devices-D0s26Hx5.mjs} +2 -2
- package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-DKaS1OM9.mjs} +2 -2
- package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-pB_IPfV4.mjs} +1 -1
- package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CDY_zAmD.mjs} +2 -2
- package/dist/{device-C8IOoJPv.mjs → device-BHw0WlHl.mjs} +8 -8
- package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-BoN1jQkO.mjs} +25 -14
- package/dist/device-host-worker.mjs +19 -19
- package/dist/{gradle-dJpre3Yn.mjs → device-ios-B2ruohE-.mjs} +661 -107
- package/dist/{device-lease-DpoS36_u.mjs → device-lease-Cu7PtQpZ.mjs} +9 -9
- package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-D38SnZtt.mjs} +4 -4
- package/dist/{device-pool-3o7s5lo4.mjs → device-pool-CP4rAsHx.mjs} +3 -3
- package/dist/{device-remote-hFSkpfQu.mjs → device-remote-B5GiUifk.mjs} +15 -16
- package/dist/{doctor-CFv1fCrF.mjs → doctor-PRJH94v6.mjs} +61 -34
- package/dist/doctor-watchman-wZhyTdp4.mjs +259 -0
- package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics--v5HGOU0.mjs} +11 -11
- package/dist/{exec-CaErVv7t.mjs → exec-i8GDPwq9.mjs} +93 -6
- package/dist/{gc-DEmkg3Xh.mjs → gc-CyHMcKcn.mjs} +25 -471
- package/dist/{guide-CSmhMTf8.mjs → guide-dRaQJJk9.mjs} +681 -507
- package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bs7fytj7.mjs} +3 -3
- package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C5G4h_OJ.mjs} +2 -2
- package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-Bik035eL.mjs} +1 -1
- package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-CI9Az9a4.mjs} +9 -9
- package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-DABm3ScO.mjs} +5 -5
- package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DbV2aUVw.mjs} +13 -9
- package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-DYiMBn34.mjs} +7 -8
- package/dist/{ios-DSfnPfse.mjs → ios-BWbHFZVz.mjs} +19 -7
- package/dist/{ios-Cr1h5gnO.mjs → ios-DCrkgXEM.mjs} +1 -1
- package/dist/ios-DYUr9LGc.mjs +8 -0
- package/dist/ios-ITYno9rO.mjs +2241 -0
- package/dist/{ios-device-pAN4t54-.mjs → ios-device-CJ_ZOGky.mjs} +3 -3
- package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-CrW8aMb5.mjs} +1 -1
- package/dist/{ios-state-8L3lgum6.mjs → ios-state-By0XuLTQ.mjs} +1 -1
- package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-DCveSE6d.mjs} +5 -5
- package/dist/{logs-BAaS7gS2.mjs → logs-Bao1HOMy.mjs} +13 -13
- package/dist/{macos-BIRQS90f.mjs → macos-ciyBdTY5.mjs} +194 -132
- package/dist/macos-nIOATJmR.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +349 -47
- package/dist/manifest-CX0d1IkZ.mjs +148 -0
- package/dist/{metro-g8NqiJp-.mjs → metro-DI2AjPF_.mjs} +196 -43
- package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-BxpJLIwh.mjs} +4 -4
- package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
- package/dist/{build-plan-BDsSi09V.mjs → miss-reason-CjQCOKqq.mjs} +207 -249
- package/dist/{named-ports-C8m8EQs2.mjs → named-ports-B4iWH4E-.mjs} +70 -8
- package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-BGxsbfny.mjs} +6 -6
- package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
- package/dist/offload-worker.d.mts +3 -45
- package/dist/offload-worker.mjs +11 -11
- package/dist/{ownership-DyRQru0q.mjs → ownership-EB0ySdGK.mjs} +3 -3
- package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
- package/dist/placement-log-Dxe34rJm.mjs +88 -0
- package/dist/plan-placement-BVY59qa8.mjs +290 -0
- package/dist/{ports-4nYqxPWC.mjs → ports-ByPc0_97.mjs} +3 -3
- package/dist/{prebuild-D7RUMkwN.mjs → prebuild-BKJ3wJI1.mjs} +5 -5
- package/dist/preview-BbSottmO.mjs +986 -0
- package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
- package/dist/project-B5eQ1USs.mjs +612 -0
- package/dist/{pull-request-pxnDCQzn.mjs → pull-request-IHNdMnG8.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/react-native-ios-BMh2i25I.mjs +2 -0
- package/dist/react-native-ios-CSpIxexZ.mjs +2083 -0
- package/dist/{recordings-BNgsD1Tr.mjs → recordings-Bv8McZN4.mjs} +1 -1
- package/dist/{reload-DcRxj3qG.mjs → reload-rAPdqeRR.mjs} +14 -15
- package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-N3hAEaAL.mjs} +5 -5
- package/dist/{run-CkE9y0nc.mjs → run-lAkle1-c.mjs} +5 -5
- package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-CkIjnegq.mjs} +5 -6
- package/dist/server-expo-DGsdUGX2.mjs +2 -0
- package/dist/{server-expo-CHTyXD0G.mjs → server-expo-n3tUi3Em.mjs} +5 -6
- package/dist/{settings-SR9OmW9h.mjs → settings-2am7TSxp.mjs} +5 -5
- package/dist/{settings-Cfd-0r2d.mjs → settings-CxgngUZk.mjs} +116 -103
- package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
- package/dist/settings.schema.json +198 -9
- package/dist/{simslim-BWNrc3M3.mjs → simslim-D9LkJxIO.mjs} +7 -7
- package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-HV_KtPIw.mjs} +6 -6
- package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
- package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
- package/dist/{stage-CzaiwFsI.mjs → stage-BgaZJVZY.mjs} +14 -3
- package/dist/{start-AlfCPRVU.mjs → start-D8NbxNBb.mjs} +1 -1
- package/dist/{start-DUz3mYdb.mjs → start-DtxthMfI.mjs} +34 -27
- package/dist/{state-PeQiJuIu.mjs → state-D2KtnALG.mjs} +4 -4
- package/dist/{state-DyaNTgfR.mjs → state-Tp4uImDS.mjs} +5 -3
- package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
- package/dist/{stats-Bq4fJOdB.mjs → stats-8EJ5ivFT.mjs} +6 -6
- package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
- package/dist/{status-BA2pehwf.mjs → status-BOyp0CUl.mjs} +31 -34
- package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-C65jk_q2.mjs} +1 -1
- package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-DbmUjsLv.mjs} +1 -1
- package/dist/stop-D0UIpZuh.mjs +72 -0
- package/dist/{stop-zF1y04f2.mjs → stop-DRipAg-e.mjs} +2 -2
- package/dist/{stop-DQIasgKp.mjs → stop-zDlknFoz.mjs} +79 -33
- package/dist/supervisor-run.d.mts +24 -22
- package/dist/supervisor-run.mjs +21 -22
- package/dist/{support-CsJNVfOc.mjs → support-CNqYkV0y.mjs} +7 -7
- package/dist/{support-WvD__tSV.mjs → support-DsNaFg6D.mjs} +5 -5
- package/dist/swiftpm-macos-aJzPAj1t.mjs +119 -0
- package/dist/{toolchain-DNyR3NPq.mjs → toolchain-C3xSoyUl.mjs} +475 -269
- package/dist/{trigger-Bemu8ytw.mjs → trigger-CAhmG-4s.mjs} +6 -6
- package/dist/trigger-CoalsMTV.mjs +2 -0
- package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-pFLB2e6P.mjs} +135 -38
- package/dist/{status-CzS4bPO9.mjs → watchman-BL1IdOtq.mjs} +75 -7
- package/dist/web-DFpFeZu5.mjs +2 -0
- package/dist/web-DbbrPUn0.mjs +127 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-CR9X86xJ.mjs} +3 -3
- package/dist/{ownership-BMLqyBgJ.mjs → workspaces-Djb2gfi9.mjs} +661 -23
- package/dist/{worktree-Be_7NLKy.mjs → worktree-BL4M1rhB.mjs} +252 -50
- package/dist/{worktree-j3IcFAI5.mjs → worktree-DV-A0LNL.mjs} +1 -1
- package/package.json +10 -5
- package/shim/bundle-response.cjs +2 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +1 -1
- package/dist/build-progress-D0WkjCPd.mjs +0 -1036
- package/dist/build-slots-41v_d2x9.mjs +0 -142
- package/dist/cli-CYXb29oE.mjs +0 -51
- package/dist/deps-iKw0eD4P.mjs +0 -438
- package/dist/device-ios-C2Um-XUR.mjs +0 -412
- package/dist/errors-B6W7FkxQ.mjs +0 -15
- package/dist/guide-status-Du-ZQ3FD.mjs +0 -125
- package/dist/idle-BXG__1BA.mjs +0 -176
- package/dist/in-use-CvGOUn-x.mjs +0 -130
- package/dist/ios-BJ4XUSe1.mjs +0 -3867
- package/dist/native-run-D1Q56rAD.mjs +0 -158
- package/dist/preview-B-g9d7kV.mjs +0 -318
- package/dist/process-identity-BmRm1qV0.mjs +0 -12
- package/dist/project-D47Rh0ly.mjs +0 -276
- package/dist/server-expo-CeakhI8P.mjs +0 -2
- package/dist/state-BKa8wNN5.mjs +0 -148
- package/dist/stop-BIiM49EY.mjs +0 -48
- package/dist/stop-cause-rhmGfwvt.mjs +0 -97
- package/dist/trigger-CXts6qt1.mjs +0 -2
- package/dist/watchman-APYjXSQa.mjs +0 -48
- package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
- package/dist/workspaces-Bcib97-6.mjs +0 -306
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { F as ownedAvdDeviceProfile, O as listAdbDevices, d as androidToolPath, ft as parkedMaxSetting, ot as POOL_SETTING_REMEDY, pt as readParked, z as ownedAvdSerialResolver } from "./android-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import "./
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { n as maintenanceLines, r as maintenanceStatus } from "./status-
|
|
27
|
-
import { i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures, s as mergeState } from "./warm-progress-DF4JRvYI.mjs";
|
|
28
|
-
import { r as workspaceRecordingEnabled } from "./recordings-BNgsD1Tr.mjs";
|
|
1
|
+
import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
3
|
+
import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-Bt8ygHE7.mjs";
|
|
4
|
+
import { B as parseDeviceSlotKey, F as volumeRootFor, H as projectDeviceSlots, R as deviceSlotKey, _ as loadConfig$1, d as getConfigDir, j as formatBytes } from "./config-DC5jEtd1.mjs";
|
|
5
|
+
import { b as workspaceLogErrorIndex, r as readWorkspaceState$1, x as workspaceLogsDir$1 } from "./workspace-state-CR9X86xJ.mjs";
|
|
6
|
+
import { A as readWorkspaceLaunches, E as readMetroTunnel, O as readRemoteSession, _ as readAppJson, c as projectShortcut, i as findServerWorkspace, l as detectPlatforms, m as detectTutorial, p as detectIsExpo } from "./project-B5eQ1USs.mjs";
|
|
7
|
+
import { I as resolveSettings, ct as linkedWorktreesOnDisk, mt as repoRoot, nt as gitCommonDir, rt as gitCommonDirOnDisk } from "./settings-CxgngUZk.mjs";
|
|
8
|
+
import { a as listeningPidsByPort, c as processCwd, i as listeningPids, l as processCwds, p as isMetroRunning, s as pidExists, u as resolveProjectMetro } from "./metro-DI2AjPF_.mjs";
|
|
9
|
+
import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-D2KtnALG.mjs";
|
|
10
|
+
import { C as statusActivity, E as withWebFacts, S as remoteDeviceState, T as unprovisionedWorktrees, _ as gitSummaryText, b as poolLine, c as activityLabel, d as capacity, f as deviceLeaseLines, h as environmentState, l as addReverseMissingIssue, m as diskLine, p as deviceLeaseStates, u as applyMachineMemory, v as metroReverseTargets, w as tightVolumes, x as remoteDeviceLine, y as parseDfFree } from "./watchman-BL1IdOtq.mjs";
|
|
11
|
+
import { A as buildReport, B as readStats$1, D as ACTIVE_BUILD_KEY, Mt as readFootprints, N as parseActiveBuild, W as statsProjectKey$1, _ as metroLastStop, j as buildStatusLine, jt as attributeMachineUsage, k as activeBuildState, o as machineNumber, p as describeMetroLastStop } from "./budget-Dz-kyXLv.mjs";
|
|
12
|
+
import { m as resolveSupervisorTarget } from "./workspaces-Djb2gfi9.mjs";
|
|
13
|
+
import { d as readWebActivity, f as tailLines, i as createDeviceProcessTables, r as createActivityReader } from "./activity-BSw0x84R.mjs";
|
|
14
|
+
import { i as listLeaseFiles, r as leaseIsExpired, s as parseWorkspaceLeases } from "./device-lease-Cu7PtQpZ.mjs";
|
|
15
|
+
import { F as ownedAvdDeviceProfile, O as listAdbDevices, d as androidToolPath, ft as parkedMaxSetting, ot as POOL_SETTING_REMEDY, pt as readParked, z as ownedAvdSerialResolver } from "./android-BdQC6zs1.mjs";
|
|
16
|
+
import { f as listAllIosSimsAsync, y as parseSimctlList } from "./ios-BWbHFZVz.mjs";
|
|
17
|
+
import { a as parseNdjsonLine } from "./ndjson-LGZAMsqa.mjs";
|
|
18
|
+
import { l as probeHostedSession } from "./hosted-client-C5G4h_OJ.mjs";
|
|
19
|
+
import { m as hasMetroReverse } from "./app-install-CFI4ptUL.mjs";
|
|
20
|
+
import { m as readEasSessionLedger$1, p as easMachineStateRoot$1 } from "./device-remote-B5GiUifk.mjs";
|
|
21
|
+
import { d as readIosDevices, s as isReachable } from "./ios-device-CJ_ZOGky.mjs";
|
|
22
|
+
import "./hosted-macos-DABm3ScO.mjs";
|
|
23
|
+
import { i as readSupervisorState } from "./stop-zDlknFoz.mjs";
|
|
24
|
+
import { i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures, s as mergeState } from "./warm-progress-pFLB2e6P.mjs";
|
|
25
|
+
import { r as workspaceRecordingEnabled } from "./recordings-Bv8McZN4.mjs";
|
|
26
|
+
import { n as maintenanceLines, r as maintenanceStatus } from "./status-BEeL6IKz.mjs";
|
|
29
27
|
import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
|
|
30
|
-
import { t as triggerMaintenance } from "./trigger-
|
|
31
|
-
import { i as readSupervisorState } from "./stop-DQIasgKp.mjs";
|
|
32
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
28
|
+
import { t as triggerMaintenance } from "./trigger-CAhmG-4s.mjs";
|
|
33
29
|
import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
|
|
34
30
|
import { join, posix, resolve } from "node:path";
|
|
35
|
-
import { closeSync as closeSync$1, existsSync as existsSync$1, fstatSync as fstatSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readSync as readSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
|
|
36
|
-
import { homedir, totalmem } from "os";
|
|
37
31
|
import { basename as basename$1, dirname as dirname$1, join as join$1 } from "path";
|
|
38
|
-
import { rotatedLogPath } from "@stim-cli/core";
|
|
39
32
|
import { DEVICE_RECLAIM_REASON, ERROR_SOURCES, archiveRoot, archivedUsage, bundleMarkerPlatform, countErrorEntries, gitMergeCacheDir, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedIosPlacements, hostedIosRecords, hostedIosStatus, linkReplacedArchives, logFiles, macosAppState, parseHostedAndroidPlacement, parseHostedIosPlacement, queryLogs, readArchives, readBuildDetail, readBuildHistory, readDeviceIdleShutdowns, readDevicePlacement, readIdleStop, readLastBuilds, readMacosRecord, recordMatches, sortByTs, unreadableHostedAndroid, unreadableHostedIos, withDerivedFacts, withGitChip, withStateReadCache } from "@stim-cli/core/state";
|
|
40
33
|
import chalk from "chalk";
|
|
34
|
+
import { closeSync as closeSync$1, existsSync as existsSync$1, fstatSync as fstatSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readSync as readSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
|
|
35
|
+
import { rotatedLogPath } from "@stim-cli/core";
|
|
36
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
37
|
+
import { homedir, totalmem } from "os";
|
|
41
38
|
//#region src/device-host/hosted-native-status.ts
|
|
42
39
|
function hostedNativeProbe(placement, probe, slot, platform) {
|
|
43
40
|
const label = platform === "ios" ? "iOS" : "Android";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
2
2
|
//#region src/devices/stim-desktop.ts
|
|
3
3
|
const LAUNCH_SERVICES_LOOKUP = `ObjC.import('AppKit'); const url = $.NSWorkspace.sharedWorkspace.URLForApplicationWithBundleIdentifier('dev.stim.desktop'); url.isNil() ? '' : url.path.js`;
|
|
4
4
|
const SCHEME_HANDLER_LOOKUP = `ObjC.import('AppKit'); const url = $.NSWorkspace.sharedWorkspace.URLForApplicationToOpenURL($.NSURL.URLWithString('stim-desktop://workspace')); url.isNil() ? '' : url.path.js`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
2
2
|
import { accessSync, constants, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import { delimiter, join, resolve } from "node:path";
|
|
4
4
|
//#region src/diagnostics/stim-installations.ts
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { c as writeWorkspaceState, v as workspaceDir } from "./workspace-state-CR9X86xJ.mjs";
|
|
3
|
+
import { C as runningBundleInstances } from "./workspaces-Djb2gfi9.mjs";
|
|
4
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-B4iWH4E-.mjs";
|
|
5
|
+
import { a as macosRuntimeClaim, o as requiredMacosRecord } from "./state-Tp4uImDS.mjs";
|
|
6
|
+
import { n as stopHostedMacos } from "./hosted-macos-DABm3ScO.mjs";
|
|
7
|
+
import { readMacosRecord } from "@stim-cli/core/state";
|
|
8
|
+
//#region src/macos/stop.ts
|
|
9
|
+
const APP_EXIT_MS = 5e3;
|
|
10
|
+
const SUPERVISOR_EXIT_MS = 12e3;
|
|
11
|
+
function signal(pid, name) {
|
|
12
|
+
try {
|
|
13
|
+
process.kill(pid, name);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
if (error.code !== "ESRCH") throw error;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
async function stopProcesses(records, waitMs = APP_EXIT_MS) {
|
|
19
|
+
let live = [...new Map(records.map((record) => [record.pid, record])).values()];
|
|
20
|
+
for (const name of ["SIGTERM", "SIGKILL"]) {
|
|
21
|
+
live = live.filter((record) => {
|
|
22
|
+
const identity = (0, process_identity_exports.inspectProcessIdentity)(record);
|
|
23
|
+
if (identity === "gone" || identity === "different") return false;
|
|
24
|
+
if (identity !== "same") throw Object.assign(/* @__PURE__ */ new Error(`Cannot verify macOS owner pid ${record.pid}; no signal was sent.`), { code: "STIM_MACOS_OWNER_UNVERIFIED" });
|
|
25
|
+
return true;
|
|
26
|
+
});
|
|
27
|
+
for (const record of live) signal(record.pid, name);
|
|
28
|
+
const exited = await Promise.all(live.map((record) => (0, process_identity_exports.waitForProcessExit)(record, waitMs)));
|
|
29
|
+
live = live.filter((_, index) => !exited[index]);
|
|
30
|
+
if (!live.length) return;
|
|
31
|
+
}
|
|
32
|
+
throw new Error(`Owned macOS process ${live.map((record) => record.pid).join(", ")} did not exit.`);
|
|
33
|
+
}
|
|
34
|
+
/** Stops every running copy of the workspace's owned app bundle, including copies LaunchServices started. */
|
|
35
|
+
async function stopBundleInstances(root) {
|
|
36
|
+
const instances = runningBundleInstances(root);
|
|
37
|
+
await stopProcesses(instances);
|
|
38
|
+
return instances.length > 0;
|
|
39
|
+
}
|
|
40
|
+
async function stopMacosAppHeld(root) {
|
|
41
|
+
const record = requiredMacosRecord(root);
|
|
42
|
+
if (record?.supervisor) await stopProcesses([record.supervisor], SUPERVISOR_EXIT_MS);
|
|
43
|
+
const app = readMacosRecord(root)?.app ?? record?.app;
|
|
44
|
+
if (app) await stopProcesses([app]);
|
|
45
|
+
const instances = runningBundleInstances(root);
|
|
46
|
+
await stopProcesses(instances);
|
|
47
|
+
if (!record) return instances.length > 0;
|
|
48
|
+
const claims = (0, ownership_claim_exports.readClaimSet)(macosRuntimeClaim(root));
|
|
49
|
+
if (claims.unresolved.length || claims.live.length) throw Object.assign(/* @__PURE__ */ new Error("The macOS runtime claim cannot be released; inspect its recorded owner before cleanup."), { code: "STIM_MACOS_OWNER_UNVERIFIED" });
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
/** Stops the workspace's app here, or its session on the hosting Mac, which must confirm the session stopped. */
|
|
53
|
+
function stopMacosApp(root) {
|
|
54
|
+
const stop = async () => {
|
|
55
|
+
const record = requiredMacosRecord(root);
|
|
56
|
+
if (!record?.host) return stopMacosAppHeld(root);
|
|
57
|
+
await stopHostedMacos(root, record.host);
|
|
58
|
+
const { host: _host, hostLaunched: _launched, ...stopped } = record;
|
|
59
|
+
writeWorkspaceState(root, { macos: {
|
|
60
|
+
...stopped,
|
|
61
|
+
supervisor: void 0
|
|
62
|
+
} });
|
|
63
|
+
return true;
|
|
64
|
+
};
|
|
65
|
+
return withWorkspaceProcessLock(workspaceDir(root), "macos-launch", stop, {
|
|
66
|
+
external: true,
|
|
67
|
+
waitMs: 0,
|
|
68
|
+
ownerPurpose: "stop macOS app"
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
export { stopMacosApp as n, stopMacosAppHeld as r, stopBundleInstances as t };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as resolveCollectorTargets, c as stopWorkspaceNow, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-
|
|
1
|
+
import { m as resolveSupervisorTarget } from "./workspaces-Djb2gfi9.mjs";
|
|
2
|
+
import { a as resolveCollectorTargets, c as stopWorkspaceNow, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-zDlknFoz.mjs";
|
|
3
3
|
export { clearCollectorState, clearSupervisorState, stopCommand as default, readCollectorState, readSupervisorState, resolveCollectorTargets, resolveSupervisorTarget, runStop, stopWorkspaceNow };
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-
|
|
4
|
-
import { o as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { i as stopHostedAndroid } from "./hosted-android-
|
|
15
|
-
import { f as resolveEasCliBin } from "./remote-cache-
|
|
16
|
-
import { i as endRecordedSession } from "./device-remote-
|
|
17
|
-
import {
|
|
18
|
-
import { r as stopHostedIos } from "./hosted-ios-
|
|
1
|
+
import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { n as debugLog } from "./exec-i8GDPwq9.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-Bt8ygHE7.mjs";
|
|
4
|
+
import { B as parseDeviceSlotKey, D as withConfigLock$1, E as upsertProject, H as projectDeviceSlots, V as parseDeviceSlotOption, W as validateDeviceSlot, o as clearSupervisor, p as getProject, z as deviceSlotPlatforms } from "./config-DC5jEtd1.mjs";
|
|
5
|
+
import { a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, v as workspaceDir } from "./workspace-state-CR9X86xJ.mjs";
|
|
6
|
+
import { C as clearRemoteSession, E as readMetroTunnel, O as readRemoteSession, S as clearManagedMetroTunnel, T as clearWorkspaceSupervisor, n as findCommandWorkspace, w as clearWorkspaceLaunches } from "./project-B5eQ1USs.mjs";
|
|
7
|
+
import { d as signalProcessTree, r as killMetroTree, s as pidExists, u as resolveProjectMetro } from "./metro-DI2AjPF_.mjs";
|
|
8
|
+
import { b as withdrawDevServerStopRequest, g as logVanishedSupervisor, v as requestDevServerStop } from "./budget-Dz-kyXLv.mjs";
|
|
9
|
+
import { D as teardownOwnedAvd, O as teardownOwnedBrowser, g as stopTunnel, k as teardownOwnedIosSim, m as resolveSupervisorTarget } from "./workspaces-Djb2gfi9.mjs";
|
|
10
|
+
import { n as fileLeaseIo, u as releaseWorkspaceLeases } from "./device-lease-Cu7PtQpZ.mjs";
|
|
11
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-B4iWH4E-.mjs";
|
|
12
|
+
import { t as macosAppPresent } from "./state-Tp4uImDS.mjs";
|
|
13
|
+
import { _ as nativeRunHolder, d as NATIVE_RUN_LOCK, f as NATIVE_RUN_WAIT_MS, g as describeNativeRunHolder, h as decideStopAction, m as clearNativeRunCancel, v as nativeRunWaitNotice, y as requestNativeRunCancel } from "./client-CuUo8Nvg.mjs";
|
|
14
|
+
import { i as stopHostedAndroid } from "./hosted-android-Bs7fytj7.mjs";
|
|
15
|
+
import { f as resolveEasCliBin } from "./remote-cache-N3hAEaAL.mjs";
|
|
16
|
+
import { i as endRecordedSession } from "./device-remote-B5GiUifk.mjs";
|
|
17
|
+
import { n as verifyCollectorOwnership } from "./ownership-EB0ySdGK.mjs";
|
|
18
|
+
import { r as stopHostedIos } from "./hosted-ios-Bik035eL.mjs";
|
|
19
|
+
import { n as stopMacosApp } from "./stop-D0UIpZuh.mjs";
|
|
19
20
|
import { hostedAndroidDeviceName, hostedAndroidRecords, hostedIosRecords, hostedNativeRecords, isJsonObject, parseHostedNativePlacement } from "@stim-cli/core/state";
|
|
20
21
|
import chalk from "chalk";
|
|
21
22
|
//#region src/commands/stop.ts
|
|
@@ -250,10 +251,9 @@ async function stopWorkspaceHostedNative(root, slot, report, failed) {
|
|
|
250
251
|
};
|
|
251
252
|
}
|
|
252
253
|
async function stopWorkspaceMacos(root, failed, enabled) {
|
|
253
|
-
if (enabled === false ||
|
|
254
|
+
if (enabled === false || !macosAppPresent(root)) return void 0;
|
|
254
255
|
try {
|
|
255
|
-
await stopMacosApp(root);
|
|
256
|
-
return { status: "stopped" };
|
|
256
|
+
return await stopMacosApp(root) ? { status: "stopped" } : void 0;
|
|
257
257
|
} catch (error) {
|
|
258
258
|
const reason = error instanceof Error ? error.message : String(error);
|
|
259
259
|
failed(reason);
|
|
@@ -293,6 +293,7 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
293
293
|
let ok = true;
|
|
294
294
|
let stillHolding = null;
|
|
295
295
|
let keepPort = null;
|
|
296
|
+
debugLog.log("stop.phase.start", { phase: "supervisor" });
|
|
296
297
|
const target = resolveSupervisorTarget({
|
|
297
298
|
state: sup,
|
|
298
299
|
record: proj?.supervisor ?? null,
|
|
@@ -330,6 +331,11 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
330
331
|
stillHolding = outcomes.supervisor.reason;
|
|
331
332
|
}
|
|
332
333
|
}
|
|
334
|
+
debugLog.log("stop.phase.end", {
|
|
335
|
+
phase: "supervisor",
|
|
336
|
+
status: outcomes.supervisor.status
|
|
337
|
+
});
|
|
338
|
+
debugLog.log("stop.phase.start", { phase: "collectors" });
|
|
333
339
|
outcomes.collectors = await reapCollectors(root, collectorRecords, {
|
|
334
340
|
isAlive,
|
|
335
341
|
signal: signalCollector,
|
|
@@ -345,10 +351,22 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
345
351
|
} else if (outcomes.collectors.entries.some((entry) => entry.status === "failed")) {
|
|
346
352
|
ok = false;
|
|
347
353
|
stillHolding ??= "a collector could not be stopped";
|
|
348
|
-
} else if (outcomes.collectors.entries.length
|
|
349
|
-
|
|
350
|
-
|
|
354
|
+
} else if (outcomes.collectors.entries.length) {
|
|
355
|
+
debugLog.log("stop.phase.start", { phase: "clear-collectors" });
|
|
356
|
+
const cleared = clearCollectors(root, collectorRecords);
|
|
357
|
+
debugLog.log("stop.phase.end", {
|
|
358
|
+
phase: "clear-collectors",
|
|
359
|
+
cleared
|
|
360
|
+
});
|
|
361
|
+
if (cleared === false) {
|
|
362
|
+
ok = false;
|
|
363
|
+
stillHolding ??= "a replacement collector appeared during cleanup";
|
|
364
|
+
}
|
|
351
365
|
}
|
|
366
|
+
debugLog.log("stop.phase.end", {
|
|
367
|
+
phase: "collectors",
|
|
368
|
+
status: outcomes.collectors.status
|
|
369
|
+
});
|
|
352
370
|
if (outcomes.supervisor.status === "stopped" || outcomes.supervisor.status === "timeout" || outcomes.supervisor.status === "unverified" || outcomes.supervisor.status === "failed") outcomes.metro = {
|
|
353
371
|
status: "skipped",
|
|
354
372
|
reason: "the supervisor owns the dev server on this port"
|
|
@@ -732,11 +750,25 @@ function shutDownDevices(project, workspace, { teardownIos, teardownAvd, report
|
|
|
732
750
|
reason: "Stim does not own this device"
|
|
733
751
|
};
|
|
734
752
|
report(chalk.dim(phaseLine("device", `${iosUdid} is not Stim-owned, leaving it running`)));
|
|
735
|
-
} else
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
753
|
+
} else {
|
|
754
|
+
debugLog.log("stop.device.start", {
|
|
755
|
+
platform: "ios",
|
|
756
|
+
slot,
|
|
757
|
+
deviceId: iosUdid
|
|
758
|
+
});
|
|
759
|
+
const result = teardownIos(iosUdid, {
|
|
760
|
+
del: false,
|
|
761
|
+
label: iosName,
|
|
762
|
+
workspace
|
|
763
|
+
});
|
|
764
|
+
debugLog.log("stop.device.end", {
|
|
765
|
+
platform: "ios",
|
|
766
|
+
slot,
|
|
767
|
+
deviceId: iosUdid,
|
|
768
|
+
status: result.status
|
|
769
|
+
});
|
|
770
|
+
device[iosKey] = reportDevice(iosUdid, result, report, "ios");
|
|
771
|
+
}
|
|
740
772
|
}
|
|
741
773
|
const android = platforms.android;
|
|
742
774
|
if (android?.avdName) {
|
|
@@ -748,10 +780,24 @@ function shutDownDevices(project, workspace, { teardownIos, teardownAvd, report
|
|
|
748
780
|
reason: "Stim does not own this device"
|
|
749
781
|
};
|
|
750
782
|
report(chalk.dim(phaseLine("device", `${android.avdName} is not Stim-owned, leaving it running`)));
|
|
751
|
-
} else
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
783
|
+
} else {
|
|
784
|
+
debugLog.log("stop.device.start", {
|
|
785
|
+
platform: "android",
|
|
786
|
+
slot,
|
|
787
|
+
deviceId: android.avdName
|
|
788
|
+
});
|
|
789
|
+
const result = teardownAvd(android.avdName, {
|
|
790
|
+
del: false,
|
|
791
|
+
workspace
|
|
792
|
+
});
|
|
793
|
+
debugLog.log("stop.device.end", {
|
|
794
|
+
platform: "android",
|
|
795
|
+
slot,
|
|
796
|
+
deviceId: android.avdName,
|
|
797
|
+
status: result.status
|
|
798
|
+
});
|
|
799
|
+
device[androidKey] = reportDevice(android.avdName, result, report, "android");
|
|
800
|
+
}
|
|
755
801
|
}
|
|
756
802
|
}
|
|
757
803
|
return device;
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
+
import { a as readPidFile, i as clearWorkspaceSupervisor, n as MODE_EXPO, o as writePidFile, r as clearExpoMetroTunnel, t as MODE_BARE } from "./state-lKh8shBp.mjs";
|
|
1
2
|
import { t as NdjsonWriter } from "./ndjson-Du3j0AQ9.mjs";
|
|
2
|
-
import { a as readPidFile, i as clearWorkspaceSupervisor, n as MODE_EXPO, o as writePidFile, r as clearExpoMetroTunnel, t as MODE_BARE } from "./state-B4PQFXMW.mjs";
|
|
3
3
|
import { DevServerStopRecord, DeviceActivity, DeviceIdleShutdownRecord, IOS_SIMULATOR_APPS } from "@stim-cli/core/state";
|
|
4
|
+
//#region src/supervisor/types.d.ts
|
|
5
|
+
interface ServerExitInfo {
|
|
6
|
+
code?: number | null;
|
|
7
|
+
signal?: NodeJS.Signals | null;
|
|
8
|
+
reason?: string;
|
|
9
|
+
error?: Error;
|
|
10
|
+
}
|
|
11
|
+
interface ServerHandle {
|
|
12
|
+
close(): Promise<void> | void;
|
|
13
|
+
onExit?(cb: (info?: ServerExitInfo | null) => void): void;
|
|
14
|
+
serverPid?: number | null;
|
|
15
|
+
}
|
|
16
|
+
type ServerStarter = (opts: {
|
|
17
|
+
root: string;
|
|
18
|
+
port: number;
|
|
19
|
+
logsDir: string;
|
|
20
|
+
writer?: NdjsonWriter | null;
|
|
21
|
+
tunnel?: boolean;
|
|
22
|
+
resetCache?: boolean;
|
|
23
|
+
onTunnelUrl?: ((url: string) => void) | null;
|
|
24
|
+
}) => Promise<ServerHandle>;
|
|
25
|
+
//#endregion
|
|
4
26
|
//#region src/supervisor/idle-stop.d.ts
|
|
5
27
|
interface IdleProbe {
|
|
6
28
|
lastActivityAt(): number;
|
|
@@ -53,26 +75,6 @@ interface ParsedSupervisorArgs {
|
|
|
53
75
|
error?: string;
|
|
54
76
|
}
|
|
55
77
|
declare function parseArgs(argv: string[]): ParsedSupervisorArgs;
|
|
56
|
-
interface ServerExitInfo {
|
|
57
|
-
code?: number | null;
|
|
58
|
-
signal?: NodeJS.Signals | null;
|
|
59
|
-
reason?: string;
|
|
60
|
-
error?: Error;
|
|
61
|
-
}
|
|
62
|
-
interface ServerHandle {
|
|
63
|
-
close(): Promise<void> | void;
|
|
64
|
-
onExit?(cb: (info?: ServerExitInfo | null) => void): void;
|
|
65
|
-
serverPid?: number | null;
|
|
66
|
-
}
|
|
67
|
-
type ServerStarter = (opts: {
|
|
68
|
-
root: string;
|
|
69
|
-
port: number;
|
|
70
|
-
logsDir: string;
|
|
71
|
-
writer?: NdjsonWriter | null;
|
|
72
|
-
tunnel?: boolean;
|
|
73
|
-
resetCache?: boolean;
|
|
74
|
-
onTunnelUrl?: ((url: string) => void) | null;
|
|
75
|
-
}) => Promise<ServerHandle>;
|
|
76
78
|
interface DeviceIdleOps {
|
|
77
79
|
due: typeof dueIdleDevices;
|
|
78
80
|
shutDown: typeof shutDownIdleDevices;
|
|
@@ -103,4 +105,4 @@ declare function runSupervisor({ root, port, tunnel, resetCache, idleStopMinutes
|
|
|
103
105
|
} | null>;
|
|
104
106
|
declare function main(argv?: string[]): Promise<void>;
|
|
105
107
|
//#endregion
|
|
106
|
-
export { DeviceIdleOps, MODE_BARE, MODE_EXPO, RunSupervisorOptions, ServerExitInfo,
|
|
108
|
+
export { DeviceIdleOps, MODE_BARE, MODE_EXPO, RunSupervisorOptions, type ServerExitInfo, clearExpoMetroTunnel, clearWorkspaceSupervisor, main, parseArgs, readPidFile, runSupervisor, writePidFile };
|
package/dist/supervisor-run.mjs
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { t as clearHostedMetro } from "./metro-gateway-C-ijGI2F.mjs";
|
|
19
|
-
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-IGyNV8Cr.mjs";
|
|
1
|
+
import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { B as parseDeviceSlotKey, H as projectDeviceSlots, T as setSupervisor, o as clearSupervisor, p as getProject } from "./config-DC5jEtd1.mjs";
|
|
3
|
+
import { C as workspaceStateFile, a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, x as workspaceLogsDir$1 } from "./workspace-state-CR9X86xJ.mjs";
|
|
4
|
+
import { D as readPidFile, T as clearWorkspaceSupervisor, b as MODE_EXPO, j as writePidFile, p as detectIsExpo, u as nativeProjectIntegration, x as clearExpoMetroTunnel, y as MODE_BARE } from "./project-B5eQ1USs.mjs";
|
|
5
|
+
import { n as parseTriggerCount, o as runWatchman, r as parseWatchRoots, t as parseSubscriberNames } from "./watchman-BL1IdOtq.mjs";
|
|
6
|
+
import { E as workspaceBuildInProgress, f as describeDevServerStop, h as devServerStopRecord, m as devServerStopLevel, y as vanishedSupervisorMessage } from "./budget-Dz-kyXLv.mjs";
|
|
7
|
+
import { f as withIdleWorkspace } from "./workspaces-Djb2gfi9.mjs";
|
|
8
|
+
import { m as workspaceDeviceLastUseAt, r as createActivityReader } from "./activity-BSw0x84R.mjs";
|
|
9
|
+
import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-Cu7PtQpZ.mjs";
|
|
10
|
+
import { z as ownedAvdSerialResolver } from "./android-BdQC6zs1.mjs";
|
|
11
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-B4iWH4E-.mjs";
|
|
12
|
+
import { s as describeError } from "./metro-store-BAHFcJm6.mjs";
|
|
13
|
+
import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
|
|
14
|
+
import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DYiMBn34.mjs";
|
|
15
|
+
import { l as probeHostedSession } from "./hosted-client-C5G4h_OJ.mjs";
|
|
16
|
+
import { t as clearHostedMetro } from "./metro-gateway-BxpJLIwh.mjs";
|
|
17
|
+
import { t as relaunchWithLogFile } from "./detached-entry-pB_IPfV4.mjs";
|
|
20
18
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
21
19
|
import { dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
22
|
-
import { LOG_ROTATE_BYTES, createMetroGateway } from "@stim-cli/core";
|
|
23
20
|
import { DEV_SERVER_STOP_REQUEST_KEY, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, IDLE_STOP_KEY, hostedAndroidPlacements, hostedIosPlacements, hostedMetroGateways, hostedMetroRequests, hostedNativeRecords, parseHostedNativePlacement, readDevServerStopRequest } from "@stim-cli/core/state";
|
|
24
21
|
import { fileURLToPath } from "node:url";
|
|
22
|
+
import { LOG_ROTATE_BYTES, createMetroGateway } from "@stim-cli/core";
|
|
25
23
|
//#region src/supervisor/hosted-metro.ts
|
|
26
24
|
function reconcileHostedMetro(requests, active) {
|
|
27
25
|
const same = (session) => JSON.stringify(requests[session]) === JSON.stringify(active[session]);
|
|
@@ -469,7 +467,8 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
469
467
|
root = realpathSync(root);
|
|
470
468
|
const logsDir = workspaceLogsDir$1(root);
|
|
471
469
|
const writer = createNdjsonWriter(join(logsDir, "metro.ndjson"), { maxBytes: LOG_ROTATE_BYTES });
|
|
472
|
-
const
|
|
470
|
+
const integration = nativeProjectIntegration(root, isExpo);
|
|
471
|
+
const mode = integration.mode;
|
|
473
472
|
const startedAt = new Date(now()).toISOString();
|
|
474
473
|
const processToken = (0, process_identity_exports.captureProcessToken)(process.pid);
|
|
475
474
|
if (!processToken) {
|
|
@@ -598,7 +597,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
598
597
|
return writer.write(entry);
|
|
599
598
|
} });
|
|
600
599
|
try {
|
|
601
|
-
server = await (mode === "expo-child" ? startExpo
|
|
600
|
+
server = await ((mode === "expo-child" ? startExpo : startBare) ?? await integration.loadDevServer())({
|
|
602
601
|
root,
|
|
603
602
|
port,
|
|
604
603
|
logsDir,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as shortUdid, l as phaseLine } from "./command-output-
|
|
2
|
-
import { x as workspaceLogsDir } from "./workspace-state-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { h as shortUdid, l as phaseLine } from "./command-output-Bt8ygHE7.mjs";
|
|
2
|
+
import { x as workspaceLogsDir } from "./workspace-state-CR9X86xJ.mjs";
|
|
3
|
+
import { A as parseIosSimulatorApp } from "./ios-BWbHFZVz.mjs";
|
|
4
|
+
import { d as unknownIosDeviceTypeRefusal, f as unknownIosRuntimeRefusal, o as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-BoN1jQkO.mjs";
|
|
5
|
+
import { k as describeDiagnostic } from "./toolchain-C3xSoyUl.mjs";
|
|
6
|
+
import { t as IosDeviceMismatchError } from "./device-ios-B2ruohE-.mjs";
|
|
7
|
+
import { l as parseDeviceWait } from "./device-lease-run-D38SnZtt.mjs";
|
|
8
8
|
import { basename, join } from "node:path";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
function buildLogFile(root) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-
|
|
3
|
-
import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-
|
|
4
|
-
import { T as pickDevClientScheme } from "./app-install-
|
|
5
|
-
import { t as devClientScheme } from "./dev-client-
|
|
1
|
+
import { t as getExecutor } from "./exec-i8GDPwq9.mjs";
|
|
2
|
+
import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-BdQC6zs1.mjs";
|
|
3
|
+
import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-BoN1jQkO.mjs";
|
|
4
|
+
import { T as pickDevClientScheme } from "./app-install-CFI4ptUL.mjs";
|
|
5
|
+
import { t as devClientScheme } from "./dev-client-CDY_zAmD.mjs";
|
|
6
6
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
7
7
|
import { relative } from "node:path";
|
|
8
8
|
//#region src/commands/android/support.ts
|