stim 1.25.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-BbHS3oV8.mjs → act-ROviTF_t.mjs} +415 -118
- package/dist/{activity-BpjwrQXU.mjs → activity-Cd-ysFes.mjs} +6 -7
- package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CNZgRC-4.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-BGwuK3Mc.mjs → android-Cd6w7_qw.mjs} +134 -57
- package/dist/{android-saBeB4lr.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-Cjcj8MCw.mjs → android-DriNoAVy.mjs} +99 -47
- package/dist/{android-cas-BVqh2Zep.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
- package/dist/api.d.mts +20 -7
- package/dist/api.mjs +42 -32
- package/dist/apk-signed-tail-BHQHx3Rm.mjs +142 -0
- package/dist/{artifact-Co8zixVx.mjs → artifact-0AGJYB9O.mjs} +28 -28
- package/dist/{artifact-DN8JNwqS.mjs → artifact-faemIZv5.mjs} +40 -30
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-CCgZsHmI.mjs → browser-web-slD8AvLp.mjs} +16 -17
- package/dist/{build-cache-CKCzxzxA.mjs → build-cache-gBJ-WKzA.mjs} +141 -37
- package/dist/{build-CAiw8Ezm.mjs → build-hS0QyFlQ.mjs} +38 -31
- package/dist/{build-plan-zCuHGlA8.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-HyShrIpL.mjs → ccache-BWTze1Ls.mjs} +634 -1514
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-C4w607Pz.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-BQsmyp_-.mjs → client-xsdxrhWA.mjs} +77 -116
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BBvS1H6v.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-Cn94Jc0g.mjs} +343 -18
- package/dist/{launch-DscF1QfM.mjs → dependencies-BGokZ-Ng.mjs} +330 -279
- package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-CHoXXZeg.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-F5-4z9ef.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-6LP7QsaA.mjs} +103 -25
- package/dist/device-host-worker.mjs +19 -21
- package/dist/{device-ios-DkHBrmvH.mjs → device-ios-534c14fz.mjs} +288 -28
- package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-BIg8MU8l.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-B9FqTBYW.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-A_Nr_fDe.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-k3P3PizH.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-Bm8TVpGn.mjs → doctor-F-3VUUyN.mjs} +128 -35
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +9 -3
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-CyDKNTBP.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-eaz403W6.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-B9jcnmIk.mjs → gc-CGZ1Yg88.mjs} +218 -72
- package/dist/{guide-DR0K0xW9.mjs → guide-_rfEh_zM.mjs} +839 -222
- package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-D7Pk_Oo1.mjs} +13 -9
- package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-B1gqQuva.mjs} +18 -12
- package/dist/hosted-logs-sync-Dg3qrZmV.mjs +195 -0
- package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CdgaiuyP.mjs} +17 -17
- package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-Cbvo5KEh.mjs} +21 -9
- package/dist/{ios-BRVM8b0P.mjs → ios-B5HlVMhQ.mjs} +138 -55
- package/dist/{ios-Dvt97HgQ.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-BQzvJlzw.mjs → ios-E26qSpkb.mjs} +94 -11
- package/dist/{ios-device-CKSvk0bu.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-DCUDo06I.mjs → ios-project-D8Jcy_br.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-CT9nV5SP.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-D0lPvFFu.mjs → launch-CRyBeNsA.mjs} +53 -44
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-BsIRre8x.mjs → logs-CC_-ZzEE.mjs} +10 -174
- package/dist/{logs-Crs9y34Z.mjs → logs-aJQb-RDg.mjs} +112 -38
- package/dist/{macos-CcUlJPMu.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-D477nfzH.mjs → macos-DlCBhMw5.mjs} +73 -39
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +30 -13
- package/dist/{metro-1pJgCX4U.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-BnHdqMO_.mjs} +3 -4
- package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-BvMizJn1.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-DqaIBO5w.mjs} +9 -9
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -18
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.d.mts +3 -1
- package/dist/offload-worker.mjs +34 -25
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-jxxz-19m.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DjOXJRIH.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-DtS1Amb0.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/prebuild-BDpToDgR.mjs +1246 -0
- package/dist/{project-BiC68mIp.mjs → project-DYj-HVx6.mjs} +17 -18
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-DDBccgJw.mjs} +56 -36
- package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-B-Mw6DcR.mjs} +50 -9
- package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-DjYwUF9U.mjs} +45 -25
- package/dist/{recordings-BaoQ0t-J.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-Beftw2X3.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-FbSgMF8x.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-BuZj6AyU.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-CR2vk2cj.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BtzE09Dl.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-D5cxEl3t.mjs → selection-Bs8phwhN.mjs} +183 -62
- package/dist/{server-bare-CH9X0RLn.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CaBbDNU2.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-Ck8EIidM.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-B5tCoq9N.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-DzH9mGQZ.mjs → settings-CMHhQNwI.mjs} +24 -3
- package/dist/settings-payload-cm60Zhib.mjs +257 -0
- package/dist/settings-write-BdNRLlBn.mjs +185 -0
- package/dist/settings.schema.json +84 -39
- package/dist/{simslim-BjxszUAb.mjs → simslim-DCQwzoPy.mjs} +4 -3
- package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-D8xlRU2D.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C1JLjkNw.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-YMpNwLhh.mjs → start-DrPwER_2.mjs} +27 -23
- package/dist/{state-DMRNP7-4.mjs → state-BX1y5syV.mjs} +4 -5
- package/dist/{state-DPaM3u5K.mjs → state-CZxLyetD.mjs} +2 -3
- package/dist/{stats-CP7STzZw.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-CRLiJ-O_.mjs → status-BfnK9pUd.mjs} +25 -26
- package/dist/{status-cNw6i0_t.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-COP6PQqw.mjs → stop-CH79S3IZ.mjs} +5 -6
- package/dist/{stop-Db9Kh-UA.mjs → stop-D-EAr25B.mjs} +25 -22
- package/dist/{stop-Br7LKxBE.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +17 -18
- package/dist/{support-qKcbgmI5.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-Cxj9CmII.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/toolchain-CbCG6C5Z.mjs +2413 -0
- package/dist/toolchain-JYAOquPg.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-DMou-X7j.mjs} +3 -3
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-C0RsbngN.mjs} +731 -728
- package/dist/{web-B4Yjyt1G.mjs → web-Cq_AQ4DK.mjs} +9 -10
- package/dist/web-Je6abcpz.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-BjqdjnJR.mjs} +46 -8
- package/dist/{workspaces-C9w4aeXF.mjs → workspaces-DFbj07jp.mjs} +1801 -76
- package/dist/{worktree-CclFIe1Z.mjs → worktree-COAJ3-OD.mjs} +934 -511
- package/dist/{worktree-Ct9Gk3KL.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +8 -8
- package/dist/ccache-h1FKhZeg.mjs +0 -143
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/eas-fallback-gaZi-dJL.mjs +0 -381
- package/dist/hosted-ios-RtVcJH3u.mjs +0 -15
- package/dist/native-run-D5OJsGwA.mjs +0 -276
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-JUaqOLpc.mjs +0 -501
- package/dist/server-expo-C16Zf2k7.mjs +0 -2
- package/dist/settings-write-n0zwfohx.mjs +0 -360
- package/dist/toolchain-DB1aeqxO.mjs +0 -2
- package/dist/toolchain-VzLJzZ7O.mjs +0 -908
- package/dist/trigger-BLsHgAGR.mjs +0 -2
- package/dist/web-DS4UDWvf.mjs +0 -2
- package/dist/xcode-CiIIDnuD.mjs +0 -910
|
@@ -1,162 +1,50 @@
|
|
|
1
|
-
import { o as cancellableSleep, t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-
|
|
14
|
-
import {
|
|
15
|
-
import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { n as
|
|
20
|
-
import { n as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { c as startDevServer, g as detectBundleId } from "./start-YMpNwLhh.mjs";
|
|
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";
|
|
24
23
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
25
|
-
import { a as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { a as
|
|
31
|
-
import { a as
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import { i as
|
|
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";
|
|
42
42
|
import { mkdirSync, openSync, writeFileSync } from "node:fs";
|
|
43
43
|
import { networkInterfaces } from "node:os";
|
|
44
44
|
import { basename, join } from "node:path";
|
|
45
45
|
import { ambientEnv, hostSimulatorArch } from "@stim-cli/core";
|
|
46
46
|
import chalk from "chalk";
|
|
47
47
|
import { loadCacheProvider } from "@stim-cli/cache";
|
|
48
|
-
//#region src/engine/ios-lan.ts
|
|
49
|
-
const IP_TXT = "ip.txt";
|
|
50
|
-
function chooseLanAddress({ pinned = null, candidates }) {
|
|
51
|
-
const list = Array.isArray(candidates) ? candidates : [];
|
|
52
|
-
if (pinned) return {
|
|
53
|
-
address: pinned,
|
|
54
|
-
interfaceName: list.find((candidate) => candidate.address === pinned)?.interfaceName ?? null,
|
|
55
|
-
pinned: true,
|
|
56
|
-
candidates: list.length
|
|
57
|
-
};
|
|
58
|
-
const first = list[0];
|
|
59
|
-
if (!first) return null;
|
|
60
|
-
return {
|
|
61
|
-
address: first.address,
|
|
62
|
-
interfaceName: first.interfaceName,
|
|
63
|
-
pinned: false,
|
|
64
|
-
candidates: list.length
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function lanOriginUrlFor(address, port) {
|
|
68
|
-
return `http://${address}:${port}`;
|
|
69
|
-
}
|
|
70
|
-
function ipTxtContents(address, port) {
|
|
71
|
-
return `${String(address).trim()}:${String(port).trim()}\n`;
|
|
72
|
-
}
|
|
73
|
-
function writeIpTxt(appPath, address, port, { write = writeFileSync } = {}) {
|
|
74
|
-
const path = join(appPath, IP_TXT);
|
|
75
|
-
write(path, ipTxtContents(address, port), "utf-8");
|
|
76
|
-
return path;
|
|
77
|
-
}
|
|
78
|
-
async function ensureLanReachable({ origin, metroPort, root, isExpo, logsDir, gateOrigin = gateMetroOrigin, readRecords = null }) {
|
|
79
|
-
const result = await gateOrigin({
|
|
80
|
-
origin,
|
|
81
|
-
metroPort,
|
|
82
|
-
platform: "ios",
|
|
83
|
-
entryPoint: bundleEntryPoint(root, isExpo),
|
|
84
|
-
readRecords: readRecords ?? (() => readMetroRecords(logsDir)),
|
|
85
|
-
isProof: isBundleProof
|
|
86
|
-
});
|
|
87
|
-
if (result.failed) return {
|
|
88
|
-
failed: result.reason ?? `${origin} is not this workspace's Metro.`,
|
|
89
|
-
remedy: `The phone reaches Metro at ${origin}, so that address has to serve THIS workspace's dev server. \`stim start\` prints the port it reserved. Set ios.lanHost in .stim.json when this Mac has several network interfaces and the phone shares one that is not the first.`
|
|
90
|
-
};
|
|
91
|
-
return { ok: true };
|
|
92
|
-
}
|
|
93
|
-
function copyAppAside(appPath, { exec = null, mkdtemp = () => makeTemporaryDirectory(appPath, "stim-ios-device-") } = {}) {
|
|
94
|
-
const e = exec || getExecutor();
|
|
95
|
-
const tmpDir = mkdtemp();
|
|
96
|
-
const copy = join(tmpDir, basename(appPath));
|
|
97
|
-
try {
|
|
98
|
-
e.runFile("cp", [
|
|
99
|
-
"-c",
|
|
100
|
-
"-R",
|
|
101
|
-
appPath,
|
|
102
|
-
copy
|
|
103
|
-
], { timeoutMs: "unbounded" });
|
|
104
|
-
} catch {
|
|
105
|
-
try {
|
|
106
|
-
removeTemporaryEntry(copy);
|
|
107
|
-
e.runFile("cp", [
|
|
108
|
-
"-R",
|
|
109
|
-
appPath,
|
|
110
|
-
copy
|
|
111
|
-
], { timeoutMs: "unbounded" });
|
|
112
|
-
} catch (error) {
|
|
113
|
-
removeTemporaryEntry(tmpDir);
|
|
114
|
-
throw error;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
tmpDir,
|
|
119
|
-
appPath: copy
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region src/engine/lan-address.ts
|
|
124
|
-
const EN_INTERFACE = /^en(\d+)$/;
|
|
125
|
-
const EXCLUDED_INTERFACE = /^(?:utun|bridge|awdl)/;
|
|
126
|
-
const LINK_LOCAL = /^169\.254\./;
|
|
127
|
-
function isIpv4(entry) {
|
|
128
|
-
return entry.family === "IPv4" || entry.family === 4;
|
|
129
|
-
}
|
|
130
|
-
function lanCandidates(interfaces) {
|
|
131
|
-
const ranked = [];
|
|
132
|
-
const seen = /* @__PURE__ */ new Set();
|
|
133
|
-
for (const [interfaceName, entries] of Object.entries(interfaces ?? {})) {
|
|
134
|
-
if (EXCLUDED_INTERFACE.test(interfaceName)) continue;
|
|
135
|
-
const en = EN_INTERFACE.exec(interfaceName);
|
|
136
|
-
for (const entry of entries ?? []) {
|
|
137
|
-
if (!entry || typeof entry !== "object" || !isIpv4(entry) || entry.internal === true) continue;
|
|
138
|
-
const address = typeof entry.address === "string" ? entry.address.trim() : "";
|
|
139
|
-
if (address === "" || LINK_LOCAL.test(address)) continue;
|
|
140
|
-
if (seen.has(address)) continue;
|
|
141
|
-
seen.add(address);
|
|
142
|
-
ranked.push({
|
|
143
|
-
interfaceName,
|
|
144
|
-
address,
|
|
145
|
-
rank: en ? 0 : 1,
|
|
146
|
-
index: en ? Number(en[1]) : 0
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
ranked.sort((a, b) => a.rank - b.rank || a.index - b.index || a.interfaceName.localeCompare(b.interfaceName) || a.address.localeCompare(b.address));
|
|
151
|
-
return ranked.map(({ interfaceName, address }) => ({
|
|
152
|
-
interfaceName,
|
|
153
|
-
address
|
|
154
|
-
}));
|
|
155
|
-
}
|
|
156
|
-
function hostLanCandidates(interfaces = networkInterfaces) {
|
|
157
|
-
return lanCandidates(interfaces());
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
48
|
//#region src/commands/ios/collector.ts
|
|
161
49
|
function collectorLogFile(root, slot) {
|
|
162
50
|
return join(workspaceLogsDir(root), `collector-${deviceSlotFileKey("ios", slot)}.log`);
|
|
@@ -250,109 +138,6 @@ async function replaceCollector({ root, slot = "default", udid, bundleId, appNam
|
|
|
250
138
|
};
|
|
251
139
|
}
|
|
252
140
|
//#endregion
|
|
253
|
-
//#region src/commands/ios/dependencies.ts
|
|
254
|
-
const DEFAULT_DEPS = {
|
|
255
|
-
projectRegistry,
|
|
256
|
-
automaticDevicePlacement,
|
|
257
|
-
checkEasFallback,
|
|
258
|
-
prepareHostedIos,
|
|
259
|
-
placeHostedIos,
|
|
260
|
-
hostedMetroPortProbe,
|
|
261
|
-
readHostedIos,
|
|
262
|
-
writeHostedIos: writeHostedIosAsync,
|
|
263
|
-
resolveEasDevelopmentBuild,
|
|
264
|
-
findProjectRoot,
|
|
265
|
-
resolveSettings,
|
|
266
|
-
settingsLayers,
|
|
267
|
-
settingOriginScope,
|
|
268
|
-
gitCommonDir: gitCommonDirAsync,
|
|
269
|
-
repoRoot: repoRootAsync,
|
|
270
|
-
detectBundleId,
|
|
271
|
-
detectIsExpo,
|
|
272
|
-
devClientScheme,
|
|
273
|
-
hasDevClient,
|
|
274
|
-
devClientTakesDevMenuParams,
|
|
275
|
-
getProject,
|
|
276
|
-
upsertProject: (...args) => withConfigLockAsync(() => upsertProject(...args)),
|
|
277
|
-
recordIosSchemeApprovals,
|
|
278
|
-
checkDeviceCapacity,
|
|
279
|
-
budgetGate,
|
|
280
|
-
ensureOwnedDevice,
|
|
281
|
-
listIosRuntimes: listIosRuntimesAsync,
|
|
282
|
-
listAllIosSims,
|
|
283
|
-
ensureBooted,
|
|
284
|
-
resolveRemoteContext,
|
|
285
|
-
remoteIosDeps,
|
|
286
|
-
readRemoteSimulatorArch,
|
|
287
|
-
hostSimulatorArch,
|
|
288
|
-
ensureMetroReachable,
|
|
289
|
-
ensureRemoteBootOwned,
|
|
290
|
-
detectProviders,
|
|
291
|
-
resolveProjectMetro,
|
|
292
|
-
startDevServer,
|
|
293
|
-
warmMetro,
|
|
294
|
-
readWorkspaceState,
|
|
295
|
-
pidExists,
|
|
296
|
-
getConcurrencyLimits,
|
|
297
|
-
fingerprintProject,
|
|
298
|
-
untrackedNativeFiles,
|
|
299
|
-
resolveBuild,
|
|
300
|
-
storeBuild,
|
|
301
|
-
resolveCacheProviderConfig,
|
|
302
|
-
loadCacheProvider,
|
|
303
|
-
acquireBuildLock,
|
|
304
|
-
releaseBuildLock,
|
|
305
|
-
waitForBuild,
|
|
306
|
-
acquireBuildSlot,
|
|
307
|
-
releaseBuildSlot,
|
|
308
|
-
loadProjectProvider,
|
|
309
|
-
checkEasAuth,
|
|
310
|
-
resolveEasCliBin,
|
|
311
|
-
resolveRemote,
|
|
312
|
-
uploadRemote,
|
|
313
|
-
planPrebuild: planPrebuildAsync,
|
|
314
|
-
runPrebuild,
|
|
315
|
-
readPodState,
|
|
316
|
-
podsAreStale,
|
|
317
|
-
runPodInstall,
|
|
318
|
-
buildIos,
|
|
319
|
-
discoverXcodeProject,
|
|
320
|
-
resolveScheme,
|
|
321
|
-
listIosDevices,
|
|
322
|
-
hostLanCandidates,
|
|
323
|
-
ensureLanReachable,
|
|
324
|
-
gateProfileForDevice,
|
|
325
|
-
sealAppForDevice,
|
|
326
|
-
installIosDeviceApp,
|
|
327
|
-
awaitIosDeviceLaunch,
|
|
328
|
-
acquireRunLease,
|
|
329
|
-
runLease,
|
|
330
|
-
selectFromPool,
|
|
331
|
-
releaseLeaseOnAbort,
|
|
332
|
-
iosDeviceProcess,
|
|
333
|
-
verifyIosDeviceReleaseLaunch,
|
|
334
|
-
readBundleId,
|
|
335
|
-
readBundleExecutable,
|
|
336
|
-
swapJsBundle,
|
|
337
|
-
installIosApp,
|
|
338
|
-
clearOtherUserApps,
|
|
339
|
-
clearIosAppData,
|
|
340
|
-
clearIosAdoptionPending,
|
|
341
|
-
launchIosApp,
|
|
342
|
-
verifyLaunch,
|
|
343
|
-
verifyReleaseLaunch,
|
|
344
|
-
ensureWorkspaceStorage: ensureWorkspaceStorageSafely,
|
|
345
|
-
replaceCollector,
|
|
346
|
-
stopPreviousCollector,
|
|
347
|
-
writeWorkspaceLaunch: writeWorkspaceLaunchAsync,
|
|
348
|
-
writeWorkspaceState: writeWorkspaceStateAsync,
|
|
349
|
-
createWriter: createNdjsonWriter,
|
|
350
|
-
recordStats: recordRunStats,
|
|
351
|
-
recordCapacityRefusal,
|
|
352
|
-
readEstimates: readRunEstimates,
|
|
353
|
-
now: () => Date.now()
|
|
354
|
-
};
|
|
355
|
-
//#endregion
|
|
356
141
|
//#region src/commands/ios/launch.ts
|
|
357
142
|
function iosProcessRuntime(prepare, kind = "process") {
|
|
358
143
|
return {
|
|
@@ -424,12 +209,12 @@ async function verifyIosProcessRun({ operation, root, slot, appPath, d, launched
|
|
|
424
209
|
note(chalk.yellow(phaseLine("", `${embeddedJavaScript ? "Release" : "Process"} readiness was not established. Run \`stim logs --errors\` for captured crash reports, or \`stim logs --source device\` for the full device output.`)));
|
|
425
210
|
return { state: crashes.length || processCheck?.reason === "exited" ? LAUNCH_FATAL : LAUNCH_UNVERIFIED };
|
|
426
211
|
}
|
|
427
|
-
async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched, phase, note, metroCheck, logsDir, launchedAt, metroPort, isExpo, bundleId, udid, scheme, physical, appName, lanAddress, lanOrigin, remoteDevice, metroOrigin, enterActivity }) {
|
|
212
|
+
async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched, phase, note, metroCheck, logsDir, launchedAt, metroPort, isExpo, bundleId, udid, scheme, physical, appName, lanAddress, lanOrigin, remoteDevice, metroOrigin, enterActivity, hostedLogs }) {
|
|
428
213
|
const runCommand = nativeRunCommand("ios", slot, {
|
|
429
214
|
physical,
|
|
430
215
|
deviceId: udid
|
|
431
216
|
});
|
|
432
|
-
const readNativeCrashes = () => remoteDevice ? [] : captureNativeCrashes({
|
|
217
|
+
const readNativeCrashes = () => hostedLogs ? hostedLogs.readNativeCrashes() : remoteDevice ? [] : captureNativeCrashes({
|
|
433
218
|
root,
|
|
434
219
|
slot,
|
|
435
220
|
platform: "ios",
|
|
@@ -447,7 +232,8 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
447
232
|
return running.state === "unknown" ? null : running.state === "running";
|
|
448
233
|
};
|
|
449
234
|
const siblings = metroCheck ? await siblingPlatformSlots(root, "ios", slot) : [];
|
|
450
|
-
const verification = metroCheck ? await d.verifyLaunch({
|
|
235
|
+
const verification = metroCheck ? await withDrainingCancellation(operation, operation?.signal, () => d.verifyLaunch({
|
|
236
|
+
signal: operation?.signal,
|
|
451
237
|
requireBundleResponse: true,
|
|
452
238
|
slot: launchSlotScope(root, slot),
|
|
453
239
|
appPid: physical || remoteDevice ? null : launched?.pid,
|
|
@@ -460,12 +246,14 @@ async function verifyIosMetroRun({ operation, root, slot, appPath, d, launched,
|
|
|
460
246
|
platform: "ios",
|
|
461
247
|
mode: workspaceDevServerMode(root, isExpo),
|
|
462
248
|
readNativeCrashes,
|
|
249
|
+
readDeviceRecords: hostedLogs?.readDeviceRecords,
|
|
250
|
+
deviceLogsThrough: hostedLogs?.deviceLogsThrough,
|
|
463
251
|
processAlive: remoteDevice ? null : physical ? deviceProcess : async () => {
|
|
464
252
|
if (launched?.pid) return d.pidExists(launched.pid);
|
|
465
253
|
const running = await iosAppProcess(udid, bundleId);
|
|
466
254
|
return running.state === "unknown" ? null : running.state === "running";
|
|
467
255
|
}
|
|
468
|
-
}) : {
|
|
256
|
+
})) : {
|
|
469
257
|
verified: false,
|
|
470
258
|
skipped: true
|
|
471
259
|
};
|
|
@@ -609,6 +397,27 @@ async function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }
|
|
|
609
397
|
for (const failure of swept.failed) note(chalk.yellow(phaseLine("install", `could not remove ${failure}, left by the previous workspace`)));
|
|
610
398
|
return `Could not remove ${swept.failed.join(", ")}, left by the previous workspace.`;
|
|
611
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
|
+
}
|
|
612
421
|
function installMayBeProven(adopting, parkedCacheKey, storeKey) {
|
|
613
422
|
return !adopting || !parkedCacheKey || parkedCacheKey === storeKey;
|
|
614
423
|
}
|
|
@@ -639,8 +448,9 @@ async function recordIosReloadTarget({ d, root, physical, remoteDevice, bundleId
|
|
|
639
448
|
function installFailureRemedy(remoteDevice) {
|
|
640
449
|
return remoteDevice?.failureRemedy() ?? "Check that the simulator is booted and that the app was built for the simulator SDK.";
|
|
641
450
|
}
|
|
642
|
-
function launchFailureRemedy(remoteDevice, udid, bundleId, logFile) {
|
|
451
|
+
function launchFailureRemedy(remoteDevice, udid, bundleId, logFile, reason) {
|
|
643
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.`;
|
|
644
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}.`;
|
|
645
455
|
}
|
|
646
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 }) {
|
|
@@ -702,6 +512,27 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
702
512
|
let installSkipped = false;
|
|
703
513
|
let launched;
|
|
704
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
|
+
});
|
|
705
536
|
if (physical) {
|
|
706
537
|
const overWifi = await installsOverWifi(d, udid, wireless, note);
|
|
707
538
|
const bounds = iosDeviceBounds(overWifi);
|
|
@@ -929,10 +760,12 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
929
760
|
since: launchedAt,
|
|
930
761
|
appPath
|
|
931
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);
|
|
932
765
|
return fail({
|
|
933
766
|
code: launched.code || "STIM_LAUNCH_FAILED",
|
|
934
767
|
message: launched.reason,
|
|
935
|
-
remedy: launchFailureRemedy(remoteDevice, udid, bundleId, logFile),
|
|
768
|
+
remedy: launchFailureRemedy(remoteDevice, udid, bundleId, logFile, launched.reason),
|
|
936
769
|
build: {
|
|
937
770
|
...buildFailure,
|
|
938
771
|
appPath,
|
|
@@ -995,25 +828,25 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
995
828
|
metroOrigin: typeof launched?.jsLocation === "string" ? launched.jsLocation : null,
|
|
996
829
|
enterActivity
|
|
997
830
|
});
|
|
998
|
-
if (launchState === "fatal")
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
} : 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({
|
|
1015
847
|
launchState,
|
|
1016
848
|
release: runtime.kind === "embedded-js",
|
|
849
|
+
process: runtime.kind === "process",
|
|
1017
850
|
bundleId,
|
|
1018
851
|
configuration,
|
|
1019
852
|
metroPort,
|
|
@@ -1072,4 +905,222 @@ async function finishIosRun({ operation, output, projectBundleId, runtime, runti
|
|
|
1072
905
|
};
|
|
1073
906
|
}
|
|
1074
907
|
//#endregion
|
|
1075
|
-
|
|
908
|
+
//#region src/engine/ios-lan.ts
|
|
909
|
+
const IP_TXT = "ip.txt";
|
|
910
|
+
function chooseLanAddress({ pinned = null, candidates }) {
|
|
911
|
+
const list = Array.isArray(candidates) ? candidates : [];
|
|
912
|
+
if (pinned) return {
|
|
913
|
+
address: pinned,
|
|
914
|
+
interfaceName: list.find((candidate) => candidate.address === pinned)?.interfaceName ?? null,
|
|
915
|
+
pinned: true,
|
|
916
|
+
candidates: list.length
|
|
917
|
+
};
|
|
918
|
+
const first = list[0];
|
|
919
|
+
if (!first) return null;
|
|
920
|
+
return {
|
|
921
|
+
address: first.address,
|
|
922
|
+
interfaceName: first.interfaceName,
|
|
923
|
+
pinned: false,
|
|
924
|
+
candidates: list.length
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
function lanOriginUrlFor(address, port) {
|
|
928
|
+
return `http://${address}:${port}`;
|
|
929
|
+
}
|
|
930
|
+
function ipTxtContents(address, port) {
|
|
931
|
+
return `${String(address).trim()}:${String(port).trim()}\n`;
|
|
932
|
+
}
|
|
933
|
+
function writeIpTxt(appPath, address, port, { write = writeFileSync } = {}) {
|
|
934
|
+
const path = join(appPath, IP_TXT);
|
|
935
|
+
write(path, ipTxtContents(address, port), "utf-8");
|
|
936
|
+
return path;
|
|
937
|
+
}
|
|
938
|
+
async function ensureLanReachable({ origin, metroPort, root, isExpo, logsDir, gateOrigin = gateMetroOrigin, readRecords = null }) {
|
|
939
|
+
const result = await gateOrigin({
|
|
940
|
+
origin,
|
|
941
|
+
metroPort,
|
|
942
|
+
platform: "ios",
|
|
943
|
+
entryPoint: bundleEntryPoint(root, isExpo),
|
|
944
|
+
readRecords: readRecords ?? (() => readMetroRecords(logsDir)),
|
|
945
|
+
isProof: isBundleProof
|
|
946
|
+
});
|
|
947
|
+
if (result.failed) return {
|
|
948
|
+
failed: result.reason ?? `${origin} is not this workspace's Metro.`,
|
|
949
|
+
remedy: `The phone reaches Metro at ${origin}, so that address has to serve THIS workspace's dev server. \`stim start\` prints the port it reserved. Set ios.lanHost in .stim.json when this Mac has several network interfaces and the phone shares one that is not the first.`
|
|
950
|
+
};
|
|
951
|
+
return { ok: true };
|
|
952
|
+
}
|
|
953
|
+
function copyAppAside(appPath, { exec = null, mkdtemp = () => makeTemporaryDirectory(appPath, "stim-ios-device-") } = {}) {
|
|
954
|
+
const e = exec || getExecutor();
|
|
955
|
+
const tmpDir = mkdtemp();
|
|
956
|
+
const copy = join(tmpDir, basename(appPath));
|
|
957
|
+
try {
|
|
958
|
+
e.runFile("cp", [
|
|
959
|
+
"-c",
|
|
960
|
+
"-R",
|
|
961
|
+
appPath,
|
|
962
|
+
copy
|
|
963
|
+
], { timeoutMs: "unbounded" });
|
|
964
|
+
} catch {
|
|
965
|
+
try {
|
|
966
|
+
removeTemporaryEntry(copy);
|
|
967
|
+
e.runFile("cp", [
|
|
968
|
+
"-R",
|
|
969
|
+
appPath,
|
|
970
|
+
copy
|
|
971
|
+
], { timeoutMs: "unbounded" });
|
|
972
|
+
} catch (error) {
|
|
973
|
+
removeTemporaryEntry(tmpDir);
|
|
974
|
+
throw error;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
return {
|
|
978
|
+
tmpDir,
|
|
979
|
+
appPath: copy
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
//#endregion
|
|
983
|
+
//#region src/engine/lan-address.ts
|
|
984
|
+
const EN_INTERFACE = /^en(\d+)$/;
|
|
985
|
+
const EXCLUDED_INTERFACE = /^(?:utun|bridge|awdl)/;
|
|
986
|
+
const LINK_LOCAL = /^169\.254\./;
|
|
987
|
+
function isIpv4(entry) {
|
|
988
|
+
return entry.family === "IPv4" || entry.family === 4;
|
|
989
|
+
}
|
|
990
|
+
function lanCandidates(interfaces) {
|
|
991
|
+
const ranked = [];
|
|
992
|
+
const seen = /* @__PURE__ */ new Set();
|
|
993
|
+
for (const [interfaceName, entries] of Object.entries(interfaces ?? {})) {
|
|
994
|
+
if (EXCLUDED_INTERFACE.test(interfaceName)) continue;
|
|
995
|
+
const en = EN_INTERFACE.exec(interfaceName);
|
|
996
|
+
for (const entry of entries ?? []) {
|
|
997
|
+
if (!entry || typeof entry !== "object" || !isIpv4(entry) || entry.internal === true) continue;
|
|
998
|
+
const address = typeof entry.address === "string" ? entry.address.trim() : "";
|
|
999
|
+
if (address === "" || LINK_LOCAL.test(address)) continue;
|
|
1000
|
+
if (seen.has(address)) continue;
|
|
1001
|
+
seen.add(address);
|
|
1002
|
+
ranked.push({
|
|
1003
|
+
interfaceName,
|
|
1004
|
+
address,
|
|
1005
|
+
rank: en ? 0 : 1,
|
|
1006
|
+
index: en ? Number(en[1]) : 0
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
ranked.sort((a, b) => a.rank - b.rank || a.index - b.index || a.interfaceName.localeCompare(b.interfaceName) || a.address.localeCompare(b.address));
|
|
1011
|
+
return ranked.map(({ interfaceName, address }) => ({
|
|
1012
|
+
interfaceName,
|
|
1013
|
+
address
|
|
1014
|
+
}));
|
|
1015
|
+
}
|
|
1016
|
+
function hostLanCandidates(interfaces = networkInterfaces) {
|
|
1017
|
+
return lanCandidates(interfaces());
|
|
1018
|
+
}
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region src/commands/ios/dependencies.ts
|
|
1021
|
+
const DEFAULT_DEPS = {
|
|
1022
|
+
projectRegistry,
|
|
1023
|
+
automaticDevicePlacement,
|
|
1024
|
+
checkEasFallback,
|
|
1025
|
+
prepareHostedIos,
|
|
1026
|
+
placeHostedIos,
|
|
1027
|
+
hostedMetroPortProbe,
|
|
1028
|
+
readHostedIos,
|
|
1029
|
+
writeHostedIos: writeHostedIosAsync,
|
|
1030
|
+
resolveEasDevelopmentBuild,
|
|
1031
|
+
findProjectRoot,
|
|
1032
|
+
resolveSettings,
|
|
1033
|
+
settingsLayers,
|
|
1034
|
+
settingOriginScope,
|
|
1035
|
+
gitCommonDir: gitCommonDirAsync,
|
|
1036
|
+
repoRoot: repoRootAsync,
|
|
1037
|
+
detectBundleId,
|
|
1038
|
+
detectIsExpo,
|
|
1039
|
+
devClientScheme,
|
|
1040
|
+
hasDevClient,
|
|
1041
|
+
devClientTakesDevMenuParams,
|
|
1042
|
+
getProject,
|
|
1043
|
+
upsertProject: (...args) => withConfigLockAsync(() => upsertProject(...args)),
|
|
1044
|
+
recordIosSchemeApprovals,
|
|
1045
|
+
checkDeviceCapacity,
|
|
1046
|
+
budgetGate,
|
|
1047
|
+
ensureOwnedDevice,
|
|
1048
|
+
listIosRuntimes: listIosRuntimesAsync,
|
|
1049
|
+
listAllIosSims,
|
|
1050
|
+
ensureBooted,
|
|
1051
|
+
resolveRemoteContext,
|
|
1052
|
+
remoteIosDeps,
|
|
1053
|
+
readRemoteSimulatorArch,
|
|
1054
|
+
hostSimulatorArch,
|
|
1055
|
+
ensureMetroReachable,
|
|
1056
|
+
ensureRemoteBootOwned,
|
|
1057
|
+
detectProviders,
|
|
1058
|
+
resolveProjectMetro,
|
|
1059
|
+
startDevServer,
|
|
1060
|
+
warmMetro,
|
|
1061
|
+
readWorkspaceState,
|
|
1062
|
+
pidExists,
|
|
1063
|
+
getConcurrencyLimits,
|
|
1064
|
+
fingerprintProject,
|
|
1065
|
+
memoizedFingerprint,
|
|
1066
|
+
untrackedNativeFiles,
|
|
1067
|
+
evictBuild,
|
|
1068
|
+
resolveBuild,
|
|
1069
|
+
storeBuild,
|
|
1070
|
+
resolveCacheProviderConfig,
|
|
1071
|
+
loadCacheProvider,
|
|
1072
|
+
acquireBuildLock,
|
|
1073
|
+
releaseBuildLock,
|
|
1074
|
+
waitForBuild,
|
|
1075
|
+
acquireBuildSlot,
|
|
1076
|
+
releaseBuildSlot,
|
|
1077
|
+
loadProjectProvider,
|
|
1078
|
+
checkEasAuth,
|
|
1079
|
+
resolveEasCliBin,
|
|
1080
|
+
resolveRemote,
|
|
1081
|
+
uploadRemote,
|
|
1082
|
+
planPrebuild: planPrebuildAsync,
|
|
1083
|
+
runPrebuild,
|
|
1084
|
+
readPodState,
|
|
1085
|
+
podsAreStale,
|
|
1086
|
+
runPodInstall,
|
|
1087
|
+
buildIos,
|
|
1088
|
+
discoverXcodeProject,
|
|
1089
|
+
resolveScheme,
|
|
1090
|
+
listIosDevices,
|
|
1091
|
+
hostLanCandidates,
|
|
1092
|
+
ensureLanReachable,
|
|
1093
|
+
gateProfileForDevice,
|
|
1094
|
+
sealAppForDevice,
|
|
1095
|
+
installIosDeviceApp,
|
|
1096
|
+
awaitIosDeviceLaunch,
|
|
1097
|
+
acquireRunLease,
|
|
1098
|
+
runLease,
|
|
1099
|
+
selectFromPool,
|
|
1100
|
+
releaseLeaseOnAbort,
|
|
1101
|
+
iosDeviceProcess,
|
|
1102
|
+
verifyIosDeviceReleaseLaunch,
|
|
1103
|
+
readBundleId,
|
|
1104
|
+
readBundleExecutable,
|
|
1105
|
+
swapJsBundle,
|
|
1106
|
+
installIosApp,
|
|
1107
|
+
clearOtherUserApps,
|
|
1108
|
+
clearIosAppData,
|
|
1109
|
+
clearIosAdoptionPending,
|
|
1110
|
+
launchIosApp,
|
|
1111
|
+
verifyLaunch,
|
|
1112
|
+
verifyReleaseLaunch,
|
|
1113
|
+
followHostedLaunchLogs,
|
|
1114
|
+
ensureWorkspaceStorage: ensureWorkspaceStorageSafely,
|
|
1115
|
+
replaceCollector,
|
|
1116
|
+
stopPreviousCollector,
|
|
1117
|
+
writeWorkspaceLaunch: writeWorkspaceLaunchAsync,
|
|
1118
|
+
writeWorkspaceState: writeWorkspaceStateAsync,
|
|
1119
|
+
createWriter: createNdjsonWriter,
|
|
1120
|
+
recordStats: recordRunStats,
|
|
1121
|
+
recordCapacityRefusal,
|
|
1122
|
+
readEstimates: readRunEstimates,
|
|
1123
|
+
now: () => Date.now()
|
|
1124
|
+
};
|
|
1125
|
+
//#endregion
|
|
1126
|
+
export { writeIpTxt as a, iosProcessRuntime as c, replaceCollector as d, lanOriginUrlFor as i, verifyIosMetroRun as l, chooseLanAddress as n, finishIosRun as o, copyAppAside as r, iosMetroRuntime as s, DEFAULT_DEPS as t, collectorEntry as u };
|