stim 1.25.0 → 1.27.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 +1 -1
- package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-BbHS3oV8.mjs → act-ROviTF_t.mjs} +415 -118
- package/dist/{activity-BpjwrQXU.mjs → activity-Cd-ysFes.mjs} +6 -7
- package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CNZgRC-4.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-BGwuK3Mc.mjs → android-Cd6w7_qw.mjs} +134 -57
- package/dist/{android-saBeB4lr.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-Cjcj8MCw.mjs → android-DriNoAVy.mjs} +99 -47
- package/dist/{android-cas-BVqh2Zep.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
- package/dist/api.d.mts +20 -7
- package/dist/api.mjs +42 -32
- package/dist/apk-signed-tail-BHQHx3Rm.mjs +142 -0
- package/dist/{artifact-Co8zixVx.mjs → artifact-0AGJYB9O.mjs} +28 -28
- package/dist/{artifact-DN8JNwqS.mjs → artifact-faemIZv5.mjs} +40 -30
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-CCgZsHmI.mjs → browser-web-slD8AvLp.mjs} +16 -17
- package/dist/{build-cache-CKCzxzxA.mjs → build-cache-gBJ-WKzA.mjs} +141 -37
- package/dist/{build-CAiw8Ezm.mjs → build-hS0QyFlQ.mjs} +38 -31
- package/dist/{build-plan-zCuHGlA8.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-HyShrIpL.mjs → ccache-BWTze1Ls.mjs} +634 -1514
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-C4w607Pz.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-BQsmyp_-.mjs → client-xsdxrhWA.mjs} +77 -116
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BBvS1H6v.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-Cn94Jc0g.mjs} +343 -18
- package/dist/{launch-DscF1QfM.mjs → dependencies-BGokZ-Ng.mjs} +330 -279
- package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-CHoXXZeg.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-F5-4z9ef.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-6LP7QsaA.mjs} +103 -25
- package/dist/device-host-worker.mjs +19 -21
- package/dist/{device-ios-DkHBrmvH.mjs → device-ios-534c14fz.mjs} +288 -28
- package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-BIg8MU8l.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-B9FqTBYW.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-A_Nr_fDe.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-k3P3PizH.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-Bm8TVpGn.mjs → doctor-F-3VUUyN.mjs} +128 -35
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +9 -3
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-CyDKNTBP.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-eaz403W6.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-B9jcnmIk.mjs → gc-CGZ1Yg88.mjs} +218 -72
- package/dist/{guide-DR0K0xW9.mjs → guide-_rfEh_zM.mjs} +839 -222
- package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-D7Pk_Oo1.mjs} +13 -9
- package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-B1gqQuva.mjs} +18 -12
- package/dist/hosted-logs-sync-Dg3qrZmV.mjs +195 -0
- package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CdgaiuyP.mjs} +17 -17
- package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-Cbvo5KEh.mjs} +21 -9
- package/dist/{ios-BRVM8b0P.mjs → ios-B5HlVMhQ.mjs} +138 -55
- package/dist/{ios-Dvt97HgQ.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-BQzvJlzw.mjs → ios-E26qSpkb.mjs} +94 -11
- package/dist/{ios-device-CKSvk0bu.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-DCUDo06I.mjs → ios-project-D8Jcy_br.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-CT9nV5SP.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-D0lPvFFu.mjs → launch-CRyBeNsA.mjs} +53 -44
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-BsIRre8x.mjs → logs-CC_-ZzEE.mjs} +10 -174
- package/dist/{logs-Crs9y34Z.mjs → logs-aJQb-RDg.mjs} +112 -38
- package/dist/{macos-CcUlJPMu.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-D477nfzH.mjs → macos-DlCBhMw5.mjs} +73 -39
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +30 -13
- package/dist/{metro-1pJgCX4U.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-BnHdqMO_.mjs} +3 -4
- package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-BvMizJn1.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-DqaIBO5w.mjs} +9 -9
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -18
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.d.mts +3 -1
- package/dist/offload-worker.mjs +34 -25
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-jxxz-19m.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DjOXJRIH.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-DtS1Amb0.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/prebuild-BDpToDgR.mjs +1246 -0
- package/dist/{project-BiC68mIp.mjs → project-DYj-HVx6.mjs} +17 -18
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-DDBccgJw.mjs} +56 -36
- package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-B-Mw6DcR.mjs} +50 -9
- package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-DjYwUF9U.mjs} +45 -25
- package/dist/{recordings-BaoQ0t-J.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-Beftw2X3.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-FbSgMF8x.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-BuZj6AyU.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-CR2vk2cj.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BtzE09Dl.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-D5cxEl3t.mjs → selection-Bs8phwhN.mjs} +183 -62
- package/dist/{server-bare-CH9X0RLn.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CaBbDNU2.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-Ck8EIidM.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-B5tCoq9N.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-DzH9mGQZ.mjs → settings-CMHhQNwI.mjs} +24 -3
- package/dist/settings-payload-cm60Zhib.mjs +257 -0
- package/dist/settings-write-BdNRLlBn.mjs +185 -0
- package/dist/settings.schema.json +84 -39
- package/dist/{simslim-BjxszUAb.mjs → simslim-DCQwzoPy.mjs} +4 -3
- package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-D8xlRU2D.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C1JLjkNw.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-YMpNwLhh.mjs → start-DrPwER_2.mjs} +27 -23
- package/dist/{state-DMRNP7-4.mjs → state-BX1y5syV.mjs} +4 -5
- package/dist/{state-DPaM3u5K.mjs → state-CZxLyetD.mjs} +2 -3
- package/dist/{stats-CP7STzZw.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-CRLiJ-O_.mjs → status-BfnK9pUd.mjs} +25 -26
- package/dist/{status-cNw6i0_t.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-COP6PQqw.mjs → stop-CH79S3IZ.mjs} +5 -6
- package/dist/{stop-Db9Kh-UA.mjs → stop-D-EAr25B.mjs} +25 -22
- package/dist/{stop-Br7LKxBE.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +17 -18
- package/dist/{support-qKcbgmI5.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-Cxj9CmII.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/toolchain-CbCG6C5Z.mjs +2413 -0
- package/dist/toolchain-JYAOquPg.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-DMou-X7j.mjs} +3 -3
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-C0RsbngN.mjs} +731 -728
- package/dist/{web-B4Yjyt1G.mjs → web-Cq_AQ4DK.mjs} +9 -10
- package/dist/web-Je6abcpz.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-BjqdjnJR.mjs} +46 -8
- package/dist/{workspaces-C9w4aeXF.mjs → workspaces-DFbj07jp.mjs} +1801 -76
- package/dist/{worktree-CclFIe1Z.mjs → worktree-COAJ3-OD.mjs} +934 -511
- package/dist/{worktree-Ct9Gk3KL.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +8 -8
- package/dist/ccache-h1FKhZeg.mjs +0 -143
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/eas-fallback-gaZi-dJL.mjs +0 -381
- package/dist/hosted-ios-RtVcJH3u.mjs +0 -15
- package/dist/native-run-D5OJsGwA.mjs +0 -276
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-JUaqOLpc.mjs +0 -501
- package/dist/server-expo-C16Zf2k7.mjs +0 -2
- package/dist/settings-write-n0zwfohx.mjs +0 -360
- package/dist/toolchain-DB1aeqxO.mjs +0 -2
- package/dist/toolchain-VzLJzZ7O.mjs +0 -908
- package/dist/trigger-BLsHgAGR.mjs +0 -2
- package/dist/web-DS4UDWvf.mjs +0 -2
- package/dist/xcode-CiIIDnuD.mjs +0 -910
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as throwIfCancelled } from "./exec-
|
|
2
|
-
import { c as call, l as connectHost } from "./hosted-client-
|
|
3
|
-
import { i as requestHostedMetro } from "./metro-gateway-
|
|
4
|
-
import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-
|
|
1
|
+
import { c as throwIfCancelled } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { c as call, l as connectHost } from "./hosted-client-D7Pk_Oo1.mjs";
|
|
3
|
+
import { i as requestHostedMetro } from "./metro-gateway-BnHdqMO_.mjs";
|
|
4
|
+
import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-CdgaiuyP.mjs";
|
|
5
5
|
//#region src/device-host/hosted-android.ts
|
|
6
6
|
async function prepareHostedAndroid(machine, selectors, recorded, mode) {
|
|
7
7
|
return await prepareHostedNative(machine, selectors, recorded, "android", false, mode);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as throwIfCancelled, o as cancellableSleep } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { t as BuildConnection } from "./client-
|
|
4
|
-
import {
|
|
1
|
+
import { c as throwIfCancelled, o as cancellableSleep } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { Y as diagnoseConnectFailure, ot as resolveEndpoint } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { t as BuildConnection } from "./client-xsdxrhWA.mjs";
|
|
4
|
+
import { g as configuredMachines } from "./selection-Bs8phwhN.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { lstatSync, readFileSync, readdirSync, readlinkSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
@@ -50,14 +50,18 @@ async function connectHost(machine, timeoutMs = CONNECT_TIMEOUT_MS, strict = fal
|
|
|
50
50
|
signal?.throwIfAborted();
|
|
51
51
|
if (typeof target === "string") throw Object.assign(/* @__PURE__ */ new Error(`Stim does not connect to ${machine}: ${target}.`), { code: "STIM_HOSTING_REFUSED" });
|
|
52
52
|
const opened = await BuildConnection.open(target, credential.serverKey, timeoutMs, "device-host", signal).catch((error) => {
|
|
53
|
-
throw Object.assign(new Error(`${machine} is unreachable.
|
|
53
|
+
throw Object.assign(new Error(`${machine} is unreachable. Run stim doctor to see which layer failed.`, { cause: error }), { code: strict ? "STIM_HOSTING_REFUSED" : "closed" });
|
|
54
54
|
});
|
|
55
55
|
if (signal?.aborted && opened instanceof BuildConnection) opened.close();
|
|
56
56
|
signal?.throwIfAborted();
|
|
57
|
-
if (!(opened instanceof BuildConnection))
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
if (!(opened instanceof BuildConnection)) {
|
|
58
|
+
const diagnosis = opened.refused || opened.code === "server-outdated" ? null : await diagnoseConnectFailure(machine, opened, signal);
|
|
59
|
+
throw Object.assign(new Error(opened.code === "server-outdated" ? `${machine} runs a stim-server that speaks an older protocol than this Stim. Run stim doctor for the command that updates it there, then retry.` : opened.refused ? `${machine} refused this machine: ${opened.failure.replace(/\.+$/, "")}. Run stim doctor.` : diagnosis?.message ?? `${machine} is unreachable: ${opened.failure}. Run stim doctor to see which layer failed.`), {
|
|
60
|
+
code: strict ? "STIM_HOSTING_REFUSED" : opened.refused ? "STIM_HOSTING_REFUSED" : opened.code ?? "closed",
|
|
61
|
+
hostCode: opened.code,
|
|
62
|
+
...diagnosis ? { remedy: diagnosis.remedy } : {}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
61
65
|
return {
|
|
62
66
|
machine,
|
|
63
67
|
credential,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { B as deviceSlotFileKey,
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import { n as macosDir } from "./state-
|
|
6
|
-
import { n as androidLogGroups, r as isAndroidCrashText } from "./android-
|
|
7
|
-
import {
|
|
8
|
-
import { c as call } from "./hosted-client-
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { E as workspaceDir, k as workspaceLogsDir$1 } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { B as deviceSlotFileKey, q as validateDeviceSlot, rt as parseMachine$1 } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { n as macosDir } from "./state-CZxLyetD.mjs";
|
|
6
|
+
import { n as androidLogGroups, r as isAndroidCrashText } from "./android-Deb9X3_Y.mjs";
|
|
7
|
+
import { c as readNdjsonGenerations$1, i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
8
|
+
import { c as call } from "./hosted-client-D7Pk_Oo1.mjs";
|
|
9
9
|
import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
import { LOG_ROTATE_BYTES, ambientWrite, withDirLockAsync } from "@stim-cli/core";
|
|
@@ -205,10 +205,10 @@ async function pullHostedMacosLogs(root, placement, host, target = MACOS, maxPag
|
|
|
205
205
|
if (!isJsonObject(result) || !cursor || !Array.isArray(result.records) || !result.records.every(isJsonObject) || typeof result.more !== "boolean") throw new Error(`${host.machine} answered device-host.logs.query with an unexpected result.`);
|
|
206
206
|
signal?.throwIfAborted();
|
|
207
207
|
await commitPage(root, placement.session, before, result.records, cursor, target);
|
|
208
|
-
if (!result.more) return;
|
|
209
208
|
const nextCheckpoint = typeof result.checkpoint === "number" ? result.checkpoint : void 0;
|
|
209
|
+
if (!result.more) return nextCheckpoint;
|
|
210
210
|
if (sameCursor(cursor, before) && nextCheckpoint === checkpoint) {
|
|
211
|
-
if (target.platform === "macos" && !final) return;
|
|
211
|
+
if (target.platform === "macos" && !final) return void 0;
|
|
212
212
|
throw new Error("Hosted native logs made no progress; keeping the logs already copied here.");
|
|
213
213
|
}
|
|
214
214
|
checkpoint = nextCheckpoint;
|
|
@@ -217,10 +217,16 @@ async function pullHostedMacosLogs(root, placement, host, target = MACOS, maxPag
|
|
|
217
217
|
}
|
|
218
218
|
async function pullHostedNativeLogs(root, slot, placement, host, final = false, platform = "ios", signal) {
|
|
219
219
|
if (!host.connection.supports(platform === "ios" ? "hosted-ios-data" : "hosted-android-data")) throw new Error(`${host.machine} needs a newer stim-server to collect hosted ${platform === "ios" ? "iOS" : "Android"} native logs.`);
|
|
220
|
-
await pullHostedMacosLogs(root, placement, host, {
|
|
220
|
+
return await pullHostedMacosLogs(root, placement, host, {
|
|
221
221
|
platform,
|
|
222
222
|
slot
|
|
223
223
|
}, final ? 1024 : MAX_PAGES, final, signal);
|
|
224
224
|
}
|
|
225
|
+
function readHostedNativeLogs(root, platform, slot) {
|
|
226
|
+
return readNdjsonGenerations$1(hostLogFile(root, {
|
|
227
|
+
platform,
|
|
228
|
+
slot
|
|
229
|
+
}));
|
|
230
|
+
}
|
|
225
231
|
//#endregion
|
|
226
|
-
export {
|
|
232
|
+
export { agentAccess as a, closeAgentConnection as i, pullHostedNativeLogs as n, removeAgentAccess as o, readHostedNativeLogs as r, pullHostedMacosLogs as t };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { n as pullHostedNativeLogs, r as readHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-B1gqQuva.mjs";
|
|
2
|
+
import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
3
|
+
import { l as connectHost } from "./hosted-client-D7Pk_Oo1.mjs";
|
|
4
|
+
import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-BZ03NFgF.mjs";
|
|
5
|
+
import "./hosted-macos-B9w4H8hc.mjs";
|
|
6
|
+
import { watch } from "node:fs";
|
|
7
|
+
import { dirname, relative, resolve, sep } from "node:path";
|
|
8
|
+
import { ambientWrite, configDir } from "@stim-cli/core";
|
|
9
|
+
import { readMacosRecord, workspaceStateFile } from "@stim-cli/core/state";
|
|
10
|
+
//#region src/device-host/hosted-logs-sync.ts
|
|
11
|
+
const WATCH_RECHECK_MS = 100;
|
|
12
|
+
function warn(context, machine, error) {
|
|
13
|
+
const text = `${warning(machine, error)}\n`;
|
|
14
|
+
if (context) context.output("stderr", text);
|
|
15
|
+
else ambientWrite("stderr", text);
|
|
16
|
+
}
|
|
17
|
+
function warning(machine, error) {
|
|
18
|
+
const message = error.message.replace(/\.$/, "");
|
|
19
|
+
const hint = message.includes("refused device-host.logs.query") ? ` If ${machine} runs an older stim-server, update it.` : "";
|
|
20
|
+
return phaseLine("device", `Could not read the app's logs from ${machine}: ${message}. Showing the logs already copied here.${hint}`);
|
|
21
|
+
}
|
|
22
|
+
async function syncHostedMacosLogs(root, placement, slot, warnings, platform = "ios", context) {
|
|
23
|
+
let host;
|
|
24
|
+
const cancel = () => host?.connection.close();
|
|
25
|
+
context?.signal.addEventListener("abort", cancel, { once: true });
|
|
26
|
+
try {
|
|
27
|
+
host = await connectHost(placement.machine, void 0, false, context?.signal);
|
|
28
|
+
if (slot !== void 0) await pullHostedNativeLogs(root, slot, placement, host, false, platform, context?.signal);
|
|
29
|
+
else await pullHostedMacosLogs(root, placement, host, void 0, void 0, false, context?.signal);
|
|
30
|
+
return true;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
context?.signal.throwIfAborted();
|
|
33
|
+
if (!warnings?.has(placement.machine)) {
|
|
34
|
+
warn(context, placement.machine, error);
|
|
35
|
+
warnings?.add(placement.machine);
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
} finally {
|
|
39
|
+
context?.signal.removeEventListener("abort", cancel);
|
|
40
|
+
host?.connection.close();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function followHostedMacosLogs(root, { failing = false, intervalMs = 500, retryMs = 5e3, slot, platform = "ios", context, onPulled, onFailed } = {}) {
|
|
44
|
+
let host;
|
|
45
|
+
const controller = new AbortController();
|
|
46
|
+
const signal = context ? AbortSignal.any([context.signal, controller.signal]) : controller.signal;
|
|
47
|
+
const cancel = () => host?.connection.close();
|
|
48
|
+
signal.addEventListener("abort", cancel, { once: true });
|
|
49
|
+
let retryAt = 0;
|
|
50
|
+
let stopped = false;
|
|
51
|
+
let running = false;
|
|
52
|
+
const tick = async () => {
|
|
53
|
+
if (running || stopped || signal.aborted || Date.now() < retryAt) return;
|
|
54
|
+
running = true;
|
|
55
|
+
try {
|
|
56
|
+
const placement = slot !== void 0 ? (platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))[slot] : readMacosRecord(root)?.host;
|
|
57
|
+
if (!placement) {
|
|
58
|
+
host?.connection.close();
|
|
59
|
+
host = void 0;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
host ??= await connectHost(placement.machine, void 0, false, signal);
|
|
63
|
+
const through = slot !== void 0 ? await pullHostedNativeLogs(root, slot, placement, host, false, platform, signal) : await pullHostedMacosLogs(root, placement, host, void 0, void 0, false, signal);
|
|
64
|
+
failing = false;
|
|
65
|
+
onPulled?.(through);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
host?.connection.close();
|
|
68
|
+
host = void 0;
|
|
69
|
+
if (signal.aborted) return;
|
|
70
|
+
onFailed?.();
|
|
71
|
+
if (!failing) warn(context, (slot !== void 0 ? (platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))[slot] : readMacosRecord(root)?.host)?.machine ?? "the host", error);
|
|
72
|
+
failing = true;
|
|
73
|
+
retryAt = Date.now() + retryMs;
|
|
74
|
+
} finally {
|
|
75
|
+
running = false;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const timer = setInterval(() => void tick(), intervalMs);
|
|
79
|
+
return () => {
|
|
80
|
+
stopped = true;
|
|
81
|
+
controller.abort();
|
|
82
|
+
signal.removeEventListener("abort", cancel);
|
|
83
|
+
clearInterval(timer);
|
|
84
|
+
host?.connection.close();
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** Copies a hosted slot's native logs while its launch is verified; a failed copy stops holding the launch windows. */
|
|
88
|
+
function followHostedLaunchLogs(root, slot, platform, since, context) {
|
|
89
|
+
let through = null;
|
|
90
|
+
let failed = false;
|
|
91
|
+
const stop = followHostedMacosLogs(root, {
|
|
92
|
+
slot,
|
|
93
|
+
platform,
|
|
94
|
+
context,
|
|
95
|
+
onPulled: (covered) => {
|
|
96
|
+
failed = false;
|
|
97
|
+
if (covered !== void 0) through = Math.max(through ?? covered, covered);
|
|
98
|
+
},
|
|
99
|
+
onFailed: () => {
|
|
100
|
+
failed = true;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const records = () => readHostedNativeLogs(root, platform, slot);
|
|
104
|
+
return {
|
|
105
|
+
readDeviceRecords: records,
|
|
106
|
+
readNativeCrashes: () => records().filter((record) => record.event === "native_crash" && Number(record.ts) >= since),
|
|
107
|
+
deviceLogsThrough: () => failed ? Number.POSITIVE_INFINITY : through,
|
|
108
|
+
stop
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
async function syncHostedLogs(root, context) {
|
|
112
|
+
const macos = readMacosRecord(root)?.host;
|
|
113
|
+
const warnings = /* @__PURE__ */ new Set();
|
|
114
|
+
return (await Promise.all([
|
|
115
|
+
...macos ? [syncHostedMacosLogs(root, macos, void 0, warnings, "ios", context)] : [],
|
|
116
|
+
...Object.entries(readHostedIos(root)).map(([slot, placement]) => syncHostedMacosLogs(root, placement, slot, warnings, "ios", context)),
|
|
117
|
+
...Object.entries(readHostedAndroid(root)).map(([slot, placement]) => syncHostedMacosLogs(root, placement, slot, warnings, "android", context))
|
|
118
|
+
])).every(Boolean);
|
|
119
|
+
}
|
|
120
|
+
function followHostedLogs(root, failing, context) {
|
|
121
|
+
const stops = /* @__PURE__ */ new Map();
|
|
122
|
+
let closed = false;
|
|
123
|
+
const refresh = () => {
|
|
124
|
+
if (closed) return;
|
|
125
|
+
const active = /* @__PURE__ */ new Set();
|
|
126
|
+
if (readMacosRecord(root)?.host) {
|
|
127
|
+
active.add("macos");
|
|
128
|
+
if (!stops.has("macos")) stops.set("macos", followHostedMacosLogs(root, {
|
|
129
|
+
failing,
|
|
130
|
+
context
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
for (const platform of ["ios", "android"]) for (const slot of Object.keys(platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))) {
|
|
134
|
+
const key = `${platform}:${slot}`;
|
|
135
|
+
active.add(key);
|
|
136
|
+
if (!stops.has(key)) stops.set(key, followHostedMacosLogs(root, {
|
|
137
|
+
failing,
|
|
138
|
+
slot,
|
|
139
|
+
platform,
|
|
140
|
+
context
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
for (const [key, stop] of stops) {
|
|
144
|
+
if (active.has(key)) continue;
|
|
145
|
+
stop();
|
|
146
|
+
stops.delete(key);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const stateFile = workspaceStateFile(root);
|
|
150
|
+
const home = resolve(configDir());
|
|
151
|
+
let watcher = null;
|
|
152
|
+
let recheck;
|
|
153
|
+
const observe = () => {
|
|
154
|
+
if (closed) return;
|
|
155
|
+
watcher?.close();
|
|
156
|
+
watcher = null;
|
|
157
|
+
clearTimeout(recheck);
|
|
158
|
+
let directory = dirname(stateFile);
|
|
159
|
+
for (;;) try {
|
|
160
|
+
const entry = relative(directory, stateFile).split(sep)[0];
|
|
161
|
+
const next = watch(directory, (_event, name) => {
|
|
162
|
+
if (name !== null && name.toString() !== entry) return;
|
|
163
|
+
if (directory !== dirname(stateFile)) observe();
|
|
164
|
+
refresh();
|
|
165
|
+
});
|
|
166
|
+
next.on("error", () => {
|
|
167
|
+
next.close();
|
|
168
|
+
if (watcher === next) watcher = null;
|
|
169
|
+
});
|
|
170
|
+
next.unref();
|
|
171
|
+
watcher = next;
|
|
172
|
+
recheck = setTimeout(refresh, WATCH_RECHECK_MS);
|
|
173
|
+
recheck.unref();
|
|
174
|
+
return;
|
|
175
|
+
} catch (error) {
|
|
176
|
+
if (directory === home || !(error instanceof Error && "code" in error && error.code === "ENOENT")) return;
|
|
177
|
+
directory = dirname(directory);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
observe();
|
|
181
|
+
refresh();
|
|
182
|
+
const timer = setInterval(() => {
|
|
183
|
+
observe();
|
|
184
|
+
refresh();
|
|
185
|
+
}, 1e4);
|
|
186
|
+
return () => {
|
|
187
|
+
closed = true;
|
|
188
|
+
watcher?.close();
|
|
189
|
+
clearTimeout(recheck);
|
|
190
|
+
clearInterval(timer);
|
|
191
|
+
for (const stop of stops.values()) stop();
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { followHostedLogs as n, syncHostedLogs as r, followHostedLaunchLogs as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { o as cancellableSleep } from "./exec-
|
|
2
|
-
import { a as
|
|
3
|
-
import { l as phaseLine } from "./command-output-
|
|
4
|
-
import { n as macosDir } from "./state-
|
|
5
|
-
import {
|
|
6
|
-
import { _ as unknownSession, a as SESSION_TIMEOUT_MS, c as call, d as hostedSession, g as stoppedSession, h as sha256, i as RESERVE_TIMEOUT_MS, l as connectHost, m as settle, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as upload } from "./hosted-client-
|
|
1
|
+
import { o as cancellableSleep } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { a as agentAccess, i as closeAgentConnection, o as removeAgentAccess, t as pullHostedMacosLogs } from "./hosted-logs-B1gqQuva.mjs";
|
|
3
|
+
import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { n as macosDir } from "./state-CZxLyetD.mjs";
|
|
5
|
+
import { ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
|
|
6
|
+
import { _ as unknownSession, a as SESSION_TIMEOUT_MS, c as call, d as hostedSession, g as stoppedSession, h as sha256, i as RESERVE_TIMEOUT_MS, l as connectHost, m as settle, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as upload } from "./hosted-client-D7Pk_Oo1.mjs";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { join } from "node:path";
|
|
9
9
|
import { ambientContext, ambientWrite } from "@stim-cli/core";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { o as cancellableSleep } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import { d as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { s as writeHostedNative } from "./ios-state-CT9nV5SP.mjs";
|
|
1
|
+
import { o as cancellableSleep, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { E as workspaceDir, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { a as agentAccess, i as closeAgentConnection, n as pullHostedNativeLogs, o as removeAgentAccess } from "./hosted-logs-B1gqQuva.mjs";
|
|
4
|
+
import { ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
|
|
5
|
+
import { _ as unknownSession, a as SESSION_TIMEOUT_MS, c as call, d as hostedSession, g as stoppedSession, h as sha256, i as RESERVE_TIMEOUT_MS, l as connectHost, m as settle, n as OFFER_TIMEOUT_MS, o as attach, p as requireHostedAppMode, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as upload } from "./hosted-client-D7Pk_Oo1.mjs";
|
|
6
|
+
import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-gateway-BnHdqMO_.mjs";
|
|
7
|
+
import { s as writeHostedNative } from "./ios-state-BZ03NFgF.mjs";
|
|
9
8
|
import { randomUUID } from "node:crypto";
|
|
10
9
|
import { readFileSync } from "node:fs";
|
|
11
10
|
import { join } from "node:path";
|
|
@@ -125,12 +124,19 @@ function hostedMetroPortProbe(machine, note) {
|
|
|
125
124
|
return !window.busy.has(port);
|
|
126
125
|
};
|
|
127
126
|
}
|
|
128
|
-
|
|
127
|
+
function placeHostedNative(target, options) {
|
|
128
|
+
const context = ambientContext();
|
|
129
|
+
return withDrainingCancellation(context, runCancellationSignal(context), () => placeHostedNativeOnce(target, options));
|
|
130
|
+
}
|
|
131
|
+
async function placeHostedNativeOnce(target, { root, slot, bundle, handoff, bundleId, selectors, release, mode = release ? "release" : "development", devClientScheme, reserved, note, enterPhase = () => {}, metro = requestHostedMetro, metroPort, platform = "ios" }) {
|
|
129
132
|
let host = target.host;
|
|
133
|
+
const signal = runCancellationSignal(ambientContext());
|
|
134
|
+
const closeOnAbort = () => host.connection.close();
|
|
135
|
+
signal?.addEventListener("abort", closeOnAbort, { once: true });
|
|
130
136
|
try {
|
|
131
137
|
if (mode === "development" && metro === requestHostedMetro) requireHostedMetro(root);
|
|
132
138
|
enterPhase("device");
|
|
133
|
-
host = await connectHost(host.machine, void 0, true);
|
|
139
|
+
host = await connectHost(host.machine, void 0, true, signal);
|
|
134
140
|
target.host = host;
|
|
135
141
|
requireHostedAppMode(host, platform, mode);
|
|
136
142
|
let session = (target.session ? await attach(host, target.session.id, void 0, platform) : null) ?? await reserveHostedNative(host, target, {
|
|
@@ -267,6 +273,7 @@ async function placeHostedNative(target, { root, slot, bundle, handoff, bundleId
|
|
|
267
273
|
} catch (error) {
|
|
268
274
|
throw hostingRefusal(host.machine, error);
|
|
269
275
|
} finally {
|
|
276
|
+
signal?.removeEventListener("abort", closeOnAbort);
|
|
270
277
|
if (platform === "android") host.connection.close();
|
|
271
278
|
}
|
|
272
279
|
}
|
|
@@ -287,13 +294,6 @@ async function stopHostedNative(root, slot, signal, platform = "ios") {
|
|
|
287
294
|
signal?.addEventListener("abort", cancel, { once: true });
|
|
288
295
|
try {
|
|
289
296
|
host = await connectHost(placement.machine, void 0, false, signal);
|
|
290
|
-
try {
|
|
291
|
-
await pullHostedNativeLogs(root, name, placement, host, true, platform, signal);
|
|
292
|
-
} catch (error) {
|
|
293
|
-
signal?.throwIfAborted();
|
|
294
|
-
ambientWrite("stderr", `Could not copy final native logs from ${placement.machine}: ${error.message}\n`);
|
|
295
|
-
}
|
|
296
|
-
signal?.throwIfAborted();
|
|
297
297
|
const stopped = await settle(host, hostedSession(host, await call(host, "device-host.stop", { session: placement.session }), platform), ["stopping"], SESSION_TIMEOUT_MS, platform, signal);
|
|
298
298
|
signal?.throwIfAborted();
|
|
299
299
|
if (stopped.state !== "stopped") throw unknownSession(host, stopped);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { k as workspaceLogsDir$1, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-BjqdjnJR.mjs";
|
|
2
|
+
import { V as deviceSlotKey, _ as loadConfig$1 } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { o as formatLongDuration } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
5
|
+
import { L as workspaceBuildInProgress, ft as teardownOwnedIosSim, j as collectOwnedDeviceActivity, ut as teardownOwnedAvd } from "./workspaces-DFbj07jp.mjs";
|
|
5
6
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { _ as workspaceDeviceLastUseAt } from "./activity-Cd-ysFes.mjs";
|
|
8
|
+
import { d as listAllIosSims } from "./ios-E26qSpkb.mjs";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
9
11
|
import { DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, readDeviceIdleShutdowns } from "@stim-cli/core/state";
|
|
10
12
|
//#region src/devices/idle-shutdown.ts
|
|
11
13
|
const SIM_LIST_TIMEOUT_MS = 1e4;
|
|
@@ -58,6 +60,15 @@ function dueIdleDevices(root, idleMs, now = Date.now()) {
|
|
|
58
60
|
}];
|
|
59
61
|
});
|
|
60
62
|
}
|
|
63
|
+
/** Appends an idle shutdown record to the workspace's metro.ndjson, where the supervisor writes its own. */
|
|
64
|
+
function writeIdleShutdownEvent(root, event) {
|
|
65
|
+
const writer = createNdjsonWriter(join(workspaceLogsDir$1(root), "metro.ndjson"), { maxBytes: LOG_ROTATE_BYTES });
|
|
66
|
+
writer.write({
|
|
67
|
+
src: "metro",
|
|
68
|
+
...event
|
|
69
|
+
});
|
|
70
|
+
writer.close();
|
|
71
|
+
}
|
|
61
72
|
/**
|
|
62
73
|
* Shuts down, through centralized teardown, each of the workspace's owned devices that is still idle for `idleMs`,
|
|
63
74
|
* and records why. The caller holds the workspace's native-run lock, so no `ios` or `android` run is booting or
|
|
@@ -108,7 +119,8 @@ async function shutDownIdleDevices(root, idleMs, log, now = Date.now(), { only,
|
|
|
108
119
|
} else if (outcome.status !== "missing") log({
|
|
109
120
|
level: "warn",
|
|
110
121
|
event: "device_idle_shutdown_failed",
|
|
111
|
-
msg: `could not shut down idle ${what}: ${outcome.reason}
|
|
122
|
+
msg: `could not shut down idle ${what}: ${outcome.reason}`,
|
|
123
|
+
...outcome.status === "skipped" ? { skipped: true } : {}
|
|
112
124
|
});
|
|
113
125
|
}
|
|
114
126
|
return shutDown;
|
|
@@ -127,4 +139,4 @@ async function clearDeviceIdleShutdown(root, platform, slot = "default") {
|
|
|
127
139
|
});
|
|
128
140
|
}
|
|
129
141
|
//#endregion
|
|
130
|
-
export { dueIdleDevices as n, shutDownIdleDevices as r, clearDeviceIdleShutdown as t };
|
|
142
|
+
export { writeIdleShutdownEvent as i, dueIdleDevices as n, shutDownIdleDevices as r, clearDeviceIdleShutdown as t };
|