stim 1.20.0 → 1.20.2
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 +6 -3
- package/dist/{activity-BrGh9EAI.mjs → activity-BSV745Kz.mjs} +4 -4
- package/dist/{agent-device-usage-output-DVyv_hWj.mjs → agent-device-usage-output-Dzgv6lgR.mjs} +5 -6
- package/dist/{android-Brx6EKvJ.mjs → android-DCKZrNvV.mjs} +37 -38
- package/dist/{android-0vv-OruW.mjs → android-Dlzxshgp.mjs} +5 -5
- package/dist/{android-CK3fpEyZ.mjs → android-HqP1_vB_.mjs} +3 -3
- package/dist/{android-BsYNR81W.mjs → android-Mz_Inn3w.mjs} +12 -12
- package/dist/{android-cas-DCAuXryb.mjs → android-cas-Bl-cLJBk.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{api-zuX3ynYN.mjs → api-qvOzWyfO.mjs} +1 -1
- package/dist/api-run.mjs +19 -21
- package/dist/api.mjs +1 -1
- package/dist/{app-install-0LgaQRT7.mjs → app-install-BIKtMfPq.mjs} +71 -48
- package/dist/{artifact-DClXJNWx.mjs → artifact-D3czlUvT.mjs} +13 -13
- package/dist/{artifact-CnC0mfov.mjs → artifact-HSwkIWEQ.mjs} +12 -12
- package/dist/{browser-web-CzBmhmgs.mjs → browser-web-CA-F1GQo.mjs} +18 -18
- package/dist/{budget-BONq9vXY.mjs → budget-f7516Zk0.mjs} +23 -26
- package/dist/{build-BixRI6sB.mjs → build-DYDbfkk5.mjs} +28 -33
- package/dist/{build-plan-CP0tckNU.mjs → build-plan-B7SZsc2N.mjs} +17 -17
- package/dist/{cache-manifest-qA3dT2x2.mjs → cache-manifest-XH-fvDUj.mjs} +10 -5
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cancellation-C_22VQTH.mjs +24 -0
- package/dist/{ccache-CjHQ5F8g.mjs → ccache-zdKiYQ3E.mjs} +7 -7
- package/dist/{chrome-Dp2lMLBe.mjs → chrome-BnzZMqsR.mjs} +1 -1
- package/dist/{cli-B2R8wH1F.mjs → cli-CLP3diBm.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-BLy1Pw2V.mjs → client-qQAaXSUs.mjs} +21 -29
- package/dist/collector-run.d.mts +7 -6
- package/dist/collector-run.mjs +6 -7
- package/dist/{command-output-BjPN99ZB.mjs → command-output-BTy8hZ0F.mjs} +1 -1
- package/dist/{config-D0LhTY3S.mjs → config-BYDxlMY3.mjs} +43 -5
- package/dist/{created-devices-HU_DAb_Q.mjs → created-devices-Dzd5C2LF.mjs} +2 -2
- package/dist/{dependency-state-B2m8eqsS.mjs → dependency-state-DG0p31-y.mjs} +2 -2
- package/dist/{detached-entry-BXq4fIl-.mjs → detached-entry-B9C_zeQC.mjs} +1 -1
- package/dist/{dev-client-ClATaJoH.mjs → dev-client-DAWVIGBu.mjs} +2 -2
- package/dist/{device-DVCwAFlX.mjs → device-BECOiufl.mjs} +13 -14
- package/dist/{device-B7lsC0K1.mjs → device-DuiPJQSn.mjs} +8 -8
- package/dist/{device-capacity-Ca_ke1LE.mjs → device-capacity-CBUAcRyQ.mjs} +10 -11
- package/dist/device-host-worker.mjs +16 -17
- package/dist/{device-ios-CRUqPxKw.mjs → device-ios-COSi6oS1.mjs} +12 -15
- package/dist/{device-lease-DHOBXGgS.mjs → device-lease-BX1sJQ2E.mjs} +15 -18
- package/dist/{device-lease-run-CvDeHTkG.mjs → device-lease-run-Cw2M4z51.mjs} +4 -4
- package/dist/{device-pool-L2-5GxMy.mjs → device-pool-Bf-pOhSw.mjs} +3 -3
- package/dist/{device-remote-Bmg42063.mjs → device-remote-xRT0Vmo9.mjs} +14 -14
- package/dist/{doctor-C2MSuMMg.mjs → doctor-CB8oZKCk.mjs} +13 -13
- package/dist/{doctor-DPAqhVCK.mjs → doctor-kfMBnUw6.mjs} +78 -69
- package/dist/{doctor-watchman-CB4NnVZm.mjs → doctor-watchman-BRyV2adA.mjs} +9 -10
- package/dist/{eas-build-Dw_ec2Km.mjs → eas-build-JyfqyHfC.mjs} +5 -5
- package/dist/{eas-session-ledger-DZlC-Fq3.mjs → eas-session-ledger-Cm0Gwq2F.mjs} +6 -4
- package/dist/{error-diagnostics-Du7I_GuY.mjs → error-diagnostics-BR677IDM.mjs} +10 -10
- package/dist/{exec-B81Qodjn.mjs → exec-DqKo9GKJ.mjs} +22 -8
- package/dist/{gc-PWp34zGb.mjs → gc-qWOMdnER.mjs} +75 -24
- package/dist/git-DDfFzkMm.mjs +45 -0
- package/dist/{gradle-C2OEKCCI.mjs → gradle-DSrXb6lG.mjs} +6 -6
- package/dist/{guide-Dai9lphv.mjs → guide-G9cAbVAc.mjs} +81 -178
- package/dist/{hosted-android-DQ-Agsd8.mjs → hosted-android-C3MHGld1.mjs} +3 -3
- package/dist/{hosted-client-Io01s5By.mjs → hosted-client-ZEKpS9vw.mjs} +19 -11
- package/dist/{hosted-ios-DIxFnYp-.mjs → hosted-ios-l-o3iM9J.mjs} +1 -1
- package/dist/{hosted-logs-DP-ABU_M.mjs → hosted-logs-EzQM7-3Z.mjs} +7 -7
- package/dist/{hosted-macos-Aziw9T_9.mjs → hosted-macos-BACVAVqE.mjs} +10 -8
- package/dist/{hosted-native-BdAQi21M.mjs → hosted-native-A4s1QPXe.mjs} +13 -11
- package/dist/{idle-shutdown-DdMqoSUB.mjs → idle-shutdown-DtxhPTKe.mjs} +7 -7
- package/dist/{ios-BZ9dg2Fr.mjs → ios-BwVCF7oA.mjs} +8 -8
- package/dist/{ios-CZuv6gRv.mjs → ios-Ce7bc7br.mjs} +29 -29
- package/dist/{ios-CXLIUxXJ.mjs → ios-RkW4pnQf.mjs} +21 -17
- package/dist/{ios-device-B1B14xND.mjs → ios-device-B5veSDDQ.mjs} +1 -1
- package/dist/{ios-device-BreZOpM0.mjs → ios-device-D7pi2Sca.mjs} +14 -14
- package/dist/{ios-VGvNdsv2.mjs → ios-nOLJGVdy.mjs} +1 -1
- package/dist/{ios-project-B9drt_aY.mjs → ios-project-K9hY_Jab.mjs} +8 -8
- package/dist/{ios-state-CjrL2qv-.mjs → ios-state-CBLe1xYw.mjs} +1 -1
- package/dist/{js-swap-C8icNYIY.mjs → js-swap-Bb3nsS07.mjs} +13 -13
- package/dist/{launch-YrbqaIFj.mjs → launch-C3qJ6Agb.mjs} +46 -45
- package/dist/{launch-DxH0THLP.mjs → launch-F4sOqAhB.mjs} +21 -21
- package/dist/{launch-verify-BzRdbuO1.mjs → launch-verify-B6Q8hZP-.mjs} +11 -11
- package/dist/{logs-DHaRNfg7.mjs → logs-BGrEUaEs.mjs} +10 -11
- package/dist/{macos-V_3Ui7g4.mjs → macos-Ch5VJmcS.mjs} +40 -24
- package/dist/macos-D7uDvO-z.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-D_j9sN-B.mjs → metro-DnCEjCxs.mjs} +8 -9
- package/dist/{metro-gateway-BBJldOdi.mjs → metro-gateway-CX9Xlkq2.mjs} +3 -3
- package/dist/{miss-reason-BPAzZS0r.mjs → miss-reason-mKzZ4VvN.mjs} +3 -3
- package/dist/{named-ports-C2lvoPsb.mjs → named-ports-4WopRPg-.mjs} +4 -5
- package/dist/{native-android-lHzaew7r.mjs → native-android-D5qc3-_v.mjs} +10 -10
- package/dist/{native-gradle-inputs-BQnIdAlL.mjs → native-gradle-inputs-BsLRrl7u.mjs} +3 -10
- package/dist/{native-runtime-BRmWL7ru.mjs → native-runtime-k8dTIrbK.mjs} +7 -8
- package/dist/{native-xcode-inputs-eutS19jU.mjs → native-xcode-inputs-CykopJdM.mjs} +7 -9
- package/dist/{native-xcode-ios-DP3cHLwu.mjs → native-xcode-ios-Bbf30Gm0.mjs} +15 -15
- package/dist/offload-worker.mjs +34 -38
- package/dist/{ownership-DXzMMSx6.mjs → ownership-DCtw_2IA.mjs} +3 -3
- package/dist/{page-Bv9s2KwY.mjs → page-DRHy329N.mjs} +1 -1
- package/dist/{placement-log-reFbjqEr.mjs → placement-log-MOfPVgaM.mjs} +1 -1
- package/dist/{plan-BDk2AeY_.mjs → plan-C4TjdPsR.mjs} +10 -10
- package/dist/{plan-placement-D_YYlE6N.mjs → plan-placement-V0TdzYXp.mjs} +3 -3
- package/dist/{ports-jzvAJXXL.mjs → ports-DdSUicVo.mjs} +3 -3
- package/dist/{prebuild-Bw44QxVh.mjs → prebuild-DYbucPXy.mjs} +7 -8
- package/dist/{preview-BaBJ72Al.mjs → preview-78a9kR_-.mjs} +31 -24
- package/dist/{project-B8_duAzW.mjs → project-_phNIJfs.mjs} +110 -47
- package/dist/{pull-request-vOhLNmIb.mjs → pull-request-CQ8sPbZa.mjs} +5 -18
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-chm1DMlA.mjs → react-native-android-CM1XRDwv.mjs} +34 -30
- package/dist/{react-native-build-oAw6gQeW.mjs → react-native-build-CtCccJtb.mjs} +6 -6
- package/dist/{react-native-doctor-DYXoh-6I.mjs → react-native-doctor-CfRnFfjs.mjs} +5 -5
- package/dist/{react-native-ios-SCTK_CT5.mjs → react-native-ios-Dhq_eiYQ.mjs} +14 -14
- package/dist/{recordings-Bk-VivUV.mjs → recordings-D0d5aQt0.mjs} +1 -1
- package/dist/{reload-D34GkY78.mjs → reload-C8JhxjSh.mjs} +17 -17
- package/dist/{remote-BU9UyhCJ.mjs → remote-BiR6aYjy.mjs} +7 -7
- package/dist/{remote-cache-Bsts6f6Y.mjs → remote-cache-OyOyVIS3.mjs} +4 -4
- package/dist/{result-BDoRk1k3.mjs → result-CaJg5Iat.mjs} +8 -8
- package/dist/{run-qvff78hv.mjs → run-BtPgpKks.mjs} +3 -3
- package/dist/{server-bare-dWjAarki.mjs → server-bare-R2m_gsH8.mjs} +3 -3
- package/dist/{server-command-7XIKlWtO.mjs → server-command-CTtCkmcQ.mjs} +5 -5
- package/dist/server-expo-Bigriskl.mjs +2 -0
- package/dist/{server-expo-CsYu2aKL.mjs → server-expo-DsguMGUF.mjs} +5 -10
- package/dist/{settings-Bbztm4oV.mjs → settings-B717odTD.mjs} +74 -115
- package/dist/{settings-CT3E71-i.mjs → settings-BORNaaCO.mjs} +5 -5
- package/dist/settings.schema.json +1 -1
- package/dist/{simslim-ChMfe8rg.mjs → simslim-CCr3rE-A.mjs} +2 -3
- package/dist/{slot-launch-B9hn96wd.mjs → slot-launch-DPt0m9Nd.mjs} +6 -6
- package/dist/{spawn-claims-Kqiifsk2.mjs → spawn-claims-DVS5RkMS.mjs} +1 -1
- package/dist/{stage-BNKKdDNc.mjs → stage-KNTQopqv.mjs} +9 -9
- package/dist/{start-CdvcTaXr.mjs → start-BWqzODpb.mjs} +19 -20
- package/dist/{start-CbQCSnXQ.mjs → start-TXeMmmO2.mjs} +1 -1
- package/dist/{state-Boo0IMJq.mjs → state-CG_OFoaA.mjs} +2 -2
- package/dist/{state-DI84A-uu.mjs → state-D1Icyjlu.mjs} +8 -7
- package/dist/{stats-BIIDrjA8.mjs → stats-BoY5sEPU.mjs} +5 -5
- package/dist/{status-BDGHwkCs.mjs → status-BTA7kKiQ.mjs} +1 -1
- package/dist/{status-DARMkc9q.mjs → status-WgFbkRzj.mjs} +30 -47
- package/dist/{status-watch-DvmI3SmN.mjs → status-watch-C23ILtf9.mjs} +4 -4
- package/dist/{stim-desktop-8GQX2OV8.mjs → stim-desktop-BzBN2Em2.mjs} +1 -1
- package/dist/{stop-iNemHsJC.mjs → stop-BNmBMi1F.mjs} +18 -19
- package/dist/{stop-WQPQHLuy.mjs → stop-DPEhunlw.mjs} +6 -6
- package/dist/{stop-CCZS-C9m.mjs → stop-DR6VoDIk.mjs} +2 -2
- package/dist/supervisor-run.mjs +16 -17
- package/dist/{support-DCco5fut.mjs → support-CwjbFs9H.mjs} +9 -9
- package/dist/{support-CnE_SIjt.mjs → support-DMTqj3Hm.mjs} +6 -6
- package/dist/{swiftpm-macos-afeNUExW.mjs → swiftpm-macos-DRNVJWlb.mjs} +9 -9
- package/dist/{tailnet-CoJUb2tB.mjs → tailnet-Dh-qiYzG.mjs} +5 -5
- package/dist/toolchain-BFkAcstd.mjs +2 -0
- package/dist/{toolchain-DqyDXs30.mjs → toolchain-DxSsNssu.mjs} +10 -10
- package/dist/trigger-9_USgmxz.mjs +2 -0
- package/dist/{trigger-C0MWBi8O.mjs → trigger-CigAYjeL.mjs} +2 -2
- package/dist/{warm-progress-C3ASD6z5.mjs → warm-progress-BuY-Fvfn.mjs} +43 -61
- package/dist/{watchman-CQl51YZu.mjs → watchman-CPQFZLXY.mjs} +6 -6
- package/dist/{web-B3eldHFH.mjs → web-BDBMxDpx.mjs} +9 -9
- package/dist/web-Dq-i3wzJ.mjs +2 -0
- package/dist/web-run.mjs +14 -14
- package/dist/{workspace-state-CSIFuuDa.mjs → workspace-state-DJt_MMvf.mjs} +16 -6
- package/dist/{workspaces-D2xSHBDY.mjs → workspaces-C36s2jb9.mjs} +15 -16
- package/dist/{worktree-BxDqaTev.mjs → worktree-CgvJYJ-Q.mjs} +96 -89
- package/dist/{worktree-q7_OZNY0.mjs → worktree-DpLdCHga.mjs} +1 -1
- package/package.json +6 -7
- package/dist/macos-C0iljhsN.mjs +0 -2
- package/dist/process-identity-Biv3arCO.mjs +0 -40
- package/dist/server-expo-DV43vep4.mjs +0 -2
- package/dist/toolchain-BIupIro1.mjs +0 -2
- package/dist/trigger-SHLOWJ4O.mjs +0 -2
- package/dist/web-BLXpOe6b.mjs +0 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { E as workspaceStateFile, S as workspaceId, w as workspaceLogsDir$1, x as workspaceDir } from "./workspace-state-
|
|
5
|
-
import { a as formatElapsed } from "./command-output-
|
|
6
|
-
import { N as readRemoteSession, O as clearRemoteSession, j as readMetroTunnel, o as ownedDeviceLabel } from "./project-
|
|
7
|
-
import { s as pidExists } from "./metro-
|
|
8
|
-
import { N as probePublicHttp } from "./workspaces-
|
|
9
|
-
import { a as withWorkspaceProcessLock } from "./named-ports-
|
|
10
|
-
import { v as nativeRunWaitNotice } from "./tailnet-
|
|
11
|
-
import { D as sanitizeDeviceLabel } from "./ios-
|
|
12
|
-
import { c as readMetroRecords, o as isBundleProof } from "./launch-verify-
|
|
13
|
-
import {
|
|
14
|
-
import { a as removeEasSessionClaim, i as recordEasSessionClaim, n as easMachineStateRoot$1, o as compareStimVersions, r as readEasSessionLedger$1, t as assertEasMachineRootWritable } from "./eas-session-ledger-
|
|
1
|
+
import { d as getConfigDir } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { st as planMetroReach } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { E as workspaceStateFile, S as workspaceId, w as workspaceLogsDir$1, x as workspaceDir } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
|
+
import { a as formatElapsed } from "./command-output-BTy8hZ0F.mjs";
|
|
6
|
+
import { N as readRemoteSession, O as clearRemoteSession, j as readMetroTunnel, o as ownedDeviceLabel } from "./project-_phNIJfs.mjs";
|
|
7
|
+
import { s as pidExists } from "./metro-DnCEjCxs.mjs";
|
|
8
|
+
import { N as probePublicHttp } from "./workspaces-C36s2jb9.mjs";
|
|
9
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-4WopRPg-.mjs";
|
|
10
|
+
import { v as nativeRunWaitNotice } from "./tailnet-Dh-qiYzG.mjs";
|
|
11
|
+
import { D as sanitizeDeviceLabel } from "./ios-RkW4pnQf.mjs";
|
|
12
|
+
import { c as readMetroRecords, o as isBundleProof } from "./launch-verify-B6Q8hZP-.mjs";
|
|
13
|
+
import { d as devClientDeepLink, i as INSTALL_ERROR, o as LAUNCH_ERROR } from "./app-install-BIKtMfPq.mjs";
|
|
14
|
+
import { a as removeEasSessionClaim, i as recordEasSessionClaim, n as easMachineStateRoot$1, o as compareStimVersions, r as readEasSessionLedger$1, t as assertEasMachineRootWritable } from "./eas-session-ledger-Cm0Gwq2F.mjs";
|
|
15
15
|
import { existsSync, mkdirSync, realpathSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { dirname, join, resolve } from "node:path";
|
|
17
17
|
import { readJsonObject } from "@stim-cli/core/state";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { _ as loadConfig$1, p as getProject } from "./config-
|
|
2
|
-
import {
|
|
3
|
-
import { f as refuseNoProject, l as phaseLine } from "./command-output-
|
|
4
|
-
import { d as projectRegistry } from "./project-
|
|
5
|
-
import { J as inspectWatchmanMemory, Q as memorySweepIsScoped, a as inspectBudget, n as budgetLine } from "./budget-
|
|
6
|
-
import { C as inspectDeviceHostMachines, b as inspectBuildMachines, d as simulatorRuntime, s as offloadCheck } from "./client-
|
|
7
|
-
import { I as memoryCulpritFindings, L as readMemoryCulprits, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-
|
|
8
|
-
import { T as detectXcodeMajor } from "./toolchain-
|
|
9
|
-
import { o as compareStimVersions, s as inspectStimVersions } from "./eas-session-ledger-
|
|
10
|
-
import { h as resolveDeviceType, v as resolveRuntime } from "./support-
|
|
11
|
-
import { r as maintenanceStatus, t as maintenanceLine } from "./status-
|
|
12
|
-
import { a as writeIgnoreDirs, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding, s as recordDoctorRun } from "./doctor-watchman-
|
|
13
|
-
import { i as runDoctor, o as readMachineSettings } from "./doctor-
|
|
1
|
+
import { _ as loadConfig$1, p as getProject } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { Dt as repoRoot, I as projectSettingsContext } from "./settings-B717odTD.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
4
|
+
import { d as projectRegistry } from "./project-_phNIJfs.mjs";
|
|
5
|
+
import { J as inspectWatchmanMemory, Q as memorySweepIsScoped, a as inspectBudget, n as budgetLine } from "./budget-f7516Zk0.mjs";
|
|
6
|
+
import { C as inspectDeviceHostMachines, b as inspectBuildMachines, d as simulatorRuntime, s as offloadCheck } from "./client-qQAaXSUs.mjs";
|
|
7
|
+
import { I as memoryCulpritFindings, L as readMemoryCulprits, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-RkW4pnQf.mjs";
|
|
8
|
+
import { T as detectXcodeMajor } from "./toolchain-DxSsNssu.mjs";
|
|
9
|
+
import { o as compareStimVersions, s as inspectStimVersions } from "./eas-session-ledger-Cm0Gwq2F.mjs";
|
|
10
|
+
import { h as resolveDeviceType, v as resolveRuntime } from "./support-CwjbFs9H.mjs";
|
|
11
|
+
import { r as maintenanceStatus, t as maintenanceLine } from "./status-BTA7kKiQ.mjs";
|
|
12
|
+
import { a as writeIgnoreDirs, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding, s as recordDoctorRun } from "./doctor-watchman-BRyV2adA.mjs";
|
|
13
|
+
import { i as runDoctor, o as readMachineSettings } from "./doctor-kfMBnUw6.mjs";
|
|
14
14
|
import { dirname, join, sep } from "path";
|
|
15
15
|
import { isJsonObject, maintenanceNdjsonFile, readHostedAppMetadata, readHostedSessions } from "@stim-cli/core/state";
|
|
16
16
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { _ as loadConfig$1, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { r as gitQuiet, t as git } from "./git-DDfFzkMm.mjs";
|
|
4
|
+
import { B as remoteAndroidSetting, Ct as locallyKnownUpstream, D as mergeSettingsLayers, Dt as repoRoot, Ft as makeTemporaryDirectory, G as resolveIosProjectDir, H as remoteIosSetting, I as projectSettingsContext, Lt as temporaryRoot, Pt as filesystemDevice, Q as settingShapeErrors, St as listWorktrees, T as iosSimSlimProfileSetting, U as resolveAndroidLayout, X as settingOrigin, a as SETTING_SHAPE_REMEDY, et as settingsLayers, ht as gitCommonDir, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, kt as resolveSourceCheckout, m as defaultAndroidLayout, nt as unknownSettingKeys, pt as dirtyFingerprintFiles, q as resolveSettings, r as PATH_SETTINGS, rt as webSettings } from "./settings-B717odTD.mjs";
|
|
5
|
+
import { C as diffFingerprintSources, D as fingerprintProject, h as listBuildLocks } from "./device-lease-BX1sJQ2E.mjs";
|
|
6
|
+
import { b as workspaceDerivedData, m as sharedBuildCache } from "./workspace-state-DJt_MMvf.mjs";
|
|
7
|
+
import { d as quotedPath, u as plural } from "./command-output-BTy8hZ0F.mjs";
|
|
8
|
+
import { S as resolvePackageJson, _ as detectIsExpo, g as appProjectProblem, y as isPackageResolvable } from "./project-_phNIJfs.mjs";
|
|
9
|
+
import { D as hostSystemImageArch, at as POOL_SETTING_REMEDY, dt as parkedMaxSetting, o as androidHome } from "./android-Mz_Inn3w.mjs";
|
|
10
|
+
import { I as listBuildSlots } from "./workspaces-C36s2jb9.mjs";
|
|
11
|
+
import { l as realIo } from "./tailnet-Dh-qiYzG.mjs";
|
|
11
12
|
import { p as resolveOptimizations, u as compilerCacheFallbackMessage } from "./errors-DzkMYh8Q.mjs";
|
|
12
|
-
import { f as resolveEasCliBin, i as checkEasAuth$1, l as ownerFromConfig, u as providerFromConfig } from "./remote-cache-
|
|
13
|
-
import { M as hostMemoryPressureAdvice, P as readHostMemoryPressure } from "./ios-
|
|
14
|
-
import { i as projectCmakeLauncher } from "./ccache-
|
|
15
|
-
import { r as androidSdkRefusal } from "./gradle-
|
|
16
|
-
import { L as podInstallCommand } from "./toolchain-
|
|
17
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-
|
|
18
|
-
import { d as androidPathRoomRemedy, i as ccacheEnabled, l as androidPathRoom, t as apkOutputsDir, u as androidPathRoomMessage } from "./react-native-build-
|
|
19
|
-
import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-
|
|
20
|
-
import { g as easCliUpgradeRemedy, h as easCliSupport, m as MIN_EAS_CLI_SIMULATOR_VERSION, s as readInstalledEasCliVersion } from "./device-remote-
|
|
21
|
-
import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-
|
|
22
|
-
import { n as simslimIsOnPath } from "./simslim-
|
|
23
|
-
import { n as hasInstalledDependencies, r as installedNpmTreeIsValid, t as dependencyState } from "./dependency-state-
|
|
24
|
-
import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-
|
|
13
|
+
import { f as resolveEasCliBin, i as checkEasAuth$1, l as ownerFromConfig, u as providerFromConfig } from "./remote-cache-OyOyVIS3.mjs";
|
|
14
|
+
import { M as hostMemoryPressureAdvice, P as readHostMemoryPressure } from "./ios-RkW4pnQf.mjs";
|
|
15
|
+
import { i as projectCmakeLauncher } from "./ccache-zdKiYQ3E.mjs";
|
|
16
|
+
import { r as androidSdkRefusal } from "./gradle-DSrXb6lG.mjs";
|
|
17
|
+
import { L as podInstallCommand } from "./toolchain-DxSsNssu.mjs";
|
|
18
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-CBUAcRyQ.mjs";
|
|
19
|
+
import { d as androidPathRoomRemedy, i as ccacheEnabled, l as androidPathRoom, t as apkOutputsDir, u as androidPathRoomMessage } from "./react-native-build-CtCccJtb.mjs";
|
|
20
|
+
import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-Bl-cLJBk.mjs";
|
|
21
|
+
import { g as easCliUpgradeRemedy, h as easCliSupport, m as MIN_EAS_CLI_SIMULATOR_VERSION, s as readInstalledEasCliVersion } from "./device-remote-xRT0Vmo9.mjs";
|
|
22
|
+
import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-JyfqyHfC.mjs";
|
|
23
|
+
import { n as simslimIsOnPath } from "./simslim-CCr3rE-A.mjs";
|
|
24
|
+
import { n as hasInstalledDependencies, r as installedNpmTreeIsValid, t as dependencyState } from "./dependency-state-DG0p31-y.mjs";
|
|
25
|
+
import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-BnzZMqsR.mjs";
|
|
25
26
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, rmSync } from "node:fs";
|
|
26
27
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
27
28
|
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, relative as relative$1, resolve as resolve$1, sep as sep$1 } from "path";
|
|
28
29
|
import { isJsonObject, readJsonObject, readStats, settingDefinition } from "@stim-cli/core/state";
|
|
29
30
|
import { existsSync as existsSync$1, lstatSync as lstatSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, realpathSync as realpathSync$1, rmSync as rmSync$1 } from "fs";
|
|
30
31
|
import * as expoFingerprint from "@expo/fingerprint";
|
|
32
|
+
import { createRequire } from "module";
|
|
31
33
|
//#region src/diagnostics/doctor-config.ts
|
|
32
34
|
function readMachineSettings(context) {
|
|
33
35
|
try {
|
|
@@ -409,24 +411,18 @@ function repairCxxLauncherState(root, settings, layout = defaultAndroidLayout(ro
|
|
|
409
411
|
if (!contained(canonicalRoot, canonicalTarget)) throw new Error("generated directory resolves outside this checkout");
|
|
410
412
|
if (realpathSync(cxx) !== join(realpathSync(dirname(cxx)), ".cxx")) throw new Error(".cxx is a symbolic link");
|
|
411
413
|
const gitPath = relative(canonicalRoot, canonicalTarget);
|
|
412
|
-
if (
|
|
414
|
+
if (git(canonicalRoot, [
|
|
413
415
|
"ls-files",
|
|
414
416
|
"-z",
|
|
415
417
|
"--",
|
|
416
418
|
`:(literal)${gitPath}`
|
|
417
|
-
], {
|
|
418
|
-
|
|
419
|
-
timeoutMs: 5e3
|
|
420
|
-
})) throw new Error("directory contains tracked files");
|
|
421
|
-
getExecutor().runFile("git", [
|
|
419
|
+
], { timeoutMs: 5e3 })) throw new Error("directory contains tracked files");
|
|
420
|
+
git(canonicalRoot, [
|
|
422
421
|
"check-ignore",
|
|
423
422
|
"-q",
|
|
424
423
|
"--",
|
|
425
424
|
gitPath
|
|
426
|
-
], {
|
|
427
|
-
cwd: canonicalRoot,
|
|
428
|
-
timeoutMs: 5e3
|
|
429
|
-
});
|
|
425
|
+
], { timeoutMs: 5e3 });
|
|
430
426
|
const androidLocks = listBuildLocks().filter((lock) => lock.platform === "android");
|
|
431
427
|
if (androidLocks.some((lock) => lock.unresolved)) throw new Error("an Android build lock holder cannot be identified, so a build may be active");
|
|
432
428
|
if (androidLocks.some((lock) => {
|
|
@@ -524,9 +520,7 @@ function hasLinkedWorktree(projectRoot) {
|
|
|
524
520
|
return listWorktrees(root).filter((entry) => !entry.prunable && !entry.bare).length > 1;
|
|
525
521
|
}
|
|
526
522
|
function headBranch(root) {
|
|
527
|
-
const ref =
|
|
528
|
-
"-C",
|
|
529
|
-
root,
|
|
523
|
+
const ref = gitQuiet(root, [
|
|
530
524
|
"symbolic-ref",
|
|
531
525
|
"--quiet",
|
|
532
526
|
"HEAD"
|
|
@@ -534,9 +528,7 @@ function headBranch(root) {
|
|
|
534
528
|
return ref?.startsWith("refs/heads/") ? ref.slice(11) : null;
|
|
535
529
|
}
|
|
536
530
|
function mainOperation(root) {
|
|
537
|
-
const gitDir =
|
|
538
|
-
"-C",
|
|
539
|
-
root,
|
|
531
|
+
const gitDir = gitQuiet(root, [
|
|
540
532
|
"rev-parse",
|
|
541
533
|
"--path-format=absolute",
|
|
542
534
|
"--git-dir"
|
|
@@ -546,9 +538,7 @@ function mainOperation(root) {
|
|
|
546
538
|
return existsSync$1(join$1(gitDir, "MERGE_HEAD")) ? "merge" : null;
|
|
547
539
|
}
|
|
548
540
|
function dirtyTrackedPaths(root) {
|
|
549
|
-
return (
|
|
550
|
-
"-C",
|
|
551
|
-
root,
|
|
541
|
+
return (gitQuiet(root, [
|
|
552
542
|
"diff",
|
|
553
543
|
"--name-only",
|
|
554
544
|
"HEAD"
|
|
@@ -561,9 +551,7 @@ function resolveDefaultBranch(root) {
|
|
|
561
551
|
}).worktree;
|
|
562
552
|
const configured = worktree && typeof worktree === "object" && !Array.isArray(worktree) ? worktree.defaultBranch : void 0;
|
|
563
553
|
if (typeof configured === "string" && configured.trim()) return configured.trim();
|
|
564
|
-
const head =
|
|
565
|
-
"-C",
|
|
566
|
-
root,
|
|
554
|
+
const head = gitQuiet(root, [
|
|
567
555
|
"symbolic-ref",
|
|
568
556
|
"--short",
|
|
569
557
|
"refs/remotes/origin/HEAD"
|
|
@@ -1083,6 +1071,30 @@ function fingerprintConfigSkipped(root) {
|
|
|
1083
1071
|
code: "fingerprint-config-skipped"
|
|
1084
1072
|
};
|
|
1085
1073
|
}
|
|
1074
|
+
function fingerprintParitySkipped(title, detail, fix) {
|
|
1075
|
+
return {
|
|
1076
|
+
...finding("note", title, detail, fix),
|
|
1077
|
+
code: "fingerprint-parity-skipped"
|
|
1078
|
+
};
|
|
1079
|
+
}
|
|
1080
|
+
function fingerprintResolves(root, request) {
|
|
1081
|
+
try {
|
|
1082
|
+
createRequire(join$1(realpathSync$1(root), "package.json")).resolve(request);
|
|
1083
|
+
return true;
|
|
1084
|
+
} catch {
|
|
1085
|
+
return false;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
function coldFingerprintRunsProjectCode(root, platform) {
|
|
1089
|
+
const resolved = [
|
|
1090
|
+
"expo/package.json",
|
|
1091
|
+
"expo/config",
|
|
1092
|
+
"expo-modules-autolinking/package.json"
|
|
1093
|
+
].find((request) => fingerprintResolves(root, request))?.replace(/\/.*$/, "");
|
|
1094
|
+
if (resolved) return fingerprintParitySkipped("Skipped the fingerprint parity check: dependencies resolve from outside the app", `This app has no node_modules of its own, but ${resolved} resolves from outside it. @expo/fingerprint would evaluate the app config and run the autolinking CLI, which loads project config files, and doctor does not execute project code.`, "Builds load the config. Once you trust this checkout, `stim ios` or `stim android` reports whether a worktree hits the cache this checkout fills.");
|
|
1095
|
+
if (platform !== "ios") return fingerprintParitySkipped("Skipped the fingerprint parity check for Android or a project without an iOS directory on a checkout without dependencies", "Without expo-modules-autolinking installed, @expo/fingerprint runs `npx react-native config` in the project to read Android autolinking, which can load project config and download a CLI, and doctor does not execute project code.", "Once you trust this checkout, `stim android` reports whether a worktree hits the cache this checkout fills.");
|
|
1096
|
+
return null;
|
|
1097
|
+
}
|
|
1086
1098
|
function gitMetadataAt(path) {
|
|
1087
1099
|
try {
|
|
1088
1100
|
const git = lstatSync$1(join$1(path, ".git"));
|
|
@@ -1153,17 +1165,17 @@ async function detectLinkedLibraryGitMetadata(projectRoot, { createFingerprint =
|
|
|
1153
1165
|
};
|
|
1154
1166
|
}
|
|
1155
1167
|
async function detectFingerprintParity(projectRoot, { createFingerprint = expoFingerprint.createFingerprintAsync, differ = expoFingerprint.diffFingerprints, dirtyFiles = dirtyFingerprintFiles, platform: selectedPlatform, iosProjectPath = "ios" } = {}) {
|
|
1156
|
-
|
|
1157
|
-
if (exec.runFileQuiet("git", [
|
|
1158
|
-
"-C",
|
|
1159
|
-
projectRoot,
|
|
1160
|
-
"rev-parse",
|
|
1161
|
-
"--git-dir"
|
|
1162
|
-
], { timeoutMs: 1e4 }) == null) return null;
|
|
1168
|
+
if (gitQuiet(projectRoot, ["rev-parse", "--git-dir"]) == null) return null;
|
|
1163
1169
|
if (hasInstalledDependencies(projectRoot)) return null;
|
|
1164
1170
|
const skipped = fingerprintConfigSkipped(projectRoot);
|
|
1165
1171
|
if (skipped) return skipped;
|
|
1166
1172
|
const platform = selectedPlatform ?? (existsSync$1(join$1(projectRoot, iosProjectPath)) ? "ios" : existsSync$1(join$1(projectRoot, "android")) ? "android" : void 0);
|
|
1173
|
+
const unsafe = coldFingerprintRunsProjectCode(projectRoot, platform);
|
|
1174
|
+
if (unsafe) return unsafe;
|
|
1175
|
+
const coldFingerprint = (root, options) => createFingerprint(root, {
|
|
1176
|
+
...options,
|
|
1177
|
+
useRNCoreAutolinkingFromExpo: true
|
|
1178
|
+
});
|
|
1167
1179
|
let base;
|
|
1168
1180
|
try {
|
|
1169
1181
|
base = makeTemporaryDirectory(projectRoot, "stim-parity-");
|
|
@@ -1171,9 +1183,7 @@ async function detectFingerprintParity(projectRoot, { createFingerprint = expoFi
|
|
|
1171
1183
|
return null;
|
|
1172
1184
|
}
|
|
1173
1185
|
const worktree = join$1(base, "head");
|
|
1174
|
-
if (
|
|
1175
|
-
"-C",
|
|
1176
|
-
projectRoot,
|
|
1186
|
+
if (gitQuiet(projectRoot, [
|
|
1177
1187
|
"-c",
|
|
1178
1188
|
`core.hooksPath=${join$1(base, "hooks")}`,
|
|
1179
1189
|
"worktree",
|
|
@@ -1181,7 +1191,10 @@ async function detectFingerprintParity(projectRoot, { createFingerprint = expoFi
|
|
|
1181
1191
|
"--detach",
|
|
1182
1192
|
worktree,
|
|
1183
1193
|
"HEAD"
|
|
1184
|
-
], {
|
|
1194
|
+
], {
|
|
1195
|
+
write: true,
|
|
1196
|
+
timeoutMs: 6e4
|
|
1197
|
+
}) == null) {
|
|
1185
1198
|
rmSync$1(base, {
|
|
1186
1199
|
recursive: true,
|
|
1187
1200
|
force: true
|
|
@@ -1189,17 +1202,17 @@ async function detectFingerprintParity(projectRoot, { createFingerprint = expoFi
|
|
|
1189
1202
|
return null;
|
|
1190
1203
|
}
|
|
1191
1204
|
try {
|
|
1192
|
-
const headSkipped = fingerprintConfigSkipped(worktree);
|
|
1205
|
+
const headSkipped = fingerprintConfigSkipped(worktree) ?? coldFingerprintRunsProjectCode(worktree, platform);
|
|
1193
1206
|
if (headSkipped) return headSkipped;
|
|
1194
1207
|
const project = await fingerprintProject(projectRoot, {
|
|
1195
1208
|
platform,
|
|
1196
1209
|
iosProjectPath,
|
|
1197
|
-
createFingerprint
|
|
1210
|
+
createFingerprint: coldFingerprint
|
|
1198
1211
|
});
|
|
1199
1212
|
const clean = await fingerprintProject(worktree, {
|
|
1200
1213
|
platform,
|
|
1201
1214
|
iosProjectPath,
|
|
1202
|
-
createFingerprint
|
|
1215
|
+
createFingerprint: coldFingerprint
|
|
1203
1216
|
});
|
|
1204
1217
|
if (!project || !clean) return null;
|
|
1205
1218
|
if (project.hash === clean.hash) return null;
|
|
@@ -1218,24 +1231,20 @@ async function detectFingerprintParity(projectRoot, { createFingerprint = expoFi
|
|
|
1218
1231
|
} catch {
|
|
1219
1232
|
return null;
|
|
1220
1233
|
} finally {
|
|
1221
|
-
|
|
1222
|
-
"-C",
|
|
1223
|
-
projectRoot,
|
|
1234
|
+
gitQuiet(projectRoot, [
|
|
1224
1235
|
"worktree",
|
|
1225
1236
|
"remove",
|
|
1226
1237
|
"--force",
|
|
1227
1238
|
worktree
|
|
1228
|
-
], {
|
|
1239
|
+
], {
|
|
1240
|
+
write: true,
|
|
1241
|
+
timeoutMs: 3e4
|
|
1242
|
+
});
|
|
1229
1243
|
rmSync$1(base, {
|
|
1230
1244
|
recursive: true,
|
|
1231
1245
|
force: true
|
|
1232
1246
|
});
|
|
1233
|
-
|
|
1234
|
-
"-C",
|
|
1235
|
-
projectRoot,
|
|
1236
|
-
"worktree",
|
|
1237
|
-
"prune"
|
|
1238
|
-
], { timeoutMs: 1e4 });
|
|
1247
|
+
gitQuiet(projectRoot, ["worktree", "prune"], { write: true });
|
|
1239
1248
|
}
|
|
1240
1249
|
}
|
|
1241
1250
|
//#endregion
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { d as projectRegistry } from "./project-
|
|
5
|
-
import { o as runWatchman, r as parseWatchRoots } from "./watchman-
|
|
6
|
-
import { o as compareStimVersions } from "./eas-session-ledger-
|
|
1
|
+
import { E as upsertProject, d as getConfigDir, p as getProject } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { r as gitQuiet } from "./git-DDfFzkMm.mjs";
|
|
3
|
+
import { Dt as repoRoot, St as listWorktrees } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { d as projectRegistry } from "./project-_phNIJfs.mjs";
|
|
5
|
+
import { o as runWatchman, r as parseWatchRoots } from "./watchman-CPQFZLXY.mjs";
|
|
6
|
+
import { o as compareStimVersions } from "./eas-session-ledger-Cm0Gwq2F.mjs";
|
|
7
7
|
import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
9
|
+
import { isJsonObject } from "@stim-cli/core/state";
|
|
9
10
|
//#region src/guide-status.ts
|
|
10
11
|
const DAY_MS = 864e5;
|
|
11
12
|
const DOCTOR_STALE_MS = 7 * DAY_MS;
|
|
@@ -67,7 +68,7 @@ async function fetchLatest(fetchImpl) {
|
|
|
67
68
|
const res = await fetchImpl(LATEST_URL, { signal: AbortSignal.timeout(UPDATE_CHECK_TIMEOUT_MS) });
|
|
68
69
|
if (!res.ok) return null;
|
|
69
70
|
const body = await res.json();
|
|
70
|
-
return typeof body.version === "string" ? body.version : null;
|
|
71
|
+
return isJsonObject(body) && typeof body.version === "string" ? body.version : null;
|
|
71
72
|
}
|
|
72
73
|
async function checkForUpdate(running, { now = /* @__PURE__ */ new Date(), fetch: fetchImpl = fetch } = {}) {
|
|
73
74
|
if (process.env.STIM_NO_UPDATE_CHECK) return null;
|
|
@@ -198,9 +199,7 @@ function inspectNestedWorktrees(projectRoot) {
|
|
|
198
199
|
return worktrees.flatMap((checkout) => {
|
|
199
200
|
const configPath = join(checkout, ".watchmanconfig");
|
|
200
201
|
const config = readWatchmanConfig(configPath);
|
|
201
|
-
const { nested, add } = nestedWorktreeIgnores(checkout, worktrees, ignoreDirsOf(config), (dir) => Boolean(
|
|
202
|
-
"-C",
|
|
203
|
-
checkout,
|
|
202
|
+
const { nested, add } = nestedWorktreeIgnores(checkout, worktrees, ignoreDirsOf(config), (dir) => Boolean(gitQuiet(checkout, [
|
|
204
203
|
"ls-files",
|
|
205
204
|
"--",
|
|
206
205
|
dir
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import { g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-
|
|
4
|
-
import { f as resolveEasCliBin } from "./remote-cache-
|
|
5
|
-
import { g as easCliUpgradeRemedy, h as easCliSupport, s as readInstalledEasCliVersion } from "./device-remote-
|
|
1
|
+
import { j as ownership_claim_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-BX1sJQ2E.mjs";
|
|
4
|
+
import { f as resolveEasCliBin } from "./remote-cache-OyOyVIS3.mjs";
|
|
5
|
+
import { g as easCliUpgradeRemedy, h as easCliSupport, s as readInstalledEasCliVersion } from "./device-remote-xRT0Vmo9.mjs";
|
|
6
6
|
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
//#region src/engine/eas-build.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { D as withDirLock } from "./workspace-state-
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { D as withDirLock } from "./workspace-state-DJt_MMvf.mjs";
|
|
3
3
|
import { accessSync, constants, existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { delimiter, dirname, join, resolve } from "node:path";
|
|
5
5
|
import { easMachineStateRoot, easMachineStateRoot as easMachineStateRoot$1, easSessionLedgerFile, easSessionLedgerLock, readEasSessionLedger, readEasSessionLedger as readEasSessionLedger$1, validEasSessionClaim } from "@stim-cli/core/state";
|
|
@@ -186,14 +186,16 @@ function recordEasSessionClaim(claim, root = easMachineStateRoot()) {
|
|
|
186
186
|
});
|
|
187
187
|
}, { ensureParent: () => mkdirSync(dirname(easSessionLedgerLock(root)), { recursive: true }) });
|
|
188
188
|
}
|
|
189
|
-
function removeEasSessionClaim(sessionId, root = easMachineStateRoot()) {
|
|
189
|
+
function removeEasSessionClaim(sessionId, root = easMachineStateRoot(), when = () => true) {
|
|
190
190
|
const file = easSessionLedgerFile(root);
|
|
191
191
|
if (!existsSync(file)) return false;
|
|
192
192
|
assertEasMachineRootWritable(root);
|
|
193
193
|
return withDirLock(easSessionLedgerLock(root), () => {
|
|
194
194
|
const current = readEasSessionLedger(root);
|
|
195
195
|
if (!current.safe) return false;
|
|
196
|
-
|
|
196
|
+
const claim = current.claims.get(sessionId);
|
|
197
|
+
if (!claim || !when(claim)) return false;
|
|
198
|
+
current.claims.delete(sessionId);
|
|
197
199
|
writeLedger(root, {
|
|
198
200
|
version: 1,
|
|
199
201
|
claims: Object.fromEntries(current.claims)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-
|
|
4
|
-
import { D as withDirLock, r as readWorkspaceState$1 } from "./workspace-state-
|
|
5
|
-
import { v as launchErrorPreview } from "./command-output-
|
|
6
|
-
import { F as readWorkspaceLaunches } from "./project-
|
|
7
|
-
import { o as androidHome, u as androidToolCwd } from "./android-
|
|
8
|
-
import { u as resolveProjectMetro } from "./metro-
|
|
9
|
-
import { r as deviceConsoleLevel } from "./ios-device-
|
|
10
|
-
import { n as parseLogcatLine, t as androidClockOffset } from "./android-
|
|
1
|
+
import { B as deviceSlotKey, V as deviceSlotPlatforms, p as getProject } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-BX1sJQ2E.mjs";
|
|
4
|
+
import { D as withDirLock, r as readWorkspaceState$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
|
+
import { v as launchErrorPreview } from "./command-output-BTy8hZ0F.mjs";
|
|
6
|
+
import { F as readWorkspaceLaunches } from "./project-_phNIJfs.mjs";
|
|
7
|
+
import { o as androidHome, u as androidToolCwd } from "./android-Mz_Inn3w.mjs";
|
|
8
|
+
import { u as resolveProjectMetro } from "./metro-DnCEjCxs.mjs";
|
|
9
|
+
import { r as deviceConsoleLevel } from "./ios-device-B5veSDDQ.mjs";
|
|
10
|
+
import { n as parseLogcatLine, t as androidClockOffset } from "./android-HqP1_vB_.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
13
13
|
import { NATIVE_CRASH_LOG_PREFIX, attachExpoErrorContext, readLogRecords, readLogTimeline } from "@stim-cli/core/state";
|
|
@@ -8,6 +8,15 @@ const debugLog = createDebugLog("cli", { base: () => ({ runId: runId() }) });
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/exec.ts
|
|
10
10
|
const MAX_BUFFER = 67108864;
|
|
11
|
+
function budgetMs(timeoutMs) {
|
|
12
|
+
if (timeoutMs === "unbounded") return void 0;
|
|
13
|
+
if (!(timeoutMs > 0)) throw new RangeError(`timeoutMs must be a positive number of milliseconds or 'unbounded', got ${timeoutMs}`);
|
|
14
|
+
return timeoutMs;
|
|
15
|
+
}
|
|
16
|
+
/** Whether an exec error is a child killed for exceeding its `timeoutMs`. */
|
|
17
|
+
function isTimeoutError(error) {
|
|
18
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === "ETIMEDOUT";
|
|
19
|
+
}
|
|
11
20
|
function nameTimeout(error, command, timeoutMs) {
|
|
12
21
|
if (error?.code === "ETIMEDOUT" && error instanceof Error) error.message = `Command timed out after ${timeoutMs}ms: ${command}`;
|
|
13
22
|
return error;
|
|
@@ -35,7 +44,7 @@ function redactError(error, values) {
|
|
|
35
44
|
return error;
|
|
36
45
|
}
|
|
37
46
|
const defaultExecutor = {
|
|
38
|
-
run(cmd, { timeoutMs, killSignal, cwd, env }
|
|
47
|
+
run(cmd, { timeoutMs, killSignal, cwd, env }) {
|
|
39
48
|
const opts = {
|
|
40
49
|
encoding: "utf-8",
|
|
41
50
|
stdio: [
|
|
@@ -45,7 +54,8 @@ const defaultExecutor = {
|
|
|
45
54
|
],
|
|
46
55
|
maxBuffer: MAX_BUFFER
|
|
47
56
|
};
|
|
48
|
-
|
|
57
|
+
const timeout = budgetMs(timeoutMs);
|
|
58
|
+
if (timeout !== void 0) opts.timeout = timeout;
|
|
49
59
|
if (killSignal) opts.killSignal = killSignal;
|
|
50
60
|
if (cwd) opts.cwd = cwd;
|
|
51
61
|
if (env) opts.env = {
|
|
@@ -58,7 +68,7 @@ const defaultExecutor = {
|
|
|
58
68
|
throw nameTimeout(error, cmd, timeoutMs);
|
|
59
69
|
}
|
|
60
70
|
},
|
|
61
|
-
runFile(file, args = [], { timeoutMs, killSignal, cwd, env, omitEnv, input, untrimmed, rejectStderr, detachedSilent, redact }
|
|
71
|
+
runFile(file, args = [], { timeoutMs, killSignal, cwd, env, omitEnv, input, untrimmed, rejectStderr, detachedSilent, redact }) {
|
|
62
72
|
const opts = {
|
|
63
73
|
encoding: "utf-8",
|
|
64
74
|
stdio: detachedSilent ? "ignore" : [
|
|
@@ -69,7 +79,8 @@ const defaultExecutor = {
|
|
|
69
79
|
maxBuffer: MAX_BUFFER
|
|
70
80
|
};
|
|
71
81
|
if (detachedSilent) opts.detached = true;
|
|
72
|
-
|
|
82
|
+
const timeout = budgetMs(timeoutMs);
|
|
83
|
+
if (timeout !== void 0) opts.timeout = timeout;
|
|
73
84
|
if (killSignal) opts.killSignal = killSignal;
|
|
74
85
|
if (cwd) opts.cwd = cwd;
|
|
75
86
|
if (input !== void 0) opts.input = input;
|
|
@@ -92,10 +103,11 @@ const defaultExecutor = {
|
|
|
92
103
|
if (detachedSilent) return "";
|
|
93
104
|
return untrimmed ? String(result.stdout) : String(result.stdout).trim();
|
|
94
105
|
},
|
|
95
|
-
runFileAsync(file, args = [], { timeoutMs, killSignal, cwd, env, omitEnv, rejectStderr, onSpawn, detachedSilent, redact }
|
|
106
|
+
runFileAsync(file, args = [], { timeoutMs, killSignal, cwd, env, omitEnv, rejectStderr, onSpawn, detachedSilent, redact }) {
|
|
96
107
|
const command = [file, ...args].join(" ");
|
|
97
108
|
return new Promise((resolve, reject) => {
|
|
98
109
|
refuseUnsafeBatchArguments(file, args);
|
|
110
|
+
const timeout = budgetMs(timeoutMs);
|
|
99
111
|
const opts = detachedSilent ? {
|
|
100
112
|
stdio: "ignore",
|
|
101
113
|
detached: true
|
|
@@ -124,10 +136,10 @@ const defaultExecutor = {
|
|
|
124
136
|
const stdout = [];
|
|
125
137
|
const stderr = [];
|
|
126
138
|
let timedOut = false;
|
|
127
|
-
const timer =
|
|
139
|
+
const timer = timeout === void 0 ? void 0 : setTimeout(() => {
|
|
128
140
|
timedOut = true;
|
|
129
141
|
child.kill(killSignal ?? "SIGTERM");
|
|
130
|
-
},
|
|
142
|
+
}, timeout);
|
|
131
143
|
child.stdout?.on("data", (chunk) => stdout.push(chunk));
|
|
132
144
|
child.stderr?.on("data", (chunk) => stderr.push(chunk));
|
|
133
145
|
child.on("error", (error) => {
|
|
@@ -151,6 +163,7 @@ const defaultExecutor = {
|
|
|
151
163
|
});
|
|
152
164
|
},
|
|
153
165
|
runQuiet(cmd, opts) {
|
|
166
|
+
budgetMs(opts.timeoutMs);
|
|
154
167
|
try {
|
|
155
168
|
return this.run(cmd, opts);
|
|
156
169
|
} catch {
|
|
@@ -158,6 +171,7 @@ const defaultExecutor = {
|
|
|
158
171
|
}
|
|
159
172
|
},
|
|
160
173
|
runFileQuiet(file, args, opts) {
|
|
174
|
+
budgetMs(opts.timeoutMs);
|
|
161
175
|
try {
|
|
162
176
|
return this.runFile(file, args, opts);
|
|
163
177
|
} catch {
|
|
@@ -251,4 +265,4 @@ function getExecutor() {
|
|
|
251
265
|
return active;
|
|
252
266
|
}
|
|
253
267
|
//#endregion
|
|
254
|
-
export {
|
|
268
|
+
export { isTimeoutError as n, debugLog as r, getExecutor as t };
|