stim 1.21.0 → 1.23.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 +60 -7
- package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-ybouwJSR.mjs} +21 -3
- package/dist/{act-DHAw2A2S.mjs → act-DG54PWtJ.mjs} +298 -164
- package/dist/{activity-BzVfHSrY.mjs → activity-B5RtpFda.mjs} +33 -12
- package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-UJ5gC80l.mjs} +7 -7
- package/dist/{android-BLgbNqox.mjs → android-BoUJKbfz.mjs} +66 -52
- package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
- package/dist/{android-CV_GCELZ.mjs → android-CHH4KLOR.mjs} +5 -5
- package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
- package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
- package/dist/api.d.mts +132 -118
- package/dist/api.mjs +239 -42
- package/dist/{artifact-DAuZ-FNU.mjs → artifact-5RteZem7.mjs} +69 -40
- package/dist/{artifact-B8T3S5gi.mjs → artifact-Dwdo7k1E.mjs} +40 -35
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-QQzVjz3O.mjs → browser-web-CeEVlGug.mjs} +187 -59
- package/dist/{budget-Bs6SxxzO.mjs → budget-DnPX3DXj.mjs} +830 -699
- package/dist/{build-CoPzQRNw.mjs → build-CqufZFqy.mjs} +34 -27
- package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
- package/dist/{build-plan-CaFskB7_.mjs → build-plan-C8CIvRyi.mjs} +74 -14
- package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-BJRZ9pG3.mjs → ccache-RcAy92gH.mjs} +6 -6
- package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
- package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
- package/dist/{cli-0DYf8QhQ.mjs → cli-D-J9fWGV.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-UXD70ZbM.mjs → client-yyso1bwi.mjs} +218 -47
- package/dist/collector-run.d.mts +1 -1
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-B1UrjZHL.mjs → command-output-Db8BqzxH.mjs} +1 -1
- package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
- package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
- package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
- package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-UOeESKm6.mjs → dev-client-BnYSDiKa.mjs} +2 -2
- package/dist/{device-DCxH7_By.mjs → device-BvzPUBs3.mjs} +16 -16
- package/dist/{device-ExJq8Ei7.mjs → device-CCkWmkAA.mjs} +71 -14
- package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-CjaSdrhg.mjs} +9 -10
- package/dist/device-host-worker.mjs +25 -32
- package/dist/{device-ios-DRUeKaFV.mjs → device-ios-uOiEETX2.mjs} +39 -16
- package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-BgwPHc6u.mjs} +5 -5
- package/dist/{device-pool-DMRpVX9a.mjs → device-pool-C-ptmZTa.mjs} +3 -3
- package/dist/{doctor-DTvaDOda.mjs → doctor-8sr2tFOL.mjs} +24 -37
- package/dist/{doctor-Dhqebm0q.mjs → doctor-D2SN3Ltx.mjs} +19 -16
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-BLHCYxzi.mjs → doctor-pxxvipYC.mjs} +1 -1
- package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-sy_RNhFt.mjs} +5 -5
- package/dist/{eas-build-BomfRnFT.mjs → eas-build-CyjU5K7E.mjs} +4 -4
- package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-DV3Wytf1.mjs} +27 -18
- package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-BzzsX97d.mjs} +8 -7
- package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-C6sVoeqO.mjs} +10 -10
- package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
- package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
- package/dist/{gc-_-dCXdyL.mjs → gc-CDoogxAI.mjs} +587 -313
- package/dist/gc-DLbzvTP2.mjs +3 -0
- package/dist/{guide-Yqwt2bd6.mjs → guide-BC37GcDG.mjs} +288 -59
- package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-CkclQig_.mjs} +6 -6
- package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-ByuMMO5s.mjs} +4 -4
- package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-DtYHeuYR.mjs} +1 -1
- package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-Br84qWy1.mjs} +5 -5
- package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-DdtYajZt.mjs} +21 -12
- package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-UPI9zdZ4.mjs} +27 -14
- package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
- package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DO7oIRlc.mjs} +7 -7
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-ubFsBzwq.mjs → ios-DZZbNYlY.mjs} +59 -50
- package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-device-CwFMehUS.mjs → ios-device-JC3uWM4K.mjs} +3 -3
- package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
- package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CVyNwjAF.mjs} +5 -5
- package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
- package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-CQ68hG9s.mjs → ios-vbUOqGXu.mjs} +8 -8
- package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Cc1dttps.mjs → js-swap-C3QxUFJR.mjs} +7 -29
- package/dist/{launch-CD1yVc7U.mjs → launch-Bz7JtaC4.mjs} +16 -16
- package/dist/{launch-Zq2mOSDy.mjs → launch-CHY3p-yz.mjs} +40 -39
- package/dist/{logs-CMm05HxN.mjs → logs-CtNeNDuq.mjs} +10 -17
- package/dist/{logs-BS00Anxf.mjs → logs-mxqsWpJs.mjs} +151 -24
- package/dist/{macos-B65--pPd.mjs → macos-inNFbBWc.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/{macos-C-0qJ6zq.mjs → macos-u0BoHKnO.mjs} +143 -46
- package/dist/maintenance-run.mjs +8 -8
- package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
- package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
- package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
- package/dist/{native-android-JACyjTZs.mjs → native-android-CdCSylTn.mjs} +43 -242
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
- package/dist/{native-run-DY_RLx3C.mjs → native-run-BUTu8T7A.mjs} +4 -5
- package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-CRSOZxKY.mjs} +8 -7
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-G6rkkhxu.mjs} +2 -3
- package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-_os2PlCD.mjs} +27 -32
- package/dist/offload-worker.d.mts +65 -2
- package/dist/offload-worker.mjs +305 -73
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
- package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
- package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-BU42oOyT.mjs} +12 -8
- package/dist/{ports-D-MmCTdv.mjs → ports-BSmQKzW7.mjs} +3 -3
- package/dist/{prebuild-uD_ipCxF.mjs → prebuild-BFm63bQ0.mjs} +63 -16
- package/dist/{project-BZNjmW_8.mjs → project-CTLNHCfE.mjs} +16 -16
- package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
- package/dist/pull-requests.d.mts +2 -2
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-CFgUroxW.mjs} +73 -53
- package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-CmJkTljQ.mjs} +8 -8
- package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-LTF-Xt8l.mjs} +7 -7
- package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-ChBF1MkB.mjs} +43 -29
- package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-CmTRFJaX.mjs → reload-DF9hqUUB.mjs} +16 -15
- package/dist/{reload-DzjSl5P_.mjs → reload-RBi1nj6Z.mjs} +1 -1
- package/dist/{remote-ByYkXdGD.mjs → remote-BmvMCcJw.mjs} +18 -15
- package/dist/{result-DNiS-tTP.mjs → result-Cx5CRLvS.mjs} +24 -23
- package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
- package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
- package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
- package/dist/{server-command-CtzloH3v.mjs → server-command-BTiGPEjS.mjs} +5 -5
- package/dist/server-expo-C-Buqvn_.mjs +2 -0
- package/dist/{server-expo-DT_F_uVI.mjs → server-expo-D9lEz4aq.mjs} +7 -5
- package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
- package/dist/{settings-T1gtc3bf.mjs → settings-eKF_vJJs.mjs} +1 -1
- package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-79mQRr9C.mjs} +7 -6
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
- package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-D7M2nE4b.mjs} +6 -6
- package/dist/{stage-BIS0ydsV.mjs → stage-DKNM4ZPd.mjs} +21 -4
- package/dist/{start-RChynRDp.mjs → start-CRfN1kWV.mjs} +1 -1
- package/dist/{start-7lpH7hmN.mjs → start-bjfiScgz.mjs} +622 -393
- package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
- package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
- package/dist/{stats-53T7OTb9.mjs → stats-DioA6cBU.mjs} +5 -5
- package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
- package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
- package/dist/{status-CSi6tlRq.mjs → status-Eqx_20WC.mjs} +1 -1
- package/dist/{status-BL7jVyAB.mjs → status-kzbeWk4x.mjs} +43 -29
- package/dist/{status-watch-GDCfqpTE.mjs → status-watch-BIqqbJ6q.mjs} +48 -16
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
- package/dist/{stop-Bk_1qiV6.mjs → stop-B18d8KDw.mjs} +2 -2
- package/dist/{stop-CPzlM1L-.mjs → stop-B2uLQfoM.mjs} +15 -16
- package/dist/{stop-D7h6jAXQ.mjs → stop-DzLJc7Ei.mjs} +31 -22
- package/dist/supervisor-run.d.mts +3 -3
- package/dist/supervisor-run.mjs +28 -36
- package/dist/{support-Dlu37g6H.mjs → support-BTpZ6RAJ.mjs} +15 -11
- package/dist/{support-67vraa1Q.mjs → support-DTBV56gy.mjs} +8 -8
- package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
- package/dist/swiftpm-macos-r_WSKlXr.mjs +532 -0
- package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-CWeGJgCc.mjs} +9 -6
- package/dist/toolchain-GVgnf8d1.mjs +2 -0
- package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
- package/dist/web-Cduk0NSE.mjs +2 -0
- package/dist/{web-CJmIj6AI.mjs → web-CwREhjD-.mjs} +11 -10
- package/dist/web-run.mjs +11 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
- package/dist/{workspaces-BccMFmGQ.mjs → workspaces-BxzYlo3P.mjs} +594 -266
- package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-8lqn_lBp.mjs} +850 -551
- package/dist/worktree-BxfVxG_b.mjs +2 -0
- package/dist/{xcode-Zlx3qjEs.mjs → xcode-iQnROM5o.mjs} +5 -5
- package/package.json +7 -7
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/dist/gc-C-WwL0yi.mjs +0 -3
- package/dist/git-C3iTsJaZ.mjs +0 -73
- package/dist/server-expo-C-90EhcG.mjs +0 -2
- package/dist/settings-DkdmlelE.d.mts +0 -15
- package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
- package/dist/toolchain-DhKwp9iI.mjs +0 -2
- package/dist/trigger-Bf3uDcpv.mjs +0 -2
- package/dist/web-DknQETPs.mjs +0 -2
- package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
- package/dist/worktree-CK2MpJW5.mjs +0 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as process_identity_exports, r as WorkspaceProcessCleanupError, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { d as workspaceDir, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { t as runOperationFile } from "./operation-exec-BW0em61G.mjs";
|
|
4
|
+
import { d as writeWorkspaceState, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-U08dEzhG.mjs";
|
|
5
|
+
import { c as pidExists } from "./metro-DiXtA3Ty.mjs";
|
|
5
6
|
import { readFileSync, readlinkSync, rmSync } from "node:fs";
|
|
6
7
|
import { hostname } from "node:os";
|
|
7
8
|
import { join } from "node:path";
|
|
@@ -69,18 +70,32 @@ function chromeProcessState(record, profile) {
|
|
|
69
70
|
return groupRunsProfile(listing, record.pid, profile) ? "lingering" : "gone";
|
|
70
71
|
}
|
|
71
72
|
/** Checks the owned Chrome process or surviving group without blocking on ps. */
|
|
72
|
-
async function chromeProcessStateAsync(record, profile) {
|
|
73
|
+
async function chromeProcessStateAsync(record, profile, operation) {
|
|
74
|
+
operation?.signal.throwIfAborted();
|
|
73
75
|
const state = chromeIdentityState(record);
|
|
74
76
|
if (state) return state;
|
|
75
|
-
|
|
77
|
+
let listing;
|
|
78
|
+
const args = [
|
|
76
79
|
"-A",
|
|
77
80
|
"-ww",
|
|
78
81
|
"-o",
|
|
79
82
|
"pgid=,command="
|
|
80
|
-
]
|
|
83
|
+
];
|
|
84
|
+
const options = {
|
|
81
85
|
timeoutMs: 1e4,
|
|
82
86
|
killSignal: "SIGKILL"
|
|
83
|
-
}
|
|
87
|
+
};
|
|
88
|
+
if (operation) try {
|
|
89
|
+
listing = await runOperationFile(operation, getExecutor(), "ps", args, {
|
|
90
|
+
...options,
|
|
91
|
+
cwd: operation.cwd
|
|
92
|
+
});
|
|
93
|
+
} catch (error) {
|
|
94
|
+
if (error instanceof WorkspaceProcessCleanupError) throw error;
|
|
95
|
+
operation.signal.throwIfAborted();
|
|
96
|
+
return "unknown";
|
|
97
|
+
}
|
|
98
|
+
else listing = await getExecutor().runFileQuietAsync("ps", args, options);
|
|
84
99
|
if (listing === null) return "unknown";
|
|
85
100
|
return groupRunsProfile(listing, record.pid, profile) ? "lingering" : "gone";
|
|
86
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as process_identity_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { d as workspaceDir, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-
|
|
3
|
+
import { o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { readMacosRecord } from "@stim-cli/core/state";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { P as formatBytes } from "./config-
|
|
2
|
-
import { o as formatLongDuration } from "./command-output-
|
|
3
|
-
import { i as findProjectRoot$1 } from "./project-
|
|
4
|
-
import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-
|
|
5
|
-
import { t as readProjectStats } from "./stats-report-
|
|
1
|
+
import { P as formatBytes } from "./config-DlrsduwG.mjs";
|
|
2
|
+
import { o as formatLongDuration } from "./command-output-Db8BqzxH.mjs";
|
|
3
|
+
import { i as findProjectRoot$1 } from "./project-CTLNHCfE.mjs";
|
|
4
|
+
import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-UJ5gC80l.mjs";
|
|
5
|
+
import { t as readProjectStats } from "./stats-report-BzaPrRm6.mjs";
|
|
6
6
|
import { archivedUsage, readArchives } from "@stim-cli/core/state";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
//#region src/commands/stats.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as gitPath } from "./operation-exec-BW0em61G.mjs";
|
|
2
2
|
import { readStatsReport, statsProjectKey } from "@stim-cli/core/state";
|
|
3
3
|
//#region src/engine/stats-report.ts
|
|
4
4
|
/** The stats report for the project at `root`, keyed like the run recorders; Git runs with `env` and dies when `signal` aborts. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as formatBytes } from "./config-
|
|
1
|
+
import { P as formatBytes } from "./config-DlrsduwG.mjs";
|
|
2
2
|
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
3
|
-
import { maintenanceRunClaims, readMaintenanceState } from "@stim-cli/core/state";
|
|
4
3
|
import { claimRemoveCommand, readClaimSet } from "@stim-cli/core/ownership-claim";
|
|
4
|
+
import { maintenanceRunClaims, readMaintenanceState } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/maintenance/status.ts
|
|
6
6
|
function maintenanceStatus(env = process.env) {
|
|
7
7
|
const state = readMaintenanceState();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as runStatusWatch, r as statusCommand, t as readVolumes } from "./status-
|
|
1
|
+
import { n as runStatusWatch, r as statusCommand, t as readVolumes } from "./status-kzbeWk4x.mjs";
|
|
2
2
|
export { statusCommand as default, readVolumes, runStatusWatch };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as process_identity_exports, t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1, p as workspaceLogErrorIndex } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { I as readWorkspaceLaunches, M as readMetroTunnel, P as readRemoteSession, S as readAppJson, a as findServerWorkspace, l as projectShortcut, u as detectPlatforms, v as detectIsExpo, y as detectTutorial } from "./project-
|
|
3
|
+
import { G as projectDeviceSlots, P as formatBytes, R as volumeRootFor, U as parseDeviceSlotKey, V as deviceSlotKey, _ as loadConfig$1, d as getConfigDir } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-Db8BqzxH.mjs";
|
|
5
|
+
import { s as gitAsync } from "./operation-exec-BW0em61G.mjs";
|
|
6
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
|
|
7
|
+
import { Mt as repoRoot, Y as resolveSettings, _t as gitCommonDir, ot as workspaceHiddenSetting, wt as linkedWorktreesOnDisk, yt as gitCommonDirOnDisk } from "./settings-C7O8A6ZI.mjs";
|
|
8
|
+
import { I as readWorkspaceLaunches, M as readMetroTunnel, P as readRemoteSession, S as readAppJson, a as findServerWorkspace, l as projectShortcut, u as detectPlatforms, v as detectIsExpo, y as detectTutorial } from "./project-CTLNHCfE.mjs";
|
|
9
9
|
import { a as parseNdjsonLine } from "./ndjson-CgE_o3Dl.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state
|
|
12
|
-
import { A as remoteDeviceState, C as environmentState, D as parseDfFree, E as metroReverseTargets, M as tightVolumes, N as unprovisionedWorktrees, O as poolLine, P as withWebFacts, S as diskLine, T as gitSummaryText, _ as addReverseMissingIssue, b as deviceLeaseLines, g as activityLabel, j as statusActivity, k as remoteDeviceLine, r as readEasSessionLedger$1, v as applyMachineMemory, x as deviceLeaseStates, y as capacity } from "./eas-session-ledger-
|
|
13
|
-
import { F as buildStatusLine, G as readStats$1, I as bundlingActivity, N as activeBuildState, P as buildReport, R as parseActiveBuild, Y as statsProjectKey$1, h as describeMetroLastStop, j as ACTIVE_BUILD_KEY, o as machineNumber, vn as hasMetroReverse, vr as attributeMachineUsage, y as metroLastStop, yr as readFootprints } from "./budget-
|
|
14
|
-
import {
|
|
15
|
-
import { a as createDeviceProcessTables, b as leaseIsExpired, h as tailLines, m as readWebActivity, r as createActivityReader, w as parseWorkspaceLeases, x as listLeaseFiles } from "./activity-
|
|
16
|
-
import {
|
|
17
|
-
import { b as parseSimctlList, f as listAllIosSimsAsync } from "./ios-
|
|
18
|
-
import { f as probeHostedSession } from "./hosted-client-
|
|
19
|
-
import "./hosted-macos-
|
|
20
|
-
import { i as readSupervisorState } from "./stop-
|
|
21
|
-
import { n as maintenanceLines, r as maintenanceStatus } from "./status-
|
|
22
|
-
import { f as mergeState, i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures } from "./warm-progress-
|
|
23
|
-
import { r as workspaceRecordingEnabled } from "./recordings-
|
|
24
|
-
import { d as readIosDevices, s as isReachable } from "./ios-device-
|
|
25
|
-
import { t as triggerMaintenance } from "./trigger-
|
|
26
|
-
import { a as createRefreshScheduler, c as watchStatusSources, n as WATCH_LIGHT_INTERVAL_MS, o as watchChangeKey, r as WATCH_MACHINE_INTERVAL_MS, s as watchPayload, t as WATCH_FALLBACK_MS } from "./status-watch-
|
|
10
|
+
import { c as pidExists, d as resolveProjectMetro, h as isMetroRunning, i as listeningPids, l as processCwd, o as listeningPidsByPort, u as processCwds } from "./metro-DiXtA3Ty.mjs";
|
|
11
|
+
import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state--smjFSTL.mjs";
|
|
12
|
+
import { A as remoteDeviceState, C as environmentState, D as parseDfFree, E as metroReverseTargets, M as tightVolumes, N as unprovisionedWorktrees, O as poolLine, P as withWebFacts, S as diskLine, T as gitSummaryText, _ as addReverseMissingIssue, b as deviceLeaseLines, g as activityLabel, j as statusActivity, k as remoteDeviceLine, r as readEasSessionLedger$1, v as applyMachineMemory, x as deviceLeaseStates, y as capacity } from "./eas-session-ledger-BzzsX97d.mjs";
|
|
13
|
+
import { F as buildStatusLine, G as readStats$1, I as bundlingActivity, N as activeBuildState, P as buildReport, R as parseActiveBuild, Y as statsProjectKey$1, h as describeMetroLastStop, j as ACTIVE_BUILD_KEY, o as machineNumber, vn as hasMetroReverse, vr as attributeMachineUsage, y as metroLastStop, yr as readFootprints } from "./budget-DnPX3DXj.mjs";
|
|
14
|
+
import { h as resolveSupervisorTarget } from "./workspaces-BxzYlo3P.mjs";
|
|
15
|
+
import { a as createDeviceProcessTables, b as leaseIsExpired, h as tailLines, m as readWebActivity, r as createActivityReader, w as parseWorkspaceLeases, x as listLeaseFiles } from "./activity-B5RtpFda.mjs";
|
|
16
|
+
import { A as listAdbDevices, B as ownedAvdDeviceProfile, W as ownedAvdSerialResolver, _t as parkedMaxSetting, dt as POOL_SETTING_REMEDY, vt as readParked } from "./android-C7sVmyI9.mjs";
|
|
17
|
+
import { b as parseSimctlList, f as listAllIosSimsAsync } from "./ios-hcBpnEGk.mjs";
|
|
18
|
+
import { f as probeHostedSession } from "./hosted-client-ByuMMO5s.mjs";
|
|
19
|
+
import "./hosted-macos-DdtYajZt.mjs";
|
|
20
|
+
import { i as readSupervisorState } from "./stop-B2uLQfoM.mjs";
|
|
21
|
+
import { n as maintenanceLines, r as maintenanceStatus } from "./status-BRROykC8.mjs";
|
|
22
|
+
import { f as mergeState, i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures } from "./warm-progress-CA3TgT3-.mjs";
|
|
23
|
+
import { r as workspaceRecordingEnabled } from "./recordings-CQmfzAh7.mjs";
|
|
24
|
+
import { d as readIosDevices, s as isReachable } from "./ios-device-JC3uWM4K.mjs";
|
|
25
|
+
import { t as triggerMaintenance } from "./trigger-Cbyc41d_.mjs";
|
|
26
|
+
import { a as createRefreshScheduler, c as watchStatusSources, n as WATCH_LIGHT_INTERVAL_MS, o as watchChangeKey, r as WATCH_MACHINE_INTERVAL_MS, s as watchPayload, t as WATCH_FALLBACK_MS } from "./status-watch-BIqqbJ6q.mjs";
|
|
27
27
|
import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
|
|
28
28
|
import { createHash, randomUUID } from "node:crypto";
|
|
29
29
|
import { mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -500,7 +500,8 @@ function gitFilesStamp(worktree, refs) {
|
|
|
500
500
|
* default-branch commit stands in, because a merged branch stays merged. A judgement that timed out is not retried
|
|
501
501
|
* for the same HEAD and target for five minutes. With `maxAgeMs`, a summary made that recently in this process is
|
|
502
502
|
* reused while the git files it depends on are unchanged, so a change that is not staged can take up to `maxAgeMs`
|
|
503
|
-
* to show; so is the null of a worktree whose directory is gone.
|
|
503
|
+
* to show; so is the null of a worktree whose directory is gone. Deferred merge verdicts are retried independently
|
|
504
|
+
* of the cached counts without renewing their age.
|
|
504
505
|
*/
|
|
505
506
|
async function readWorktreeGit(worktrees, { skip, maxAgeMs = 0 }) {
|
|
506
507
|
const now = Date.now();
|
|
@@ -518,7 +519,7 @@ async function readWorktreeGit(worktrees, { skip, maxAgeMs = 0 }) {
|
|
|
518
519
|
const files = maxAgeMs > 0 ? gitFilesStamp(worktree, refs) : null;
|
|
519
520
|
if (memo && memo.files !== null && memo.files === files?.stamp && now - memo.at < maxAgeMs) return {
|
|
520
521
|
path: worktree.path,
|
|
521
|
-
memo
|
|
522
|
+
memo
|
|
522
523
|
};
|
|
523
524
|
const repository = worktree.repository;
|
|
524
525
|
if (repository && !targets.has(repository)) targets.set(repository, defaultBranchOf(repository));
|
|
@@ -541,7 +542,16 @@ async function readWorktreeGit(worktrees, { skip, maxAgeMs = 0 }) {
|
|
|
541
542
|
const summaries = /* @__PURE__ */ new Map();
|
|
542
543
|
for (const read of reads) {
|
|
543
544
|
if ("memo" in read) {
|
|
544
|
-
|
|
545
|
+
const memo = read.memo;
|
|
546
|
+
if (memo?.git && memo.pendingMerge) {
|
|
547
|
+
const merge = mergedInto(read.path, memo.pendingMerge.head, memo.pendingMerge.target, budget);
|
|
548
|
+
memo.git = {
|
|
549
|
+
...memo.git,
|
|
550
|
+
mergedInto: merge.into
|
|
551
|
+
};
|
|
552
|
+
if (!merge.deferred) delete memo.pendingMerge;
|
|
553
|
+
}
|
|
554
|
+
summaries.set(read.path, memo?.git ?? null);
|
|
545
555
|
continue;
|
|
546
556
|
}
|
|
547
557
|
if (!read.status) {
|
|
@@ -564,12 +574,16 @@ async function readWorktreeGit(worktrees, { skip, maxAgeMs = 0 }) {
|
|
|
564
574
|
upstream: counts.upstream,
|
|
565
575
|
target: read.target?.ref ?? null
|
|
566
576
|
};
|
|
567
|
-
const settled =
|
|
577
|
+
const settled = refs.upstream === read.refs.upstream && refs.target === read.refs.target;
|
|
568
578
|
recent.set(read.path, {
|
|
569
579
|
at: read.at,
|
|
570
580
|
files: settled ? read.files?.stamp ?? null : null,
|
|
571
581
|
refs,
|
|
572
|
-
git: summary
|
|
582
|
+
git: summary,
|
|
583
|
+
...merge?.deferred && head && read.target ? { pendingMerge: {
|
|
584
|
+
head,
|
|
585
|
+
target: read.target
|
|
586
|
+
} } : {}
|
|
573
587
|
});
|
|
574
588
|
summaries.set(read.path, summary);
|
|
575
589
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { n as easMachineStateRoot } from "./eas-session-ledger-
|
|
4
|
-
import { d as androidToolPath } from "./android-
|
|
5
|
-
import { b as parseSimctlList } from "./ios-
|
|
6
|
-
import { readdirSync, statSync, watch } from "node:fs";
|
|
7
|
-
import { dirname, join } from "node:path";
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { c as pidExists } from "./metro-DiXtA3Ty.mjs";
|
|
3
|
+
import { n as easMachineStateRoot } from "./eas-session-ledger-BzzsX97d.mjs";
|
|
4
|
+
import { d as androidToolPath } from "./android-C7sVmyI9.mjs";
|
|
5
|
+
import { b as parseSimctlList } from "./ios-hcBpnEGk.mjs";
|
|
6
|
+
import { existsSync, readdirSync, statSync, watch } from "node:fs";
|
|
7
|
+
import { basename, dirname, join } from "node:path";
|
|
8
8
|
//#region src/status-watch.ts
|
|
9
9
|
const WATCH_FALLBACK_MS = 3e4;
|
|
10
10
|
const WATCH_LIGHT_INTERVAL_MS = 1e3;
|
|
@@ -131,6 +131,7 @@ function watchStatusSources({ home, deviceSet, onChange, platform = process.plat
|
|
|
131
131
|
[join(home, "device-locks"), "leases"],
|
|
132
132
|
[easMachineStateRoot(), "eas"]
|
|
133
133
|
]);
|
|
134
|
+
if (platform === "darwin") return dirs;
|
|
134
135
|
let names = [];
|
|
135
136
|
try {
|
|
136
137
|
names = readdirSync(join(home, "workspaces"));
|
|
@@ -152,10 +153,25 @@ function watchStatusSources({ home, deviceSet, onChange, platform = process.plat
|
|
|
152
153
|
for (const [dir, kind] of desired) {
|
|
153
154
|
if (watchers.has(dir)) continue;
|
|
154
155
|
try {
|
|
155
|
-
const
|
|
156
|
-
|
|
156
|
+
const recursive = platform === "darwin" && kind === "workspaces";
|
|
157
|
+
const watcher = watch(dir, { recursive }, (_event, name) => {
|
|
158
|
+
let source = kind;
|
|
159
|
+
let filename = name === null ? null : String(name);
|
|
160
|
+
if (recursive && filename !== null) {
|
|
161
|
+
const [, entry, child, ...nested] = filename.split("/");
|
|
162
|
+
if (entry !== void 0) {
|
|
163
|
+
if (entry === "logs" && child !== void 0 && nested.length === 0) {
|
|
164
|
+
source = "logs";
|
|
165
|
+
filename = child;
|
|
166
|
+
} else if (child === void 0) {
|
|
167
|
+
source = "workspace";
|
|
168
|
+
filename = entry;
|
|
169
|
+
} else return;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const change = statusChange(source, filename);
|
|
157
173
|
if (!change) return;
|
|
158
|
-
if (
|
|
174
|
+
if (source === "home" || source === "workspaces" || source === "workspace") {
|
|
159
175
|
listingVersion++;
|
|
160
176
|
reconcile();
|
|
161
177
|
}
|
|
@@ -213,14 +229,24 @@ function watchStatusSources({ home, deviceSet, onChange, platform = process.plat
|
|
|
213
229
|
onChange("full");
|
|
214
230
|
};
|
|
215
231
|
const watchDir = (dir, listener) => {
|
|
216
|
-
if (deviceWatchers.has(dir)) return;
|
|
217
232
|
try {
|
|
218
|
-
const
|
|
233
|
+
const ino = statSync(dir, { bigint: true }).ino;
|
|
234
|
+
const current = deviceWatchers.get(dir);
|
|
235
|
+
if (current?.ino === ino) return;
|
|
236
|
+
current?.watcher.close();
|
|
237
|
+
deviceWatchers.delete(dir);
|
|
238
|
+
const watcher = watch(dir, (_event, name) => {
|
|
239
|
+
if (!stopped && deviceWatchers.get(dir)?.watcher === watcher) listener(name === null ? null : String(name));
|
|
240
|
+
});
|
|
219
241
|
watcher.on("error", () => {
|
|
242
|
+
if (deviceWatchers.get(dir)?.watcher !== watcher) return;
|
|
220
243
|
watcher.close();
|
|
221
244
|
deviceWatchers.delete(dir);
|
|
222
245
|
});
|
|
223
|
-
deviceWatchers.set(dir,
|
|
246
|
+
deviceWatchers.set(dir, {
|
|
247
|
+
watcher,
|
|
248
|
+
ino
|
|
249
|
+
});
|
|
224
250
|
} catch {}
|
|
225
251
|
};
|
|
226
252
|
const watchDeviceSet = () => {
|
|
@@ -232,13 +258,18 @@ function watchStatusSources({ home, deviceSet, onChange, platform = process.plat
|
|
|
232
258
|
const wanted = /* @__PURE__ */ new Set();
|
|
233
259
|
if (names) {
|
|
234
260
|
wanted.add(deviceSet);
|
|
235
|
-
for (const name of names)
|
|
261
|
+
for (const name of names) {
|
|
262
|
+
if (!SIMULATOR_DIR.test(name)) continue;
|
|
263
|
+
const dir = join(deviceSet, name);
|
|
264
|
+
const plist = join(dir, "device.plist");
|
|
265
|
+
wanted.add(existsSync(plist) ? plist : dir);
|
|
266
|
+
}
|
|
236
267
|
} else {
|
|
237
268
|
let dir = dirname(deviceSet);
|
|
238
269
|
while (dirname(dir) !== dir && !isDirectory(dir)) dir = dirname(dir);
|
|
239
270
|
wanted.add(dir);
|
|
240
271
|
}
|
|
241
|
-
for (const [dir, watcher] of deviceWatchers) {
|
|
272
|
+
for (const [dir, { watcher }] of deviceWatchers) {
|
|
242
273
|
if (wanted.has(dir)) continue;
|
|
243
274
|
watcher.close();
|
|
244
275
|
deviceWatchers.delete(dir);
|
|
@@ -247,6 +278,7 @@ function watchStatusSources({ home, deviceSet, onChange, platform = process.plat
|
|
|
247
278
|
watchDeviceSet();
|
|
248
279
|
changed();
|
|
249
280
|
});
|
|
281
|
+
else if (basename(dir) === "device.plist") watchDir(dir, changed);
|
|
250
282
|
else if (dirname(dir) === deviceSet) watchDir(dir, (name) => {
|
|
251
283
|
if (name === null || name === "device.plist") changed();
|
|
252
284
|
});
|
|
@@ -317,7 +349,7 @@ function watchStatusSources({ home, deviceSet, onChange, platform = process.plat
|
|
|
317
349
|
repositories.clear();
|
|
318
350
|
clearInterval(processTimer);
|
|
319
351
|
if (simTimer) clearInterval(simTimer);
|
|
320
|
-
for (const watcher of deviceWatchers.values()) watcher.close();
|
|
352
|
+
for (const { watcher } of deviceWatchers.values()) watcher.close();
|
|
321
353
|
deviceWatchers.clear();
|
|
322
354
|
simctl?.kill("SIGKILL");
|
|
323
355
|
adb.stop();
|
package/dist/status-worker.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { C as saveConfig, c as ensureConfig } from "./config-
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { C as saveConfig, c as ensureConfig } from "./config-DlrsduwG.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { workspaceId } from "@stim-cli/core";
|
|
5
5
|
import { readHomeIdentity, withConfigLockAsync } from "@stim-cli/core/state";
|
|
@@ -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 { h as resolveSupervisorTarget } from "./workspaces-BxzYlo3P.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-B2uLQfoM.mjs";
|
|
3
3
|
export { clearCollectorState, clearSupervisorState, stopCommand as default, readCollectorState, readSupervisorState, resolveCollectorTargets, resolveSupervisorTarget, runStop, stopWorkspaceNow };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as debugLog, g as process_identity_exports, i as withWorkspaceProcessLock, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { E as upsertProject, G as
|
|
4
|
-
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-
|
|
5
|
-
import { c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-
|
|
6
|
-
import { A as clearWorkspaceLaunches, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, j as clearWorkspaceSupervisor, k as clearRemoteSession, n as findCommandWorkspace } from "./project-
|
|
7
|
-
import { t as macosAppPresent } from "./state-
|
|
8
|
-
import {
|
|
9
|
-
import { S as withdrawDevServerStopRequest, b as requestDevServerStop, qn as resolveEasCliBin, v as logVanishedSupervisor, zt as endRecordedSession } from "./budget-
|
|
10
|
-
import { a as decideStopAction, c as nativeRunWaitNotice, i as clearNativeRunCancel, l as requestNativeRunCancel, n as NATIVE_RUN_WAIT_MS, o as describeNativeRunHolder, s as nativeRunHolder, t as NATIVE_RUN_LOCK } from "./native-run-
|
|
11
|
-
import { D as
|
|
12
|
-
import { O as releaseWorkspaceLeasesAsync, y as fileLeaseIo } from "./activity-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import { n as verifyCollectorOwnership } from "./ownership-DEmM5vhh.mjs";
|
|
3
|
+
import { E as upsertProject, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, U as parseDeviceSlotKey, W as parseDeviceSlotOption, o as clearSupervisor, p as getProject, q as validateDeviceSlot } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-Db8BqzxH.mjs";
|
|
5
|
+
import { c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-U08dEzhG.mjs";
|
|
6
|
+
import { A as clearWorkspaceLaunches, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, j as clearWorkspaceSupervisor, k as clearRemoteSession, n as findCommandWorkspace } from "./project-CTLNHCfE.mjs";
|
|
7
|
+
import { t as macosAppPresent } from "./state-08I3hw3_.mjs";
|
|
8
|
+
import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, p as signalProcessTreeAsync, r as killMetroTreeAsync, u as processCwds } from "./metro-DiXtA3Ty.mjs";
|
|
9
|
+
import { S as withdrawDevServerStopRequest, b as requestDevServerStop, qn as resolveEasCliBin, v as logVanishedSupervisor, zt as endRecordedSession } from "./budget-DnPX3DXj.mjs";
|
|
10
|
+
import { a as decideStopAction, c as nativeRunWaitNotice, i as clearNativeRunCancel, l as requestNativeRunCancel, n as NATIVE_RUN_WAIT_MS, o as describeNativeRunHolder, s as nativeRunHolder, t as NATIVE_RUN_LOCK } from "./native-run-BUTu8T7A.mjs";
|
|
11
|
+
import { D as teardownOwnedAvd, O as teardownOwnedBrowser, _ as stopTunnel, h as resolveSupervisorTarget, k as teardownOwnedIosSim } from "./workspaces-BxzYlo3P.mjs";
|
|
12
|
+
import { O as releaseWorkspaceLeasesAsync, y as fileLeaseIo } from "./activity-B5RtpFda.mjs";
|
|
13
|
+
import { i as stopHostedAndroid } from "./hosted-android-CkclQig_.mjs";
|
|
14
|
+
import { r as stopHostedIos } from "./hosted-ios-DtYHeuYR.mjs";
|
|
15
|
+
import { n as stopMacosApp } from "./stop-DzLJc7Ei.mjs";
|
|
16
|
+
import { n as verifyCollectorOwnership } from "./ownership-C5fo5Edb.mjs";
|
|
18
17
|
import { hostedAndroidDeviceName, hostedAndroidRecords, hostedIosRecords, hostedNativeRecords, isJsonObject, parseHostedNativePlacement } from "@stim-cli/core/state";
|
|
19
18
|
import chalk from "chalk";
|
|
20
19
|
//#region src/commands/stop.ts
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as process_identity_exports, i as withWorkspaceProcessLock, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { d as writeWorkspaceState, l as withWorkspaceStateLockAsync } from "./workspace-state-
|
|
4
|
-
import { a as macosRuntimeClaim, o as requiredMacosRecord } from "./state-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as stopHostedMacos } from "./hosted-macos-QI141yKk.mjs";
|
|
3
|
+
import { d as writeWorkspaceState, l as withWorkspaceStateLockAsync } from "./workspace-state-U08dEzhG.mjs";
|
|
4
|
+
import { a as macosRuntimeClaim, o as requiredMacosRecord } from "./state-08I3hw3_.mjs";
|
|
5
|
+
import { C as runningBundleInstancesAsync } from "./workspaces-BxzYlo3P.mjs";
|
|
6
|
+
import { n as stopHostedMacos } from "./hosted-macos-DdtYajZt.mjs";
|
|
8
7
|
import { readMacosRecord } from "@stim-cli/core/state";
|
|
9
8
|
//#region src/macos/stop.ts
|
|
10
9
|
const APP_EXIT_MS = 5e3;
|
|
@@ -16,57 +15,67 @@ function signal(pid, name) {
|
|
|
16
15
|
if (error.code !== "ESRCH") throw error;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
async function stopProcesses(records, waitMs = APP_EXIT_MS) {
|
|
18
|
+
async function stopProcesses(records, waitMs = APP_EXIT_MS, operation) {
|
|
20
19
|
let live = [...new Map(records.map((record) => [record.pid, record])).values()];
|
|
21
20
|
for (const name of ["SIGTERM", "SIGKILL"]) {
|
|
21
|
+
operation?.signal.throwIfAborted();
|
|
22
22
|
live = live.filter((record) => {
|
|
23
23
|
const identity = (0, process_identity_exports.inspectProcessIdentity)(record);
|
|
24
24
|
if (identity === "gone" || identity === "different") return false;
|
|
25
25
|
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" });
|
|
26
26
|
return true;
|
|
27
27
|
});
|
|
28
|
-
for (const record of live)
|
|
29
|
-
|
|
28
|
+
for (const record of live) {
|
|
29
|
+
operation?.signal.throwIfAborted();
|
|
30
|
+
signal(record.pid, name);
|
|
31
|
+
}
|
|
32
|
+
const exited = await Promise.all(live.map((record) => (0, process_identity_exports.waitForProcessExit)(record, waitMs, operation?.signal)));
|
|
30
33
|
live = live.filter((_, index) => !exited[index]);
|
|
31
34
|
if (!live.length) return;
|
|
32
35
|
}
|
|
33
36
|
throw new Error(`Owned macOS process ${live.map((record) => record.pid).join(", ")} did not exit.`);
|
|
34
37
|
}
|
|
35
38
|
/** Stops every running copy of the workspace's owned app bundle, including copies LaunchServices started. */
|
|
36
|
-
async function stopBundleInstances(root) {
|
|
37
|
-
const instances = await runningBundleInstancesAsync(root);
|
|
38
|
-
await stopProcesses(instances);
|
|
39
|
+
async function stopBundleInstances(root, operation) {
|
|
40
|
+
const instances = await runningBundleInstancesAsync(root, operation);
|
|
41
|
+
await stopProcesses(instances, void 0, operation);
|
|
39
42
|
return instances.length > 0;
|
|
40
43
|
}
|
|
41
|
-
async function stopMacosAppHeld(root) {
|
|
44
|
+
async function stopMacosAppHeld(root, operation) {
|
|
45
|
+
operation?.signal.throwIfAborted();
|
|
42
46
|
const record = requiredMacosRecord(root);
|
|
43
|
-
if (record?.supervisor) await stopProcesses([record.supervisor], SUPERVISOR_EXIT_MS);
|
|
47
|
+
if (record?.supervisor) await stopProcesses([record.supervisor], SUPERVISOR_EXIT_MS, operation);
|
|
44
48
|
const app = readMacosRecord(root)?.app ?? record?.app;
|
|
45
|
-
if (app) await stopProcesses([app]);
|
|
46
|
-
const instances = await runningBundleInstancesAsync(root);
|
|
47
|
-
await stopProcesses(instances);
|
|
49
|
+
if (app) await stopProcesses([app], void 0, operation);
|
|
50
|
+
const instances = await runningBundleInstancesAsync(root, operation);
|
|
51
|
+
await stopProcesses(instances, void 0, operation);
|
|
52
|
+
operation?.signal.throwIfAborted();
|
|
48
53
|
if (!record) return instances.length > 0;
|
|
49
54
|
const claims = (0, ownership_claim_exports.readClaimSet)(macosRuntimeClaim(root));
|
|
50
55
|
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" });
|
|
51
56
|
return true;
|
|
52
57
|
}
|
|
53
58
|
/** Stops the workspace's app here, or its session on the hosting Mac, which must confirm the session stopped. */
|
|
54
|
-
function stopMacosApp(root) {
|
|
59
|
+
function stopMacosApp(root, operation) {
|
|
55
60
|
const stop = async () => {
|
|
61
|
+
operation?.signal.throwIfAborted();
|
|
56
62
|
const record = requiredMacosRecord(root);
|
|
57
|
-
if (!record?.host) return stopMacosAppHeld(root);
|
|
58
|
-
await stopHostedMacos(root, record.host);
|
|
63
|
+
if (!record?.host) return stopMacosAppHeld(root, operation);
|
|
64
|
+
await stopHostedMacos(root, record.host, operation?.signal);
|
|
65
|
+
operation?.signal.throwIfAborted();
|
|
59
66
|
const { host: _host, hostLaunched: _launched, ...stopped } = record;
|
|
60
67
|
await withWorkspaceStateLockAsync(root, () => writeWorkspaceState(root, { macos: {
|
|
61
68
|
...stopped,
|
|
62
69
|
supervisor: void 0
|
|
63
|
-
} }));
|
|
70
|
+
} }), operation?.signal);
|
|
64
71
|
return true;
|
|
65
72
|
};
|
|
66
73
|
return withWorkspaceProcessLock(workspaceDir(root), "macos-launch", stop, {
|
|
67
74
|
external: true,
|
|
68
75
|
waitMs: 0,
|
|
69
|
-
ownerPurpose: "stop macOS app"
|
|
76
|
+
ownerPurpose: "stop macOS app",
|
|
77
|
+
signal: operation?.signal,
|
|
78
|
+
declareSpawnsFor: operation
|
|
70
79
|
});
|
|
71
80
|
}
|
|
72
81
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as NdjsonWriter } from "./exec-
|
|
3
|
-
import { n as OwnedDeviceActivity } from "./idle-
|
|
1
|
+
import { c as readPidFile, i as MODE_EXPO, l as writePidFile, n as SettingsObject, o as clearExpoMetroTunnel, r as MODE_BARE, s as clearWorkspaceSupervisor } from "./ios-CDvlmUs7.mjs";
|
|
2
|
+
import { n as NdjsonWriter } from "./exec-DnYc4HGH.mjs";
|
|
3
|
+
import { n as OwnedDeviceActivity } from "./idle-C4cZ757K.mjs";
|
|
4
4
|
import { DevServerStopRecord, DeviceIdleShutdownRecord } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/watchman.d.ts
|
|
6
6
|
type WatchmanCommand = (args: string[], timeoutMs: number) => Promise<unknown>;
|