stim 1.25.0 → 1.27.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 +1 -1
- package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-BbHS3oV8.mjs → act-ROviTF_t.mjs} +415 -118
- package/dist/{activity-BpjwrQXU.mjs → activity-Cd-ysFes.mjs} +6 -7
- package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CNZgRC-4.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-BGwuK3Mc.mjs → android-Cd6w7_qw.mjs} +134 -57
- package/dist/{android-saBeB4lr.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-Cjcj8MCw.mjs → android-DriNoAVy.mjs} +99 -47
- package/dist/{android-cas-BVqh2Zep.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
- package/dist/api.d.mts +20 -7
- package/dist/api.mjs +42 -32
- package/dist/apk-signed-tail-BHQHx3Rm.mjs +142 -0
- package/dist/{artifact-Co8zixVx.mjs → artifact-0AGJYB9O.mjs} +28 -28
- package/dist/{artifact-DN8JNwqS.mjs → artifact-faemIZv5.mjs} +40 -30
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-CCgZsHmI.mjs → browser-web-slD8AvLp.mjs} +16 -17
- package/dist/{build-cache-CKCzxzxA.mjs → build-cache-gBJ-WKzA.mjs} +141 -37
- package/dist/{build-CAiw8Ezm.mjs → build-hS0QyFlQ.mjs} +38 -31
- package/dist/{build-plan-zCuHGlA8.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-HyShrIpL.mjs → ccache-BWTze1Ls.mjs} +634 -1514
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-C4w607Pz.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-BQsmyp_-.mjs → client-xsdxrhWA.mjs} +77 -116
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BBvS1H6v.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-Cn94Jc0g.mjs} +343 -18
- package/dist/{launch-DscF1QfM.mjs → dependencies-BGokZ-Ng.mjs} +330 -279
- package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-CHoXXZeg.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-F5-4z9ef.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-6LP7QsaA.mjs} +103 -25
- package/dist/device-host-worker.mjs +19 -21
- package/dist/{device-ios-DkHBrmvH.mjs → device-ios-534c14fz.mjs} +288 -28
- package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-BIg8MU8l.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-B9FqTBYW.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-A_Nr_fDe.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-k3P3PizH.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-Bm8TVpGn.mjs → doctor-F-3VUUyN.mjs} +128 -35
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +9 -3
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-CyDKNTBP.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-eaz403W6.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-B9jcnmIk.mjs → gc-CGZ1Yg88.mjs} +218 -72
- package/dist/{guide-DR0K0xW9.mjs → guide-_rfEh_zM.mjs} +839 -222
- package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-D7Pk_Oo1.mjs} +13 -9
- package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-B1gqQuva.mjs} +18 -12
- package/dist/hosted-logs-sync-Dg3qrZmV.mjs +195 -0
- package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CdgaiuyP.mjs} +17 -17
- package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-Cbvo5KEh.mjs} +21 -9
- package/dist/{ios-BRVM8b0P.mjs → ios-B5HlVMhQ.mjs} +138 -55
- package/dist/{ios-Dvt97HgQ.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-BQzvJlzw.mjs → ios-E26qSpkb.mjs} +94 -11
- package/dist/{ios-device-CKSvk0bu.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-DCUDo06I.mjs → ios-project-D8Jcy_br.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-CT9nV5SP.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-D0lPvFFu.mjs → launch-CRyBeNsA.mjs} +53 -44
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-BsIRre8x.mjs → logs-CC_-ZzEE.mjs} +10 -174
- package/dist/{logs-Crs9y34Z.mjs → logs-aJQb-RDg.mjs} +112 -38
- package/dist/{macos-CcUlJPMu.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-D477nfzH.mjs → macos-DlCBhMw5.mjs} +73 -39
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +30 -13
- package/dist/{metro-1pJgCX4U.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-BnHdqMO_.mjs} +3 -4
- package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-BvMizJn1.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-DqaIBO5w.mjs} +9 -9
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -18
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.d.mts +3 -1
- package/dist/offload-worker.mjs +34 -25
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-jxxz-19m.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DjOXJRIH.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-DtS1Amb0.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/prebuild-BDpToDgR.mjs +1246 -0
- package/dist/{project-BiC68mIp.mjs → project-DYj-HVx6.mjs} +17 -18
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-DDBccgJw.mjs} +56 -36
- package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-B-Mw6DcR.mjs} +50 -9
- package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-DjYwUF9U.mjs} +45 -25
- package/dist/{recordings-BaoQ0t-J.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-Beftw2X3.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-FbSgMF8x.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-BuZj6AyU.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-CR2vk2cj.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BtzE09Dl.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-D5cxEl3t.mjs → selection-Bs8phwhN.mjs} +183 -62
- package/dist/{server-bare-CH9X0RLn.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CaBbDNU2.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-Ck8EIidM.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-B5tCoq9N.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-DzH9mGQZ.mjs → settings-CMHhQNwI.mjs} +24 -3
- package/dist/settings-payload-cm60Zhib.mjs +257 -0
- package/dist/settings-write-BdNRLlBn.mjs +185 -0
- package/dist/settings.schema.json +84 -39
- package/dist/{simslim-BjxszUAb.mjs → simslim-DCQwzoPy.mjs} +4 -3
- package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-D8xlRU2D.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C1JLjkNw.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-YMpNwLhh.mjs → start-DrPwER_2.mjs} +27 -23
- package/dist/{state-DMRNP7-4.mjs → state-BX1y5syV.mjs} +4 -5
- package/dist/{state-DPaM3u5K.mjs → state-CZxLyetD.mjs} +2 -3
- package/dist/{stats-CP7STzZw.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-CRLiJ-O_.mjs → status-BfnK9pUd.mjs} +25 -26
- package/dist/{status-cNw6i0_t.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-COP6PQqw.mjs → stop-CH79S3IZ.mjs} +5 -6
- package/dist/{stop-Db9Kh-UA.mjs → stop-D-EAr25B.mjs} +25 -22
- package/dist/{stop-Br7LKxBE.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +17 -18
- package/dist/{support-qKcbgmI5.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-Cxj9CmII.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/toolchain-CbCG6C5Z.mjs +2413 -0
- package/dist/toolchain-JYAOquPg.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-DMou-X7j.mjs} +3 -3
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-C0RsbngN.mjs} +731 -728
- package/dist/{web-B4Yjyt1G.mjs → web-Cq_AQ4DK.mjs} +9 -10
- package/dist/web-Je6abcpz.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-BjqdjnJR.mjs} +46 -8
- package/dist/{workspaces-C9w4aeXF.mjs → workspaces-DFbj07jp.mjs} +1801 -76
- package/dist/{worktree-CclFIe1Z.mjs → worktree-COAJ3-OD.mjs} +934 -511
- package/dist/{worktree-Ct9Gk3KL.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +8 -8
- package/dist/ccache-h1FKhZeg.mjs +0 -143
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/eas-fallback-gaZi-dJL.mjs +0 -381
- package/dist/hosted-ios-RtVcJH3u.mjs +0 -15
- package/dist/native-run-D5OJsGwA.mjs +0 -276
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-JUaqOLpc.mjs +0 -501
- package/dist/server-expo-C16Zf2k7.mjs +0 -2
- package/dist/settings-write-n0zwfohx.mjs +0 -360
- package/dist/toolchain-DB1aeqxO.mjs +0 -2
- package/dist/toolchain-VzLJzZ7O.mjs +0 -908
- package/dist/trigger-BLsHgAGR.mjs +0 -2
- package/dist/web-DS4UDWvf.mjs +0 -2
- package/dist/xcode-CiIIDnuD.mjs +0 -910
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, S as process_identity_exports, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { U as parseDeviceSlotKey, V as deviceSlotKey, d as getConfigDir, q as validateDeviceSlot } from "./config-
|
|
4
|
-
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-
|
|
5
|
-
import { n as runOperationFileQuiet } from "./operation-exec-
|
|
6
|
-
import {
|
|
7
|
-
import { y as resolveBuild } from "./build-cache-CKCzxzxA.mjs";
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { M as withDirLock$1, N as withDirLockAsync$1, c as withWorkspaceStateLock, d as writeWorkspaceState, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { U as parseDeviceSlotKey, V as deviceSlotKey, d as getConfigDir, q as validateDeviceSlot } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { n as runOperationFileQuiet } from "./operation-exec-Dp4FuIGR.mjs";
|
|
6
|
+
import { C as resolveBuild } from "./build-cache-gBJ-WKzA.mjs";
|
|
8
7
|
import { randomBytes } from "node:crypto";
|
|
9
8
|
import { closeSync, fstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
10
9
|
import { homedir } from "node:os";
|
package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as process_identity_exports } from "./exec-
|
|
2
|
-
import { P as formatBytes } from "./config-
|
|
3
|
-
import { o as formatLongDuration } from "./command-output-
|
|
4
|
-
import {
|
|
5
|
-
import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-
|
|
1
|
+
import { S as process_identity_exports } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { P as formatBytes } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { o as formatLongDuration } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { _t as measureDu, gt as canonical, l as listWorkspaceDirs, vt as writeUsageCache } from "./workspaces-DFbj07jp.mjs";
|
|
5
|
+
import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-Cd-ysFes.mjs";
|
|
6
6
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
8
|
import { isAbsolute, join, relative, sep } from "node:path";
|
|
@@ -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
|
|
1
|
+
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-Dj-WT4BP.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-CNg_YsOk.mjs";
|
|
3
|
+
import { r as lastBuildRecord, t as androidFacts } from "./result-CTqBw2Te.mjs";
|
|
4
|
+
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-Cd6w7_qw.mjs";
|
|
5
|
+
import { a as collectorLogFile, o as killPreviousCollector, s as startCollector } from "./launch-CRyBeNsA.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 };
|
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { B as deviceSlotFileKey, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync$1, W as parseDeviceSlotOption, p as getProject, q as validateDeviceSlot, u as getConcurrencyLimits } from "./config-
|
|
4
|
-
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-
|
|
5
|
-
import { a as
|
|
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 { a as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { a as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-
|
|
29
|
-
import { n as devicePlacementRecord } from "./placement-log-
|
|
30
|
-
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-
|
|
31
|
-
import { t as acquireAndroidArtifact } from "./artifact-
|
|
32
|
-
import { a as persistLastBuild, c as androidDeviceSelectorRefusal, i as logPostBuildFailure, n as finishAndroidUpload, o as persistThrownBuild, s as reportAndroidResult, u as resolveAndroidRunPlan } from "./result-
|
|
33
|
-
import { n as
|
|
34
|
-
import {
|
|
35
|
-
import { t as
|
|
36
|
-
import { r as
|
|
1
|
+
import { D as ownership_claim_exports, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { a as recordWorkspaceUseAsync, f as writeWorkspaceStateAsync, g as emulatorLogFile, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { B as deviceSlotFileKey, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync$1, W as parseDeviceSlotOption, p as getProject, q as validateDeviceSlot, u as getConcurrencyLimits } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { B as publicUrlSetting, F as metroWarmupUrlSetting, J as resolveCacheProviderConfig, N as metroPortSetting, Q as resolveSettings, W as remoteEasFallbackSetting, Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, dt as detectProviders, g as deviceReclaimIdleMinutesSetting, ot as tunnelModeSetting, z as projectSettingsContextAsync } from "./settings-BDVI8Ivc.mjs";
|
|
6
|
+
import { f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunchAsync } from "./project-DYj-HVx6.mjs";
|
|
7
|
+
import { A as listAdbDevices, Dt as configuredAndroidEmulatorApp, I as listInstalledSystemImages, Y as physicalDeviceModel, Z as probeEmulatorSerial, a as androidDeviceAbi, ct as waitForBoot, nt as resolveOwnedAvdSerialAsync, rt as resolvePhysicalDevice } from "./android-DriNoAVy.mjs";
|
|
8
|
+
import { c as pidExists, d as resolveProjectMetro } from "./metro-CvyD-xwe.mjs";
|
|
9
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
10
|
+
import { An as checkEasAuth, At as ensureRemoteBootOwned, En as runProcessOperation, Et as binOnPath, Jt as verifyLaunch, Ln as resolveEasCliBin, Mt as remoteAndroidDeps, Pt as resolveRemoteContext, Qt as DEFAULT_METRO_PORT, Rn as resolveRemote, Zt as ADB_INSTALL_TIMEOUT_MS, c as budgetGate, kt as ensureMetroReachable, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, qn as ownedSessionName, qt as verifyAndroidReleaseLaunch, t as CCACHE_NOT_RUN, wn as exitAfterFlush, zn as uploadRemote } from "./ccache-BWTze1Ls.mjs";
|
|
11
|
+
import { J as runFailureRecord, X as tapBuildLog, Y as startBuildProgress, Z as thrownRunFailureRecord, at as recordRunStats, et as createRunRecorder, ot as statsProjectKey$1, rt as recordCapacityRefusal, tt as readRunEstimates, xt as releaseBuildSlot, yt as acquireBuildSlot, z as NO_BUILD_PROGRESS } from "./workspaces-DFbj07jp.mjs";
|
|
12
|
+
import { Q as cancelledFailure, at as runCancellation, ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CbCG6C5Z.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-Cd-ysFes.mjs";
|
|
14
|
+
import { T as storedAppId } from "./build-cache-gBJ-WKzA.mjs";
|
|
15
|
+
import { S as setRemoteLogSink } from "./client-xsdxrhWA.mjs";
|
|
16
|
+
import { d as resolveBuildPlacement, s as parseBuildMachineOption } from "./selection-Bs8phwhN.mjs";
|
|
17
|
+
import { r as hostedMetroSettings } from "./metro-gateway-BnHdqMO_.mjs";
|
|
18
|
+
import { a as writeHostedAndroidAsync, i as writeDevicePlacementAsync, t as readHostedAndroid } from "./ios-state-BZ03NFgF.mjs";
|
|
19
|
+
import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-BMKzUNnY.mjs";
|
|
20
|
+
import { n as verifyCollectorOwnership } from "./ownership-Bx-0cku-.mjs";
|
|
21
|
+
import { i as restoreLightenedDependencies, n as printLightenedFailure } from "./lightened-BCsdAGj_.mjs";
|
|
22
|
+
import { c as startDevServer } from "./start-DrPwER_2.mjs";
|
|
23
|
+
import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-DwsGfjUN.mjs";
|
|
24
|
+
import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-6LP7QsaA.mjs";
|
|
25
|
+
import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-CjNSWmjo.mjs";
|
|
26
|
+
import { t as followHostedLaunchLogs } from "./hosted-logs-sync-Dg3qrZmV.mjs";
|
|
27
|
+
import { f as settleFingerprintCheck } from "./prebuild-BDpToDgR.mjs";
|
|
28
|
+
import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-DqaIBO5w.mjs";
|
|
29
|
+
import { n as devicePlacementRecord } from "./placement-log-BXUbiZM6.mjs";
|
|
30
|
+
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-CNg_YsOk.mjs";
|
|
31
|
+
import { t as acquireAndroidArtifact } from "./artifact-0AGJYB9O.mjs";
|
|
32
|
+
import { a as persistLastBuild, c as androidDeviceSelectorRefusal, i as logPostBuildFailure, n as finishAndroidUpload, o as persistThrownBuild, s as reportAndroidResult, u as resolveAndroidRunPlan } from "./result-CTqBw2Te.mjs";
|
|
33
|
+
import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-z-H5pJza.mjs";
|
|
34
|
+
import { i as verifyAndroidMetroRun, r as finishAndroidRun } from "./launch-CRyBeNsA.mjs";
|
|
35
|
+
import { t as checkEasFallback } from "./eas-fallback-9fqb46kW.mjs";
|
|
36
|
+
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-tM41-TUq.mjs";
|
|
37
|
+
import { t as selectFromPool } from "./device-pool-BnQqvs6o.mjs";
|
|
37
38
|
import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
|
|
38
|
-
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-
|
|
39
|
-
import {
|
|
39
|
+
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-CBqYbzYM.mjs";
|
|
40
|
+
import { join } from "node:path";
|
|
40
41
|
import { workspaceId } from "@stim-cli/core";
|
|
41
42
|
import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
|
|
42
43
|
import chalk from "chalk";
|
|
@@ -86,7 +87,7 @@ async function connectAndroidHosting({ root, slot, machine, release, appMode = r
|
|
|
86
87
|
} };
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
|
-
async function selectAndroidPlacement({ target: selected, automatic = automaticDevicePlacement, checkBudget = budgetGate, note, phase, log, fromFlag, noWait, buildMachine, localSelectors, eas, ...args }) {
|
|
90
|
+
async function selectAndroidPlacement({ target: selected, automatic = automaticDevicePlacement, checkBudget = budgetGate, note, phase, log, fromFlag, noWait, waitMs, signal, buildMachine, localSelectors, eas, ...args }) {
|
|
90
91
|
const appMode = args.appMode ?? (args.release ? "release" : "development");
|
|
91
92
|
const selectors = selected.kind === "hosted" ? {
|
|
92
93
|
...selected.systemImage ? { systemImage: selected.systemImage } : {},
|
|
@@ -119,15 +120,20 @@ async function selectAndroidPlacement({ target: selected, automatic = automaticD
|
|
|
119
120
|
root: args.root,
|
|
120
121
|
slot: args.slot,
|
|
121
122
|
platform: "android",
|
|
123
|
+
...selected.placement ? { placement: selected.placement } : {},
|
|
122
124
|
...appMode === "process" ? { appMode } : {},
|
|
123
125
|
selectors,
|
|
124
126
|
buildMachine,
|
|
125
127
|
noWait,
|
|
128
|
+
...waitMs === void 0 ? {} : { waitMs },
|
|
129
|
+
onWait: (line) => phase("placement:", line),
|
|
130
|
+
signal,
|
|
126
131
|
...eas ? { eas } : {}
|
|
127
132
|
});
|
|
128
133
|
phase("placement:", devicePlacementLine(placed.placement, placed.skipped));
|
|
129
134
|
log?.(devicePlacementRecord({
|
|
130
135
|
platform: "android",
|
|
136
|
+
selected: selected.placement,
|
|
131
137
|
fromFlag,
|
|
132
138
|
easFallback: Boolean(eas),
|
|
133
139
|
placed
|
|
@@ -173,6 +179,11 @@ async function selectAndroidPlacement({ target: selected, automatic = automaticD
|
|
|
173
179
|
devicePlacement: placed.placement
|
|
174
180
|
};
|
|
175
181
|
} catch (error) {
|
|
182
|
+
if (signal?.aborted) return { failure: {
|
|
183
|
+
code: "STIM_CANCELLED",
|
|
184
|
+
message: "The run was cancelled while it waited for a remote machine.",
|
|
185
|
+
remedy: "Run the command again when you want the app on a device."
|
|
186
|
+
} };
|
|
176
187
|
return { failure: {
|
|
177
188
|
code: error.code ?? "STIM_HOSTING_REFUSED",
|
|
178
189
|
message: error.message,
|
|
@@ -182,10 +193,12 @@ async function selectAndroidPlacement({ target: selected, automatic = automaticD
|
|
|
182
193
|
}
|
|
183
194
|
//#endregion
|
|
184
195
|
//#region src/commands/android/hosted.ts
|
|
185
|
-
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 }) {
|
|
196
|
+
async function finishHostedAndroidRun({ target, artifact, root, slot = "default", release, appMode = release ? "release" : "development", isExpo, metroPort, logsDir, selectors, place, writePlacement, verifyLaunch: verify, followLogs, writeLaunch, readApkPackage, resolveDevClientScheme, now, started, startedAt, fail, phase, enterPhase, enterActivity, out, recordBuild, ...report }) {
|
|
186
197
|
const packageName = artifact.androidPackage ?? await readApkPackage(artifact.apkPath);
|
|
187
198
|
if (!artifact.apkPath || !packageName) return fail("STIM_INSTALL_FAILED", "The built APK has no package identity.");
|
|
199
|
+
const devClientScheme = appMode === "development" && isExpo ? await resolveDevClientScheme(root, artifact.apkPath) ?? void 0 : void 0;
|
|
188
200
|
const launchedAt = now();
|
|
201
|
+
let marked = false;
|
|
189
202
|
try {
|
|
190
203
|
const run = await place(target, {
|
|
191
204
|
root,
|
|
@@ -197,8 +210,26 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
197
210
|
...appMode === "process" ? { mode: appMode } : {},
|
|
198
211
|
metroPort,
|
|
199
212
|
selectors,
|
|
200
|
-
...appMode === "development" && isExpo ? { devClientScheme
|
|
201
|
-
reserved: (placement) =>
|
|
213
|
+
...appMode === "development" && isExpo ? { devClientScheme } : {},
|
|
214
|
+
reserved: (placement) => {
|
|
215
|
+
if (placement.device && !marked) {
|
|
216
|
+
marked = true;
|
|
217
|
+
report.writer.write({
|
|
218
|
+
src: "build",
|
|
219
|
+
level: "info",
|
|
220
|
+
marker: true,
|
|
221
|
+
event: "launch_attempt",
|
|
222
|
+
ts: now(),
|
|
223
|
+
platform: "android",
|
|
224
|
+
appId: packageName,
|
|
225
|
+
deviceId: placement.session,
|
|
226
|
+
remote: true,
|
|
227
|
+
host: target.host.machine,
|
|
228
|
+
msg: `launching ${packageName} on ${target.host.machine}`
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
return writePlacement(root, slot, placement);
|
|
232
|
+
},
|
|
202
233
|
note: out,
|
|
203
234
|
enterPhase
|
|
204
235
|
});
|
|
@@ -212,20 +243,49 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
212
243
|
launchedAt: new Date(launchedAt).toISOString()
|
|
213
244
|
}, slot);
|
|
214
245
|
let launched = run.launched;
|
|
246
|
+
let launchWarning;
|
|
247
|
+
let unattributed = false;
|
|
215
248
|
if (appMode === "development") {
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
249
|
+
const hostedLogs = followLogs(root, slot, "android", launchedAt);
|
|
250
|
+
let verification;
|
|
251
|
+
try {
|
|
252
|
+
verification = await verifyAndroidMetroRun({
|
|
253
|
+
root,
|
|
254
|
+
slot,
|
|
255
|
+
remoteDevice: false,
|
|
256
|
+
verifyLaunched: verify,
|
|
257
|
+
serial: run.placement.device?.serial ?? "",
|
|
258
|
+
androidPackage: packageName,
|
|
259
|
+
metroCheck: report.metroCheck,
|
|
260
|
+
logsDir: logsDir ?? "",
|
|
261
|
+
launchedAt,
|
|
262
|
+
metroPort,
|
|
263
|
+
isExpo,
|
|
264
|
+
physical: false,
|
|
265
|
+
device: {},
|
|
266
|
+
scheme: devClientScheme,
|
|
267
|
+
phase,
|
|
268
|
+
enterActivity,
|
|
269
|
+
hostedLogs,
|
|
270
|
+
hostedRunCommand: `stim android --remote ${run.placement.selected}${slot === "default" ? "" : ` --slot ${slot}`}`
|
|
271
|
+
});
|
|
272
|
+
} finally {
|
|
273
|
+
hostedLogs.stop();
|
|
274
|
+
}
|
|
275
|
+
if (verification.state === "fatal") return fail("STIM_LAUNCH_FAILED", "The app failed its launch readiness check.", `Read the launch error above or run \`stim logs --errors\`. The full timeline is in ${logsDir}.`, { lastBuildStatus: true });
|
|
276
|
+
launched = verification.state === true ? true : verification.state === "bundling" ? "bundling" : "unverified";
|
|
277
|
+
launchWarning = verification.warning;
|
|
278
|
+
unattributed = verification.unattributed ?? false;
|
|
228
279
|
}
|
|
280
|
+
report.writer.write(launchOutcomeRecord({
|
|
281
|
+
launchState: launched,
|
|
282
|
+
release,
|
|
283
|
+
process: appMode === "process",
|
|
284
|
+
bundleId: packageName,
|
|
285
|
+
configuration: report.variant,
|
|
286
|
+
metroPort,
|
|
287
|
+
unattributed
|
|
288
|
+
}));
|
|
229
289
|
if (launched === "unverified") out(`Launch on ${target.host.machine} is unverified; check the hosted app, then retry stim android --remote ${target.host.machine}.`);
|
|
230
290
|
const host = hostedAndroidStatus(run.placement);
|
|
231
291
|
report.record.deviceName = host.device?.name ?? null;
|
|
@@ -241,6 +301,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
241
301
|
});
|
|
242
302
|
await finishAndroidUpload(artifact.uploadPending, artifact.remote, phase);
|
|
243
303
|
await artifact.providerUpload;
|
|
304
|
+
await settleFingerprintCheck(artifact.fingerprintCheck, "android", (line) => phase("fingerprint", chalk.yellow(line)), (entry) => report.writer.write(entry));
|
|
244
305
|
return {
|
|
245
306
|
ok: true,
|
|
246
307
|
facts: reportAndroidResult({
|
|
@@ -261,6 +322,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
261
322
|
remote: artifact.remote,
|
|
262
323
|
providerName: artifact.providerName,
|
|
263
324
|
launchState: launched,
|
|
325
|
+
launchWarning,
|
|
264
326
|
launched: {},
|
|
265
327
|
ccache: artifact.ccache,
|
|
266
328
|
durationMs: now() - started
|
|
@@ -316,8 +378,8 @@ function androidCommand(program) {
|
|
|
316
378
|
registerAndroid(program);
|
|
317
379
|
}
|
|
318
380
|
function registerAndroid(program) {
|
|
319
|
-
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,
|
|
320
|
-
if (!parseMachine(value)) throw new InvalidArgumentError("expected eas, proxy, auto,
|
|
381
|
+
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 local, auto, remote (remote machines first), remote-only (never here), 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; remote tries remote.machines in order first and runs here only when none takes it; remote-only never runs here; local runs here, whatever android.remote says", (value) => {
|
|
382
|
+
if (!parseMachine(value)) throw new InvalidArgumentError("expected eas, proxy, local, auto, remote, remote-only, or a tailnet machine name");
|
|
321
383
|
return value;
|
|
322
384
|
}).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) => {
|
|
323
385
|
if (opts.plan) return planAndroid(opts);
|
|
@@ -340,6 +402,14 @@ function runAndroidOperation(context, root, opts = {}) {
|
|
|
340
402
|
platform: PLATFORM,
|
|
341
403
|
slot: opts.slot ?? "default"
|
|
342
404
|
}, async (claim) => {
|
|
405
|
+
const lightened = await restoreLightenedDependencies(root, context);
|
|
406
|
+
if (lightened) {
|
|
407
|
+
printLightenedFailure(context, lightened, Boolean(opts.json));
|
|
408
|
+
return {
|
|
409
|
+
ok: false,
|
|
410
|
+
error: lightened
|
|
411
|
+
};
|
|
412
|
+
}
|
|
343
413
|
await recordWorkspaceUseAsync(root, /* @__PURE__ */ new Date(), context.env, context.cwd, context.signal);
|
|
344
414
|
const progress = startBuildProgress({
|
|
345
415
|
root,
|
|
@@ -607,6 +677,8 @@ async function runAndroid(options = {}) {
|
|
|
607
677
|
status: "failed",
|
|
608
678
|
errorCode: code,
|
|
609
679
|
diagnostics: rawDiagnostics,
|
|
680
|
+
message,
|
|
681
|
+
remedy,
|
|
610
682
|
out
|
|
611
683
|
});
|
|
612
684
|
logPostBuildFailure(artifactAcquired, writer, runFailureRecord({
|
|
@@ -712,7 +784,6 @@ async function runAndroid(options = {}) {
|
|
|
712
784
|
automatic: plan.target.kind === "hosted" && plan.target.machine === "auto",
|
|
713
785
|
signal: runCancellationSignal(context),
|
|
714
786
|
waitMs: plan.deviceSlotWaitMs,
|
|
715
|
-
displayName: basename(root),
|
|
716
787
|
reclaimIdleMinutes: deviceReclaimIdleMinutesSetting(settings),
|
|
717
788
|
waitingFor: (info) => progress.waitingFor(info, "device-slot"),
|
|
718
789
|
onWait: (ms) => {
|
|
@@ -733,6 +804,8 @@ async function runAndroid(options = {}) {
|
|
|
733
804
|
appMode,
|
|
734
805
|
metroCheck,
|
|
735
806
|
noWait: plan.deviceSlotWaitMs === 0,
|
|
807
|
+
waitMs: plan.deviceSlotWaitMs,
|
|
808
|
+
signal: settingsSignal,
|
|
736
809
|
buildMachine: options.buildMachine,
|
|
737
810
|
read: options.readHostedAndroid,
|
|
738
811
|
resolveSerial: resolveAvdSerial,
|
|
@@ -1047,6 +1120,7 @@ async function runAndroid(options = {}) {
|
|
|
1047
1120
|
}
|
|
1048
1121
|
record.avdName = device.avdName ?? null;
|
|
1049
1122
|
record.deviceName = device.deviceName ?? device.avdName ?? null;
|
|
1123
|
+
record.deviceSerial = device.serial;
|
|
1050
1124
|
record.systemImage = device.systemImage;
|
|
1051
1125
|
record.deviceProfile = device.deviceProfile;
|
|
1052
1126
|
let preparedArtifact;
|
|
@@ -1145,6 +1219,7 @@ async function runAndroid(options = {}) {
|
|
|
1145
1219
|
place: options.placeHostedAndroid ?? placeHostedAndroid,
|
|
1146
1220
|
writePlacement: options.writeHostedAndroid ?? writeHostedAndroidAsync,
|
|
1147
1221
|
verifyLaunch: verifyLaunched,
|
|
1222
|
+
followLogs: options.followHostedLaunchLogs ?? followHostedLaunchLogs,
|
|
1148
1223
|
writeLaunch,
|
|
1149
1224
|
readApkPackage,
|
|
1150
1225
|
resolveDevClientScheme,
|
|
@@ -1155,6 +1230,7 @@ async function runAndroid(options = {}) {
|
|
|
1155
1230
|
fail,
|
|
1156
1231
|
phase,
|
|
1157
1232
|
enterPhase: progress.step,
|
|
1233
|
+
enterActivity: progress.activity,
|
|
1158
1234
|
out,
|
|
1159
1235
|
json,
|
|
1160
1236
|
useBuildCache,
|
|
@@ -1263,6 +1339,7 @@ async function runAndroid(options = {}) {
|
|
|
1263
1339
|
waitedForBuild: artifact.waitedForBuild,
|
|
1264
1340
|
ccache: ccacheActivity,
|
|
1265
1341
|
uploadPending: artifact.uploadPending,
|
|
1342
|
+
fingerprintCheck: artifact.fingerprintCheck,
|
|
1266
1343
|
providerUpload: artifact.providerUpload,
|
|
1267
1344
|
providerName: artifact.providerName,
|
|
1268
1345
|
remote: artifact.remote,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { u as androidToolCwd } from "./android-
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { u as androidToolCwd } from "./android-DriNoAVy.mjs";
|
|
3
3
|
//#region src/collector/android.ts
|
|
4
4
|
const LEVEL_BY_LETTER = {
|
|
5
5
|
V: "debug",
|
|
@@ -111,10 +111,19 @@ function logcatArgs(serial, pid) {
|
|
|
111
111
|
"time,epoch"
|
|
112
112
|
];
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function killOnAbort(signal) {
|
|
115
|
+
if (!signal) return {};
|
|
116
|
+
return { onSpawn(child) {
|
|
117
|
+
const kill = () => child.kill("SIGKILL");
|
|
118
|
+
signal.addEventListener("abort", kill, { once: true });
|
|
119
|
+
child.once("close", () => signal.removeEventListener("abort", kill));
|
|
120
|
+
if (signal.aborted) kill();
|
|
121
|
+
} };
|
|
122
|
+
}
|
|
123
|
+
async function androidClockOffset(serial, { exec = getExecutor(), now = Date.now, signal } = {}) {
|
|
115
124
|
const before = now();
|
|
116
125
|
try {
|
|
117
|
-
const output = exec.
|
|
126
|
+
const output = (await exec.runFileAsync("adb", [
|
|
118
127
|
"-s",
|
|
119
128
|
serial,
|
|
120
129
|
"shell",
|
|
@@ -122,8 +131,9 @@ function androidClockOffset(serial, { exec = getExecutor(), now = Date.now } = {
|
|
|
122
131
|
"+%s%3N"
|
|
123
132
|
], {
|
|
124
133
|
timeoutMs: 1e3,
|
|
125
|
-
cwd: androidToolCwd()
|
|
126
|
-
|
|
134
|
+
cwd: androidToolCwd(),
|
|
135
|
+
...killOnAbort(signal)
|
|
136
|
+
})).trim();
|
|
127
137
|
const after = now();
|
|
128
138
|
if (!/^\d{13}$/.test(output) || after < before || after - before > 1e3) return null;
|
|
129
139
|
return Math.round((before + after) / 2) - Number(output);
|
|
@@ -136,25 +146,31 @@ function parsePidof(text) {
|
|
|
136
146
|
const pid = Number(first);
|
|
137
147
|
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
138
148
|
}
|
|
139
|
-
function resolveAppPid(serial, packageName, { exec = null } = {}) {
|
|
149
|
+
async function resolveAppPid(serial, packageName, { exec = null, signal } = {}) {
|
|
140
150
|
const e = exec || getExecutor();
|
|
141
151
|
try {
|
|
142
|
-
return parsePidof(e.
|
|
152
|
+
return parsePidof(await e.runFileAsync("adb", [
|
|
143
153
|
"-s",
|
|
144
154
|
serial,
|
|
145
155
|
"shell",
|
|
146
156
|
"pidof",
|
|
147
157
|
"-s",
|
|
148
158
|
packageName
|
|
149
|
-
], {
|
|
159
|
+
], {
|
|
160
|
+
timeoutMs: 1e4,
|
|
161
|
+
...killOnAbort(signal)
|
|
162
|
+
}));
|
|
150
163
|
} catch {
|
|
151
164
|
return null;
|
|
152
165
|
}
|
|
153
166
|
}
|
|
154
|
-
async function waitForAppPid({ serial, packageName, timeoutMs = 3e4, pollMs = 500, exec = null, now = Date.now, sleep = defaultSleep }) {
|
|
167
|
+
async function waitForAppPid({ serial, packageName, timeoutMs = 3e4, pollMs = 500, exec = null, signal, now = Date.now, sleep = defaultSleep }) {
|
|
155
168
|
const deadline = now() + timeoutMs;
|
|
156
169
|
for (;;) {
|
|
157
|
-
const pid = resolveAppPid(serial, packageName, {
|
|
170
|
+
const pid = await resolveAppPid(serial, packageName, {
|
|
171
|
+
exec,
|
|
172
|
+
signal
|
|
173
|
+
});
|
|
158
174
|
if (pid) return {
|
|
159
175
|
ok: true,
|
|
160
176
|
pid
|
|
@@ -184,7 +200,7 @@ function pidWatchInterval() {
|
|
|
184
200
|
const override = Number(process.env.STIM_PID_WATCH_MS);
|
|
185
201
|
return Number.isFinite(override) && override > 0 ? override : PID_WATCH_MS;
|
|
186
202
|
}
|
|
187
|
-
function watchAppPid({ serial, packageName, pid, intervalMs = null, exec = null, onChange, resolve = resolveAppPid, setTimer = setTimeout, clearTimer = clearTimeout }) {
|
|
203
|
+
function watchAppPid({ serial, packageName, pid, intervalMs = null, exec = null, signal, onChange, resolve = resolveAppPid, setTimer = setTimeout, clearTimer = clearTimeout }) {
|
|
188
204
|
const every = intervalMs ?? pidWatchInterval();
|
|
189
205
|
let current = pid;
|
|
190
206
|
let stopped = false;
|
|
@@ -194,7 +210,10 @@ function watchAppPid({ serial, packageName, pid, intervalMs = null, exec = null,
|
|
|
194
210
|
if (stopped) return;
|
|
195
211
|
let next = null;
|
|
196
212
|
try {
|
|
197
|
-
next = resolve(serial, packageName, {
|
|
213
|
+
next = await resolve(serial, packageName, {
|
|
214
|
+
exec,
|
|
215
|
+
signal
|
|
216
|
+
});
|
|
198
217
|
} catch {}
|
|
199
218
|
if (next && next !== current) {
|
|
200
219
|
current = next;
|
|
@@ -211,9 +230,12 @@ function watchAppPid({ serial, packageName, pid, intervalMs = null, exec = null,
|
|
|
211
230
|
if (timer) clearTimer(timer);
|
|
212
231
|
timer = null;
|
|
213
232
|
},
|
|
214
|
-
probe() {
|
|
233
|
+
async probe() {
|
|
215
234
|
try {
|
|
216
|
-
return resolve(serial, packageName, {
|
|
235
|
+
return await resolve(serial, packageName, {
|
|
236
|
+
exec,
|
|
237
|
+
signal
|
|
238
|
+
});
|
|
217
239
|
} catch {
|
|
218
240
|
return null;
|
|
219
241
|
}
|