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
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { l as workspaceAgentDeviceDir } from "./paths-DQtTgsBf.mjs";
|
|
2
|
+
import { U as deviceSlotPlatforms, p as getProject } from "./config-CYcBF478.mjs";
|
|
3
|
+
import { i as formatDuration, l as phaseLine } from "./command-output-B1UrjZHL.mjs";
|
|
4
|
+
import { $ as settingOriginScope, F as parseIosRemote, G as resolveCacheProviderConfig, V as remoteAndroidSetting, W as resolveAndroidLayout, Z as settingFile, a as SETTING_SHAPE_REMEDY, d as androidLayoutSetting, et as settingShapeErrors, f as androidLayoutSettingError, it as unknownSettingKeys, nt as settingsLayers, p as cacheProviderSettingError, s as androidAvdConfigSettingError, u as androidDataPartitionSizeGbSettingError } from "./settings-CsJDEXgK.mjs";
|
|
5
|
+
import { v as detectIsExpo } from "./project-BZNjmW_8.mjs";
|
|
6
|
+
import { B as recordFinishedBuild, Hn as isEasAuthFailureText, Rn as UPLOAD_TIMEOUT_MS, Vn as easAuthNote, zn as cacheLevel } from "./budget-Bs6SxxzO.mjs";
|
|
7
|
+
import { J as pickDefaultSystemImage, P as listInstalledSystemImages, R as ownedAvdDeviceProfile, W as ownedAvdSystemImage, X as profileNeedsFoldFeature, ht as parkedMaxSetting, j as listAvdDeviceProfiles, t as DEFAULT_AVD_DEVICE_PROFILE, tt as systemImageSupportsFold } from "./android-DUYkNF4u.mjs";
|
|
8
|
+
import { a as workspaceLinkLine } from "./stim-desktop-C12we7lz.mjs";
|
|
9
|
+
import { d as optimizationBuildProfile, l as artifactCachePolicy, p as resolveOptimizations, u as compilerCacheFallbackMessage } from "./errors-ccaPc4ox.mjs";
|
|
10
|
+
import { n as CCACHE_UNAVAILABLE, r as ccacheActivityLine } from "./ccache-BJRZ9pG3.mjs";
|
|
11
|
+
import { c as readProductFlavors, s as productFlavorRefusal } from "./react-native-build-rhk4smwQ.mjs";
|
|
12
|
+
import { l as parseDeviceWait } from "./device-lease-run-C8raGFoP.mjs";
|
|
13
|
+
import { t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-CMlqEcvw.mjs";
|
|
14
|
+
import { n as resolveAndroidCas, r as resolveAndroidCompilerCache } from "./android-cas-Ct5b1xCK.mjs";
|
|
15
|
+
import { r as isPhysicalDeviceRequest } from "./native-runtime-Dg1Q7tfF.mjs";
|
|
16
|
+
import { C as remoteAvdFlagRefusal, D as systemImageRefusal, E as resolveVariant, T as resolveSystemImage, a as PLATFORM, m as deviceProfileRefusal, v as foldableImageRefusal, w as resolveDeviceProfile, y as isReleaseVariant } from "./support-67vraa1Q.mjs";
|
|
17
|
+
import { buildDiagnostics } from "@stim-cli/core/state";
|
|
18
|
+
import chalk from "chalk";
|
|
19
|
+
//#region src/commands/android/plan.ts
|
|
20
|
+
function slotOwnedAvd(projectPath, slot) {
|
|
21
|
+
const android = deviceSlotPlatforms(getProject(projectPath), slot)?.android;
|
|
22
|
+
if (!android?.owned || !android.avdName || android.setupIncomplete) return null;
|
|
23
|
+
const systemImage = ownedAvdSystemImage(android.avdName);
|
|
24
|
+
return systemImage ? {
|
|
25
|
+
avdName: android.avdName,
|
|
26
|
+
systemImage,
|
|
27
|
+
deviceProfile: ownedAvdDeviceProfile(android.avdName)
|
|
28
|
+
} : null;
|
|
29
|
+
}
|
|
30
|
+
function fail(code, message, remedy, { lines = [] } = {}) {
|
|
31
|
+
return {
|
|
32
|
+
ok: false,
|
|
33
|
+
code,
|
|
34
|
+
message,
|
|
35
|
+
remedy,
|
|
36
|
+
lines
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function androidLayoutError(settings, root, bound, isExpo) {
|
|
40
|
+
const error = androidLayoutSettingError(settings, root, bound);
|
|
41
|
+
if (error || !androidLayoutSetting(settings, root, bound).custom || !isExpo()) return error;
|
|
42
|
+
return "android.gradleRoot and android.module apply to bare React Native apps only: expo prebuild generates and builds android/. Remove them for this Expo app.";
|
|
43
|
+
}
|
|
44
|
+
function androidCompilerCache({ root, optimizations, env, settingsContext, layout }) {
|
|
45
|
+
const { cas, optimizations: resolved } = resolveAndroidCompilerCache({
|
|
46
|
+
optimizations,
|
|
47
|
+
env,
|
|
48
|
+
use: (manifest) => resolveAndroidCas(root, {
|
|
49
|
+
...env,
|
|
50
|
+
STIM_ANDROID_CAS_TOOLCHAIN: manifest
|
|
51
|
+
}, layout)
|
|
52
|
+
});
|
|
53
|
+
const fallback = resolved.android.compilerCacheFallback;
|
|
54
|
+
if (!fallback) return {
|
|
55
|
+
cas,
|
|
56
|
+
optimizations: resolved,
|
|
57
|
+
warning: null
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
cas,
|
|
61
|
+
optimizations: resolved,
|
|
62
|
+
warning: `Warning: ${compilerCacheFallbackMessage({
|
|
63
|
+
fallback,
|
|
64
|
+
compilerCache: resolved.android.compilerCache === "none" ? "none" : "ccache",
|
|
65
|
+
file: settingFile(settingsContext, fallback.key)
|
|
66
|
+
})}`
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function resolveAndroidBuildPlan({ settings, settingsContext, env, easProfile, variant: variantFlag, buildCache: requestedBuildCache }, { warn, runtimeKind, resolveCompilerCache = androidCompilerCache, resolveCacheProvider = resolveCacheProviderConfig, variantProblem, detectExpo = () => detectIsExpo(settingsContext.projectPath) }) {
|
|
70
|
+
const root = settingsContext.projectPath;
|
|
71
|
+
const [shapeError, ...moreShapeErrors] = settingShapeErrors(settings);
|
|
72
|
+
if (shapeError) return fail("STIM_BAD_ARG", shapeError, SETTING_SHAPE_REMEDY, { lines: moreShapeErrors });
|
|
73
|
+
const bound = settingsContext.repoRoot ?? root;
|
|
74
|
+
const layoutError = androidLayoutError(settings, root, bound, detectExpo);
|
|
75
|
+
if (layoutError) return fail("STIM_BAD_ARG", layoutError, SETTING_SHAPE_REMEDY);
|
|
76
|
+
const layout = resolveAndroidLayout(settings, root, bound);
|
|
77
|
+
for (const key of unknownSettingKeys(settings)) warn("setting", `Warning: setting "${key}" is not read by Stim and will be ignored.`);
|
|
78
|
+
let optimizations;
|
|
79
|
+
try {
|
|
80
|
+
optimizations = resolveOptimizations(settings, env);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
return fail("STIM_BAD_ARG", `Could not configure Android build: ${error.message}`, SETTING_SHAPE_REMEDY);
|
|
83
|
+
}
|
|
84
|
+
const compilerCache = resolveCompilerCache({
|
|
85
|
+
root,
|
|
86
|
+
optimizations,
|
|
87
|
+
settingsContext,
|
|
88
|
+
layout,
|
|
89
|
+
env
|
|
90
|
+
});
|
|
91
|
+
const cas = compilerCache.cas;
|
|
92
|
+
optimizations = compilerCache.optimizations;
|
|
93
|
+
if (compilerCache.warning) warn("cache", compilerCache.warning);
|
|
94
|
+
const buildProfile = optimizationBuildProfile("android", optimizations);
|
|
95
|
+
const cacheProviderConfig = resolveCacheProvider(settingsContext);
|
|
96
|
+
const cacheProviderError = cacheProviderSettingError(settings);
|
|
97
|
+
if (cacheProviderError) warn("cache", `${cacheProviderError} Using the local cache.`);
|
|
98
|
+
const variant = easProfile !== void 0 ? "debug" : resolveVariant(variantFlag, settings);
|
|
99
|
+
const flavorRefusal = variantProblem(variant);
|
|
100
|
+
if (flavorRefusal) return fail(flavorRefusal.code, flavorRefusal.reason, flavorRefusal.remedy);
|
|
101
|
+
const release = isReleaseVariant(variant);
|
|
102
|
+
return {
|
|
103
|
+
ok: true,
|
|
104
|
+
plan: {
|
|
105
|
+
build: {
|
|
106
|
+
variant,
|
|
107
|
+
release,
|
|
108
|
+
profile: buildProfile,
|
|
109
|
+
cas,
|
|
110
|
+
cache: artifactCachePolicy(optimizations, requestedBuildCache, runtimeKind({ release }) === "embedded-js"),
|
|
111
|
+
compilerCache: optimizations.android.compilerCache,
|
|
112
|
+
gradleBuildCache: optimizations.android.gradleBuildCache,
|
|
113
|
+
pch: optimizations.android.pch,
|
|
114
|
+
targetAbiOnly: optimizations.android.targetAbiOnly
|
|
115
|
+
},
|
|
116
|
+
metroWarmup: optimizations.metroWarmup,
|
|
117
|
+
cacheProviderConfig
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function resolveAndroidRunPlan({ settings, settingsContext, env, slot, easProfile, variant: variantFlag, systemImage: systemImageFlag, deviceProfile: deviceProfileFlag, device: deviceFlag, wait: waitFlag, waitConflict, remote: commandRemoteBackend, buildCache: requestedBuildCache }, { warn, runtimeKind, resolveCompilerCache = androidCompilerCache, resolveCacheProvider = resolveCacheProviderConfig, validateAvdConfig = androidAvdConfigSettingError, readFlavors = readProductFlavors, variantProblem = (variant) => productFlavorRefusal({
|
|
122
|
+
flavors: readFlavors(resolveAndroidLayout(settings, settingsContext.projectPath, settingsContext.repoRoot ?? settingsContext.projectPath)),
|
|
123
|
+
variant
|
|
124
|
+
}), detectExpo = () => detectIsExpo(settingsContext.projectPath), listSystemImages = listInstalledSystemImages, listDeviceProfiles = listAvdDeviceProfiles, parkedLimit = parkedMaxSetting, supportsFold = systemImageSupportsFold, ownedAvd = slotOwnedAvd }) {
|
|
125
|
+
const root = settingsContext.projectPath;
|
|
126
|
+
const [shapeError, ...moreShapeErrors] = [parkedLimit("android").error, ...settingShapeErrors(settings)].filter((error) => Boolean(error));
|
|
127
|
+
if (shapeError) return fail("STIM_BAD_ARG", shapeError, SETTING_SHAPE_REMEDY, { lines: moreShapeErrors });
|
|
128
|
+
const plannedBuild = resolveAndroidBuildPlan({
|
|
129
|
+
settings,
|
|
130
|
+
settingsContext,
|
|
131
|
+
env,
|
|
132
|
+
easProfile,
|
|
133
|
+
variant: variantFlag,
|
|
134
|
+
buildCache: requestedBuildCache
|
|
135
|
+
}, {
|
|
136
|
+
warn,
|
|
137
|
+
runtimeKind,
|
|
138
|
+
resolveCompilerCache,
|
|
139
|
+
resolveCacheProvider,
|
|
140
|
+
variantProblem,
|
|
141
|
+
detectExpo
|
|
142
|
+
});
|
|
143
|
+
if (!plannedBuild.ok) return plannedBuild;
|
|
144
|
+
const dataPartitionSizeError = androidDataPartitionSizeGbSettingError(settings);
|
|
145
|
+
if (dataPartitionSizeError) return fail("STIM_BAD_ARG", dataPartitionSizeError, "Set android.dataPartitionSizeGb to a whole number of GiB from 6 through 16384.");
|
|
146
|
+
const avdConfigError = validateAvdConfig(settings, root);
|
|
147
|
+
if (avdConfigError) return fail("STIM_BAD_ARG", avdConfigError, "Use only documented android.avdConfig keys, or an android.avdConfigFile fragment contained by the app directory.");
|
|
148
|
+
const systemImage = resolveSystemImage(systemImageFlag, settings);
|
|
149
|
+
const deviceProfile = resolveDeviceProfile(deviceProfileFlag, settings);
|
|
150
|
+
const isExpo = detectExpo();
|
|
151
|
+
const physical = isPhysicalDeviceRequest(deviceFlag);
|
|
152
|
+
if (physical && deviceFlag === "") return fail("STIM_BAD_ARG", "--device was given an empty serial.", "Pass `--device` on its own to take the first connected device this workspace can lease, or `--device <serial>` to name one.");
|
|
153
|
+
if (physical && commandRemoteBackend) return fail("STIM_BAD_ARG", "--device installs on a device connected to this machine, and --remote installs on a remote one.", "Pass only one of --device and --remote.");
|
|
154
|
+
const noWait = waitFlag === false;
|
|
155
|
+
if (waitConflict) return fail("STIM_BAD_ARG", "--wait and --no-wait ask for opposite things.", "Pass only one of `--wait <seconds>` and `--no-wait`.");
|
|
156
|
+
const waitParsed = parseDeviceWait(noWait ? void 0 : waitFlag);
|
|
157
|
+
if ("error" in waitParsed) return fail("STIM_BAD_ARG", waitParsed.error, "Pass a whole number of seconds, e.g. --wait 90. `--wait 0` refuses a busy lease or device slot at once.");
|
|
158
|
+
const waitSeconds = waitParsed.seconds;
|
|
159
|
+
const remoteTarget = commandRemoteBackend !== null ? parseIosRemote(commandRemoteBackend) : remoteAndroidSetting(settings);
|
|
160
|
+
if (physical && remoteTarget?.kind === "machine") return fail("STIM_BAD_ARG", "--device installs on a phone connected to this machine, and --remote installs on a remote one.", "Pass only one of --device and --remote; unset android.remote for a local phone.");
|
|
161
|
+
const machine = remoteTarget?.kind === "machine" ? remoteTarget.machine : null;
|
|
162
|
+
const remoteBackend = !physical && remoteTarget?.kind === "backend" ? remoteTarget.backend : null;
|
|
163
|
+
if (!machine) {
|
|
164
|
+
const refusal = androidDeviceSelectorRefusal({
|
|
165
|
+
settingsContext,
|
|
166
|
+
slot,
|
|
167
|
+
systemImageFlag,
|
|
168
|
+
deviceProfileFlag,
|
|
169
|
+
systemImage,
|
|
170
|
+
deviceProfile,
|
|
171
|
+
physical,
|
|
172
|
+
remoteBackend
|
|
173
|
+
}, {
|
|
174
|
+
listSystemImages,
|
|
175
|
+
listDeviceProfiles,
|
|
176
|
+
supportsFold,
|
|
177
|
+
ownedAvd
|
|
178
|
+
});
|
|
179
|
+
if (refusal) return refusal;
|
|
180
|
+
}
|
|
181
|
+
const target = physical ? {
|
|
182
|
+
kind: "physical",
|
|
183
|
+
serial: typeof deviceFlag === "string" ? deviceFlag : null,
|
|
184
|
+
lease: {
|
|
185
|
+
waitSeconds,
|
|
186
|
+
noWait
|
|
187
|
+
}
|
|
188
|
+
} : machine ? {
|
|
189
|
+
kind: "hosted",
|
|
190
|
+
machine,
|
|
191
|
+
systemImage,
|
|
192
|
+
deviceProfile
|
|
193
|
+
} : remoteBackend ? {
|
|
194
|
+
kind: "remote",
|
|
195
|
+
backend: remoteBackend,
|
|
196
|
+
systemImage,
|
|
197
|
+
deviceProfile
|
|
198
|
+
} : {
|
|
199
|
+
kind: "emulator",
|
|
200
|
+
systemImage,
|
|
201
|
+
deviceProfile
|
|
202
|
+
};
|
|
203
|
+
return {
|
|
204
|
+
ok: true,
|
|
205
|
+
plan: {
|
|
206
|
+
...plannedBuild.plan,
|
|
207
|
+
target,
|
|
208
|
+
deviceSlotWaitMs: noWait ? 0 : waitFlag === void 0 && !physical ? DEFAULT_DEVICE_SLOT_WAIT_MS : waitSeconds * 1e3,
|
|
209
|
+
isExpo
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function androidDeviceSelectorRefusal({ settingsContext, slot, systemImageFlag, deviceProfileFlag, systemImage, deviceProfile, physical, remoteBackend }, { listSystemImages = listInstalledSystemImages, listDeviceProfiles = listAvdDeviceProfiles, supportsFold = systemImageSupportsFold, ownedAvd = slotOwnedAvd } = {}) {
|
|
214
|
+
const root = settingsContext.projectPath;
|
|
215
|
+
const settingsLayersForOrigin = settingsLayers(settingsContext);
|
|
216
|
+
const imageRefusal = systemImageRefusal({
|
|
217
|
+
slot,
|
|
218
|
+
flag: systemImageFlag,
|
|
219
|
+
resolved: systemImage,
|
|
220
|
+
origin: settingOriginScope(settingsLayersForOrigin, "android.systemImage"),
|
|
221
|
+
physical,
|
|
222
|
+
remoteBackend,
|
|
223
|
+
listImages: listSystemImages
|
|
224
|
+
});
|
|
225
|
+
if (imageRefusal) return fail(imageRefusal.code, imageRefusal.message, imageRefusal.remedy);
|
|
226
|
+
const profileRefusal = deviceProfileRefusal({
|
|
227
|
+
flag: deviceProfileFlag,
|
|
228
|
+
resolved: deviceProfile,
|
|
229
|
+
origin: settingOriginScope(settingsLayersForOrigin, "android.deviceProfile"),
|
|
230
|
+
physical,
|
|
231
|
+
remoteBackend,
|
|
232
|
+
listProfiles: listDeviceProfiles
|
|
233
|
+
});
|
|
234
|
+
if (profileRefusal) return fail(profileRefusal.code, profileRefusal.message, profileRefusal.remedy);
|
|
235
|
+
const avdFlagRefusal = remoteAvdFlagRefusal({
|
|
236
|
+
systemImageFlag,
|
|
237
|
+
deviceProfileFlag,
|
|
238
|
+
remoteBackend
|
|
239
|
+
});
|
|
240
|
+
if (avdFlagRefusal) return fail(avdFlagRefusal.code, avdFlagRefusal.message, avdFlagRefusal.remedy);
|
|
241
|
+
if (!physical && !remoteBackend) {
|
|
242
|
+
const flagImage = typeof systemImageFlag === "string" && systemImageFlag.trim() ? systemImageFlag.trim() : null;
|
|
243
|
+
const existing = ownedAvd(root, slot);
|
|
244
|
+
const profile = deviceProfile ?? existing?.deviceProfile ?? DEFAULT_AVD_DEVICE_PROFILE;
|
|
245
|
+
const image = () => flagImage ?? existing?.systemImage ?? systemImage ?? pickDefaultSystemImage(listSystemImages())?.pkg ?? null;
|
|
246
|
+
const checked = profileNeedsFoldFeature(profile) ? image() : null;
|
|
247
|
+
const foldRefusal = checked !== null && foldableImageRefusal({
|
|
248
|
+
profile,
|
|
249
|
+
image: checked,
|
|
250
|
+
avdName: existing && existing.systemImage === checked && existing.deviceProfile === profile ? existing.avdName : null,
|
|
251
|
+
images: listSystemImages,
|
|
252
|
+
supportsFold
|
|
253
|
+
});
|
|
254
|
+
if (foldRefusal) return fail(foldRefusal.code, foldRefusal.message, foldRefusal.remedy);
|
|
255
|
+
}
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/commands/android/result.ts
|
|
260
|
+
function androidFacts({ root, slot, serial, avdName = null, deviceName = null, systemImage = null, deviceProfile = null, fingerprint, cacheKey = null, variant = null, metroPort = null, cacheHit, cacheSkipped = false, waitedForBuild = null, appPath, bundleId, installSkipped = false, launched, ccache = CCACHE_UNAVAILABLE, logs, debugHttpHost = null, debugHttpHostNote = null, devClientUrl = null, durationMs, lease, devServer = null, buildMachine = "auto", builtOn, offloadedTo = null, offloadFallback = null, host }) {
|
|
261
|
+
return {
|
|
262
|
+
platform: PLATFORM,
|
|
263
|
+
...host ? { host } : {},
|
|
264
|
+
...slot && slot !== "default" ? { slot } : {},
|
|
265
|
+
serial: serial ?? null,
|
|
266
|
+
avdName: avdName ?? null,
|
|
267
|
+
deviceName: deviceName ?? avdName ?? null,
|
|
268
|
+
systemImage: systemImage ?? null,
|
|
269
|
+
deviceProfile: deviceProfile ?? null,
|
|
270
|
+
fingerprint: fingerprint ?? null,
|
|
271
|
+
cacheKey: cacheKey ?? null,
|
|
272
|
+
variant: variant ?? null,
|
|
273
|
+
metroPort: metroPort ?? null,
|
|
274
|
+
cacheHit: cacheLevel(cacheHit),
|
|
275
|
+
cacheSkipped: Boolean(cacheSkipped),
|
|
276
|
+
buildMachine,
|
|
277
|
+
...builtOn ? { builtOn } : {},
|
|
278
|
+
...offloadedTo ? { offloadedTo } : {},
|
|
279
|
+
...offloadFallback ? { offloadFallback } : {},
|
|
280
|
+
waitedForBuild: waitedForBuild ? {
|
|
281
|
+
pid: waitedForBuild.pid ?? null,
|
|
282
|
+
ms: waitedForBuild.ms ?? 0
|
|
283
|
+
} : null,
|
|
284
|
+
appPath: appPath ?? null,
|
|
285
|
+
bundleId: bundleId ?? null,
|
|
286
|
+
installSkipped: Boolean(installSkipped),
|
|
287
|
+
launched: launched === "unverified" || launched === "bundling" ? launched : Boolean(launched),
|
|
288
|
+
ccache,
|
|
289
|
+
debugHttpHost: debugHttpHost ?? null,
|
|
290
|
+
debugHttpHostNote: debugHttpHostNote ?? null,
|
|
291
|
+
devClientUrl: devClientUrl ?? null,
|
|
292
|
+
logs: logs ?? null,
|
|
293
|
+
...root && !host ? { agentDevice: { stateDir: workspaceAgentDeviceDir(root) } } : {},
|
|
294
|
+
durationMs: typeof durationMs === "number" && Number.isFinite(durationMs) ? durationMs : null,
|
|
295
|
+
...lease === void 0 ? {} : { lease },
|
|
296
|
+
...devServer ? { devServer } : {}
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function lastBuildRecord({ devicePlacement, fingerprint, cacheKey, cacheHit, cacheSkipped = false, durationMs, appPath, bundleId, startedAt, status, errorCode = null, avdName = null, deviceName = null, missReason = null, diagnostics = null, configuration = null, buildMachine = "auto", builtOn, offloadedTo = null, offloadFallback = null }) {
|
|
300
|
+
const record = {
|
|
301
|
+
platform: PLATFORM,
|
|
302
|
+
avdName: avdName ?? null,
|
|
303
|
+
deviceName: deviceName ?? avdName ?? null,
|
|
304
|
+
fingerprint: fingerprint ?? null,
|
|
305
|
+
cacheKey: cacheKey ?? null,
|
|
306
|
+
cacheHit: cacheLevel(cacheHit),
|
|
307
|
+
cacheSkipped: Boolean(cacheSkipped),
|
|
308
|
+
durationMs: Number.isFinite(durationMs) ? durationMs : null,
|
|
309
|
+
appPath: appPath ?? null,
|
|
310
|
+
bundleId: bundleId ?? null,
|
|
311
|
+
startedAt,
|
|
312
|
+
status,
|
|
313
|
+
configuration: configuration ?? null
|
|
314
|
+
};
|
|
315
|
+
if (errorCode) record.errorCode = errorCode;
|
|
316
|
+
if (devicePlacement) record.devicePlacement = devicePlacement;
|
|
317
|
+
record.buildMachine = buildMachine;
|
|
318
|
+
if (builtOn) record.builtOn = builtOn;
|
|
319
|
+
if (offloadedTo) record.offloadedTo = offloadedTo;
|
|
320
|
+
if (offloadFallback) record.offloadFallback = offloadFallback;
|
|
321
|
+
if (missReason && !cacheLevel(cacheHit)) record.missReason = missReason;
|
|
322
|
+
const recorded = status === "failed" ? buildDiagnostics(diagnostics) : [];
|
|
323
|
+
if (recorded.length) record.diagnostics = recorded;
|
|
324
|
+
return record;
|
|
325
|
+
}
|
|
326
|
+
async function finishAndroidUpload(uploadPending, remote, phase) {
|
|
327
|
+
if (!uploadPending) return false;
|
|
328
|
+
const upload = await uploadPending;
|
|
329
|
+
if (upload?.uploaded) phase("cache", `uploaded (${remote?.name})`);
|
|
330
|
+
else if (upload?.timedOut) {
|
|
331
|
+
phase("cache", chalk.yellow(`${remote?.name} upload still running after ${formatDuration(UPLOAD_TIMEOUT_MS)}; not waiting`));
|
|
332
|
+
return true;
|
|
333
|
+
} else if (upload?.failed) {
|
|
334
|
+
const authNote = remote?.name === "eas" && isEasAuthFailureText(upload.failed) ? easAuthNote({
|
|
335
|
+
code: "logged-out",
|
|
336
|
+
reason: upload.failed,
|
|
337
|
+
phase: "upload"
|
|
338
|
+
}) : null;
|
|
339
|
+
phase("cache", chalk.yellow(authNote || `${remote?.name} upload failed: ${upload.failed}`));
|
|
340
|
+
}
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
function reportAndroidResult({ host, root, slot, json, useBuildCache, variant, release, runtimeKind = release ? "embedded-js" : "metro", metroCheck, metroPort, logsDir, serial, apkPath, androidPackage, installSkipped, record, waitedForBuild, remote, providerName, launchState, launchWarning, launched, ccache, durationMs, writer, emit, out, lease, recordRun, reclaimed = [], devServer = null, links }) {
|
|
344
|
+
const offloadedTo = record.offloadedTo ?? null;
|
|
345
|
+
recordRun({
|
|
346
|
+
failed: false,
|
|
347
|
+
cacheHit: cacheLevel(record.cacheHit),
|
|
348
|
+
waited: waitedForBuild,
|
|
349
|
+
durationMs,
|
|
350
|
+
offloadedTo
|
|
351
|
+
});
|
|
352
|
+
const facts = androidFacts({
|
|
353
|
+
host,
|
|
354
|
+
root,
|
|
355
|
+
slot,
|
|
356
|
+
serial,
|
|
357
|
+
avdName: record.avdName,
|
|
358
|
+
deviceName: record.deviceName,
|
|
359
|
+
systemImage: record.systemImage,
|
|
360
|
+
deviceProfile: record.deviceProfile,
|
|
361
|
+
debugHttpHost: launched.debugHttpHost ?? null,
|
|
362
|
+
debugHttpHostNote: launched.debugHttpHostNote ?? null,
|
|
363
|
+
devClientUrl: launched.devClientUrl ?? null,
|
|
364
|
+
fingerprint: record.fingerprint,
|
|
365
|
+
cacheKey: record.cacheKey,
|
|
366
|
+
variant,
|
|
367
|
+
metroPort,
|
|
368
|
+
cacheHit: record.cacheHit,
|
|
369
|
+
cacheSkipped: record.cacheSkipped || !useBuildCache,
|
|
370
|
+
waitedForBuild,
|
|
371
|
+
appPath: apkPath,
|
|
372
|
+
bundleId: androidPackage,
|
|
373
|
+
installSkipped,
|
|
374
|
+
launched: launchState,
|
|
375
|
+
ccache,
|
|
376
|
+
logs: logsDir,
|
|
377
|
+
durationMs,
|
|
378
|
+
lease,
|
|
379
|
+
devServer,
|
|
380
|
+
buildMachine: record.buildMachine,
|
|
381
|
+
builtOn: record.builtOn ?? void 0,
|
|
382
|
+
offloadedTo,
|
|
383
|
+
offloadFallback: record.offloadFallback ?? null
|
|
384
|
+
});
|
|
385
|
+
writer.close();
|
|
386
|
+
if (record.devicePlacement) facts.devicePlacement = record.devicePlacement;
|
|
387
|
+
if (json) emit(JSON.stringify({
|
|
388
|
+
...facts,
|
|
389
|
+
...links ? { links } : {},
|
|
390
|
+
...reclaimed.length ? { reclaimed } : {}
|
|
391
|
+
}));
|
|
392
|
+
else {
|
|
393
|
+
const summary = `${launchWarning ? "WARNING" : "OK"}: ${androidPackage} launched on ${host ? `${host.device?.name ?? "Android emulator"} on ${host.machine}` : serial}, ${runtimeKind === "process" ? `${variant ?? "debug"} (native process, no Metro)` : runtimeKind === "embedded-js" ? `${variant} (embedded JS, no Metro)` : `Metro port ${metroPort}`} (${cacheOutcome(record.cacheHit, remote?.name ?? providerName, offloadedTo)})`;
|
|
394
|
+
const outcome = launchWarning ? chalk.yellow(`${summary} -- ${launchWarning}`) : launchState === "unverified" ? chalk.yellow(`${summary} -- launch UNVERIFIED`) : launchState === "bundling" ? chalk.green(`${summary} -- bundle requested, still building`) : chalk.green(summary);
|
|
395
|
+
const deviceName = record.avdName || record.deviceName || serial;
|
|
396
|
+
const cacheResult = useBuildCache ? cacheOutcome(record.cacheHit, remote?.name ?? providerName, offloadedTo) : `bypassed; ${cacheOutcome(false, null, offloadedTo)}`;
|
|
397
|
+
const metroResult = runtimeKind === "process" ? "native process (no Metro)" : runtimeKind === "embedded-js" ? `embedded (${variant})` : !metroCheck ? `check skipped on port ${metroPort}` : launchState === "unverified" ? `state unverified on port ${metroPort}` : `running on port ${metroPort}${devServer ? ` (started: ${devServer.reason})` : ""}`;
|
|
398
|
+
emit([
|
|
399
|
+
outcome,
|
|
400
|
+
phaseLine("device", host ? `${deviceName} on ${host.machine}` : `${deviceName} (${serial})`),
|
|
401
|
+
phaseLine("app", androidPackage),
|
|
402
|
+
phaseLine(runtimeKind === "process" ? "runtime" : "metro", metroResult),
|
|
403
|
+
phaseLine("cache", cacheResult),
|
|
404
|
+
...ccache.status === "not-run" ? [phaseLine("compilation cache", ccacheActivityLine(ccache))] : [],
|
|
405
|
+
phaseLine("logs", logsDir || "unavailable (remote device)"),
|
|
406
|
+
...!host ? [phaseLine("agent-device", `AGENT_DEVICE_STATE_DIR=${workspaceAgentDeviceDir(root)}`)] : []
|
|
407
|
+
].join("\n"));
|
|
408
|
+
if (links) out(chalk.dim(workspaceLinkLine(links)));
|
|
409
|
+
}
|
|
410
|
+
return facts;
|
|
411
|
+
}
|
|
412
|
+
function cacheOutcome(cacheHit, providerName = null, offloadedTo = null) {
|
|
413
|
+
if (cacheHit === "remote") return `cache hit from ${providerName || "the remote cache"}`;
|
|
414
|
+
if (cacheHit === "local") return "cache hit";
|
|
415
|
+
return offloadedTo ? `built on ${offloadedTo}` : "built";
|
|
416
|
+
}
|
|
417
|
+
function persistLastBuild({ recordBuild = recordFinishedBuild, root, record, startedAt, durationMs, status, errorCode = null, diagnostics = null, out }) {
|
|
418
|
+
const lastBuild = lastBuildRecord({
|
|
419
|
+
...record,
|
|
420
|
+
startedAt,
|
|
421
|
+
durationMs,
|
|
422
|
+
status,
|
|
423
|
+
errorCode,
|
|
424
|
+
diagnostics
|
|
425
|
+
});
|
|
426
|
+
try {
|
|
427
|
+
recordBuild(root, lastBuild);
|
|
428
|
+
} catch (err) {
|
|
429
|
+
out(phaseLine("state", chalk.yellow(`could not record lastBuild: ${err?.message || err}`)));
|
|
430
|
+
}
|
|
431
|
+
return lastBuild;
|
|
432
|
+
}
|
|
433
|
+
//#endregion
|
|
434
|
+
export { reportAndroidResult as a, resolveAndroidRunPlan as c, persistLastBuild as i, finishAndroidUpload as n, androidDeviceSelectorRefusal as o, lastBuildRecord as r, resolveAndroidBuildPlan as s, androidFacts as t };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as createNdjsonWriter } from "./ndjson-
|
|
4
|
-
import { a as macosRuntimeClaim, i as macosProcess, r as macosLogFile, s as updateMacosRecord } from "./state-CG_OFoaA.mjs";
|
|
5
|
-
import { readMacosRecord } from "@stim-cli/core/state";
|
|
1
|
+
import { f as ownership_claim_exports, p as process_identity_exports, t as getExecutor } from "./exec-_UbtCQcG.mjs";
|
|
2
|
+
import { a as macosRuntimeClaim, i as macosProcess, r as macosLogFile, s as updateMacosRecord } from "./state-XMziexv2.mjs";
|
|
3
|
+
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
6
4
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
5
|
+
import { readMacosRecord } from "@stim-cli/core/state";
|
|
7
6
|
import { StringDecoder } from "node:string_decoder";
|
|
8
7
|
//#region src/macos/run.ts
|
|
9
8
|
function logLines(stream, write) {
|