stim 1.28.0 → 1.30.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/dist/{acquire-artifact-CKByBnTD.mjs → acquire-artifact-CrZ4rEbI.mjs} +1 -1
- package/dist/{act-8iswyfRa.mjs → act-BaKjDWGw.mjs} +479 -29
- package/dist/{activity-DRMg4_mD.mjs → activity-BTaUf0tc.mjs} +6 -5
- package/dist/{agent-device-usage-output-tE90fDdo.mjs → agent-device-usage-output-DYBpO17K.mjs} +4 -4
- package/dist/{android-YWCbmkVK.mjs → android-BCYLwmH6.mjs} +5 -5
- package/dist/{android-D577ApKG.mjs → android-BEQUDpOg.mjs} +1 -1
- package/dist/{android-CHmSU4B4.mjs → android-BWqdDK6R.mjs} +44 -42
- package/dist/{android-CsPs-7Mg.mjs → android-DdKG6lyD.mjs} +44 -35
- package/dist/{android-cas-_aDifWW0.mjs → android-cas-BH6K12__.mjs} +4 -4
- package/dist/{android-project-DUGMbq28.d.mts → android-project-CCEQyYJK.d.mts} +6 -2
- package/dist/api.d.mts +7 -4
- package/dist/api.mjs +27 -27
- package/dist/{apk-signed-tail-CQbwM0qO.mjs → apk-signed-tail-B8kw4a8K.mjs} +2 -2
- package/dist/{artifact-DYtHjxsn.mjs → artifact-DTHXcmQ3.mjs} +12 -12
- package/dist/{artifact-bFkfD3vf.mjs → artifact-M6W2l-xh.mjs} +12 -12
- package/dist/{auto-placement-BVqs8AJi.mjs → auto-placement-CZaWDmcY.mjs} +10 -10
- package/dist/{browser-web-BUaLcafY.mjs → browser-web-JQ7lFej3.mjs} +12 -12
- package/dist/{build-cQURy_KW.mjs → build-C2ZWoCmg.mjs} +23 -23
- package/dist/{build-cache-CZULpXVl.mjs → build-cache-DlC3owap.mjs} +4 -4
- package/dist/{build-plan-CxoYfxsc.mjs → build-plan-J3iRR3gI.mjs} +6 -6
- package/dist/{cache-manifest-DEjqGGat.mjs → cache-manifest-evF_zJ9U.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-Bm_A1xX9.mjs → ccache-B8gY50-h.mjs} +18 -18
- package/dist/{cli-CpbaLDa7.mjs → cli-xRPXJPtA.mjs} +19 -19
- package/dist/cli.mjs +1 -1
- package/dist/{client-YxCer6ab.mjs → client-DrHykA24.mjs} +5 -5
- package/dist/collector-run.mjs +5 -5
- package/dist/{command-output-C8R1KIvi.mjs → command-output-BBW8eWPL.mjs} +1 -1
- package/dist/{config-Cn94Jc0g.mjs → config-AbUjIBOQ.mjs} +121 -19
- package/dist/{dependencies-DKeMzwXY.mjs → dependencies-vUh9mp5z.mjs} +39 -38
- package/dist/{dependency-state-CojA2o0t.mjs → dependency-state-CPKAKCZ8.mjs} +1 -1
- package/dist/{dev-client-D-BW5uiq.mjs → dev-client-CASgAOu7.mjs} +2 -2
- package/dist/device-ChnO7bR9.mjs +761 -0
- package/dist/device-CsIdRXfm.mjs +175 -0
- package/dist/{device-CgXfbcz5.mjs → device-android-CcdQqQWg.mjs} +28 -195
- package/dist/{device-capacity-Cd8lMSn3.mjs → device-capacity-C5C_jOQd.mjs} +11 -11
- package/dist/device-host-worker.mjs +44 -35
- package/dist/{device-ios-Cc9ulihb.mjs → device-ios-DbmtPIiw.mjs} +28 -18
- package/dist/{device-lease-run-Mtzp4THX.mjs → device-lease-run-Do6zYA7y.mjs} +4 -4
- package/dist/{device-pool-eRz6DtCg.mjs → device-pool-CpoYiCGO.mjs} +3 -3
- package/dist/{device-eeK95Lir.mjs → device-provision-B5Ms94qY.mjs} +11 -302
- package/dist/{doctor-xf7ht-5n.mjs → doctor-CJSB5q-s.mjs} +20 -20
- package/dist/{doctor-Bz_ouYAW.mjs → doctor-CLE4AZEI.mjs} +20 -15
- package/dist/{doctor-C2QyhejJ.mjs → doctor-CpfbYh3Q.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BTW82PDC.mjs → doctor-watchman-D1IyMle9.mjs} +4 -4
- package/dist/{eas-build-Dm6q68QY.mjs → eas-build-DIDOHw2P.mjs} +2 -2
- package/dist/{eas-fallback-DajNpxf-.mjs → eas-fallback-DVS9oBSc.mjs} +4 -4
- package/dist/{eas-session-ledger-CBFo_Uo1.mjs → eas-session-ledger-CW3l-inB.mjs} +5 -5
- package/dist/{error-diagnostics-D1QfyJzQ.mjs → error-diagnostics-XJ9eWdtq.mjs} +8 -8
- package/dist/{gc-PLFwb0k4.mjs → gc-BVIcxCxE.mjs} +2 -2
- package/dist/{gc-DM5oMm-J.mjs → gc-Co7PE36D.mjs} +80 -18
- package/dist/{guide-C4I46XAk.mjs → guide-DkepBgHT.mjs} +235 -34
- package/dist/{hosted-android-DlaKLbW0.mjs → hosted-android-Du7NxufJ.mjs} +3 -3
- package/dist/{hosted-client-DDRm9hPJ.mjs → hosted-client-Cect92SZ.mjs} +3 -3
- package/dist/{hosted-logs-bSebOKbz.mjs → hosted-logs-Opcjv1Lr.mjs} +17 -8
- package/dist/{hosted-logs-sync-B0c53W_c.mjs → hosted-logs-sync-wsI7N1Hv.mjs} +7 -11
- package/dist/{hosted-macos-B7-8Pv4H.mjs → hosted-macos-BP9Kucat.mjs} +5 -5
- package/dist/{hosted-native-CDe33CSr.mjs → hosted-native-DmdLSmvu.mjs} +9 -8
- package/dist/{idle-shutdown-CQ0QwU9J.mjs → idle-shutdown-BcMN_cLm.mjs} +7 -7
- package/dist/{ios-B1HvafEG.mjs → ios-BFkBHuRT.mjs} +8 -8
- package/dist/{ios-tg4tp3q1.mjs → ios-CG0IsLtt.mjs} +29 -29
- package/dist/{ios-B1DYuOjh.mjs → ios-CXnoVO_z.mjs} +4 -4
- package/dist/{ios-device-B4elVFKi.mjs → ios-device-ClSfuu-_.mjs} +1 -1
- package/dist/{ios-project-CR4mZ7CH.mjs → ios-project-BM9TbTE7.mjs} +7 -7
- package/dist/{ios-state-BPHqMDdZ.mjs → ios-state-Ce_dystM.mjs} +1 -1
- package/dist/{js-swap-CVpSW1fn.mjs → js-swap-9Rx-5Nqz.mjs} +4 -4
- package/dist/{launch-DoySmhjz.mjs → launch-DvJV1Mx4.mjs} +19 -19
- package/dist/{lightened-DFAJgfIk.mjs → lightened-23pqe7LS.mjs} +4 -4
- package/dist/{logs-BGsW7iPe.mjs → logs-DJgZlf2K.mjs} +9 -8
- package/dist/{logs-DI5ILkYB.mjs → logs-Pkeh3wZk.mjs} +7 -6
- package/dist/{macos-Bo9st9Di.mjs → macos-DPvPQadc.mjs} +20 -20
- package/dist/{macos-C12RMJQF.mjs → macos-Du07NsOB.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -9
- package/dist/{metro-BnhXV2Mj.mjs → metro-BMQHczcf.mjs} +2 -2
- package/dist/{metro-request-DXyKjVDF.mjs → metro-request-BtF7ox53.mjs} +1 -1
- package/dist/{named-ports-Phoi2POD.mjs → named-ports-DcktE2Pw.mjs} +2 -2
- package/dist/{native-android-vxgtLD7w.mjs → native-android-CBOM1_gB.mjs} +16 -16
- package/dist/{native-gradle-artifact-inputs-BN96IVw8.mjs → native-gradle-artifact-inputs-D_iAfPuS.mjs} +3 -3
- package/dist/{native-runtime-DG4Rodzj.mjs → native-runtime-D4cTwU0Z.mjs} +6 -6
- package/dist/{native-xcode-inputs-BKarCoKg.mjs → native-xcode-inputs-BF-ogSnG.mjs} +2 -2
- package/dist/{native-xcode-ios-8A-efGa5.mjs → native-xcode-ios-DwJBfMP6.mjs} +15 -15
- package/dist/{ndjson-Dy2W4vRa.mjs → ndjson-CrjIsGzw.mjs} +2 -2
- package/dist/offload-worker.d.mts +1 -1
- package/dist/offload-worker.mjs +22 -22
- package/dist/{ownership-DJCq48IJ.mjs → ownership-Dtz9G5Gl.mjs} +2 -2
- package/dist/{phone-reverses-BzTa8g1F.mjs → phone-reverses-CvhhkGMH.mjs} +4 -4
- package/dist/{placement-log-Cvhta5ib.mjs → placement-log-CRR_TE1r.mjs} +1 -1
- package/dist/{plan-placement-WkZdccuN.mjs → plan-placement-CdLc-pTb.mjs} +6 -6
- package/dist/{ports-UV4mJgyC.mjs → ports-g4N_cfyg.mjs} +3 -3
- package/dist/{prebuild-k8d_tqOq.mjs → prebuild-DBJMhwSS.mjs} +9 -9
- package/dist/{project-Sui52ywT.mjs → project-DPQjnpcI.mjs} +15 -15
- package/dist/{react-native-android-DANlGGQf.mjs → react-native-android-idMWOwkX.mjs} +24 -24
- package/dist/{react-native-build-jUHnIfZ9.mjs → react-native-build-BSoh4HkH.mjs} +7 -7
- package/dist/{react-native-doctor-DCWRjS7K.mjs → react-native-doctor-CYibY8-4.mjs} +9 -8
- package/dist/{react-native-ios-BwMsFMXi.mjs → react-native-ios-13KIIOOy.mjs} +16 -15
- package/dist/{recordings-iy0mkm7b.mjs → recordings-CHMaF73C.mjs} +1 -1
- package/dist/{reload-Bj7QyuDy.mjs → reload-B9DZOjcV.mjs} +1 -1
- package/dist/{reload-c_uEyc_X.mjs → reload-BUQI3dSu.mjs} +14 -14
- package/dist/{remote-DFlpAqdV.mjs → remote-C-RGHhAP.mjs} +8 -8
- package/dist/{result-BIcXREyC.mjs → result-W4HCum4A.mjs} +16 -16
- package/dist/{run-y2HwyNvg.mjs → run-BQAmrohh.mjs} +2 -2
- package/dist/{selection-CXgM_VK_.mjs → selection-PCMT97XD.mjs} +105 -62
- package/dist/{server-bare-2N4vSRZG.mjs → server-bare-CEQdB_F4.mjs} +37 -1
- package/dist/{server-command-qneHPcRI.mjs → server-command-oqi3TDy7.mjs} +5 -5
- package/dist/server-expo-BUFAq2In.mjs +2 -0
- package/dist/{server-expo-Ccm9zB0o.mjs → server-expo-C1K07shx.mjs} +8 -5
- package/dist/{settings-Cfd_Q6ys.mjs → settings-CKlMOmhj.mjs} +2 -2
- package/dist/{settings-CY5JZlNN.mjs → settings-D776ygML.mjs} +1 -1
- package/dist/{settings-Djl-mpjX.mjs → settings-D9LtQaUw.mjs} +2 -1
- package/dist/{settings-payload-DwQiEMCn.mjs → settings-payload-CE-NZ6Lq.mjs} +4 -4
- package/dist/{settings-write-CJpjkeAd.mjs → settings-write-D7Xwa_-M.mjs} +5 -5
- package/dist/settings.schema.json +58 -9
- package/dist/{simslim-DCQwzoPy.mjs → simslim-CbpHERcv.mjs} +1 -1
- package/dist/{slot-launch-BpmanOnk.mjs → slot-launch-CeIK1iUI.mjs} +6 -6
- package/dist/{stage-CmugrSG5.mjs → stage-Blqe6bWb.mjs} +1 -1
- package/dist/{start-DYLk6GXn.mjs → start-B7J5a9nS.mjs} +11 -11
- package/dist/{start-CHH3zgIU.mjs → start-CvP2pJjc.mjs} +1 -1
- package/dist/{state-BXC1Lfxw.mjs → state-C2AUjjhg.mjs} +1 -1
- package/dist/{state-B2QJbDwz.mjs → state-D5ZxwCGJ.mjs} +2 -2
- package/dist/{stats-DxKqhcGp.mjs → stats-Uo7l8OAk.mjs} +4 -4
- package/dist/{status-7ULDEJ1e.mjs → status-CK7ZoEhV.mjs} +2 -2
- package/dist/{status-D_Ljc89p.mjs → status-CqJI1TgG.mjs} +1 -1
- package/dist/{status-BHCkOZga.mjs → status-_rWXFSO7.mjs} +24 -24
- package/dist/{status-watch-BmsPqYSU.mjs → status-watch-CnSyXUmj.mjs} +4 -4
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-CbWo21kb.mjs → stim-desktop-CYXLFpFS.mjs} +1 -1
- package/dist/{stop-b2pouxAO.mjs → stop-Bogo9oO2.mjs} +2 -2
- package/dist/{stop-DQvE-P76.mjs → stop-CMVfaA-6.mjs} +4 -4
- package/dist/{stop-D-dGE9gh.mjs → stop-CnF9ixYe.mjs} +20 -19
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +23 -19
- package/dist/{support-04IhBUTT.mjs → support-BGqpYMV8.mjs} +15 -11
- package/dist/{support-BtlJKjyQ.mjs → support-DUevTPur.mjs} +9 -9
- package/dist/{swiftpm-artifact-inputs-Cj2UpmPN.mjs → swiftpm-artifact-inputs-BcJk6-3u.mjs} +1 -1
- package/dist/{swiftpm-macos-BhF2stxY.mjs → swiftpm-macos-DBrmoocG.mjs} +8 -8
- package/dist/toolchain-Cw9VVHOY.mjs +2 -0
- package/dist/{toolchain-mLA_km-b.mjs → toolchain-DLdoyxIt.mjs} +19 -11
- package/dist/{trigger-DMou-X7j.mjs → trigger-CfnOfpDd.mjs} +1 -1
- package/dist/trigger-DBZ-GBrl.mjs +2 -0
- package/dist/{warm-progress-B0Vpuvpl.mjs → warm-progress-DQ2wQZKp.mjs} +3 -3
- package/dist/web-CI_qCRPw.mjs +2 -0
- package/dist/{web-BYmK0TjL.mjs → web-g9U7L1sR.mjs} +8 -8
- package/dist/web-run.mjs +5 -5
- package/dist/{workspace-state-kIZrdlSg.mjs → workspace-state-DGwkPXwq.mjs} +2 -2
- package/dist/{workspaces-CmOcceDN.mjs → workspaces-7_RWoi6c.mjs} +11 -11
- package/dist/{worktree-nliAoHxB.mjs → worktree-DEet9H3p.mjs} +1 -1
- package/dist/{worktree-2dk5edza.mjs → worktree-qKJ3x07S.mjs} +25 -25
- package/package.json +7 -7
- package/shim/bundle-response.cjs +37 -0
- package/dist/server-expo-WulkyAwT.mjs +0 -2
- package/dist/toolchain-qktiV8xc.mjs +0 -2
- package/dist/trigger-qp2ji5wE.mjs +0 -2
- package/dist/web-CrVLVQZY.mjs +0 -2
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { c as throwIfCancelled, s as cancelledError, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir } from "./workspace-state-
|
|
3
|
-
import { E as upsertProject, O as withConfigLockAsync, p as getProject, u as getConcurrencyLimits } from "./config-
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import { J as resolveCacheProviderConfig, Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-
|
|
6
|
-
import { f as projectRegistry, v as detectIsExpo } from "./project-
|
|
7
|
-
import { s as workspaceShareURL } from "./stim-desktop-
|
|
8
|
-
import {
|
|
9
|
-
import { i as createNdjsonWriter } from "./ndjson-
|
|
10
|
-
import { An as checkEasAuth, Rn as resolveRemote, zn as uploadRemote } from "./ccache-
|
|
11
|
-
import { $ as tapBuildLog, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, ct as recordRunStats, it as readRunEstimates, lt as statsProjectKey, rt as createRunRecorder } from "./workspaces-
|
|
12
|
-
import {
|
|
13
|
-
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-
|
|
14
|
-
import { T as storedAppId, x as providerUploadOutcome } from "./build-cache-
|
|
15
|
-
import { m as listIosRuntimes } from "./ios-
|
|
2
|
+
import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { E as upsertProject, O as withConfigLockAsync, p as getProject, u as getConcurrencyLimits } from "./config-AbUjIBOQ.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-BBW8eWPL.mjs";
|
|
5
|
+
import { J as resolveCacheProviderConfig, Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-D776ygML.mjs";
|
|
6
|
+
import { f as projectRegistry, v as detectIsExpo } from "./project-DPQjnpcI.mjs";
|
|
7
|
+
import { s as workspaceShareURL } from "./stim-desktop-CYXLFpFS.mjs";
|
|
8
|
+
import { A as hostSystemImageArch } from "./android-DdKG6lyD.mjs";
|
|
9
|
+
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
10
|
+
import { An as checkEasAuth, Rn as resolveRemote, zn as uploadRemote } from "./ccache-B8gY50-h.mjs";
|
|
11
|
+
import { $ as tapBuildLog, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, ct as recordRunStats, it as readRunEstimates, lt as statsProjectKey, rt as createRunRecorder } from "./workspaces-7_RWoi6c.mjs";
|
|
12
|
+
import { H as readBundleId, ct as withNativeBuildRun, st as runCancellationSignal } from "./toolchain-DLdoyxIt.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BTaUf0tc.mjs";
|
|
14
|
+
import { T as storedAppId, x as providerUploadOutcome } from "./build-cache-DlC3owap.mjs";
|
|
15
|
+
import { m as listIosRuntimes } from "./ios-CXnoVO_z.mjs";
|
|
16
16
|
import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
|
|
17
|
-
import { S as setRemoteLogSink } from "./client-
|
|
18
|
-
import { d as resolveBuildPlacement } from "./selection-
|
|
19
|
-
import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-
|
|
20
|
-
import { f as settleFingerprintCheck } from "./prebuild-
|
|
21
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
22
|
-
import { t as acquireAndroidArtifact } from "./artifact-
|
|
23
|
-
import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-
|
|
24
|
-
import { o as lastBuildRecord } from "./ios-project-
|
|
25
|
-
import { t as acquireIosArtifact } from "./artifact-
|
|
17
|
+
import { S as setRemoteLogSink } from "./client-DrHykA24.mjs";
|
|
18
|
+
import { d as resolveBuildPlacement } from "./selection-PCMT97XD.mjs";
|
|
19
|
+
import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-DUevTPur.mjs";
|
|
20
|
+
import { f as settleFingerprintCheck } from "./prebuild-DBJMhwSS.mjs";
|
|
21
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-D4cTwU0Z.mjs";
|
|
22
|
+
import { t as acquireAndroidArtifact } from "./artifact-M6W2l-xh.mjs";
|
|
23
|
+
import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-W4HCum4A.mjs";
|
|
24
|
+
import { o as lastBuildRecord } from "./ios-project-BM9TbTE7.mjs";
|
|
25
|
+
import { t as acquireIosArtifact } from "./artifact-DTHXcmQ3.mjs";
|
|
26
26
|
import { constants, promises } from "node:fs";
|
|
27
27
|
import { basename, join } from "node:path";
|
|
28
28
|
import { hostSimulatorArch } from "@stim-cli/core";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as throwIfCancelled, t as getExecutor, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { y as sharedBuildCache } from "./workspace-state-
|
|
2
|
+
import { y as sharedBuildCache } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
3
|
import { a as killOnAbort, c as gitQuiet, o as git, r as childEnvironment, s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
|
|
4
|
-
import { m as defaultAndroidLayout } from "./settings-
|
|
5
|
-
import { r as register } from "./cache-manifest-
|
|
6
|
-
import { r as writeSignedTail, t as computeSignedTail } from "./apk-signed-tail-
|
|
4
|
+
import { m as defaultAndroidLayout } from "./settings-D776ygML.mjs";
|
|
5
|
+
import { r as register } from "./cache-manifest-evF_zJ9U.mjs";
|
|
6
|
+
import { r as writeSignedTail, t as computeSignedTail } from "./apk-signed-tail-B8kw4a8K.mjs";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
9
9
|
import { join } from "node:path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { T as trackReportResource } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { i as formatDuration, l as phaseLine, m as shortHash, u as plural } from "./command-output-
|
|
3
|
-
import { an as makeTemporaryDirectory, sn as removeTemporaryEntryAsync } from "./settings-
|
|
4
|
-
import { jn as easAuthNote } from "./ccache-
|
|
5
|
-
import { at as readStats, q as estimateBuild } from "./workspaces-
|
|
6
|
-
import { s as entryDir, t as artifactIn } from "./build-cache-
|
|
7
|
-
import { l as predictBuildMiss, o as staleNativeDirRefusal } from "./prebuild-
|
|
2
|
+
import { i as formatDuration, l as phaseLine, m as shortHash, u as plural } from "./command-output-BBW8eWPL.mjs";
|
|
3
|
+
import { an as makeTemporaryDirectory, sn as removeTemporaryEntryAsync } from "./settings-D776ygML.mjs";
|
|
4
|
+
import { jn as easAuthNote } from "./ccache-B8gY50-h.mjs";
|
|
5
|
+
import { at as readStats, q as estimateBuild } from "./workspaces-7_RWoi6c.mjs";
|
|
6
|
+
import { s as entryDir, t as artifactIn } from "./build-cache-DlC3owap.mjs";
|
|
7
|
+
import { l as predictBuildMiss, o as staleNativeDirRefusal } from "./prebuild-DBJMhwSS.mjs";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
import { PROVIDER_LOAD_TIMEOUT_ENV, PROVIDER_LOAD_TIMEOUT_MS, buildResolveTimeoutMs, resolveTieredBuild, timeoutFromEnv } from "@stim-cli/cache";
|
|
10
10
|
//#region src/commands/build-plan.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as getConfigDir } from "./config-
|
|
1
|
+
import { d as getConfigDir } from "./config-AbUjIBOQ.mjs";
|
|
2
2
|
import { cacheDirRefusal, readCacheManifest, updateCacheManifest } from "@stim-cli/core";
|
|
3
3
|
import { join, resolve } from "path";
|
|
4
4
|
import { existsSync } from "fs";
|
package/dist/cache-manifest.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-
|
|
1
|
+
import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-evF_zJ9U.mjs";
|
|
2
2
|
export { manifestPath, readManifest, register, registeredCaches, unregister };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, E as debugLog, S as process_identity_exports, b as operationState, c as throwIfCancelled, d as workspaceProcessLockError, l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, s as cancelledError, t as getExecutor, u as withWorkspaceProcessLock, y as isTermination } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { D as workspaceId$1, E as workspaceDir, M as withDirLock$1, b as sharedCcache$1, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, t as clearWorkspaceStateKey, y as sharedBuildCache } from "./workspace-state-
|
|
3
|
-
import { F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, L as measuredDirectorySizeAsync, M as directorySize, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, _ as loadConfig$1, a as clearDevice, d as getConfigDir, o as clearSupervisor, p as getProject } from "./config-
|
|
2
|
+
import { D as workspaceId$1, E as workspaceDir, M as withDirLock$1, b as sharedCcache$1, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, t as clearWorkspaceStateKey, y as sharedBuildCache } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, L as measuredDirectorySizeAsync, M as directorySize, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, _ as loadConfig$1, a as clearDevice, d as getConfigDir, o as clearSupervisor, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
4
4
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-
|
|
5
|
+
import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-BBW8eWPL.mjs";
|
|
6
6
|
import { a as killOnAbort, n as runOperationFileQuiet, r as childEnvironment, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
7
|
-
import { Z as resolveProjectSettingsAsync, d as androidLayoutSetting, ft as planMetroReach, m as defaultAndroidLayout } from "./settings-
|
|
8
|
-
import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-
|
|
9
|
-
import {
|
|
10
|
-
import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-
|
|
11
|
-
import { c as readNdjsonGenerations$1, i as createNdjsonWriter, r as createNdjsonTail } from "./ndjson-
|
|
12
|
-
import { T as formatSpace, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as environmentState, y as capacity } from "./eas-session-ledger-
|
|
13
|
-
import { i as registeredCaches, r as register } from "./cache-manifest-
|
|
14
|
-
import { At as mapLimited, B as workspaceBuildInProgress, Dt as createGcResults, Et as GC_OUTPUT, F as collectOwnedDeviceActivityAsync, L as idleShutdownCandidates, Mt as sizeConcurrency, N as collectIdleDevicesAsync, _t as teardownParkedIosSim, bt as measureDu, dt as eraseParkedIosSim, gt as teardownParkedAvd, ht as teardownOwnedIosSim, i as clearWorkspaceOutputs, l as keptByLock, o as collectWorkspaceOutputs, pt as teardownOwnedAvd, ut as eraseParkedAvd, v as withIdleWorkspace, vt as probePublicHttp, wt as listBuildSlots, x as resolveSupervisorTarget, xt as writeUsageCache, yt as canonical$1, z as shutDownIdleDevices } from "./workspaces-
|
|
7
|
+
import { Z as resolveProjectSettingsAsync, d as androidLayoutSetting, ft as planMetroReach, m as defaultAndroidLayout } from "./settings-D776ygML.mjs";
|
|
8
|
+
import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-DPQjnpcI.mjs";
|
|
9
|
+
import { G as ownedAvdSerialResolverAsync, I as listAvdsAsync, J as parseAvdSystemImage, L as listInstalledSystemImages, V as ownedAvdDirectory, d as androidToolPath, dt as isStimOwnedSim, m as avdIniPaths, mt as dropParked, o as androidHome, q as parseAvdDeviceProfile, ut as isStimOwnedAvd, v as avdStorageRoots, yt as readParked } from "./android-DdKG6lyD.mjs";
|
|
10
|
+
import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-BMQHczcf.mjs";
|
|
11
|
+
import { c as readNdjsonGenerations$1, i as createNdjsonWriter, r as createNdjsonTail } from "./ndjson-CrjIsGzw.mjs";
|
|
12
|
+
import { T as formatSpace, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as environmentState, y as capacity } from "./eas-session-ledger-CW3l-inB.mjs";
|
|
13
|
+
import { i as registeredCaches, r as register } from "./cache-manifest-evF_zJ9U.mjs";
|
|
14
|
+
import { At as mapLimited, B as workspaceBuildInProgress, Dt as createGcResults, Et as GC_OUTPUT, F as collectOwnedDeviceActivityAsync, L as idleShutdownCandidates, Mt as sizeConcurrency, N as collectIdleDevicesAsync, _t as teardownParkedIosSim, bt as measureDu, dt as eraseParkedIosSim, gt as teardownParkedAvd, ht as teardownOwnedIosSim, i as clearWorkspaceOutputs, l as keptByLock, o as collectWorkspaceOutputs, pt as teardownOwnedAvd, ut as eraseParkedAvd, v as withIdleWorkspace, vt as probePublicHttp, wt as listBuildSlots, x as resolveSupervisorTarget, xt as writeUsageCache, yt as canonical$1, z as shutDownIdleDevices } from "./workspaces-7_RWoi6c.mjs";
|
|
15
15
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
16
|
-
import {
|
|
17
|
-
import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, o as envDir, p as readHostProcessTableAsync, x as listLeaseFiles } from "./activity-
|
|
18
|
-
import { l as expoConfigContents } from "./build-cache-
|
|
19
|
-
import { G as deviceHoldsBundle, O as sanitizeDeviceLabel, W as deviceHoldsApk, b as parseSimctlList, f as listAllIosSimsAsync, g as listUserApps, j as uninstallIosApp, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion } from "./ios-
|
|
16
|
+
import { it as nativeRunWaitNotice, st as runCancellationSignal, ut as claimForEmptying } from "./toolchain-DLdoyxIt.mjs";
|
|
17
|
+
import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, o as envDir, p as readHostProcessTableAsync, x as listLeaseFiles } from "./activity-BTaUf0tc.mjs";
|
|
18
|
+
import { l as expoConfigContents } from "./build-cache-DlC3owap.mjs";
|
|
19
|
+
import { G as deviceHoldsBundle, O as sanitizeDeviceLabel, W as deviceHoldsApk, b as parseSimctlList, f as listAllIosSimsAsync, g as listUserApps, j as uninstallIosApp, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion } from "./ios-CXnoVO_z.mjs";
|
|
20
20
|
import { n as supervisorError } from "./errors-DHm_U5gv.mjs";
|
|
21
|
-
import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-
|
|
21
|
+
import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-C1K07shx.mjs";
|
|
22
22
|
import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-CiBA-er9.mjs";
|
|
23
|
-
import { t as resolveMaintenanceSettings } from "./settings-
|
|
23
|
+
import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
|
|
24
24
|
import { createRequire } from "node:module";
|
|
25
25
|
import { createHash, randomUUID } from "node:crypto";
|
|
26
26
|
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, statfsSync, unlinkSync, writeFileSync } from "node:fs";
|
|
@@ -4277,7 +4277,7 @@ function remoteDeviceDeps(ctx) {
|
|
|
4277
4277
|
let createdSession = null;
|
|
4278
4278
|
const easEnv = easExecOptions(ctx.root);
|
|
4279
4279
|
return {
|
|
4280
|
-
checkCapacity: () => null,
|
|
4280
|
+
checkCapacity: async () => null,
|
|
4281
4281
|
ensureDevice: async () => ({
|
|
4282
4282
|
deviceName: ctx.backend === "proxy" ? "remote device (your daemon)" : "EAS Simulator",
|
|
4283
4283
|
owned: true,
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { E as debugLog } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { y as refuseRelativeStimPaths } from "./config-
|
|
2
|
+
import { y as refuseRelativeStimPaths } from "./config-AbUjIBOQ.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { runId, trace } from "@stim-cli/core/state";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region bin/cli.ts
|
|
7
7
|
const commands = /* @__PURE__ */ new Map([
|
|
8
|
-
["doctor", () => import("./doctor-
|
|
9
|
-
["worktree", () => import("./worktree-
|
|
10
|
-
["start", () => import("./start-
|
|
11
|
-
["ports", () => import("./ports-
|
|
12
|
-
["stop", () => import("./stop-
|
|
13
|
-
["ios", () => import("./ios-
|
|
14
|
-
["android", () => import("./android-
|
|
15
|
-
["web", () => import("./web-
|
|
16
|
-
["macos", () => import("./macos-
|
|
17
|
-
["reload", () => import("./reload-
|
|
18
|
-
["device", () => import("./device-
|
|
19
|
-
["logs", () => import("./logs-
|
|
20
|
-
["settings", () => import("./settings-
|
|
21
|
-
["status", () => import("./status-
|
|
22
|
-
["stats", () => import("./stats-
|
|
23
|
-
["gc", () => import("./gc-
|
|
24
|
-
["guide", () => import("./guide-
|
|
8
|
+
["doctor", () => import("./doctor-CpfbYh3Q.mjs")],
|
|
9
|
+
["worktree", () => import("./worktree-DEet9H3p.mjs")],
|
|
10
|
+
["start", () => import("./start-CvP2pJjc.mjs")],
|
|
11
|
+
["ports", () => import("./ports-g4N_cfyg.mjs")],
|
|
12
|
+
["stop", () => import("./stop-Bogo9oO2.mjs")],
|
|
13
|
+
["ios", () => import("./ios-BFkBHuRT.mjs")],
|
|
14
|
+
["android", () => import("./android-BCYLwmH6.mjs")],
|
|
15
|
+
["web", () => import("./web-CI_qCRPw.mjs")],
|
|
16
|
+
["macos", () => import("./macos-Du07NsOB.mjs")],
|
|
17
|
+
["reload", () => import("./reload-B9DZOjcV.mjs")],
|
|
18
|
+
["device", () => import("./device-ChnO7bR9.mjs")],
|
|
19
|
+
["logs", () => import("./logs-DJgZlf2K.mjs")],
|
|
20
|
+
["settings", () => import("./settings-CKlMOmhj.mjs")],
|
|
21
|
+
["status", () => import("./status-CqJI1TgG.mjs")],
|
|
22
|
+
["stats", () => import("./stats-Uo7l8OAk.mjs")],
|
|
23
|
+
["gc", () => import("./gc-BVIcxCxE.mjs")],
|
|
24
|
+
["guide", () => import("./guide-DkepBgHT.mjs")]
|
|
25
25
|
]);
|
|
26
26
|
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
|
|
27
27
|
const program = new Command();
|
|
@@ -53,7 +53,7 @@ try {
|
|
|
53
53
|
}));
|
|
54
54
|
}
|
|
55
55
|
try {
|
|
56
|
-
const { triggerMaintenance } = await import("./trigger-
|
|
56
|
+
const { triggerMaintenance } = await import("./trigger-DBZ-GBrl.mjs");
|
|
57
57
|
triggerMaintenance(action.name());
|
|
58
58
|
} catch {}
|
|
59
59
|
});
|
package/dist/cli.mjs
CHANGED
|
@@ -4,6 +4,6 @@ const encode = (version) => version.split(".", 3).reduce((sum, part) => sum * 1e
|
|
|
4
4
|
if (encode(process.versions.node) < encode("22.12.0")) {
|
|
5
5
|
process.stderr.write(`STIM_NODE_UNSUPPORTED: Stim needs Node 22.12.0 or later; this is Node ${process.versions.node} at ${process.execPath}. To run Stim where a project pins an older Node, see https://stim.appandflow.com/docs/requirements#older-node-pins\n`);
|
|
6
6
|
process.exitCode = 1;
|
|
7
|
-
} else import("./cli-
|
|
7
|
+
} else import("./cli-xRPXJPtA.mjs");
|
|
8
8
|
//#endregion
|
|
9
9
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { C as reportSignal, E as debugLog, b as operationState, c as throwIfCancelled, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { _ as loadConfig$1,
|
|
2
|
+
import { _ as loadConfig$1, ct as sayHello, nt as openAuthenticated, st as resolveEndpoint } from "./config-AbUjIBOQ.mjs";
|
|
3
3
|
import { o as git, s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
|
|
4
|
-
import { G as planCacheEmptying, R as maintenanceLogger, n as CCACHE_UNAVAILABLE, t as CCACHE_NOT_RUN, ur as discoverCaches, z as emptyCaches } from "./ccache-
|
|
4
|
+
import { G as planCacheEmptying, R as maintenanceLogger, n as CCACHE_UNAVAILABLE, t as CCACHE_NOT_RUN, ur as discoverCaches, z as emptyCaches } from "./ccache-B8gY50-h.mjs";
|
|
5
5
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
6
|
-
import { A as
|
|
7
|
-
import { t as resolveMaintenanceSettings } from "./settings-
|
|
8
|
-
import { f as workerFailureReason, m as pairedMachines, o as namedBuildMachine, t as OffloadRefusal } from "./selection-
|
|
6
|
+
import { A as COMPILATION_CACHE_NOT_RUN, D as readRubyVersion, S as workerToolchain, b as toolchainNotes, c as iosToolchainAsync, j as COMPILATION_CACHE_UNAVAILABLE, o as cocoapodsDifference, st as runCancellationSignal, y as toolchainMismatches } from "./toolchain-DLdoyxIt.mjs";
|
|
7
|
+
import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
|
|
8
|
+
import { f as workerFailureReason, m as pairedMachines, o as namedBuildMachine, t as OffloadRefusal } from "./selection-PCMT97XD.mjs";
|
|
9
9
|
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
10
10
|
import { a as sourceManifest, i as nativeTransferManifest, n as gitVisiblePaths, r as nativeFileDigest, t as checkNativeTransferMembership } from "./native-source-D1AzWiuP.mjs";
|
|
11
11
|
import { createHash, webcrypto } from "node:crypto";
|
package/dist/collector-run.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { S as process_identity_exports } from "./exec-aULwtNly.mjs";
|
|
2
|
-
import { k as workspaceLogsDir } from "./workspace-state-
|
|
3
|
-
import { V as deviceSlotKey, q as validateDeviceSlot } from "./config-
|
|
2
|
+
import { k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
|
+
import { V as deviceSlotKey, q as validateDeviceSlot } from "./config-AbUjIBOQ.mjs";
|
|
4
4
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { c as watchAppPid, i as parseLogcatLine, o as startAndroidLogcat, s as waitForAppPid, t as androidClockOffset } from "./android-
|
|
6
|
-
import { i as createNdjsonWriter } from "./ndjson-
|
|
5
|
+
import { c as watchAppPid, i as parseLogcatLine, o as startAndroidLogcat, s as waitForAppPid, t as androidClockOffset } from "./android-BEQUDpOg.mjs";
|
|
6
|
+
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
7
7
|
import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-CiBA-er9.mjs";
|
|
8
|
-
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-
|
|
8
|
+
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-Dtz9G5Gl.mjs";
|
|
9
9
|
import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-CsRVik64.mjs";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import { isAbsolute, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
2
|
-
import { t as NO_PROJECT_REFUSAL } from "./project-
|
|
2
|
+
import { t as NO_PROJECT_REFUSAL } from "./project-DPQjnpcI.mjs";
|
|
3
3
|
import { quotedPath as quotedPath$1 } from "@stim-cli/core";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
//#region src/diagnostics/launch-error-preview.ts
|
|
@@ -2,11 +2,12 @@ import { C as reportSignal, D as ownership_claim_exports, S as process_identity_
|
|
|
2
2
|
import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { ambientEnv, configDir, ensurePrivateDir } from "@stim-cli/core";
|
|
5
|
-
import { allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
|
|
5
|
+
import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
|
|
6
6
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
|
|
7
|
-
import { request } from "node:
|
|
7
|
+
import { request } from "node:http";
|
|
8
|
+
import { request as request$1 } from "node:https";
|
|
8
9
|
import { WebSocket } from "ws";
|
|
9
|
-
import { HandshakeRefusal, MAX_SERVER_MESSAGE_BYTES, TRANSPORT_OVERHEAD_BYTES, decodeSecret, initiateNoise, newSecret } from "@stim-cli/core/noise-session";
|
|
10
|
+
import { HandshakeRefusal, MAX_SERVER_MESSAGE_BYTES, TRANSPORT_OVERHEAD_BYTES, decodeSecret, initiateNoise, keyFingerprint, newSecret } from "@stim-cli/core/noise-session";
|
|
10
11
|
import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
|
|
11
12
|
import { InvalidArgumentError } from "commander";
|
|
12
13
|
//#region src/offload/access-ticket.ts
|
|
@@ -203,6 +204,52 @@ function diagnoseUnreachable(input) {
|
|
|
203
204
|
remedy: `On ${entry}, run \`stim-server service status\`. To keep it running there, run \`stim-server service install --serve\`.`
|
|
204
205
|
};
|
|
205
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Why a `local:` machine did not connect. Nothing below stim-server's own port is in the way, so the causes are the
|
|
209
|
+
* network, the machine's firewall, or a server that does not listen on that address.
|
|
210
|
+
*/
|
|
211
|
+
function diagnoseLocalUnreachable(input) {
|
|
212
|
+
const { entry, port, transport } = input;
|
|
213
|
+
if (transport?.kind === "refused") return {
|
|
214
|
+
layer: "server",
|
|
215
|
+
code: "lan-not-listening",
|
|
216
|
+
title: "Not listening on the local network",
|
|
217
|
+
message: `${entry} answers on the local network, but nothing accepts connections on port ${port}: its stim-server is not running or does not listen on that address.`,
|
|
218
|
+
remedy: `On ${entry}, run \`stim-server service status\`, and check that server.lanAddresses names the network interface or address this machine reaches (\`npx --yes stim settings get server.lanAddresses\`). Its stim-server log names each entry it cannot use.`
|
|
219
|
+
};
|
|
220
|
+
if (transport?.kind === "silent") return {
|
|
221
|
+
layer: "peer",
|
|
222
|
+
code: "lan-no-answer",
|
|
223
|
+
title: "Not answering",
|
|
224
|
+
message: `${entry} did not answer a connection on port ${port}.`,
|
|
225
|
+
remedy: `Check that ${entry} is awake, on the same network as this machine and has that address. On a Mac, the macOS firewall drops connections until a person allows incoming connections for stim-server's node there (System Settings > Network > Firewall > Options).`
|
|
226
|
+
};
|
|
227
|
+
if (transport?.kind === "http" && transport.status === 503) return diagnoseUnreachable({
|
|
228
|
+
...input,
|
|
229
|
+
peer: {
|
|
230
|
+
nodeId: "",
|
|
231
|
+
dnsName: entry,
|
|
232
|
+
address: entry
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return {
|
|
236
|
+
layer: "server",
|
|
237
|
+
code: "connect-failed",
|
|
238
|
+
title: "Not answering",
|
|
239
|
+
message: `Could not connect to stim-server on ${entry}: ${sentence(input.reason)}`,
|
|
240
|
+
remedy: `On ${entry}, run \`stim-server service status\`. To keep it running there, run \`stim-server service install\`.`
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
/** The doctor finding for a `local:` machine whose server key no person has confirmed, so Stim has not pinned it. */
|
|
244
|
+
function unconfirmedKeyFinding(code, entry, fingerprint) {
|
|
245
|
+
return {
|
|
246
|
+
code,
|
|
247
|
+
level: "note",
|
|
248
|
+
title: `Remote machine ${entry} needs its server key confirmed`,
|
|
249
|
+
detail: `${entry} approved this machine and answered with the stim-server key fingerprint ${fingerprint}. On the local network nothing vouches for that key, so Stim pins it only after a person checks it against the fingerprint \`stim-server setup\` printed there. Until then this machine does not use ${entry}.`,
|
|
250
|
+
fix: `Run \`stim doctor --fix\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
|
|
251
|
+
};
|
|
252
|
+
}
|
|
206
253
|
function diagnosisFinding(code, entry, diagnosis) {
|
|
207
254
|
return {
|
|
208
255
|
code,
|
|
@@ -241,11 +288,12 @@ function rawTailscaleStatus() {
|
|
|
241
288
|
function peerStartup({ url, servername, host }) {
|
|
242
289
|
return new Promise((resolve) => {
|
|
243
290
|
const base = new URL(url);
|
|
244
|
-
const
|
|
291
|
+
const plain = base.protocol === "ws:";
|
|
292
|
+
const request$2 = (plain ? request : request$1)({
|
|
245
293
|
host: base.hostname.replace(/^\[|\]$/g, ""),
|
|
246
|
-
port: base.port || 443,
|
|
294
|
+
port: base.port || (plain ? 80 : 443),
|
|
247
295
|
path: "/health",
|
|
248
|
-
servername,
|
|
296
|
+
...plain ? {} : { servername },
|
|
249
297
|
headers: { Host: host },
|
|
250
298
|
timeout: HEALTH_TIMEOUT_MS
|
|
251
299
|
}, (response) => {
|
|
@@ -253,15 +301,15 @@ function peerStartup({ url, servername, host }) {
|
|
|
253
301
|
let size = 0;
|
|
254
302
|
response.on("data", (chunk) => {
|
|
255
303
|
size += chunk.length;
|
|
256
|
-
if (size > 4096) request$
|
|
304
|
+
if (size > 4096) request$2.destroy();
|
|
257
305
|
else chunks.push(chunk);
|
|
258
306
|
});
|
|
259
307
|
response.on("end", () => resolve(parsePeerStartup(parseJson(Buffer.concat(chunks).toString("utf8")))));
|
|
260
308
|
response.on("error", () => resolve(null));
|
|
261
309
|
});
|
|
262
|
-
request$
|
|
263
|
-
request$
|
|
264
|
-
request$
|
|
310
|
+
request$2.on("timeout", () => request$2.destroy());
|
|
311
|
+
request$2.on("error", () => resolve(null));
|
|
312
|
+
request$2.end();
|
|
265
313
|
});
|
|
266
314
|
}
|
|
267
315
|
function tailscaleStatus() {
|
|
@@ -388,8 +436,9 @@ function openAuthenticated(target, auth, timeoutMs, signal, operation) {
|
|
|
388
436
|
}), timeoutMs);
|
|
389
437
|
signal?.addEventListener("abort", cancel, { once: true });
|
|
390
438
|
if (signal?.aborted) return cancel();
|
|
439
|
+
const served = target.url.startsWith("wss:");
|
|
391
440
|
const failed = (error, status) => finish({
|
|
392
|
-
failure: status === 502 ? "no stim-server answers behind its tailscale serve route (HTTP 502)" : status === 503 ?
|
|
441
|
+
failure: status === 502 && served ? "no stim-server answers behind its tailscale serve route (HTTP 502)" : status === 503 ? `stim-server answers${served ? " behind its tailscale serve route" : ""} but is not serving clients (HTTP 503)` : status !== void 0 ? `${served ? "its tailscale serve route" : "it"} answered HTTP ${status}` : error.message,
|
|
393
442
|
refused: false,
|
|
394
443
|
transport: opened && status === void 0 ? {
|
|
395
444
|
kind: "other",
|
|
@@ -556,6 +605,17 @@ async function diagnoseOutcome(io, input) {
|
|
|
556
605
|
async function diagnoseConnectFailure(machine, failure, signal) {
|
|
557
606
|
const parsed = parseMachine(machine);
|
|
558
607
|
if (!parsed) return null;
|
|
608
|
+
if (parsed.transport === "local") {
|
|
609
|
+
const target = machineEndpoint(machine, null);
|
|
610
|
+
const startup = typeof target !== "string" && failure.transport?.kind === "http" && failure.transport.status === 503 ? await peerStartup(target) : null;
|
|
611
|
+
return diagnoseLocalUnreachable({
|
|
612
|
+
entry: machine,
|
|
613
|
+
port: parsed.port,
|
|
614
|
+
reason: failure.failure,
|
|
615
|
+
startup,
|
|
616
|
+
...failure.transport ? { transport: failure.transport } : {}
|
|
617
|
+
});
|
|
618
|
+
}
|
|
559
619
|
const peer = findPeer(await tailscaleStatusAsync(signal), parsed.name);
|
|
560
620
|
if (typeof peer === "string") return null;
|
|
561
621
|
return diagnoseOutcome({ startup: peerStartup }, {
|
|
@@ -574,19 +634,45 @@ async function diagnoseTailscale(io) {
|
|
|
574
634
|
}
|
|
575
635
|
/** Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. */
|
|
576
636
|
async function resolveEndpoint(credential, status = () => tailscaleStatusAsync(signal), signal) {
|
|
577
|
-
return machineEndpoint(credential.machine, parseMachine(credential.machine) ? await status() : null);
|
|
637
|
+
return machineEndpoint(credential.machine, parseMachine(credential.machine)?.transport === "tailscale" ? await status() : null);
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Shows a local network machine's server key fingerprint and asks a person whether it matches the one
|
|
641
|
+
* `stim-server setup` printed there. Questions go one at a time, and each machine and key is asked once per doctor
|
|
642
|
+
* run, so its build and device-host checks share the answer. Without a terminal every answer is no.
|
|
643
|
+
*/
|
|
644
|
+
function keyConfirmer(ask) {
|
|
645
|
+
const answers = /* @__PURE__ */ new Map();
|
|
646
|
+
let queue = Promise.resolve();
|
|
647
|
+
return (machine, serverKey) => {
|
|
648
|
+
if (!ask) return Promise.resolve(false);
|
|
649
|
+
const id = `${machine}\0${serverKey}`;
|
|
650
|
+
let answer = answers.get(id);
|
|
651
|
+
if (!answer) {
|
|
652
|
+
const fingerprint = keyFingerprint(Buffer.from(serverKey, "base64url"));
|
|
653
|
+
answer = queue.then(() => ask(`${machine} answered with this stim-server key fingerprint:\n ${fingerprint}\nDoes it match the fingerprint \`stim-server setup\` printed on ${machine}? Only then does Stim trust it. [y/N] `));
|
|
654
|
+
queue = answer.catch(() => false);
|
|
655
|
+
answers.set(id, answer);
|
|
656
|
+
}
|
|
657
|
+
return answer;
|
|
658
|
+
};
|
|
578
659
|
}
|
|
579
660
|
/** The remedy for a pending request: the printed setup command, or where the person finds it. */
|
|
580
661
|
function setupRemedy(entry, command) {
|
|
581
662
|
return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
|
|
582
663
|
}
|
|
583
|
-
function setupCommand(ticket, expiresAt, flags, version) {
|
|
584
|
-
|
|
664
|
+
function setupCommand(machine, ticket, expiresAt, flags, version) {
|
|
665
|
+
const parsed = parseMachine(machine);
|
|
666
|
+
const port = parsed?.transport === "local" && parsed.port !== DEFAULT_SERVER_PORT ? ` --port ${parsed.port}` : "";
|
|
667
|
+
return `STIM_SETUP_TICKET=${ticket} STIM_SETUP_ORIGIN=doctor npx --yes --package @stim-cli/server@${version} stim-server setup --expires ${expiresAt} ${flags.map((flag) => `--${flag}`).join(" ")}${port}`;
|
|
668
|
+
}
|
|
669
|
+
function transportOf(machine) {
|
|
670
|
+
return parseMachine(machine)?.transport ?? "tailscale";
|
|
585
671
|
}
|
|
586
672
|
function newPending(input, ticket, expiresAt, now) {
|
|
587
673
|
return {
|
|
588
674
|
machine: input.machine,
|
|
589
|
-
transport:
|
|
675
|
+
transport: transportOf(input.machine),
|
|
590
676
|
address: input.address,
|
|
591
677
|
state: "pending",
|
|
592
678
|
requestedAt: new Date(now).toISOString(),
|
|
@@ -599,7 +685,7 @@ function approved(input, reply, requestedAt) {
|
|
|
599
685
|
state: "approved",
|
|
600
686
|
credential: {
|
|
601
687
|
machine: input.machine,
|
|
602
|
-
transport:
|
|
688
|
+
transport: transportOf(input.machine),
|
|
603
689
|
address: input.address,
|
|
604
690
|
state: "approved",
|
|
605
691
|
requestedAt,
|
|
@@ -644,11 +730,13 @@ async function reachMachine(input) {
|
|
|
644
730
|
});
|
|
645
731
|
if ("result" in resumed && resumed.result.capabilities.includes(access)) return approved(input, resumed, pending.requestedAt);
|
|
646
732
|
}
|
|
733
|
+
const known = (serverKey) => pending.serverKey === serverKey || input.other()?.serverKey === serverKey;
|
|
647
734
|
const reply = await io.hello(input.endpoint, {
|
|
648
735
|
access,
|
|
649
736
|
ticket: pending.ticket,
|
|
650
737
|
name: input.deviceName,
|
|
651
738
|
onServerKey: (serverKey) => {
|
|
739
|
+
if (input.confirmKey && !known(serverKey)) return;
|
|
652
740
|
pending = {
|
|
653
741
|
...pending,
|
|
654
742
|
serverKey
|
|
@@ -656,8 +744,22 @@ async function reachMachine(input) {
|
|
|
656
744
|
return input.persist(pending);
|
|
657
745
|
}
|
|
658
746
|
});
|
|
659
|
-
if ("result" in reply && reply.result.capabilities.includes(access))
|
|
660
|
-
|
|
747
|
+
if ("result" in reply && reply.result.capabilities.includes(access)) {
|
|
748
|
+
if (input.confirmKey && !known(reply.serverKey)) {
|
|
749
|
+
if (!await input.confirmKey(reply.serverKey)) return {
|
|
750
|
+
state: "unconfirmed",
|
|
751
|
+
credential: pending,
|
|
752
|
+
fingerprint: keyFingerprint(Buffer.from(reply.serverKey, "base64url"))
|
|
753
|
+
};
|
|
754
|
+
pending = {
|
|
755
|
+
...pending,
|
|
756
|
+
serverKey: reply.serverKey
|
|
757
|
+
};
|
|
758
|
+
await input.persist(pending);
|
|
759
|
+
}
|
|
760
|
+
return approved(input, reply, pending.requestedAt);
|
|
761
|
+
}
|
|
762
|
+
const command = pending.expiresAt ? setupCommand(input.machine, pending.ticket, pending.expiresAt, input.setupFlags, input.serverVersion) : null;
|
|
661
763
|
if ("error" in reply && reply.error.code === "server-outdated") return {
|
|
662
764
|
state: "outdated",
|
|
663
765
|
credential: pending,
|
|
@@ -1277,4 +1379,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
|
|
|
1277
1379
|
return result;
|
|
1278
1380
|
}
|
|
1279
1381
|
//#endregion
|
|
1280
|
-
export { endpoint$1 as $, writeConfigSettingAsync as A, deviceSlotFileKey as B, saveConfig as C, withConfigLock$1 as D, upsertProject as E, isOnMountedVolume as F, projectDeviceSlots as G, deviceSlotPlatforms as H, listMountedVolumes as I, SERVER_OUTDATED as J, removeSlotDevice as K, measuredDirectorySizeAsync as L, directorySize as M, directorySizeAsync as N, withConfigLockAsync$1 as O, formatBytes as P, doctorIo as Q, volumeRootFor as R, removeProject as S, setSupervisor as T, parseDeviceSlotKey as U, deviceSlotKey as V, parseDeviceSlotOption as W, diagnoseOutcome as X, diagnoseConnectFailure as Y, diagnoseTailscale as Z, loadConfig$1 as _, clearDevice as a,
|
|
1382
|
+
export { endpoint$1 as $, writeConfigSettingAsync as A, deviceSlotFileKey as B, saveConfig as C, withConfigLock$1 as D, upsertProject as E, isOnMountedVolume as F, projectDeviceSlots as G, deviceSlotPlatforms as H, listMountedVolumes as I, SERVER_OUTDATED as J, removeSlotDevice as K, measuredDirectorySizeAsync as L, directorySize as M, directorySizeAsync as N, withConfigLockAsync$1 as O, formatBytes as P, doctorIo as Q, volumeRootFor as R, removeProject as S, setSupervisor as T, parseDeviceSlotKey as U, deviceSlotKey as V, parseDeviceSlotOption as W, diagnoseOutcome as X, diagnoseConnectFailure as Y, diagnoseTailscale as Z, loadConfig$1 as _, clearDevice as a, reachMachine as at, releaseAndroidConsolePort as b, ensureConfig as c, sayHello as ct, getConfigDir as d, diagnoseLocalUnreachable as dt, findPeer$1 as et, getConfigPath$1 as f, diagnosisFinding as ft, isPathPrefix$1 as g, getRepoSettings as h, readHostPermissions as ht, clearAndroidBootPending as i, parseMachine$1 as it, acquireAvdClaim as j, writeConfigSetting as k, findEnclosingWorktreeRoot as l, setupRemedy as lt, getProjectSettings as m, unconfirmedKeyFinding as mt, allMetroPorts as n, openAuthenticated as nt, clearSupervisor as o, realIo as ot, getProject as p, notOnTailnetDiagnosis as pt, validateDeviceSlot as q, claimMetroPort as r, outdatedServer as rt, configCorruptRepair as s, resolveEndpoint as st, allConsolePortsAndSerials as t, keyConfirmer as tt, getConcurrencyLimits as u, tailscaleStatusAsync as ut, recordIosSchemeApprovals as v, setDevice as w, releaseMetroPort as x, refuseRelativeStimPaths as y, assignSlotDevice as z };
|