stim 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -7
- package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-Co2k4f7O.mjs} +21 -3
- package/dist/{act-DHAw2A2S.mjs → act-DsuqEkiM.mjs} +298 -164
- package/dist/{activity-BzVfHSrY.mjs → activity-CMLmzp7o.mjs} +33 -12
- package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-DUFaTMdd.mjs} +7 -7
- package/dist/{android-BLgbNqox.mjs → android-ByRMUoiJ.mjs} +66 -52
- package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
- package/dist/{android-CV_GCELZ.mjs → android-DGkNqa_c.mjs} +5 -5
- package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
- package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
- package/dist/api.d.mts +132 -118
- package/dist/api.mjs +239 -42
- package/dist/{artifact-B8T3S5gi.mjs → artifact-8EY8SAPw.mjs} +40 -35
- package/dist/{artifact-DAuZ-FNU.mjs → artifact-DJPy518Y.mjs} +69 -40
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-QQzVjz3O.mjs → browser-web-Bcv99PBM.mjs} +187 -59
- package/dist/{budget-Bs6SxxzO.mjs → budget-Cvwn54qV.mjs} +830 -699
- package/dist/{build-CoPzQRNw.mjs → build-CabC3G23.mjs} +34 -27
- package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
- package/dist/{build-plan-CaFskB7_.mjs → build-plan-DUC8Ka9y.mjs} +74 -14
- package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-BJRZ9pG3.mjs → ccache-Btwc36-I.mjs} +6 -6
- package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
- package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
- package/dist/{cli-0DYf8QhQ.mjs → cli-CHZa9Lvk.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-UXD70ZbM.mjs → client-OyRoEuSr.mjs} +218 -47
- package/dist/collector-run.d.mts +1 -1
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-B1UrjZHL.mjs → command-output-gwpm28fu.mjs} +1 -1
- package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
- package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
- package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
- package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-UOeESKm6.mjs → dev-client-BSDR5h3F.mjs} +2 -2
- package/dist/{device-ExJq8Ei7.mjs → device-B-L3Fbxy.mjs} +71 -14
- package/dist/{device-DCxH7_By.mjs → device-DklWZLqb.mjs} +16 -16
- package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-DK5_EwRS.mjs} +9 -10
- package/dist/device-host-worker.mjs +25 -32
- package/dist/{device-ios-DRUeKaFV.mjs → device-ios-DoB6KFCO.mjs} +39 -16
- package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-xJPQ_QQG.mjs} +5 -5
- package/dist/{device-pool-DMRpVX9a.mjs → device-pool-BMkdsefq.mjs} +3 -3
- package/dist/{doctor-DTvaDOda.mjs → doctor-Bo7BXLux.mjs} +24 -37
- package/dist/{doctor-Dhqebm0q.mjs → doctor-D5_EzwfA.mjs} +19 -16
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-BLHCYxzi.mjs → doctor-thjWAV0z.mjs} +1 -1
- package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-N2wDotwQ.mjs} +5 -5
- package/dist/{eas-build-BomfRnFT.mjs → eas-build-CwknaQYj.mjs} +4 -4
- package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-CSgAulr5.mjs} +27 -18
- package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-DlY_serQ.mjs} +8 -7
- package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-DBWO2rxE.mjs} +10 -10
- package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
- package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
- package/dist/{gc-_-dCXdyL.mjs → gc-CXxN-4SE.mjs} +587 -313
- package/dist/gc-DnNDQyaP.mjs +3 -0
- package/dist/{guide-Yqwt2bd6.mjs → guide-Br0LEfKy.mjs} +239 -43
- package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-B-9f-jkd.mjs} +6 -6
- package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-DZAPrcro.mjs} +4 -4
- package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
- package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-FIRx9X2f.mjs} +5 -5
- package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-_awYSpfv.mjs} +21 -12
- package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-BdzE668-.mjs} +27 -14
- package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
- package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DDg3SdvY.mjs} +7 -7
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-CQ68hG9s.mjs → ios-Ds1clbIt.mjs} +8 -8
- package/dist/{ios-device-CwFMehUS.mjs → ios-device--h_-8ENa.mjs} +3 -3
- package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
- package/dist/{ios-ubFsBzwq.mjs → ios-pm4nL6By.mjs} +59 -50
- package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CZhKODF3.mjs} +5 -5
- package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
- package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Cc1dttps.mjs → js-swap-Bwhh4S7V.mjs} +7 -29
- package/dist/{launch-Zq2mOSDy.mjs → launch-BjxemNpK.mjs} +40 -39
- package/dist/{launch-CD1yVc7U.mjs → launch-CCzXlc8r.mjs} +16 -16
- package/dist/{logs-BS00Anxf.mjs → logs-BfwwadsZ.mjs} +151 -24
- package/dist/{logs-CMm05HxN.mjs → logs-jTS_lHSo.mjs} +10 -17
- package/dist/{macos-B65--pPd.mjs → macos-DVlSSyUg.mjs} +1 -1
- package/dist/{macos-C-0qJ6zq.mjs → macos-NfV2D7dO.mjs} +143 -46
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +8 -8
- package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
- package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
- package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
- package/dist/{native-android-JACyjTZs.mjs → native-android-CqgnOgsT.mjs} +43 -242
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
- package/dist/{native-run-DY_RLx3C.mjs → native-run-NwUuxbkg.mjs} +4 -5
- package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-B7KIafpM.mjs} +8 -7
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-D_VOfFL7.mjs} +2 -3
- package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-BYDOHWLN.mjs} +27 -32
- package/dist/offload-worker.d.mts +65 -2
- package/dist/offload-worker.mjs +305 -73
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
- package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
- package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-DIsMtN-d.mjs} +12 -8
- package/dist/{ports-D-MmCTdv.mjs → ports-Cy1RkmuQ.mjs} +3 -3
- package/dist/{prebuild-uD_ipCxF.mjs → prebuild-D4JoEAEs.mjs} +49 -14
- package/dist/{project-BZNjmW_8.mjs → project-wM_XFTvE.mjs} +16 -16
- package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
- package/dist/pull-requests.d.mts +2 -2
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-6OZ7MSM7.mjs} +71 -48
- package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-Dvd8hC21.mjs} +8 -8
- package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-DsoSF1Y9.mjs} +7 -7
- package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-4u1Rn-GR.mjs} +40 -26
- package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-CmTRFJaX.mjs → reload-BzkYabB-.mjs} +16 -15
- package/dist/{reload-DzjSl5P_.mjs → reload-D7AVlb8N.mjs} +1 -1
- package/dist/{remote-ByYkXdGD.mjs → remote-DjGDmlTZ.mjs} +18 -15
- package/dist/{result-DNiS-tTP.mjs → result-D2Ykz_iD.mjs} +24 -23
- package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
- package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
- package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
- package/dist/{server-command-CtzloH3v.mjs → server-command-C6QjeupS.mjs} +5 -5
- package/dist/{server-expo-DT_F_uVI.mjs → server-expo-CrjB29pq.mjs} +7 -5
- package/dist/server-expo-D58c9L0M.mjs +2 -0
- package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
- package/dist/{settings-T1gtc3bf.mjs → settings-DpR-1Wnn.mjs} +1 -1
- package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-CzD60rOD.mjs} +7 -6
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
- package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-CbfmNgM6.mjs} +6 -6
- package/dist/{stage-BIS0ydsV.mjs → stage-Bps5oius.mjs} +21 -4
- package/dist/{start-RChynRDp.mjs → start-Br-oxqMD.mjs} +1 -1
- package/dist/{start-7lpH7hmN.mjs → start-EojN4WFz.mjs} +622 -393
- package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
- package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
- package/dist/{stats-53T7OTb9.mjs → stats-D3GerlFW.mjs} +5 -5
- package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
- package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
- package/dist/{status-CSi6tlRq.mjs → status-EvrK72L2.mjs} +1 -1
- package/dist/{status-BL7jVyAB.mjs → status-WBDajew2.mjs} +43 -29
- package/dist/{status-watch-GDCfqpTE.mjs → status-watch-Bg_u-pwR.mjs} +48 -16
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
- package/dist/{stop-Bk_1qiV6.mjs → stop-DTZ9uTw3.mjs} +2 -2
- package/dist/{stop-D7h6jAXQ.mjs → stop-Dky10AEJ.mjs} +31 -22
- package/dist/{stop-CPzlM1L-.mjs → stop-Mv6W9FAk.mjs} +15 -16
- package/dist/supervisor-run.d.mts +3 -3
- package/dist/supervisor-run.mjs +28 -36
- package/dist/{support-Dlu37g6H.mjs → support-CNioewsd.mjs} +10 -10
- package/dist/{support-67vraa1Q.mjs → support-yUiOjnVY.mjs} +8 -8
- package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
- package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
- package/dist/toolchain-BY8X8HXx.mjs +2 -0
- package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-DpJMHq0n.mjs} +9 -6
- package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
- package/dist/web-CZ07gd77.mjs +2 -0
- package/dist/{web-CJmIj6AI.mjs → web-DKx6yoFA.mjs} +11 -10
- package/dist/web-run.mjs +11 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
- package/dist/{workspaces-BccMFmGQ.mjs → workspaces-CpANmBlq.mjs} +594 -266
- package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-CHecZ4Oq.mjs} +850 -551
- package/dist/worktree-ZqZVjD9K.mjs +2 -0
- package/dist/{xcode-Zlx3qjEs.mjs → xcode-BXn9-xYx.mjs} +5 -5
- package/package.json +7 -7
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/dist/gc-C-WwL0yi.mjs +0 -3
- package/dist/git-C3iTsJaZ.mjs +0 -73
- package/dist/server-expo-C-90EhcG.mjs +0 -2
- package/dist/settings-DkdmlelE.d.mts +0 -15
- package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
- package/dist/toolchain-DhKwp9iI.mjs +0 -2
- package/dist/trigger-Bf3uDcpv.mjs +0 -2
- package/dist/web-DknQETPs.mjs +0 -2
- package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
- package/dist/worktree-CK2MpJW5.mjs +0 -2
package/dist/api.mjs
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as workspaceDir, m as workspaceLogsDir$1, n as ensureWorkspaceStorage } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { E as upsertProject, p as getProject, y as refuseRelativeStimPaths } from "./config-
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { m as operationState, r as WorkspaceProcessCleanupError, v as runReport, x as ownership_claim_exports, y as trackReportResource } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { d as workspaceDir, m as workspaceLogsDir$1, n as ensureWorkspaceStorage, r as ensureWorkspaceStorageAsync } from "./paths-DQtTgsBf.mjs";
|
|
3
|
+
import { E as upsertProject, p as getProject, q as validateDeviceSlot, y as refuseRelativeStimPaths } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
5
|
+
import { d as cancelledError, f as throwIfCancelled } from "./operation-exec-BW0em61G.mjs";
|
|
6
|
+
import { a as recordWorkspaceUseAsync, i as recordWorkspaceUse } from "./workspace-state-U08dEzhG.mjs";
|
|
7
|
+
import { J as resolveProjectSettingsAsync, Nt as repoRootAsync, a as SETTING_SHAPE_REMEDY, et as settingShapeErrors, it as unknownSettingKeys, p as cacheProviderSettingError } from "./settings-C7O8A6ZI.mjs";
|
|
8
|
+
import { c as projectProblem, f as projectRegistry, i as findProjectRoot$1, r as findCommandWorkspaceAsync, t as NO_PROJECT_REFUSAL } from "./project-wM_XFTvE.mjs";
|
|
9
|
+
import { n as macosDir } from "./state-08I3hw3_.mjs";
|
|
9
10
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
10
|
-
import { B as recordFinishedBuild, H as tapBuildLog, V as startBuildProgress } from "./budget-
|
|
11
|
-
import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-
|
|
12
|
-
import { c as ensureHomeIdentity, s as workspaceShareURL } from "./stim-desktop-
|
|
13
|
-
import { s as resolveBuildPlacement } from "./selection-
|
|
14
|
-
import { c as stopWorkspaceNow } from "./stop-
|
|
15
|
-
import { r as runReload } from "./reload-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
11
|
+
import { B as recordFinishedBuild, H as tapBuildLog, V as startBuildProgress } from "./budget-Cvwn54qV.mjs";
|
|
12
|
+
import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-NwUuxbkg.mjs";
|
|
13
|
+
import { c as ensureHomeIdentity, s as workspaceShareURL } from "./stim-desktop-D5OGpYZM.mjs";
|
|
14
|
+
import { s as resolveBuildPlacement } from "./selection-DSMbWEX2.mjs";
|
|
15
|
+
import { c as stopWorkspaceNow } from "./stop-Mv6W9FAk.mjs";
|
|
16
|
+
import { r as runReload } from "./reload-BzkYabB-.mjs";
|
|
17
|
+
import { c as startDevServer } from "./start-EojN4WFz.mjs";
|
|
18
|
+
import { s as recordDoctorCheck } from "./doctor-watchman-N2wDotwQ.mjs";
|
|
19
|
+
import { a as readDoctorReport } from "./doctor-D5_EzwfA.mjs";
|
|
20
|
+
import { h as warmWorktreeTarget, m as removeWorktreeTarget } from "./worktree-CHecZ4Oq.mjs";
|
|
21
|
+
import { i as readGcReport, n as executeGc, o as withGcMaintenanceClaim } from "./gc-CXxN-4SE.mjs";
|
|
22
|
+
import { r as readWorkspaceLogs, t as followWorkspaceLogs } from "./logs-BfwwadsZ.mjs";
|
|
23
|
+
import { t as readProjectStats } from "./stats-report-BzaPrRm6.mjs";
|
|
24
|
+
import { n as buildAndroidOperation, t as buildIosOperation } from "./build-CabC3G23.mjs";
|
|
25
|
+
import { a as readAndroidBuildPlan, i as runAndroidOperation } from "./android-ByRMUoiJ.mjs";
|
|
26
|
+
import { i as readIosBuildPlan, r as runIosOperation } from "./ios-pm4nL6By.mjs";
|
|
27
|
+
import { a as buildMacosBundle, i as planMacos, n as runMacos } from "./macos-NfV2D7dO.mjs";
|
|
28
|
+
import { t as runWeb } from "./web-DKx6yoFA.mjs";
|
|
29
|
+
import { i as SettingsRefusal, o as readSettingsContext, s as readSettingsPayload, t as mutateSetting } from "./settings-write-CzD60rOD.mjs";
|
|
27
30
|
import { randomBytes } from "node:crypto";
|
|
28
31
|
import { mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync } from "node:fs";
|
|
29
32
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -31,6 +34,7 @@ import { homedir } from "node:os";
|
|
|
31
34
|
import { isAbsolute, join, resolve } from "node:path";
|
|
32
35
|
import { withAmbientContext } from "@stim-cli/core";
|
|
33
36
|
import { RUN_ID_ENV, findProjectRoot, openLogDir, validRunId } from "@stim-cli/core/state";
|
|
37
|
+
import { decodeSecret } from "@stim-cli/core/noise-session";
|
|
34
38
|
//#region src/commands/macos-build.ts
|
|
35
39
|
async function buildMacosOperation(context, root, options) {
|
|
36
40
|
const note = (line) => context.output("stderr", `${line}\n`);
|
|
@@ -121,10 +125,10 @@ async function buildMacosOperation(context, root, options) {
|
|
|
121
125
|
platform: "macos",
|
|
122
126
|
status: build.state,
|
|
123
127
|
configuration: "Debug",
|
|
124
|
-
fingerprint: null,
|
|
125
|
-
cacheKey: null,
|
|
126
|
-
cacheHit: false,
|
|
127
|
-
cacheSkipped:
|
|
128
|
+
fingerprint: build.fingerprint ?? null,
|
|
129
|
+
cacheKey: build.cacheKey ?? null,
|
|
130
|
+
cacheHit: build.cacheHit ? build.cacheSource === "provider" ? "remote" : "local" : false,
|
|
131
|
+
cacheSkipped: !build.cacheKey,
|
|
128
132
|
durationMs: build.durationMs,
|
|
129
133
|
startedAt: build.startedAt,
|
|
130
134
|
errorCode: build.errorCode,
|
|
@@ -154,8 +158,8 @@ var StimError = class extends Error {
|
|
|
154
158
|
code;
|
|
155
159
|
remedy;
|
|
156
160
|
details;
|
|
157
|
-
constructor({ code, message, remedy = null, details }) {
|
|
158
|
-
super(message);
|
|
161
|
+
constructor({ code, message, remedy = null, details }, options) {
|
|
162
|
+
super(message, options);
|
|
159
163
|
this.name = "StimError";
|
|
160
164
|
this.code = code;
|
|
161
165
|
this.remedy = remedy;
|
|
@@ -224,7 +228,7 @@ function createStim(options) {
|
|
|
224
228
|
dispose: () => signal?.removeEventListener("abort", abort)
|
|
225
229
|
};
|
|
226
230
|
};
|
|
227
|
-
const
|
|
231
|
+
const beginReport = (signal) => {
|
|
228
232
|
const operation = begin(signal, true);
|
|
229
233
|
operation.context.env.STIM_HOME = clientContext.env.STIM_HOME;
|
|
230
234
|
for (const name of [
|
|
@@ -235,14 +239,23 @@ function createStim(options) {
|
|
|
235
239
|
const directory = operation.context.env[name]?.trim();
|
|
236
240
|
if (directory) operation.context.env[name] = resolve(operation.context.cwd, directory);
|
|
237
241
|
}
|
|
242
|
+
return operation;
|
|
243
|
+
};
|
|
244
|
+
const report = async (signal, work, timeoutMs) => {
|
|
245
|
+
const operation = beginReport(signal);
|
|
238
246
|
try {
|
|
239
|
-
return await read(operation, (context) => runReport(context, (request) => withAmbientContext(request, () => work(request))));
|
|
247
|
+
return await read(operation, (context) => runReport(context, (request) => withAmbientContext(request, () => work(request)), timeoutMs));
|
|
240
248
|
} finally {
|
|
241
249
|
operation.dispose();
|
|
242
250
|
}
|
|
243
251
|
};
|
|
244
252
|
return {
|
|
245
253
|
projectRoot,
|
|
254
|
+
start: ({ signal, ...request } = {}) => {
|
|
255
|
+
const operation = begin(signal, true);
|
|
256
|
+
operation.context.env.STIM_HOME = clientContext.env.STIM_HOME;
|
|
257
|
+
return lifecycle(operation, (context) => start(context, request));
|
|
258
|
+
},
|
|
246
259
|
identity: ({ signal } = {}) => read(begin(signal), (operation) => ensureHomeIdentity(operation.signal)),
|
|
247
260
|
doctor: async ({ signal, platform, record } = {}) => {
|
|
248
261
|
if (platform !== void 0 && platform !== "ios" && platform !== "android") return Promise.reject(new StimError({
|
|
@@ -256,6 +269,53 @@ function createStim(options) {
|
|
|
256
269
|
return result;
|
|
257
270
|
});
|
|
258
271
|
},
|
|
272
|
+
requestMachineAccess: async ({ signal, ticket } = {}) => {
|
|
273
|
+
if (ticket !== void 0 && (typeof ticket !== "string" || !decodeSecret(ticket.trim()))) throw new StimError({
|
|
274
|
+
code: "STIM_BAD_ARG",
|
|
275
|
+
message: "The setup ticket must encode 32 random bytes."
|
|
276
|
+
});
|
|
277
|
+
const result = await report(signal, (context) => {
|
|
278
|
+
context.env.STIM_ACCESS_TICKET = ticket?.trim();
|
|
279
|
+
return readDoctorReport(context, "ios", version, true);
|
|
280
|
+
}, 12e4);
|
|
281
|
+
return read(begin(signal), async (context) => {
|
|
282
|
+
await recordDoctorCheck(result.project, "ios", version, context.signal);
|
|
283
|
+
return result;
|
|
284
|
+
});
|
|
285
|
+
},
|
|
286
|
+
plan: ({ signal, ...request }) => report(signal, (context) => {
|
|
287
|
+
const task = Promise.resolve().then(async () => {
|
|
288
|
+
if (request.platform === "macos") try {
|
|
289
|
+
return await planMacos(context, findProjectRoot$1(context.projectRoot) ?? context.projectRoot);
|
|
290
|
+
} catch (cause) {
|
|
291
|
+
if (cause instanceof Error && "reportCleanup" in cause) throw cause;
|
|
292
|
+
context.signal.throwIfAborted();
|
|
293
|
+
const code = cause instanceof Error && "code" in cause && typeof cause.code === "string" ? cause.code : "STIM_BAD_ARG";
|
|
294
|
+
const remedy = cause instanceof Error && "remedy" in cause && typeof cause.remedy === "string" ? cause.remedy : "Check the macOS project settings in stim guide macos.";
|
|
295
|
+
throw new StimError({
|
|
296
|
+
code,
|
|
297
|
+
message: cause instanceof Error ? cause.message : String(cause),
|
|
298
|
+
remedy
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
if (request.platform !== "ios" && request.platform !== "android") throw new StimError({
|
|
302
|
+
code: "STIM_BAD_ARG",
|
|
303
|
+
message: "platform must be ios, android or macos."
|
|
304
|
+
});
|
|
305
|
+
const selectors = { slot: validateDeviceSlot(request.slot) };
|
|
306
|
+
const result = request.platform === "ios" ? await readIosBuildPlan(context, selectors) : await readAndroidBuildPlan(context, selectors);
|
|
307
|
+
context.signal.throwIfAborted();
|
|
308
|
+
if ("platform" in result) return result;
|
|
309
|
+
throw new StimError({
|
|
310
|
+
...result.refusal,
|
|
311
|
+
details: { lines: result.lines }
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
trackReportResource(context, task.then(() => void 0, (cause) => {
|
|
315
|
+
if (cause instanceof Error && "reportCleanup" in cause) throw cause;
|
|
316
|
+
}), () => {});
|
|
317
|
+
return task;
|
|
318
|
+
}),
|
|
259
319
|
gc: ({ signal, olderThan, cache, worktrees } = {}) => {
|
|
260
320
|
if (olderThan !== void 0 && !Number.isSafeInteger(olderThan)) return Promise.reject(new StimError({
|
|
261
321
|
code: "STIM_BAD_ARG",
|
|
@@ -274,6 +334,82 @@ function createStim(options) {
|
|
|
274
334
|
return result;
|
|
275
335
|
});
|
|
276
336
|
},
|
|
337
|
+
collectGarbage: ({ signal, olderThan, cache, worktrees, delete: deleting, idleMs } = {}) => {
|
|
338
|
+
const invalid = olderThan !== void 0 && !Number.isSafeInteger(olderThan) ? "olderThan must be a whole number of days." : cache !== void 0 && (typeof cache !== "string" || !cache.trim()) ? "cache must name a cache." : worktrees !== void 0 && typeof worktrees !== "boolean" ? "worktrees must be a boolean." : deleting !== void 0 && typeof deleting !== "boolean" ? "delete must be a boolean." : idleMs !== void 0 && (!Number.isSafeInteger(idleMs) || idleMs <= 0) ? "idleMs must be a positive whole number of milliseconds." : null;
|
|
339
|
+
if (invalid) return Promise.reject(new StimError({
|
|
340
|
+
code: "STIM_BAD_ARG",
|
|
341
|
+
message: invalid
|
|
342
|
+
}));
|
|
343
|
+
const operation = beginReport(signal);
|
|
344
|
+
const request = {
|
|
345
|
+
olderThan,
|
|
346
|
+
cache,
|
|
347
|
+
worktrees,
|
|
348
|
+
delete: deleting,
|
|
349
|
+
idle: idleMs,
|
|
350
|
+
json: true
|
|
351
|
+
};
|
|
352
|
+
return lifecycle(operation, (context) => withGcMaintenanceClaim(request, (claim) => runReport(context, (bounded) => withAmbientContext(bounded, () => {
|
|
353
|
+
const task = executeGc(request, {
|
|
354
|
+
operation: bounded,
|
|
355
|
+
easLedgerRoot: join(bounded.env.HOME || bounded.env.USERPROFILE || homedir(), ".stim", "machine", "eas")
|
|
356
|
+
}, (_stream, line) => bounded.output("stderr", `${line}\n`), claim).then(({ payload, exitCode }) => {
|
|
357
|
+
if ("code" in payload) throw new StimError(payload);
|
|
358
|
+
return {
|
|
359
|
+
report: payload,
|
|
360
|
+
exitCode
|
|
361
|
+
};
|
|
362
|
+
});
|
|
363
|
+
trackReportResource(bounded, task.then(() => void 0, (cause) => {
|
|
364
|
+
if (cause instanceof WorkspaceProcessCleanupError || cause instanceof Error && "reportCleanup" in cause) throw cause;
|
|
365
|
+
}), () => {});
|
|
366
|
+
return task;
|
|
367
|
+
}))).catch((cause) => {
|
|
368
|
+
if (cause instanceof WorkspaceProcessCleanupError) throw cause;
|
|
369
|
+
const failure = (0, ownership_claim_exports.claimFailure)(cause, null);
|
|
370
|
+
if (failure) throw new StimError(failure);
|
|
371
|
+
throw cause;
|
|
372
|
+
}));
|
|
373
|
+
},
|
|
374
|
+
warmWorktree: ({ signal, beforeWarm } = {}) => lifecycle(beginReport(signal), (context) => runReport(context, (bounded) => withAmbientContext(bounded, () => {
|
|
375
|
+
const task = warmWorktreeTarget({
|
|
376
|
+
cwd: bounded.cwd,
|
|
377
|
+
operation: bounded,
|
|
378
|
+
beforeWarm
|
|
379
|
+
});
|
|
380
|
+
trackReportResource(bounded, task.then(() => void 0, (cause) => {
|
|
381
|
+
if (cause instanceof WorkspaceProcessCleanupError || cause instanceof Error && "reportCleanup" in cause) throw cause;
|
|
382
|
+
}), () => {});
|
|
383
|
+
return task;
|
|
384
|
+
}), 54e5)),
|
|
385
|
+
removeWorktree: ({ signal, target, force, beforeRemove } = {}) => {
|
|
386
|
+
const invalid = target !== void 0 && (typeof target !== "string" || target.length === 0) ? "target must be a nonempty path." : force !== void 0 && typeof force !== "boolean" ? "force must be a boolean." : null;
|
|
387
|
+
if (invalid) return Promise.reject(new StimError({
|
|
388
|
+
code: "STIM_BAD_ARG",
|
|
389
|
+
message: invalid
|
|
390
|
+
}));
|
|
391
|
+
return lifecycle(beginReport(signal), (context) => runReport(context, (bounded) => withAmbientContext(bounded, () => {
|
|
392
|
+
let exitCode = 0;
|
|
393
|
+
const task = removeWorktreeTarget(resolve(bounded.cwd, target ?? "."), {
|
|
394
|
+
force,
|
|
395
|
+
beforeRemove,
|
|
396
|
+
operation: bounded,
|
|
397
|
+
output: {
|
|
398
|
+
error: (line) => bounded.output("stderr", `${line}\n`),
|
|
399
|
+
fail: () => {
|
|
400
|
+
exitCode = 1;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}).then((removed) => ({
|
|
404
|
+
removed,
|
|
405
|
+
exitCode
|
|
406
|
+
}));
|
|
407
|
+
trackReportResource(bounded, task.then(() => void 0, (cause) => {
|
|
408
|
+
if (cause instanceof WorkspaceProcessCleanupError || cause instanceof Error && "reportCleanup" in cause) throw cause;
|
|
409
|
+
}), () => {});
|
|
410
|
+
return task;
|
|
411
|
+
})));
|
|
412
|
+
},
|
|
277
413
|
settings: ({ signal } = {}) => read(begin(signal), async (operation) => readSettingsPayload(await readSettingsContext(operation.projectRoot, {
|
|
278
414
|
...operation.env,
|
|
279
415
|
STIM_HOME: clientContext.env.STIM_HOME
|
|
@@ -320,7 +456,8 @@ function createStim(options) {
|
|
|
320
456
|
build: (({ signal, ...request }) => lifecycle(begin(signal, true), (operation) => build(operation, request))),
|
|
321
457
|
run: (({ signal, ...request }) => lifecycle(begin(signal, true), (operation) => run(operation, request))),
|
|
322
458
|
stop: ({ signal, ...request } = {}) => read(begin(signal), async (operation) => {
|
|
323
|
-
const root = operation.projectRoot;
|
|
459
|
+
const root = findProjectRoot$1(operation.projectRoot) ?? operation.projectRoot;
|
|
460
|
+
request.beforeStop?.(root);
|
|
324
461
|
const logs = workspaceLogsDir$1(root);
|
|
325
462
|
let result;
|
|
326
463
|
try {
|
|
@@ -416,16 +553,17 @@ async function read({ context, callback }, operation) {
|
|
|
416
553
|
refuseRelativeStimPaths(context.env);
|
|
417
554
|
result = await withAmbientContext(context, () => operation(context));
|
|
418
555
|
} catch (error) {
|
|
419
|
-
|
|
420
|
-
if (
|
|
556
|
+
const cleanupUnresolved = error instanceof Error && ("reportCleanup" in error || "code" in error && error.code === "STIM_CLAIM_UNAVAILABLE");
|
|
557
|
+
if ("error" in callback && !cleanupUnresolved) throw callback.error;
|
|
558
|
+
if (signal.aborted && !cleanupUnresolved) throw cancelled();
|
|
421
559
|
if (error instanceof StimError) throw error;
|
|
422
560
|
if (error instanceof Error && "code" in error && typeof error.code === "string" && error.code.startsWith("STIM_")) {
|
|
423
|
-
const remedy = error instanceof SettingsRefusal ? error.remedy : null;
|
|
561
|
+
const remedy = error instanceof SettingsRefusal ? error.remedy : cleanupUnresolved && "remedy" in error && typeof error.remedy === "string" ? error.remedy : null;
|
|
424
562
|
throw new StimError({
|
|
425
563
|
code: error.code,
|
|
426
564
|
message: error.message,
|
|
427
565
|
remedy
|
|
428
|
-
});
|
|
566
|
+
}, cleanupUnresolved ? { cause: error } : void 0);
|
|
429
567
|
}
|
|
430
568
|
throw error;
|
|
431
569
|
}
|
|
@@ -456,7 +594,7 @@ async function lifecycle(operation, work) {
|
|
|
456
594
|
remedy: failure?.remedy ?? null,
|
|
457
595
|
details: {
|
|
458
596
|
logs,
|
|
459
|
-
cause: failure?.details
|
|
597
|
+
cause: error instanceof WorkspaceProcessCleanupError ? { retainedClaimRoots: [...new Set(error.claims.map((claim) => claim.root))] } : failure?.details
|
|
460
598
|
}
|
|
461
599
|
});
|
|
462
600
|
}
|
|
@@ -465,6 +603,63 @@ async function lifecycle(operation, work) {
|
|
|
465
603
|
operation.dispose();
|
|
466
604
|
}
|
|
467
605
|
}
|
|
606
|
+
async function start(context, options) {
|
|
607
|
+
if (options.waitSeconds !== void 0 && (!Number.isSafeInteger(options.waitSeconds) || options.waitSeconds <= 0)) throw new StimError({
|
|
608
|
+
code: "STIM_BAD_ARG",
|
|
609
|
+
message: "waitSeconds must be a positive whole number."
|
|
610
|
+
});
|
|
611
|
+
const root = findProjectRoot$1(context.projectRoot);
|
|
612
|
+
if (!root) throw new StimError(NO_PROJECT_REFUSAL);
|
|
613
|
+
const problem = projectProblem(root, "dev-server");
|
|
614
|
+
if (problem) throw new StimError({
|
|
615
|
+
code: "STIM_NO_PROJECT",
|
|
616
|
+
...problem
|
|
617
|
+
});
|
|
618
|
+
options.beforeStart?.(root);
|
|
619
|
+
context.signal.throwIfAborted();
|
|
620
|
+
return withAmbientContext({
|
|
621
|
+
...context,
|
|
622
|
+
projectRoot: root
|
|
623
|
+
}, async () => {
|
|
624
|
+
const { context: settingsContext, settings } = await resolveProjectSettingsAsync(root, {
|
|
625
|
+
env: context.env,
|
|
626
|
+
signal: context.signal
|
|
627
|
+
});
|
|
628
|
+
const shapeErrors = settingShapeErrors(settings);
|
|
629
|
+
if (shapeErrors.length) throw new StimError({
|
|
630
|
+
code: "STIM_BAD_ARG",
|
|
631
|
+
message: shapeErrors.join("\n"),
|
|
632
|
+
remedy: SETTING_SHAPE_REMEDY
|
|
633
|
+
});
|
|
634
|
+
for (const key of unknownSettingKeys(settings)) note(context)(`Warning: setting "${key}" is not read by Stim and will be ignored.`);
|
|
635
|
+
const cacheError = cacheProviderSettingError(settings);
|
|
636
|
+
if (cacheError) note(context)(`Warning: ${cacheError} No cache provider is used.`);
|
|
637
|
+
await ensureWorkspaceStorageAsync(root, context.signal);
|
|
638
|
+
await recordWorkspaceUseAsync(root, /* @__PURE__ */ new Date(), context.env, context.cwd, context.signal);
|
|
639
|
+
const result = await startDevServer({
|
|
640
|
+
root,
|
|
641
|
+
settings,
|
|
642
|
+
settingsContext,
|
|
643
|
+
waitSeconds: options.waitSeconds,
|
|
644
|
+
remote: options.remote,
|
|
645
|
+
resetCache: options.resetCache,
|
|
646
|
+
out: (line) => context.output("stdout", `${line}\n`),
|
|
647
|
+
note: note(context)
|
|
648
|
+
});
|
|
649
|
+
if (!result.ok) {
|
|
650
|
+
for (const line of result.lines) note(context)(line);
|
|
651
|
+
throw new StimError({
|
|
652
|
+
...result.error,
|
|
653
|
+
details: {
|
|
654
|
+
lines: result.lines,
|
|
655
|
+
reclaimed: result.reclaimed,
|
|
656
|
+
...result.retainedClaimRoots ? { retainedClaimRoots: result.retainedClaimRoots } : {}
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
return result.facts;
|
|
661
|
+
});
|
|
662
|
+
}
|
|
468
663
|
async function reload(context, options) {
|
|
469
664
|
if (options.platform !== void 0 && ![
|
|
470
665
|
"ios",
|
|
@@ -540,7 +735,8 @@ async function run(context, options) {
|
|
|
540
735
|
if (!result.ok || !result.facts) throw new StimError({
|
|
541
736
|
code: result.error?.code ?? "STIM_RUN_FAILED",
|
|
542
737
|
message: result.error?.message ?? "The Android run failed.",
|
|
543
|
-
remedy: result.error?.remedy
|
|
738
|
+
remedy: result.error?.remedy,
|
|
739
|
+
details: result.error
|
|
544
740
|
});
|
|
545
741
|
return {
|
|
546
742
|
platform: "android",
|
|
@@ -548,7 +744,7 @@ async function run(context, options) {
|
|
|
548
744
|
};
|
|
549
745
|
}
|
|
550
746
|
case "macos": {
|
|
551
|
-
const record = await runMacos(context, root, note(context),
|
|
747
|
+
const record = await runMacos(context, root, note(context), options.remote, options.remoteBuild);
|
|
552
748
|
return {
|
|
553
749
|
platform: "macos",
|
|
554
750
|
facts: {
|
|
@@ -557,7 +753,7 @@ async function run(context, options) {
|
|
|
557
753
|
bundleId: record.bundleId,
|
|
558
754
|
executable: record.executable,
|
|
559
755
|
pid: record.app?.pid ?? null,
|
|
560
|
-
launched: record.app !== void 0,
|
|
756
|
+
launched: record.hostLaunched ?? record.app !== void 0,
|
|
561
757
|
build: record.build,
|
|
562
758
|
logs: { dir: workspaceLogsDir$1(root) }
|
|
563
759
|
}
|
|
@@ -571,6 +767,7 @@ async function run(context, options) {
|
|
|
571
767
|
context
|
|
572
768
|
});
|
|
573
769
|
if (!result.ok) throw new StimError(result.error);
|
|
770
|
+
if (result.remedy) note(context)(result.remedy);
|
|
574
771
|
return {
|
|
575
772
|
platform: "web",
|
|
576
773
|
facts: result.facts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as withDrainingCancellation, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-
|
|
4
|
-
import {
|
|
5
|
-
import { Hn as isEasAuthFailureText, Ln as RESOLVE_TIMEOUT_MS, Vn as easAuthNote } from "./budget-
|
|
6
|
-
import { d as runCancellationSignal, r as cancelledFailure } from "./native-run-
|
|
7
|
-
import { d as prepareProviderDownloadDir, f as providerDownloadPath, p as providerUploadOutcome } from "./build-cache-
|
|
8
|
-
import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-
|
|
9
|
-
import { c as offloadPlacement,
|
|
10
|
-
import { a as requireLocalBuild, r as namedBuildMachine, t as OffloadRefusal } from "./selection-
|
|
11
|
-
import { S as xcodeFailureReport, p as printDiagnostics } from "./support-
|
|
12
|
-
import {
|
|
13
|
-
import { t as buildPlacementRecord } from "./placement-log-
|
|
14
|
-
import { t as acquireArtifact } from "./acquire-artifact-
|
|
15
|
-
import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-
|
|
3
|
+
import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-gwpm28fu.mjs";
|
|
4
|
+
import { f as throwIfCancelled } from "./operation-exec-BW0em61G.mjs";
|
|
5
|
+
import { Hn as isEasAuthFailureText, Ln as RESOLVE_TIMEOUT_MS, Vn as easAuthNote } from "./budget-Cvwn54qV.mjs";
|
|
6
|
+
import { d as runCancellationSignal, r as cancelledFailure } from "./native-run-NwUuxbkg.mjs";
|
|
7
|
+
import { d as prepareProviderDownloadDir, f as providerDownloadPath, p as providerUploadOutcome } from "./build-cache-Dv7RN200.mjs";
|
|
8
|
+
import { o as compilationCacheActivityLine, t as COMPILATION_CACHE_NOT_RUN } from "./xcode-BXn9-xYx.mjs";
|
|
9
|
+
import { _ as clearCorruptCompilationCache, c as offloadPlacement, g as COMPILATION_CACHE_CORRUPT, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-OyRoEuSr.mjs";
|
|
10
|
+
import { a as requireLocalBuild, r as namedBuildMachine, t as OffloadRefusal } from "./selection-DSMbWEX2.mjs";
|
|
11
|
+
import { S as xcodeFailureReport, p as printDiagnostics } from "./support-CNioewsd.mjs";
|
|
12
|
+
import { l as skippedMissReason } from "./prebuild-D4JoEAEs.mjs";
|
|
13
|
+
import { t as buildPlacementRecord } from "./placement-log-BnGgJRRZ.mjs";
|
|
14
|
+
import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-Co2k4f7O.mjs";
|
|
15
|
+
import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-CZhKODF3.mjs";
|
|
16
16
|
import { rmSync } from "node:fs";
|
|
17
17
|
import { join } from "node:path";
|
|
18
18
|
import { machineCapacity } from "@stim-cli/core/state";
|
|
@@ -83,6 +83,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
83
83
|
const loadProvider = cachePolicy.remote && cacheProviderConfig && !physical ? () => providerLoad ??= d.loadCacheProvider({
|
|
84
84
|
projectRoot: root,
|
|
85
85
|
config: cacheProviderConfig,
|
|
86
|
+
env: context.env,
|
|
86
87
|
timeoutMs: timeoutFromEnv(PROVIDER_LOAD_TIMEOUT_ENV, PROVIDER_LOAD_TIMEOUT_MS, context.env)
|
|
87
88
|
}) : null;
|
|
88
89
|
if (cacheProviderConfig && physical) note(chalk.dim(phaseLine("cache", PROVIDER_SKIPPED_ON_DEVICE)));
|
|
@@ -142,9 +143,9 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
142
143
|
appPath = found?.path ?? null;
|
|
143
144
|
}
|
|
144
145
|
async function resolveRemoteArtifact() {
|
|
145
|
-
if (cacheIneligible || !recipe.
|
|
146
|
+
if (cacheIneligible || !recipe.expoCache) return null;
|
|
146
147
|
if (!appPath) {
|
|
147
|
-
const loaded = await recipe.
|
|
148
|
+
const loaded = await recipe.expoCache.load();
|
|
148
149
|
if (loaded?.unavailable) note(chalk.yellow(phaseLine("cache", `provider not usable: ${loaded.unavailable}`)));
|
|
149
150
|
else if (loaded?.provider) remote = loaded;
|
|
150
151
|
if (remote?.name === "eas") {
|
|
@@ -167,7 +168,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
167
168
|
platform: "ios",
|
|
168
169
|
projectRoot: root,
|
|
169
170
|
fingerprintHash: fingerprint,
|
|
170
|
-
runOptions: recipe.
|
|
171
|
+
runOptions: recipe.expoCache?.runOptions ?? null
|
|
171
172
|
});
|
|
172
173
|
if (hit?.appPath) {
|
|
173
174
|
let stored = null;
|
|
@@ -334,7 +335,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
334
335
|
});
|
|
335
336
|
if (!placement.offload) {
|
|
336
337
|
hereReason = placement.reason;
|
|
337
|
-
if (placement.code === "this-mac-free" && runtime && useBuildCache && cachePolicy.remote && recipe.offload
|
|
338
|
+
if (placement.code === "this-mac-free" && runtime && useBuildCache && cachePolicy.remote && recipe.offload !== void 0) return {
|
|
338
339
|
cacheOnly: true,
|
|
339
340
|
mode,
|
|
340
341
|
here,
|
|
@@ -379,6 +380,10 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
379
380
|
selected: buildMachine,
|
|
380
381
|
onCandidates: (each) => asked = each,
|
|
381
382
|
cacheOnly: candidate.cacheOnly,
|
|
383
|
+
...useBuildCache && cachePolicy.remote && storeHash && !offload.request(candidate.runtime).native ? { reactNativeArtifact: {
|
|
384
|
+
fingerprint: storeHash,
|
|
385
|
+
request: offload.request(candidate.runtime)
|
|
386
|
+
} } : {},
|
|
382
387
|
...useBuildCache && cachePolicy.remote && storeHash && storeKey && offload.request(candidate.runtime).native?.provider === "xcode" ? { artifact: {
|
|
383
388
|
fingerprint: storeHash,
|
|
384
389
|
cacheKey: storeKey
|
|
@@ -594,7 +599,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
594
599
|
if (!result.ok) {
|
|
595
600
|
phase("build", `FAILED after ${formatDuration(result.durationMs)}`);
|
|
596
601
|
printDiagnostics(note, result);
|
|
597
|
-
const report = result.compilationCacheCorruption ? clearCorruptCompilationCache(result.compilationCacheCorruption, root) : {
|
|
602
|
+
const report = result.compilationCacheCorruption ? await clearCorruptCompilationCache(result.compilationCacheCorruption, root) : {
|
|
598
603
|
code: result.code,
|
|
599
604
|
...xcodeFailureReport(result, logFile)
|
|
600
605
|
};
|
|
@@ -659,16 +664,19 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
659
664
|
}
|
|
660
665
|
});
|
|
661
666
|
installPath = prepared;
|
|
662
|
-
if (remote && !physical && storeHash)
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
667
|
+
if (remote && !physical && storeHash) {
|
|
668
|
+
uploadPending = d.uploadRemote({
|
|
669
|
+
context,
|
|
670
|
+
logWriter: logWriter(),
|
|
671
|
+
provider: remote.provider,
|
|
672
|
+
platform: "ios",
|
|
673
|
+
projectRoot: root,
|
|
674
|
+
fingerprintHash: storeHash,
|
|
675
|
+
buildPath: installPath,
|
|
676
|
+
runOptions: recipe.expoCache?.runOptions ?? null
|
|
677
|
+
});
|
|
678
|
+
uploadPending.catch(() => {});
|
|
679
|
+
}
|
|
672
680
|
return installPath;
|
|
673
681
|
}
|
|
674
682
|
const acquired = await acquireArtifact({
|
|
@@ -729,7 +737,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
729
737
|
};
|
|
730
738
|
},
|
|
731
739
|
settleFailed: async () => {
|
|
732
|
-
await
|
|
740
|
+
await settleArtifactUploads(uploadPending, providerUpload);
|
|
733
741
|
},
|
|
734
742
|
refuse: (error) => {
|
|
735
743
|
if (error instanceof OffloadRefusal) return {
|
|
@@ -816,11 +824,8 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
|
|
|
816
824
|
return abandonedRemote || uploadWasAbandoned;
|
|
817
825
|
},
|
|
818
826
|
release: async () => {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
} finally {
|
|
822
|
-
acquired.release();
|
|
823
|
-
}
|
|
827
|
+
await settleArtifactUploads(providerUpload, uploadPending);
|
|
828
|
+
acquired.release();
|
|
824
829
|
}
|
|
825
830
|
}
|
|
826
831
|
};
|