stim 1.20.2 → 1.22.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 +141 -8
- package/dist/acquire-artifact-Co2k4f7O.mjs +171 -0
- package/dist/act-DsuqEkiM.mjs +2801 -0
- package/dist/activity-CMLmzp7o.mjs +1397 -0
- package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-DUFaTMdd.mjs} +23 -67
- package/dist/{android-DCKZrNvV.mjs → android-ByRMUoiJ.mjs} +157 -93
- package/dist/{android-Mz_Inn3w.mjs → android-C7sVmyI9.mjs} +299 -116
- package/dist/{android-Dlzxshgp.mjs → android-DGkNqa_c.mjs} +5 -5
- package/dist/{android-HqP1_vB_.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-ngferVq2.mjs} +7 -6
- package/dist/android-project-BCAAmMwz.mjs +12 -0
- package/dist/android-project-DVWyCbWU.d.mts +391 -0
- package/dist/api.d.mts +810 -64
- package/dist/api.mjs +782 -1
- package/dist/{artifact-HSwkIWEQ.mjs → artifact-8EY8SAPw.mjs} +240 -213
- package/dist/{artifact-D3czlUvT.mjs → artifact-DJPy518Y.mjs} +203 -164
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-CA-F1GQo.mjs → browser-web-Bcv99PBM.mjs} +194 -64
- package/dist/budget-Cvwn54qV.mjs +9285 -0
- package/dist/{build-DYDbfkk5.mjs → build-CabC3G23.mjs} +153 -98
- package/dist/build-cache-Dv7RN200.mjs +602 -0
- package/dist/build-plan-DUC8Ka9y.mjs +248 -0
- package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DSeQjt-Q.mjs} +2 -2
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-zdKiYQ3E.mjs → ccache-Btwc36-I.mjs} +10 -9
- package/dist/{cdp-Dq_ypAlJ.mjs → cdp-3fwICjzi.mjs} +18 -5
- package/dist/{chrome-BnzZMqsR.mjs → chrome-Bbw689-6.mjs} +7 -4
- package/dist/{cli-CLP3diBm.mjs → cli-CHZa9Lvk.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/client-OyRoEuSr.mjs +1577 -0
- package/dist/collector-run.d.mts +4 -40
- package/dist/collector-run.mjs +9 -8
- package/dist/{command-output-BTy8hZ0F.mjs → command-output-gwpm28fu.mjs} +1 -1
- package/dist/config-DlrsduwG.mjs +955 -0
- package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-x9rN6bhs.mjs} +14 -4
- package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-1I9KZT1Y.mjs} +20 -5
- package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-DAWVIGBu.mjs → dev-client-BSDR5h3F.mjs} +2 -2
- package/dist/{device-BECOiufl.mjs → device-B-L3Fbxy.mjs} +91 -34
- package/dist/device-DklWZLqb.mjs +1068 -0
- package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-DK5_EwRS.mjs} +42 -13
- package/dist/device-host-worker.mjs +76 -79
- package/dist/{device-ios-COSi6oS1.mjs → device-ios-DoB6KFCO.mjs} +77 -51
- package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-xJPQ_QQG.mjs} +14 -26
- package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-BMkdsefq.mjs} +5 -5
- package/dist/{doctor-kfMBnUw6.mjs → doctor-Bo7BXLux.mjs} +271 -320
- package/dist/{doctor-CB8oZKCk.mjs → doctor-D5_EzwfA.mjs} +186 -91
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +19 -0
- package/dist/doctor-thjWAV0z.mjs +2 -0
- package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-N2wDotwQ.mjs} +40 -21
- package/dist/{eas-build-JyfqyHfC.mjs → eas-build-CwknaQYj.mjs} +53 -20
- package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-CSgAulr5.mjs} +41 -214
- package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-DlY_serQ.mjs} +230 -11
- package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-DBWO2rxE.mjs} +172 -82
- package/dist/exec-DEoAhcze.mjs +858 -0
- package/dist/exec-DnYc4HGH.d.mts +78 -0
- package/dist/{gc-qWOMdnER.mjs → gc-CXxN-4SE.mjs} +1091 -1029
- package/dist/gc-DnNDQyaP.mjs +3 -0
- package/dist/{guide-G9cAbVAc.mjs → guide-Br0LEfKy.mjs} +1165 -297
- package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-B-9f-jkd.mjs} +10 -8
- package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DZAPrcro.mjs} +34 -19
- package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
- package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-FIRx9X2f.mjs} +77 -43
- package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-_awYSpfv.mjs} +35 -22
- package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-BdzE668-.mjs} +49 -27
- package/dist/idle-C4cZ757K.d.mts +24 -0
- package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DDg3SdvY.mjs} +11 -10
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-BwVCF7oA.mjs → ios-Ds1clbIt.mjs} +8 -8
- package/dist/{ios-device-D7pi2Sca.mjs → ios-device--h_-8ENa.mjs} +51 -26
- package/dist/{ios-device-B5veSDDQ.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-RkW4pnQf.mjs → ios-hcBpnEGk.mjs} +200 -93
- package/dist/{ios-Ce7bc7br.mjs → ios-pm4nL6By.mjs} +160 -108
- package/dist/{ios-project-K9hY_Jab.mjs → ios-project-CZhKODF3.mjs} +13 -13
- package/dist/ios-signing-BtAffm0A.mjs +489 -0
- package/dist/{ios-state-CBLe1xYw.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-nOLJGVdy.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Bwhh4S7V.mjs} +30 -25
- package/dist/{launch-C3qJ6Agb.mjs → launch-BjxemNpK.mjs} +85 -543
- package/dist/{launch-F4sOqAhB.mjs → launch-CCzXlc8r.mjs} +91 -90
- package/dist/logs-BfwwadsZ.mjs +479 -0
- package/dist/logs-jTS_lHSo.mjs +248 -0
- package/dist/{macos-D7uDvO-z.mjs → macos-DVlSSyUg.mjs} +1 -1
- package/dist/macos-NfV2D7dO.mjs +694 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +123 -248
- package/dist/{metro-DnCEjCxs.mjs → metro-DiXtA3Ty.mjs} +107 -30
- package/dist/metro-gateway-CKZqKqx7.mjs +209 -0
- package/dist/{named-ports-4WopRPg-.mjs → named-ports-DkEzOfzO.mjs} +42 -90
- package/dist/native-android-CqgnOgsT.mjs +645 -0
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/native-gradle-inputs-Dnh84Zbd.mjs +211 -0
- package/dist/native-inputs-TRTTTRxt.mjs +91 -0
- package/dist/native-run-NwUuxbkg.mjs +276 -0
- package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-B7KIafpM.mjs} +11 -9
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-D_VOfFL7.mjs} +26 -18
- package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-BYDOHWLN.mjs} +104 -60
- package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
- package/dist/offload-worker.d.mts +59 -41
- package/dist/offload-worker.mjs +478 -115
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DCtw_2IA.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-DRHy329N.mjs → page-DBL2PiUU.mjs} +12 -5
- package/dist/paths-BsJMoPP2.mjs +12 -0
- package/dist/paths-DQtTgsBf.mjs +42 -0
- package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BnGgJRRZ.mjs} +5 -5
- package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-DIsMtN-d.mjs} +15 -11
- package/dist/{ports-DdSUicVo.mjs → ports-Cy1RkmuQ.mjs} +3 -3
- package/dist/prebuild-D4JoEAEs.mjs +484 -0
- package/dist/{project-_phNIJfs.mjs → project-wM_XFTvE.mjs} +65 -37
- package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/pull-request-eODyIqZF.d.mts +124 -0
- package/dist/pull-requests.d.mts +2 -120
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-6OZ7MSM7.mjs} +121 -72
- package/dist/{gradle-DSrXb6lG.mjs → react-native-build-Dvd8hC21.mjs} +292 -15
- package/dist/react-native-doctor-DsoSF1Y9.mjs +234 -0
- package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-4u1Rn-GR.mjs} +71 -39
- package/dist/{recordings-D0d5aQt0.mjs → recordings-CQmfzAh7.mjs} +12 -9
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-C8JhxjSh.mjs → reload-BzkYabB-.mjs} +94 -47
- package/dist/reload-D7AVlb8N.mjs +2 -0
- package/dist/{remote-BiR6aYjy.mjs → remote-DjGDmlTZ.mjs} +26 -18
- package/dist/result-D2Ykz_iD.mjs +435 -0
- package/dist/{run-BtPgpKks.mjs → run-DidHghD1.mjs} +5 -5
- package/dist/selection-DSMbWEX2.mjs +620 -0
- package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CafzuyFB.mjs} +3 -4
- package/dist/{server-command-CTtCkmcQ.mjs → server-command-C6QjeupS.mjs} +14 -7
- package/dist/{server-expo-DsguMGUF.mjs → server-expo-CrjB29pq.mjs} +54 -11
- package/dist/server-expo-D58c9L0M.mjs +2 -0
- package/dist/{settings-B717odTD.mjs → settings-C7O8A6ZI.mjs} +309 -119
- package/dist/settings-DpR-1Wnn.mjs +114 -0
- package/dist/settings-write-CzD60rOD.mjs +360 -0
- package/dist/settings.schema.json +176 -16
- package/dist/{simslim-CCr3rE-A.mjs → simslim-BNckWpXi.mjs} +14 -12
- package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-CbfmNgM6.mjs} +15 -20
- package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
- package/dist/stage-Bps5oius.mjs +200 -0
- package/dist/{start-TXeMmmO2.mjs → start-Br-oxqMD.mjs} +1 -1
- package/dist/start-EojN4WFz.mjs +1364 -0
- package/dist/{state-D1Icyjlu.mjs → state--smjFSTL.mjs} +55 -13
- package/dist/{state-CG_OFoaA.mjs → state-08I3hw3_.mjs} +3 -2
- package/dist/{stats-BoY5sEPU.mjs → stats-D3GerlFW.mjs} +7 -13
- package/dist/stats-report-BzaPrRm6.mjs +16 -0
- package/dist/{status-BTA7kKiQ.mjs → status-BRROykC8.mjs} +7 -5
- package/dist/status-EvrK72L2.mjs +2 -0
- package/dist/{status-WgFbkRzj.mjs → status-WBDajew2.mjs} +554 -452
- package/dist/{status-watch-C23ILtf9.mjs → status-watch-Bg_u-pwR.mjs} +222 -25
- package/dist/status-worker.d.mts +1 -0
- package/dist/status-worker.mjs +19 -0
- package/dist/stim-desktop-D5OGpYZM.mjs +112 -0
- package/dist/{stop-DR6VoDIk.mjs → stop-DTZ9uTw3.mjs} +2 -2
- package/dist/{stop-DPEhunlw.mjs → stop-Dky10AEJ.mjs} +33 -23
- package/dist/{stop-BNmBMi1F.mjs → stop-Mv6W9FAk.mjs} +137 -98
- package/dist/supervisor-run.d.mts +8 -17
- package/dist/supervisor-run.mjs +56 -28
- package/dist/{support-CwjbFs9H.mjs → support-CNioewsd.mjs} +14 -14
- package/dist/{support-DMTqj3Hm.mjs → support-yUiOjnVY.mjs} +20 -13
- package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
- package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
- package/dist/toolchain-BY8X8HXx.mjs +2 -0
- package/dist/toolchain-DpJMHq0n.mjs +876 -0
- package/dist/{trigger-CigAYjeL.mjs → trigger-Cbyc41d_.mjs} +21 -6
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-CA3TgT3-.mjs} +263 -156
- package/dist/web-CZ07gd77.mjs +2 -0
- package/dist/{web-BDBMxDpx.mjs → web-DKx6yoFA.mjs} +20 -14
- package/dist/web-run.mjs +13 -12
- package/dist/windows-report.d.mts +1 -0
- package/dist/windows-report.mjs +18 -0
- package/dist/windows-report.ps1 +43 -0
- package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-U08dEzhG.mjs} +62 -58
- package/dist/{workspaces-C36s2jb9.mjs → workspaces-CpANmBlq.mjs} +1723 -1286
- package/dist/{worktree-CgvJYJ-Q.mjs → worktree-CHecZ4Oq.mjs} +1097 -547
- package/dist/worktree-ZqZVjD9K.mjs +2 -0
- package/dist/xcode-BXn9-xYx.mjs +896 -0
- package/package.json +7 -5
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/shim/android-optimizations.gradle +7 -5
- package/dist/activity-BSV745Kz.mjs +0 -629
- package/dist/api-qvOzWyfO.mjs +0 -154
- package/dist/api-run.mjs +0 -294
- package/dist/app-install-BIKtMfPq.mjs +0 -896
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
- package/dist/budget-f7516Zk0.mjs +0 -4106
- package/dist/build-facts-DcLv2HSd.d.mts +0 -111
- package/dist/cancellation-C_22VQTH.mjs +0 -24
- package/dist/client-qQAaXSUs.mjs +0 -1771
- package/dist/config-BYDxlMY3.mjs +0 -562
- package/dist/device-DuiPJQSn.mjs +0 -290
- package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
- package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
- package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
- package/dist/exec-DqKo9GKJ.mjs +0 -268
- package/dist/git-DDfFzkMm.mjs +0 -45
- package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
- package/dist/logs-BGrEUaEs.mjs +0 -383
- package/dist/macos-Ch5VJmcS.mjs +0 -584
- package/dist/metro-gateway-CX9Xlkq2.mjs +0 -103
- package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
- package/dist/native-android-D5qc3-_v.mjs +0 -226
- package/dist/native-gradle-inputs-BsLRrl7u.mjs +0 -349
- package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
- package/dist/plan-C4TjdPsR.mjs +0 -260
- package/dist/prebuild-DYbucPXy.mjs +0 -212
- package/dist/preview-78a9kR_-.mjs +0 -1011
- package/dist/react-native-build-CtCccJtb.mjs +0 -239
- package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
- package/dist/remote-cache-OyOyVIS3.mjs +0 -526
- package/dist/result-CaJg5Iat.mjs +0 -186
- package/dist/server-expo-Bigriskl.mjs +0 -2
- package/dist/settings-BORNaaCO.mjs +0 -402
- package/dist/settings-vk3mJGSm.d.mts +0 -13
- package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
- package/dist/stage-KNTQopqv.mjs +0 -157
- package/dist/start-BWqzODpb.mjs +0 -1116
- package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
- package/dist/swiftpm-macos-DRNVJWlb.mjs +0 -119
- package/dist/tailnet-Dh-qiYzG.mjs +0 -265
- package/dist/toolchain-BFkAcstd.mjs +0 -2
- package/dist/toolchain-DxSsNssu.mjs +0 -1657
- package/dist/trigger-9_USgmxz.mjs +0 -2
- package/dist/web-Dq-i3wzJ.mjs +0 -2
- package/dist/worktree-DpLdCHga.mjs +0 -2
- package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
- package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
|
@@ -1,510 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { r as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { a as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { n as
|
|
29
|
-
import {
|
|
30
|
-
import { a as
|
|
31
|
-
import {
|
|
32
|
-
import { n as
|
|
33
|
-
import { n as
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
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-
|
|
41
|
-
import { i as swapJsBundle } from "./js-swap-
|
|
42
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
|
+
import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
+
import { B as deviceSlotFileKey, E as upsertProject, V as deviceSlotKey, p as getProject, u as getConcurrencyLimits, v as recordIosSchemeApprovals } from "./config-DlrsduwG.mjs";
|
|
4
|
+
import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-gwpm28fu.mjs";
|
|
5
|
+
import { u as cancellableSleep } from "./operation-exec-BW0em61G.mjs";
|
|
6
|
+
import { d as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-U08dEzhG.mjs";
|
|
7
|
+
import { $ as settingOriginScope, G as resolveCacheProviderConfig, Ht as makeTemporaryDirectory, Nt as repoRootAsync, Ut as removeTemporaryEntry, Y as resolveSettings, ct as detectProviders, nt as settingsLayers, vt as gitCommonDirAsync } from "./settings-C7O8A6ZI.mjs";
|
|
8
|
+
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunch } from "./project-wM_XFTvE.mjs";
|
|
9
|
+
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
10
|
+
import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-DiXtA3Ty.mjs";
|
|
11
|
+
import { $t as readCollectorRecords, Bn as checkEasAuth, Bt as ensureMetroReachable, En as restartedAppNote, Gt as resolveRemoteContext, J as recordRunStats, Jn as resolveRemote, Jt as LAUNCH_FATAL, K as recordCapacityRefusal, Mn as readRemoteSimulatorArch, Nn as gateMetroOrigin, Qt as isBundleProof, Rt as bundleEntryPoint, Sn as iosAppProcess, Tn as launchIosApp, Un as loadProjectProvider, Vt as ensureRemoteBootOwned, W as readRunEstimates, Wt as remoteIosDeps, Xt as RELEASE_VERIFY_WAIT_MS, Yn as uploadRemote, Yt as LAUNCH_UNVERIFIED, an as verifyReleaseLaunch, en as readMetroRecords, hn as devClientUrl, in as verifyLaunch, mn as clearOtherUserApps, nn as unverifiedLaunchLines, qn as resolveEasCliBin, qt as LAUNCH_BUNDLING, t as budgetGate, tn as unattributedLaunchLines, un as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, xn as installIosApp } from "./budget-Cvwn54qV.mjs";
|
|
12
|
+
import { I as acquireBuildSlot, R as releaseBuildSlot } from "./workspaces-CpANmBlq.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-CMLmzp7o.mjs";
|
|
14
|
+
import { b as untrackedNativeFiles, g as storeBuild, h as resolveBuild, l as fingerprintProject } from "./build-cache-Dv7RN200.mjs";
|
|
15
|
+
import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-hcBpnEGk.mjs";
|
|
16
|
+
import { o as workspaceLinks } from "./stim-desktop-D5OGpYZM.mjs";
|
|
17
|
+
import { f as readBundleExecutable, m as resolveScheme, p as readBundleId } from "./xcode-BXn9-xYx.mjs";
|
|
18
|
+
import { h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-DpJMHq0n.mjs";
|
|
19
|
+
import { n as readHostedIos, o as writeHostedIos } from "./ios-state-Dtw5K2aI.mjs";
|
|
20
|
+
import { n as prepareHostedIos, t as placeHostedIos } from "./hosted-ios-CsCS21hn.mjs";
|
|
21
|
+
import { n as verifyCollectorOwnership } from "./ownership-C5fo5Edb.mjs";
|
|
22
|
+
import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-CbfmNgM6.mjs";
|
|
23
|
+
import { c as startDevServer, g as detectBundleId } from "./start-EojN4WFz.mjs";
|
|
24
|
+
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
25
|
+
import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-Dvd8hC21.mjs";
|
|
26
|
+
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-xJPQ_QQG.mjs";
|
|
27
|
+
import { r as checkDeviceCapacity } from "./device-capacity-DK5_EwRS.mjs";
|
|
28
|
+
import { n as clearIosAdoptionPending } from "./device-ios-DoB6KFCO.mjs";
|
|
29
|
+
import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-CNioewsd.mjs";
|
|
30
|
+
import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-BtAffm0A.mjs";
|
|
31
|
+
import { a as resolveEasDevelopmentBuild } from "./eas-build-CwknaQYj.mjs";
|
|
32
|
+
import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-DBWO2rxE.mjs";
|
|
33
|
+
import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-B7KIafpM.mjs";
|
|
34
|
+
import { i as runPrebuild, n as planPrebuildAsync } from "./prebuild-D4JoEAEs.mjs";
|
|
35
|
+
import { n as devClientTakesDevMenuParams, t as devClientScheme } from "./dev-client-BSDR5h3F.mjs";
|
|
36
|
+
import { n as automaticDevicePlacement, t as checkEasFallback } from "./eas-fallback-CSgAulr5.mjs";
|
|
37
|
+
import { n as ensureBooted, o as warmMetro, r as ensureOwnedDevice } from "./device-B-L3Fbxy.mjs";
|
|
38
|
+
import { t as selectFromPool } from "./device-pool-BMkdsefq.mjs";
|
|
39
|
+
import { o as reportIosResult } from "./ios-project-CZhKODF3.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--h_-8ENa.mjs";
|
|
41
|
+
import { i as swapJsBundle } from "./js-swap-Bwhh4S7V.mjs";
|
|
42
|
+
import { mkdirSync, openSync, writeFileSync } from "node:fs";
|
|
43
|
+
import { networkInterfaces } from "node:os";
|
|
43
44
|
import { basename, join } from "node:path";
|
|
44
|
-
import {
|
|
45
|
-
import { hostSimulatorArch } from "@stim-cli/core";
|
|
46
|
-
import { X509Certificate } from "node:crypto";
|
|
47
|
-
import { networkInterfaces, tmpdir } from "node:os";
|
|
45
|
+
import { ambientEnv, hostSimulatorArch } from "@stim-cli/core";
|
|
48
46
|
import chalk from "chalk";
|
|
49
|
-
|
|
50
|
-
const TAG = /<(\/?)\s*([A-Za-z0-9_]+)(?:\s[^>]*?)?(\/?)>/g;
|
|
51
|
-
const ENTITIES = {
|
|
52
|
-
amp: "&",
|
|
53
|
-
lt: "<",
|
|
54
|
-
gt: ">",
|
|
55
|
-
quot: "\"",
|
|
56
|
-
apos: "'"
|
|
57
|
-
};
|
|
58
|
-
var PlistError = class extends Error {};
|
|
59
|
-
function codePoint(value) {
|
|
60
|
-
if (!Number.isInteger(value) || value < 0 || value > 1114111 || value >= 55296 && value <= 57343) throw new PlistError(`character reference out of range: ${value}`);
|
|
61
|
-
return String.fromCodePoint(value);
|
|
62
|
-
}
|
|
63
|
-
function decodeEntities(raw) {
|
|
64
|
-
return raw.replace(/&(#x?[0-9A-Fa-f]+|[a-z]+);/g, (match, body) => {
|
|
65
|
-
if (body.startsWith("#x") || body.startsWith("#X")) return codePoint(Number.parseInt(body.slice(2), 16));
|
|
66
|
-
if (body.startsWith("#")) return codePoint(Number.parseInt(body.slice(1), 10));
|
|
67
|
-
return ENTITIES[body] ?? match;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
function peekTag(cursor) {
|
|
71
|
-
TAG.lastIndex = cursor.pos;
|
|
72
|
-
const match = TAG.exec(cursor.xml);
|
|
73
|
-
if (!match) return null;
|
|
74
|
-
return {
|
|
75
|
-
name: (match[2] ?? "").toLowerCase(),
|
|
76
|
-
closing: match[1] === "/",
|
|
77
|
-
selfClosing: match[3] === "/",
|
|
78
|
-
end: TAG.lastIndex
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function takeTag(cursor) {
|
|
82
|
-
const tag = peekTag(cursor);
|
|
83
|
-
if (tag) cursor.pos = tag.end;
|
|
84
|
-
return tag;
|
|
85
|
-
}
|
|
86
|
-
function takeText(cursor, name) {
|
|
87
|
-
const close = cursor.xml.indexOf(`</${name}>`, cursor.pos);
|
|
88
|
-
if (close < 0) {
|
|
89
|
-
cursor.pos = cursor.xml.length;
|
|
90
|
-
return "";
|
|
91
|
-
}
|
|
92
|
-
const raw = cursor.xml.slice(cursor.pos, close);
|
|
93
|
-
cursor.pos = close + name.length + 3;
|
|
94
|
-
return raw;
|
|
95
|
-
}
|
|
96
|
-
function parseValue(cursor) {
|
|
97
|
-
const peeked = peekTag(cursor);
|
|
98
|
-
if (!peeked || peeked.closing) return void 0;
|
|
99
|
-
const tag = takeTag(cursor);
|
|
100
|
-
if (tag.selfClosing) {
|
|
101
|
-
if (tag.name === "true") return true;
|
|
102
|
-
if (tag.name === "false") return false;
|
|
103
|
-
if (tag.name === "array") return [];
|
|
104
|
-
if (tag.name === "dict") return {};
|
|
105
|
-
return "";
|
|
106
|
-
}
|
|
107
|
-
switch (tag.name) {
|
|
108
|
-
case "plist": return parseValue(cursor);
|
|
109
|
-
case "dict": {
|
|
110
|
-
const out = {};
|
|
111
|
-
for (;;) {
|
|
112
|
-
const next = peekTag(cursor);
|
|
113
|
-
if (!next) break;
|
|
114
|
-
if (next.closing) {
|
|
115
|
-
cursor.pos = next.end;
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
cursor.pos = next.end;
|
|
119
|
-
if (next.name !== "key") continue;
|
|
120
|
-
const key = decodeEntities(next.selfClosing ? "" : takeText(cursor, "key"));
|
|
121
|
-
const value = parseValue(cursor);
|
|
122
|
-
if (value !== void 0) out[key] = value;
|
|
123
|
-
}
|
|
124
|
-
return out;
|
|
125
|
-
}
|
|
126
|
-
case "array": {
|
|
127
|
-
const out = [];
|
|
128
|
-
for (;;) {
|
|
129
|
-
const next = peekTag(cursor);
|
|
130
|
-
if (!next) break;
|
|
131
|
-
if (next.closing) {
|
|
132
|
-
cursor.pos = next.end;
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
const value = parseValue(cursor);
|
|
136
|
-
if (value === void 0) break;
|
|
137
|
-
out.push(value);
|
|
138
|
-
}
|
|
139
|
-
return out;
|
|
140
|
-
}
|
|
141
|
-
case "string":
|
|
142
|
-
case "key": return decodeEntities(takeText(cursor, tag.name));
|
|
143
|
-
case "integer": return Number.parseInt(takeText(cursor, "integer").trim(), 10);
|
|
144
|
-
case "real": return Number.parseFloat(takeText(cursor, "real").trim());
|
|
145
|
-
case "date": return new Date(takeText(cursor, "date").trim());
|
|
146
|
-
case "data": return Buffer.from(takeText(cursor, "data").replace(/\s+/g, ""), "base64");
|
|
147
|
-
case "true":
|
|
148
|
-
takeText(cursor, "true");
|
|
149
|
-
return true;
|
|
150
|
-
case "false":
|
|
151
|
-
takeText(cursor, "false");
|
|
152
|
-
return false;
|
|
153
|
-
default:
|
|
154
|
-
takeText(cursor, tag.name);
|
|
155
|
-
return "";
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function parsePlist(xml) {
|
|
159
|
-
if (typeof xml !== "string" || xml.trim() === "") return null;
|
|
160
|
-
const stripped = xml.replace(/<!--[\s\S]*?-->/g, "");
|
|
161
|
-
const start = stripped.indexOf("<plist");
|
|
162
|
-
const cursor = {
|
|
163
|
-
xml: stripped,
|
|
164
|
-
pos: start < 0 ? 0 : start
|
|
165
|
-
};
|
|
166
|
-
try {
|
|
167
|
-
const value = parseValue(cursor);
|
|
168
|
-
return value === void 0 ? null : value;
|
|
169
|
-
} catch {
|
|
170
|
-
return null;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
function isDict(value) {
|
|
174
|
-
return value !== null && typeof value === "object" && !Array.isArray(value) && !Buffer.isBuffer(value) && !(value instanceof Date);
|
|
175
|
-
}
|
|
176
|
-
function stringsOf(value) {
|
|
177
|
-
if (!Array.isArray(value)) return null;
|
|
178
|
-
return value.filter((v) => typeof v === "string");
|
|
179
|
-
}
|
|
180
|
-
function parseProvisioningProfilePlist(xml) {
|
|
181
|
-
const root = parsePlist(xml);
|
|
182
|
-
if (!isDict(root)) return null;
|
|
183
|
-
const entitlements = isDict(root.Entitlements ?? null) ? root.Entitlements : {};
|
|
184
|
-
const teamIdentifier = stringsOf(root.TeamIdentifier);
|
|
185
|
-
const expiration = root.ExpirationDate;
|
|
186
|
-
const certificates = Array.isArray(root.DeveloperCertificates) ? root.DeveloperCertificates.filter((v) => Buffer.isBuffer(v)) : [];
|
|
187
|
-
return {
|
|
188
|
-
name: typeof root.Name === "string" ? root.Name : null,
|
|
189
|
-
uuid: typeof root.UUID === "string" ? root.UUID : null,
|
|
190
|
-
teamIdentifier: teamIdentifier?.[0] ?? null,
|
|
191
|
-
expirationDate: expiration instanceof Date && !Number.isNaN(expiration.getTime()) ? expiration : null,
|
|
192
|
-
provisionedDevices: stringsOf(root.ProvisionedDevices),
|
|
193
|
-
provisionsAllDevices: root.ProvisionsAllDevices === true,
|
|
194
|
-
getTaskAllow: entitlements["get-task-allow"] === true,
|
|
195
|
-
certificates
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function provisioningProfileKind(profile) {
|
|
199
|
-
if (profile.provisionedDevices) return profile.getTaskAllow ? "development" : "ad hoc";
|
|
200
|
-
return profile.provisionsAllDevices ? "enterprise" : "App Store";
|
|
201
|
-
}
|
|
202
|
-
function certificateCommonName(der) {
|
|
203
|
-
if (!Buffer.isBuffer(der) || der.length === 0) return null;
|
|
204
|
-
let subject;
|
|
205
|
-
try {
|
|
206
|
-
subject = new X509Certificate(der).subject;
|
|
207
|
-
} catch {
|
|
208
|
-
return null;
|
|
209
|
-
}
|
|
210
|
-
for (const part of String(subject).split(/\r?\n/)) {
|
|
211
|
-
const trimmed = part.trim();
|
|
212
|
-
if (trimmed.startsWith("CN=")) return trimmed.slice(3).trim() || null;
|
|
213
|
-
}
|
|
214
|
-
return /(?:^|,)\s*CN=([^,]+)/.exec(String(subject))?.[1]?.trim() || null;
|
|
215
|
-
}
|
|
216
|
-
const IDENTITY_LINE = /^\s*\d+\)\s+([0-9A-Fa-f]{40})\s+"(.+)"\s*$/;
|
|
217
|
-
function parseSigningIdentities(text) {
|
|
218
|
-
if (typeof text !== "string") return [];
|
|
219
|
-
const out = [];
|
|
220
|
-
for (const line of text.split(/\r?\n/)) {
|
|
221
|
-
const match = IDENTITY_LINE.exec(line);
|
|
222
|
-
if (!match) continue;
|
|
223
|
-
out.push({
|
|
224
|
-
sha1: match[1].toUpperCase(),
|
|
225
|
-
name: match[2]
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
return out;
|
|
229
|
-
}
|
|
230
|
-
const SIGNING_CODES = {
|
|
231
|
-
noProfile: "STIM_NO_PROFILE",
|
|
232
|
-
profileMismatch: "STIM_PROFILE_MISMATCH",
|
|
233
|
-
noIdentity: "STIM_NO_SIGNING_IDENTITY",
|
|
234
|
-
codesignFailed: "STIM_CODESIGN_FAILED"
|
|
235
|
-
};
|
|
236
|
-
const XCODE_STEP = "build once from Xcode to install it -- Stim will not, because registering a device or minting a profile changes your Apple Developer account.";
|
|
237
|
-
const KEYCHAIN_REMEDY = "Open Xcode > Settings > Accounts and download your certificates, or unlock the login keychain with `security unlock-keychain`. `security find-identity -v -p codesigning` should list `Apple Development: ...`.";
|
|
238
|
-
function signingConfiguration(input) {
|
|
239
|
-
return input.configuration ?? "Debug";
|
|
240
|
-
}
|
|
241
|
-
function profileGate(input) {
|
|
242
|
-
const now = input.now ?? Date.now();
|
|
243
|
-
if (!input.profilePresent) return {
|
|
244
|
-
ok: false,
|
|
245
|
-
code: SIGNING_CODES.noProfile,
|
|
246
|
-
reason: "The app bundle has no embedded.mobileprovision, so it was built unsigned or for the simulator.",
|
|
247
|
-
remedy: `Set a team and profile for the target's ${signingConfiguration(input)} configuration in Xcode > Signing & Capabilities, then ${XCODE_STEP}`
|
|
248
|
-
};
|
|
249
|
-
if (!input.profile) return {
|
|
250
|
-
ok: false,
|
|
251
|
-
code: SIGNING_CODES.noProfile,
|
|
252
|
-
reason: "`openssl smime` could not decode the app bundle's embedded.mobileprovision.",
|
|
253
|
-
remedy: `The profile inside the app is corrupt. Delete the build cache entry with \`stim gc --delete\`, then ${XCODE_STEP}`
|
|
254
|
-
};
|
|
255
|
-
const profile = input.profile;
|
|
256
|
-
const named = profile.name ? `"${profile.name}"` : "the embedded profile";
|
|
257
|
-
if (!profile.expirationDate || profile.expirationDate.getTime() <= now) return {
|
|
258
|
-
ok: false,
|
|
259
|
-
code: SIGNING_CODES.profileMismatch,
|
|
260
|
-
reason: profile.expirationDate ? `The ${provisioningProfileKind(profile)} profile ${named} expired on ${profile.expirationDate.toISOString()}.` : `The ${provisioningProfileKind(profile)} profile ${named} carries no ExpirationDate, so Stim cannot prove it is still valid.`,
|
|
261
|
-
remedy: `Renew the profile under Signing & Capabilities, then ${XCODE_STEP}`
|
|
262
|
-
};
|
|
263
|
-
if (!profile.provisionedDevices) {
|
|
264
|
-
const kind = provisioningProfileKind(profile);
|
|
265
|
-
return {
|
|
266
|
-
ok: false,
|
|
267
|
-
code: SIGNING_CODES.profileMismatch,
|
|
268
|
-
reason: `${named} is an ${kind} profile, which carries no ProvisionedDevices list, so Stim cannot prove ${input.udid ?? "the target device"} is admitted.`,
|
|
269
|
-
remedy: `Local device runs need a development profile. Select one under Signing & Capabilities, then ${XCODE_STEP}`
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
const udid = input.udid;
|
|
273
|
-
if (!udid || !profile.provisionedDevices.some((d) => d.toLowerCase() === udid.toLowerCase())) return {
|
|
274
|
-
ok: false,
|
|
275
|
-
code: SIGNING_CODES.profileMismatch,
|
|
276
|
-
reason: `The ${provisioningProfileKind(profile)} profile ${named} lists ${profile.provisionedDevices.length} device(s) and ${udid ?? "the target device"} is not one of them.`,
|
|
277
|
-
remedy: `Register ${udid ?? "the device"} at developer.apple.com, regenerate the profile, then ${XCODE_STEP}`
|
|
278
|
-
};
|
|
279
|
-
return {
|
|
280
|
-
ok: true,
|
|
281
|
-
profile
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
function signingGate(input) {
|
|
285
|
-
const gated = profileGate(input);
|
|
286
|
-
if (!gated.ok) return gated;
|
|
287
|
-
const profile = gated.profile;
|
|
288
|
-
const named = profile.name ? `"${profile.name}"` : "the embedded profile";
|
|
289
|
-
const identities = Array.isArray(input.identities) ? input.identities : [];
|
|
290
|
-
if (identities.length === 0) return {
|
|
291
|
-
ok: false,
|
|
292
|
-
code: SIGNING_CODES.noIdentity,
|
|
293
|
-
reason: "`security find-identity -v -p codesigning` lists no codesigning identity on this machine.",
|
|
294
|
-
remedy: KEYCHAIN_REMEDY
|
|
295
|
-
};
|
|
296
|
-
if (input.pinnedSha1) {
|
|
297
|
-
const wanted = input.pinnedSha1.trim().toUpperCase();
|
|
298
|
-
const match = identities.find((i) => i.sha1 === wanted);
|
|
299
|
-
if (match) return {
|
|
300
|
-
ok: true,
|
|
301
|
-
identity: match
|
|
302
|
-
};
|
|
303
|
-
return {
|
|
304
|
-
ok: false,
|
|
305
|
-
code: SIGNING_CODES.noIdentity,
|
|
306
|
-
reason: `ios.signingIdentitySha1 is ${wanted}, which is not in the keychain. Available: ${identities.map((i) => `${i.sha1} "${i.name}"`).join(", ")}.`,
|
|
307
|
-
remedy: KEYCHAIN_REMEDY
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
const wantedName = input.pinnedName?.trim() || certificateCommonName(profile.certificates[0] ?? null);
|
|
311
|
-
if (!wantedName) return {
|
|
312
|
-
ok: false,
|
|
313
|
-
code: SIGNING_CODES.noIdentity,
|
|
314
|
-
reason: `Stim could not read a signing-identity name out of ${named}: its DeveloperCertificates entry has no readable subject CN.`,
|
|
315
|
-
remedy: "Set ios.signingIdentity in .stim.json to the identity name to re-sign with, or ios.signingIdentitySha1 to its SHA-1 hash."
|
|
316
|
-
};
|
|
317
|
-
const matches = identities.filter((i) => i.name === wantedName);
|
|
318
|
-
if (matches.length === 1) return {
|
|
319
|
-
ok: true,
|
|
320
|
-
identity: matches[0]
|
|
321
|
-
};
|
|
322
|
-
if (matches.length === 0) return {
|
|
323
|
-
ok: false,
|
|
324
|
-
code: SIGNING_CODES.noIdentity,
|
|
325
|
-
reason: `The app was signed by "${wantedName}", which is not in this machine's keychain. Available: ${identities.map((i) => `"${i.name}"`).join(", ")}.`,
|
|
326
|
-
remedy: `${KEYCHAIN_REMEDY} Or set ios.signingIdentity in .stim.json to one of the identities listed above.`
|
|
327
|
-
};
|
|
328
|
-
return {
|
|
329
|
-
ok: false,
|
|
330
|
-
code: SIGNING_CODES.noIdentity,
|
|
331
|
-
reason: `${matches.length} keychain identities share the name "${wantedName}", so Stim cannot pick one: ${matches.map((i) => i.sha1).join(", ")}.`,
|
|
332
|
-
remedy: "Set ios.signingIdentitySha1 in .stim.json to the SHA-1 hash of the certificate to sign with."
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
//#endregion
|
|
336
|
-
//#region src/engine/ios-signing.ts
|
|
337
|
-
const EMBEDDED_PROFILE = "embedded.mobileprovision";
|
|
338
|
-
const SIGNING_TIMEOUT_MS = 12e4;
|
|
339
|
-
function lastLines(text, count = 5) {
|
|
340
|
-
return String(text ?? "").split(/\r?\n/).map((line) => line.trimEnd()).filter((line) => line.trim() !== "").slice(-count);
|
|
341
|
-
}
|
|
342
|
-
function errorText(error) {
|
|
343
|
-
const withOutput = error;
|
|
344
|
-
const stderr = String(withOutput?.stderr ?? "").trim();
|
|
345
|
-
const stdout = String(withOutput?.stdout ?? "").trim();
|
|
346
|
-
return stderr || stdout || String(withOutput?.message ?? error);
|
|
347
|
-
}
|
|
348
|
-
function readEmbeddedProfile(appPath, { exec = null } = {}) {
|
|
349
|
-
const executor = exec || getExecutor();
|
|
350
|
-
const path = join(appPath, EMBEDDED_PROFILE);
|
|
351
|
-
if (!existsSync(path)) return {
|
|
352
|
-
present: false,
|
|
353
|
-
profile: null
|
|
354
|
-
};
|
|
355
|
-
try {
|
|
356
|
-
return {
|
|
357
|
-
present: true,
|
|
358
|
-
profile: parseProvisioningProfilePlist(executor.runFile("/usr/bin/openssl", [
|
|
359
|
-
"smime",
|
|
360
|
-
"-verify",
|
|
361
|
-
"-noverify",
|
|
362
|
-
"-inform",
|
|
363
|
-
"DER",
|
|
364
|
-
"-in",
|
|
365
|
-
path
|
|
366
|
-
], { timeoutMs: SIGNING_TIMEOUT_MS }))
|
|
367
|
-
};
|
|
368
|
-
} catch {
|
|
369
|
-
return {
|
|
370
|
-
present: true,
|
|
371
|
-
profile: null
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
function findSigningIdentities({ exec = null } = {}) {
|
|
376
|
-
const executor = exec || getExecutor();
|
|
377
|
-
try {
|
|
378
|
-
return parseSigningIdentities(executor.runFile("security", [
|
|
379
|
-
"find-identity",
|
|
380
|
-
"-v",
|
|
381
|
-
"-p",
|
|
382
|
-
"codesigning"
|
|
383
|
-
], { timeoutMs: SIGNING_TIMEOUT_MS }));
|
|
384
|
-
} catch {
|
|
385
|
-
return [];
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function gateProfileForDevice(options) {
|
|
389
|
-
const read = readEmbeddedProfile(options.appPath, { exec: options.exec ?? null });
|
|
390
|
-
return profileGate({
|
|
391
|
-
profilePresent: read.present,
|
|
392
|
-
profile: read.profile,
|
|
393
|
-
identities: [],
|
|
394
|
-
udid: options.udid,
|
|
395
|
-
configuration: options.configuration ?? null,
|
|
396
|
-
...options.now === void 0 ? {} : { now: options.now }
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
function gateAppForDevice(options) {
|
|
400
|
-
const read = readEmbeddedProfile(options.appPath, { exec: options.exec ?? null });
|
|
401
|
-
return signingGate({
|
|
402
|
-
profilePresent: read.present,
|
|
403
|
-
profile: read.profile,
|
|
404
|
-
identities: read.present ? findSigningIdentities({ exec: options.exec ?? null }) : [],
|
|
405
|
-
udid: options.udid,
|
|
406
|
-
configuration: options.configuration ?? null,
|
|
407
|
-
pinnedName: options.pinnedName ?? null,
|
|
408
|
-
pinnedSha1: options.pinnedSha1 ?? null,
|
|
409
|
-
...options.now === void 0 ? {} : { now: options.now }
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
function extractEntitlements(appPath, executor) {
|
|
413
|
-
try {
|
|
414
|
-
return String(executor.runFile("codesign", [
|
|
415
|
-
"-d",
|
|
416
|
-
"--entitlements",
|
|
417
|
-
"-",
|
|
418
|
-
"--xml",
|
|
419
|
-
appPath
|
|
420
|
-
], { timeoutMs: SIGNING_TIMEOUT_MS })).trim();
|
|
421
|
-
} catch {
|
|
422
|
-
return "";
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
function resealBundle({ appPath, identity, exec = null }) {
|
|
426
|
-
const executor = exec || getExecutor();
|
|
427
|
-
const signAs = identity.sha1 || identity.name;
|
|
428
|
-
let mode = "preserve-metadata";
|
|
429
|
-
let preserveError = null;
|
|
430
|
-
try {
|
|
431
|
-
executor.runFile("codesign", [
|
|
432
|
-
"--force",
|
|
433
|
-
"--sign",
|
|
434
|
-
signAs,
|
|
435
|
-
"--preserve-metadata=identifier,entitlements,flags,runtime",
|
|
436
|
-
appPath
|
|
437
|
-
], { timeoutMs: SIGNING_TIMEOUT_MS });
|
|
438
|
-
} catch (error) {
|
|
439
|
-
preserveError = error;
|
|
440
|
-
}
|
|
441
|
-
let tempDir = null;
|
|
442
|
-
if (preserveError) {
|
|
443
|
-
const entitlements = extractEntitlements(appPath, executor);
|
|
444
|
-
const args = [
|
|
445
|
-
"--force",
|
|
446
|
-
"--sign",
|
|
447
|
-
signAs
|
|
448
|
-
];
|
|
449
|
-
if (entitlements !== "") {
|
|
450
|
-
tempDir = mkdtempSync(join(tmpdir(), "stim-entitlements-"));
|
|
451
|
-
const plist = join(tempDir, "entitlements.plist");
|
|
452
|
-
writeFileSync(plist, `${entitlements}\n`, "utf-8");
|
|
453
|
-
args.push("--entitlements", plist);
|
|
454
|
-
mode = "entitlements";
|
|
455
|
-
} else mode = "no-entitlements";
|
|
456
|
-
args.push(appPath);
|
|
457
|
-
try {
|
|
458
|
-
executor.runFile("codesign", args, { timeoutMs: SIGNING_TIMEOUT_MS });
|
|
459
|
-
} catch (error) {
|
|
460
|
-
return {
|
|
461
|
-
ok: false,
|
|
462
|
-
code: SIGNING_CODES.codesignFailed,
|
|
463
|
-
reason: `codesign could not re-seal ${appPath} with "${identity.name}": ${errorText(error)}`,
|
|
464
|
-
remedy: `Unlock the login keychain (\`security unlock-keychain\`) and confirm exactly one identity matches "${identity.name}".`,
|
|
465
|
-
lastLines: [...lastLines(errorText(preserveError)), ...lastLines(errorText(error))]
|
|
466
|
-
};
|
|
467
|
-
} finally {
|
|
468
|
-
if (tempDir) rmSync(tempDir, {
|
|
469
|
-
recursive: true,
|
|
470
|
-
force: true
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
try {
|
|
475
|
-
executor.runFile("codesign", [
|
|
476
|
-
"--verify",
|
|
477
|
-
"--strict",
|
|
478
|
-
appPath
|
|
479
|
-
], { timeoutMs: SIGNING_TIMEOUT_MS });
|
|
480
|
-
} catch (error) {
|
|
481
|
-
return {
|
|
482
|
-
ok: false,
|
|
483
|
-
code: SIGNING_CODES.codesignFailed,
|
|
484
|
-
reason: `codesign --verify --strict rejected ${appPath} after re-sealing it with "${identity.name}": ${errorText(error)}`,
|
|
485
|
-
remedy: "The bundle signed but did not seal. Delete the cached artifact with `stim gc --delete` and build fresh, then retry.",
|
|
486
|
-
lastLines: lastLines(errorText(error))
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
return {
|
|
490
|
-
ok: true,
|
|
491
|
-
identity,
|
|
492
|
-
mode
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
function sealAppForDevice(options) {
|
|
496
|
-
const gate = gateAppForDevice(options);
|
|
497
|
-
if (!gate.ok) return {
|
|
498
|
-
...gate,
|
|
499
|
-
lastLines: []
|
|
500
|
-
};
|
|
501
|
-
return resealBundle({
|
|
502
|
-
appPath: options.appPath,
|
|
503
|
-
identity: gate.identity,
|
|
504
|
-
exec: options.exec ?? null
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
//#endregion
|
|
47
|
+
import { loadCacheProvider } from "@stim-cli/cache";
|
|
508
48
|
//#region src/engine/ios-lan.ts
|
|
509
49
|
const IP_TXT = "ip.txt";
|
|
510
50
|
function chooseLanAddress({ pinned = null, candidates }) {
|
|
@@ -694,7 +234,7 @@ async function replaceCollector({ root, slot = "default", udid, bundleId, appNam
|
|
|
694
234
|
cwd: root,
|
|
695
235
|
detached: true,
|
|
696
236
|
stdio,
|
|
697
|
-
env:
|
|
237
|
+
env: ambientEnv()
|
|
698
238
|
});
|
|
699
239
|
child?.unref?.();
|
|
700
240
|
} catch (err) {
|
|
@@ -724,8 +264,8 @@ const DEFAULT_DEPS = {
|
|
|
724
264
|
resolveSettings,
|
|
725
265
|
settingsLayers,
|
|
726
266
|
settingOriginScope,
|
|
727
|
-
gitCommonDir,
|
|
728
|
-
repoRoot,
|
|
267
|
+
gitCommonDir: gitCommonDirAsync,
|
|
268
|
+
repoRoot: repoRootAsync,
|
|
729
269
|
detectBundleId,
|
|
730
270
|
detectIsExpo,
|
|
731
271
|
devClientScheme,
|
|
@@ -736,7 +276,7 @@ const DEFAULT_DEPS = {
|
|
|
736
276
|
checkDeviceCapacity,
|
|
737
277
|
budgetGate,
|
|
738
278
|
ensureOwnedDevice,
|
|
739
|
-
listIosRuntimes,
|
|
279
|
+
listIosRuntimes: listIosRuntimesAsync,
|
|
740
280
|
listAllIosSims,
|
|
741
281
|
ensureBooted,
|
|
742
282
|
resolveRemoteContext,
|
|
@@ -768,7 +308,7 @@ const DEFAULT_DEPS = {
|
|
|
768
308
|
resolveEasCliBin,
|
|
769
309
|
resolveRemote,
|
|
770
310
|
uploadRemote,
|
|
771
|
-
planPrebuild,
|
|
311
|
+
planPrebuild: planPrebuildAsync,
|
|
772
312
|
runPrebuild,
|
|
773
313
|
readPodState,
|
|
774
314
|
podsAreStale,
|
|
@@ -786,7 +326,7 @@ const DEFAULT_DEPS = {
|
|
|
786
326
|
acquireRunLease,
|
|
787
327
|
runLease,
|
|
788
328
|
selectFromPool,
|
|
789
|
-
|
|
329
|
+
releaseLeaseOnAbort,
|
|
790
330
|
iosDeviceProcess,
|
|
791
331
|
verifyIosDeviceReleaseLaunch,
|
|
792
332
|
readBundleId,
|
|
@@ -852,7 +392,7 @@ function iosMetroRuntime(prepare) {
|
|
|
852
392
|
function missingCrashReportHint({ physical, remote, crashed }) {
|
|
853
393
|
return crashed && !physical && !remote ? `No attributable native crash report captured yet. ${IOS_CRASH_REPORT_RETRY}` : "No attributable native crash report captured. Read `stim logs --source device` for available output.";
|
|
854
394
|
}
|
|
855
|
-
async function verifyIosProcessRun({ root, slot, appPath, d, launched, configuration, phase, note, logsDir, launchedAt, bundleId, udid, physical, appName, remoteDevice, embeddedJavaScript }) {
|
|
395
|
+
async function verifyIosProcessRun({ operation, root, slot, appPath, d, launched, configuration, phase, note, logsDir, launchedAt, bundleId, udid, physical, appName, remoteDevice, embeddedJavaScript }) {
|
|
856
396
|
const readNativeCrashes = () => remoteDevice ? [] : captureNativeCrashes({
|
|
857
397
|
root,
|
|
858
398
|
slot,
|
|
@@ -862,12 +402,12 @@ async function verifyIosProcessRun({ root, slot, appPath, d, launched, configura
|
|
|
862
402
|
since: launchedAt,
|
|
863
403
|
appPath,
|
|
864
404
|
physical
|
|
865
|
-
}, logsDir);
|
|
405
|
+
}, logsDir, operation?.signal, operation?.env);
|
|
866
406
|
const processCheck = physical ? await d.verifyIosDeviceReleaseLaunch({
|
|
867
407
|
udid,
|
|
868
408
|
appName: appName ?? bundleId
|
|
869
409
|
}) : await d.verifyReleaseLaunch({ pid: launched?.pid ?? null });
|
|
870
|
-
const crashes = readNativeCrashes();
|
|
410
|
+
const crashes = await readNativeCrashes();
|
|
871
411
|
if (processCheck?.verified && !crashes.length) {
|
|
872
412
|
phase("verify", `process alive ${formatDuration(processCheck.waitedMs ?? 0)} after launch (${configuration}: no bundle fetch to observe)`);
|
|
873
413
|
return { state: true };
|
|
@@ -882,7 +422,7 @@ async function verifyIosProcessRun({ root, slot, appPath, d, launched, configura
|
|
|
882
422
|
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.`)));
|
|
883
423
|
return { state: crashes.length || processCheck?.reason === "exited" ? LAUNCH_FATAL : LAUNCH_UNVERIFIED };
|
|
884
424
|
}
|
|
885
|
-
async function verifyIosMetroRun({ root, slot, appPath, d, launched, phase, note, metroCheck, logsDir, launchedAt, metroPort, isExpo, bundleId, udid, scheme, physical, appName, lanAddress, lanOrigin, remoteDevice, metroOrigin, enterActivity }) {
|
|
425
|
+
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 }) {
|
|
886
426
|
const runCommand = nativeRunCommand("ios", slot, {
|
|
887
427
|
physical,
|
|
888
428
|
deviceId: udid
|
|
@@ -896,15 +436,15 @@ async function verifyIosMetroRun({ root, slot, appPath, d, launched, phase, note
|
|
|
896
436
|
since: launchedAt,
|
|
897
437
|
appPath,
|
|
898
438
|
physical
|
|
899
|
-
}, logsDir);
|
|
900
|
-
const deviceProcess = () => {
|
|
901
|
-
const running = d.iosDeviceProcess({
|
|
439
|
+
}, logsDir, operation?.signal, operation?.env);
|
|
440
|
+
const deviceProcess = async () => {
|
|
441
|
+
const running = await d.iosDeviceProcess({
|
|
902
442
|
udid,
|
|
903
443
|
appName: appName ?? bundleId
|
|
904
444
|
});
|
|
905
445
|
return running.state === "unknown" ? null : running.state === "running";
|
|
906
446
|
};
|
|
907
|
-
const siblings = metroCheck ? siblingPlatformSlots(root, "ios", slot) : [];
|
|
447
|
+
const siblings = metroCheck ? await siblingPlatformSlots(root, "ios", slot) : [];
|
|
908
448
|
const verification = metroCheck ? await d.verifyLaunch({
|
|
909
449
|
requireBundleResponse: true,
|
|
910
450
|
slot: launchSlotScope(root, slot),
|
|
@@ -918,16 +458,16 @@ async function verifyIosMetroRun({ root, slot, appPath, d, launched, phase, note
|
|
|
918
458
|
platform: "ios",
|
|
919
459
|
mode: workspaceDevServerMode(root, isExpo),
|
|
920
460
|
readNativeCrashes,
|
|
921
|
-
processAlive: remoteDevice ? null : physical ? deviceProcess : () => {
|
|
461
|
+
processAlive: remoteDevice ? null : physical ? deviceProcess : async () => {
|
|
922
462
|
if (launched?.pid) return d.pidExists(launched.pid);
|
|
923
|
-
const running = iosAppProcess(udid, bundleId);
|
|
463
|
+
const running = await iosAppProcess(udid, bundleId);
|
|
924
464
|
return running.state === "unknown" ? null : running.state === "running";
|
|
925
465
|
}
|
|
926
466
|
}) : {
|
|
927
467
|
verified: false,
|
|
928
468
|
skipped: true
|
|
929
469
|
};
|
|
930
|
-
const nativeCrashes = verification.errors?.some((record) => record.event === "native_crash") ? [] : readNativeCrashes();
|
|
470
|
+
const nativeCrashes = verification.errors?.some((record) => record.event === "native_crash") ? [] : await readNativeCrashes();
|
|
931
471
|
if (nativeCrashes.length) verification.fatal = true;
|
|
932
472
|
verification.errors = await errorDiagnostics([...verification.errors ?? [], ...nativeCrashes], {
|
|
933
473
|
root,
|
|
@@ -1040,14 +580,14 @@ function reportLaunchErrors(errors, note, root) {
|
|
|
1040
580
|
for (const line of report.lines) note(chalk.yellow(phaseLine("launch", line)));
|
|
1041
581
|
return report.lines.length > 0;
|
|
1042
582
|
}
|
|
1043
|
-
function installsOverWifi(d, udid, selectedWireless, note) {
|
|
1044
|
-
const current = d.listIosDevices().find((entry) => entry.udid === udid);
|
|
583
|
+
async function installsOverWifi(d, udid, selectedWireless, note) {
|
|
584
|
+
const current = (await d.listIosDevices()).find((entry) => entry.udid === udid);
|
|
1045
585
|
const wireless = current ? isWirelessIosDevice(current) : selectedWireless;
|
|
1046
586
|
if (wireless) note(phaseLine("device", `${current?.name ?? udid} is paired over Wi-Fi, so the install and launch go over the network and take longer than over a cable`));
|
|
1047
587
|
return wireless;
|
|
1048
588
|
}
|
|
1049
|
-
function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }) {
|
|
1050
|
-
const swept = d.clearOtherUserApps({
|
|
589
|
+
async function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }) {
|
|
590
|
+
const swept = await d.clearOtherUserApps({
|
|
1051
591
|
udid,
|
|
1052
592
|
keep: bundleId
|
|
1053
593
|
});
|
|
@@ -1055,7 +595,7 @@ function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }) {
|
|
|
1055
595
|
if (swept.listed && swept.failed.length === 0) {
|
|
1056
596
|
if (swept.kept && bundleId) {
|
|
1057
597
|
try {
|
|
1058
|
-
d.clearIosAppData(udid, bundleId, { defaultsPlist: devClient ? IOS_DEV_MENU_OFF_DEFAULTS_PLIST : null });
|
|
598
|
+
await d.clearIosAppData(udid, bundleId, { defaultsPlist: devClient ? IOS_DEV_MENU_OFF_DEFAULTS_PLIST : null });
|
|
1059
599
|
} catch (error) {
|
|
1060
600
|
return `Could not clear the data ${bundleId} kept from the previous workspace: ${String(error?.message || error)}`;
|
|
1061
601
|
}
|
|
@@ -1070,12 +610,12 @@ function cleanAdoptedIosApps({ d, udid, bundleId, devClient, phase, note }) {
|
|
|
1070
610
|
function installMayBeProven(adopting, parkedCacheKey, storeKey) {
|
|
1071
611
|
return !adopting || !parkedCacheKey || parkedCacheKey === storeKey;
|
|
1072
612
|
}
|
|
1073
|
-
function resolveRunBundleId(d, projectBundleId, appPath, bundleId) {
|
|
613
|
+
async function resolveRunBundleId(d, projectBundleId, appPath, bundleId) {
|
|
1074
614
|
if (!appPath || bundleId) return bundleId;
|
|
1075
|
-
return d.readBundleId(appPath) || projectBundleId();
|
|
615
|
+
return await d.readBundleId(appPath) || await projectBundleId();
|
|
1076
616
|
}
|
|
1077
|
-
function readRunExecutable(d, appPath, note) {
|
|
1078
|
-
const executable = appPath ? d.readBundleExecutable(appPath) : null;
|
|
617
|
+
async function readRunExecutable(d, appPath, note) {
|
|
618
|
+
const executable = appPath ? await d.readBundleExecutable(appPath) : null;
|
|
1079
619
|
if (appPath && !executable) note(chalk.dim(`Could not read CFBundleExecutable from ${appPath}; the device log predicate falls back to the .app basename.`));
|
|
1080
620
|
return executable;
|
|
1081
621
|
}
|
|
@@ -1101,7 +641,7 @@ function launchFailureRemedy(remoteDevice, udid, bundleId, logFile) {
|
|
|
1101
641
|
if (remoteDevice) return remoteDevice.failureRemedy();
|
|
1102
642
|
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}.`;
|
|
1103
643
|
}
|
|
1104
|
-
async function finishIosRun({ 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 }) {
|
|
644
|
+
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 }) {
|
|
1105
645
|
const { path: appPath, bundleId: initialBundleId, failureFields: buildFailure, cache } = artifact;
|
|
1106
646
|
const { hit: cacheHit, providerName, buildMachine, builtOn, offloadedTo, offloadFallback, readEnabled: useBuildCache, missReason, waitedForBuild, compilation: compilationCache } = cache;
|
|
1107
647
|
const storeHash = cache.identity?.fingerprint ?? null;
|
|
@@ -1130,7 +670,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1130
670
|
}
|
|
1131
671
|
return null;
|
|
1132
672
|
};
|
|
1133
|
-
bundleId = resolveRunBundleId(d, projectBundleId, appPath, bundleId);
|
|
673
|
+
bundleId = await resolveRunBundleId(d, projectBundleId, appPath, bundleId);
|
|
1134
674
|
if (appPath && !bundleId) return fail({
|
|
1135
675
|
code: "STIM_INSTALL_FAILED",
|
|
1136
676
|
message: `Could not read a bundle identifier from the cached app at ${appPath}.`,
|
|
@@ -1155,13 +695,13 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1155
695
|
const scheme = runtime.scheme(root, appPath, d);
|
|
1156
696
|
const devMenuParams = runtime.devMenuParams(root, d);
|
|
1157
697
|
const appName = appNameFromPath(appPath);
|
|
1158
|
-
const appExecutable = readRunExecutable(d, appPath, note);
|
|
698
|
+
const appExecutable = await readRunExecutable(d, appPath, note);
|
|
1159
699
|
const dropSwapDir = artifact.release;
|
|
1160
700
|
let installSkipped = false;
|
|
1161
701
|
let launched;
|
|
1162
702
|
let launchedAt = d.now();
|
|
1163
703
|
if (physical) {
|
|
1164
|
-
const overWifi = installsOverWifi(d, udid, wireless, note);
|
|
704
|
+
const overWifi = await installsOverWifi(d, udid, wireless, note);
|
|
1165
705
|
const bounds = iosDeviceBounds(overWifi);
|
|
1166
706
|
const lostBeforeInstall = raiseLeaseFor(bounds.installMs, true);
|
|
1167
707
|
if (lostBeforeInstall) return fail(lostBeforeInstall);
|
|
@@ -1171,7 +711,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1171
711
|
});
|
|
1172
712
|
enterPhase("install");
|
|
1173
713
|
const installTimer = stepTimer(d.now);
|
|
1174
|
-
const installed = d.installIosDeviceApp({
|
|
714
|
+
const installed = await d.installIosDeviceApp({
|
|
1175
715
|
udid,
|
|
1176
716
|
appPath,
|
|
1177
717
|
bundleId,
|
|
@@ -1288,7 +828,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1288
828
|
} else {
|
|
1289
829
|
const adopting = Boolean(device?.adoptionPending);
|
|
1290
830
|
if (adopting) {
|
|
1291
|
-
const cleanupFailure = cleanAdoptedIosApps({
|
|
831
|
+
const cleanupFailure = await cleanAdoptedIosApps({
|
|
1292
832
|
d,
|
|
1293
833
|
udid,
|
|
1294
834
|
bundleId,
|
|
@@ -1309,7 +849,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1309
849
|
}
|
|
1310
850
|
enterPhase("install");
|
|
1311
851
|
const installTimer = stepTimer(d.now);
|
|
1312
|
-
const installed = d.installIosApp({
|
|
852
|
+
const installed = await d.installIosApp({
|
|
1313
853
|
udid,
|
|
1314
854
|
appPath,
|
|
1315
855
|
bundleId,
|
|
@@ -1369,7 +909,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1369
909
|
metroPort: port,
|
|
1370
910
|
devClientScheme,
|
|
1371
911
|
devMenuParams: menuParams,
|
|
1372
|
-
consolePaths: simulatorConsolePaths({
|
|
912
|
+
consolePaths: await simulatorConsolePaths({
|
|
1373
913
|
deviceId: udid,
|
|
1374
914
|
appId: bundleId,
|
|
1375
915
|
since: launchedAt
|
|
@@ -1378,7 +918,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1378
918
|
});
|
|
1379
919
|
if ("error" in launched) return fail(launched.error);
|
|
1380
920
|
if (launched.failed) {
|
|
1381
|
-
printNativeCrashReport({
|
|
921
|
+
await printNativeCrashReport({
|
|
1382
922
|
root,
|
|
1383
923
|
slot,
|
|
1384
924
|
platform: "ios",
|
|
@@ -1386,7 +926,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1386
926
|
appId: bundleId,
|
|
1387
927
|
since: launchedAt,
|
|
1388
928
|
appPath
|
|
1389
|
-
}, logsDir, (line) => note(chalk.red(phaseLine("launch", line))), Boolean(remoteDevice));
|
|
929
|
+
}, logsDir, (line) => note(chalk.red(phaseLine("launch", line))), Boolean(remoteDevice), operation?.signal, operation?.env);
|
|
1390
930
|
return fail({
|
|
1391
931
|
code: launched.code || "STIM_LAUNCH_FAILED",
|
|
1392
932
|
message: launched.reason,
|
|
@@ -1428,6 +968,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1428
968
|
});
|
|
1429
969
|
if (physical) raiseLeaseFor(runtime.verificationWaitMs, false);
|
|
1430
970
|
const { state: launchState, warning: launchWarning, unattributed } = await runtime.verify(runtimePreparation, {
|
|
971
|
+
operation,
|
|
1431
972
|
root,
|
|
1432
973
|
slot,
|
|
1433
974
|
appPath,
|
|
@@ -1481,6 +1022,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1481
1022
|
const uploadsAbandoned = await artifact.completeUploads();
|
|
1482
1023
|
return {
|
|
1483
1024
|
facts: reportIosResult({
|
|
1025
|
+
output,
|
|
1484
1026
|
devicePlacement,
|
|
1485
1027
|
root,
|
|
1486
1028
|
slot,
|
|
@@ -1519,7 +1061,7 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1519
1061
|
recordRun,
|
|
1520
1062
|
reclaimed,
|
|
1521
1063
|
devServer,
|
|
1522
|
-
links: workspaceLinks(root, {
|
|
1064
|
+
links: await workspaceLinks(root, {
|
|
1523
1065
|
platform: "ios",
|
|
1524
1066
|
slot
|
|
1525
1067
|
})
|
|
@@ -1528,4 +1070,4 @@ async function finishIosRun({ projectBundleId, runtime, runtimePreparation, devi
|
|
|
1528
1070
|
};
|
|
1529
1071
|
}
|
|
1530
1072
|
//#endregion
|
|
1531
|
-
export { collectorEntry as a, copyAppAside as c,
|
|
1073
|
+
export { collectorEntry as a, copyAppAside as c, DEFAULT_DEPS as i, lanOriginUrlFor as l, iosMetroRuntime as n, replaceCollector as o, iosProcessRuntime as r, chooseLanAddress as s, finishIosRun as t, writeIpTxt as u };
|