stim 1.20.2 → 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 +141 -8
- package/dist/acquire-artifact-Co2k4f7O.mjs +171 -0
- package/dist/act-DsuqEkiM.mjs +2801 -0
- package/dist/activity-CMLmzp7o.mjs +1397 -0
- package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-DUFaTMdd.mjs} +23 -67
- package/dist/{android-DCKZrNvV.mjs → android-ByRMUoiJ.mjs} +157 -93
- package/dist/{android-Mz_Inn3w.mjs → android-C7sVmyI9.mjs} +299 -116
- package/dist/{android-Dlzxshgp.mjs → android-DGkNqa_c.mjs} +5 -5
- package/dist/{android-HqP1_vB_.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-ngferVq2.mjs} +7 -6
- package/dist/android-project-BCAAmMwz.mjs +12 -0
- package/dist/android-project-DVWyCbWU.d.mts +391 -0
- package/dist/api.d.mts +810 -64
- package/dist/api.mjs +782 -1
- package/dist/{artifact-HSwkIWEQ.mjs → artifact-8EY8SAPw.mjs} +240 -213
- package/dist/{artifact-D3czlUvT.mjs → artifact-DJPy518Y.mjs} +203 -164
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-CA-F1GQo.mjs → browser-web-Bcv99PBM.mjs} +194 -64
- package/dist/budget-Cvwn54qV.mjs +9285 -0
- package/dist/{build-DYDbfkk5.mjs → build-CabC3G23.mjs} +153 -98
- package/dist/build-cache-Dv7RN200.mjs +602 -0
- package/dist/build-plan-DUC8Ka9y.mjs +248 -0
- package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DSeQjt-Q.mjs} +2 -2
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-zdKiYQ3E.mjs → ccache-Btwc36-I.mjs} +10 -9
- package/dist/{cdp-Dq_ypAlJ.mjs → cdp-3fwICjzi.mjs} +18 -5
- package/dist/{chrome-BnzZMqsR.mjs → chrome-Bbw689-6.mjs} +7 -4
- package/dist/{cli-CLP3diBm.mjs → cli-CHZa9Lvk.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/client-OyRoEuSr.mjs +1577 -0
- package/dist/collector-run.d.mts +4 -40
- package/dist/collector-run.mjs +9 -8
- package/dist/{command-output-BTy8hZ0F.mjs → command-output-gwpm28fu.mjs} +1 -1
- package/dist/config-DlrsduwG.mjs +955 -0
- package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-x9rN6bhs.mjs} +14 -4
- package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-1I9KZT1Y.mjs} +20 -5
- package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-DAWVIGBu.mjs → dev-client-BSDR5h3F.mjs} +2 -2
- package/dist/{device-BECOiufl.mjs → device-B-L3Fbxy.mjs} +91 -34
- package/dist/device-DklWZLqb.mjs +1068 -0
- package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-DK5_EwRS.mjs} +42 -13
- package/dist/device-host-worker.mjs +76 -79
- package/dist/{device-ios-COSi6oS1.mjs → device-ios-DoB6KFCO.mjs} +77 -51
- package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-xJPQ_QQG.mjs} +14 -26
- package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-BMkdsefq.mjs} +5 -5
- package/dist/{doctor-kfMBnUw6.mjs → doctor-Bo7BXLux.mjs} +271 -320
- package/dist/{doctor-CB8oZKCk.mjs → doctor-D5_EzwfA.mjs} +186 -91
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +19 -0
- package/dist/doctor-thjWAV0z.mjs +2 -0
- package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-N2wDotwQ.mjs} +40 -21
- package/dist/{eas-build-JyfqyHfC.mjs → eas-build-CwknaQYj.mjs} +53 -20
- package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-CSgAulr5.mjs} +41 -214
- package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-DlY_serQ.mjs} +230 -11
- package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-DBWO2rxE.mjs} +172 -82
- package/dist/exec-DEoAhcze.mjs +858 -0
- package/dist/exec-DnYc4HGH.d.mts +78 -0
- package/dist/{gc-qWOMdnER.mjs → gc-CXxN-4SE.mjs} +1091 -1029
- package/dist/gc-DnNDQyaP.mjs +3 -0
- package/dist/{guide-G9cAbVAc.mjs → guide-Br0LEfKy.mjs} +1165 -297
- package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-B-9f-jkd.mjs} +10 -8
- package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DZAPrcro.mjs} +34 -19
- package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
- package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-FIRx9X2f.mjs} +77 -43
- package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-_awYSpfv.mjs} +35 -22
- package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-BdzE668-.mjs} +49 -27
- package/dist/idle-C4cZ757K.d.mts +24 -0
- package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DDg3SdvY.mjs} +11 -10
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-BwVCF7oA.mjs → ios-Ds1clbIt.mjs} +8 -8
- package/dist/{ios-device-D7pi2Sca.mjs → ios-device--h_-8ENa.mjs} +51 -26
- package/dist/{ios-device-B5veSDDQ.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-RkW4pnQf.mjs → ios-hcBpnEGk.mjs} +200 -93
- package/dist/{ios-Ce7bc7br.mjs → ios-pm4nL6By.mjs} +160 -108
- package/dist/{ios-project-K9hY_Jab.mjs → ios-project-CZhKODF3.mjs} +13 -13
- package/dist/ios-signing-BtAffm0A.mjs +489 -0
- package/dist/{ios-state-CBLe1xYw.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-nOLJGVdy.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Bwhh4S7V.mjs} +30 -25
- package/dist/{launch-C3qJ6Agb.mjs → launch-BjxemNpK.mjs} +85 -543
- package/dist/{launch-F4sOqAhB.mjs → launch-CCzXlc8r.mjs} +91 -90
- package/dist/logs-BfwwadsZ.mjs +479 -0
- package/dist/logs-jTS_lHSo.mjs +248 -0
- package/dist/{macos-D7uDvO-z.mjs → macos-DVlSSyUg.mjs} +1 -1
- package/dist/macos-NfV2D7dO.mjs +694 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +123 -248
- package/dist/{metro-DnCEjCxs.mjs → metro-DiXtA3Ty.mjs} +107 -30
- package/dist/metro-gateway-CKZqKqx7.mjs +209 -0
- package/dist/{named-ports-4WopRPg-.mjs → named-ports-DkEzOfzO.mjs} +42 -90
- package/dist/native-android-CqgnOgsT.mjs +645 -0
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +211 -0
- package/dist/native-inputs-TRTTTRxt.mjs +91 -0
- package/dist/native-run-NwUuxbkg.mjs +276 -0
- package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-B7KIafpM.mjs} +11 -9
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-D_VOfFL7.mjs} +26 -18
- package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-BYDOHWLN.mjs} +104 -60
- package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
- package/dist/offload-worker.d.mts +59 -41
- package/dist/offload-worker.mjs +478 -115
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DCtw_2IA.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-DRHy329N.mjs → page-DBL2PiUU.mjs} +12 -5
- package/dist/paths-BsJMoPP2.mjs +12 -0
- package/dist/paths-DQtTgsBf.mjs +42 -0
- package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BnGgJRRZ.mjs} +5 -5
- package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-DIsMtN-d.mjs} +15 -11
- package/dist/{ports-DdSUicVo.mjs → ports-Cy1RkmuQ.mjs} +3 -3
- package/dist/prebuild-D4JoEAEs.mjs +484 -0
- package/dist/{project-_phNIJfs.mjs → project-wM_XFTvE.mjs} +65 -37
- package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/pull-request-eODyIqZF.d.mts +124 -0
- package/dist/pull-requests.d.mts +2 -120
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-6OZ7MSM7.mjs} +121 -72
- package/dist/{gradle-DSrXb6lG.mjs → react-native-build-Dvd8hC21.mjs} +292 -15
- package/dist/react-native-doctor-DsoSF1Y9.mjs +234 -0
- package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-4u1Rn-GR.mjs} +71 -39
- package/dist/{recordings-D0d5aQt0.mjs → recordings-CQmfzAh7.mjs} +12 -9
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-C8JhxjSh.mjs → reload-BzkYabB-.mjs} +94 -47
- package/dist/reload-D7AVlb8N.mjs +2 -0
- package/dist/{remote-BiR6aYjy.mjs → remote-DjGDmlTZ.mjs} +26 -18
- package/dist/result-D2Ykz_iD.mjs +435 -0
- package/dist/{run-BtPgpKks.mjs → run-DidHghD1.mjs} +5 -5
- package/dist/selection-DSMbWEX2.mjs +620 -0
- package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CafzuyFB.mjs} +3 -4
- package/dist/{server-command-CTtCkmcQ.mjs → server-command-C6QjeupS.mjs} +14 -7
- package/dist/{server-expo-DsguMGUF.mjs → server-expo-CrjB29pq.mjs} +54 -11
- package/dist/server-expo-D58c9L0M.mjs +2 -0
- package/dist/{settings-B717odTD.mjs → settings-C7O8A6ZI.mjs} +309 -119
- package/dist/settings-DpR-1Wnn.mjs +114 -0
- package/dist/settings-write-CzD60rOD.mjs +360 -0
- package/dist/settings.schema.json +176 -16
- package/dist/{simslim-CCr3rE-A.mjs → simslim-BNckWpXi.mjs} +14 -12
- package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-CbfmNgM6.mjs} +15 -20
- package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
- package/dist/stage-Bps5oius.mjs +200 -0
- package/dist/{start-TXeMmmO2.mjs → start-Br-oxqMD.mjs} +1 -1
- package/dist/start-EojN4WFz.mjs +1364 -0
- package/dist/{state-D1Icyjlu.mjs → state--smjFSTL.mjs} +55 -13
- package/dist/{state-CG_OFoaA.mjs → state-08I3hw3_.mjs} +3 -2
- package/dist/{stats-BoY5sEPU.mjs → stats-D3GerlFW.mjs} +7 -13
- package/dist/stats-report-BzaPrRm6.mjs +16 -0
- package/dist/{status-BTA7kKiQ.mjs → status-BRROykC8.mjs} +7 -5
- package/dist/status-EvrK72L2.mjs +2 -0
- package/dist/{status-WgFbkRzj.mjs → status-WBDajew2.mjs} +554 -452
- package/dist/{status-watch-C23ILtf9.mjs → status-watch-Bg_u-pwR.mjs} +222 -25
- package/dist/status-worker.d.mts +1 -0
- package/dist/status-worker.mjs +19 -0
- package/dist/stim-desktop-D5OGpYZM.mjs +112 -0
- package/dist/{stop-DR6VoDIk.mjs → stop-DTZ9uTw3.mjs} +2 -2
- package/dist/{stop-DPEhunlw.mjs → stop-Dky10AEJ.mjs} +33 -23
- package/dist/{stop-BNmBMi1F.mjs → stop-Mv6W9FAk.mjs} +137 -98
- package/dist/supervisor-run.d.mts +8 -17
- package/dist/supervisor-run.mjs +56 -28
- package/dist/{support-CwjbFs9H.mjs → support-CNioewsd.mjs} +14 -14
- package/dist/{support-DMTqj3Hm.mjs → support-yUiOjnVY.mjs} +20 -13
- 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-DpJMHq0n.mjs +876 -0
- package/dist/{trigger-CigAYjeL.mjs → trigger-Cbyc41d_.mjs} +21 -6
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-CA3TgT3-.mjs} +263 -156
- package/dist/web-CZ07gd77.mjs +2 -0
- package/dist/{web-BDBMxDpx.mjs → web-DKx6yoFA.mjs} +20 -14
- package/dist/web-run.mjs +13 -12
- package/dist/windows-report.d.mts +1 -0
- package/dist/windows-report.mjs +18 -0
- package/dist/windows-report.ps1 +43 -0
- package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-U08dEzhG.mjs} +62 -58
- package/dist/{workspaces-C36s2jb9.mjs → workspaces-CpANmBlq.mjs} +1723 -1286
- package/dist/{worktree-CgvJYJ-Q.mjs → worktree-CHecZ4Oq.mjs} +1097 -547
- package/dist/worktree-ZqZVjD9K.mjs +2 -0
- package/dist/xcode-BXn9-xYx.mjs +896 -0
- package/package.json +7 -5
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/shim/android-optimizations.gradle +7 -5
- package/dist/activity-BSV745Kz.mjs +0 -629
- package/dist/api-qvOzWyfO.mjs +0 -154
- package/dist/api-run.mjs +0 -294
- package/dist/app-install-BIKtMfPq.mjs +0 -896
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
- package/dist/budget-f7516Zk0.mjs +0 -4106
- package/dist/build-facts-DcLv2HSd.d.mts +0 -111
- package/dist/cancellation-C_22VQTH.mjs +0 -24
- package/dist/client-qQAaXSUs.mjs +0 -1771
- package/dist/config-BYDxlMY3.mjs +0 -562
- package/dist/device-DuiPJQSn.mjs +0 -290
- package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
- package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
- package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
- package/dist/exec-DqKo9GKJ.mjs +0 -268
- package/dist/git-DDfFzkMm.mjs +0 -45
- package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
- package/dist/logs-BGrEUaEs.mjs +0 -383
- package/dist/macos-Ch5VJmcS.mjs +0 -584
- package/dist/metro-gateway-CX9Xlkq2.mjs +0 -103
- package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
- package/dist/native-android-D5qc3-_v.mjs +0 -226
- package/dist/native-gradle-inputs-BsLRrl7u.mjs +0 -349
- package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
- package/dist/plan-C4TjdPsR.mjs +0 -260
- package/dist/prebuild-DYbucPXy.mjs +0 -212
- package/dist/preview-78a9kR_-.mjs +0 -1011
- package/dist/react-native-build-CtCccJtb.mjs +0 -239
- package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
- package/dist/remote-cache-OyOyVIS3.mjs +0 -526
- package/dist/result-CaJg5Iat.mjs +0 -186
- package/dist/server-expo-Bigriskl.mjs +0 -2
- package/dist/settings-BORNaaCO.mjs +0 -402
- package/dist/settings-vk3mJGSm.d.mts +0 -13
- package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
- package/dist/stage-KNTQopqv.mjs +0 -157
- package/dist/start-BWqzODpb.mjs +0 -1116
- package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
- package/dist/swiftpm-macos-DRNVJWlb.mjs +0 -119
- package/dist/tailnet-Dh-qiYzG.mjs +0 -265
- package/dist/toolchain-BFkAcstd.mjs +0 -2
- package/dist/toolchain-DxSsNssu.mjs +0 -1657
- package/dist/trigger-9_USgmxz.mjs +0 -2
- package/dist/web-Dq-i3wzJ.mjs +0 -2
- package/dist/worktree-DpLdCHga.mjs +0 -2
- package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
- package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
|
@@ -1,50 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { n as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { a as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { a as
|
|
30
|
-
import {
|
|
31
|
-
import { n as
|
|
32
|
-
import { r as
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-BECOiufl.mjs";
|
|
37
|
-
import { t as selectFromPool } from "./device-pool-Bf-pOhSw.mjs";
|
|
38
|
-
import { r as finishAndroidRun } from "./launch-F4sOqAhB.mjs";
|
|
1
|
+
import { t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { m as workspaceLogsDir$1, t as emulatorLogFile } from "./paths-DQtTgsBf.mjs";
|
|
3
|
+
import { B as deviceSlotFileKey, E as upsertProject, H as deviceSlotPlatforms, W as parseDeviceSlotOption, p as getProject, q as validateDeviceSlot, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
5
|
+
import { d as writeWorkspaceState, i as recordWorkspaceUse, r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
|
|
6
|
+
import { G as resolveCacheProviderConfig, H as remoteEasFallbackSetting, J as resolveProjectSettingsAsync, L as projectSettingsContextAsync, N as metroWarmupUrlSetting, R as publicUrlSetting, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, ct as detectProviders, g as deviceReclaimIdleMinutesSetting, j as metroPortSetting, rt as tunnelModeSetting } from "./settings-C7O8A6ZI.mjs";
|
|
7
|
+
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunch } from "./project-wM_XFTvE.mjs";
|
|
8
|
+
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
9
|
+
import { c as pidExists, d as resolveProjectMetro } from "./metro-DiXtA3Ty.mjs";
|
|
10
|
+
import { Bn as checkEasAuth, Bt as ensureMetroReachable, Cn as launchAndroidApp, Gt as resolveRemoteContext, H as tapBuildLog, In as runProcessOperation, J as recordRunStats, Jn as resolveRemote, K as recordCapacityRefusal, Lt as binOnPath, M as NO_BUILD_PROGRESS, Pn as exitAfterFlush, U as createRunRecorder, Ut as remoteAndroidDeps, V as startBuildProgress, Vt as ensureRemoteBootOwned, W as readRunEstimates, Y as statsProjectKey$1, Yn as uploadRemote, cn as DEFAULT_METRO_PORT, in as verifyLaunch, qn as resolveEasCliBin, rn as verifyAndroidReleaseLaunch, rr as ownedSessionName, sn as ADB_INSTALL_TIMEOUT_MS, t as budgetGate, wn as launchAndroidReleaseApp, yn as installAndroidApp } from "./budget-Cvwn54qV.mjs";
|
|
11
|
+
import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-NwUuxbkg.mjs";
|
|
12
|
+
import { I as acquireBuildSlot, R as releaseBuildSlot } from "./workspaces-CpANmBlq.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-CMLmzp7o.mjs";
|
|
14
|
+
import { A as listAdbDevices, I as listInstalledSystemImages, Y as physicalDeviceModel, Z as probeEmulatorSerial, a as androidDeviceAbi, ct as configuredAndroidEmulatorApp, et as resolveOwnedAvdSerialAsync, ot as waitForBoot, tt as resolvePhysicalDevice } from "./android-C7sVmyI9.mjs";
|
|
15
|
+
import { t as CCACHE_NOT_RUN } from "./ccache-Btwc36-I.mjs";
|
|
16
|
+
import { h as setRemoteLogSink } from "./client-OyRoEuSr.mjs";
|
|
17
|
+
import { i as parseBuildMachineOption, s as resolveBuildPlacement } from "./selection-DSMbWEX2.mjs";
|
|
18
|
+
import { r as hostedMetroSettings } from "./metro-gateway-CKZqKqx7.mjs";
|
|
19
|
+
import { a as writeHostedAndroid, i as writeDevicePlacement, t as readHostedAndroid } from "./ios-state-Dtw5K2aI.mjs";
|
|
20
|
+
import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-B-9f-jkd.mjs";
|
|
21
|
+
import { n as verifyCollectorOwnership } from "./ownership-C5fo5Edb.mjs";
|
|
22
|
+
import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-CbfmNgM6.mjs";
|
|
23
|
+
import { c as startDevServer } from "./start-EojN4WFz.mjs";
|
|
24
|
+
import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-xJPQ_QQG.mjs";
|
|
25
|
+
import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-DK5_EwRS.mjs";
|
|
26
|
+
import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-CwknaQYj.mjs";
|
|
27
|
+
import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-B7KIafpM.mjs";
|
|
28
|
+
import { n as devicePlacementRecord } from "./placement-log-BnGgJRRZ.mjs";
|
|
29
|
+
import { S as pooledAndroidDevice, a as PLATFORM, b as noDeviceDiagnostic, g as dumpApkManifest, h as displayPath, o as androidBuildOptions, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme } from "./support-yUiOjnVY.mjs";
|
|
30
|
+
import { t as acquireAndroidArtifact } from "./artifact-DJPy518Y.mjs";
|
|
31
|
+
import { a as reportAndroidResult, c as resolveAndroidRunPlan, i as persistLastBuild, n as finishAndroidUpload, o as androidDeviceSelectorRefusal } from "./result-D2Ykz_iD.mjs";
|
|
32
|
+
import { n as automaticDevicePlacement, r as devicePlacementLine, t as checkEasFallback } from "./eas-fallback-CSgAulr5.mjs";
|
|
33
|
+
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-B-L3Fbxy.mjs";
|
|
34
|
+
import { t as selectFromPool } from "./device-pool-BMkdsefq.mjs";
|
|
35
|
+
import { r as finishAndroidRun } from "./launch-CCzXlc8r.mjs";
|
|
39
36
|
import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
|
|
37
|
+
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-DUC8Ka9y.mjs";
|
|
40
38
|
import { basename, join } from "node:path";
|
|
41
|
-
import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
|
|
42
|
-
import { loadCacheProvider } from "@stim-cli/cache";
|
|
43
39
|
import { workspaceId } from "@stim-cli/core";
|
|
44
|
-
import {
|
|
40
|
+
import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
|
|
45
41
|
import chalk from "chalk";
|
|
42
|
+
import { InvalidArgumentError } from "commander";
|
|
43
|
+
import { loadCacheProvider } from "@stim-cli/cache";
|
|
46
44
|
//#region src/commands/android/remote.ts
|
|
47
|
-
async function connectAndroidHosting({ root, slot, machine, release, appMode = release ? "release" : "development", metroCheck, selectors, read = readHostedAndroid, resolveSerial =
|
|
45
|
+
async function connectAndroidHosting({ root, slot, machine, release, appMode = release ? "release" : "development", metroCheck, selectors, read = readHostedAndroid, resolveSerial = resolveOwnedAvdSerialAsync, prepare = prepareHostedAndroid }) {
|
|
48
46
|
let recorded;
|
|
49
47
|
try {
|
|
50
48
|
recorded = read(root, slot)[slot];
|
|
@@ -69,12 +67,12 @@ async function connectAndroidHosting({ root, slot, machine, release, appMode = r
|
|
|
69
67
|
if (local?.owned && local.avdName) {
|
|
70
68
|
let running = true;
|
|
71
69
|
try {
|
|
72
|
-
const resolved = resolveSerial(local.avdName, { timeoutMs: 5e3 });
|
|
70
|
+
const resolved = await resolveSerial(local.avdName, { timeoutMs: 5e3 });
|
|
73
71
|
running = Boolean(resolved.serial) || !resolved.notRunning && !resolved.missing;
|
|
74
72
|
} catch {}
|
|
75
73
|
if (running) return { failure: {
|
|
76
74
|
code: "STIM_BAD_ARG",
|
|
77
|
-
message: `This workspace's Android emulator for slot ${slot} runs on this
|
|
75
|
+
message: `This workspace's Android emulator for slot ${slot} runs on this machine; run stim stop first.`
|
|
78
76
|
} };
|
|
79
77
|
}
|
|
80
78
|
try {
|
|
@@ -113,7 +111,7 @@ async function selectAndroidPlacement({ target: selected, automatic = automaticD
|
|
|
113
111
|
})
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
|
-
const refusal = localSelectors(selected);
|
|
114
|
+
const refusal = await localSelectors(selected);
|
|
117
115
|
if (refusal) return { failure: refusal };
|
|
118
116
|
try {
|
|
119
117
|
const placed = await automatic({
|
|
@@ -184,7 +182,7 @@ async function selectAndroidPlacement({ target: selected, automatic = automaticD
|
|
|
184
182
|
//#endregion
|
|
185
183
|
//#region src/commands/android/hosted.ts
|
|
186
184
|
async function finishHostedAndroidRun({ target, artifact, root, slot = "default", release, appMode = release ? "release" : "development", isExpo, metroPort, logsDir, selectors, place, writePlacement, verifyLaunch: verify, writeLaunch, readApkPackage, resolveDevClientScheme, now, started, startedAt, fail, phase, enterPhase, out, recordBuild, ...report }) {
|
|
187
|
-
const packageName = artifact.androidPackage ?? readApkPackage(artifact.apkPath);
|
|
185
|
+
const packageName = artifact.androidPackage ?? await readApkPackage(artifact.apkPath);
|
|
188
186
|
if (!artifact.apkPath || !packageName) return fail("STIM_INSTALL_FAILED", "The built APK has no package identity.");
|
|
189
187
|
const launchedAt = now();
|
|
190
188
|
try {
|
|
@@ -198,7 +196,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
198
196
|
...appMode === "process" ? { mode: appMode } : {},
|
|
199
197
|
metroPort,
|
|
200
198
|
selectors,
|
|
201
|
-
...appMode === "development" && isExpo ? { devClientScheme: resolveDevClientScheme(root, artifact.apkPath) ?? void 0 } : {},
|
|
199
|
+
...appMode === "development" && isExpo ? { devClientScheme: await resolveDevClientScheme(root, artifact.apkPath) ?? void 0 } : {},
|
|
202
200
|
reserved: (placement) => writePlacement(root, slot, placement),
|
|
203
201
|
note: out,
|
|
204
202
|
enterPhase
|
|
@@ -222,7 +220,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
222
220
|
metroPort,
|
|
223
221
|
mode: workspaceDevServerMode(root, isExpo),
|
|
224
222
|
slot: launchSlotScope(root, slot),
|
|
225
|
-
platformShared: siblingPlatformSlots(root, "android", slot).length > 0
|
|
223
|
+
platformShared: (await siblingPlatformSlots(root, "android", slot)).length > 0
|
|
226
224
|
});
|
|
227
225
|
if (evidence.fatal) return fail("STIM_LAUNCH_FAILED", "Metro could not deliver the hosted app bundle.", "Run stim logs --errors and fix the bundle error.");
|
|
228
226
|
launched = evidence.verified ? true : evidence.requested ? "bundling" : "unverified";
|
|
@@ -246,6 +244,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
246
244
|
ok: true,
|
|
247
245
|
facts: reportAndroidResult({
|
|
248
246
|
...report,
|
|
247
|
+
out,
|
|
249
248
|
...appMode === "process" ? { runtimeKind: "process" } : {},
|
|
250
249
|
root,
|
|
251
250
|
slot,
|
|
@@ -267,7 +266,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
267
266
|
})
|
|
268
267
|
};
|
|
269
268
|
} catch (error) {
|
|
270
|
-
return fail(error.code ?? "STIM_HOSTING_REFUSED", error.message, `Retry stim android --remote ${target.host.machine}, or run stim stop to reconcile the recorded placement
|
|
269
|
+
return fail(error.code ?? "STIM_HOSTING_REFUSED", error.message, `Retry stim android --remote ${target.host.machine}, or run stim stop to reconcile the recorded placement.`, { lastBuildStatus: true });
|
|
271
270
|
}
|
|
272
271
|
}
|
|
273
272
|
//#endregion
|
|
@@ -279,28 +278,36 @@ function runOnlyFlag(opts) {
|
|
|
279
278
|
if (opts.metroCheck === false) return "--no-metro-check";
|
|
280
279
|
return null;
|
|
281
280
|
}
|
|
282
|
-
async function
|
|
281
|
+
async function readAndroidBuildPlan(operation, opts, overrides = {}) {
|
|
283
282
|
const deps = {
|
|
284
|
-
findRoot: findProjectRoot,
|
|
283
|
+
findRoot: findProjectRoot$1,
|
|
285
284
|
projectRegistry,
|
|
286
285
|
...overrides
|
|
287
286
|
};
|
|
288
|
-
const json = Boolean(opts.json);
|
|
289
287
|
const flag = runOnlyFlag(opts);
|
|
290
|
-
if (flag) return
|
|
291
|
-
const root = deps.findRoot(
|
|
292
|
-
if (!root) return
|
|
288
|
+
if (flag) return { refusal: planFlagRefusal(flag) };
|
|
289
|
+
const root = deps.findRoot(operation.projectRoot);
|
|
290
|
+
if (!root) return { refusal: NO_PROJECT_REFUSAL };
|
|
293
291
|
const selected = deps.projectRegistry.selectAndroid(root);
|
|
294
|
-
if ("problem" in selected) return
|
|
292
|
+
if ("problem" in selected) return { refusal: {
|
|
295
293
|
code: "STIM_NO_PROJECT",
|
|
296
294
|
...selected.problem
|
|
297
|
-
}
|
|
298
|
-
const resolved =
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
295
|
+
} };
|
|
296
|
+
const resolved = await resolveProjectSettingsAsync(root, {
|
|
297
|
+
env: operation.env,
|
|
298
|
+
signal: operation.signal
|
|
299
|
+
});
|
|
300
|
+
const planner = (await selected.load(resolved)).plan;
|
|
301
|
+
if (!planner) return { refusal: unsupportedPlan("android") };
|
|
302
|
+
operation.signal.throwIfAborted();
|
|
303
|
+
return planner(opts, resolved, operation);
|
|
304
|
+
}
|
|
305
|
+
async function planAndroid(opts, overrides = {}) {
|
|
306
|
+
const json = Boolean(opts.json);
|
|
307
|
+
const { value: result, interrupted } = await runProcessOperation(process.cwd(), (operation) => readAndroidBuildPlan(operation, opts, overrides));
|
|
302
308
|
if ("platform" in result) printPlan(result, json);
|
|
303
309
|
else refusePlan(result.refusal, json, result.lines);
|
|
310
|
+
if (interrupted) process.exitCode = interrupted;
|
|
304
311
|
}
|
|
305
312
|
//#endregion
|
|
306
313
|
//#region src/commands/android.ts
|
|
@@ -308,38 +315,41 @@ function androidCommand(program) {
|
|
|
308
315
|
registerAndroid(program);
|
|
309
316
|
}
|
|
310
317
|
function registerAndroid(program) {
|
|
311
|
-
program.command("android").description("Build (or install from the shared cache), install and launch this workspace's Android app on its owned emulator. React Native and Expo Debug runs start the dev server when it is not running.").option("--eas-profile <name>", "Download a matching EAS development build; on a miss, print the build command without running it").option("--slot <name>", "Reusable device slot within this workspace (default: default)", parseDeviceSlotOption).option("--remote-build <value>", "Build on auto, local, or one named machine; a name refuses without fallback", parseBuildMachineOption).option("--json", "Emit the facts as a single JSON line on stdout; every other line goes to stderr").option("--plan", "Predict the next build without building, booting or installing: resolve the fingerprint, check the local then remote cache, and print the expected cache result and duration. Writes no Stim state.").option("--no-metro-check", "Skip the reserved-port Metro health check and do not start it (the app will load no bundle unless something else serves it)").option("--no-build-cache", "Build fresh, ignoring cached artifacts (local and the project's build-cache provider); the fresh build still replaces the cache entry").option("--variant <name>", "Gradle variant to assemble and install (e.g. productionDebug on a flavored project); overrides the android.variant setting. A variant ending in Release embeds the JS bundle and skips Metro entirely. Default: debug").option("--system-image <id>", "Android system image to create this workspace's owned AVD from, as the sdkmanager package id (e.g. \"system-images;android-36;google_apis;arm64-v8a\"). Overrides the android.systemImage setting for this invocation. An unknown id refuses with STIM_BAD_ARG and prints the installed images.").option("--device-profile <id>", "Hardware profile to create this workspace's owned AVD with, as an `avdmanager list device -c` id (e.g. \"pixel_fold\", \"pixel_tablet\"). Overrides the android.deviceProfile setting for this invocation. An unknown id refuses with STIM_BAD_ARG and prints the available ids.").option("--device [serial]", "Install and launch on a connected physical device instead of this workspace's owned emulator. With no serial, the first connected device this workspace can lease is used. Stim never creates, boots, or deletes a physical device.").option("--remote <target>", "Run on eas, proxy, or a named approved Mac from remote.machines; auto places on an approved Mac when this
|
|
318
|
+
program.command("android").description("Build (or install from the shared cache), install and launch this workspace's Android app on its owned emulator. React Native and Expo Debug runs start the dev server when it is not running.").option("--eas-profile <name>", "Download a matching EAS development build; on a miss, print the build command without running it").option("--slot <name>", "Reusable device slot within this workspace (default: default)", parseDeviceSlotOption).option("--remote-build <value>", "Build on auto, local, or one named machine; a name refuses without fallback", parseBuildMachineOption).option("--json", "Emit the facts as a single JSON line on stdout; every other line goes to stderr").option("--plan", "Predict the next build without building, booting or installing: resolve the fingerprint, check the local then remote cache, and print the expected cache result and duration. Writes no Stim state.").option("--no-metro-check", "Skip the reserved-port Metro health check and do not start it (the app will load no bundle unless something else serves it)").option("--no-build-cache", "Build fresh, ignoring cached artifacts (local and the project's build-cache provider); the fresh build still replaces the cache entry").option("--variant <name>", "Gradle variant to assemble and install (e.g. productionDebug on a flavored project); overrides the android.variant setting. A variant ending in Release embeds the JS bundle and skips Metro entirely. Default: debug").option("--system-image <id>", "Android system image to create this workspace's owned AVD from, as the sdkmanager package id (e.g. \"system-images;android-36;google_apis;arm64-v8a\"). Overrides the android.systemImage setting for this invocation. An unknown id refuses with STIM_BAD_ARG and prints the installed images.").option("--device-profile <id>", "Hardware profile to create this workspace's owned AVD with, as an `avdmanager list device -c` id (e.g. \"pixel_fold\", \"pixel_tablet\"). Overrides the android.deviceProfile setting for this invocation. An unknown id refuses with STIM_BAD_ARG and prints the available ids.").option("--device [serial]", "Install and launch on a connected physical device instead of this workspace's owned emulator. With no serial, the first connected device this workspace can lease is used. Stim never creates, boots, or deletes a physical device.").option("--remote <target>", "Run on eas, proxy, or a named approved Mac from remote.machines; auto places on an approved Mac when this machine is full or busy; local runs here, whatever android.remote says", (value) => {
|
|
312
319
|
if (!parseMachine(value)) throw new InvalidArgumentError("expected eas, proxy, auto, local, or a tailnet machine name");
|
|
313
320
|
return value;
|
|
314
321
|
}).option("--wait <seconds>", "How long to wait for another workspace to release the device it leases, before refusing with STIM_DEVICE_BUSY (default 60, 0 refuses at once). Without --device, wait for an owned-device slot (default 600 seconds; --no-wait refuses immediately).").option("--no-wait", "Install on a device another workspace leases instead of waiting: this run takes no lease and, when both workspaces build the same app id, the install terminates the holder's running app. Without --device, refuse a full device cap or existing slot queue immediately.").action(async (opts) => {
|
|
315
322
|
if (opts.plan) return planAndroid(opts);
|
|
316
|
-
const root = findProjectRoot(process.cwd());
|
|
323
|
+
const root = findProjectRoot$1(process.cwd());
|
|
317
324
|
if (!root) {
|
|
318
325
|
refuseNoProject({ json: Boolean(opts.json) });
|
|
319
326
|
return;
|
|
320
327
|
}
|
|
321
|
-
|
|
328
|
+
const { value: result, interrupted } = await runProcessOperation(root, (context) => runAndroidOperation(context, root, {
|
|
322
329
|
...opts,
|
|
323
330
|
waitConflict: waitFlagConflict(process.argv)
|
|
324
|
-
}))
|
|
331
|
+
}));
|
|
332
|
+
if (!result.ok) process.exit(interrupted ?? 1);
|
|
333
|
+
else if (result.uploadsAbandoned) exitAfterFlush(0);
|
|
325
334
|
});
|
|
326
335
|
}
|
|
327
|
-
function runAndroidOperation(root, opts = {}) {
|
|
328
|
-
return withNativeBuildRun(root, {
|
|
336
|
+
function runAndroidOperation(context, root, opts = {}) {
|
|
337
|
+
return withNativeBuildRun(context, root, {
|
|
329
338
|
command: "android",
|
|
330
339
|
platform: PLATFORM,
|
|
331
340
|
slot: opts.slot ?? "default"
|
|
332
341
|
}, async (claim) => {
|
|
333
|
-
recordWorkspaceUse(root);
|
|
342
|
+
recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
|
|
334
343
|
const progress = startBuildProgress({
|
|
335
344
|
root,
|
|
336
345
|
platform: PLATFORM,
|
|
337
346
|
slot: opts.slot ?? "default",
|
|
338
347
|
claim,
|
|
339
|
-
note: (line) =>
|
|
348
|
+
note: (line) => context.output("stderr", `${chalk.dim(line)}\n`)
|
|
340
349
|
});
|
|
341
350
|
try {
|
|
342
351
|
return await runAndroid({
|
|
352
|
+
context,
|
|
343
353
|
root,
|
|
344
354
|
buildMachine: opts.remoteBuild,
|
|
345
355
|
slot: opts.slot,
|
|
@@ -359,9 +369,12 @@ function runAndroidOperation(root, opts = {}) {
|
|
|
359
369
|
} finally {
|
|
360
370
|
progress.clear();
|
|
361
371
|
}
|
|
362
|
-
}, { write: (line) =>
|
|
372
|
+
}, { write: (line) => context.output("stderr", `${chalk.dim(phaseLine("lock", line))}\n`) });
|
|
363
373
|
}
|
|
364
|
-
function resolveRunAndroidOptions({ root, json = false, remoteDevice: commandRemoteBackend = null, resolveSettingsFor = resolveSettings, resolveRemoteDeviceContext = resolveRemoteContext, remoteDeviceDeps: makeRemoteDeviceDeps = remoteAndroidDeps, resolveEasBin = resolveEasCliBin, ensureMetroReachable: ensureRemoteMetro = ensureMetroReachable, ensureRemoteBootOwned: ensureRemoteOwned = ensureRemoteBootOwned, detectRemoteProviders = detectProviders, metroCheck = true, useBuildCache = true, easProfile, resolveEasDevelopmentBuild: resolveEasBuild = resolveEasDevelopmentBuild, variant: variantFlag = null, systemImage: systemImageFlag = null, deviceProfile: deviceProfileFlag, device: deviceFlag = null, wait: waitFlag = void 0, waitConflict = false, acquireLease = acquireRunLease, makeRunLease = runLease, selectPool = selectFromPool, onLeaseSignal =
|
|
374
|
+
function resolveRunAndroidOptions({ context, root, json = false, remoteDevice: commandRemoteBackend = null, resolveSettingsFor = resolveSettings, resolveRemoteDeviceContext = resolveRemoteContext, remoteDeviceDeps: makeRemoteDeviceDeps = remoteAndroidDeps, resolveEasBin = resolveEasCliBin, ensureMetroReachable: ensureRemoteMetro = ensureMetroReachable, ensureRemoteBootOwned: ensureRemoteOwned = ensureRemoteBootOwned, detectRemoteProviders = detectProviders, metroCheck = true, useBuildCache = true, easProfile, resolveEasDevelopmentBuild: resolveEasBuild = resolveEasDevelopmentBuild, variant: variantFlag = null, systemImage: systemImageFlag = null, deviceProfile: deviceProfileFlag, device: deviceFlag = null, wait: waitFlag = void 0, waitConflict = false, acquireLease = acquireRunLease, makeRunLease = runLease, selectPool = selectFromPool, onLeaseSignal = releaseLeaseOnAbort, listDevices = listAdbDevices, deviceModel = physicalDeviceModel, deviceAbi = androidDeviceAbi, isEmulatorDevice = probeEmulatorSerial, readApkPackage = async (apkPath) => apkPackage(await dumpApkManifest(apkPath, { context })), getLimits = getConcurrencyLimits, checkCapacity = checkDeviceCapacity, acquireSlot = acquireBuildSlot, releaseSlot = releaseBuildSlot, ensureDevice = ensureOwnedDevice, listSystemImages = listInstalledSystemImages, listDeviceProfiles, ensureDeviceBooted = ensureBooted, resolveAvdSerial = resolveOwnedAvdSerialAsync, waitForDeviceBoot = waitForBoot, dataFreeBytes, trimCaches, wipeDevice, resolveMetro = resolveProjectMetro, warmMetro: prewarmMetro = warmMetro, startServer = startDevServer, readState = readWorkspaceState$1, pidAlive = pidExists, verifyCollector = verifyCollectorOwnership, verifyLaunched = verifyLaunch, ensureStorage = ensureWorkspaceStorageSafely, acquireLock = acquireBuildLock, releaseLock = releaseBuildLock, waitForBuild: waitForBuild$1 = waitForBuild, easAuth = checkEasAuth, resolveRemoteBuild = resolveRemote, uploadRemoteBuild = uploadRemote, resolveCacheProvider = resolveCacheProviderConfig, loadCacheProviderModule = loadCacheProvider, install = installAndroidApp, launch = launchAndroidApp, launchRelease = launchAndroidReleaseApp, verifyReleaseLaunched = verifyAndroidReleaseLaunch, resolveDevClientScheme = (projectRoot, apkPath, options) => androidDevClientScheme(projectRoot, apkPath, {
|
|
375
|
+
...options,
|
|
376
|
+
context
|
|
377
|
+
}), spawn = (cmd, args, opts) => getExecutor().spawn(cmd, args, opts), kill = (pid, signal) => process.kill(pid, signal), createWriter = createNdjsonWriter, writeLaunch = writeWorkspaceLaunch, writeState = writeWorkspaceState, recordBuild, recordStats = recordRunStats, recordCapacityRefusal: recordRefusal, readEstimates = readRunEstimates, now = Date.now, out = (line) => context ? context.output("stderr", `${line}\n`) : console.error(line), emit = (line) => context ? context.output("stdout", `${line}\n`) : console.log(line) } = {}) {
|
|
365
378
|
return {
|
|
366
379
|
root,
|
|
367
380
|
json,
|
|
@@ -498,6 +511,7 @@ function avdSetupFailure(error, root, logFile) {
|
|
|
498
511
|
};
|
|
499
512
|
}
|
|
500
513
|
async function runAndroid(options = {}) {
|
|
514
|
+
const { context } = options;
|
|
501
515
|
let { root, json, commandRemoteBackend, resolveSettingsFor, resolveRemoteDeviceContext, makeRemoteDeviceDeps, resolveEasBin, ensureRemoteMetro, ensureRemoteOwned, detectRemoteProviders, metroCheck, useBuildCache: requestedBuildCache, easProfile, resolveEasBuild, variantFlag, systemImageFlag, deviceProfileFlag, deviceFlag, waitFlag, waitConflict, acquireLease, makeRunLease, selectPool, onLeaseSignal, listDevices, deviceModel, deviceAbi, isEmulatorDevice, readApkPackage, getLimits, checkCapacity, acquireSlot, releaseSlot, ensureDevice, listSystemImages, listDeviceProfiles, ensureDeviceBooted, resolveAvdSerial, waitForDeviceBoot, dataFreeBytes, trimCaches, wipeDevice, resolveMetro, prewarmMetro, startServer, readState, pidAlive, verifyCollector, verifyLaunched, ensureStorage, acquireLock, releaseLock, waitForBuild, easAuth, resolveRemoteBuild, uploadRemoteBuild, resolveCacheProvider, loadCacheProviderModule, install, launch, launchRelease, verifyReleaseLaunched, resolveDevClientScheme, spawn, kill, createWriter, writeLaunch, writeState, recordBuild, recordStats, recordCapacityRefusal: recordRefusal = recordCapacityRefusal, readEstimates, now, out, emit } = androidSlotOptions(options);
|
|
502
516
|
const progress = options.progress ?? NO_BUILD_PROGRESS;
|
|
503
517
|
const slot = validateDeviceSlot(options.slot);
|
|
@@ -553,7 +567,7 @@ async function runAndroid(options = {}) {
|
|
|
553
567
|
slot
|
|
554
568
|
}
|
|
555
569
|
}), progress);
|
|
556
|
-
setRemoteLogSink((entry) => writer.write(entry));
|
|
570
|
+
setRemoteLogSink(context, (entry) => writer.write(entry));
|
|
557
571
|
const record = {
|
|
558
572
|
fingerprint: null,
|
|
559
573
|
cacheKey: null,
|
|
@@ -575,8 +589,8 @@ async function runAndroid(options = {}) {
|
|
|
575
589
|
const recordRun = stats.record;
|
|
576
590
|
let ccacheActivity = CCACHE_NOT_RUN;
|
|
577
591
|
let reclaimed = [];
|
|
578
|
-
const fail = (code, message, remedy, { lastBuildStatus = false, setup = false, diagnostics = [], buildDiagnostics: rawDiagnostics = [], lines = [], logPath = null, lease } = {}) => {
|
|
579
|
-
const cancellation = cancelledFailure(PLATFORM, {
|
|
592
|
+
const fail = (code, message, remedy, { lastBuildStatus = false, setup = false, diagnostics = [], buildDiagnostics: rawDiagnostics = [], retainedClaimRoots, lines = [], logPath = null, lease } = {}) => {
|
|
593
|
+
const cancellation = cancelledFailure(context, PLATFORM, {
|
|
580
594
|
code,
|
|
581
595
|
message
|
|
582
596
|
});
|
|
@@ -616,12 +630,23 @@ async function runAndroid(options = {}) {
|
|
|
616
630
|
error: {
|
|
617
631
|
code,
|
|
618
632
|
message,
|
|
619
|
-
remedy: remedy ?? null
|
|
633
|
+
remedy: remedy ?? null,
|
|
634
|
+
...retainedClaimRoots ? { retainedClaimRoots } : {}
|
|
620
635
|
}
|
|
621
636
|
};
|
|
622
637
|
};
|
|
623
638
|
const settingsRoot = root;
|
|
624
|
-
const
|
|
639
|
+
const settingsSignal = runCancellationSignal(context) ?? context.signal;
|
|
640
|
+
let settingsContext;
|
|
641
|
+
try {
|
|
642
|
+
settingsContext = await projectSettingsContextAsync(root, void 0, {
|
|
643
|
+
env: context.env,
|
|
644
|
+
signal: settingsSignal
|
|
645
|
+
});
|
|
646
|
+
} catch (error) {
|
|
647
|
+
if (!settingsSignal.aborted) throw error;
|
|
648
|
+
return fail("STIM_CANCELLED", "before resolving project settings", null, { setup: true });
|
|
649
|
+
}
|
|
625
650
|
const projectKey = statsProjectKey$1({
|
|
626
651
|
root,
|
|
627
652
|
commonDir: settingsContext.gitCommonDir,
|
|
@@ -645,9 +670,11 @@ async function runAndroid(options = {}) {
|
|
|
645
670
|
const { code, message, remedy } = placement.failure;
|
|
646
671
|
return fail(code, message, remedy, { setup: true });
|
|
647
672
|
}
|
|
648
|
-
const planned = resolveAndroidRunPlan({
|
|
673
|
+
const planned = await resolveAndroidRunPlan({
|
|
649
674
|
settings,
|
|
650
675
|
settingsContext,
|
|
676
|
+
env: context.env,
|
|
677
|
+
signal: context.signal,
|
|
651
678
|
slot,
|
|
652
679
|
easProfile,
|
|
653
680
|
variant: variantFlag,
|
|
@@ -673,7 +700,7 @@ async function runAndroid(options = {}) {
|
|
|
673
700
|
if (easProfile !== void 0 && !integration.eas) return fail("STIM_BAD_ARG", "This project integration does not support EAS builds.", "Use its local Android build recipe.");
|
|
674
701
|
const deviceSlotWait = {
|
|
675
702
|
automatic: plan.target.kind === "hosted" && plan.target.machine === "auto",
|
|
676
|
-
signal: runCancellationSignal(),
|
|
703
|
+
signal: runCancellationSignal(context),
|
|
677
704
|
waitMs: plan.deviceSlotWaitMs,
|
|
678
705
|
displayName: basename(root),
|
|
679
706
|
reclaimIdleMinutes: deviceReclaimIdleMinutesSetting(settings),
|
|
@@ -704,6 +731,8 @@ async function runAndroid(options = {}) {
|
|
|
704
731
|
...integration.eas && remoteEasFallbackSetting(settings) ? { eas: () => (options.checkEasFallback ?? checkEasFallback)({
|
|
705
732
|
root,
|
|
706
733
|
platform: PLATFORM,
|
|
734
|
+
env: context.env,
|
|
735
|
+
operation: context,
|
|
707
736
|
slot,
|
|
708
737
|
release,
|
|
709
738
|
isExpo,
|
|
@@ -713,6 +742,7 @@ async function runAndroid(options = {}) {
|
|
|
713
742
|
}) } : {},
|
|
714
743
|
localSelectors: (target) => androidDeviceSelectorRefusal({
|
|
715
744
|
settingsContext,
|
|
745
|
+
signal: context.signal,
|
|
716
746
|
slot,
|
|
717
747
|
systemImageFlag,
|
|
718
748
|
deviceProfileFlag,
|
|
@@ -724,7 +754,10 @@ async function runAndroid(options = {}) {
|
|
|
724
754
|
listSystemImages,
|
|
725
755
|
listDeviceProfiles
|
|
726
756
|
}),
|
|
727
|
-
checkBudget: options.checkBudget
|
|
757
|
+
checkBudget: (args) => (options.checkBudget ?? budgetGate)({
|
|
758
|
+
...args,
|
|
759
|
+
env: context.env
|
|
760
|
+
}),
|
|
728
761
|
note: out,
|
|
729
762
|
phase,
|
|
730
763
|
log: (entry) => writer.write(entry),
|
|
@@ -746,10 +779,13 @@ async function runAndroid(options = {}) {
|
|
|
746
779
|
root,
|
|
747
780
|
platform: PLATFORM,
|
|
748
781
|
backend: remoteBackend,
|
|
782
|
+
env: context.env,
|
|
783
|
+
operation: context,
|
|
749
784
|
easBin: resolveEasBin(root)?.file ?? null
|
|
750
785
|
}) : null;
|
|
751
786
|
if (remoteContext && "failed" in remoteContext) return fail(remoteContext.code ?? "STIM_NO_REMOTE_SESSION", remoteContext.failed, remoteContext.remedy);
|
|
752
787
|
const easBuild = await resolveEasBuild({
|
|
788
|
+
context,
|
|
753
789
|
root,
|
|
754
790
|
platform: PLATFORM,
|
|
755
791
|
profile: easProfile,
|
|
@@ -757,10 +793,22 @@ async function runAndroid(options = {}) {
|
|
|
757
793
|
isExpo,
|
|
758
794
|
physical,
|
|
759
795
|
selectors: [variantFlag],
|
|
760
|
-
buildCache: requestedBuildCache
|
|
796
|
+
buildCache: requestedBuildCache,
|
|
797
|
+
env: context.env,
|
|
798
|
+
signal: settingsSignal
|
|
799
|
+
}).catch((error) => {
|
|
800
|
+
const cancelled = cancelledFailure(context, PLATFORM, {
|
|
801
|
+
code: "STIM_CANCELLED",
|
|
802
|
+
message: "during EAS lookup"
|
|
803
|
+
});
|
|
804
|
+
if (cancelled) return {
|
|
805
|
+
ok: false,
|
|
806
|
+
...cancelled
|
|
807
|
+
};
|
|
808
|
+
throw error;
|
|
761
809
|
});
|
|
762
810
|
if (isEasBuildFailure(easBuild)) return fail(easBuild.code, easBuild.message, easBuild.remedy);
|
|
763
|
-
const appIds = integration.appIds();
|
|
811
|
+
const appIds = await integration.appIds();
|
|
764
812
|
let androidPackage = appIds.androidPackage;
|
|
765
813
|
record.bundleId = androidPackage;
|
|
766
814
|
const registerProject = () => upsertProject(root, {
|
|
@@ -778,6 +826,7 @@ async function runAndroid(options = {}) {
|
|
|
778
826
|
async function prepareMetro() {
|
|
779
827
|
if (metroCheck) {
|
|
780
828
|
const gate = await ensureDevServer({
|
|
829
|
+
env: context.env,
|
|
781
830
|
root,
|
|
782
831
|
port: reservedPort,
|
|
783
832
|
settings: hostedMetroSettings(settings, Boolean(hostedTarget)),
|
|
@@ -795,7 +844,8 @@ async function runAndroid(options = {}) {
|
|
|
795
844
|
code: gate.code,
|
|
796
845
|
message: gate.message,
|
|
797
846
|
remedy: gate.remedy,
|
|
798
|
-
lines: gate.lines
|
|
847
|
+
lines: gate.lines,
|
|
848
|
+
...gate.retainedClaimRoots ? { retainedClaimRoots: gate.retainedClaimRoots } : {}
|
|
799
849
|
}
|
|
800
850
|
};
|
|
801
851
|
metroPort = gate.port;
|
|
@@ -806,7 +856,7 @@ async function runAndroid(options = {}) {
|
|
|
806
856
|
prepared: { metroPort }
|
|
807
857
|
};
|
|
808
858
|
} else {
|
|
809
|
-
const pin = metroPortSetting(settings);
|
|
859
|
+
const pin = metroPortSetting(settings, context.env);
|
|
810
860
|
if (pin.error) return {
|
|
811
861
|
ok: false,
|
|
812
862
|
error: {
|
|
@@ -831,8 +881,11 @@ async function runAndroid(options = {}) {
|
|
|
831
881
|
const useBuildCache = buildPlan.cache.read;
|
|
832
882
|
const preparation = await runtime.prepare();
|
|
833
883
|
if (!preparation.ok) {
|
|
834
|
-
const { code, message, remedy, lines } = preparation.error;
|
|
835
|
-
return fail(code, message, remedy, {
|
|
884
|
+
const { code, message, remedy, lines, retainedClaimRoots } = preparation.error;
|
|
885
|
+
return fail(code, message, remedy, {
|
|
886
|
+
lines,
|
|
887
|
+
retainedClaimRoots
|
|
888
|
+
});
|
|
836
889
|
}
|
|
837
890
|
const runtimePreparation = preparation.prepared;
|
|
838
891
|
metroPort = runtimePreparation.metroPort;
|
|
@@ -841,6 +894,7 @@ async function runAndroid(options = {}) {
|
|
|
841
894
|
if (metroPort !== null) {
|
|
842
895
|
const reachable = await ensureRemoteMetro({
|
|
843
896
|
ctx: remoteDevice.ctx,
|
|
897
|
+
env: context.env,
|
|
844
898
|
metroPort,
|
|
845
899
|
isExpo,
|
|
846
900
|
tunnelMode: tunnelModeSetting(settings) ?? void 0,
|
|
@@ -852,8 +906,9 @@ async function runAndroid(options = {}) {
|
|
|
852
906
|
checkCapacity = remoteDevice.checkCapacity;
|
|
853
907
|
ensureDevice = remoteDevice.ensureDevice;
|
|
854
908
|
ensureDeviceBooted = remoteDevice.ensureDeviceBooted;
|
|
855
|
-
|
|
856
|
-
|
|
909
|
+
const remote = remoteDevice;
|
|
910
|
+
install = async (args) => remote.install(args);
|
|
911
|
+
launch = async (args) => remote.launch(args);
|
|
857
912
|
}
|
|
858
913
|
const emuLog = emulatorLogFile(root);
|
|
859
914
|
const limits = getLimits();
|
|
@@ -901,7 +956,7 @@ async function runAndroid(options = {}) {
|
|
|
901
956
|
});
|
|
902
957
|
} else {
|
|
903
958
|
if (!remoteDevice) try {
|
|
904
|
-
configuredAndroidEmulatorApp();
|
|
959
|
+
await configuredAndroidEmulatorApp();
|
|
905
960
|
} catch (err) {
|
|
906
961
|
return fail("STIM_BAD_ARG", err.message, "Run `stim settings set androidEmulatorApp emulator` or `stim settings set androidEmulatorApp stim-desktop`.");
|
|
907
962
|
}
|
|
@@ -962,6 +1017,7 @@ async function runAndroid(options = {}) {
|
|
|
962
1017
|
root,
|
|
963
1018
|
platform: PLATFORM,
|
|
964
1019
|
sessionName: ownedSessionName(remoteDevice.ctx.label),
|
|
1020
|
+
operation: context,
|
|
965
1021
|
startedAt: new Date(now()).toISOString(),
|
|
966
1022
|
boot,
|
|
967
1023
|
createdSessionId: remoteDevice.createdSessionId,
|
|
@@ -993,10 +1049,12 @@ async function runAndroid(options = {}) {
|
|
|
993
1049
|
bundleUrl: metroWarmupUrlSetting(settings, "android")
|
|
994
1050
|
});
|
|
995
1051
|
const acquiredArtifact = await acquireAndroidArtifact({
|
|
1052
|
+
context,
|
|
996
1053
|
root,
|
|
997
1054
|
buildLog,
|
|
998
1055
|
writer,
|
|
999
1056
|
recipe: integration.artifact({
|
|
1057
|
+
operation: context,
|
|
1000
1058
|
root,
|
|
1001
1059
|
buildLog,
|
|
1002
1060
|
writer,
|
|
@@ -1058,7 +1116,7 @@ async function runAndroid(options = {}) {
|
|
|
1058
1116
|
ccacheActivity = artifact.ccache;
|
|
1059
1117
|
androidPackage = artifact.androidPackage;
|
|
1060
1118
|
record.appPath = apkPath;
|
|
1061
|
-
if (runCancellation()) return fail("STIM_CANCELLED", "before install");
|
|
1119
|
+
if (runCancellation(context)) return fail("STIM_CANCELLED", "before install");
|
|
1062
1120
|
if (hostedTarget) return finishHostedAndroidRun({
|
|
1063
1121
|
target: hostedTarget,
|
|
1064
1122
|
artifact,
|
|
@@ -1151,12 +1209,13 @@ async function runAndroid(options = {}) {
|
|
|
1151
1209
|
expiresAt: acquired.status === "leased" ? acquired.expiresAt : null
|
|
1152
1210
|
});
|
|
1153
1211
|
if (acquired.status === "leased") {
|
|
1154
|
-
stopLeaseSignals = onLeaseSignal(releaseLease);
|
|
1212
|
+
stopLeaseSignals = onLeaseSignal(context, releaseLease);
|
|
1155
1213
|
phase("lease", `${acquired.kind} lease on ${device.serial} until ${leaseExpiryText(acquired.expiresAt, now())}`);
|
|
1156
1214
|
}
|
|
1157
1215
|
}
|
|
1158
1216
|
try {
|
|
1159
1217
|
return await finishAndroidRun({
|
|
1218
|
+
operation: context,
|
|
1160
1219
|
runtime,
|
|
1161
1220
|
runtimePreparation,
|
|
1162
1221
|
slot,
|
|
@@ -1200,7 +1259,7 @@ async function runAndroid(options = {}) {
|
|
|
1200
1259
|
phase,
|
|
1201
1260
|
fail,
|
|
1202
1261
|
readApkPackage,
|
|
1203
|
-
readProjectPackage: () => integration.appIds().androidPackage,
|
|
1262
|
+
readProjectPackage: async () => (await integration.appIds()).androidPackage,
|
|
1204
1263
|
packageRemedy: integration.packageRemedy,
|
|
1205
1264
|
install,
|
|
1206
1265
|
launch,
|
|
@@ -1244,14 +1303,19 @@ async function runAndroid(options = {}) {
|
|
|
1244
1303
|
try {
|
|
1245
1304
|
return await runFromFingerprint();
|
|
1246
1305
|
} catch (error) {
|
|
1306
|
+
const cancelled = cancelledFailure(context, PLATFORM, {
|
|
1307
|
+
code: "STIM_CANCELLED",
|
|
1308
|
+
message: "while finishing the run"
|
|
1309
|
+
});
|
|
1310
|
+
if (cancelled) return fail(cancelled.code, cancelled.message, cancelled.remedy, { lastBuildStatus: true });
|
|
1247
1311
|
recordRun({
|
|
1248
1312
|
failed: true,
|
|
1249
1313
|
durationMs: now() - started
|
|
1250
1314
|
});
|
|
1251
1315
|
throw error;
|
|
1252
1316
|
} finally {
|
|
1253
|
-
preparedArtifact?.release();
|
|
1317
|
+
await preparedArtifact?.release();
|
|
1254
1318
|
}
|
|
1255
1319
|
}
|
|
1256
1320
|
//#endregion
|
|
1257
|
-
export { runAndroidOperation as i, registerAndroid as n, runAndroid as r, androidCommand as t };
|
|
1321
|
+
export { readAndroidBuildPlan as a, runAndroidOperation as i, registerAndroid as n, runAndroid as r, androidCommand as t };
|