stim 1.20.0 → 1.20.2
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 +6 -3
- package/dist/{activity-BrGh9EAI.mjs → activity-BSV745Kz.mjs} +4 -4
- package/dist/{agent-device-usage-output-DVyv_hWj.mjs → agent-device-usage-output-Dzgv6lgR.mjs} +5 -6
- package/dist/{android-Brx6EKvJ.mjs → android-DCKZrNvV.mjs} +37 -38
- package/dist/{android-0vv-OruW.mjs → android-Dlzxshgp.mjs} +5 -5
- package/dist/{android-CK3fpEyZ.mjs → android-HqP1_vB_.mjs} +3 -3
- package/dist/{android-BsYNR81W.mjs → android-Mz_Inn3w.mjs} +12 -12
- package/dist/{android-cas-DCAuXryb.mjs → android-cas-Bl-cLJBk.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{api-zuX3ynYN.mjs → api-qvOzWyfO.mjs} +1 -1
- package/dist/api-run.mjs +19 -21
- package/dist/api.mjs +1 -1
- package/dist/{app-install-0LgaQRT7.mjs → app-install-BIKtMfPq.mjs} +71 -48
- package/dist/{artifact-DClXJNWx.mjs → artifact-D3czlUvT.mjs} +13 -13
- package/dist/{artifact-CnC0mfov.mjs → artifact-HSwkIWEQ.mjs} +12 -12
- package/dist/{browser-web-CzBmhmgs.mjs → browser-web-CA-F1GQo.mjs} +18 -18
- package/dist/{budget-BONq9vXY.mjs → budget-f7516Zk0.mjs} +23 -26
- package/dist/{build-BixRI6sB.mjs → build-DYDbfkk5.mjs} +28 -33
- package/dist/{build-plan-CP0tckNU.mjs → build-plan-B7SZsc2N.mjs} +17 -17
- package/dist/{cache-manifest-qA3dT2x2.mjs → cache-manifest-XH-fvDUj.mjs} +10 -5
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cancellation-C_22VQTH.mjs +24 -0
- package/dist/{ccache-CjHQ5F8g.mjs → ccache-zdKiYQ3E.mjs} +7 -7
- package/dist/{chrome-Dp2lMLBe.mjs → chrome-BnzZMqsR.mjs} +1 -1
- package/dist/{cli-B2R8wH1F.mjs → cli-CLP3diBm.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-BLy1Pw2V.mjs → client-qQAaXSUs.mjs} +21 -29
- package/dist/collector-run.d.mts +7 -6
- package/dist/collector-run.mjs +6 -7
- package/dist/{command-output-BjPN99ZB.mjs → command-output-BTy8hZ0F.mjs} +1 -1
- package/dist/{config-D0LhTY3S.mjs → config-BYDxlMY3.mjs} +43 -5
- package/dist/{created-devices-HU_DAb_Q.mjs → created-devices-Dzd5C2LF.mjs} +2 -2
- package/dist/{dependency-state-B2m8eqsS.mjs → dependency-state-DG0p31-y.mjs} +2 -2
- package/dist/{detached-entry-BXq4fIl-.mjs → detached-entry-B9C_zeQC.mjs} +1 -1
- package/dist/{dev-client-ClATaJoH.mjs → dev-client-DAWVIGBu.mjs} +2 -2
- package/dist/{device-DVCwAFlX.mjs → device-BECOiufl.mjs} +13 -14
- package/dist/{device-B7lsC0K1.mjs → device-DuiPJQSn.mjs} +8 -8
- package/dist/{device-capacity-Ca_ke1LE.mjs → device-capacity-CBUAcRyQ.mjs} +10 -11
- package/dist/device-host-worker.mjs +16 -17
- package/dist/{device-ios-CRUqPxKw.mjs → device-ios-COSi6oS1.mjs} +12 -15
- package/dist/{device-lease-DHOBXGgS.mjs → device-lease-BX1sJQ2E.mjs} +15 -18
- package/dist/{device-lease-run-CvDeHTkG.mjs → device-lease-run-Cw2M4z51.mjs} +4 -4
- package/dist/{device-pool-L2-5GxMy.mjs → device-pool-Bf-pOhSw.mjs} +3 -3
- package/dist/{device-remote-Bmg42063.mjs → device-remote-xRT0Vmo9.mjs} +14 -14
- package/dist/{doctor-C2MSuMMg.mjs → doctor-CB8oZKCk.mjs} +13 -13
- package/dist/{doctor-DPAqhVCK.mjs → doctor-kfMBnUw6.mjs} +78 -69
- package/dist/{doctor-watchman-CB4NnVZm.mjs → doctor-watchman-BRyV2adA.mjs} +9 -10
- package/dist/{eas-build-Dw_ec2Km.mjs → eas-build-JyfqyHfC.mjs} +5 -5
- package/dist/{eas-session-ledger-DZlC-Fq3.mjs → eas-session-ledger-Cm0Gwq2F.mjs} +6 -4
- package/dist/{error-diagnostics-Du7I_GuY.mjs → error-diagnostics-BR677IDM.mjs} +10 -10
- package/dist/{exec-B81Qodjn.mjs → exec-DqKo9GKJ.mjs} +22 -8
- package/dist/{gc-PWp34zGb.mjs → gc-qWOMdnER.mjs} +75 -24
- package/dist/git-DDfFzkMm.mjs +45 -0
- package/dist/{gradle-C2OEKCCI.mjs → gradle-DSrXb6lG.mjs} +6 -6
- package/dist/{guide-Dai9lphv.mjs → guide-G9cAbVAc.mjs} +81 -178
- package/dist/{hosted-android-DQ-Agsd8.mjs → hosted-android-C3MHGld1.mjs} +3 -3
- package/dist/{hosted-client-Io01s5By.mjs → hosted-client-ZEKpS9vw.mjs} +19 -11
- package/dist/{hosted-ios-DIxFnYp-.mjs → hosted-ios-l-o3iM9J.mjs} +1 -1
- package/dist/{hosted-logs-DP-ABU_M.mjs → hosted-logs-EzQM7-3Z.mjs} +7 -7
- package/dist/{hosted-macos-Aziw9T_9.mjs → hosted-macos-BACVAVqE.mjs} +10 -8
- package/dist/{hosted-native-BdAQi21M.mjs → hosted-native-A4s1QPXe.mjs} +13 -11
- package/dist/{idle-shutdown-DdMqoSUB.mjs → idle-shutdown-DtxhPTKe.mjs} +7 -7
- package/dist/{ios-BZ9dg2Fr.mjs → ios-BwVCF7oA.mjs} +8 -8
- package/dist/{ios-CZuv6gRv.mjs → ios-Ce7bc7br.mjs} +29 -29
- package/dist/{ios-CXLIUxXJ.mjs → ios-RkW4pnQf.mjs} +21 -17
- package/dist/{ios-device-B1B14xND.mjs → ios-device-B5veSDDQ.mjs} +1 -1
- package/dist/{ios-device-BreZOpM0.mjs → ios-device-D7pi2Sca.mjs} +14 -14
- package/dist/{ios-VGvNdsv2.mjs → ios-nOLJGVdy.mjs} +1 -1
- package/dist/{ios-project-B9drt_aY.mjs → ios-project-K9hY_Jab.mjs} +8 -8
- package/dist/{ios-state-CjrL2qv-.mjs → ios-state-CBLe1xYw.mjs} +1 -1
- package/dist/{js-swap-C8icNYIY.mjs → js-swap-Bb3nsS07.mjs} +13 -13
- package/dist/{launch-YrbqaIFj.mjs → launch-C3qJ6Agb.mjs} +46 -45
- package/dist/{launch-DxH0THLP.mjs → launch-F4sOqAhB.mjs} +21 -21
- package/dist/{launch-verify-BzRdbuO1.mjs → launch-verify-B6Q8hZP-.mjs} +11 -11
- package/dist/{logs-DHaRNfg7.mjs → logs-BGrEUaEs.mjs} +10 -11
- package/dist/{macos-V_3Ui7g4.mjs → macos-Ch5VJmcS.mjs} +40 -24
- package/dist/macos-D7uDvO-z.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-D_j9sN-B.mjs → metro-DnCEjCxs.mjs} +8 -9
- package/dist/{metro-gateway-BBJldOdi.mjs → metro-gateway-CX9Xlkq2.mjs} +3 -3
- package/dist/{miss-reason-BPAzZS0r.mjs → miss-reason-mKzZ4VvN.mjs} +3 -3
- package/dist/{named-ports-C2lvoPsb.mjs → named-ports-4WopRPg-.mjs} +4 -5
- package/dist/{native-android-lHzaew7r.mjs → native-android-D5qc3-_v.mjs} +10 -10
- package/dist/{native-gradle-inputs-BQnIdAlL.mjs → native-gradle-inputs-BsLRrl7u.mjs} +3 -10
- package/dist/{native-runtime-BRmWL7ru.mjs → native-runtime-k8dTIrbK.mjs} +7 -8
- package/dist/{native-xcode-inputs-eutS19jU.mjs → native-xcode-inputs-CykopJdM.mjs} +7 -9
- package/dist/{native-xcode-ios-DP3cHLwu.mjs → native-xcode-ios-Bbf30Gm0.mjs} +15 -15
- package/dist/offload-worker.mjs +34 -38
- package/dist/{ownership-DXzMMSx6.mjs → ownership-DCtw_2IA.mjs} +3 -3
- package/dist/{page-Bv9s2KwY.mjs → page-DRHy329N.mjs} +1 -1
- package/dist/{placement-log-reFbjqEr.mjs → placement-log-MOfPVgaM.mjs} +1 -1
- package/dist/{plan-BDk2AeY_.mjs → plan-C4TjdPsR.mjs} +10 -10
- package/dist/{plan-placement-D_YYlE6N.mjs → plan-placement-V0TdzYXp.mjs} +3 -3
- package/dist/{ports-jzvAJXXL.mjs → ports-DdSUicVo.mjs} +3 -3
- package/dist/{prebuild-Bw44QxVh.mjs → prebuild-DYbucPXy.mjs} +7 -8
- package/dist/{preview-BaBJ72Al.mjs → preview-78a9kR_-.mjs} +31 -24
- package/dist/{project-B8_duAzW.mjs → project-_phNIJfs.mjs} +110 -47
- package/dist/{pull-request-vOhLNmIb.mjs → pull-request-CQ8sPbZa.mjs} +5 -18
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-chm1DMlA.mjs → react-native-android-CM1XRDwv.mjs} +34 -30
- package/dist/{react-native-build-oAw6gQeW.mjs → react-native-build-CtCccJtb.mjs} +6 -6
- package/dist/{react-native-doctor-DYXoh-6I.mjs → react-native-doctor-CfRnFfjs.mjs} +5 -5
- package/dist/{react-native-ios-SCTK_CT5.mjs → react-native-ios-Dhq_eiYQ.mjs} +14 -14
- package/dist/{recordings-Bk-VivUV.mjs → recordings-D0d5aQt0.mjs} +1 -1
- package/dist/{reload-D34GkY78.mjs → reload-C8JhxjSh.mjs} +17 -17
- package/dist/{remote-BU9UyhCJ.mjs → remote-BiR6aYjy.mjs} +7 -7
- package/dist/{remote-cache-Bsts6f6Y.mjs → remote-cache-OyOyVIS3.mjs} +4 -4
- package/dist/{result-BDoRk1k3.mjs → result-CaJg5Iat.mjs} +8 -8
- package/dist/{run-qvff78hv.mjs → run-BtPgpKks.mjs} +3 -3
- package/dist/{server-bare-dWjAarki.mjs → server-bare-R2m_gsH8.mjs} +3 -3
- package/dist/{server-command-7XIKlWtO.mjs → server-command-CTtCkmcQ.mjs} +5 -5
- package/dist/server-expo-Bigriskl.mjs +2 -0
- package/dist/{server-expo-CsYu2aKL.mjs → server-expo-DsguMGUF.mjs} +5 -10
- package/dist/{settings-Bbztm4oV.mjs → settings-B717odTD.mjs} +74 -115
- package/dist/{settings-CT3E71-i.mjs → settings-BORNaaCO.mjs} +5 -5
- package/dist/settings.schema.json +1 -1
- package/dist/{simslim-ChMfe8rg.mjs → simslim-CCr3rE-A.mjs} +2 -3
- package/dist/{slot-launch-B9hn96wd.mjs → slot-launch-DPt0m9Nd.mjs} +6 -6
- package/dist/{spawn-claims-Kqiifsk2.mjs → spawn-claims-DVS5RkMS.mjs} +1 -1
- package/dist/{stage-BNKKdDNc.mjs → stage-KNTQopqv.mjs} +9 -9
- package/dist/{start-CdvcTaXr.mjs → start-BWqzODpb.mjs} +19 -20
- package/dist/{start-CbQCSnXQ.mjs → start-TXeMmmO2.mjs} +1 -1
- package/dist/{state-Boo0IMJq.mjs → state-CG_OFoaA.mjs} +2 -2
- package/dist/{state-DI84A-uu.mjs → state-D1Icyjlu.mjs} +8 -7
- package/dist/{stats-BIIDrjA8.mjs → stats-BoY5sEPU.mjs} +5 -5
- package/dist/{status-BDGHwkCs.mjs → status-BTA7kKiQ.mjs} +1 -1
- package/dist/{status-DARMkc9q.mjs → status-WgFbkRzj.mjs} +30 -47
- package/dist/{status-watch-DvmI3SmN.mjs → status-watch-C23ILtf9.mjs} +4 -4
- package/dist/{stim-desktop-8GQX2OV8.mjs → stim-desktop-BzBN2Em2.mjs} +1 -1
- package/dist/{stop-iNemHsJC.mjs → stop-BNmBMi1F.mjs} +18 -19
- package/dist/{stop-WQPQHLuy.mjs → stop-DPEhunlw.mjs} +6 -6
- package/dist/{stop-CCZS-C9m.mjs → stop-DR6VoDIk.mjs} +2 -2
- package/dist/supervisor-run.mjs +16 -17
- package/dist/{support-DCco5fut.mjs → support-CwjbFs9H.mjs} +9 -9
- package/dist/{support-CnE_SIjt.mjs → support-DMTqj3Hm.mjs} +6 -6
- package/dist/{swiftpm-macos-afeNUExW.mjs → swiftpm-macos-DRNVJWlb.mjs} +9 -9
- package/dist/{tailnet-CoJUb2tB.mjs → tailnet-Dh-qiYzG.mjs} +5 -5
- package/dist/toolchain-BFkAcstd.mjs +2 -0
- package/dist/{toolchain-DqyDXs30.mjs → toolchain-DxSsNssu.mjs} +10 -10
- package/dist/trigger-9_USgmxz.mjs +2 -0
- package/dist/{trigger-C0MWBi8O.mjs → trigger-CigAYjeL.mjs} +2 -2
- package/dist/{warm-progress-C3ASD6z5.mjs → warm-progress-BuY-Fvfn.mjs} +43 -61
- package/dist/{watchman-CQl51YZu.mjs → watchman-CPQFZLXY.mjs} +6 -6
- package/dist/{web-B3eldHFH.mjs → web-BDBMxDpx.mjs} +9 -9
- package/dist/web-Dq-i3wzJ.mjs +2 -0
- package/dist/web-run.mjs +14 -14
- package/dist/{workspace-state-CSIFuuDa.mjs → workspace-state-DJt_MMvf.mjs} +16 -6
- package/dist/{workspaces-D2xSHBDY.mjs → workspaces-C36s2jb9.mjs} +15 -16
- package/dist/{worktree-BxDqaTev.mjs → worktree-CgvJYJ-Q.mjs} +96 -89
- package/dist/{worktree-q7_OZNY0.mjs → worktree-DpLdCHga.mjs} +1 -1
- package/package.json +6 -7
- package/dist/macos-C0iljhsN.mjs +0 -2
- package/dist/process-identity-Biv3arCO.mjs +0 -40
- package/dist/server-expo-DV43vep4.mjs +0 -2
- package/dist/toolchain-BIupIro1.mjs +0 -2
- package/dist/trigger-SHLOWJ4O.mjs +0 -2
- package/dist/web-BLXpOe6b.mjs +0 -2
package/README.md
CHANGED
|
@@ -33,9 +33,12 @@ stim stop
|
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
`stim doctor` never loads `fingerprint.config.js` or runs an `eas` from the
|
|
36
|
-
project tree.
|
|
37
|
-
|
|
38
|
-
`
|
|
36
|
+
project tree. On a checkout without its own dependencies, it skips the
|
|
37
|
+
fingerprint parity check when Expo packages resolve from outside the app or when
|
|
38
|
+
the check would need `npx react-native config`, as it does for Android or a
|
|
39
|
+
project without an `ios` directory. Its linked-library check can
|
|
40
|
+
still run installed Expo packages on the main checkout, as a build does.
|
|
41
|
+
`worktree warm`, `start`, `ios`, and `android` run project code.
|
|
39
42
|
|
|
40
43
|
Stim builds or restores the app, installs it, launches it, and checks launch
|
|
41
44
|
readiness. Plain output streams progress and reports the complete result. Use
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import { i as listLeaseFiles, r as leaseIsExpired } from "./device-lease-
|
|
4
|
-
import { r as readWorkspaceState$1, w as workspaceLogsDir$1 } from "./workspace-state-
|
|
1
|
+
import { k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { i as listLeaseFiles, r as leaseIsExpired } from "./device-lease-BX1sJQ2E.mjs";
|
|
4
|
+
import { r as readWorkspaceState$1, w as workspaceLogsDir$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
5
|
import { closeSync, fstatSync, openSync, readFileSync, readSync, readdirSync, statSync } from "node:fs";
|
|
6
6
|
import { basename, join, resolve } from "node:path";
|
|
7
7
|
import { agentDeviceStateDirs, readViewedDevices } from "@stim-cli/core/state";
|
package/dist/{agent-device-usage-output-DVyv_hWj.mjs → agent-device-usage-output-Dzgv6lgR.mjs}
RENAMED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as envDir, l as processMatches, s as parseAgentDeviceRecord } from "./activity-BrGh9EAI.mjs";
|
|
1
|
+
import { N as formatBytes, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { o as formatLongDuration } from "./command-output-BTy8hZ0F.mjs";
|
|
4
|
+
import { c as listWorkspaceDirs } from "./workspaces-C36s2jb9.mjs";
|
|
5
|
+
import { a as envDir, l as processMatches, s as parseAgentDeviceRecord } from "./activity-BSV745Kz.mjs";
|
|
7
6
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
8
7
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
9
8
|
import { agentDeviceUsageFile, readAgentDeviceUsageCache, readSwiftpmCacheUsage, swiftpmCacheUsageFile } from "@stim-cli/core/state";
|
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { S as withNativeBuildRun, b as runCancellation, p as cancelledFailure, x as runCancellationSignal } from "./tailnet-CoJUb2tB.mjs";
|
|
1
|
+
import { E as upsertProject, K as validateDeviceSlot, U as parseDeviceSlotOption, V as deviceSlotPlatforms, j as ownership_claim_exports, p as getProject, u as getConcurrencyLimits, z as deviceSlotFileKey } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { I as projectSettingsContext, K as resolveProjectSettings, L as publicUrlSetting, N as metroWarmupUrlSetting, V as remoteEasFallbackSetting, W as resolveCacheProviderConfig, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, j as metroPortSetting, ot as detectProviders, q as resolveSettings, tt as tunnelModeSetting } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { _ as waitForBuild, g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-BX1sJQ2E.mjs";
|
|
5
|
+
import { c as writeWorkspaceState, f as emulatorLogFile, i as recordWorkspaceUse, r as readWorkspaceState$1, w as workspaceLogsDir$1 } from "./workspace-state-DJt_MMvf.mjs";
|
|
6
|
+
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
7
|
+
import { I as workspaceDevServerMode, R as writeWorkspaceLaunch, c as projectShortcut, d as projectRegistry, r as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-_phNIJfs.mjs";
|
|
8
|
+
import { G as probeEmulatorSerial, J as resolveOwnedAvdSerial, O as listAdbDevices, U as physicalDeviceModel, Y as resolvePhysicalDevice, a as androidDeviceAbi, ht as configuredAndroidEmulatorApp, j as listInstalledSystemImages, tt as waitForBoot } from "./android-Mz_Inn3w.mjs";
|
|
9
|
+
import { s as pidExists, u as resolveProjectMetro } from "./metro-DnCEjCxs.mjs";
|
|
10
|
+
import { F as acquireBuildSlot, L as releaseBuildSlot } from "./workspaces-C36s2jb9.mjs";
|
|
11
|
+
import { At as createRunRecorder, Ft as recordRunStats, It as statsProjectKey$1, Nt as recordCapacityRefusal, Ot as startBuildProgress, jt as readRunEstimates, kt as tapBuildLog, t as budgetGate, yt as NO_BUILD_PROGRESS } from "./budget-f7516Zk0.mjs";
|
|
12
|
+
import { S as withNativeBuildRun, b as runCancellation, p as cancelledFailure, x as runCancellationSignal } from "./tailnet-Dh-qiYzG.mjs";
|
|
14
13
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
15
|
-
import { f as resolveEasCliBin, i as checkEasAuth, m as uploadRemote, p as resolveRemote } from "./remote-cache-
|
|
16
|
-
import { f as setRemoteLogSink, g as parseBuildMachineOption, y as resolveBuildPlacement } from "./client-
|
|
17
|
-
import { c as startDevServer } from "./start-
|
|
18
|
-
import { d as verifyAndroidReleaseLaunch, f as verifyLaunch } from "./launch-verify-
|
|
19
|
-
import { b as
|
|
20
|
-
import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-
|
|
21
|
-
import { n as devicePlacementRecord } from "./placement-log-
|
|
22
|
-
import { t as CCACHE_NOT_RUN } from "./ccache-
|
|
23
|
-
import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-
|
|
24
|
-
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-
|
|
25
|
-
import { r as resolveAndroidRunPlan, t as androidDeviceSelectorRefusal } from "./plan-
|
|
26
|
-
import { t as acquireAndroidArtifact } from "./artifact-
|
|
27
|
-
import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnSignal } from "./device-lease-run-
|
|
28
|
-
import { a as reportAndroidResult, i as persistLastBuild, n as finishAndroidUpload } from "./result-
|
|
29
|
-
import { r as hostedMetroSettings } from "./metro-gateway-
|
|
30
|
-
import { a as writeHostedAndroid, i as writeDevicePlacement, t as readHostedAndroid } from "./ios-state-
|
|
31
|
-
import { a as refusePlan, c as devicePlacementLine, i as printPlan, n as planFlagRefusal, o as checkEasFallback, s as automaticDevicePlacement } from "./build-plan-
|
|
32
|
-
import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-
|
|
33
|
-
import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-
|
|
34
|
-
import { S as ownedSessionName, a as ensureMetroReachable, c as remoteAndroidDeps, n as binOnPath, o as ensureRemoteBootOwned, u as resolveRemoteContext } from "./device-remote-
|
|
35
|
-
import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-
|
|
36
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
37
|
-
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-
|
|
38
|
-
import { t as selectFromPool } from "./device-pool-
|
|
39
|
-
import { r as finishAndroidRun } from "./launch-
|
|
14
|
+
import { f as resolveEasCliBin, i as checkEasAuth, m as uploadRemote, p as resolveRemote } from "./remote-cache-OyOyVIS3.mjs";
|
|
15
|
+
import { f as setRemoteLogSink, g as parseBuildMachineOption, y as resolveBuildPlacement } from "./client-qQAaXSUs.mjs";
|
|
16
|
+
import { c as startDevServer } from "./start-BWqzODpb.mjs";
|
|
17
|
+
import { d as verifyAndroidReleaseLaunch, f as verifyLaunch } from "./launch-verify-B6Q8hZP-.mjs";
|
|
18
|
+
import { b as launchAndroidApp, g as installAndroidApp, r as DEFAULT_METRO_PORT, t as ADB_INSTALL_TIMEOUT_MS, x as launchAndroidReleaseApp } from "./app-install-BIKtMfPq.mjs";
|
|
19
|
+
import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-k8dTIrbK.mjs";
|
|
20
|
+
import { n as devicePlacementRecord } from "./placement-log-MOfPVgaM.mjs";
|
|
21
|
+
import { t as CCACHE_NOT_RUN } from "./ccache-zdKiYQ3E.mjs";
|
|
22
|
+
import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-CBUAcRyQ.mjs";
|
|
23
|
+
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-DMTqj3Hm.mjs";
|
|
24
|
+
import { r as resolveAndroidRunPlan, t as androidDeviceSelectorRefusal } from "./plan-C4TjdPsR.mjs";
|
|
25
|
+
import { t as acquireAndroidArtifact } from "./artifact-D3czlUvT.mjs";
|
|
26
|
+
import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnSignal } from "./device-lease-run-Cw2M4z51.mjs";
|
|
27
|
+
import { a as reportAndroidResult, i as persistLastBuild, n as finishAndroidUpload } from "./result-CaJg5Iat.mjs";
|
|
28
|
+
import { r as hostedMetroSettings } from "./metro-gateway-CX9Xlkq2.mjs";
|
|
29
|
+
import { a as writeHostedAndroid, i as writeDevicePlacement, t as readHostedAndroid } from "./ios-state-CBLe1xYw.mjs";
|
|
30
|
+
import { a as refusePlan, c as devicePlacementLine, i as printPlan, n as planFlagRefusal, o as checkEasFallback, s as automaticDevicePlacement } from "./build-plan-B7SZsc2N.mjs";
|
|
31
|
+
import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-C3MHGld1.mjs";
|
|
32
|
+
import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-DPt0m9Nd.mjs";
|
|
33
|
+
import { S as ownedSessionName, a as ensureMetroReachable, c as remoteAndroidDeps, n as binOnPath, o as ensureRemoteBootOwned, u as resolveRemoteContext } from "./device-remote-xRT0Vmo9.mjs";
|
|
34
|
+
import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-JyfqyHfC.mjs";
|
|
35
|
+
import { n as verifyCollectorOwnership } from "./ownership-DCtw_2IA.mjs";
|
|
36
|
+
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-BECOiufl.mjs";
|
|
37
|
+
import { t as selectFromPool } from "./device-pool-Bf-pOhSw.mjs";
|
|
38
|
+
import { r as finishAndroidRun } from "./launch-F4sOqAhB.mjs";
|
|
40
39
|
import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
|
|
41
40
|
import { basename, join } from "node:path";
|
|
42
41
|
import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-
|
|
2
|
-
import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-
|
|
3
|
-
import { r as lastBuildRecord, t as androidFacts } from "./result-
|
|
4
|
-
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-
|
|
5
|
-
import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-
|
|
1
|
+
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-BTy8hZ0F.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-DMTqj3Hm.mjs";
|
|
3
|
+
import { r as lastBuildRecord, t as androidFacts } from "./result-CaJg5Iat.mjs";
|
|
4
|
+
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-DCKZrNvV.mjs";
|
|
5
|
+
import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-F4sOqAhB.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,5 +1,5 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { u as androidToolCwd } from "./android-
|
|
1
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { u as androidToolCwd } from "./android-Mz_Inn3w.mjs";
|
|
3
3
|
//#region src/collector/android.ts
|
|
4
4
|
const LEVEL_BY_LETTER = {
|
|
5
5
|
V: "debug",
|
|
@@ -136,7 +136,7 @@ function resolveAppPid(serial, packageName, { exec = null } = {}) {
|
|
|
136
136
|
"pidof",
|
|
137
137
|
"-s",
|
|
138
138
|
packageName
|
|
139
|
-
]));
|
|
139
|
+
], { timeoutMs: 1e4 }));
|
|
140
140
|
} catch {
|
|
141
141
|
return null;
|
|
142
142
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import { d as signalProcessTree, s as pidExists } from "./metro-D_j9sN-B.mjs";
|
|
1
|
+
import { C as saveConfig, D as withConfigLock$1, G as removeSlotDevice, R as assignSlotDevice, V as deviceSlotPlatforms, W as projectDeviceSlots, _ as loadConfig$1, c as ensureConfig, d as getConfigDir, f as getConfigPath$1, j as ownership_claim_exports, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
|
+
import { c as androidDataPartitionSizeBytes } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { n as settingDefault, r as stimDesktopInstalled, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-BzBN2Em2.mjs";
|
|
5
|
+
import { n as readCreatedDevices$1, r as recordCreatedDevice, t as forgetCreatedDevice } from "./created-devices-Dzd5C2LF.mjs";
|
|
6
|
+
import { d as signalProcessTree, s as pidExists } from "./metro-DnCEjCxs.mjs";
|
|
8
7
|
import { join } from "node:path";
|
|
9
8
|
import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, resolve as resolve$1 } from "path";
|
|
10
|
-
import { ANDROID_EMULATOR_APPS, getParkedMax, loadConfig, settingDefinition } from "@stim-cli/core/state";
|
|
9
|
+
import { ANDROID_EMULATOR_APPS, getParkedMax, isJsonObject, loadConfig, settingDefinition } from "@stim-cli/core/state";
|
|
11
10
|
import { existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
12
11
|
import { homedir, tmpdir } from "os";
|
|
13
12
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -34,7 +33,7 @@ function parkedMaxSetting(platform, options = {}) {
|
|
|
34
33
|
return getParkedMax(platform, options);
|
|
35
34
|
}
|
|
36
35
|
function isParkedRecord(value, platform) {
|
|
37
|
-
if (
|
|
36
|
+
if (!isJsonObject(value)) return false;
|
|
38
37
|
const record = value;
|
|
39
38
|
return typeof record.udid === "string" && typeof record.name === "string" && record.name.startsWith("stim-") && typeof record.parkedAt === "string" && (platform === "android" ? record.udid === record.name && /^stim-[A-Za-z0-9._-]+$/.test(record.name) && typeof record.systemImage === "string" && typeof record.configuration === "string" && (record.packageName === void 0 || typeof record.packageName === "string") && (record.cacheKey === void 0 || typeof record.cacheKey === "string") : typeof record.deviceTypeIdentifier === "string" && typeof record.runtimeIdentifier === "string" && typeof record.simslimManaged === "boolean" && (record.bundleId === void 0 || typeof record.bundleId === "string") && (record.cacheKey === void 0 || typeof record.cacheKey === "string") && (record.schemeApprovals === void 0 || Array.isArray(record.schemeApprovals) && record.schemeApprovals.every((v) => typeof v === "string")));
|
|
40
39
|
}
|
|
@@ -553,7 +552,8 @@ function parseAdbDevices(text) {
|
|
|
553
552
|
unhealthy
|
|
554
553
|
};
|
|
555
554
|
}
|
|
556
|
-
|
|
555
|
+
const ANDROID_LISTING_TIMEOUT_MS = 3e4;
|
|
556
|
+
function listAvds({ timeoutMs = ANDROID_LISTING_TIMEOUT_MS } = {}) {
|
|
557
557
|
return parseAvdList(getExecutor().runFile(androidToolPath("emulator"), ["-list-avds"], {
|
|
558
558
|
timeoutMs,
|
|
559
559
|
killSignal: "SIGKILL"
|
|
@@ -570,7 +570,7 @@ function listAvds({ timeoutMs } = {}) {
|
|
|
570
570
|
function androidToolCwd(platform = process.platform) {
|
|
571
571
|
return platform === "win32" ? homedir() : void 0;
|
|
572
572
|
}
|
|
573
|
-
function listAdbDevices({ timeoutMs, platform = process.platform } = {}) {
|
|
573
|
+
function listAdbDevices({ timeoutMs = ANDROID_LISTING_TIMEOUT_MS, platform = process.platform } = {}) {
|
|
574
574
|
return parseAdbDevices(getExecutor().runFile(androidToolPath("adb"), ["devices"], {
|
|
575
575
|
timeoutMs,
|
|
576
576
|
killSignal: "SIGKILL",
|
|
@@ -1142,7 +1142,7 @@ async function waitForBoot(serial, timeoutMs = 6e4, { aborted = () => false, pol
|
|
|
1142
1142
|
const exec = getExecutor();
|
|
1143
1143
|
const start = Date.now();
|
|
1144
1144
|
let exited = false;
|
|
1145
|
-
const probeTimeout = () =>
|
|
1145
|
+
const probeTimeout = () => Math.max(1, Math.min(commandTimeoutMs ?? timeoutMs, timeoutMs - (Date.now() - start)));
|
|
1146
1146
|
while (Date.now() - start < timeoutMs) {
|
|
1147
1147
|
if ((getprop(exec, serial, "sys.boot_completed", probeTimeout()) === "1" || getprop(exec, serial, "dev.bootcomplete", probeTimeout()) === "1") && packageManagerReady(exec, serial, probeTimeout())) return { ok: true };
|
|
1148
1148
|
if (aborted()) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as getConfigDir } from "./config-
|
|
2
|
-
import { r as register } from "./cache-manifest-
|
|
3
|
-
import { m as defaultAndroidLayout } from "./settings-
|
|
4
|
-
import { D as withDirLock$1, p as ensureWorkspaceStorage } from "./workspace-state-
|
|
1
|
+
import { d as getConfigDir } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { r as register } from "./cache-manifest-XH-fvDUj.mjs";
|
|
3
|
+
import { m as defaultAndroidLayout } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { D as withDirLock$1, p as ensureWorkspaceStorage } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
5
|
import { accessSync, constants, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { isJsonObject, readJsonFile } from "@stim-cli/core/state";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
+
import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
3
3
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { createHash, randomUUID } from "node:crypto";
|
package/dist/api-run.mjs
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { K as resolveProjectSettings, Q as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-
|
|
4
|
-
import { i as recordWorkspaceUse, p as ensureWorkspaceStorage, w as workspaceLogsDir$1, x as workspaceDir } from "./workspace-state-
|
|
5
|
-
import { l as phaseLine } from "./command-output-
|
|
6
|
-
import { d as projectRegistry } from "./project-
|
|
7
|
-
import { Dt as recordFinishedBuild, Ot as startBuildProgress, kt as tapBuildLog } from "./budget-
|
|
8
|
-
import { S as withNativeBuildRun, x as runCancellationSignal } from "./tailnet-
|
|
1
|
+
import { E as upsertProject, p as getProject, y as refuseRelativeStimPaths } from "./config-BYDxlMY3.mjs";
|
|
2
|
+
import { t as StimError } from "./api-qvOzWyfO.mjs";
|
|
3
|
+
import { K as resolveProjectSettings, Q as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-B717odTD.mjs";
|
|
4
|
+
import { i as recordWorkspaceUse, p as ensureWorkspaceStorage, w as workspaceLogsDir$1, x as workspaceDir } from "./workspace-state-DJt_MMvf.mjs";
|
|
5
|
+
import { l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
|
|
6
|
+
import { d as projectRegistry } from "./project-_phNIJfs.mjs";
|
|
7
|
+
import { Dt as recordFinishedBuild, Ot as startBuildProgress, kt as tapBuildLog } from "./budget-f7516Zk0.mjs";
|
|
8
|
+
import { S as withNativeBuildRun, x as runCancellationSignal } from "./tailnet-Dh-qiYzG.mjs";
|
|
9
|
+
import { n as cancelledError, r as throwIfCancelled } from "./cancellation-C_22VQTH.mjs";
|
|
9
10
|
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
10
|
-
import { y as resolveBuildPlacement } from "./client-
|
|
11
|
-
import { n as macosDir } from "./state-
|
|
12
|
-
import { n as buildAndroidOperation, t as buildIosOperation } from "./build-
|
|
13
|
-
import { i as runAndroidOperation } from "./android-
|
|
14
|
-
import { r as runIosOperation } from "./ios-
|
|
15
|
-
import {
|
|
16
|
-
import { c as stopWorkspaceNow } from "./stop-
|
|
17
|
-
import { t as runWeb } from "./web-
|
|
11
|
+
import { y as resolveBuildPlacement } from "./client-qQAaXSUs.mjs";
|
|
12
|
+
import { n as macosDir } from "./state-CG_OFoaA.mjs";
|
|
13
|
+
import { n as buildAndroidOperation, t as buildIosOperation } from "./build-DYDbfkk5.mjs";
|
|
14
|
+
import { i as runAndroidOperation } from "./android-DCKZrNvV.mjs";
|
|
15
|
+
import { r as runIosOperation } from "./ios-Ce7bc7br.mjs";
|
|
16
|
+
import { i as buildMacosBundle, n as runMacos } from "./macos-Ch5VJmcS.mjs";
|
|
17
|
+
import { c as stopWorkspaceNow } from "./stop-BNmBMi1F.mjs";
|
|
18
|
+
import { t as runWeb } from "./web-BDBMxDpx.mjs";
|
|
18
19
|
import { mkdirSync, mkdtempSync, realpathSync, rmSync } from "node:fs";
|
|
19
20
|
import { join } from "node:path";
|
|
20
21
|
import { queryJsonLogs } from "@stim-cli/core/state";
|
|
@@ -75,7 +76,7 @@ async function buildMacosOperation(root, options) {
|
|
|
75
76
|
record: build,
|
|
76
77
|
buildMachine: placement.selected
|
|
77
78
|
});
|
|
78
|
-
|
|
79
|
+
throwIfCancelled(runCancellationSignal(), "macOS build");
|
|
79
80
|
const executable = realpathSync(join(bundle, "Contents", "MacOS", recipe.product));
|
|
80
81
|
build.state = "ok";
|
|
81
82
|
succeeded = true;
|
|
@@ -88,10 +89,7 @@ async function buildMacosOperation(root, options) {
|
|
|
88
89
|
logs: { dir: logs }
|
|
89
90
|
};
|
|
90
91
|
} catch (error) {
|
|
91
|
-
const failure = runCancellationSignal()?.aborted ?
|
|
92
|
-
code: "STIM_CANCELLED",
|
|
93
|
-
cause: error
|
|
94
|
-
}) : error;
|
|
92
|
+
const failure = runCancellationSignal()?.aborted ? cancelledError("macOS build", error) : error;
|
|
95
93
|
build.state = "failed";
|
|
96
94
|
build.error = failure instanceof Error ? failure.message : String(failure);
|
|
97
95
|
build.errorCode = failure.code;
|
package/dist/api.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createStim, t as StimError } from "./api-
|
|
1
|
+
import { n as createStim, t as StimError } from "./api-qvOzWyfO.mjs";
|
|
2
2
|
export { StimError, createStim };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as deviceHoldsApk, g as listUserApps, k as uninstallIosApp, u as iosSimulatorFailureAdvice, z as deviceHoldsBundle } from "./ios-
|
|
3
|
-
import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-
|
|
1
|
+
import { r as debugLog, t as getExecutor } from "./exec-DqKo9GKJ.mjs";
|
|
2
|
+
import { R as deviceHoldsApk, g as listUserApps, k as uninstallIosApp, u as iosSimulatorFailureAdvice, z as deviceHoldsBundle } from "./ios-RkW4pnQf.mjs";
|
|
3
|
+
import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-B5veSDDQ.mjs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
//#region src/engine/app-schemes.ts
|
|
6
6
|
function schemesFromInfoPlist(plist) {
|
|
@@ -24,7 +24,7 @@ function readBundleSchemes(appPath, { exec = null } = {}) {
|
|
|
24
24
|
"-o",
|
|
25
25
|
"-",
|
|
26
26
|
join(appPath, "Info.plist")
|
|
27
|
-
]);
|
|
27
|
+
], { timeoutMs: 1e4 });
|
|
28
28
|
} catch {
|
|
29
29
|
return [];
|
|
30
30
|
}
|
|
@@ -205,10 +205,16 @@ function parseLaunchedPid(text) {
|
|
|
205
205
|
const pid = Number(match[1]);
|
|
206
206
|
return Number.isInteger(pid) && pid > 0 ? pid : null;
|
|
207
207
|
}
|
|
208
|
+
function appProcessFromPid(pid) {
|
|
209
|
+
return pid === null ? { state: "stopped" } : {
|
|
210
|
+
state: "running",
|
|
211
|
+
pid
|
|
212
|
+
};
|
|
213
|
+
}
|
|
208
214
|
function iosAppProcess(udid, bundleId, { exec = null } = {}) {
|
|
209
215
|
const e = exec || getExecutor();
|
|
210
216
|
const started = performance.now();
|
|
211
|
-
let
|
|
217
|
+
let probe = { state: "unknown" };
|
|
212
218
|
let failure = {};
|
|
213
219
|
try {
|
|
214
220
|
const out = e.runFile("xcrun", [
|
|
@@ -219,29 +225,32 @@ function iosAppProcess(udid, bundleId, { exec = null } = {}) {
|
|
|
219
225
|
"list"
|
|
220
226
|
], { timeoutMs: 2e3 });
|
|
221
227
|
const label = `UIKitApplication:${bundleId}[`;
|
|
222
|
-
|
|
228
|
+
probe = { state: "stopped" };
|
|
223
229
|
for (const line of out.split("\n")) {
|
|
224
230
|
if (!line.includes(label)) continue;
|
|
225
231
|
const candidate = Number(line.trim().split(/\s+/)[0]);
|
|
226
232
|
if (Number.isInteger(candidate) && candidate > 0) {
|
|
227
|
-
|
|
233
|
+
probe = {
|
|
234
|
+
state: "running",
|
|
235
|
+
pid: candidate
|
|
236
|
+
};
|
|
228
237
|
break;
|
|
229
238
|
}
|
|
230
239
|
}
|
|
231
|
-
return
|
|
240
|
+
return probe;
|
|
232
241
|
} catch (error) {
|
|
233
242
|
const { code, status } = error ?? {};
|
|
234
243
|
failure = {
|
|
235
244
|
...typeof code === "string" ? { code } : {},
|
|
236
245
|
...typeof status === "number" ? { exit: status } : {}
|
|
237
246
|
};
|
|
238
|
-
return;
|
|
247
|
+
return probe;
|
|
239
248
|
} finally {
|
|
240
249
|
debugLog.log("ios.app-process", {
|
|
241
250
|
deviceId: udid,
|
|
242
251
|
bundleId,
|
|
243
|
-
state:
|
|
244
|
-
...
|
|
252
|
+
state: probe.state === "stopped" ? "absent" : probe.state,
|
|
253
|
+
...probe.state === "running" ? { appPid: probe.pid } : {},
|
|
245
254
|
ms: Math.round(performance.now() - started),
|
|
246
255
|
...failure
|
|
247
256
|
});
|
|
@@ -250,12 +259,13 @@ function iosAppProcess(udid, bundleId, { exec = null } = {}) {
|
|
|
250
259
|
function launchedIosAppAfterNoHandle(error, udid, bundleId, exec) {
|
|
251
260
|
const stderr = String(error?.stderr ?? "");
|
|
252
261
|
if (!stderr.includes("domain=NSPOSIXErrorDomain, code=3") || !stderr.includes(`Application launch for '${bundleId}' did not return a process handle nor launch error.`)) return null;
|
|
253
|
-
|
|
262
|
+
const probe = iosAppProcess(udid, bundleId, { exec });
|
|
263
|
+
return probe.state === "running" ? probe.pid : null;
|
|
254
264
|
}
|
|
255
265
|
function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null, devMenuParams = false, consolePaths }, { exec = null } = {}) {
|
|
256
266
|
const e = exec || getExecutor();
|
|
257
|
-
const
|
|
258
|
-
const stateUnknown =
|
|
267
|
+
const running = iosAppProcess(udid, bundleId, { exec: e });
|
|
268
|
+
const stateUnknown = running.state === "unknown";
|
|
259
269
|
const launchArgs = [
|
|
260
270
|
"simctl",
|
|
261
271
|
"launch",
|
|
@@ -265,7 +275,7 @@ function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null, devMe
|
|
|
265
275
|
bundleId
|
|
266
276
|
];
|
|
267
277
|
const restart = {};
|
|
268
|
-
if (
|
|
278
|
+
if (running.state === "running") {
|
|
269
279
|
try {
|
|
270
280
|
e.runFile("xcrun", [
|
|
271
281
|
"simctl",
|
|
@@ -277,10 +287,10 @@ function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null, devMe
|
|
|
277
287
|
return {
|
|
278
288
|
failed: true,
|
|
279
289
|
code: LAUNCH_ERROR,
|
|
280
|
-
reason: `simctl terminate ${bundleId} failed, so the running app (pid ${
|
|
290
|
+
reason: `simctl terminate ${bundleId} failed, so the running app (pid ${running.pid}) was not restarted: ${describeIosSimulatorFailure(err, e)}`
|
|
281
291
|
};
|
|
282
292
|
}
|
|
283
|
-
restart.restartedPid =
|
|
293
|
+
restart.restartedPid = running.pid;
|
|
284
294
|
}
|
|
285
295
|
if (metroPort !== null) {
|
|
286
296
|
try {
|
|
@@ -620,7 +630,7 @@ function amStartError(text) {
|
|
|
620
630
|
}
|
|
621
631
|
return null;
|
|
622
632
|
}
|
|
623
|
-
function openAndroidDevClientUrl({ serial, url, packageName }, { exec = null } = {}) {
|
|
633
|
+
function openAndroidDevClientUrl({ serial, url, packageName, stopOnStart = false }, { exec = null } = {}) {
|
|
624
634
|
const e = exec || getExecutor();
|
|
625
635
|
let out;
|
|
626
636
|
try {
|
|
@@ -630,6 +640,7 @@ function openAndroidDevClientUrl({ serial, url, packageName }, { exec = null } =
|
|
|
630
640
|
"shell",
|
|
631
641
|
"am",
|
|
632
642
|
"start",
|
|
643
|
+
...stopOnStart ? ["-S"] : [],
|
|
633
644
|
"-a",
|
|
634
645
|
"android.intent.action.VIEW",
|
|
635
646
|
"-d",
|
|
@@ -657,8 +668,9 @@ function openAndroidDevClientUrl({ serial, url, packageName }, { exec = null } =
|
|
|
657
668
|
};
|
|
658
669
|
}
|
|
659
670
|
function stopRunningAndroidApp(serial, packageName, exec) {
|
|
660
|
-
const
|
|
661
|
-
if (
|
|
671
|
+
const running = androidAppProcess(serial, packageName, { exec });
|
|
672
|
+
if (running.state === "stopped") return {};
|
|
673
|
+
if (running.state !== "running") return { stopOnStart: true };
|
|
662
674
|
try {
|
|
663
675
|
exec.runFile("adb", [
|
|
664
676
|
"-s",
|
|
@@ -672,14 +684,35 @@ function stopRunningAndroidApp(serial, packageName, exec) {
|
|
|
672
684
|
return {
|
|
673
685
|
failed: true,
|
|
674
686
|
code: LAUNCH_ERROR,
|
|
675
|
-
reason: `am force-stop ${packageName} failed on ${serial}, so the running app (pid ${pid}) was not restarted: ${describe(err)}`
|
|
687
|
+
reason: `am force-stop ${packageName} failed on ${serial}, so the running app (pid ${running.pid}) was not restarted: ${describe(err)}`
|
|
676
688
|
};
|
|
677
689
|
}
|
|
678
|
-
return { restartedPid: pid };
|
|
690
|
+
return { restartedPid: running.pid };
|
|
691
|
+
}
|
|
692
|
+
function launchAndroidWithMonkey(serial, packageName, stopOnStart, exec) {
|
|
693
|
+
if (stopOnStart) try {
|
|
694
|
+
exec.runFile("adb", [
|
|
695
|
+
"-s",
|
|
696
|
+
serial,
|
|
697
|
+
"shell",
|
|
698
|
+
"am",
|
|
699
|
+
"force-stop",
|
|
700
|
+
packageName
|
|
701
|
+
], ADB_SHELL_OPTIONS);
|
|
702
|
+
} catch {}
|
|
703
|
+
exec.runFile("adb", [
|
|
704
|
+
"-s",
|
|
705
|
+
serial,
|
|
706
|
+
"shell",
|
|
707
|
+
"monkey",
|
|
708
|
+
"-p",
|
|
709
|
+
packageName,
|
|
710
|
+
"1"
|
|
711
|
+
], ADB_SHELL_OPTIONS);
|
|
679
712
|
}
|
|
680
713
|
function launchAndroidApp({ serial, packageName, metroPort, devClientScheme = null, physical = false, bridgePort }, { exec = null } = {}) {
|
|
681
714
|
const e = exec || getExecutor();
|
|
682
|
-
const restart = stopRunningAndroidApp(serial, packageName, e);
|
|
715
|
+
const { stopOnStart = false, ...restart } = stopRunningAndroidApp(serial, packageName, e);
|
|
683
716
|
if (restart.failed) return restart;
|
|
684
717
|
const reversed = reverseMetroPorts({
|
|
685
718
|
serial,
|
|
@@ -714,7 +747,8 @@ function launchAndroidApp({ serial, packageName, metroPort, devClientScheme = nu
|
|
|
714
747
|
const url = androidDevClientUrl(devClientScheme, metroPort, physical);
|
|
715
748
|
const opened = openAndroidDevClientUrl({
|
|
716
749
|
serial,
|
|
717
|
-
url
|
|
750
|
+
url,
|
|
751
|
+
stopOnStart
|
|
718
752
|
}, { exec: e });
|
|
719
753
|
if (opened.ok) return {
|
|
720
754
|
ok: true,
|
|
@@ -732,6 +766,7 @@ function launchAndroidApp({ serial, packageName, metroPort, devClientScheme = nu
|
|
|
732
766
|
"shell",
|
|
733
767
|
"am",
|
|
734
768
|
"start",
|
|
769
|
+
...stopOnStart ? ["-S"] : [],
|
|
735
770
|
"-n",
|
|
736
771
|
component
|
|
737
772
|
], ADB_SHELL_OPTIONS);
|
|
@@ -750,15 +785,7 @@ function launchAndroidApp({ serial, packageName, metroPort, devClientScheme = nu
|
|
|
750
785
|
};
|
|
751
786
|
}
|
|
752
787
|
try {
|
|
753
|
-
|
|
754
|
-
"-s",
|
|
755
|
-
serial,
|
|
756
|
-
"shell",
|
|
757
|
-
"monkey",
|
|
758
|
-
"-p",
|
|
759
|
-
packageName,
|
|
760
|
-
"1"
|
|
761
|
-
], ADB_SHELL_OPTIONS);
|
|
788
|
+
launchAndroidWithMonkey(serial, packageName, stopOnStart, e);
|
|
762
789
|
return {
|
|
763
790
|
ok: true,
|
|
764
791
|
mode: "monkey",
|
|
@@ -775,7 +802,7 @@ function launchAndroidApp({ serial, packageName, metroPort, devClientScheme = nu
|
|
|
775
802
|
}
|
|
776
803
|
function launchAndroidReleaseApp({ serial, packageName }, { exec = null } = {}) {
|
|
777
804
|
const e = exec || getExecutor();
|
|
778
|
-
const restart = stopRunningAndroidApp(serial, packageName, e);
|
|
805
|
+
const { stopOnStart = false, ...restart } = stopRunningAndroidApp(serial, packageName, e);
|
|
779
806
|
if (restart.failed) return restart;
|
|
780
807
|
const component = resolveLaunchActivity(serial, packageName, { exec: e });
|
|
781
808
|
if (component) try {
|
|
@@ -785,6 +812,7 @@ function launchAndroidReleaseApp({ serial, packageName }, { exec = null } = {})
|
|
|
785
812
|
"shell",
|
|
786
813
|
"am",
|
|
787
814
|
"start",
|
|
815
|
+
...stopOnStart ? ["-S"] : [],
|
|
788
816
|
"-n",
|
|
789
817
|
component
|
|
790
818
|
], ADB_SHELL_OPTIONS);
|
|
@@ -802,15 +830,7 @@ function launchAndroidReleaseApp({ serial, packageName }, { exec = null } = {})
|
|
|
802
830
|
};
|
|
803
831
|
}
|
|
804
832
|
try {
|
|
805
|
-
|
|
806
|
-
"-s",
|
|
807
|
-
serial,
|
|
808
|
-
"shell",
|
|
809
|
-
"monkey",
|
|
810
|
-
"-p",
|
|
811
|
-
packageName,
|
|
812
|
-
"1"
|
|
813
|
-
], ADB_SHELL_OPTIONS);
|
|
833
|
+
launchAndroidWithMonkey(serial, packageName, stopOnStart, e);
|
|
814
834
|
return {
|
|
815
835
|
ok: true,
|
|
816
836
|
mode: "monkey",
|
|
@@ -855,19 +875,22 @@ function androidAppProcess(serial, packageName, { exec = null } = {}) {
|
|
|
855
875
|
"pidof",
|
|
856
876
|
packageName
|
|
857
877
|
], ADB_SHELL_OPTIONS));
|
|
858
|
-
if (pid !== null) return
|
|
878
|
+
if (pid !== null) return {
|
|
879
|
+
state: "running",
|
|
880
|
+
pid
|
|
881
|
+
};
|
|
859
882
|
} catch {}
|
|
860
883
|
try {
|
|
861
|
-
return parsePsPid(e.runFile("adb", [
|
|
884
|
+
return appProcessFromPid(parsePsPid(e.runFile("adb", [
|
|
862
885
|
"-s",
|
|
863
886
|
serial,
|
|
864
887
|
"shell",
|
|
865
888
|
"ps",
|
|
866
889
|
"-A"
|
|
867
|
-
], ADB_SHELL_OPTIONS), packageName);
|
|
890
|
+
], ADB_SHELL_OPTIONS), packageName));
|
|
868
891
|
} catch {
|
|
869
|
-
return;
|
|
892
|
+
return { state: "unknown" };
|
|
870
893
|
}
|
|
871
894
|
}
|
|
872
895
|
//#endregion
|
|
873
|
-
export {
|
|
896
|
+
export { restartedAppNote as C, readBundleSchemes as D, pickDevClientScheme as E, schemesFromInfoPlist as O, launchIosApp as S, writeDebugHttpHost as T, installConflictKind as _, IOS_DEV_MENU_OFF_DEFAULTS_PLIST as a, launchAndroidApp as b, androidDevClientUrl as c, devClientDeepLink as d, devClientUrl as f, installAndroidApp as g, hasMetroReverse as h, INSTALL_ERROR as i, appProcessFromPid as l, ensureMetroReverse as m, ANDROID_DISABLE_AUTO_LAUNCH_EXTRA as n, LAUNCH_ERROR as o, deviceShellArg as p, DEFAULT_METRO_PORT as r, androidAppProcess as s, ADB_INSTALL_TIMEOUT_MS as t, clearOtherUserApps as u, installIosApp as v, reverseMetroPorts as w, launchAndroidReleaseApp as x, iosAppProcess as y };
|