stim 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{acquire-artifact-ybouwJSR.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
- package/dist/{act-DG54PWtJ.mjs → act-Cyvm8xYc.mjs} +40 -25
- package/dist/{activity-B5RtpFda.mjs → activity-Dq3ZcdD8.mjs} +6 -6
- package/dist/{agent-device-usage-output-UJ5gC80l.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
- package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
- package/dist/{android-BoUJKbfz.mjs → android-BZppyPe_.mjs} +66 -46
- package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
- package/dist/{android-CHH4KLOR.mjs → android-DcztblCT.mjs} +5 -5
- package/dist/{android-cas-ngferVq2.mjs → android-cas-BtCOrNqb.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api.d.mts +22 -4
- package/dist/api.mjs +32 -31
- package/dist/{artifact-5RteZem7.mjs → artifact-BR5VNArK.mjs} +17 -16
- package/dist/{artifact-Dwdo7k1E.mjs → artifact-Bdt_n9Jc.mjs} +17 -16
- package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
- package/dist/{browser-web-CeEVlGug.mjs → browser-web-ycg9qWB8.mjs} +16 -17
- package/dist/{budget-DnPX3DXj.mjs → budget-dPGuhNai.mjs} +101 -40
- package/dist/{build-CqufZFqy.mjs → build-CaF574eS.mjs} +31 -28
- package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
- package/dist/{build-plan-C8CIvRyi.mjs → build-plan-JsDUq4w1.mjs} +8 -7
- package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-RcAy92gH.mjs → ccache-CCn1S6qG.mjs} +6 -6
- package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
- package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
- package/dist/{cli-D-J9fWGV.mjs → cli-xqAidP7O.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-yyso1bwi.mjs → client-18-ZowoT.mjs} +254 -28
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-Db8BqzxH.mjs → command-output-DxC0k2rk.mjs} +3 -2
- package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
- package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
- package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-C56ll9hY.mjs} +2 -2
- package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
- package/dist/{dev-client-BnYSDiKa.mjs → dev-client-w_fok0Ek.mjs} +3 -3
- package/dist/{device-BvzPUBs3.mjs → device-4RUugw5X.mjs} +16 -16
- package/dist/{device-CCkWmkAA.mjs → device-BktRGdjS.mjs} +40 -44
- package/dist/{device-capacity-CjaSdrhg.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
- package/dist/device-host-worker.mjs +17 -17
- package/dist/{device-ios-uOiEETX2.mjs → device-ios-DzpSlZyd.mjs} +23 -24
- package/dist/{device-lease-run-BgwPHc6u.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
- package/dist/{device-pool-C-ptmZTa.mjs → device-pool-CgBHk401.mjs} +3 -3
- package/dist/{doctor-pxxvipYC.mjs → doctor-BZ6oxNum.mjs} +1 -1
- package/dist/{doctor-8sr2tFOL.mjs → doctor-C33AzVfR.mjs} +28 -28
- package/dist/{doctor-D2SN3Ltx.mjs → doctor-DZgpqR6J.mjs} +17 -16
- package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-sy_RNhFt.mjs → doctor-watchman-B453A231.mjs} +5 -5
- package/dist/{eas-build-CyjU5K7E.mjs → eas-build-CxKUNHsb.mjs} +4 -4
- package/dist/{eas-fallback-DV3Wytf1.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
- package/dist/{eas-session-ledger-BzzsX97d.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
- package/dist/{error-diagnostics-C6sVoeqO.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
- package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
- package/dist/{gc-DLbzvTP2.mjs → gc-DDWEAj0w.mjs} +2 -2
- package/dist/{gc-CDoogxAI.mjs → gc-yVKpAOKM.mjs} +205 -28
- package/dist/{guide-BC37GcDG.mjs → guide-Bggftwc5.mjs} +252 -73
- package/dist/{hosted-android-CkclQig_.mjs → hosted-android-D4dweBof.mjs} +4 -4
- package/dist/{hosted-client-ByuMMO5s.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
- package/dist/{hosted-ios-DtYHeuYR.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
- package/dist/{hosted-logs-Br84qWy1.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
- package/dist/{hosted-macos-DdtYajZt.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
- package/dist/{hosted-native-UPI9zdZ4.mjs → hosted-native-Doxbfzem.mjs} +58 -11
- package/dist/{idle-shutdown-DO7oIRlc.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
- package/dist/{ios-DZZbNYlY.mjs → ios-B1FXRCMX.mjs} +71 -44
- package/dist/{ios-vbUOqGXu.mjs → ios-BItP6lkn.mjs} +8 -8
- package/dist/{ios-hcBpnEGk.mjs → ios-CVUFFZ6C.mjs} +70 -13
- package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
- package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
- package/dist/{ios-device-JC3uWM4K.mjs → ios-device-BI38NFFH.mjs} +3 -3
- package/dist/{ios-project-CVyNwjAF.mjs → ios-project-KYqeJURj.mjs} +5 -5
- package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
- package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-DlElquYD.mjs} +15 -7
- package/dist/{js-swap-C3QxUFJR.mjs → js-swap-BvrQvXHY.mjs} +7 -6
- package/dist/{launch-CHY3p-yz.mjs → launch-BVlyQw3T.mjs} +51 -49
- package/dist/{launch-Bz7JtaC4.mjs → launch-SfzGH_s9.mjs} +48 -29
- package/dist/{logs-mxqsWpJs.mjs → logs-DXE32kyb.mjs} +16 -9
- package/dist/{logs-CtNeNDuq.mjs → logs-ovlU7m7N.mjs} +8 -6
- package/dist/{macos-inNFbBWc.mjs → macos-B3BveDrU.mjs} +1 -1
- package/dist/{macos-u0BoHKnO.mjs → macos-CCfhb-jT.mjs} +49 -42
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-DiXtA3Ty.mjs → metro-Bu8LBfzS.mjs} +4 -4
- package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-DtsOy-0P.mjs} +3 -4
- package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BWDuU5oQ.mjs} +3 -3
- package/dist/{native-android-CdCSylTn.mjs → native-android-96BBizbq.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BcLYBZil.mjs} +5 -5
- package/dist/{native-run-BUTu8T7A.mjs → native-run-BmH7U8pr.mjs} +6 -6
- package/dist/{native-runtime-CRSOZxKY.mjs → native-runtime-DgtJkzIa.mjs} +10 -9
- package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
- package/dist/{native-xcode-inputs-G6rkkhxu.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
- package/dist/{native-xcode-ios-_os2PlCD.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
- package/dist/offload-worker.d.mts +7 -2
- package/dist/offload-worker.mjs +104 -43
- package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
- package/dist/{ownership-C5fo5Edb.mjs → ownership-DxlZGDcV.mjs} +3 -3
- package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
- package/dist/phone-reverses-BdsdesVF.mjs +57 -0
- package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DUvqqsB-.mjs} +1 -1
- package/dist/{plan-placement-BU42oOyT.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
- package/dist/{ports-BSmQKzW7.mjs → ports-D-E_OiAO.mjs} +3 -3
- package/dist/{prebuild-BFm63bQ0.mjs → prebuild-DmVCf5xb.mjs} +14 -9
- package/dist/{project-CTLNHCfE.mjs → project-Dz-hWkb-.mjs} +21 -17
- package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-CFgUroxW.mjs → react-native-android-DOinxgwB.mjs} +75 -32
- package/dist/{react-native-build-CmJkTljQ.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
- package/dist/{react-native-doctor-LTF-Xt8l.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
- package/dist/{react-native-ios-ChBF1MkB.mjs → react-native-ios-D5zTIuH8.mjs} +38 -22
- package/dist/{recordings-CQmfzAh7.mjs → recordings-CdPwYwvs.mjs} +1 -1
- package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
- package/dist/{reload-DF9hqUUB.mjs → reload-C1TTVesC.mjs} +144 -42
- package/dist/{reload-RBi1nj6Z.mjs → reload-Ck9RJeSq.mjs} +1 -1
- package/dist/{remote-BmvMCcJw.mjs → remote-DEZ7AOVq.mjs} +7 -7
- package/dist/{result-Cx5CRLvS.mjs → result-DqBrb12U.mjs} +40 -17
- package/dist/{run-DidHghD1.mjs → run-BIwoU44q.mjs} +2 -2
- package/dist/{selection-DSMbWEX2.mjs → selection-BLtvaqxc.mjs} +11 -5
- package/dist/{server-bare-CafzuyFB.mjs → server-bare-Z1ToVLPn.mjs} +2 -2
- package/dist/{server-command-BTiGPEjS.mjs → server-command-C0pmjNdG.mjs} +6 -6
- package/dist/server-expo-CEntXzRw.mjs +2 -0
- package/dist/{server-expo-D9lEz4aq.mjs → server-expo-Tt_hLRpy.mjs} +37 -13
- package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
- package/dist/{settings-eKF_vJJs.mjs → settings-kkt0vP4w.mjs} +1 -1
- package/dist/{settings-write-79mQRr9C.mjs → settings-write--gj6MACV.mjs} +7 -7
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-BNckWpXi.mjs → simslim-CdWKT3vA.mjs} +2 -2
- package/dist/{slot-launch-D7M2nE4b.mjs → slot-launch-A1BgotaM.mjs} +6 -6
- package/dist/{stage-DKNM4ZPd.mjs → stage-ERTMh88n.mjs} +2 -3
- package/dist/{start-bjfiScgz.mjs → start-BKGrEhzG.mjs} +75 -35
- package/dist/{start-CRfN1kWV.mjs → start-Bmg_qmHi.mjs} +1 -1
- package/dist/{state--smjFSTL.mjs → state-B1ig0Kqy.mjs} +4 -4
- package/dist/{state-08I3hw3_.mjs → state-BfAltYJP.mjs} +2 -2
- package/dist/{stats-DioA6cBU.mjs → stats-B-ckuiUg.mjs} +5 -5
- package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
- package/dist/{status-kzbeWk4x.mjs → status-DfFp6a76.mjs} +24 -24
- package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
- package/dist/{status-Eqx_20WC.mjs → status-Pw-807f0.mjs} +1 -1
- package/dist/{status-watch-BIqqbJ6q.mjs → status-watch-XC7F-AMf.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/stim-clonefile.c +18 -0
- package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
- package/dist/{stop-B18d8KDw.mjs → stop-BFu7X_Do.mjs} +2 -2
- package/dist/{stop-B2uLQfoM.mjs → stop-CL1kDHds.mjs} +55 -21
- package/dist/{stop-DzLJc7Ei.mjs → stop-DhclRwOO.mjs} +5 -5
- package/dist/supervisor-run.mjs +16 -16
- package/dist/{support-BTpZ6RAJ.mjs → support-B1W-hmC2.mjs} +8 -8
- package/dist/{support-DTBV56gy.mjs → support-B3tzVhKn.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-BWYPj9Sn.mjs} +4 -4
- package/dist/{swiftpm-macos-r_WSKlXr.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
- package/dist/{toolchain-GVgnf8d1.mjs → toolchain-BjgKdoEf.mjs} +1 -1
- package/dist/{toolchain-CWeGJgCc.mjs → toolchain-D3bmRMia.mjs} +57 -36
- package/dist/trigger-BLsHgAGR.mjs +2 -0
- package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
- package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-ol0ZypEu.mjs} +6 -6
- package/dist/{web-CwREhjD-.mjs → web-BH7peScT.mjs} +12 -10
- package/dist/web-BdOFlTJr.mjs +2 -0
- package/dist/web-run.mjs +8 -9
- package/dist/windows-report.mjs +12 -1
- package/dist/windows-report.ps1 +1 -1
- package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CeBpIZgr.mjs} +11 -4
- package/dist/{workspaces-BxzYlo3P.mjs → workspaces-CSV2Orf4.mjs} +36 -32
- package/dist/{worktree-BxfVxG_b.mjs → worktree-DEDUzO_L.mjs} +1 -1
- package/dist/{worktree-8lqn_lBp.mjs → worktree-Dw8kfacb.mjs} +324 -99
- package/dist/{xcode-iQnROM5o.mjs → xcode-DHu41qQ4.mjs} +41 -27
- package/package.json +7 -7
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
- package/dist/server-expo-C-Buqvn_.mjs +0 -2
- package/dist/trigger-yb_nFzPF.mjs +0 -2
- package/dist/web-Cduk0NSE.mjs +0 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Y as doctorIo, _ as loadConfig$1, p as getProject } from "./config-
|
|
2
|
-
import { f as refuseNoProject, l as phaseLine } from "./command-output-
|
|
3
|
-
import { L as projectSettingsContextAsync, Mt as repoRoot } from "./settings-
|
|
4
|
-
import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-
|
|
5
|
-
import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-
|
|
6
|
-
import { a as inspectBudget,
|
|
7
|
-
import {
|
|
8
|
-
import { c as detectXcodeMajorAsync } from "./xcode-
|
|
9
|
-
import { s as offloadCheck } from "./client-
|
|
10
|
-
import {
|
|
11
|
-
import { r as maintenanceStatus, t as maintenanceLine } from "./status-
|
|
12
|
-
import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-
|
|
13
|
-
import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-
|
|
14
|
-
import { h as resolveDeviceType, v as resolveRuntime } from "./support-
|
|
1
|
+
import { Y as doctorIo, _ as loadConfig$1, p as getProject } from "./config-BZhXY15H.mjs";
|
|
2
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-DxC0k2rk.mjs";
|
|
3
|
+
import { L as projectSettingsContextAsync, Mt as repoRoot } from "./settings-RKwY33wv.mjs";
|
|
4
|
+
import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-Dz-hWkb-.mjs";
|
|
5
|
+
import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-Ck6YXPAO.mjs";
|
|
6
|
+
import { a as inspectBudget, mr as memorySweepIsScoped, n as budgetLine, ur as inspectWatchmanMemory } from "./budget-dPGuhNai.mjs";
|
|
7
|
+
import { B as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation, z as memoryCulpritFindings } from "./ios-CVUFFZ6C.mjs";
|
|
8
|
+
import { c as detectXcodeMajorAsync } from "./xcode-DHu41qQ4.mjs";
|
|
9
|
+
import { s as offloadCheck } from "./client-18-ZowoT.mjs";
|
|
10
|
+
import { l as inspectBuildMachines, p as inspectDeviceHostMachines } from "./selection-BLtvaqxc.mjs";
|
|
11
|
+
import { r as maintenanceStatus, t as maintenanceLine } from "./status-Fect2w9R.mjs";
|
|
12
|
+
import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-B453A231.mjs";
|
|
13
|
+
import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-C33AzVfR.mjs";
|
|
14
|
+
import { h as resolveDeviceType, v as resolveRuntime } from "./support-B1W-hmC2.mjs";
|
|
15
15
|
import { isJsonObject, maintenanceNdjsonFile, readHostedAppMetadata, readHostedSessions } from "@stim-cli/core/state";
|
|
16
16
|
import { dirname, join, sep } from "path";
|
|
17
17
|
import chalk from "chalk";
|
|
@@ -319,7 +319,8 @@ function toolchainReport(root, env = process.env) {
|
|
|
319
319
|
pin: pin.file,
|
|
320
320
|
spec: pin.spec,
|
|
321
321
|
bin: pinned?.bin ?? null,
|
|
322
|
-
version: pinned?.version ?? null
|
|
322
|
+
version: pinned?.version ?? null,
|
|
323
|
+
match: pinned?.match ?? null
|
|
323
324
|
} : null
|
|
324
325
|
};
|
|
325
326
|
}
|
|
@@ -330,7 +331,7 @@ function toolchainLine(entry) {
|
|
|
330
331
|
}
|
|
331
332
|
function toolchainLines(report) {
|
|
332
333
|
const project = report.projectNode;
|
|
333
|
-
return [...report.entries.map(toolchainLine), ...project ? [phaseLine("project node", project.bin ? `${project.version} at ${project.bin},
|
|
334
|
+
return [...report.entries.map(toolchainLine), ...project ? [phaseLine("project node", !project.bin ? `${project.pin} pins ${project.spec}, which no nvm, fnm, Volta, asdf, mise or Homebrew install provides; Metro runs on the node on PATH` : project.match === "major" ? `${project.version} at ${project.bin}, the newest installed Node of the major ${project.pin} pins and not older than ${project.spec}, since no install has ${project.spec}; Metro runs on it when the node on PATH does not fit the pin` : `${project.version} at ${project.bin}, which ${project.pin} pins (${project.spec}); Metro runs on it when the node on PATH does not satisfy the pin`)] : []];
|
|
334
335
|
}
|
|
335
336
|
function budgetLines(budget) {
|
|
336
337
|
return budget ? [phaseLine("budget", budgetLine(budget))] : [];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-
|
|
2
|
-
import { l as gitQuietAsync } from "./operation-exec-
|
|
3
|
-
import { Et as listWorktreesAsync, Nt as repoRootAsync } from "./settings-
|
|
4
|
-
import { f as projectRegistry } from "./project-
|
|
5
|
-
import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-
|
|
1
|
+
import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-BZhXY15H.mjs";
|
|
2
|
+
import { l as gitQuietAsync } from "./operation-exec-CUZifp6Z.mjs";
|
|
3
|
+
import { Et as listWorktreesAsync, Nt as repoRootAsync } from "./settings-RKwY33wv.mjs";
|
|
4
|
+
import { f as projectRegistry } from "./project-Dz-hWkb-.mjs";
|
|
5
|
+
import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-Ck6YXPAO.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
8
8
|
import { isJsonObject } from "@stim-cli/core/state";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as killOnAbort,
|
|
3
|
-
import {
|
|
4
|
-
import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-
|
|
1
|
+
import { D as ownership_claim_exports, c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { a as killOnAbort, r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
|
|
3
|
+
import { $n as remoteCliInvocation, Yn as resolveEasCliBin, ir as easCliUpgradeRemedy, rr as easCliSupport } from "./budget-dPGuhNai.mjs";
|
|
4
|
+
import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-Dq3ZcdD8.mjs";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
7
7
|
//#region src/engine/eas-build.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { _ as loadConfig$1, p as getProject } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import { ct as detectProviders, lt as planMetroReach } from "./settings-
|
|
5
|
-
import { M as readMetroTunnel, P as readRemoteSession } from "./project-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { c as call, l as connectHost, p as requireHostedAppMode } from "./hosted-client-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { c as peekDeviceSlots } from "./device-capacity-
|
|
1
|
+
import { c as throwIfCancelled, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { _ as loadConfig$1, p as getProject } from "./config-BZhXY15H.mjs";
|
|
3
|
+
import { r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
|
|
4
|
+
import { ct as detectProviders, lt as planMetroReach } from "./settings-RKwY33wv.mjs";
|
|
5
|
+
import { M as readMetroTunnel, P as readRemoteSession } from "./project-Dz-hWkb-.mjs";
|
|
6
|
+
import { Wn as isEasAuthFailureText, Wt as readInstalledEasCliVersionAsync, Yn as resolveEasCliBin, er as remoteCommand, nr as MIN_EAS_CLI_SIMULATOR_VERSION, rr as easCliSupport, s as peekBudget, tr as MIN_EAS_CLI_DEVICE_VERSION } from "./budget-dPGuhNai.mjs";
|
|
7
|
+
import { I as readHostMemoryPressureAsync } from "./ios-CVUFFZ6C.mjs";
|
|
8
|
+
import { f as hostingMachines, i as namedBuildMachine, s as resolveBuildMachine } from "./selection-BLtvaqxc.mjs";
|
|
9
|
+
import { c as call, l as connectHost, p as requireHostedAppMode } from "./hosted-client-BBTVe3X6.mjs";
|
|
10
|
+
import { c as writeHostedNativeAsync, r as readHostedNative } from "./ios-state-DlElquYD.mjs";
|
|
11
|
+
import { i as prepareHostedNative } from "./hosted-native-Doxbfzem.mjs";
|
|
12
|
+
import { c as peekDeviceSlots } from "./device-capacity-Ic-kdmEV.mjs";
|
|
13
13
|
import { ambientEnv } from "@stim-cli/core";
|
|
14
14
|
import { automaticMachineEnabled, isJsonObject, machineCapacity, parseHostedChoice, parseHostedNativeOffer } from "@stim-cli/core/state";
|
|
15
15
|
//#region src/device-host/placement.ts
|
|
@@ -219,7 +219,7 @@ function viaEas(code, reason, skipped) {
|
|
|
219
219
|
skipped
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
|
-
async function automaticDevicePlacement({ root, slot, platform, selectors, appMode, buildMachine, noWait, eas, signal }, { machines = () => hostingMachines(void 0, signal), read = readHostedNative, write =
|
|
222
|
+
async function automaticDevicePlacement({ root, slot, platform, selectors, appMode, buildMachine, noWait, eas, signal }, { machines = () => hostingMachines(void 0, signal), read = readHostedNative, write = writeHostedNativeAsync, resume = prepareHostedNative, peek = () => peekDeviceSlots({
|
|
223
223
|
platform,
|
|
224
224
|
project: getProject(root),
|
|
225
225
|
slot
|
|
@@ -238,7 +238,7 @@ async function automaticDevicePlacement({ root, slot, platform, selectors, appMo
|
|
|
238
238
|
skipped: [],
|
|
239
239
|
sticky: true
|
|
240
240
|
};
|
|
241
|
-
write(root, slot, null, platform);
|
|
241
|
+
await write(root, slot, null, platform);
|
|
242
242
|
}
|
|
243
243
|
const devices = peek();
|
|
244
244
|
if (devices.localLive) return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as reportSignal, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { l as workspaceAgentDeviceDir, v as withDirLock$1, y as withDirLockAsync$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { G as projectDeviceSlots, V as deviceSlotKey } from "./config-
|
|
4
|
-
import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-
|
|
5
|
-
import { n as isInsideProject } from "./metro-
|
|
6
|
-
import { r as cdpEndpoint } from "./state
|
|
3
|
+
import { G as projectDeviceSlots, V as deviceSlotKey } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-DxC0k2rk.mjs";
|
|
5
|
+
import { n as isInsideProject } from "./metro-Bu8LBfzS.mjs";
|
|
6
|
+
import { r as cdpEndpoint } from "./state-B1ig0Kqy.mjs";
|
|
7
7
|
import { accessSync, constants, existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { delimiter, dirname, join, resolve } from "node:path";
|
|
9
9
|
import { workspaceId } from "@stim-cli/core";
|
|
@@ -681,11 +681,11 @@ function writeLedger(root, ledger) {
|
|
|
681
681
|
throw error;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function easSessionClaimWrite(claim, root) {
|
|
685
685
|
assertEasMachineRootWritable(root);
|
|
686
686
|
const normalized = validEasSessionClaim(claim.sessionId, claim);
|
|
687
687
|
if (!normalized) throw new Error(`Invalid EAS session claim for ${claim.sessionId}.`);
|
|
688
|
-
|
|
688
|
+
return () => {
|
|
689
689
|
const current = readEasSessionLedger(root);
|
|
690
690
|
if (!current.safe) throw new Error(current.notice ?? "EAS ownership ledger is unreadable.");
|
|
691
691
|
current.claims.set(normalized.sessionId, normalized);
|
|
@@ -693,7 +693,11 @@ function recordEasSessionClaim(claim, root = easMachineStateRoot()) {
|
|
|
693
693
|
version: 1,
|
|
694
694
|
claims: Object.fromEntries(current.claims)
|
|
695
695
|
});
|
|
696
|
-
}
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
/** Records the claim after waiting for the ledger lock without blocking the event loop. */
|
|
699
|
+
async function recordEasSessionClaim(claim, root = easMachineStateRoot()) {
|
|
700
|
+
await withDirLockAsync$1(easSessionLedgerLock(root), easSessionClaimWrite(claim, root), { ensureParent: () => mkdirSync(dirname(easSessionLedgerLock(root)), { recursive: true }) });
|
|
697
701
|
}
|
|
698
702
|
function removeEasSessionClaim(sessionId, root = easMachineStateRoot(), when = () => true) {
|
|
699
703
|
const file = easSessionLedgerFile(root);
|
|
@@ -1,41 +1,21 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { d as resolveProjectMetro } from "./metro-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { r as deviceConsoleLevel } from "./ios-device-
|
|
11
|
-
import { n as parseLogcatLine } from "./android-DR5lZ2Az.mjs";
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { H as deviceSlotPlatforms, V as deviceSlotKey, p as getProject } from "./config-BZhXY15H.mjs";
|
|
3
|
+
import { v as launchErrorPreview } from "./command-output-DxC0k2rk.mjs";
|
|
4
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
|
|
5
|
+
import { I as readWorkspaceLaunches } from "./project-Dz-hWkb-.mjs";
|
|
6
|
+
import { o as androidHome, u as androidToolCwd } from "./android-882m4hxX.mjs";
|
|
7
|
+
import { d as resolveProjectMetro } from "./metro-Bu8LBfzS.mjs";
|
|
8
|
+
import { i as parseLogcatLine, n as androidLogGroups, r as isAndroidCrashText } from "./android-CX5IcRuf.mjs";
|
|
9
|
+
import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-Dq3ZcdD8.mjs";
|
|
10
|
+
import { r as deviceConsoleLevel } from "./ios-device-B6HK951C.mjs";
|
|
12
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
13
|
-
import { existsSync,
|
|
12
|
+
import { existsSync, readFileSync, renameSync } from "node:fs";
|
|
14
13
|
import { homedir } from "node:os";
|
|
15
14
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
16
15
|
import { withDirLockAsync } from "@stim-cli/core";
|
|
17
16
|
import { NATIVE_CRASH_LOG_PREFIX, attachExpoErrorContext, readLogRecords, readLogTimeline } from "@stim-cli/core/state";
|
|
18
17
|
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
19
18
|
//#region src/diagnostics/diagnostic-store.ts
|
|
20
|
-
/** Publishes an immutable diagnostic snapshot atomically; existing evidence wins. */
|
|
21
|
-
function writeDiagnosticOnce(path, content) {
|
|
22
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
23
|
-
withDirLock$1(`${path}.lock`, () => {
|
|
24
|
-
if (existsSync(path)) return;
|
|
25
|
-
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
26
|
-
try {
|
|
27
|
-
writeFileSync(temporary, content, { flag: "wx" });
|
|
28
|
-
renameSync(temporary, path);
|
|
29
|
-
} finally {
|
|
30
|
-
try {
|
|
31
|
-
unlinkSync(temporary);
|
|
32
|
-
} catch {}
|
|
33
|
-
}
|
|
34
|
-
}, {
|
|
35
|
-
waitMs: 100,
|
|
36
|
-
pollMs: 10
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
19
|
/** Publishes an immutable diagnostic snapshot without blocking on content writes or lock contention. */
|
|
40
20
|
async function writeDiagnosticOnceAsync(path, content, signal) {
|
|
41
21
|
signal?.throwIfAborted();
|
|
@@ -111,19 +91,13 @@ function parseIosCrash(text, target) {
|
|
|
111
91
|
/** Extracts crash-buffer groups only when their own process header names the target app. */
|
|
112
92
|
function parseAndroidCrashes(text, target, clockOffsetMs) {
|
|
113
93
|
const entries = text.split("\n").map((line) => parseLogcatLine(line, { clockOffsetMs })).filter((record) => record !== null && Number(record.ts) >= target.since && Number(record.ts) <= (target.until ?? Infinity));
|
|
114
|
-
|
|
115
|
-
for (const entry of entries) {
|
|
116
|
-
const last = groups.at(-1);
|
|
117
|
-
if (!last || entry.proc !== last.at(-1)?.proc || /^\s*(?:FATAL EXCEPTION:|\*\*\* \*\*\*)/.test(entry.msg ?? "")) groups.push([entry]);
|
|
118
|
-
else last.push(entry);
|
|
119
|
-
}
|
|
120
|
-
return groups.flatMap((group) => {
|
|
94
|
+
return androidLogGroups(entries).flatMap((group) => {
|
|
121
95
|
const messages = group.map((record) => record.msg ?? "");
|
|
122
96
|
const process = messages.map((line) => /^\s*(?:Process: (.+?), PID: \d+|pid: \d+, tid: \d+, name: .*?>>> (.*?) <<<)/.exec(line)).find(Boolean);
|
|
123
97
|
const appId = process?.[1] ?? process?.[2];
|
|
124
98
|
if (appId !== target.appId) return [];
|
|
125
99
|
const msg = messages.join("\n");
|
|
126
|
-
if (
|
|
100
|
+
if (!isAndroidCrashText(msg)) return [];
|
|
127
101
|
return [{
|
|
128
102
|
ts: group[0].ts,
|
|
129
103
|
deviceTs: group[0].deviceTs,
|
|
@@ -590,6 +564,7 @@ async function symbolicateErrors(records, { port, timeoutMs = 2e3, request = fet
|
|
|
590
564
|
}
|
|
591
565
|
//#endregion
|
|
592
566
|
//#region src/diagnostics/error-diagnostics.ts
|
|
567
|
+
const SOURCE_LOCATION = /(?<![^\s()"\\])[^\s()"\\]+:\d+:\d+/g;
|
|
593
568
|
function key(record) {
|
|
594
569
|
return createHash("sha256").update(JSON.stringify(record)).digest("hex");
|
|
595
570
|
}
|
|
@@ -648,12 +623,12 @@ function mergeErrorCopies(records, root) {
|
|
|
648
623
|
record.msg,
|
|
649
624
|
record.stack,
|
|
650
625
|
record.componentStack
|
|
651
|
-
]).replaceAll(root ? `${root}/` : "\0", "").matchAll(
|
|
626
|
+
]).replaceAll(root ? `${root}/` : "\0", "").matchAll(SOURCE_LOCATION)].map(([location]) => location));
|
|
652
627
|
const existing = title && locations.size ? result.findIndex((other) => !(Array.isArray(other.mirroredSources) ? other.mirroredSources : [other.src]).includes(record.src) && (!other.platform || !record.platform || other.platform === record.platform) && errorTitle(other) === title && typeof other.ts === "number" && typeof record.ts === "number" && Math.abs(other.ts - record.ts) < 1e3 && [...JSON.stringify([
|
|
653
628
|
other.msg,
|
|
654
629
|
other.stack,
|
|
655
630
|
other.componentStack
|
|
656
|
-
]).replaceAll(root ? `${root}/` : "\0", "").matchAll(
|
|
631
|
+
]).replaceAll(root ? `${root}/` : "\0", "").matchAll(SOURCE_LOCATION)].some(([location]) => locations.has(location))) : -1;
|
|
657
632
|
if (existing < 0) result.push(record);
|
|
658
633
|
else {
|
|
659
634
|
const prior = result[existing];
|
|
@@ -732,7 +707,7 @@ async function errorDiagnostics(input, { root, logsDir, port, allowRequest = fal
|
|
|
732
707
|
rendered[entry.index] = value;
|
|
733
708
|
if (bundleLocations(value).length === bundleLocations(entry.record).length) continue;
|
|
734
709
|
try {
|
|
735
|
-
|
|
710
|
+
await writeDiagnosticOnceAsync(join(directory, `${key(entry.record)}.json`), JSON.stringify({
|
|
736
711
|
original: key(entry.record),
|
|
737
712
|
rendered: value
|
|
738
713
|
}));
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { existsSync, rmSync } from "node:fs";
|
|
4
|
+
import { availableParallelism, loadavg, tmpdir } from "node:os";
|
|
2
5
|
import { join } from "node:path";
|
|
3
6
|
import { ambientContext, ambientEnv } from "@stim-cli/core";
|
|
4
7
|
import { createDebugLog, runId } from "@stim-cli/core/state";
|
|
5
|
-
import { basename as basename$1, delimiter as delimiter$1, resolve as resolve$1 } from "path";
|
|
8
|
+
import { basename as basename$1, delimiter as delimiter$1, join as join$1, resolve as resolve$1 } from "path";
|
|
6
9
|
import { execSync } from "child_process";
|
|
7
10
|
import spawn from "cross-spawn";
|
|
8
11
|
import which from "which";
|
|
@@ -122,7 +125,8 @@ async function runReport(context, work, timeoutMs = 6e4) {
|
|
|
122
125
|
const expireCleanup = () => {
|
|
123
126
|
state.failure ??= [...pending.values()].find((failure) => failure !== void 0) ?? Object.assign(/* @__PURE__ */ new Error("Report cleanup did not finish within 35 seconds."), {
|
|
124
127
|
code: "STIM_CLAIM_UNAVAILABLE",
|
|
125
|
-
reportCleanup: true
|
|
128
|
+
reportCleanup: true,
|
|
129
|
+
remedy: "Check that the child processes the report started and their descendants have stopped"
|
|
126
130
|
});
|
|
127
131
|
};
|
|
128
132
|
let cleanupTimer;
|
|
@@ -346,10 +350,58 @@ async function withWorkspaceProcessLock(root, name, fn, { now = Date.now, signal
|
|
|
346
350
|
}
|
|
347
351
|
}
|
|
348
352
|
//#endregion
|
|
353
|
+
//#region src/cancellation.ts
|
|
354
|
+
function cancelledError(what, cause) {
|
|
355
|
+
return Object.assign(new Error(`The ${what} was cancelled.`, cause === void 0 ? void 0 : { cause }), { code: "STIM_CANCELLED" });
|
|
356
|
+
}
|
|
357
|
+
function throwIfCancelled(signal, what) {
|
|
358
|
+
if (signal?.aborted) throw cancelledError(what);
|
|
359
|
+
}
|
|
360
|
+
function cancellableSleep(ms, { signal, what = "wait", ref = true } = {}) {
|
|
361
|
+
return new Promise((resolve, reject) => {
|
|
362
|
+
if (signal?.aborted) return reject(cancelledError(what));
|
|
363
|
+
const onAbort = () => {
|
|
364
|
+
clearTimeout(timer);
|
|
365
|
+
reject(cancelledError(what));
|
|
366
|
+
};
|
|
367
|
+
const timer = setTimeout(() => {
|
|
368
|
+
signal?.removeEventListener("abort", onAbort);
|
|
369
|
+
resolve();
|
|
370
|
+
}, ms);
|
|
371
|
+
if (!ref) timer.unref();
|
|
372
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/process-group-exit.ts
|
|
377
|
+
const BASE_MS = 5e3;
|
|
378
|
+
function loadScaledBudgetMs(baseMs, capMs) {
|
|
379
|
+
const loadPerCpu = (loadavg()[0] ?? 0) / availableParallelism();
|
|
380
|
+
return Math.min(capMs, baseMs * Math.max(1, loadPerCpu));
|
|
381
|
+
}
|
|
382
|
+
function groupExitBudgetMs(capMs = 6e4) {
|
|
383
|
+
return loadScaledBudgetMs(BASE_MS, capMs);
|
|
384
|
+
}
|
|
385
|
+
async function waitForGroupExit(pid, budgetMs) {
|
|
386
|
+
const deadline = performance.now() + budgetMs;
|
|
387
|
+
while ((0, ownership_claim_exports.processGroupAlive)(pid)) {
|
|
388
|
+
if (performance.now() >= deadline) return false;
|
|
389
|
+
await cancellableSleep(25);
|
|
390
|
+
}
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
393
|
+
//#endregion
|
|
349
394
|
//#region src/exec.ts
|
|
350
395
|
const MAX_BUFFER = 67108864;
|
|
396
|
+
const REPORT_CHILD_EXIT_CAP_MS = 15e3;
|
|
397
|
+
const REPORT_JOB_PHASE_MS = 3e4;
|
|
398
|
+
function startsInReportJob(file, opts, containProcessTree) {
|
|
399
|
+
return process.platform === "win32" && (containProcessTree || Boolean(reportSignal(ambientContext()))) && Boolean(executableIn(file, opts.env ?? ambientEnv(), opts.cwd ?? process.cwd()));
|
|
400
|
+
}
|
|
351
401
|
function spawnReportProbe(file, args, opts, containProcessTree = false) {
|
|
352
|
-
|
|
402
|
+
return startsInReportJob(file, opts, containProcessTree) ? spawnReportJob(file, args, opts) : spawn(file, args, opts);
|
|
403
|
+
}
|
|
404
|
+
function spawnReportJob(file, args, opts, markers) {
|
|
353
405
|
const env = opts.env ?? ambientEnv();
|
|
354
406
|
const systemRoot = process.env.SystemRoot ?? process.env.SYSTEMROOT;
|
|
355
407
|
if (!systemRoot) throw new Error("SystemRoot is required to contain Windows report probes.");
|
|
@@ -370,7 +422,8 @@ function spawnReportProbe(file, args, opts, containProcessTree = false) {
|
|
|
370
422
|
file,
|
|
371
423
|
args,
|
|
372
424
|
node: process.execPath,
|
|
373
|
-
entry: fileURLToPath(new URL("../dist/windows-report.mjs", import.meta.url))
|
|
425
|
+
entry: fileURLToPath(new URL("../dist/windows-report.mjs", import.meta.url)),
|
|
426
|
+
...markers
|
|
374
427
|
})
|
|
375
428
|
}
|
|
376
429
|
});
|
|
@@ -413,7 +466,8 @@ function reportChild(child, signal, failed) {
|
|
|
413
466
|
const refuse = (message) => {
|
|
414
467
|
const failure = Object.assign(new Error(message), {
|
|
415
468
|
code: "STIM_CLAIM_UNAVAILABLE",
|
|
416
|
-
reportCleanup: true
|
|
469
|
+
reportCleanup: true,
|
|
470
|
+
remedy: `Check whether the report child${pid === void 0 ? "" : ` ${pid}${process.platform === "win32" ? "" : ` (\`ps -p ${pid}\`)`}`} and its descendants are still running and stop them if they are`
|
|
417
471
|
});
|
|
418
472
|
const error = failed?.(failure) ?? failure;
|
|
419
473
|
child.stdin?.destroy();
|
|
@@ -466,16 +520,13 @@ function reportChild(child, signal, failed) {
|
|
|
466
520
|
if (!ended) {
|
|
467
521
|
let timer;
|
|
468
522
|
await Promise.race([nativeClosed, new Promise((resolve) => {
|
|
469
|
-
timer = setTimeout(resolve,
|
|
523
|
+
timer = setTimeout(resolve, groupExitBudgetMs(REPORT_CHILD_EXIT_CAP_MS));
|
|
470
524
|
})]);
|
|
471
525
|
clearTimeout(timer);
|
|
526
|
+
if (!ended) await new Promise((resolve) => setImmediate(resolve));
|
|
472
527
|
if (!ended) refuse(`Report child ${pid} did not close within the cleanup budget.`);
|
|
473
528
|
}
|
|
474
|
-
if (pid !== void 0 && process.platform !== "win32") {
|
|
475
|
-
const deadline = performance.now() + 1e3;
|
|
476
|
-
while ((0, ownership_claim_exports.processGroupAlive)(pid) && performance.now() < deadline) await setTimeout$1(25);
|
|
477
|
-
if ((0, ownership_claim_exports.processGroupAlive)(pid)) refuse(`Report child ${pid} still has descendants after cleanup.`);
|
|
478
|
-
}
|
|
529
|
+
if (pid !== void 0 && process.platform !== "win32" && !await waitForGroupExit(pid, groupExitBudgetMs(REPORT_CHILD_EXIT_CAP_MS))) refuse(`Report child ${pid} still has descendants after cleanup.`);
|
|
479
530
|
})();
|
|
480
531
|
if (report) trackReportResource(context, closed, cancel, signal);
|
|
481
532
|
else {
|
|
@@ -642,26 +693,42 @@ const defaultExecutor = {
|
|
|
642
693
|
clearDeclaration = resolveDeclaration;
|
|
643
694
|
retainDeclaration = rejectDeclaration;
|
|
644
695
|
}) : void 0;
|
|
645
|
-
const
|
|
696
|
+
const contained = startsInReportJob(file, opts, containProcessTree || Boolean(report));
|
|
697
|
+
const base = contained && timeout !== void 0 ? join$1(tmpdir(), `stim-report-${process.pid}-${randomUUID()}`) : null;
|
|
698
|
+
const markers = base ? {
|
|
699
|
+
started: `${base}.started`,
|
|
700
|
+
closed: `${base}.closed`
|
|
701
|
+
} : void 0;
|
|
702
|
+
const start = () => contained ? spawnReportJob(file, args, opts, markers) : spawn(file, args, opts);
|
|
646
703
|
const child = declareFor ? spawnDeclared(declareFor, start, declaration ? { until: declaration } : {}) : start();
|
|
647
704
|
let lifetime;
|
|
648
705
|
let cancel;
|
|
649
706
|
let timer;
|
|
707
|
+
let poll;
|
|
708
|
+
let phase = markers ? "starting" : "running";
|
|
709
|
+
const stopTimers = () => {
|
|
710
|
+
clearTimeout(timer);
|
|
711
|
+
clearInterval(poll);
|
|
712
|
+
for (const marker of Object.values(markers ?? {})) try {
|
|
713
|
+
rmSync(marker, { force: true });
|
|
714
|
+
} catch {}
|
|
715
|
+
};
|
|
650
716
|
try {
|
|
651
717
|
lifetime = reportChild(child, report, (error) => {
|
|
652
718
|
const failure = claims.length ? Object.assign(new WorkspaceProcessCleanupError(claims, error.message, "Verify the child and its descendants have stopped."), { reportCleanup: true }) : error;
|
|
653
|
-
|
|
719
|
+
stopTimers();
|
|
654
720
|
return failure;
|
|
655
721
|
});
|
|
656
722
|
cancel = lifetime?.cancel;
|
|
657
723
|
if (cleanupOnExit && cancel) child.once("exit", () => {
|
|
658
|
-
|
|
724
|
+
stopTimers();
|
|
659
725
|
cancel?.().catch(reject);
|
|
660
726
|
});
|
|
661
727
|
lifetime?.closed.catch(reject);
|
|
662
728
|
if (declaration) lifetime?.closed.then(clearDeclaration, retainDeclaration);
|
|
663
729
|
onSpawn?.(child);
|
|
664
730
|
} catch (error) {
|
|
731
|
+
stopTimers();
|
|
665
732
|
if (cancel) cancel().then(() => lifetime?.closed).then(() => reject(error), reject);
|
|
666
733
|
else {
|
|
667
734
|
if (!report) child.kill("SIGKILL");
|
|
@@ -697,24 +764,42 @@ const defaultExecutor = {
|
|
|
697
764
|
}
|
|
698
765
|
}
|
|
699
766
|
};
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
767
|
+
const arm = (ms) => {
|
|
768
|
+
clearTimeout(timer);
|
|
769
|
+
timer = setTimeout(() => {
|
|
770
|
+
timedOut = true;
|
|
771
|
+
clearInterval(poll);
|
|
772
|
+
if (cancel) cancel().catch(reject);
|
|
773
|
+
else {
|
|
774
|
+
child.kill(killSignal ?? "SIGTERM");
|
|
775
|
+
child.stdin?.destroy();
|
|
776
|
+
child.stdout?.destroy();
|
|
777
|
+
child.stderr?.destroy();
|
|
778
|
+
}
|
|
779
|
+
}, ms);
|
|
780
|
+
};
|
|
781
|
+
if (timeout !== void 0 && markers) {
|
|
782
|
+
arm(REPORT_JOB_PHASE_MS);
|
|
783
|
+
poll = setInterval(() => {
|
|
784
|
+
if (phase === "starting" && existsSync(markers.started)) {
|
|
785
|
+
phase = "running";
|
|
786
|
+
arm(timeout);
|
|
787
|
+
}
|
|
788
|
+
if (phase === "running" && existsSync(markers.closed)) {
|
|
789
|
+
phase = "closing";
|
|
790
|
+
arm(REPORT_JOB_PHASE_MS);
|
|
791
|
+
clearInterval(poll);
|
|
792
|
+
}
|
|
793
|
+
}, 50);
|
|
794
|
+
} else if (timeout !== void 0) arm(timeout);
|
|
710
795
|
child.stdout?.on("data", (chunk) => capture(stdout, chunk));
|
|
711
796
|
child.stderr?.on("data", (chunk) => capture(stderr, chunk));
|
|
712
797
|
child.on("error", (error) => {
|
|
713
|
-
|
|
798
|
+
stopTimers();
|
|
714
799
|
reject(redactError(error, redact));
|
|
715
800
|
});
|
|
716
801
|
const finish = async (status, signal) => {
|
|
717
|
-
|
|
802
|
+
stopTimers();
|
|
718
803
|
await lifetime?.closed;
|
|
719
804
|
const discardOutput = (timedOut || overflowed || report?.aborted) && redact?.some(Boolean);
|
|
720
805
|
const out = discardOutput ? "" : Buffer.concat(stdout).toString("utf-8");
|
|
@@ -726,7 +811,10 @@ const defaultExecutor = {
|
|
|
726
811
|
stderr: err
|
|
727
812
|
};
|
|
728
813
|
if (report?.aborted) reject(report.reason);
|
|
729
|
-
else if (timedOut
|
|
814
|
+
else if (timedOut && phase !== "running") {
|
|
815
|
+
const message = `The Windows report job did not ${phase === "starting" ? "start" : "exit"} within ${REPORT_JOB_PHASE_MS}ms: ${command}`;
|
|
816
|
+
reject(redactError(Object.assign(new Error(message), result, { code: "ETIMEDOUT" }), redact));
|
|
817
|
+
} else if (timedOut) reject(redactError(nameTimeout(Object.assign(new Error(command), result, { code: "ETIMEDOUT" }), command, timeoutMs), redact));
|
|
730
818
|
else if (overflowed) reject(redactError(Object.assign(/* @__PURE__ */ new Error(`Command output exceeded ${MAX_BUFFER} bytes: ${command}`), result, { code: "ENOBUFS" }), redact));
|
|
731
819
|
else if (status !== 0 || rejectStderr && err.trim()) reject(redactError(Object.assign(/* @__PURE__ */ new Error(`Command failed: ${command}${err ? `\n${err}` : ""}`), result), redact));
|
|
732
820
|
else resolve(detachedSilent ? "" : untrimmed ? out : out.trim());
|
|
@@ -855,4 +943,4 @@ function getExecutor() {
|
|
|
855
943
|
return active;
|
|
856
944
|
}
|
|
857
945
|
//#endregion
|
|
858
|
-
export {
|
|
946
|
+
export { reportSignal as C, ownership_claim_exports as D, debugLog as E, __commonJSMin as O, process_identity_exports as S, trackReportResource as T, spawnDeclared as _, waitForGroupExit as a, operationState as b, throwIfCancelled as c, workspaceProcessLockError as d, workspaceProcessLockPath as f, signalDeclaredSpawns as g, refuseDeclaredSpawns as h, loadScaledBudgetMs as i, __require as k, WorkspaceProcessCleanupError as l, declareSpawnsOn as m, isTimeoutError as n, cancellableSleep as o, allowDeclaredSpawns as p, groupExitBudgetMs as r, cancelledError as s, getExecutor as t, withWorkspaceProcessLock as u, stopDeclaringSpawnsOn as v, runReport as w, withDrainingCancellation as x, isTermination as y };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-
|
|
1
|
+
import { At as findStaleDeviceRecords, Ct as deleteParkedSims, Et as describeUnverifiableDevices, Tt as describeParkedSims, jt as findStaleProjectDevices, kt as findOrphanedDevices, ot as selectCaches } from "./budget-dPGuhNai.mjs";
|
|
2
|
+
import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-yVKpAOKM.mjs";
|
|
3
3
|
export { collectGcReport, gcCommand as default, deleteParkedSims, describeParkedSims, describeUnverifiableDevices, executeGc, findOrphanedDevices, findStaleDeviceRecords, findStaleProjectDevices, formatGcReport, readGcReport, runGc, selectCaches, withGcMaintenanceClaim };
|