stim 1.20.2 → 1.21.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 +88 -8
- package/dist/acquire-artifact-CD4lbiWE.mjs +153 -0
- package/dist/act-DHAw2A2S.mjs +2667 -0
- package/dist/activity-BzVfHSrY.mjs +1376 -0
- package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-zh1vhbLp.mjs} +21 -65
- package/dist/{android-HqP1_vB_.mjs → android-BEJ8Jpl7.mjs} +2 -2
- package/dist/{android-DCKZrNvV.mjs → android-BLgbNqox.mjs} +128 -78
- package/dist/{android-Dlzxshgp.mjs → android-CV_GCELZ.mjs} +5 -5
- package/dist/{android-Mz_Inn3w.mjs → android-DUYkNF4u.mjs} +184 -102
- package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-Ct5b1xCK.mjs} +7 -6
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/android-project-BCAAmMwz.mjs +12 -0
- package/dist/api.d.mts +740 -8
- package/dist/api.mjs +585 -1
- package/dist/{artifact-HSwkIWEQ.mjs → artifact-B8T3S5gi.mjs} +223 -201
- package/dist/{artifact-D3czlUvT.mjs → artifact-DAuZ-FNU.mjs} +158 -148
- package/dist/{browser-web-CA-F1GQo.mjs → browser-web-QQzVjz3O.mjs} +26 -24
- package/dist/budget-Bs6SxxzO.mjs +9154 -0
- package/dist/{build-DYDbfkk5.mjs → build-CoPzQRNw.mjs} +144 -96
- package/dist/build-cache-DmyR9Zzc.mjs +602 -0
- package/dist/build-plan-CaFskB7_.mjs +188 -0
- package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DkkqguoK.mjs} +2 -2
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-zdKiYQ3E.mjs → ccache-BJRZ9pG3.mjs} +10 -9
- package/dist/{cdp-Dq_ypAlJ.mjs → cdp-CWmIUMbw.mjs} +18 -5
- package/dist/{chrome-BnzZMqsR.mjs → chrome-B6tfCta1.mjs} +7 -4
- package/dist/{cli-CLP3diBm.mjs → cli-0DYf8QhQ.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/client-B7QVOlCr.d.mts +253 -0
- package/dist/client-UXD70ZbM.mjs +1406 -0
- package/dist/collector-run.d.mts +4 -40
- package/dist/collector-run.mjs +9 -8
- package/dist/{command-output-BTy8hZ0F.mjs → command-output-B1UrjZHL.mjs} +1 -1
- package/dist/config-CYcBF478.mjs +949 -0
- package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-CqeBlrEn.mjs} +3 -3
- package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-BbKQW83h.mjs} +20 -5
- package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-DFRyG1_o.mjs} +1 -1
- package/dist/{dev-client-DAWVIGBu.mjs → dev-client-UOeESKm6.mjs} +2 -2
- package/dist/device-DCxH7_By.mjs +1068 -0
- package/dist/{device-BECOiufl.mjs → device-ExJq8Ei7.mjs} +35 -35
- package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-CMlqEcvw.mjs} +43 -13
- package/dist/device-host-worker.mjs +65 -61
- package/dist/{device-ios-COSi6oS1.mjs → device-ios-DRUeKaFV.mjs} +48 -45
- package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-C8raGFoP.mjs} +14 -26
- package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-DMRpVX9a.mjs} +5 -5
- package/dist/doctor-BLHCYxzi.mjs +2 -0
- package/dist/{doctor-kfMBnUw6.mjs → doctor-DTvaDOda.mjs} +281 -317
- package/dist/{doctor-CB8oZKCk.mjs → doctor-Dhqebm0q.mjs} +183 -91
- package/dist/doctor-fingerprint.mjs +19 -0
- package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-Cv1F10Kj.mjs} +40 -21
- package/dist/{eas-build-JyfqyHfC.mjs → eas-build-BomfRnFT.mjs} +53 -20
- package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-DJwZpy0c.mjs} +26 -208
- package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-op6A54yi.mjs} +229 -11
- package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-Bf0rZvG9.mjs} +172 -82
- package/dist/exec-H20xSg2T.d.mts +65 -0
- package/dist/exec-_UbtCQcG.mjs +750 -0
- package/dist/gc-C-WwL0yi.mjs +3 -0
- package/dist/{gc-qWOMdnER.mjs → gc-_-dCXdyL.mjs} +584 -796
- package/dist/git-C3iTsJaZ.mjs +73 -0
- package/dist/{guide-G9cAbVAc.mjs → guide-Yqwt2bd6.mjs} +941 -269
- package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-Bw-honsd.mjs} +8 -6
- package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DB_gBPfY.mjs} +34 -19
- package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CUvOf4Vr.mjs} +1 -1
- package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-DL_P5AdN.mjs} +77 -43
- package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-QI141yKk.mjs} +21 -17
- package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-Ksyjgzq-.mjs} +30 -21
- package/dist/idle-BVeRGroT.d.mts +24 -0
- package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DaKmZi0z.mjs} +11 -10
- package/dist/{ios-BwVCF7oA.mjs → ios-CQ68hG9s.mjs} +8 -8
- package/dist/{ios-RkW4pnQf.mjs → ios-CpByZy12.mjs} +140 -80
- package/dist/{ios-device-B5veSDDQ.mjs → ios-device-CXGP1bsD.mjs} +1 -1
- package/dist/{ios-device-D7pi2Sca.mjs → ios-device-CwFMehUS.mjs} +51 -26
- package/dist/{ios-project-K9hY_Jab.mjs → ios-project-WuwwBdvW.mjs} +13 -13
- package/dist/{ios-nOLJGVdy.mjs → ios-qNJt4dFm.mjs} +1 -1
- package/dist/ios-signing-DTTIChGs.mjs +489 -0
- package/dist/{ios-state-CBLe1xYw.mjs → ios-state-DvFX-K_l.mjs} +1 -1
- package/dist/{ios-Ce7bc7br.mjs → ios-ubFsBzwq.mjs} +129 -86
- package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Cc1dttps.mjs} +53 -26
- package/dist/{launch-F4sOqAhB.mjs → launch-CD1yVc7U.mjs} +91 -90
- package/dist/{launch-C3qJ6Agb.mjs → launch-Zq2mOSDy.mjs} +82 -541
- package/dist/logs-BS00Anxf.mjs +352 -0
- package/dist/logs-CMm05HxN.mjs +255 -0
- package/dist/{macos-D7uDvO-z.mjs → macos-B65--pPd.mjs} +1 -1
- package/dist/{macos-Ch5VJmcS.mjs → macos-C-0qJ6zq.mjs} +225 -212
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +122 -247
- package/dist/{metro-DnCEjCxs.mjs → metro-DEXpIhHC.mjs} +67 -12
- package/dist/{metro-gateway-CX9Xlkq2.mjs → metro-gateway-BMJNlj3E.mjs} +20 -12
- package/dist/{named-ports-4WopRPg-.mjs → named-ports-BWTzt6mu.mjs} +8 -63
- package/dist/native-android-JACyjTZs.mjs +844 -0
- package/dist/{native-gradle-inputs-BsLRrl7u.mjs → native-gradle-inputs-Bep9JcSF.mjs} +128 -140
- package/dist/native-inputs-TRTTTRxt.mjs +91 -0
- package/dist/native-run-DY_RLx3C.mjs +277 -0
- package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-Dg1Q7tfF.mjs} +9 -8
- package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-CB2iQeWq.mjs} +27 -18
- package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-CXX39F7o.mjs} +96 -47
- package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
- package/dist/offload-worker.d.mts +1 -46
- package/dist/offload-worker.mjs +197 -66
- package/dist/{ownership-DCtw_2IA.mjs → ownership-DEmM5vhh.mjs} +3 -3
- package/dist/{page-DRHy329N.mjs → page-CPaHeYqj.mjs} +7 -4
- package/dist/paths-BsJMoPP2.mjs +12 -0
- package/dist/paths-DQtTgsBf.mjs +42 -0
- package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BqGbTa61.mjs} +5 -5
- package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-Bwj-IjY1.mjs} +6 -6
- package/dist/{ports-DdSUicVo.mjs → ports-D-MmCTdv.mjs} +3 -3
- package/dist/prebuild-uD_ipCxF.mjs +449 -0
- package/dist/{project-_phNIJfs.mjs → project-BZNjmW_8.mjs} +65 -37
- package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-Lfetn8Kr.mjs} +2 -2
- package/dist/pull-request-zjCSAryH.d.mts +120 -0
- package/dist/pull-requests.d.mts +1 -119
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-DuzH0cn3.mjs} +74 -48
- package/dist/{gradle-DSrXb6lG.mjs → react-native-build-rhk4smwQ.mjs} +292 -15
- package/dist/react-native-doctor-CQpuIMso.mjs +234 -0
- package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-Bhq1rJeV.mjs} +46 -28
- package/dist/{recordings-D0d5aQt0.mjs → recordings-DYteQSu4.mjs} +12 -9
- package/dist/{reload-C8JhxjSh.mjs → reload-CmTRFJaX.mjs} +93 -47
- package/dist/reload-DzjSl5P_.mjs +2 -0
- package/dist/{remote-BiR6aYjy.mjs → remote-ByYkXdGD.mjs} +15 -10
- package/dist/result-DNiS-tTP.mjs +434 -0
- package/dist/{run-BtPgpKks.mjs → run-D23HmJMs.mjs} +4 -5
- package/dist/selection-CSl9i5qU.mjs +619 -0
- package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CxTrvDg8.mjs} +3 -4
- package/dist/{server-command-CTtCkmcQ.mjs → server-command-CtzloH3v.mjs} +14 -7
- package/dist/server-expo-C-90EhcG.mjs +2 -0
- package/dist/{server-expo-DsguMGUF.mjs → server-expo-DT_F_uVI.mjs} +50 -9
- package/dist/{settings-B717odTD.mjs → settings-CsJDEXgK.mjs} +234 -24
- package/dist/{settings-vk3mJGSm.d.mts → settings-DkdmlelE.d.mts} +6 -4
- package/dist/settings-T1gtc3bf.mjs +114 -0
- package/dist/settings-write-HyVZ8eQ8.mjs +359 -0
- package/dist/settings.schema.json +163 -16
- package/dist/{simslim-CCr3rE-A.mjs → simslim-Cgk17SXV.mjs} +14 -12
- package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-DF8VfT64.mjs} +15 -20
- package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
- package/dist/stage-BIS0ydsV.mjs +183 -0
- package/dist/{start-BWqzODpb.mjs → start-7lpH7hmN.mjs} +63 -44
- package/dist/{start-TXeMmmO2.mjs → start-RChynRDp.mjs} +1 -1
- package/dist/{state-D1Icyjlu.mjs → state-C4ZtUisW.mjs} +40 -13
- package/dist/{state-CG_OFoaA.mjs → state-XMziexv2.mjs} +3 -2
- package/dist/{stats-BoY5sEPU.mjs → stats-53T7OTb9.mjs} +7 -13
- package/dist/stats-report-BFfMpWWF.mjs +16 -0
- package/dist/{status-WgFbkRzj.mjs → status-BL7jVyAB.mjs} +535 -447
- package/dist/status-CSi6tlRq.mjs +2 -0
- package/dist/{status-BTA7kKiQ.mjs → status-DqEUSSxs.mjs} +6 -4
- package/dist/{status-watch-C23ILtf9.mjs → status-watch-GDCfqpTE.mjs} +187 -22
- package/dist/status-worker.d.mts +1 -0
- package/dist/status-worker.mjs +19 -0
- package/dist/stim-desktop-C12we7lz.mjs +112 -0
- package/dist/{stop-DR6VoDIk.mjs → stop-Bk_1qiV6.mjs} +2 -2
- package/dist/{stop-BNmBMi1F.mjs → stop-CPzlM1L-.mjs} +138 -98
- package/dist/{stop-DPEhunlw.mjs → stop-D7h6jAXQ.mjs} +11 -10
- package/dist/supervisor-run.d.mts +8 -17
- package/dist/supervisor-run.mjs +63 -27
- package/dist/{support-DMTqj3Hm.mjs → support-67vraa1Q.mjs} +18 -11
- package/dist/{support-CwjbFs9H.mjs → support-Dlu37g6H.mjs} +12 -12
- package/dist/{swiftpm-macos-DRNVJWlb.mjs → swiftpm-macos-p8WZbxKU.mjs} +35 -24
- package/dist/toolchain-DhKwp9iI.mjs +2 -0
- package/dist/toolchain-Hp9sCpK4.mjs +873 -0
- package/dist/{trigger-CigAYjeL.mjs → trigger-BAahxUPq.mjs} +20 -5
- package/dist/trigger-Bf3uDcpv.mjs +2 -0
- package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-BHX5r0Ei.mjs} +250 -156
- package/dist/{web-BDBMxDpx.mjs → web-CJmIj6AI.mjs} +18 -13
- package/dist/web-DknQETPs.mjs +2 -0
- package/dist/web-run.mjs +11 -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-process-lock-1_1OoVW5.mjs +57 -0
- package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-Cjuigeeu.mjs} +62 -58
- package/dist/{workspaces-C36s2jb9.mjs → workspaces-BccMFmGQ.mjs} +1188 -1079
- package/dist/worktree-CK2MpJW5.mjs +2 -0
- package/dist/{worktree-CgvJYJ-Q.mjs → worktree-DQ6Zi2Mv.mjs} +304 -53
- package/dist/xcode-Zlx3qjEs.mjs +896 -0
- package/package.json +7 -5
- 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/miss-reason-mKzZ4VvN.mjs +0 -238
- package/dist/native-android-D5qc3-_v.mjs +0 -226
- 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/spawn-claims-DVS5RkMS.mjs +0 -72
- package/dist/stage-KNTQopqv.mjs +0 -157
- package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
- 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 {
|
|
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 { f as ownership_claim_exports, t as getExecutor } from "./exec-_UbtCQcG.mjs";
|
|
2
|
+
import { m as workspaceLogsDir$1, t as emulatorLogFile } from "./paths-DQtTgsBf.mjs";
|
|
3
|
+
import { E as upsertProject, G as parseDeviceSlotOption, J as validateDeviceSlot, U as deviceSlotPlatforms, V as deviceSlotFileKey, p as getProject, u as getConcurrencyLimits } from "./config-CYcBF478.mjs";
|
|
4
|
+
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-B1UrjZHL.mjs";
|
|
5
|
+
import { d as writeWorkspaceState, i as recordWorkspaceUse, r as readWorkspaceState$1 } from "./workspace-state-Cjuigeeu.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-CsJDEXgK.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-BZNjmW_8.mjs";
|
|
8
|
+
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
9
|
+
import { f as resolveProjectMetro, l as pidExists } from "./metro-DEXpIhHC.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-Bs6SxxzO.mjs";
|
|
11
|
+
import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-DY_RLx3C.mjs";
|
|
12
|
+
import { F as acquireBuildSlot, L as releaseBuildSlot } from "./workspaces-BccMFmGQ.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BzVfHSrY.mjs";
|
|
14
|
+
import { $ as resolvePhysicalDevice, P as listInstalledSystemImages, Q as resolveOwnedAvdSerialAsync, Y as probeEmulatorSerial, a as androidDeviceAbi, it as waitForBoot, k as listAdbDevices, ot as configuredAndroidEmulatorApp, q as physicalDeviceModel } from "./android-DUYkNF4u.mjs";
|
|
15
|
+
import { t as CCACHE_NOT_RUN } from "./ccache-BJRZ9pG3.mjs";
|
|
16
|
+
import { f as setRemoteLogSink } from "./client-UXD70ZbM.mjs";
|
|
17
|
+
import { i as parseBuildMachineOption, s as resolveBuildPlacement } from "./selection-CSl9i5qU.mjs";
|
|
18
|
+
import { r as hostedMetroSettings } from "./metro-gateway-BMJNlj3E.mjs";
|
|
19
|
+
import { a as writeHostedAndroid, i as writeDevicePlacement, t as readHostedAndroid } from "./ios-state-DvFX-K_l.mjs";
|
|
20
|
+
import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-Bw-honsd.mjs";
|
|
21
|
+
import { n as verifyCollectorOwnership } from "./ownership-DEmM5vhh.mjs";
|
|
22
|
+
import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-DF8VfT64.mjs";
|
|
23
|
+
import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-C8raGFoP.mjs";
|
|
24
|
+
import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-CMlqEcvw.mjs";
|
|
25
|
+
import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-BomfRnFT.mjs";
|
|
26
|
+
import { c as startDevServer } from "./start-7lpH7hmN.mjs";
|
|
27
|
+
import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-Dg1Q7tfF.mjs";
|
|
28
|
+
import { n as devicePlacementRecord } from "./placement-log-BqGbTa61.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-67vraa1Q.mjs";
|
|
30
|
+
import { t as acquireAndroidArtifact } from "./artifact-DAuZ-FNU.mjs";
|
|
31
|
+
import { a as reportAndroidResult, c as resolveAndroidRunPlan, i as persistLastBuild, n as finishAndroidUpload, o as androidDeviceSelectorRefusal } from "./result-DNiS-tTP.mjs";
|
|
32
|
+
import { n as automaticDevicePlacement, r as devicePlacementLine, t as checkEasFallback } from "./eas-fallback-DJwZpy0c.mjs";
|
|
33
|
+
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-ExJq8Ei7.mjs";
|
|
34
|
+
import { t as selectFromPool } from "./device-pool-DMRpVX9a.mjs";
|
|
35
|
+
import { r as finishAndroidRun } from "./launch-CD1yVc7U.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-CaFskB7_.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 {
|
|
@@ -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
|
|
@@ -281,7 +280,7 @@ function runOnlyFlag(opts) {
|
|
|
281
280
|
}
|
|
282
281
|
async function planAndroid(opts, overrides = {}) {
|
|
283
282
|
const deps = {
|
|
284
|
-
findRoot: findProjectRoot,
|
|
283
|
+
findRoot: findProjectRoot$1,
|
|
285
284
|
projectRegistry,
|
|
286
285
|
...overrides
|
|
287
286
|
};
|
|
@@ -295,12 +294,13 @@ async function planAndroid(opts, overrides = {}) {
|
|
|
295
294
|
code: "STIM_NO_PROJECT",
|
|
296
295
|
...selected.problem
|
|
297
296
|
}, json);
|
|
298
|
-
const resolved =
|
|
299
|
-
const
|
|
300
|
-
if (!
|
|
301
|
-
const result = await
|
|
297
|
+
const resolved = await resolveProjectSettingsAsync(root);
|
|
298
|
+
const planner = (await selected.load(resolved)).plan;
|
|
299
|
+
if (!planner) return refusePlan(unsupportedPlan("android"), json);
|
|
300
|
+
const { value: result, interrupted } = await runProcessOperation(root, (operation) => planner(opts, resolved, operation));
|
|
302
301
|
if ("platform" in result) printPlan(result, json);
|
|
303
302
|
else refusePlan(result.refusal, json, result.lines);
|
|
303
|
+
if (interrupted) process.exitCode = interrupted;
|
|
304
304
|
}
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/commands/android.ts
|
|
@@ -308,38 +308,41 @@ function androidCommand(program) {
|
|
|
308
308
|
registerAndroid(program);
|
|
309
309
|
}
|
|
310
310
|
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
|
|
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 machine is full or busy; local runs here, whatever android.remote says", (value) => {
|
|
312
312
|
if (!parseMachine(value)) throw new InvalidArgumentError("expected eas, proxy, auto, local, or a tailnet machine name");
|
|
313
313
|
return value;
|
|
314
314
|
}).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
315
|
if (opts.plan) return planAndroid(opts);
|
|
316
|
-
const root = findProjectRoot(process.cwd());
|
|
316
|
+
const root = findProjectRoot$1(process.cwd());
|
|
317
317
|
if (!root) {
|
|
318
318
|
refuseNoProject({ json: Boolean(opts.json) });
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
const { value: result, interrupted } = await runProcessOperation(root, (context) => runAndroidOperation(context, root, {
|
|
322
322
|
...opts,
|
|
323
323
|
waitConflict: waitFlagConflict(process.argv)
|
|
324
|
-
}))
|
|
324
|
+
}));
|
|
325
|
+
if (!result.ok) process.exit(interrupted ?? 1);
|
|
326
|
+
else if (result.uploadsAbandoned) exitAfterFlush(0);
|
|
325
327
|
});
|
|
326
328
|
}
|
|
327
|
-
function runAndroidOperation(root, opts = {}) {
|
|
328
|
-
return withNativeBuildRun(root, {
|
|
329
|
+
function runAndroidOperation(context, root, opts = {}) {
|
|
330
|
+
return withNativeBuildRun(context, root, {
|
|
329
331
|
command: "android",
|
|
330
332
|
platform: PLATFORM,
|
|
331
333
|
slot: opts.slot ?? "default"
|
|
332
334
|
}, async (claim) => {
|
|
333
|
-
recordWorkspaceUse(root);
|
|
335
|
+
recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
|
|
334
336
|
const progress = startBuildProgress({
|
|
335
337
|
root,
|
|
336
338
|
platform: PLATFORM,
|
|
337
339
|
slot: opts.slot ?? "default",
|
|
338
340
|
claim,
|
|
339
|
-
note: (line) =>
|
|
341
|
+
note: (line) => context.output("stderr", `${chalk.dim(line)}\n`)
|
|
340
342
|
});
|
|
341
343
|
try {
|
|
342
344
|
return await runAndroid({
|
|
345
|
+
context,
|
|
343
346
|
root,
|
|
344
347
|
buildMachine: opts.remoteBuild,
|
|
345
348
|
slot: opts.slot,
|
|
@@ -359,9 +362,12 @@ function runAndroidOperation(root, opts = {}) {
|
|
|
359
362
|
} finally {
|
|
360
363
|
progress.clear();
|
|
361
364
|
}
|
|
362
|
-
}, { write: (line) =>
|
|
365
|
+
}, { write: (line) => context.output("stderr", `${chalk.dim(phaseLine("lock", line))}\n`) });
|
|
363
366
|
}
|
|
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 =
|
|
367
|
+
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, {
|
|
368
|
+
...options,
|
|
369
|
+
context
|
|
370
|
+
}), 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
371
|
return {
|
|
366
372
|
root,
|
|
367
373
|
json,
|
|
@@ -498,6 +504,7 @@ function avdSetupFailure(error, root, logFile) {
|
|
|
498
504
|
};
|
|
499
505
|
}
|
|
500
506
|
async function runAndroid(options = {}) {
|
|
507
|
+
const { context } = options;
|
|
501
508
|
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
509
|
const progress = options.progress ?? NO_BUILD_PROGRESS;
|
|
503
510
|
const slot = validateDeviceSlot(options.slot);
|
|
@@ -553,7 +560,7 @@ async function runAndroid(options = {}) {
|
|
|
553
560
|
slot
|
|
554
561
|
}
|
|
555
562
|
}), progress);
|
|
556
|
-
setRemoteLogSink((entry) => writer.write(entry));
|
|
563
|
+
setRemoteLogSink(context, (entry) => writer.write(entry));
|
|
557
564
|
const record = {
|
|
558
565
|
fingerprint: null,
|
|
559
566
|
cacheKey: null,
|
|
@@ -576,7 +583,7 @@ async function runAndroid(options = {}) {
|
|
|
576
583
|
let ccacheActivity = CCACHE_NOT_RUN;
|
|
577
584
|
let reclaimed = [];
|
|
578
585
|
const fail = (code, message, remedy, { lastBuildStatus = false, setup = false, diagnostics = [], buildDiagnostics: rawDiagnostics = [], lines = [], logPath = null, lease } = {}) => {
|
|
579
|
-
const cancellation = cancelledFailure(PLATFORM, {
|
|
586
|
+
const cancellation = cancelledFailure(context, PLATFORM, {
|
|
580
587
|
code,
|
|
581
588
|
message
|
|
582
589
|
});
|
|
@@ -621,7 +628,17 @@ async function runAndroid(options = {}) {
|
|
|
621
628
|
};
|
|
622
629
|
};
|
|
623
630
|
const settingsRoot = root;
|
|
624
|
-
const
|
|
631
|
+
const settingsSignal = runCancellationSignal(context) ?? context.signal;
|
|
632
|
+
let settingsContext;
|
|
633
|
+
try {
|
|
634
|
+
settingsContext = await projectSettingsContextAsync(root, void 0, {
|
|
635
|
+
env: context.env,
|
|
636
|
+
signal: settingsSignal
|
|
637
|
+
});
|
|
638
|
+
} catch (error) {
|
|
639
|
+
if (!settingsSignal.aborted) throw error;
|
|
640
|
+
return fail("STIM_CANCELLED", "before resolving project settings", null, { setup: true });
|
|
641
|
+
}
|
|
625
642
|
const projectKey = statsProjectKey$1({
|
|
626
643
|
root,
|
|
627
644
|
commonDir: settingsContext.gitCommonDir,
|
|
@@ -648,6 +665,7 @@ async function runAndroid(options = {}) {
|
|
|
648
665
|
const planned = resolveAndroidRunPlan({
|
|
649
666
|
settings,
|
|
650
667
|
settingsContext,
|
|
668
|
+
env: context.env,
|
|
651
669
|
slot,
|
|
652
670
|
easProfile,
|
|
653
671
|
variant: variantFlag,
|
|
@@ -673,7 +691,7 @@ async function runAndroid(options = {}) {
|
|
|
673
691
|
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
692
|
const deviceSlotWait = {
|
|
675
693
|
automatic: plan.target.kind === "hosted" && plan.target.machine === "auto",
|
|
676
|
-
signal: runCancellationSignal(),
|
|
694
|
+
signal: runCancellationSignal(context),
|
|
677
695
|
waitMs: plan.deviceSlotWaitMs,
|
|
678
696
|
displayName: basename(root),
|
|
679
697
|
reclaimIdleMinutes: deviceReclaimIdleMinutesSetting(settings),
|
|
@@ -704,6 +722,8 @@ async function runAndroid(options = {}) {
|
|
|
704
722
|
...integration.eas && remoteEasFallbackSetting(settings) ? { eas: () => (options.checkEasFallback ?? checkEasFallback)({
|
|
705
723
|
root,
|
|
706
724
|
platform: PLATFORM,
|
|
725
|
+
env: context.env,
|
|
726
|
+
operation: context,
|
|
707
727
|
slot,
|
|
708
728
|
release,
|
|
709
729
|
isExpo,
|
|
@@ -724,7 +744,10 @@ async function runAndroid(options = {}) {
|
|
|
724
744
|
listSystemImages,
|
|
725
745
|
listDeviceProfiles
|
|
726
746
|
}),
|
|
727
|
-
checkBudget: options.checkBudget
|
|
747
|
+
checkBudget: (args) => (options.checkBudget ?? budgetGate)({
|
|
748
|
+
...args,
|
|
749
|
+
env: context.env
|
|
750
|
+
}),
|
|
728
751
|
note: out,
|
|
729
752
|
phase,
|
|
730
753
|
log: (entry) => writer.write(entry),
|
|
@@ -746,10 +769,13 @@ async function runAndroid(options = {}) {
|
|
|
746
769
|
root,
|
|
747
770
|
platform: PLATFORM,
|
|
748
771
|
backend: remoteBackend,
|
|
772
|
+
env: context.env,
|
|
773
|
+
operation: context,
|
|
749
774
|
easBin: resolveEasBin(root)?.file ?? null
|
|
750
775
|
}) : null;
|
|
751
776
|
if (remoteContext && "failed" in remoteContext) return fail(remoteContext.code ?? "STIM_NO_REMOTE_SESSION", remoteContext.failed, remoteContext.remedy);
|
|
752
777
|
const easBuild = await resolveEasBuild({
|
|
778
|
+
context,
|
|
753
779
|
root,
|
|
754
780
|
platform: PLATFORM,
|
|
755
781
|
profile: easProfile,
|
|
@@ -757,10 +783,22 @@ async function runAndroid(options = {}) {
|
|
|
757
783
|
isExpo,
|
|
758
784
|
physical,
|
|
759
785
|
selectors: [variantFlag],
|
|
760
|
-
buildCache: requestedBuildCache
|
|
786
|
+
buildCache: requestedBuildCache,
|
|
787
|
+
env: context.env,
|
|
788
|
+
signal: settingsSignal
|
|
789
|
+
}).catch((error) => {
|
|
790
|
+
const cancelled = cancelledFailure(context, PLATFORM, {
|
|
791
|
+
code: "STIM_CANCELLED",
|
|
792
|
+
message: "during EAS lookup"
|
|
793
|
+
});
|
|
794
|
+
if (cancelled) return {
|
|
795
|
+
ok: false,
|
|
796
|
+
...cancelled
|
|
797
|
+
};
|
|
798
|
+
throw error;
|
|
761
799
|
});
|
|
762
800
|
if (isEasBuildFailure(easBuild)) return fail(easBuild.code, easBuild.message, easBuild.remedy);
|
|
763
|
-
const appIds = integration.appIds();
|
|
801
|
+
const appIds = await integration.appIds();
|
|
764
802
|
let androidPackage = appIds.androidPackage;
|
|
765
803
|
record.bundleId = androidPackage;
|
|
766
804
|
const registerProject = () => upsertProject(root, {
|
|
@@ -778,6 +816,7 @@ async function runAndroid(options = {}) {
|
|
|
778
816
|
async function prepareMetro() {
|
|
779
817
|
if (metroCheck) {
|
|
780
818
|
const gate = await ensureDevServer({
|
|
819
|
+
env: context.env,
|
|
781
820
|
root,
|
|
782
821
|
port: reservedPort,
|
|
783
822
|
settings: hostedMetroSettings(settings, Boolean(hostedTarget)),
|
|
@@ -806,7 +845,7 @@ async function runAndroid(options = {}) {
|
|
|
806
845
|
prepared: { metroPort }
|
|
807
846
|
};
|
|
808
847
|
} else {
|
|
809
|
-
const pin = metroPortSetting(settings);
|
|
848
|
+
const pin = metroPortSetting(settings, context.env);
|
|
810
849
|
if (pin.error) return {
|
|
811
850
|
ok: false,
|
|
812
851
|
error: {
|
|
@@ -841,6 +880,7 @@ async function runAndroid(options = {}) {
|
|
|
841
880
|
if (metroPort !== null) {
|
|
842
881
|
const reachable = await ensureRemoteMetro({
|
|
843
882
|
ctx: remoteDevice.ctx,
|
|
883
|
+
env: context.env,
|
|
844
884
|
metroPort,
|
|
845
885
|
isExpo,
|
|
846
886
|
tunnelMode: tunnelModeSetting(settings) ?? void 0,
|
|
@@ -852,8 +892,9 @@ async function runAndroid(options = {}) {
|
|
|
852
892
|
checkCapacity = remoteDevice.checkCapacity;
|
|
853
893
|
ensureDevice = remoteDevice.ensureDevice;
|
|
854
894
|
ensureDeviceBooted = remoteDevice.ensureDeviceBooted;
|
|
855
|
-
|
|
856
|
-
|
|
895
|
+
const remote = remoteDevice;
|
|
896
|
+
install = async (args) => remote.install(args);
|
|
897
|
+
launch = async (args) => remote.launch(args);
|
|
857
898
|
}
|
|
858
899
|
const emuLog = emulatorLogFile(root);
|
|
859
900
|
const limits = getLimits();
|
|
@@ -901,7 +942,7 @@ async function runAndroid(options = {}) {
|
|
|
901
942
|
});
|
|
902
943
|
} else {
|
|
903
944
|
if (!remoteDevice) try {
|
|
904
|
-
configuredAndroidEmulatorApp();
|
|
945
|
+
await configuredAndroidEmulatorApp();
|
|
905
946
|
} catch (err) {
|
|
906
947
|
return fail("STIM_BAD_ARG", err.message, "Run `stim settings set androidEmulatorApp emulator` or `stim settings set androidEmulatorApp stim-desktop`.");
|
|
907
948
|
}
|
|
@@ -962,6 +1003,7 @@ async function runAndroid(options = {}) {
|
|
|
962
1003
|
root,
|
|
963
1004
|
platform: PLATFORM,
|
|
964
1005
|
sessionName: ownedSessionName(remoteDevice.ctx.label),
|
|
1006
|
+
operation: context,
|
|
965
1007
|
startedAt: new Date(now()).toISOString(),
|
|
966
1008
|
boot,
|
|
967
1009
|
createdSessionId: remoteDevice.createdSessionId,
|
|
@@ -993,10 +1035,12 @@ async function runAndroid(options = {}) {
|
|
|
993
1035
|
bundleUrl: metroWarmupUrlSetting(settings, "android")
|
|
994
1036
|
});
|
|
995
1037
|
const acquiredArtifact = await acquireAndroidArtifact({
|
|
1038
|
+
context,
|
|
996
1039
|
root,
|
|
997
1040
|
buildLog,
|
|
998
1041
|
writer,
|
|
999
1042
|
recipe: integration.artifact({
|
|
1043
|
+
operation: context,
|
|
1000
1044
|
root,
|
|
1001
1045
|
buildLog,
|
|
1002
1046
|
writer,
|
|
@@ -1058,7 +1102,7 @@ async function runAndroid(options = {}) {
|
|
|
1058
1102
|
ccacheActivity = artifact.ccache;
|
|
1059
1103
|
androidPackage = artifact.androidPackage;
|
|
1060
1104
|
record.appPath = apkPath;
|
|
1061
|
-
if (runCancellation()) return fail("STIM_CANCELLED", "before install");
|
|
1105
|
+
if (runCancellation(context)) return fail("STIM_CANCELLED", "before install");
|
|
1062
1106
|
if (hostedTarget) return finishHostedAndroidRun({
|
|
1063
1107
|
target: hostedTarget,
|
|
1064
1108
|
artifact,
|
|
@@ -1151,12 +1195,13 @@ async function runAndroid(options = {}) {
|
|
|
1151
1195
|
expiresAt: acquired.status === "leased" ? acquired.expiresAt : null
|
|
1152
1196
|
});
|
|
1153
1197
|
if (acquired.status === "leased") {
|
|
1154
|
-
stopLeaseSignals = onLeaseSignal(releaseLease);
|
|
1198
|
+
stopLeaseSignals = onLeaseSignal(context, releaseLease);
|
|
1155
1199
|
phase("lease", `${acquired.kind} lease on ${device.serial} until ${leaseExpiryText(acquired.expiresAt, now())}`);
|
|
1156
1200
|
}
|
|
1157
1201
|
}
|
|
1158
1202
|
try {
|
|
1159
1203
|
return await finishAndroidRun({
|
|
1204
|
+
operation: context,
|
|
1160
1205
|
runtime,
|
|
1161
1206
|
runtimePreparation,
|
|
1162
1207
|
slot,
|
|
@@ -1200,7 +1245,7 @@ async function runAndroid(options = {}) {
|
|
|
1200
1245
|
phase,
|
|
1201
1246
|
fail,
|
|
1202
1247
|
readApkPackage,
|
|
1203
|
-
readProjectPackage: () => integration.appIds().androidPackage,
|
|
1248
|
+
readProjectPackage: async () => (await integration.appIds()).androidPackage,
|
|
1204
1249
|
packageRemedy: integration.packageRemedy,
|
|
1205
1250
|
install,
|
|
1206
1251
|
launch,
|
|
@@ -1244,13 +1289,18 @@ async function runAndroid(options = {}) {
|
|
|
1244
1289
|
try {
|
|
1245
1290
|
return await runFromFingerprint();
|
|
1246
1291
|
} catch (error) {
|
|
1292
|
+
const cancelled = cancelledFailure(context, PLATFORM, {
|
|
1293
|
+
code: "STIM_CANCELLED",
|
|
1294
|
+
message: "while finishing the run"
|
|
1295
|
+
});
|
|
1296
|
+
if (cancelled) return fail(cancelled.code, cancelled.message, cancelled.remedy, { lastBuildStatus: true });
|
|
1247
1297
|
recordRun({
|
|
1248
1298
|
failed: true,
|
|
1249
1299
|
durationMs: now() - started
|
|
1250
1300
|
});
|
|
1251
1301
|
throw error;
|
|
1252
1302
|
} finally {
|
|
1253
|
-
preparedArtifact?.release();
|
|
1303
|
+
await preparedArtifact?.release();
|
|
1254
1304
|
}
|
|
1255
1305
|
}
|
|
1256
1306
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-
|
|
2
|
-
import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-
|
|
3
|
-
import { r as lastBuildRecord, t as androidFacts } from "./result-
|
|
4
|
-
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-
|
|
5
|
-
import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-
|
|
1
|
+
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-B1UrjZHL.mjs";
|
|
2
|
+
import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-67vraa1Q.mjs";
|
|
3
|
+
import { r as lastBuildRecord, t as androidFacts } from "./result-DNiS-tTP.mjs";
|
|
4
|
+
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-BLgbNqox.mjs";
|
|
5
|
+
import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-CD1yVc7U.mjs";
|
|
6
6
|
export { NO_DEVICE, NO_FINGERPRINT, androidDevClientScheme, androidFacts, androidSystemImageSetting, androidVariantSetting, apkDevClientFacts, apkPackage, collectorLogFile, androidCommand as default, displayPath, dumpApkManifest, findAapt, formatDuration, isReleaseVariant, killPreviousCollector, lastBuildRecord, noDeviceDiagnostic, parseXmltree, phaseLine, registerAndroid, resolveSystemImage, resolveVariant, runAndroid, runAndroidOperation, shortHash, startCollector };
|