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,48 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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 {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
1
|
+
import { d as withDrainingCancellation } from "./exec-_UbtCQcG.mjs";
|
|
2
|
+
import { d as workspaceDir, m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
+
import { E as upsertProject, p as getProject, u as getConcurrencyLimits } from "./config-CYcBF478.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-B1UrjZHL.mjs";
|
|
5
|
+
import { i as recordWorkspaceUse } from "./workspace-state-Cjuigeeu.mjs";
|
|
6
|
+
import { $t as cancelledError, G as resolveCacheProviderConfig, J as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, en as throwIfCancelled } from "./settings-CsJDEXgK.mjs";
|
|
7
|
+
import { f as projectRegistry, v as detectIsExpo } from "./project-BZNjmW_8.mjs";
|
|
8
|
+
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
9
|
+
import { B as recordFinishedBuild, Bn as checkEasAuth, H as tapBuildLog, J as recordRunStats, Jn as resolveRemote, U as createRunRecorder, V as startBuildProgress, W as readRunEstimates, Y as statsProjectKey, Yn as uploadRemote } from "./budget-Bs6SxxzO.mjs";
|
|
10
|
+
import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-DY_RLx3C.mjs";
|
|
11
|
+
import { F as acquireBuildSlot, L as releaseBuildSlot } from "./workspaces-BccMFmGQ.mjs";
|
|
12
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BzVfHSrY.mjs";
|
|
13
|
+
import { p as providerUploadOutcome } from "./build-cache-DmyR9Zzc.mjs";
|
|
14
|
+
import { O as hostSystemImageArch } from "./android-DUYkNF4u.mjs";
|
|
15
|
+
import { m as listIosRuntimes } from "./ios-CpByZy12.mjs";
|
|
16
|
+
import { s as workspaceShareURL } from "./stim-desktop-C12we7lz.mjs";
|
|
17
|
+
import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-ccaPc4ox.mjs";
|
|
18
|
+
import { p as readBundleId } from "./xcode-Zlx3qjEs.mjs";
|
|
19
|
+
import { f as setRemoteLogSink } from "./client-UXD70ZbM.mjs";
|
|
20
|
+
import { s as resolveBuildPlacement } from "./selection-CSl9i5qU.mjs";
|
|
21
|
+
import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-Dlu37g6H.mjs";
|
|
22
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-Dg1Q7tfF.mjs";
|
|
23
|
+
import { t as acquireAndroidArtifact } from "./artifact-DAuZ-FNU.mjs";
|
|
24
|
+
import { i as persistLastBuild, n as finishAndroidUpload, s as resolveAndroidBuildPlan } from "./result-DNiS-tTP.mjs";
|
|
25
|
+
import { a as lastBuildRecord } from "./ios-project-WuwwBdvW.mjs";
|
|
26
|
+
import { t as acquireIosArtifact } from "./artifact-B8T3S5gi.mjs";
|
|
27
|
+
import { constants, promises } from "node:fs";
|
|
26
28
|
import { basename, join } from "node:path";
|
|
27
|
-
import { loadCacheProvider } from "@stim-cli/cache";
|
|
28
29
|
import { hostSimulatorArch } from "@stim-cli/core";
|
|
30
|
+
import { loadCacheProvider } from "@stim-cli/cache";
|
|
29
31
|
//#region src/commands/android/build.ts
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
async function buildAndroidOperation(context, root, options, { cacheArtifacts = true } = {}) {
|
|
33
|
+
const note = (line) => context.output("stderr", `${line}\n`);
|
|
32
34
|
const selected = projectRegistry.selectAndroid(root);
|
|
33
35
|
if ("problem" in selected) throw Object.assign(new Error(selected.problem.message), {
|
|
34
36
|
code: "STIM_NO_PROJECT",
|
|
35
37
|
remedy: selected.problem.remedy
|
|
36
38
|
});
|
|
37
|
-
const { context: settingsContext, settings } =
|
|
39
|
+
const { context: settingsContext, settings } = await resolveProjectSettingsAsync(root, {
|
|
40
|
+
env: context.env,
|
|
41
|
+
signal: runCancellationSignal(context) ?? context.signal
|
|
42
|
+
});
|
|
38
43
|
const integration = await selected.load({
|
|
39
44
|
context: settingsContext,
|
|
40
45
|
settings
|
|
41
46
|
});
|
|
42
|
-
const phase = (label, line) => note
|
|
47
|
+
const phase = (label, line) => note(phaseLine(label, line));
|
|
43
48
|
const plan = resolveAndroidBuildPlan({
|
|
44
49
|
settings,
|
|
45
50
|
settingsContext,
|
|
51
|
+
env: context.env,
|
|
46
52
|
variant: options.variant ?? null,
|
|
47
53
|
buildCache: options.buildCache !== false
|
|
48
54
|
}, {
|
|
@@ -62,13 +68,13 @@ async function buildAndroidOperation(root, options) {
|
|
|
62
68
|
"all"
|
|
63
69
|
].includes(options.abi)) throw Object.assign(/* @__PURE__ */ new Error("Android build abi must be arm64-v8a, armeabi-v7a, x86, x86_64 or all."), { code: "STIM_BAD_ARG" });
|
|
64
70
|
const abi = options.abi === "all" ? null : options.abi ?? (plan.plan.build.targetAbiOnly && !plan.plan.build.release ? hostSystemImageArch() : null);
|
|
65
|
-
await ensureWorkspaceStorageSafely(root, { note
|
|
66
|
-
return withNativeBuildRun(root, {
|
|
71
|
+
await ensureWorkspaceStorageSafely(root, { note });
|
|
72
|
+
return withDrainingCancellation(context, context.signal, () => withNativeBuildRun(context, root, {
|
|
67
73
|
command: "build",
|
|
68
74
|
platform: "android"
|
|
69
75
|
}, async (claim) => {
|
|
70
76
|
if (!getProject(root)) upsertProject(root, {});
|
|
71
|
-
recordWorkspaceUse(root);
|
|
77
|
+
recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
|
|
72
78
|
const started = Date.now();
|
|
73
79
|
const startedAt = new Date(started).toISOString();
|
|
74
80
|
const progress = startBuildProgress({
|
|
@@ -76,7 +82,7 @@ async function buildAndroidOperation(root, options) {
|
|
|
76
82
|
platform: "android",
|
|
77
83
|
slot: "default",
|
|
78
84
|
claim,
|
|
79
|
-
note
|
|
85
|
+
note
|
|
80
86
|
});
|
|
81
87
|
const logs = workspaceLogsDir(root);
|
|
82
88
|
const buildLog = join(logs, "build-artifact-android.ndjson");
|
|
@@ -84,7 +90,7 @@ async function buildAndroidOperation(root, options) {
|
|
|
84
90
|
truncate: true,
|
|
85
91
|
fields: { platform: "android" }
|
|
86
92
|
}), progress);
|
|
87
|
-
setRemoteLogSink((entry) => writer.write(entry));
|
|
93
|
+
setRemoteLogSink(context, (entry) => writer.write(entry));
|
|
88
94
|
const projectKey = statsProjectKey({
|
|
89
95
|
root,
|
|
90
96
|
commonDir: settingsContext.gitCommonDir,
|
|
@@ -94,7 +100,7 @@ async function buildAndroidOperation(root, options) {
|
|
|
94
100
|
platform: "android",
|
|
95
101
|
write: recordRunStats,
|
|
96
102
|
now: Date.now,
|
|
97
|
-
note
|
|
103
|
+
note,
|
|
98
104
|
phases: () => progress.durations(),
|
|
99
105
|
deviceSetup: () => false
|
|
100
106
|
});
|
|
@@ -106,7 +112,8 @@ async function buildAndroidOperation(root, options) {
|
|
|
106
112
|
};
|
|
107
113
|
let artifact;
|
|
108
114
|
let directory;
|
|
109
|
-
let
|
|
115
|
+
let built = null;
|
|
116
|
+
let failureAfterCleanup = null;
|
|
110
117
|
const finishRecord = (status, errorCode) => persistLastBuild({
|
|
111
118
|
root,
|
|
112
119
|
record,
|
|
@@ -114,15 +121,18 @@ async function buildAndroidOperation(root, options) {
|
|
|
114
121
|
durationMs: Date.now() - started,
|
|
115
122
|
status,
|
|
116
123
|
errorCode,
|
|
117
|
-
out: note
|
|
124
|
+
out: note,
|
|
118
125
|
recordBuild: (at, entry) => recordFinishedBuild(at, entry, { artifactOnly: true })
|
|
119
126
|
});
|
|
120
127
|
try {
|
|
121
128
|
const acquired = await acquireAndroidArtifact({
|
|
129
|
+
context,
|
|
122
130
|
root,
|
|
123
131
|
buildLog,
|
|
124
132
|
writer,
|
|
125
133
|
recipe: integration.artifact({
|
|
134
|
+
operation: context,
|
|
135
|
+
cacheArtifacts,
|
|
126
136
|
root,
|
|
127
137
|
buildLog,
|
|
128
138
|
writer,
|
|
@@ -130,7 +140,7 @@ async function buildAndroidOperation(root, options) {
|
|
|
130
140
|
buildPlan: plan.plan.build,
|
|
131
141
|
target: { abi },
|
|
132
142
|
phase,
|
|
133
|
-
out: note
|
|
143
|
+
out: note,
|
|
134
144
|
step: progress.step,
|
|
135
145
|
estimates: () => readRunEstimates({
|
|
136
146
|
projectKey,
|
|
@@ -142,12 +152,12 @@ async function buildAndroidOperation(root, options) {
|
|
|
142
152
|
cacheProviderConfig: plan.plan.cacheProviderConfig,
|
|
143
153
|
requestedBuildCache: options.buildCache !== false,
|
|
144
154
|
easBuild: null,
|
|
145
|
-
androidPackage: integration.appIds().androidPackage,
|
|
155
|
+
androidPackage: (await integration.appIds()).androidPackage,
|
|
146
156
|
record,
|
|
147
157
|
maxBuilds: getConcurrencyLimits().maxBuilds,
|
|
148
158
|
progress: {
|
|
149
159
|
phase,
|
|
150
|
-
out: note
|
|
160
|
+
out: note,
|
|
151
161
|
stats,
|
|
152
162
|
step: progress.step,
|
|
153
163
|
miss: progress.miss,
|
|
@@ -170,29 +180,22 @@ async function buildAndroidOperation(root, options) {
|
|
|
170
180
|
});
|
|
171
181
|
if (!acquired.ok) throw Object.assign(new Error(acquired.failure.message ?? "Android build failed."), acquired.failure, { details: acquired.failure.extra });
|
|
172
182
|
artifact = acquired.artifact;
|
|
173
|
-
throwIfCancelled(runCancellationSignal(), "Android build");
|
|
183
|
+
throwIfCancelled(runCancellationSignal(context), "Android build");
|
|
174
184
|
if (!artifact.apkPath) throw Object.assign(/* @__PURE__ */ new Error("The Android build produced no APK."), { code: "STIM_BUILD_FAILED" });
|
|
175
185
|
const artifacts = join(workspaceDir(root), "artifacts");
|
|
176
|
-
|
|
177
|
-
directory =
|
|
186
|
+
await promises.mkdir(artifacts, { recursive: true });
|
|
187
|
+
directory = await promises.mkdtemp(join(artifacts, "android-"));
|
|
178
188
|
const apkPath = join(directory, "app.apk");
|
|
179
|
-
|
|
189
|
+
await promises.copyFile(artifact.apkPath, apkPath, constants.COPYFILE_FICLONE);
|
|
190
|
+
throwIfCancelled(runCancellationSignal(context), "Android build");
|
|
180
191
|
await finishAndroidUpload(artifact.uploadPending, artifact.remote, phase);
|
|
181
|
-
const uploaded = providerUploadOutcome(artifact.providerUpload ? await artifact.providerUpload : null, artifact.providerName);
|
|
192
|
+
const uploaded = providerUploadOutcome(artifact.providerUpload ? await artifact.providerUpload : null, artifact.providerName, context.env);
|
|
182
193
|
if (uploaded) phase("cache", uploaded.line);
|
|
183
|
-
|
|
194
|
+
const links = { workspace: await workspaceShareURL(root, { platform: "android" }, runCancellationSignal(context) ?? context.signal) };
|
|
195
|
+
throwIfCancelled(runCancellationSignal(context), "Android build");
|
|
184
196
|
record.appPath = apkPath;
|
|
185
197
|
record.bundleId = artifact.androidPackage;
|
|
186
|
-
|
|
187
|
-
stats.record({
|
|
188
|
-
failed: false,
|
|
189
|
-
cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
|
|
190
|
-
durationMs: Date.now() - started,
|
|
191
|
-
offloadedTo: record.offloadedTo,
|
|
192
|
-
waited: artifact.waitedForBuild
|
|
193
|
-
});
|
|
194
|
-
succeeded = true;
|
|
195
|
-
return {
|
|
198
|
+
built = {
|
|
196
199
|
apkPath,
|
|
197
200
|
androidPackage: artifact.androidPackage,
|
|
198
201
|
variant: plan.plan.build.variant ?? "debug",
|
|
@@ -204,10 +207,11 @@ async function buildAndroidOperation(root, options) {
|
|
|
204
207
|
builtOn: record.builtOn ?? null,
|
|
205
208
|
ccache: artifact.ccache,
|
|
206
209
|
durationMs: Date.now() - started,
|
|
207
|
-
logs: { dir: logs }
|
|
210
|
+
logs: { dir: logs },
|
|
211
|
+
links
|
|
208
212
|
};
|
|
209
213
|
} catch (error) {
|
|
210
|
-
const failure = runCancellationSignal()?.aborted ? cancelledError("Android build", error) : error;
|
|
214
|
+
const failure = runCancellationSignal(context)?.aborted ? cancelledError("Android build", error) : error;
|
|
211
215
|
finishRecord("failed", failure.code);
|
|
212
216
|
stats.record({
|
|
213
217
|
failed: true,
|
|
@@ -215,33 +219,56 @@ async function buildAndroidOperation(root, options) {
|
|
|
215
219
|
});
|
|
216
220
|
throw failure;
|
|
217
221
|
} finally {
|
|
218
|
-
artifact?.release();
|
|
219
|
-
|
|
222
|
+
await artifact?.release();
|
|
223
|
+
failureAfterCleanup = built && runCancellationSignal(context)?.aborted ? cancelledError("Android build") : null;
|
|
224
|
+
if (failureAfterCleanup) {
|
|
225
|
+
finishRecord("failed", failureAfterCleanup.code);
|
|
226
|
+
stats.record({
|
|
227
|
+
failed: true,
|
|
228
|
+
durationMs: Date.now() - started
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
if ((!built || failureAfterCleanup) && directory) await promises.rm(directory, {
|
|
220
232
|
recursive: true,
|
|
221
233
|
force: true
|
|
222
234
|
});
|
|
235
|
+
if (built && !failureAfterCleanup) {
|
|
236
|
+
finishRecord("ok");
|
|
237
|
+
stats.record({
|
|
238
|
+
failed: false,
|
|
239
|
+
cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
|
|
240
|
+
durationMs: Date.now() - started,
|
|
241
|
+
offloadedTo: record.offloadedTo,
|
|
242
|
+
waited: artifact?.waitedForBuild
|
|
243
|
+
});
|
|
244
|
+
}
|
|
223
245
|
writer.close();
|
|
224
246
|
progress.clear();
|
|
225
247
|
}
|
|
226
|
-
|
|
248
|
+
if (failureAfterCleanup) throw failureAfterCleanup;
|
|
249
|
+
return built;
|
|
250
|
+
}, { write: (line) => phase("lock", line) }));
|
|
227
251
|
}
|
|
228
252
|
//#endregion
|
|
229
253
|
//#region src/commands/ios/build.ts
|
|
230
|
-
|
|
231
|
-
|
|
254
|
+
async function buildIosOperation(context, root, options) {
|
|
255
|
+
const note = (line) => context.output("stderr", `${line}\n`);
|
|
232
256
|
const selected = projectRegistry.selectIos(root);
|
|
233
257
|
if ("problem" in selected) throw Object.assign(new Error(selected.problem.message), {
|
|
234
258
|
code: "STIM_NO_PROJECT",
|
|
235
259
|
remedy: selected.problem.remedy
|
|
236
260
|
});
|
|
237
|
-
const { context, settings } =
|
|
261
|
+
const { context: settingsContext, settings } = await resolveProjectSettingsAsync(root, {
|
|
262
|
+
env: context.env,
|
|
263
|
+
signal: runCancellationSignal(context) ?? context.signal
|
|
264
|
+
});
|
|
238
265
|
const projectPathError = iosProjectPathError(settings, root, () => detectIsExpo(root));
|
|
239
266
|
if (projectPathError) throw Object.assign(new Error(projectPathError), {
|
|
240
267
|
code: "STIM_BAD_ARG",
|
|
241
268
|
remedy: SETTING_SHAPE_REMEDY
|
|
242
269
|
});
|
|
243
270
|
const integration = await selected.load(settings);
|
|
244
|
-
const setup = resolveIosBuildSetup(options.remoteBuild, settings, (label, message) => note(phaseLine(label, message)));
|
|
271
|
+
const setup = resolveIosBuildSetup(options.remoteBuild, settings, (label, message) => note(phaseLine(label, message)), context.env);
|
|
245
272
|
if (!setup.ok) {
|
|
246
273
|
const { failure } = setup;
|
|
247
274
|
throw Object.assign(new Error(failure.message ?? failure.code), failure, { details: failure });
|
|
@@ -249,7 +276,7 @@ async function buildIosOperation(root, options) {
|
|
|
249
276
|
const { buildMachine, optimizations } = setup;
|
|
250
277
|
const configuration = resolveConfiguration(options.configuration, settings);
|
|
251
278
|
const buildScheme = resolveSchemeSelection(options, settings);
|
|
252
|
-
const problem = integration.schemeProblem(buildScheme, configuration);
|
|
279
|
+
const problem = await integration.schemeProblem(buildScheme, configuration);
|
|
253
280
|
if (problem) throw Object.assign(new Error(problem.message ?? problem.code), problem);
|
|
254
281
|
if (options.arch !== void 0 && ![
|
|
255
282
|
"arm64",
|
|
@@ -265,12 +292,12 @@ async function buildIosOperation(root, options) {
|
|
|
265
292
|
const cache = artifactCachePolicy(optimizations, options.buildCache !== false, integration.runtimeKind(configuration) === "embedded-js");
|
|
266
293
|
const phase = (label, line) => note(phaseLine(label, line));
|
|
267
294
|
await ensureWorkspaceStorageSafely(root, { note });
|
|
268
|
-
return withNativeBuildRun(root, {
|
|
295
|
+
return withDrainingCancellation(context, context.signal, () => withNativeBuildRun(context, root, {
|
|
269
296
|
command: "build",
|
|
270
297
|
platform: "ios"
|
|
271
298
|
}, async (claim) => {
|
|
272
299
|
if (!getProject(root)) upsertProject(root, {});
|
|
273
|
-
recordWorkspaceUse(root);
|
|
300
|
+
recordWorkspaceUse(root, /* @__PURE__ */ new Date(), context.env, context.cwd);
|
|
274
301
|
const started = Date.now();
|
|
275
302
|
const startedAt = new Date(started).toISOString();
|
|
276
303
|
const progress = startBuildProgress({
|
|
@@ -286,11 +313,11 @@ async function buildIosOperation(root, options) {
|
|
|
286
313
|
truncate: true,
|
|
287
314
|
fields: { platform: "ios" }
|
|
288
315
|
}), progress);
|
|
289
|
-
setRemoteLogSink((entry) => writer.write(entry));
|
|
316
|
+
setRemoteLogSink(context, (entry) => writer.write(entry));
|
|
290
317
|
const projectKey = statsProjectKey({
|
|
291
318
|
root,
|
|
292
|
-
commonDir:
|
|
293
|
-
repoRoot:
|
|
319
|
+
commonDir: settingsContext.gitCommonDir,
|
|
320
|
+
repoRoot: settingsContext.repoRoot
|
|
294
321
|
});
|
|
295
322
|
const stats = createRunRecorder({
|
|
296
323
|
platform: "ios",
|
|
@@ -304,7 +331,8 @@ async function buildIosOperation(root, options) {
|
|
|
304
331
|
progress.estimate(projectKey);
|
|
305
332
|
let artifact;
|
|
306
333
|
let directory;
|
|
307
|
-
let
|
|
334
|
+
let built = null;
|
|
335
|
+
let failureAfterCleanup = null;
|
|
308
336
|
const finish = (status, appPath, errorCode) => {
|
|
309
337
|
try {
|
|
310
338
|
recordFinishedBuild(root, lastBuildRecord({
|
|
@@ -330,12 +358,14 @@ async function buildIosOperation(root, options) {
|
|
|
330
358
|
};
|
|
331
359
|
try {
|
|
332
360
|
const acquired = await acquireIosArtifact({
|
|
361
|
+
context,
|
|
333
362
|
root,
|
|
334
363
|
logFile,
|
|
335
364
|
configuration,
|
|
336
365
|
buildMachine,
|
|
337
366
|
physical: false,
|
|
338
367
|
recipe: integration.artifact({
|
|
368
|
+
operation: context,
|
|
339
369
|
root,
|
|
340
370
|
logFile,
|
|
341
371
|
configuration,
|
|
@@ -366,7 +396,7 @@ async function buildIosOperation(root, options) {
|
|
|
366
396
|
}),
|
|
367
397
|
cache: {
|
|
368
398
|
policy: cache,
|
|
369
|
-
providerConfig: resolveCacheProviderConfig(
|
|
399
|
+
providerConfig: resolveCacheProviderConfig(settingsContext),
|
|
370
400
|
disabledByFlag: options.buildCache === false
|
|
371
401
|
},
|
|
372
402
|
easBuild: null,
|
|
@@ -397,29 +427,26 @@ async function buildIosOperation(root, options) {
|
|
|
397
427
|
});
|
|
398
428
|
if (!acquired.ok) throw Object.assign(new Error(acquired.failure.message ?? "The iOS build failed."), acquired.failure);
|
|
399
429
|
artifact = acquired.artifact;
|
|
400
|
-
artifact.bundleId ??= readBundleId(artifact.path) ?? integration.bundleId();
|
|
401
|
-
throwIfCancelled(runCancellationSignal(), "iOS build");
|
|
430
|
+
artifact.bundleId ??= await readBundleId(artifact.path) ?? await integration.bundleId();
|
|
431
|
+
throwIfCancelled(runCancellationSignal(context), "iOS build");
|
|
402
432
|
const artifacts = join(workspaceDir(root), "artifacts");
|
|
403
|
-
|
|
404
|
-
directory =
|
|
433
|
+
await promises.mkdir(artifacts, { recursive: true });
|
|
434
|
+
directory = await promises.mkdtemp(join(artifacts, "ios-"));
|
|
405
435
|
const appPath = join(directory, basename(artifact.path));
|
|
406
|
-
|
|
436
|
+
await promises.cp(artifact.path, appPath, {
|
|
407
437
|
recursive: true,
|
|
408
438
|
verbatimSymlinks: true,
|
|
409
|
-
mode: constants.COPYFILE_FICLONE
|
|
439
|
+
mode: constants.COPYFILE_FICLONE,
|
|
440
|
+
filter: () => {
|
|
441
|
+
throwIfCancelled(runCancellationSignal(context), "iOS build");
|
|
442
|
+
return true;
|
|
443
|
+
}
|
|
410
444
|
});
|
|
445
|
+
throwIfCancelled(runCancellationSignal(context), "iOS build");
|
|
411
446
|
await artifact.completeUploads();
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
failed: false,
|
|
416
|
-
durationMs: Date.now() - started,
|
|
417
|
-
cacheHit: artifact.cache.hit === "local" || artifact.cache.hit === "remote" ? artifact.cache.hit : false,
|
|
418
|
-
offloadedTo: artifact.cache.offloadedTo,
|
|
419
|
-
waited: artifact.cache.waitedForBuild
|
|
420
|
-
});
|
|
421
|
-
succeeded = true;
|
|
422
|
-
return {
|
|
447
|
+
const links = { workspace: await workspaceShareURL(root, { platform: "ios" }, runCancellationSignal(context) ?? context.signal) };
|
|
448
|
+
throwIfCancelled(runCancellationSignal(context), "iOS build");
|
|
449
|
+
built = {
|
|
423
450
|
appPath,
|
|
424
451
|
bundleId: artifact.bundleId,
|
|
425
452
|
configuration: configuration ?? "Debug",
|
|
@@ -432,10 +459,11 @@ async function buildIosOperation(root, options) {
|
|
|
432
459
|
builtOn: artifact.cache.builtOn ?? null,
|
|
433
460
|
compilationCache: artifact.cache.compilation,
|
|
434
461
|
durationMs: Date.now() - started,
|
|
435
|
-
logs: { dir: logs }
|
|
462
|
+
logs: { dir: logs },
|
|
463
|
+
links
|
|
436
464
|
};
|
|
437
465
|
} catch (error) {
|
|
438
|
-
const failure = runCancellationSignal()?.aborted ? cancelledError("iOS build", error) : error;
|
|
466
|
+
const failure = runCancellationSignal(context)?.aborted ? cancelledError("iOS build", error) : error;
|
|
439
467
|
finish("failed", void 0, failure.code);
|
|
440
468
|
stats.record({
|
|
441
469
|
failed: true,
|
|
@@ -443,15 +471,35 @@ async function buildIosOperation(root, options) {
|
|
|
443
471
|
});
|
|
444
472
|
throw failure;
|
|
445
473
|
} finally {
|
|
446
|
-
artifact?.release();
|
|
447
|
-
|
|
474
|
+
await artifact?.release();
|
|
475
|
+
failureAfterCleanup = built && runCancellationSignal(context)?.aborted ? cancelledError("iOS build") : null;
|
|
476
|
+
if (failureAfterCleanup) {
|
|
477
|
+
finish("failed", void 0, failureAfterCleanup.code);
|
|
478
|
+
stats.record({
|
|
479
|
+
failed: true,
|
|
480
|
+
durationMs: Date.now() - started
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
if ((!built || failureAfterCleanup) && directory) await promises.rm(directory, {
|
|
448
484
|
recursive: true,
|
|
449
485
|
force: true
|
|
450
486
|
});
|
|
487
|
+
if (built && !failureAfterCleanup) {
|
|
488
|
+
finish("ok", built.appPath);
|
|
489
|
+
stats.record({
|
|
490
|
+
failed: false,
|
|
491
|
+
durationMs: Date.now() - started,
|
|
492
|
+
cacheHit: artifact?.cache.hit === "local" || artifact?.cache.hit === "remote" ? artifact?.cache.hit : false,
|
|
493
|
+
offloadedTo: artifact?.cache.offloadedTo,
|
|
494
|
+
waited: artifact?.cache.waitedForBuild
|
|
495
|
+
});
|
|
496
|
+
}
|
|
451
497
|
writer.close();
|
|
452
498
|
progress.clear();
|
|
453
499
|
}
|
|
454
|
-
|
|
500
|
+
if (failureAfterCleanup) throw failureAfterCleanup;
|
|
501
|
+
return built;
|
|
502
|
+
}, { write: (line) => phase("lock", line) }));
|
|
455
503
|
}
|
|
456
504
|
//#endregion
|
|
457
505
|
export { buildAndroidOperation as n, buildIosOperation as t };
|