stim 1.23.1 → 1.25.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-BzYRDgaP.mjs → acquire-artifact-zA4S7RHE.mjs} +2 -2
- package/dist/{act-vxiMwdf5.mjs → act-BbHS3oV8.mjs} +41 -26
- package/dist/{activity-BpWUPgUm.mjs → activity-BpjwrQXU.mjs} +6 -6
- package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-Bnkerfod.mjs} +5 -5
- package/dist/{android-DtfRGLcc.mjs → android-BGwuK3Mc.mjs} +75 -50
- package/dist/{android-CLi6DSiS.mjs → android-CNZgRC-4.mjs} +5 -5
- package/dist/{android-C7sVmyI9.mjs → android-Cjcj8MCw.mjs} +140 -46
- package/dist/{android-cas-ngferVq2.mjs → android-cas-BVqh2Zep.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-DVWyCbWU.d.mts → android-project-CTYaETc0.d.mts} +6 -2
- package/dist/{android-DR5lZ2Az.mjs → android-saBeB4lr.mjs} +13 -3
- package/dist/api.d.mts +22 -5
- package/dist/api.mjs +32 -31
- package/dist/{artifact-Xvgibgzq.mjs → artifact-Co8zixVx.mjs} +19 -17
- package/dist/{artifact-DBI3DALs.mjs → artifact-DN8JNwqS.mjs} +18 -17
- package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
- package/dist/{browser-web-BJN9ZHxB.mjs → browser-web-CCgZsHmI.mjs} +16 -17
- package/dist/{budget-3ivAK99e.mjs → budget-HyShrIpL.mjs} +149 -47
- package/dist/{build-Dv9s8Fz-.mjs → build-CAiw8Ezm.mjs} +33 -29
- package/dist/{build-cache-Dv7RN200.mjs → build-cache-CKCzxzxA.mjs} +172 -21
- package/dist/{build-plan-BmbdHQbr.mjs → build-plan-zCuHGlA8.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-CH2EWGPB.mjs → ccache-h1FKhZeg.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-BkK6Wr5i.mjs → cli-C4w607Pz.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-B4MMzfo_.mjs → client-BQsmyp_-.mjs} +274 -39
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-YKGWivpG.mjs → command-output-BBvS1H6v.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-BwNCYG5Q.mjs} +2 -2
- package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
- package/dist/{dev-client-BFxiDpkf.mjs → dev-client-CHoXXZeg.mjs} +3 -3
- package/dist/{device-CiNYxqp6.mjs → device-B9FqTBYW.mjs} +81 -54
- package/dist/{device-B7ljwccX.mjs → device-F5-4z9ef.mjs} +16 -16
- package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-ZYaRALv5.mjs} +20 -16
- package/dist/device-host-worker.mjs +17 -17
- package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DkHBrmvH.mjs} +32 -50
- package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-ogEeJ62K.mjs} +6 -6
- package/dist/{device-pool-B4iOXIrD.mjs → device-pool-BIg8MU8l.mjs} +3 -3
- package/dist/{doctor-DRu-8ld6.mjs → doctor-A_Nr_fDe.mjs} +1 -1
- package/dist/{doctor-HUC1igzw.mjs → doctor-Bm8TVpGn.mjs} +37 -31
- package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-C6t4Maue.mjs → doctor-k3P3PizH.mjs} +14 -14
- package/dist/{doctor-watchman-iGBpC6KM.mjs → doctor-watchman-BovI1y3-.mjs} +5 -5
- package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CyDKNTBP.mjs} +4 -4
- package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-gaZi-dJL.mjs} +16 -15
- package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-BMCA1gdO.mjs} +12 -8
- package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-B1Mj_-7h.mjs} +17 -42
- package/dist/{errors-ccaPc4ox.mjs → errors-DHm_U5gv.mjs} +2 -1
- package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
- package/dist/{gc-BW8E1uSC.mjs → gc-B9jcnmIk.mjs} +205 -28
- package/dist/{gc-dDE4QPVu.mjs → gc-eaz403W6.mjs} +2 -2
- package/dist/{guide-DYYEO3Wz.mjs → guide-DR0K0xW9.mjs} +328 -89
- package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-Bvb2-ZxD.mjs} +4 -4
- package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-rsRqysJc.mjs} +4 -4
- package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-RtVcJH3u.mjs} +1 -1
- package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CWKGYWNX.mjs} +11 -6
- package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-d0pv9Tth.mjs} +7 -7
- package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-BxTizGU2.mjs} +58 -11
- package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BIyfl0Zj.mjs} +10 -10
- package/dist/{ios-hcBpnEGk.mjs → ios-BQzvJlzw.mjs} +122 -17
- package/dist/{ios-CWjqfSm_.mjs → ios-BRVM8b0P.mjs} +81 -49
- package/dist/{ios-DTOYZGMJ.mjs → ios-Dvt97HgQ.mjs} +8 -8
- 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-DFGuwF4U.mjs → ios-device-CKSvk0bu.mjs} +3 -3
- package/dist/{ios-project-CSZYI1iu.mjs → ios-project-DCUDo06I.mjs} +5 -5
- package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
- package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-CT9nV5SP.mjs} +15 -7
- package/dist/{js-swap-BSBHldmm.mjs → js-swap-Z9HbC4cj.mjs} +7 -6
- package/dist/{launch-D-zq8SHG.mjs → launch-D0lPvFFu.mjs} +49 -30
- package/dist/{launch-CP2wDCVd.mjs → launch-DscF1QfM.mjs} +52 -50
- package/dist/{logs-pNvA2hHK.mjs → logs-BsIRre8x.mjs} +16 -9
- package/dist/{logs-By5aw3g9.mjs → logs-Crs9y34Z.mjs} +8 -6
- package/dist/{macos-CPMahOC2.mjs → macos-CcUlJPMu.mjs} +1 -1
- package/dist/{macos-C67FZ2ft.mjs → macos-D477nfzH.mjs} +49 -42
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-DiXtA3Ty.mjs → metro-1pJgCX4U.mjs} +4 -4
- package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-Bp9gJQAN.mjs} +3 -4
- package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BVbn8SvC.mjs} +3 -3
- package/dist/{native-android-_MWSs3PP.mjs → native-android-BvMizJn1.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BJscK4vN.mjs} +5 -5
- package/dist/{native-run-Dv88i0aU.mjs → native-run-D5OJsGwA.mjs} +6 -6
- package/dist/{native-runtime-DBRfY_PN.mjs → native-runtime-B9w_Qyz3.mjs} +10 -9
- package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
- package/dist/{native-xcode-inputs-CqViUh3r.mjs → native-xcode-inputs-Cv4l-obn.mjs} +2 -2
- package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-DGrg90hE.mjs} +21 -20
- package/dist/offload-worker.d.mts +12 -4
- package/dist/offload-worker.mjs +78 -43
- package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
- package/dist/{ownership-C5fo5Edb.mjs → ownership-jxxz-19m.mjs} +3 -3
- package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
- package/dist/phone-reverses-CYb7RRAx.mjs +57 -0
- package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DjOXJRIH.mjs} +1 -1
- package/dist/{plan-placement-cr0fEU7b.mjs → plan-placement-BqKgKHCi.mjs} +3 -3
- package/dist/{ports-DpXjKkSV.mjs → ports-DtS1Amb0.mjs} +3 -3
- package/dist/{prebuild-BligW0QS.mjs → prebuild-JUaqOLpc.mjs} +14 -9
- package/dist/{project-DhCtQWWU.mjs → project-BiC68mIp.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-ZlhQfhvq.mjs → react-native-android-DRYqoJc4.mjs} +76 -32
- package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-CwZB-agu.mjs} +23 -20
- package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-BCrytK7h.mjs} +10 -9
- package/dist/{react-native-ios-C5W0SA6f.mjs → react-native-ios-Cr1buNFo.mjs} +41 -24
- package/dist/{recordings-CQmfzAh7.mjs → recordings-BaoQ0t-J.mjs} +1 -1
- package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
- package/dist/{reload-QcwnYLYV.mjs → reload-Beftw2X3.mjs} +1 -1
- package/dist/{reload-COJWTbae.mjs → reload-FbSgMF8x.mjs} +144 -42
- package/dist/{remote-DR8qUERM.mjs → remote-BuZj6AyU.mjs} +16 -7
- package/dist/{result-utnBea7x.mjs → result-CR2vk2cj.mjs} +41 -18
- package/dist/{run-DidHghD1.mjs → run-BtzE09Dl.mjs} +2 -2
- package/dist/{selection-DSMbWEX2.mjs → selection-D5cxEl3t.mjs} +13 -7
- package/dist/{server-bare-CafzuyFB.mjs → server-bare-CH9X0RLn.mjs} +56 -4
- package/dist/{server-command-B9o92sLM.mjs → server-command-CaBbDNU2.mjs} +5 -5
- package/dist/server-expo-C16Zf2k7.mjs +2 -0
- package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Ck8EIidM.mjs} +14 -9
- package/dist/{settings-C7O8A6ZI.mjs → settings-B5tCoq9N.mjs} +132 -39
- package/dist/{settings-PfJx8uK1.mjs → settings-DzH9mGQZ.mjs} +1 -1
- package/dist/{settings-write-Chuy7Cte.mjs → settings-write-n0zwfohx.mjs} +7 -7
- package/dist/settings.schema.json +51 -0
- package/dist/{simslim-BNckWpXi.mjs → simslim-BjxszUAb.mjs} +22 -7
- package/dist/{slot-launch-B7AuoWJv.mjs → slot-launch-QeuJMlnJ.mjs} +6 -6
- package/dist/{stage-C4u17aES.mjs → stage-D8xlRU2D.mjs} +2 -3
- package/dist/{start-BL_BsiWt.mjs → start-C1JLjkNw.mjs} +1 -1
- package/dist/{start-CU8mCPC7.mjs → start-YMpNwLhh.mjs} +75 -35
- package/dist/{state--smjFSTL.mjs → state-DMRNP7-4.mjs} +4 -4
- package/dist/{state-08I3hw3_.mjs → state-DPaM3u5K.mjs} +2 -2
- package/dist/{stats-CO6sK0Nh.mjs → stats-CP7STzZw.mjs} +5 -5
- package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
- package/dist/{status-_WPHzVft.mjs → status-CRLiJ-O_.mjs} +24 -24
- package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
- package/dist/{status-CrJutl6-.mjs → status-cNw6i0_t.mjs} +1 -1
- package/dist/{status-watch-BHFasOZN.mjs → status-watch-Bc2J4TZn.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-iuFHjUST.mjs → stop-Br7LKxBE.mjs} +2 -2
- package/dist/{stop-CR5689oB.mjs → stop-COP6PQqw.mjs} +5 -5
- package/dist/{stop-BJ06ipTZ.mjs → stop-Db9Kh-UA.mjs} +109 -56
- package/dist/supervisor-run.mjs +17 -17
- package/dist/{support-CbXPbUMJ.mjs → support-Cxj9CmII.mjs} +6 -6
- package/dist/{support-TWuQlHQo.mjs → support-qKcbgmI5.mjs} +14 -11
- package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-iY9fsmOc.mjs} +4 -4
- package/dist/{swiftpm-macos-DbwGCpZg.mjs → swiftpm-macos-Bp_sn9P4.mjs} +15 -14
- package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-DB1aeqxO.mjs} +1 -1
- package/dist/{toolchain-B9hCFCQw.mjs → toolchain-VzLJzZ7O.mjs} +69 -37
- 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-BV3ZPmcY.mjs} +6 -6
- package/dist/{web-DRF_oFXk.mjs → web-B4Yjyt1G.mjs} +12 -10
- package/dist/web-DS4UDWvf.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-CPSp3mav.mjs} +11 -4
- package/dist/{workspaces-e41xsjKr.mjs → workspaces-C9w4aeXF.mjs} +36 -32
- package/dist/{worktree-B4Nj3EGS.mjs → worktree-CclFIe1Z.mjs} +324 -99
- package/dist/{worktree-BEwxVwKF.mjs → worktree-Ct9Gk3KL.mjs} +1 -1
- package/dist/{xcode-Rq744mBF.mjs → xcode-CiIIDnuD.mjs} +42 -28
- package/package.json +7 -7
- package/shim/bundle-response.cjs +53 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +23 -1
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
- package/dist/server-expo-Ddr8cG_c.mjs +0 -2
- package/dist/trigger-yb_nFzPF.mjs +0 -2
- package/dist/web-kDE9Myoy.mjs +0 -2
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, a as waitForGroupExit, c as throwIfCancelled, d as workspaceProcessLockError, l as WorkspaceProcessCleanupError, o as cancellableSleep, r as groupExitBudgetMs, t as getExecutor, u as withWorkspaceProcessLock, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { l as workspaceAgentDeviceDir, m as workspaceLogsDir$1, n as ensureWorkspaceStorage, s as supervisorLogFile } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { E as upsertProject, O as withConfigLockAsync$1, p as getProject } from "./config-
|
|
4
|
-
import { _ as stepTimer, l as phaseLine } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { E as upsertProject, O as withConfigLockAsync$1, p as getProject, x as releaseMetroPort } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { _ as stepTimer, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { i as recordWorkspaceUse, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-CPSp3mav.mjs";
|
|
6
|
+
import { A as metroCommandSettingError, F as ngrokUrlSetting, G as resolveAndroidLayout, H as remoteAndroidSetting, K as resolveCacheProviderConfig, M as metroPortSetting, N as metroTunnelSettingError, W as remoteIosSetting, Y as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, at as unknownSettingKeys, ct as PUBLIC_METRO_ENV, h as deviceIdleShutdownMinutesSetting, it as tunnelModeSetting, j as metroIdleStopMinutesSetting, k as metroCommandSetting, lt as detectProviders, m as defaultAndroidLayout, p as cacheProviderSettingError, q as resolveIosProjectDir, tt as settingShapeErrors, ut as planMetroReach, z as publicUrlSetting } from "./settings-B5tCoq9N.mjs";
|
|
7
|
+
import { E as MODE_EXPO, M as readMetroTunnel, O as clearManagedMetroTunnel, S as readAppJson, T as MODE_COMMAND, c as projectProblem, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL, v as detectIsExpo, w as MODE_BARE, x as readAppConfigText } from "./project-BiC68mIp.mjs";
|
|
8
|
+
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-DS0mzR8U.mjs";
|
|
9
|
+
import { _ as PORT_INSPECTION_REMEDY, a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, f as signalProcessTree, g as reserveMetroPort, h as isMetroRunning, m as createPortProbe, u as processCwds, v as PortInspectionError } from "./metro-1pJgCX4U.mjs";
|
|
9
10
|
import { i as levelRank } from "./ndjson-CgE_o3Dl.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { _ as stopTunnel, g as startTunnelSequence, h as resolveSupervisorTarget, v as terminateChild, x as withManagedTunnelLock, y as withManagedRemoteWorktreeLock } from "./workspaces-e41xsjKr.mjs";
|
|
13
|
-
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-D5OGpYZM.mjs";
|
|
11
|
+
import { Ln as exitAfterFlush, Yn as readProjectConfig, er as remoteCliInvocation, p as stopOwnedMetroForReset, t as budgetGate, zn as runProcessOperation } from "./budget-HyShrIpL.mjs";
|
|
12
|
+
import { S as withManagedTunnelLock, _ as startTunnelSequence, b as withManagedRemoteWorktreeLock, g as resolveSupervisorTarget, v as stopTunnel, y as terminateChild } from "./workspaces-C9w4aeXF.mjs";
|
|
14
13
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
15
|
-
import { n as windowsLauncherArgs } from "./detached-entry-
|
|
14
|
+
import { n as windowsLauncherArgs } from "./detached-entry-KmieOKgN.mjs";
|
|
16
15
|
import { appendFileSync, closeSync, mkdirSync, openSync, readFileSync } from "node:fs";
|
|
17
16
|
import { dirname } from "node:path";
|
|
18
17
|
import { ambientContext, ambientEnv } from "@stim-cli/core";
|
|
@@ -244,12 +243,11 @@ const DEFAULT_START_DEPS = {
|
|
|
244
243
|
if (child.pid && process.platform !== "win32") try {
|
|
245
244
|
signalProcessTree(child.pid, "SIGTERM", { group: true });
|
|
246
245
|
} catch {}
|
|
247
|
-
return terminateChild(child, {
|
|
246
|
+
return await terminateChild(child, {
|
|
248
247
|
alreadyExited: false,
|
|
249
248
|
timeoutMs: 1e3,
|
|
250
|
-
isAlive: pidExists
|
|
251
|
-
|
|
252
|
-
});
|
|
249
|
+
isAlive: pidExists
|
|
250
|
+
}) && (process.platform === "win32" || !child.pid || await waitForGroupExit(child.pid, groupExitBudgetMs()));
|
|
253
251
|
},
|
|
254
252
|
withWorktreeLock: withManagedRemoteWorktreeLock,
|
|
255
253
|
withTunnelLock: withManagedTunnelLock,
|
|
@@ -372,7 +370,19 @@ var StartRefusal = class extends Error {
|
|
|
372
370
|
this.refusal = refusal;
|
|
373
371
|
}
|
|
374
372
|
};
|
|
375
|
-
|
|
373
|
+
var MetroPortRace = class extends StartRefusal {
|
|
374
|
+
port;
|
|
375
|
+
constructor(refusal, port) {
|
|
376
|
+
super(refusal);
|
|
377
|
+
this.port = port;
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
const PORT_RACE_ATTEMPTS = 3;
|
|
381
|
+
function portBindRace(lines, port) {
|
|
382
|
+
const bind = new RegExp(`EADDRINUSE\\b.*:${port}\\b`);
|
|
383
|
+
return lines.some((line) => bind.test(line));
|
|
384
|
+
}
|
|
385
|
+
async function startDevServer({ root, settings, settingsContext, waitSeconds = DEFAULT_WAIT_SECONDS, remote: remoteFlag = false, resetCache = false, hostedPorts, out, note }, overrides = {}) {
|
|
376
386
|
const d = {
|
|
377
387
|
...DEFAULT_START_DEPS,
|
|
378
388
|
...overrides
|
|
@@ -459,7 +469,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
459
469
|
const pid = child?.pid;
|
|
460
470
|
if (pid) {
|
|
461
471
|
const alive = () => d.platform === "win32" ? !identity || (0, process_identity_exports.inspectProcessIdentity)(identity) !== "gone" : (0, ownership_claim_exports.processGroupAlive)(pid);
|
|
462
|
-
const deadline = Date.now() +
|
|
472
|
+
const deadline = Date.now() + groupExitBudgetMs();
|
|
463
473
|
while (alive() && Date.now() < deadline) await cancellableSleep(25);
|
|
464
474
|
if (alive()) throw new WorkspaceProcessCleanupError(claims, `Could not confirm cleanup of Expo config process ${pid}.`, "Inspect and stop the Expo config process and its helpers before retrying.");
|
|
465
475
|
}
|
|
@@ -482,7 +492,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
482
492
|
env: ambientEnv(),
|
|
483
493
|
signal: operationSignal
|
|
484
494
|
});
|
|
485
|
-
reclaimed = budget.reclaimed;
|
|
495
|
+
reclaimed = [...reclaimed, ...budget.reclaimed];
|
|
486
496
|
if (budget.refusal) return fail(budget.refusal);
|
|
487
497
|
};
|
|
488
498
|
if (resetCache) {
|
|
@@ -506,7 +516,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
506
516
|
}
|
|
507
517
|
const logsDir = workspaceLogsDir$1(root);
|
|
508
518
|
const logFile = supervisorLogFile(root);
|
|
509
|
-
const port = await resolvePort(root, settings, note, fail);
|
|
519
|
+
const port = await resolvePort(root, settings, note, fail, hostedPorts);
|
|
510
520
|
let publicOrigin = remote ? publicUrl : null;
|
|
511
521
|
let resolution = await resolveStartupMetro(port, root);
|
|
512
522
|
let supervisor = liveSupervisor({
|
|
@@ -750,7 +760,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
750
760
|
throw new WorkspaceProcessCleanupError(claims, `Supervisor pid ${child.pid} published ownership that cannot be reconciled with the workspace registry.`, "Inspect the supervisor and its dev server, then stop them with their original tooling before retrying.");
|
|
751
761
|
}
|
|
752
762
|
const same = spawnedIdentity && (0, process_identity_exports.inspectProcessIdentity)(spawnedIdentity) === "same";
|
|
753
|
-
const supervisorCleanup = childExit !== null && !(0, ownership_claim_exports.processGroupAlive)(child.pid) || Boolean(same && supervisorSignalable(child) && await d.terminateSupervisorChild(child));
|
|
763
|
+
const supervisorCleanup = childExit !== null && (same ? !(0, ownership_claim_exports.processGroupAlive)(child.pid) : await waitForGroupExit(child.pid, groupExitBudgetMs())) || Boolean(same && supervisorSignalable(child) && await d.terminateSupervisorChild(child));
|
|
754
764
|
const publicationRacedCleanup = hasPublishedSupervisor();
|
|
755
765
|
if (!supervisorCleanup || d.platform !== "win32" && (0, ownership_claim_exports.processGroupAlive)(child.pid) || publicationRacedCleanup) {
|
|
756
766
|
if (publicationRacedCleanup) for (const held of claims) (0, ownership_claim_exports.markClaimChildPending)(held);
|
|
@@ -763,6 +773,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
763
773
|
throw new WorkspaceProcessCleanupError(claims, `Could not reconcile supervisor ownership: ${cause.message}`, "Inspect and stop the supervisor with its original tooling before retrying.");
|
|
764
774
|
}
|
|
765
775
|
};
|
|
776
|
+
let refusal;
|
|
766
777
|
try {
|
|
767
778
|
if (remote && !tunnel && !publicUrl && tunnelMode !== "off") {
|
|
768
779
|
const available = d.providers(tunnelMode);
|
|
@@ -1117,7 +1128,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
1117
1128
|
const gone = childExit !== null || (child.pid ? !pidExists(child.pid) : false);
|
|
1118
1129
|
const exitInfo = childExit;
|
|
1119
1130
|
const how = exitInfo ? exitInfo.signal ? `signal ${exitInfo.signal}` : `code ${exitInfo.code}` : "without being observed";
|
|
1120
|
-
|
|
1131
|
+
const failure = gone ? {
|
|
1121
1132
|
code: "STIM_SUPERVISOR_EXITED",
|
|
1122
1133
|
message: `The supervisor exited (${how}) before the dev server came up on port ${port}.`,
|
|
1123
1134
|
lines: failureEvidence({
|
|
@@ -1135,7 +1146,9 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
1135
1146
|
sinceTs: attemptStartedTs
|
|
1136
1147
|
}),
|
|
1137
1148
|
remedy: "It may still be starting. Run `stim stop` to halt it, or `stim logs` to follow along."
|
|
1138
|
-
}
|
|
1149
|
+
};
|
|
1150
|
+
if (gone && !remote && metroPortSetting(settings, ambientEnv()).port === null && portBindRace(failure.lines ?? [], port)) throw new MetroPortRace(failure, port);
|
|
1151
|
+
return fail(failure);
|
|
1139
1152
|
}
|
|
1140
1153
|
if (managedTunnelExited()) return failExitedManagedTunnel();
|
|
1141
1154
|
if (tunnel) {
|
|
@@ -1165,13 +1178,36 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
1165
1178
|
logsDir,
|
|
1166
1179
|
alreadyRunning: false
|
|
1167
1180
|
});
|
|
1181
|
+
} catch (error) {
|
|
1182
|
+
if (error instanceof StartRefusal) refusal = error;
|
|
1183
|
+
throw error;
|
|
1168
1184
|
} finally {
|
|
1169
|
-
await reconcileSpawnedSupervisor()
|
|
1185
|
+
await reconcileSpawnedSupervisor().catch((cleanup) => {
|
|
1186
|
+
if (refusal && cleanup instanceof WorkspaceProcessCleanupError) {
|
|
1187
|
+
cleanup.message = `${refusal.message} ${cleanup.message}`;
|
|
1188
|
+
cleanup.cause = refusal;
|
|
1189
|
+
}
|
|
1190
|
+
throw cleanup;
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
const runStartRetryingPortRace = async (claim, tunnelClaim) => {
|
|
1195
|
+
for (let attempt = 1;; attempt++) try {
|
|
1196
|
+
return await runStart(claim, tunnelClaim);
|
|
1197
|
+
} catch (error) {
|
|
1198
|
+
if (!(error instanceof MetroPortRace)) throw error;
|
|
1199
|
+
if (attempt === PORT_RACE_ATTEMPTS) throw new StartRefusal({
|
|
1200
|
+
...error.refusal,
|
|
1201
|
+
remedy: `Another process took port ${error.port} after Stim reserved it, ${PORT_RACE_ATTEMPTS} times in a row. Run \`stim start\` again; it reserves a free port.`
|
|
1202
|
+
});
|
|
1203
|
+
await withConfigLockAsync$1(() => releaseMetroPort(root, error.port), operationSignal);
|
|
1204
|
+
note(chalk.yellow(`Port ${error.port} was taken by another process while the dev server started.`));
|
|
1205
|
+
note(chalk.dim("Reserving another port and starting again."));
|
|
1170
1206
|
}
|
|
1171
1207
|
};
|
|
1172
1208
|
const startLocked = async () => {
|
|
1173
1209
|
try {
|
|
1174
|
-
return await d.withTunnelLock(root, (tunnelClaim) => withWorkspaceProcessLock(dirname(workspaceLogsDir$1(root)), "metro-start", (claim) =>
|
|
1210
|
+
return await d.withTunnelLock(root, (tunnelClaim) => withWorkspaceProcessLock(dirname(workspaceLogsDir$1(root)), "metro-start", (claim) => runStartRetryingPortRace(claim, tunnelClaim), {
|
|
1175
1211
|
external: true,
|
|
1176
1212
|
signal: operationSignal
|
|
1177
1213
|
}), { signal: operationSignal });
|
|
@@ -1220,7 +1256,7 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
1220
1256
|
if (error instanceof WorkspaceProcessCleanupError) return {
|
|
1221
1257
|
ok: false,
|
|
1222
1258
|
error: startError(error),
|
|
1223
|
-
lines: [],
|
|
1259
|
+
lines: error.cause instanceof StartRefusal ? error.cause.refusal.lines ?? [] : [],
|
|
1224
1260
|
reclaimed,
|
|
1225
1261
|
retainedClaimRoots: [...new Set(error.claims.map((claim) => claim.root))]
|
|
1226
1262
|
};
|
|
@@ -1233,11 +1269,11 @@ async function startDevServer({ root, settings, settingsContext, waitSeconds = D
|
|
|
1233
1269
|
};
|
|
1234
1270
|
}
|
|
1235
1271
|
}
|
|
1236
|
-
async function resolvePort(root, settings, note, fail) {
|
|
1237
|
-
const result = await resolveWorkspaceMetroPort(root, settings, note, "start");
|
|
1272
|
+
async function resolvePort(root, settings, note, fail, hostedPorts) {
|
|
1273
|
+
const result = await resolveWorkspaceMetroPort(root, settings, note, "start", true, hostedPorts);
|
|
1238
1274
|
return typeof result === "number" ? result : fail(result);
|
|
1239
1275
|
}
|
|
1240
|
-
async function resolveWorkspaceMetroPort(root, settings, note, command, reserve = true) {
|
|
1276
|
+
async function resolveWorkspaceMetroPort(root, settings, note, command, reserve = true, hostedPorts) {
|
|
1241
1277
|
const setting = metroPortSetting(settings, ambientEnv());
|
|
1242
1278
|
if (setting.error) return {
|
|
1243
1279
|
code: "STIM_BAD_ARG",
|
|
@@ -1275,23 +1311,27 @@ async function resolveWorkspaceMetroPort(root, settings, note, command, reserve
|
|
|
1275
1311
|
message: `Port ${pinned} is held by something else (${held.notOurs}), and metro.port pins this workspace's Metro to it.`,
|
|
1276
1312
|
remedy: "Stop the process on that port, or set another metro.port."
|
|
1277
1313
|
};
|
|
1314
|
+
if (hostedPorts && !held.metro && !await hostedPorts.free(pinned)) return hostedPorts.busy(pinned);
|
|
1278
1315
|
if (recorded === pinned) return recorded;
|
|
1279
1316
|
} else if (recorded) {
|
|
1280
1317
|
const held = await resolveStartupMetro(recorded, root);
|
|
1281
|
-
|
|
1282
|
-
|
|
1318
|
+
const hostBusy = !held.notOurs && hostedPorts && !held.metro && !await hostedPorts.free(recorded) ? hostedPorts.machine : null;
|
|
1319
|
+
if (!held.notOurs && !hostBusy) return recorded;
|
|
1320
|
+
const fresh = await reservePort(root, null, hostedPorts);
|
|
1283
1321
|
if (typeof fresh === "number" && fresh !== recorded) {
|
|
1284
|
-
note(chalk.yellow(`Port ${recorded} is held by something else (${held.notOurs}).`));
|
|
1322
|
+
note(chalk.yellow(hostBusy ? `Port ${recorded} is in use on ${hostBusy}, where an Expo dev client loads its bundle from this workspace's Metro port.` : `Port ${recorded} is held by something else (${held.notOurs}).`));
|
|
1285
1323
|
note(chalk.dim(`Reserved port ${fresh} for this project instead.`));
|
|
1286
1324
|
}
|
|
1287
1325
|
return fresh;
|
|
1288
1326
|
}
|
|
1289
1327
|
if (!reserve && pinned !== null) return pinned;
|
|
1290
|
-
return reservePort(root, pinned);
|
|
1328
|
+
return reservePort(root, pinned, hostedPorts);
|
|
1291
1329
|
}
|
|
1292
|
-
async function reservePort(root, pinned) {
|
|
1330
|
+
async function reservePort(root, pinned, hostedPorts) {
|
|
1331
|
+
const local = hostedPorts && createPortProbe();
|
|
1332
|
+
const isFree = local && (async (port) => await local(port) && await hostedPorts.free(port));
|
|
1293
1333
|
try {
|
|
1294
|
-
return await reserveMetroPort(root, void 0,
|
|
1334
|
+
return await reserveMetroPort(root, void 0, isFree, pinned, ambientContext()?.signal);
|
|
1295
1335
|
} catch (error) {
|
|
1296
1336
|
throwIfCancelled(ambientContext()?.signal, "Metro startup");
|
|
1297
1337
|
if (error instanceof PortInspectionError) return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { d as workspaceDir, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { t as runOperationFile } from "./operation-exec-
|
|
4
|
-
import { d as writeWorkspaceState, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-
|
|
5
|
-
import { c as pidExists } from "./metro-
|
|
3
|
+
import { t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
|
|
4
|
+
import { d as writeWorkspaceState, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-CPSp3mav.mjs";
|
|
5
|
+
import { c as pidExists } from "./metro-1pJgCX4U.mjs";
|
|
6
6
|
import { readFileSync, readlinkSync, rmSync } from "node:fs";
|
|
7
7
|
import { hostname } from "node:os";
|
|
8
8
|
import { join } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as process_identity_exports } from "./exec-VFRpu1iA.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-CPSp3mav.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-BZhXY15H.mjs";
|
|
2
|
+
import { o as formatLongDuration } from "./command-output-BBvS1H6v.mjs";
|
|
3
|
+
import { i as findProjectRoot$1 } from "./project-BiC68mIp.mjs";
|
|
4
|
+
import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-Bnkerfod.mjs";
|
|
5
|
+
import { t as readProjectStats } from "./stats-report-n2U5plhk.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 { i as gitPath } from "./operation-exec-
|
|
1
|
+
import { i as gitPath } from "./operation-exec-CUZifp6Z.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,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as process_identity_exports, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1, p as workspaceLogErrorIndex } from "./paths-DQtTgsBf.mjs";
|
|
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-
|
|
4
|
-
import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-
|
|
5
|
-
import { s as gitAsync } from "./operation-exec-
|
|
6
|
-
import { r as readWorkspaceState$1 } from "./workspace-state-
|
|
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-BZhXY15H.mjs";
|
|
4
|
+
import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
|
|
6
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-CPSp3mav.mjs";
|
|
7
|
+
import { Nt as repoRoot, Tt as linkedWorktreesOnDisk, X as resolveSettings, bt as gitCommonDirOnDisk, st as workspaceHiddenSetting, vt as gitCommonDir } from "./settings-B5tCoq9N.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-BiC68mIp.mjs";
|
|
9
|
+
import { A as listAdbDevices, B as ownedAvdDeviceProfile, W as ownedAvdSerialResolver, ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting, yt as readParked } from "./android-Cjcj8MCw.mjs";
|
|
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-1pJgCX4U.mjs";
|
|
9
11
|
import { a as parseNdjsonLine } from "./ndjson-CgE_o3Dl.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { h as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import "./
|
|
20
|
-
import { i as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
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-BHFasOZN.mjs";
|
|
12
|
+
import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-DMRNP7-4.mjs";
|
|
13
|
+
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-BMCA1gdO.mjs";
|
|
14
|
+
import { F as buildStatusLine, I as bundlingActivity, N as activeBuildState, P as buildReport, R as parseActiveBuild, Sr as readFootprints, Z as statsProjectKey$1, h as describeMetroLastStop, j as ACTIVE_BUILD_KEY, o as machineNumber, q as readStats$1, xn as hasMetroReverse, xr as attributeMachineUsage, y as metroLastStop } from "./budget-HyShrIpL.mjs";
|
|
15
|
+
import { g as resolveSupervisorTarget } from "./workspaces-C9w4aeXF.mjs";
|
|
16
|
+
import { a as createDeviceProcessTables, b as leaseIsExpired, h as tailLines, m as readWebActivity, r as createActivityReader, w as parseWorkspaceLeases, x as listLeaseFiles } from "./activity-BpjwrQXU.mjs";
|
|
17
|
+
import { b as parseSimctlList, f as listAllIosSimsAsync } from "./ios-BQzvJlzw.mjs";
|
|
18
|
+
import { f as probeHostedSession } from "./hosted-client-rsRqysJc.mjs";
|
|
19
|
+
import "./hosted-macos-d0pv9Tth.mjs";
|
|
20
|
+
import { i as readSupervisorState } from "./stop-Db9Kh-UA.mjs";
|
|
21
|
+
import { n as maintenanceLines, r as maintenanceStatus } from "./status-Fect2w9R.mjs";
|
|
22
|
+
import { f as mergeState, i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures } from "./warm-progress-BV3ZPmcY.mjs";
|
|
23
|
+
import { r as workspaceRecordingEnabled } from "./recordings-BaoQ0t-J.mjs";
|
|
24
|
+
import { d as readIosDevices, s as isReachable } from "./ios-device-CKSvk0bu.mjs";
|
|
25
|
+
import { t as triggerMaintenance } from "./trigger-CBMe2YLH.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-Bc2J4TZn.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as formatBytes } from "./config-
|
|
1
|
+
import { P as formatBytes } from "./config-BZhXY15H.mjs";
|
|
2
2
|
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
3
3
|
import { claimRemoveCommand, readClaimSet } from "@stim-cli/core/ownership-claim";
|
|
4
4
|
import { maintenanceRunClaims, readMaintenanceState } from "@stim-cli/core/state";
|
|
@@ -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-CRLiJ-O_.mjs";
|
|
2
2
|
export { statusCommand as default, readVolumes, runStatusWatch };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { b as parseSimctlList } from "./ios-
|
|
1
|
+
import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { d as androidToolPath } from "./android-Cjcj8MCw.mjs";
|
|
3
|
+
import { c as pidExists } from "./metro-1pJgCX4U.mjs";
|
|
4
|
+
import { n as easMachineStateRoot } from "./eas-session-ledger-BMCA1gdO.mjs";
|
|
5
|
+
import { b as parseSimctlList } from "./ios-BQzvJlzw.mjs";
|
|
6
6
|
import { existsSync, readdirSync, statSync, watch } from "node:fs";
|
|
7
7
|
import { basename, dirname, join } from "node:path";
|
|
8
8
|
//#region src/status-watch.ts
|
package/dist/status-worker.mjs
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Clones <source> to <destination> with one clonefile(2) call, which on APFS clones a whole directory hierarchy in a
|
|
2
|
+
// single operation instead of one file at a time. <destination> must not exist. clonefile(2) fails with EXDEV across
|
|
3
|
+
// volumes and ENOTSUP on file systems without clone support; the error goes to stderr and the exit status is 1.
|
|
4
|
+
|
|
5
|
+
#include <errno.h>
|
|
6
|
+
#include <stdio.h>
|
|
7
|
+
#include <string.h>
|
|
8
|
+
#include <sys/clonefile.h>
|
|
9
|
+
|
|
10
|
+
int main(int argc, char **argv) {
|
|
11
|
+
if (argc != 3) {
|
|
12
|
+
fputs("usage: stim-clonefile <source> <destination>\n", stderr);
|
|
13
|
+
return 64;
|
|
14
|
+
}
|
|
15
|
+
if (clonefile(argv[1], argv[2], CLONE_NOFOLLOW) == 0) return 0;
|
|
16
|
+
fprintf(stderr, "clonefile: %s\n", strerror(errno));
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
@@ -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-VFRpu1iA.mjs";
|
|
2
|
+
import { C as saveConfig, c as ensureConfig } from "./config-BZhXY15H.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 { g as resolveSupervisorTarget } from "./workspaces-C9w4aeXF.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-Db9Kh-UA.mjs";
|
|
3
3
|
export { clearCollectorState, clearSupervisorState, stopCommand as default, readCollectorState, readSupervisorState, resolveCollectorTargets, resolveSupervisorTarget, runStop, stopWorkspaceNow };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, u as withWorkspaceProcessLock } from "./exec-VFRpu1iA.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 { n as stopHostedMacos } from "./hosted-macos-
|
|
3
|
+
import { d as writeWorkspaceState, l as withWorkspaceStateLockAsync } from "./workspace-state-CPSp3mav.mjs";
|
|
4
|
+
import { a as macosRuntimeClaim, o as requiredMacosRecord } from "./state-DPaM3u5K.mjs";
|
|
5
|
+
import { w as runningBundleInstancesAsync } from "./workspaces-C9w4aeXF.mjs";
|
|
6
|
+
import { n as stopHostedMacos } from "./hosted-macos-d0pv9Tth.mjs";
|
|
7
7
|
import { readMacosRecord } from "@stim-cli/core/state";
|
|
8
8
|
//#region src/macos/stop.ts
|
|
9
9
|
const APP_EXIT_MS = 5e3;
|