stim 1.26.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/dist/{acquire-artifact-DVsvSwf7.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-C-BqJEpu.mjs → act-ROviTF_t.mjs} +297 -122
- package/dist/{activity-Lnb_EoRY.mjs → activity-Cd-ysFes.mjs} +6 -6
- package/dist/{agent-device-usage-output-DbXy5tg8.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CSbLRD53.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-CiNQw3kq.mjs → android-Cd6w7_qw.mjs} +96 -43
- package/dist/{android-B5P81yI-.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-DTAcRwBC.mjs → android-DriNoAVy.mjs} +23 -18
- package/dist/{android-cas-BTVhZ0Qs.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api.d.mts +13 -3
- package/dist/api.mjs +39 -29
- package/dist/{apk-signed-tail-B46U9hXc.mjs → apk-signed-tail-BHQHx3Rm.mjs} +2 -2
- package/dist/{artifact-BxREhAaV.mjs → artifact-0AGJYB9O.mjs} +18 -23
- package/dist/{artifact-CsAP6AGK.mjs → artifact-faemIZv5.mjs} +19 -24
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-rYPyqhTf.mjs → browser-web-slD8AvLp.mjs} +16 -16
- package/dist/{build-cache-DrXNCy3T.mjs → build-cache-gBJ-WKzA.mjs} +43 -21
- package/dist/{build-DPhApsjV.mjs → build-hS0QyFlQ.mjs} +35 -31
- package/dist/{build-plan-DrMMdayj.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BEZ9Bpl1.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-k2mZGvvk.mjs → ccache-BWTze1Ls.mjs} +560 -1603
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-BBKFGOFl.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-D9CaRks-.mjs → client-xsdxrhWA.mjs} +48 -62
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BF5AR2dL.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BktkY_zC.mjs → config-Cn94Jc0g.mjs} +23 -4
- package/dist/{dependencies-Dw6wfQdv.mjs → dependencies-BGokZ-Ng.mjs} +108 -60
- package/dist/{dependency-state-DFB41vfr.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-DXR_tPVY.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-BcYeHSFu.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-DCSvUF0l.mjs → device-capacity-6LP7QsaA.mjs} +101 -16
- package/dist/device-host-worker.mjs +19 -19
- package/dist/{device-ios-BLGfXQeK.mjs → device-ios-534c14fz.mjs} +251 -23
- package/dist/{device-lease-run-BmvIl7bI.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-Dluix4H3.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-BK-zwyd_.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-Cp-BhzTS.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-Bhg1ii70.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-OnwP94ne.mjs → doctor-F-3VUUyN.mjs} +76 -32
- package/dist/{doctor-fingerprint-D3a04Mhu.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BStK05nt.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-Dsj93iM9.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-B5vygTiD.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-BOOm9Db7.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-C_79zvz4.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-ldgr-hXU.mjs → gc-CGZ1Yg88.mjs} +160 -45
- package/dist/{guide-D7K0X6KG.mjs → guide-_rfEh_zM.mjs} +580 -183
- package/dist/{hosted-android-Bk54ej6n.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-fHO8yqzc.mjs → hosted-client-D7Pk_Oo1.mjs} +12 -8
- package/dist/{hosted-logs-BfbmDM4M.mjs → hosted-logs-B1gqQuva.mjs} +8 -8
- package/dist/{hosted-logs-sync-B0pvmOk-.mjs → hosted-logs-sync-Dg3qrZmV.mjs} +5 -5
- package/dist/{hosted-macos-CPl0OZ9h.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-CpDB3-PO.mjs → hosted-native-CdgaiuyP.mjs} +17 -16
- package/dist/{idle-shutdown-FfxL1KdG.mjs → idle-shutdown-Cbvo5KEh.mjs} +7 -8
- package/dist/{ios-ftxdQbJS.mjs → ios-B5HlVMhQ.mjs} +92 -37
- package/dist/{ios-B7-lToDu.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-WxpDJ5T1.mjs → ios-E26qSpkb.mjs} +27 -11
- package/dist/{ios-device-CsyryvpT.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-Ty5pHl9O.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-Cw7-WQf2.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-BMhXYVDS.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-DOp8RjDz.mjs → launch-CRyBeNsA.mjs} +42 -38
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-dQDki6Tt.mjs → logs-CC_-ZzEE.mjs} +7 -7
- package/dist/{logs-s1dRIG1E.mjs → logs-aJQb-RDg.mjs} +46 -21
- package/dist/{macos-B0VEV3Gf.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-DBBPNnIA.mjs → macos-DlCBhMw5.mjs} +73 -38
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-CjC10t6E.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-B6_PgD0L.mjs → metro-gateway-BnHdqMO_.mjs} +3 -3
- package/dist/{named-ports-BG0j1X4g.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-CL2NGiik.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-btSUulme.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-Dq3RBcON.mjs → native-runtime-DqaIBO5w.mjs} +9 -8
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-BW7H8JGu.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-CBXJAxfC.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -17
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.mjs +23 -24
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-BjYvMNX_.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-lmj6kcPm.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DIFPQAXp.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-IiiSQhtz.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-C2_w1Z0Z.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/{prebuild-gmouvmJZ.mjs → prebuild-BDpToDgR.mjs} +16 -17
- package/dist/{project-BUu6Is4k.mjs → project-DYj-HVx6.mjs} +17 -17
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-Cgg99REN.mjs → react-native-android-DDBccgJw.mjs} +32 -26
- package/dist/{react-native-build-oNwqF5Wb.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BhA3KUte.mjs → react-native-doctor-B-Mw6DcR.mjs} +6 -6
- package/dist/{react-native-ios-B-nf4rjN.mjs → react-native-ios-DjYwUF9U.mjs} +23 -17
- package/dist/{recordings-BldzVKq0.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-C9OduiNc.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-CCR7KC_l.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-C8S7FlPF.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-7F5hEwQJ.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BqB0v3pt.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-BNPBZ6T5.mjs → selection-Bs8phwhN.mjs} +37 -29
- package/dist/{server-bare-A75rDIdD.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CssKFOD7.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-eQfOdydb.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-CosW5X-S.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-OaGQF-ri.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 +51 -33
- package/dist/{simslim-Bax1qcxu.mjs → simslim-DCQwzoPy.mjs} +2 -2
- package/dist/{slot-launch-CYCEhfBY.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-jKQ7CP_B.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C_wefNKB.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-_BdJ32cZ.mjs → start-DrPwER_2.mjs} +27 -22
- package/dist/{state-C1i2nMOP.mjs → state-BX1y5syV.mjs} +4 -4
- package/dist/{state-C4OdpOTF.mjs → state-CZxLyetD.mjs} +2 -2
- package/dist/{stats-tEpEEH-u.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-CRXz-Gtj.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-DQrqodLj.mjs → status-BfnK9pUd.mjs} +25 -25
- package/dist/{status-B9M7x4CZ.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-B5wDIH_o.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-6Dqp-gjX.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-ySNQHXMG.mjs → stop-CH79S3IZ.mjs} +5 -5
- package/dist/{stop-DRqQVqDJ.mjs → stop-D-EAr25B.mjs} +21 -20
- package/dist/{stop-CmdNhGlC.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.mjs +17 -17
- package/dist/{support-CVOCp0Ft.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-BGSCBoib.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-CfUzt_0Z.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-x6HPpl_2.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/{toolchain-J4J8MrAr.mjs → toolchain-CbCG6C5Z.mjs} +321 -15
- package/dist/{toolchain-DoavrvIA.mjs → toolchain-JYAOquPg.mjs} +1 -1
- package/dist/{trigger-KVaWWNyn.mjs → trigger-DMou-X7j.mjs} +2 -2
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-DvhTX_eu.mjs → warm-progress-C0RsbngN.mjs} +731 -727
- package/dist/{web-Bihbf7-u.mjs → web-Cq_AQ4DK.mjs} +9 -9
- 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-pUg3_RRA.mjs → workspace-state-BjqdjnJR.mjs} +3 -3
- package/dist/{workspaces-g2lhdBXF.mjs → workspaces-DFbj07jp.mjs} +1795 -70
- package/dist/{worktree-BKuklFh_.mjs → worktree-COAJ3-OD.mjs} +934 -514
- package/dist/{worktree-Bm4cb-nU.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +7 -7
- package/dist/ccache-Bx5TbxwG.mjs +0 -143
- package/dist/eas-fallback-FwkeqqGi.mjs +0 -381
- package/dist/hosted-ios-D55QhYaD.mjs +0 -15
- package/dist/native-run-BfIDFKLH.mjs +0 -275
- package/dist/server-expo-wvcj5tiZ.mjs +0 -2
- package/dist/settings-write-QjYfSrjF.mjs +0 -360
- package/dist/trigger-DzJu208Q.mjs +0 -2
- package/dist/web-BFLueSh-.mjs +0 -2
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import { o as cancellableSleep, t as getExecutor } from "./exec-
|
|
2
|
-
import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-
|
|
3
|
-
import { B as deviceSlotFileKey, E as upsertProject, O as withConfigLockAsync, V as deviceSlotKey, p as getProject, u as getConcurrencyLimits, v as recordIosSchemeApprovals } from "./config-
|
|
4
|
-
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-
|
|
7
|
-
import { o as workspaceLinks } from "./stim-desktop-
|
|
8
|
-
import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-
|
|
17
|
-
import { n as hostedMetroPortProbe } from "./hosted-native-
|
|
18
|
-
import {
|
|
19
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
20
|
-
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-
|
|
21
|
-
import {
|
|
1
|
+
import { o as cancellableSleep, t as getExecutor, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { B as deviceSlotFileKey, E as upsertProject, O as withConfigLockAsync, V as deviceSlotKey, p as getProject, u as getConcurrencyLimits, v as recordIosSchemeApprovals } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { $t as makeTemporaryDirectory, J as resolveCacheProviderConfig, Lt as repoRootAsync, Q as resolveSettings, at as settingsLayers, dt as detectProviders, en as removeTemporaryEntry, nt as settingOriginScope, xt as gitCommonDirAsync } from "./settings-BDVI8Ivc.mjs";
|
|
6
|
+
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-DYj-HVx6.mjs";
|
|
7
|
+
import { o as workspaceLinks } from "./stim-desktop-CbWo21kb.mjs";
|
|
8
|
+
import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-CvyD-xwe.mjs";
|
|
9
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
10
|
+
import { An as checkEasAuth, At as ensureRemoteBootOwned, Bt as RELEASE_VERIFY_WAIT_MS, Cn as gateMetroOrigin, Dt as bundleEntryPoint, Gt as unattributedLaunchLines, Ht as isBundleProof, It as LAUNCH_BUNDLING, Jt as verifyLaunch, Kt as unverifiedLaunchLines, Ln as resolveEasCliBin, Lt as LAUNCH_FATAL, Nn as loadProjectProvider, Nt as remoteIosDeps, Pt as resolveRemoteContext, Rn as resolveRemote, Rt as LAUNCH_UNVERIFIED, Sn as readRemoteSimulatorArch, Ut as readCollectorRecords, Wt as readMetroRecords, Yt as verifyReleaseLaunch, an as devClientUrl, c as budgetGate, dn as installIosApp, en as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, fn as iosAppProcess, gn as restartedAppNote, hn as launchIosApp, in as clearOtherUserApps, kt as ensureMetroReachable, zn as uploadRemote } from "./ccache-BWTze1Ls.mjs";
|
|
11
|
+
import { at as recordRunStats, rt as recordCapacityRefusal, tt as readRunEstimates, xt as releaseBuildSlot, yt as acquireBuildSlot } from "./workspaces-DFbj07jp.mjs";
|
|
12
|
+
import { B as readBundleExecutable, H as resolveScheme, O as runPodInstall, T as readPodState, V as readBundleId, w as podsAreStale } from "./toolchain-CbCG6C5Z.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-Cd-ysFes.mjs";
|
|
14
|
+
import { A as untrackedNativeFiles, C as resolveBuild, c as evictBuild, m as fingerprintProject, w as storeBuild } from "./build-cache-gBJ-WKzA.mjs";
|
|
15
|
+
import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-E26qSpkb.mjs";
|
|
16
|
+
import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-BZ03NFgF.mjs";
|
|
17
|
+
import { n as hostedMetroPortProbe } from "./hosted-native-CdgaiuyP.mjs";
|
|
18
|
+
import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-C9yAaKEv.mjs";
|
|
19
|
+
import { n as verifyCollectorOwnership } from "./ownership-Bx-0cku-.mjs";
|
|
20
|
+
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-0l7RqSpr.mjs";
|
|
21
|
+
import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-DaK2IFyP.mjs";
|
|
22
|
+
import { c as startDevServer, g as detectBundleId } from "./start-DrPwER_2.mjs";
|
|
22
23
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
23
|
-
import { a as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { a as
|
|
29
|
-
import { a as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-
|
|
37
|
-
import { t as selectFromPool } from "./device-pool-
|
|
38
|
-
import {
|
|
39
|
-
import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-
|
|
40
|
-
import { i as swapJsBundle } from "./js-swap-
|
|
24
|
+
import { a as acquireRunLease, c as lostRefusal, d as runLease, s as lostLine, t as DEBUG_VERIFY_STEP_MS, u as releaseLeaseOnAbort } from "./device-lease-run-DwsGfjUN.mjs";
|
|
25
|
+
import { r as checkDeviceCapacity } from "./device-capacity-6LP7QsaA.mjs";
|
|
26
|
+
import { n as clearIosAdoptionPending } from "./device-ios-534c14fz.mjs";
|
|
27
|
+
import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-Be0UeVZU.mjs";
|
|
28
|
+
import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-BJzvDPfU.mjs";
|
|
29
|
+
import { a as resolveEasDevelopmentBuild } from "./eas-build-CjNSWmjo.mjs";
|
|
30
|
+
import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-snej9k4j.mjs";
|
|
31
|
+
import { t as followHostedLaunchLogs } from "./hosted-logs-sync-Dg3qrZmV.mjs";
|
|
32
|
+
import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-BDpToDgR.mjs";
|
|
33
|
+
import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-DqaIBO5w.mjs";
|
|
34
|
+
import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-BMca82xo.mjs";
|
|
35
|
+
import { t as automaticDevicePlacement } from "./auto-placement-z-H5pJza.mjs";
|
|
36
|
+
import { t as checkEasFallback } from "./eas-fallback-9fqb46kW.mjs";
|
|
37
|
+
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-tM41-TUq.mjs";
|
|
38
|
+
import { t as selectFromPool } from "./device-pool-BnQqvs6o.mjs";
|
|
39
|
+
import { s as reportIosResult } from "./ios-project-D8Jcy_br.mjs";
|
|
40
|
+
import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-C_QkIf1Z.mjs";
|
|
41
|
+
import { i as swapJsBundle } from "./js-swap-Dg2a945i.mjs";
|
|
41
42
|
import { mkdirSync, openSync, writeFileSync } from "node:fs";
|
|
42
43
|
import { networkInterfaces } from "node:os";
|
|
43
44
|
import { basename, join } from "node:path";
|
|
@@ -231,7 +232,8 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
231
232
|
return running.state === "unknown" ? null : running.state === "running";
|
|
232
233
|
};
|
|
233
234
|
const siblings = metroCheck ? await siblingPlatformSlots(root, "ios", slot) : [];
|
|
234
|
-
const verification = metroCheck ? await d.verifyLaunch({
|
|
235
|
+
const verification = metroCheck ? await withDrainingCancellation(operation, operation?.signal, () => d.verifyLaunch({
|
|
236
|
+
signal: operation?.signal,
|
|
235
237
|
requireBundleResponse: true,
|
|
236
238
|
slot: launchSlotScope(root, slot),
|
|
237
239
|
appPid: physical || remoteDevice ? null : launched?.pid,
|
|
@@ -251,7 +253,7 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
251
253
|
const running = await iosAppProcess(udid, bundleId);
|
|
252
254
|
return running.state === "unknown" ? null : running.state === "running";
|
|
253
255
|
}
|
|
254
|
-
}) : {
|
|
256
|
+
})) : {
|
|
255
257
|
verified: false,
|
|
256
258
|
skipped: true
|
|
257
259
|
};
|
|
@@ -395,6 +397,27 @@ async function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }
|
|
|
395
397
|
for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by the previous workspace`)));
|
|
396
398
|
return `Could not remove ${swept.failed.join(", ")}, left by the previous workspace.`;
|
|
397
399
|
}
|
|
400
|
+
async function evictUnbindableCacheHit({ d, root, slot, udid, bundleId, appPath, launchedAt, logsDir, cacheHit, providerName, storeKey, runCommand, local, logFields, operation }) {
|
|
401
|
+
if (!cacheHit || !storeKey || !bundleId || !local) return null;
|
|
402
|
+
const symbol = (await captureNativeCrashes({
|
|
403
|
+
root,
|
|
404
|
+
slot,
|
|
405
|
+
platform: "ios",
|
|
406
|
+
deviceId: udid,
|
|
407
|
+
appId: bundleId,
|
|
408
|
+
since: launchedAt,
|
|
409
|
+
appPath
|
|
410
|
+
}, logsDir, operation?.signal, operation?.env)).map(bundleBindFailure).find(Boolean);
|
|
411
|
+
if (!symbol || !await d.evictBuild("ios", storeKey)) return null;
|
|
412
|
+
const provider = cacheHit === "remote" || Boolean(providerName);
|
|
413
|
+
return {
|
|
414
|
+
code: "STIM_LAUNCH_FAILED",
|
|
415
|
+
message: `The cached app cannot start: dyld could not bind ${symbol} between two parts of the app itself.`,
|
|
416
|
+
remedy: `Stim removed the cache entry ${storeKey}${provider ? ", but the cache provider may still hold its copy" : ""}. Run \`${runCommand}\`${provider ? " with `--no-build-cache`" : ""} again to build the app fresh. If the fresh app crashes the same way, the project's own native code is the cause.`,
|
|
417
|
+
logPath: logsDir,
|
|
418
|
+
build: logFields
|
|
419
|
+
};
|
|
420
|
+
}
|
|
398
421
|
function installMayBeProven(adopting, parkedCacheKey, storeKey) {
|
|
399
422
|
return !adopting || !parkedCacheKey || parkedCacheKey === storeKey;
|
|
400
423
|
}
|
|
@@ -425,8 +448,9 @@ async function recordIosReloadTarget({ d, root, physical, remoteDevice, bundleId
|
|
|
425
448
|
function installFailureRemedy(remoteDevice) {
|
|
426
449
|
return remoteDevice?.failureRemedy() ?? "Check that the simulator is booted and that the app was built for the simulator SDK.";
|
|
427
450
|
}
|
|
428
|
-
function launchFailureRemedy(remoteDevice, udid, bundleId, logFile) {
|
|
451
|
+
function launchFailureRemedy(remoteDevice, udid, bundleId, logFile, reason) {
|
|
429
452
|
if (remoteDevice) return remoteDevice.failureRemedy();
|
|
453
|
+
if (reason && /system shell .*probably crashed/.test(reason)) return `SpringBoard, the simulator's system shell, is not running, and only a reboot brings it back. Run \`stim stop\`, then \`stim ios\` again. Repeated crashes leave SpringBoard reports in ~/Library/Logs/DiagnosticReports.`;
|
|
430
454
|
return `If the simulator timed out, run \`stim doctor --platform ios\` and resolve any reported host memory pressure before retrying. Otherwise run \`xcrun simctl launch --terminate-running-process --console ${udid} ${bundleId}\` to see what the app reports, and check ${logFile}.`;
|
|
431
455
|
}
|
|
432
456
|
async function finishIosRun({ operation, output, projectBundleId, runtime, runtimePreparation, devicePlacement, artifact, d, root, slot, json, release, configuration, buildScheme, isExpo, metroCheck, metroPort, logsDir, logFile, device, udid, physical, wireless, lanAddress, lanOriginUrl, remoteDevice, bootPromise, bootDuration, bootPending, fail, phase, note, logWriter, elapsed, startedAt, closeWriter, lease, releaseLease, recordRun, reclaimed, devServer, enterPhase, enterActivity }) {
|
|
@@ -488,6 +512,27 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
488
512
|
let installSkipped = false;
|
|
489
513
|
let launched;
|
|
490
514
|
let launchedAt = d.now();
|
|
515
|
+
const evictUnbound = () => evictUnbindableCacheHit({
|
|
516
|
+
d,
|
|
517
|
+
root,
|
|
518
|
+
slot,
|
|
519
|
+
udid,
|
|
520
|
+
bundleId,
|
|
521
|
+
appPath,
|
|
522
|
+
launchedAt,
|
|
523
|
+
logsDir,
|
|
524
|
+
cacheHit,
|
|
525
|
+
providerName,
|
|
526
|
+
storeKey,
|
|
527
|
+
runCommand,
|
|
528
|
+
local: !physical && !remoteDevice,
|
|
529
|
+
logFields: {
|
|
530
|
+
...buildFailure,
|
|
531
|
+
appPath,
|
|
532
|
+
bundleId
|
|
533
|
+
},
|
|
534
|
+
operation
|
|
535
|
+
});
|
|
491
536
|
if (physical) {
|
|
492
537
|
const overWifi = await installsOverWifi(d, udid, wireless, note);
|
|
493
538
|
const bounds = iosDeviceBounds(overWifi);
|
|
@@ -715,10 +760,12 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
715
760
|
since: launchedAt,
|
|
716
761
|
appPath
|
|
717
762
|
}, logsDir, (line) => note(chalk.red(phaseLine("launch", line))), Boolean(remoteDevice), operation?.signal, operation?.env);
|
|
763
|
+
const evicted = await evictUnbound();
|
|
764
|
+
if (evicted) return fail(evicted);
|
|
718
765
|
return fail({
|
|
719
766
|
code: launched.code || "STIM_LAUNCH_FAILED",
|
|
720
767
|
message: launched.reason,
|
|
721
|
-
remedy: launchFailureRemedy(remoteDevice, udid, bundleId, logFile),
|
|
768
|
+
remedy: launchFailureRemedy(remoteDevice, udid, bundleId, logFile, launched.reason),
|
|
722
769
|
build: {
|
|
723
770
|
...buildFailure,
|
|
724
771
|
appPath,
|
|
@@ -781,25 +828,25 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
781
828
|
metroOrigin: typeof launched?.jsLocation === "string" ? launched.jsLocation : null,
|
|
782
829
|
enterActivity
|
|
783
830
|
});
|
|
784
|
-
if (launchState === "fatal")
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
} : launchOutcomeRecord({
|
|
831
|
+
if (launchState === "fatal") {
|
|
832
|
+
const evicted = await evictUnbound();
|
|
833
|
+
if (evicted) return fail(evicted);
|
|
834
|
+
return fail({
|
|
835
|
+
code: "STIM_LAUNCH_FAILED",
|
|
836
|
+
message: "The app failed its launch readiness check.",
|
|
837
|
+
remedy: `Read the launch error above or run \`stim logs --errors\`. The full timeline is in ${logsDir}.`,
|
|
838
|
+
logPath: logsDir,
|
|
839
|
+
build: {
|
|
840
|
+
...buildFailure,
|
|
841
|
+
appPath,
|
|
842
|
+
bundleId
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
logWriter().write(launchOutcomeRecord({
|
|
801
847
|
launchState,
|
|
802
848
|
release: runtime.kind === "embedded-js",
|
|
849
|
+
process: runtime.kind === "process",
|
|
803
850
|
bundleId,
|
|
804
851
|
configuration,
|
|
805
852
|
metroPort,
|
|
@@ -1017,6 +1064,7 @@ const DEFAULT_DEPS = {
|
|
|
1017
1064
|
fingerprintProject,
|
|
1018
1065
|
memoizedFingerprint,
|
|
1019
1066
|
untrackedNativeFiles,
|
|
1067
|
+
evictBuild,
|
|
1020
1068
|
resolveBuild,
|
|
1021
1069
|
storeBuild,
|
|
1022
1070
|
resolveCacheProviderConfig,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { It as repoRoot } from "./settings-BDVI8Ivc.mjs";
|
|
3
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
4
|
import { existsSync } from "node:fs";
|
|
4
5
|
import { dirname, join, relative } from "node:path";
|
|
5
6
|
//#region src/dependency-state.ts
|
|
6
|
-
function
|
|
7
|
+
function installedNpmTreeProblems(projectRoot) {
|
|
7
8
|
try {
|
|
8
9
|
getExecutor().runFile("npm", [
|
|
9
10
|
"ls",
|
|
@@ -14,9 +15,15 @@ function installedNpmTreeIsValid(projectRoot) {
|
|
|
14
15
|
cwd: projectRoot,
|
|
15
16
|
timeoutMs: 3e4
|
|
16
17
|
});
|
|
17
|
-
return
|
|
18
|
-
} catch {
|
|
19
|
-
|
|
18
|
+
return "";
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const stdout = error instanceof Error && "stdout" in error ? error.stdout : "";
|
|
21
|
+
let problems;
|
|
22
|
+
try {
|
|
23
|
+
problems = JSON.parse(String(stdout ?? ""))?.problems;
|
|
24
|
+
} catch {}
|
|
25
|
+
if (!Array.isArray(problems)) return randomUUID();
|
|
26
|
+
return createHash("sha256").update(problems.map(String).toSorted().join("\n")).digest("hex");
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
async function installedNpmTreeIsValidAsync(projectRoot) {
|
|
@@ -88,4 +95,4 @@ function hasInstalledDependencies(projectRoot, markers = [
|
|
|
88
95
|
return markers.some((entry) => existsSync(join(projectRoot, entry)));
|
|
89
96
|
}
|
|
90
97
|
//#endregion
|
|
91
|
-
export {
|
|
98
|
+
export { installedNpmTreeProblems as i, hasInstalledDependencies as n, installedNpmTreeIsValidAsync as r, dependencyState as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as resolvePackageJson, b as isPackageResolvable } from "./project-
|
|
2
|
-
import {
|
|
1
|
+
import { C as resolvePackageJson, b as isPackageResolvable } from "./project-DYj-HVx6.mjs";
|
|
2
|
+
import { bn as readBundleSchemes, yn as pickDevClientScheme } from "./ccache-BWTze1Ls.mjs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
|
|
5
5
|
//#region src/commands/dev-client.ts
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { b as operationState, t as getExecutor } from "./exec-
|
|
2
|
-
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-
|
|
1
|
+
import { b as operationState, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, _ as loadConfig$1, p as getProject } from "./config-Cn94Jc0g.mjs";
|
|
3
3
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { r as clockTime } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-
|
|
7
|
-
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, rt as resolvePhysicalDevice, s as androidPoolCandidates } from "./android-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as discoverXcodeProject } from "./react-native-build-
|
|
12
|
-
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-
|
|
13
|
-
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-
|
|
14
|
-
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-
|
|
15
|
-
import { t as selectFromPool } from "./device-pool-
|
|
16
|
-
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-
|
|
17
|
-
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-
|
|
4
|
+
import { r as clockTime } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { $t as makeTemporaryDirectory, X as resolveProjectSettings, Y as resolveIosProjectDir, en as removeTemporaryEntry, it as settingValueAt } from "./settings-BDVI8Ivc.mjs";
|
|
6
|
+
import { f as projectRegistry, g as selectNativeXcodeProject, i as findProjectRoot$1, p as NativeXcodeError, t as NO_PROJECT_REFUSAL } from "./project-DYj-HVx6.mjs";
|
|
7
|
+
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, rt as resolvePhysicalDevice, s as androidPoolCandidates } from "./android-DriNoAVy.mjs";
|
|
8
|
+
import { En as runProcessOperation } from "./ccache-BWTze1Ls.mjs";
|
|
9
|
+
import { H as resolveScheme, K as xcodebuildArgs } from "./toolchain-CbCG6C5Z.mjs";
|
|
10
|
+
import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-Cd-ysFes.mjs";
|
|
11
|
+
import { a as discoverXcodeProject } from "./react-native-build-DaK2IFyP.mjs";
|
|
12
|
+
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-DwsGfjUN.mjs";
|
|
13
|
+
import { m as resolveConfiguration, y as resolveSchemeSelection } from "./support-Be0UeVZU.mjs";
|
|
14
|
+
import { n as findSigningIdentities, o as parsePlist, s as parseProvisioningProfilePlist, t as decodeProvisioningProfile } from "./ios-signing-BJzvDPfU.mjs";
|
|
15
|
+
import { t as selectFromPool } from "./device-pool-BnQqvs6o.mjs";
|
|
16
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-C_QkIf1Z.mjs";
|
|
17
|
+
import { i as nativeXcodePackages, t as nativeXcodeHasPackages } from "./native-xcode-inputs-B1W8SrxB.mjs";
|
|
18
18
|
import { existsSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
19
19
|
import { homedir } from "node:os";
|
|
20
20
|
import { join } from "node:path";
|
|
@@ -1,18 +1,61 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, d as workspaceProcessLockError, u as withWorkspaceProcessLock } from "./exec-
|
|
2
|
-
import { G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-
|
|
3
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
4
|
-
import { g as deviceReclaimIdleMinutesSetting } from "./settings-
|
|
5
|
-
import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-
|
|
6
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, d as workspaceProcessLockError, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { g as deviceReclaimIdleMinutesSetting } from "./settings-BDVI8Ivc.mjs";
|
|
5
|
+
import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-DriNoAVy.mjs";
|
|
6
|
+
import { _ as withIdleWorkspace, it as recordCapacityWait, rt as recordCapacityRefusal } from "./workspaces-DFbj07jp.mjs";
|
|
7
7
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { i as writeIdleShutdownEvent, n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-FfxL1KdG.mjs";
|
|
8
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-E26qSpkb.mjs";
|
|
9
|
+
import { i as writeIdleShutdownEvent, n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-Cbvo5KEh.mjs";
|
|
11
10
|
import { realpathSync } from "node:fs";
|
|
12
11
|
import { basename, join } from "node:path";
|
|
13
12
|
import { workspaceId } from "@stim-cli/core";
|
|
14
13
|
import { DEVICE_RECLAIM_REASON, automaticMachineEnabled } from "@stim-cli/core/state";
|
|
15
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
|
+
//#region src/workspace/display-label.ts
|
|
16
|
+
function baseLabel({ root, label }) {
|
|
17
|
+
return label || basename(root);
|
|
18
|
+
}
|
|
19
|
+
function pathSegments(root) {
|
|
20
|
+
return root.split(/[\\/]+/).filter(Boolean).toReversed();
|
|
21
|
+
}
|
|
22
|
+
function workspaceLabels(workspaces) {
|
|
23
|
+
const labels = /* @__PURE__ */ new Map();
|
|
24
|
+
const groups = /* @__PURE__ */ new Map();
|
|
25
|
+
for (const workspace of workspaces) {
|
|
26
|
+
const base = baseLabel(workspace);
|
|
27
|
+
const group = groups.get(base) ?? [];
|
|
28
|
+
if (!group.some(({ root }) => root === workspace.root)) group.push(workspace);
|
|
29
|
+
groups.set(base, group);
|
|
30
|
+
}
|
|
31
|
+
for (const [base, group] of groups) {
|
|
32
|
+
const [only] = group;
|
|
33
|
+
if (group.length === 1 && only) {
|
|
34
|
+
labels.set(only.root, base);
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
const segments = group.map(({ root }) => pathSegments(root));
|
|
38
|
+
const longest = Math.max(...segments.map((parts) => parts.length));
|
|
39
|
+
let depth = 0;
|
|
40
|
+
while (depth < longest && segments.every((parts) => parts[depth] === segments[0]?.[depth])) depth++;
|
|
41
|
+
const suffixes = segments.map((parts) => parts[depth]);
|
|
42
|
+
const distinct = new Set(suffixes).size === group.length;
|
|
43
|
+
group.forEach(({ root }, index) => {
|
|
44
|
+
const suffix = distinct ? suffixes[index] : root;
|
|
45
|
+
labels.set(root, suffix ? `${base} (${suffix})` : base);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return labels;
|
|
49
|
+
}
|
|
50
|
+
function workspaceDisplayLabel(root, config) {
|
|
51
|
+
const registered = Object.entries(config?.projects ?? {}).map(([path, project]) => ({
|
|
52
|
+
root: path,
|
|
53
|
+
label: project.label
|
|
54
|
+
}));
|
|
55
|
+
const own = registered.find((entry) => entry.root === root);
|
|
56
|
+
return workspaceLabels([...registered, own ?? { root }]).get(root) ?? basename(root);
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
16
59
|
//#region src/devices/queue-reclaim.ts
|
|
17
60
|
async function reclaimIdleDevice(root, idleMs, out, now, skipped) {
|
|
18
61
|
try {
|
|
@@ -26,7 +69,7 @@ async function reclaimIdleDevice(root, idleMs, out, now, skipped) {
|
|
|
26
69
|
}).toSorted((a, b) => b.idleForMs - a.idleForMs).find(({ device }) => !skipped.has(`${device.kind}:${device.id}`));
|
|
27
70
|
if (!candidate) return 0;
|
|
28
71
|
const { device, idleForMs } = candidate;
|
|
29
|
-
const label =
|
|
72
|
+
const label = workspaceDisplayLabel(device.project, loadConfig$1());
|
|
30
73
|
const log = (event) => {
|
|
31
74
|
writeIdleShutdownEvent(device.project, event);
|
|
32
75
|
if (event.level === "warn") out(`${"device".padEnd(11)} ${event.msg}`);
|
|
@@ -167,6 +210,31 @@ function listed(source, empty, absent = () => false) {
|
|
|
167
210
|
throw new DeviceCountUnavailable("", { cause: error });
|
|
168
211
|
}
|
|
169
212
|
}
|
|
213
|
+
async function listedAwait(read, empty, absent = () => false) {
|
|
214
|
+
try {
|
|
215
|
+
return await read() ?? empty;
|
|
216
|
+
} catch (error) {
|
|
217
|
+
if (absent(error)) return empty;
|
|
218
|
+
throw new DeviceCountUnavailable("", { cause: error });
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async function readInventoryAsync({ sims = () => process.platform === "darwin" ? listAllIosSimsAsync({ timeoutMs: LISTING_TIMEOUT_MS }) : [], adb = () => listAdbDevicesAsync({ timeoutMs: LISTING_TIMEOUT_MS }), config = loadConfig$1, booting = readBootingDevices }) {
|
|
222
|
+
try {
|
|
223
|
+
const recorded = await listedAwait(() => typeof config === "function" ? config() : config, null);
|
|
224
|
+
return {
|
|
225
|
+
booting: await listedAwait(() => typeof booting === "function" ? booting() : booting, []),
|
|
226
|
+
sims: await listedAwait(() => typeof sims === "function" ? sims() : sims, [], toolAbsent),
|
|
227
|
+
adb: recordsOwnedEmulator(recorded) ? await listedAwait(() => typeof adb === "function" ? adb() : adb, NO_ADB, toolAbsent) : NO_ADB,
|
|
228
|
+
config: recorded
|
|
229
|
+
};
|
|
230
|
+
} catch (error) {
|
|
231
|
+
if (error instanceof DeviceCountUnavailable) {
|
|
232
|
+
if ((0, ownership_claim_exports.isClaimRefusal)(error.cause)) throw error.cause;
|
|
233
|
+
return uncountedRefusal(error.cause);
|
|
234
|
+
}
|
|
235
|
+
throw error;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
170
238
|
function readInventory({ sims = listSimsForCount, adb = listAdbForCount, config = loadConfig$1, booting = readBootingDevices }) {
|
|
171
239
|
try {
|
|
172
240
|
const recorded = listed(config, null);
|
|
@@ -205,6 +273,15 @@ async function listedAsync(source, empty) {
|
|
|
205
273
|
throw new DeviceCountUnavailable("", { cause: error });
|
|
206
274
|
}
|
|
207
275
|
}
|
|
276
|
+
async function countLiveOwnedDevicesFrom(sources, { exclude = [] } = {}) {
|
|
277
|
+
try {
|
|
278
|
+
const inventory = await readInventoryAsync(sources);
|
|
279
|
+
return "code" in inventory ? { unknown: inventory.message } : inventoryKeys(inventory, exclude).size;
|
|
280
|
+
} catch (error) {
|
|
281
|
+
if ((0, ownership_claim_exports.isClaimRefusal)(error)) return { unknown: error.message };
|
|
282
|
+
throw error;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
208
285
|
async function countLiveOwnedDevicesAsync(operation) {
|
|
209
286
|
try {
|
|
210
287
|
operation.signal.throwIfAborted();
|
|
@@ -310,9 +387,17 @@ function deviceSlotWaitingLine({ count, max, holders, elapsedMs, queue }) {
|
|
|
310
387
|
}
|
|
311
388
|
function deviceHolders(inventory, keys) {
|
|
312
389
|
const names = /* @__PURE__ */ new Map();
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
390
|
+
const projects = Object.entries(inventory.config?.projects ?? {});
|
|
391
|
+
const labels = workspaceLabels(projects.map(([root, project]) => ({
|
|
392
|
+
root,
|
|
393
|
+
label: project.label
|
|
394
|
+
})));
|
|
395
|
+
for (const [root, project] of projects) {
|
|
396
|
+
const label = labels.get(root) ?? basename(root);
|
|
397
|
+
for (const { platforms } of projectDeviceSlots(project)) {
|
|
398
|
+
if (platforms.ios?.deviceUdid) names.set(deviceKey("ios", platforms.ios.deviceUdid), label);
|
|
399
|
+
if (platforms.android?.avdName) names.set(deviceKey("android", platforms.android.avdName), label);
|
|
400
|
+
}
|
|
316
401
|
}
|
|
317
402
|
for (const sim of inventory.sims) {
|
|
318
403
|
const key = deviceKey("ios", sim.udid);
|
|
@@ -394,7 +479,7 @@ async function admissionTransaction(action, lockWaitMs, out, signal) {
|
|
|
394
479
|
}
|
|
395
480
|
}
|
|
396
481
|
/** Boots an owned device under the Stim home's cap, reserving capacity before releasing admission. */
|
|
397
|
-
async function withDeviceBootAdmission(device, boot, { root, max = getConcurrencyLimits().maxDevices, sources = {}, lockWaitMs = ADMISSION_LOCK_WAIT_MS, out = () => {}, waitMs = DEFAULT_DEVICE_SLOT_WAIT_MS, noWait = false, automatic = false, displayName =
|
|
482
|
+
async function withDeviceBootAdmission(device, boot, { root, max = getConcurrencyLimits().maxDevices, sources = {}, lockWaitMs = ADMISSION_LOCK_WAIT_MS, out = () => {}, waitMs = DEFAULT_DEVICE_SLOT_WAIT_MS, noWait = false, automatic = false, displayName = workspaceDisplayLabel(root, loadConfig$1()), reclaimIdleMinutes = deviceReclaimIdleMinutesSetting({}), now = Date.now, signal, sleep = (ms) => setTimeout(ms, void 0, { signal }), waitingFor = () => {}, onWait = () => {} }) {
|
|
398
483
|
const requireMembership = () => {
|
|
399
484
|
if (automatic && !automaticMachineEnabled("device", "local")) throw new DeviceAdmissionRefusal({
|
|
400
485
|
code: "STIM_HOSTING_REFUSED",
|
|
@@ -466,7 +551,7 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
|
|
|
466
551
|
if ((typeof booting === "function" ? booting() : booting).some((entry) => deviceKey(entry.platform, entry.key) === own)) return admit();
|
|
467
552
|
return wait(lastInventory);
|
|
468
553
|
}
|
|
469
|
-
const inventory =
|
|
554
|
+
const inventory = await readInventoryAsync(sources);
|
|
470
555
|
if ("code" in inventory) throw new DeviceAdmissionRefusal(inventory);
|
|
471
556
|
const keys = inventoryKeys(inventory);
|
|
472
557
|
const own = deviceKey(device.platform, device.key);
|
|
@@ -612,4 +697,4 @@ function unknownAndroidDeviceProfileRefusal(requested, profiles) {
|
|
|
612
697
|
};
|
|
613
698
|
}
|
|
614
699
|
//#endregion
|
|
615
|
-
export { countLiveOwnedDevicesAsync as a,
|
|
700
|
+
export { countLiveOwnedDevicesAsync as a, layerNote as c, unknownAndroidDeviceProfileRefusal as d, unknownAndroidSystemImageRefusal as f, withDeviceBootAdmission as h, countLiveOwnedDevices as i, peekDeviceSlots as l, unknownIosRuntimeRefusal as m, DeviceAdmissionRefusal as n, countLiveOwnedDevicesFrom as o, unknownIosDeviceTypeRefusal as p, checkDeviceCapacity as r, deviceTypeMismatch as s, DEFAULT_DEVICE_SLOT_WAIT_MS as t, runtimeMismatch as u };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-
|
|
3
|
-
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-
|
|
4
|
-
import { i as macosProcess, o as requiredMacosRecord } from "./state-
|
|
5
|
-
import { A as listAdbDevices, Ct as forgetCreatedDeviceAsync, D as getAvdNameForSerial, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, M as listAvdDeviceProfiles, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, ct as waitForBoot, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, nt as resolveOwnedAvdSerialAsync, t as DEFAULT_AVD_DEVICE_PROFILE, tt as resetAdoptedAvd, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-
|
|
6
|
-
import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as stopMacosAppHeld } from "./stop-
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { _ as ensureWorkspaceStorage, d as writeWorkspaceState } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { i as macosProcess, o as requiredMacosRecord } from "./state-CZxLyetD.mjs";
|
|
5
|
+
import { A as listAdbDevices, Ct as forgetCreatedDeviceAsync, D as getAvdNameForSerial, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, M as listAvdDeviceProfiles, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, ct as waitForBoot, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, nt as resolveOwnedAvdSerialAsync, t as DEFAULT_AVD_DEVICE_PROFILE, tt as resetAdoptedAvd, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-DriNoAVy.mjs";
|
|
6
|
+
import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-Deb9X3_Y.mjs";
|
|
7
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
|
|
8
|
+
import { _n as reverseMetroPorts, dn as installIosApp, fn as iosAppProcess, hn as launchIosApp, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, tn as androidAppProcess, vn as writeDebugHttpHost } from "./ccache-BWTze1Ls.mjs";
|
|
9
|
+
import { ft as teardownOwnedIosSim, ut as teardownOwnedAvd } from "./workspaces-DFbj07jp.mjs";
|
|
10
|
+
import { E as resolveIosCreation, R as readHostMemoryPressure, T as resetIosPrivacy, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, j as uninstallIosApp, n as bootIosSim, w as resetIosKeychain } from "./ios-E26qSpkb.mjs";
|
|
11
|
+
import { r as stopMacosAppHeld } from "./stop-CH79S3IZ.mjs";
|
|
12
12
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
13
|
-
import { i as countLiveOwnedDevices } from "./device-capacity-
|
|
14
|
-
import { _ as findAapt } from "./support-
|
|
15
|
-
import { t as waitForMacosRegistration } from "./registration-
|
|
16
|
-
import { n as parseLogStreamLine } from "./ios-
|
|
13
|
+
import { i as countLiveOwnedDevices } from "./device-capacity-6LP7QsaA.mjs";
|
|
14
|
+
import { _ as findAapt } from "./support-CNg_YsOk.mjs";
|
|
15
|
+
import { t as waitForMacosRegistration } from "./registration-BwCe64PH.mjs";
|
|
16
|
+
import { n as parseLogStreamLine } from "./ios-CsRVik64.mjs";
|
|
17
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
18
18
|
import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { availableParallelism, freemem, homedir, loadavg } from "node:os";
|
|
@@ -232,7 +232,7 @@ function collectHostedNativeLogs({ home, platform, since, final, query, parse, t
|
|
|
232
232
|
//#endregion
|
|
233
233
|
//#region src/device-host/android-logs.ts
|
|
234
234
|
/** Captures bounded logcat output from the installed app on this home's exact ledger-owned serial. */
|
|
235
|
-
function collectHostedAndroidLogs(home, session, attempt, since, final = false) {
|
|
235
|
+
async function collectHostedAndroidLogs(home, session, attempt, since, final = false) {
|
|
236
236
|
const deadline = Date.now() + 1e4;
|
|
237
237
|
const device = readHostedDevice(home, "android");
|
|
238
238
|
assertHostedAndroidSerial(home, device);
|
|
@@ -240,9 +240,9 @@ function collectHostedAndroidLogs(home, session, attempt, since, final = false)
|
|
|
240
240
|
if (app.state !== "installed") return false;
|
|
241
241
|
const exec = getExecutor();
|
|
242
242
|
const adb = androidToolPath("adb");
|
|
243
|
-
const clockOffsetMs = androidClockOffset(device.serial, { exec: {
|
|
243
|
+
const clockOffsetMs = await androidClockOffset(device.serial, { exec: {
|
|
244
244
|
...exec,
|
|
245
|
-
|
|
245
|
+
runFileAsync: (file, args, options) => exec.runFileAsync(file === "adb" ? adb : file, args, options)
|
|
246
246
|
} }) ?? 0;
|
|
247
247
|
const previous = readHostedNativeLogsCheckpoint(home, "android");
|
|
248
248
|
let current = null;
|
|
@@ -1226,7 +1226,7 @@ async function main() {
|
|
|
1226
1226
|
if (input.platform === "macos" && !hostedMacosAppSlot(input.appSlot)) throw new Error("Invalid hosted macOS app slot.");
|
|
1227
1227
|
if (input.mode === "logs") {
|
|
1228
1228
|
if (input.platform !== "ios" && input.platform !== "android" || !process.env.STIM_HOME || typeof input.since !== "number" || !Number.isFinite(input.since)) throw new Error("Invalid hosted native log request.");
|
|
1229
|
-
const more = (input.platform === "android" ? collectHostedAndroidLogs : collectHostedIosLogs)(process.env.STIM_HOME, input.session, input.attempt, input.since, input.final === true);
|
|
1229
|
+
const more = await (input.platform === "android" ? collectHostedAndroidLogs : collectHostedIosLogs)(process.env.STIM_HOME, input.session, input.attempt, input.since, input.final === true);
|
|
1230
1230
|
process.stdout.write(`${JSON.stringify({ more })}\n`);
|
|
1231
1231
|
return;
|
|
1232
1232
|
}
|