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,47 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as deviceSlotFileKey, W as parseDeviceSlotOption, q as validateDeviceSlot } from "./config-
|
|
3
|
-
import { _ as stepTimer, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { i as createIosSimSnapshot } from "./ios-
|
|
1
|
+
import { a as recordWorkspaceUseAsync, k as workspaceLogsDir$1 } from "./workspace-state-BjqdjnJR.mjs";
|
|
2
|
+
import { B as deviceSlotFileKey, W as parseDeviceSlotOption, q as validateDeviceSlot } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { _ as stepTimer, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { B as publicUrlSetting, C as iosSigningIdentitySettingError, F as metroWarmupUrlSetting, N as metroPortSetting, S as iosSigningIdentitySetting, T as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, ot as tunnelModeSetting, v as iosLanHostSetting, w as iosSigningIdentitySha1Setting, y as iosLanHostSettingError, z as projectSettingsContextAsync } from "./settings-BDVI8Ivc.mjs";
|
|
5
|
+
import { t as NO_PROJECT_REFUSAL } from "./project-DYj-HVx6.mjs";
|
|
6
|
+
import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-DriNoAVy.mjs";
|
|
7
|
+
import { En as runProcessOperation, Et as binOnPath, Qt as DEFAULT_METRO_PORT, qn as ownedSessionName, wn as exitAfterFlush } from "./ccache-BWTze1Ls.mjs";
|
|
8
|
+
import { J as runFailureRecord, X as tapBuildLog, Y as startBuildProgress, Z as thrownRunFailureRecord, et as createRunRecorder, ot as statsProjectKey$1, z as NO_BUILD_PROGRESS } from "./workspaces-DFbj07jp.mjs";
|
|
9
|
+
import { Q as cancelledFailure, at as runCancellation, k as COMPILATION_CACHE_NOT_RUN, ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CbCG6C5Z.mjs";
|
|
10
|
+
import { i as createIosSimSnapshot } from "./ios-E26qSpkb.mjs";
|
|
11
11
|
import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { r as
|
|
22
|
-
import
|
|
23
|
-
import "./
|
|
24
|
-
import { t as didSetUpDevice } from "./device-B9FqTBYW.mjs";
|
|
12
|
+
import { S as setRemoteLogSink, d as simulatorRuntime } from "./client-xsdxrhWA.mjs";
|
|
13
|
+
import { s as parseBuildMachineOption } from "./selection-Bs8phwhN.mjs";
|
|
14
|
+
import { r as hostedMetroSettings } from "./metro-gateway-BnHdqMO_.mjs";
|
|
15
|
+
import { i as writeDevicePlacementAsync } from "./ios-state-BZ03NFgF.mjs";
|
|
16
|
+
import { t as devClientPortBusy } from "./hosted-native-CdgaiuyP.mjs";
|
|
17
|
+
import { i as restoreLightenedDependencies, n as printLightenedFailure } from "./lightened-BCsdAGj_.mjs";
|
|
18
|
+
import { f as waitFlagConflict, o as leaseExpiryText } from "./device-lease-run-DwsGfjUN.mjs";
|
|
19
|
+
import { _ as resolveIosWait, a as deviceModelRefusal, b as resolveSimulatorAppFlag, c as iosProjectPathError, d as ownedSimFailure, g as resolveIosBuildSetup, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, r as createIosDeviceWaitRun, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-Be0UeVZU.mjs";
|
|
20
|
+
import { r as isEasBuildFailure } from "./eas-build-CjNSWmjo.mjs";
|
|
21
|
+
import { i as launchOutcomeRecord, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-DqaIBO5w.mjs";
|
|
22
|
+
import "./dev-client-BMca82xo.mjs";
|
|
23
|
+
import { t as didSetUpDevice } from "./device-tM41-TUq.mjs";
|
|
25
24
|
import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
|
|
26
|
-
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-
|
|
27
|
-
import { a as
|
|
28
|
-
import { t as acquireIosArtifact } from "./artifact-
|
|
29
|
-
import { a as hostedIosSelectors, i as hostedIosMetroNote, n as connectIosTarget, o as iosPlacementBudget, r as deviceRemoteConflict, s as selectIosPlacement, t as connectIosBackend } from "./remote-
|
|
30
|
-
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, o as iosPoolNoCandidatesRefusal, r as iosDeviceBounds } from "./ios-device-
|
|
31
|
-
import { i as
|
|
32
|
-
import {
|
|
25
|
+
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-CBqYbzYM.mjs";
|
|
26
|
+
import { a as iosLedgerDevice, c as writeLastBuild, o as lastBuildRecord, s as reportIosResult } from "./ios-project-D8Jcy_br.mjs";
|
|
27
|
+
import { t as acquireIosArtifact } from "./artifact-faemIZv5.mjs";
|
|
28
|
+
import { a as hostedIosSelectors, i as hostedIosMetroNote, n as connectIosTarget, o as iosPlacementBudget, r as deviceRemoteConflict, s as selectIosPlacement, t as connectIosBackend } from "./remote-y6n99WMW.mjs";
|
|
29
|
+
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, o as iosPoolNoCandidatesRefusal, r as iosDeviceBounds } from "./ios-device-C_QkIf1Z.mjs";
|
|
30
|
+
import { i as lanOriginUrlFor, l as verifyIosMetroRun, n as chooseLanAddress, o as finishIosRun, t as DEFAULT_DEPS } from "./dependencies-BGokZ-Ng.mjs";
|
|
31
|
+
import { join } from "node:path";
|
|
33
32
|
import { workspaceId } from "@stim-cli/core";
|
|
34
33
|
import { hostedIosStatus, parseMachine } from "@stim-cli/core/state";
|
|
35
34
|
import chalk from "chalk";
|
|
36
35
|
import { InvalidArgumentError } from "commander";
|
|
37
36
|
//#region src/commands/ios/hosted.ts
|
|
38
|
-
async function finishHostedIosRun({ target, d, artifact, root, slot, release, appMode, isExpo, metroCheck, metroPort, logsDir, fail, note, enterPhase, selectors, projectBundleId, ...report }) {
|
|
37
|
+
async function finishHostedIosRun({ target, d, artifact, root, slot, release, appMode, isExpo, metroCheck, metroPort, logsDir, fail, note, phase, enterPhase, enterActivity, selectors, projectBundleId, logWriter, ...report }) {
|
|
39
38
|
const bundleId = artifact.bundleId ?? (await d.readBundleId(artifact.path) || await projectBundleId());
|
|
40
39
|
if (!bundleId) return fail({
|
|
41
40
|
code: "STIM_INSTALL_FAILED",
|
|
42
41
|
message: "The built app has no bundle identifier."
|
|
43
42
|
});
|
|
43
|
+
const devClientScheme = appMode === "development" && isExpo ? d.devClientScheme(root, artifact.path) ?? void 0 : void 0;
|
|
44
44
|
const launchedAt = d.now();
|
|
45
|
+
let marked = false;
|
|
45
46
|
let run;
|
|
46
47
|
try {
|
|
47
48
|
run = await d.placeHostedIos(target, {
|
|
@@ -53,9 +54,27 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
|
|
|
53
54
|
selectors,
|
|
54
55
|
release,
|
|
55
56
|
mode: appMode,
|
|
56
|
-
...appMode === "development" && isExpo ? { devClientScheme
|
|
57
|
+
...appMode === "development" && isExpo ? { devClientScheme } : {},
|
|
57
58
|
metroPort,
|
|
58
|
-
reserved: (placement) =>
|
|
59
|
+
reserved: (placement) => {
|
|
60
|
+
if (placement.device && !marked) {
|
|
61
|
+
marked = true;
|
|
62
|
+
logWriter().write({
|
|
63
|
+
src: "build",
|
|
64
|
+
level: "info",
|
|
65
|
+
marker: true,
|
|
66
|
+
event: "launch_attempt",
|
|
67
|
+
ts: d.now(),
|
|
68
|
+
platform: "ios",
|
|
69
|
+
appId: bundleId,
|
|
70
|
+
deviceId: placement.session,
|
|
71
|
+
remote: true,
|
|
72
|
+
host: target.host.machine,
|
|
73
|
+
msg: `launching ${bundleId} on ${target.host.machine}`
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return d.writeHostedIos(root, slot, placement);
|
|
77
|
+
},
|
|
59
78
|
note,
|
|
60
79
|
enterPhase
|
|
61
80
|
});
|
|
@@ -76,24 +95,60 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
|
|
|
76
95
|
launchedAt: new Date(launchedAt).toISOString()
|
|
77
96
|
}, slot);
|
|
78
97
|
let launched = run.launched;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
let launchWarning;
|
|
99
|
+
let unattributed = false;
|
|
100
|
+
if (appMode === "development") {
|
|
101
|
+
const hostedLogs = d.followHostedLaunchLogs(root, slot, "ios", launchedAt);
|
|
102
|
+
let verification;
|
|
103
|
+
try {
|
|
104
|
+
verification = await verifyIosMetroRun({
|
|
105
|
+
root,
|
|
106
|
+
slot,
|
|
107
|
+
appPath: artifact.path,
|
|
108
|
+
d,
|
|
109
|
+
launched: {},
|
|
110
|
+
configuration: report.configuration,
|
|
111
|
+
phase,
|
|
112
|
+
note,
|
|
113
|
+
metroCheck,
|
|
114
|
+
logsDir,
|
|
115
|
+
launchedAt,
|
|
116
|
+
metroPort,
|
|
117
|
+
isExpo,
|
|
118
|
+
bundleId,
|
|
119
|
+
udid: run.placement.device?.udid ?? "",
|
|
120
|
+
scheme: devClientScheme,
|
|
121
|
+
physical: false,
|
|
122
|
+
appName: null,
|
|
123
|
+
lanAddress: null,
|
|
124
|
+
lanOrigin: null,
|
|
125
|
+
remoteDevice: true,
|
|
126
|
+
metroOrigin: null,
|
|
127
|
+
enterActivity,
|
|
128
|
+
hostedLogs
|
|
129
|
+
});
|
|
130
|
+
} finally {
|
|
131
|
+
hostedLogs.stop();
|
|
132
|
+
}
|
|
133
|
+
if (verification.state === "fatal") return fail({
|
|
91
134
|
code: "STIM_LAUNCH_FAILED",
|
|
92
|
-
message: "
|
|
93
|
-
remedy:
|
|
135
|
+
message: "The app failed its launch readiness check.",
|
|
136
|
+
remedy: `Read the launch error above or run \`stim logs --errors\`. The full timeline is in ${logsDir}.`,
|
|
137
|
+
logPath: logsDir
|
|
94
138
|
});
|
|
95
|
-
launched =
|
|
139
|
+
launched = verification.state === true ? true : verification.state === "bundling" ? "bundling" : "unverified";
|
|
140
|
+
launchWarning = verification.warning;
|
|
141
|
+
unattributed = verification.unattributed ?? false;
|
|
96
142
|
}
|
|
143
|
+
logWriter().write(launchOutcomeRecord({
|
|
144
|
+
launchState: launched,
|
|
145
|
+
release,
|
|
146
|
+
process: appMode === "process",
|
|
147
|
+
bundleId,
|
|
148
|
+
configuration: report.configuration,
|
|
149
|
+
metroPort,
|
|
150
|
+
unattributed
|
|
151
|
+
}));
|
|
97
152
|
if (launched === "unverified") note(`Launch on ${target.host.machine} is unverified; check the hosted app, then retry stim ios --remote ${target.host.machine}.`);
|
|
98
153
|
const cache = artifact.cache;
|
|
99
154
|
const device = run.placement.device;
|
|
@@ -126,6 +181,7 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
|
|
|
126
181
|
useBuildCache: cache.readEnabled,
|
|
127
182
|
waitedForBuild: cache.waitedForBuild,
|
|
128
183
|
launchState: launched,
|
|
184
|
+
launchWarning,
|
|
129
185
|
providerName: cache.providerName,
|
|
130
186
|
buildMachine: cache.buildMachine,
|
|
131
187
|
builtOn: cache.builtOn,
|
|
@@ -182,9 +238,9 @@ function iosCommand(program) {
|
|
|
182
238
|
registerIos(program);
|
|
183
239
|
}
|
|
184
240
|
function registerIos(program, deps = {}) {
|
|
185
|
-
program.command("ios").description("Build (or restore from the fingerprint cache), install and launch this workspace's app on its owned simulator. React Native and Expo Debug runs start the dev server when it is not running.").option("--eas-profile <name>", "Download a matching EAS development build; on a miss, print the build command without running it").option("--slot <name>", "Reusable device slot within this workspace (default: default)", parseDeviceSlotOption).option("--remote-build <value>", "Build on auto,
|
|
241
|
+
program.command("ios").description("Build (or restore from the fingerprint cache), install and launch this workspace's app on its owned simulator. React Native and Expo Debug runs start the dev server when it is not running.").option("--eas-profile <name>", "Download a matching EAS development build; on a miss, print the build command without running it").option("--slot <name>", "Reusable device slot within this workspace (default: default)", parseDeviceSlotOption).option("--remote-build <value>", "Build on local, auto, remote (remote machines first), remote-only (never here), or one named machine; a name refuses without fallback", parseBuildMachineOption).option("--json", "Emit the facts as a single JSON line on stdout; every other line goes to stderr").option("--plan", "Predict the next build without building, booting or installing: resolve the fingerprint, check the local then remote cache, and print the expected cache result and duration. Writes no Stim state.").option("--scheme <name>", "Shared Xcode app scheme to build; overrides automatic scheme selection, not the app URL scheme").option("--no-metro-check", "Skip the \"is this workspace's dev server running?\" check: do not start it, and build anyway").option("--no-build-cache", "Build fresh, ignoring cached artifacts (local and the project's build-cache provider); the fresh build still replaces the cache entry").option("--configuration <name>", "Xcode configuration to build (e.g. Release). A non-Debug configuration embeds the JS bundle and skips Metro entirely. Overrides the ios.configuration setting. Default: Debug").option("--device-type <name>", "Simulator model to create this workspace's owned sim as, exactly as `xcrun simctl list devicetypes` names it (e.g. \"iPad Pro 13-inch (M5)\"). Overrides the ios.deviceType setting for this invocation. A model no installed runtime can create refuses with STIM_BAD_ARG and prints the models they do offer.").option("--runtime <version>", "Simulator runtime to create this workspace's owned sim on, as a version (\"18.5\") or a runtime's full name (\"iOS 18.5\"); nothing else matches. Overrides the ios.runtime setting for this invocation. An unknown version refuses with STIM_BAD_ARG and prints the installed runtimes.").option("--simulator-app <app>", "Open the owned simulator in xcode, siniulator, or stim-desktop for this run, overriding the machine iosSimulatorApp setting. Also opens an already running simulator; local simulators only.").option("--device [udid]", "Build the iphoneos slice for a connected iPhone, install it, and launch it, instead of using this workspace's owned simulator. The phone can be cabled or paired over Wi-Fi. With no UDID, the first cabled device this workspace can lease is used, waiting for one that is busy; a Wi-Fi device is used only when no cabled one is connected and ready. In Debug the app is wired to this workspace's Metro over the LAN. Stim never creates, boots, or deletes a physical device.").option("--remote <target>", "Run on eas, proxy, or an approved Mac in remote.machines; named Macs never fall back locally. auto places on an approved Mac when this machine is full or busy. remote tries remote.machines in order first and runs here only when none takes it. remote-only never runs here. local runs here, whatever ios.remote says.", (value) => {
|
|
186
242
|
if (parseMachine(value)) return value.trim();
|
|
187
|
-
throw new InvalidArgumentError("expected eas, proxy, auto,
|
|
243
|
+
throw new InvalidArgumentError("expected eas, proxy, local, auto, remote, remote-only, or a remote Mac name");
|
|
188
244
|
}).option("--wait <seconds>", "How long to wait for another workspace to release the phone it leases, before refusing with STIM_DEVICE_BUSY (default 60, 0 refuses at once). Without --device, wait for an owned-device slot (default 600 seconds; --no-wait refuses immediately).").option("--no-wait", "Install on a phone another workspace leases instead of waiting: this run takes no lease and, when both workspaces build the same app id, the install terminates the holder's running app. Without --device, refuse a full device cap or existing slot queue immediately.").action(async (opts) => {
|
|
189
245
|
if (opts.plan) {
|
|
190
246
|
await planIos(opts, {
|
|
@@ -209,6 +265,12 @@ function runIosOperation(context, root, opts = {}, deps = {}, onFailure = () =>
|
|
|
209
265
|
platform: "ios",
|
|
210
266
|
slot: opts.slot ?? "default"
|
|
211
267
|
}, async (claim) => {
|
|
268
|
+
const lightened = await restoreLightenedDependencies(root, context);
|
|
269
|
+
if (lightened) {
|
|
270
|
+
printLightenedFailure(context, lightened, Boolean(opts.json));
|
|
271
|
+
onFailure(lightened);
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
212
274
|
await recordWorkspaceUseAsync(root, /* @__PURE__ */ new Date(), context.env, context.cwd, context.signal);
|
|
213
275
|
const progress = startBuildProgress({
|
|
214
276
|
root,
|
|
@@ -282,6 +344,10 @@ function iosSlotDeps(d, slot) {
|
|
|
282
344
|
...args,
|
|
283
345
|
slot
|
|
284
346
|
}),
|
|
347
|
+
ensureBooted: (args) => base.ensureBooted({
|
|
348
|
+
...args,
|
|
349
|
+
slot
|
|
350
|
+
}),
|
|
285
351
|
checkDeviceCapacity: (args) => base.checkDeviceCapacity({
|
|
286
352
|
...args,
|
|
287
353
|
slot
|
|
@@ -410,7 +476,15 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
410
476
|
let devicePlacement;
|
|
411
477
|
let builtConfiguration = null;
|
|
412
478
|
let acquiredBuild = null;
|
|
413
|
-
|
|
479
|
+
let builtScheme;
|
|
480
|
+
let builtDevice = null;
|
|
481
|
+
const recordFailedBuild = (build, errorCode, why = {}) => writeLastBuild(root, lastBuildRecord({
|
|
482
|
+
ledger: {
|
|
483
|
+
scheme: builtScheme,
|
|
484
|
+
device: builtDevice,
|
|
485
|
+
message: why.message,
|
|
486
|
+
remedy: why.remedy
|
|
487
|
+
},
|
|
414
488
|
devicePlacement,
|
|
415
489
|
buildMachine,
|
|
416
490
|
...build,
|
|
@@ -436,7 +510,10 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
436
510
|
if (remedy) note(chalk.dim(phaseLine("remedy", remedy)));
|
|
437
511
|
if (logPath) note(chalk.dim(phaseLine("log", logPath)));
|
|
438
512
|
const failedBuild = build ?? acquiredBuild;
|
|
439
|
-
if (failedBuild) recordFailedBuild(failedBuild, code
|
|
513
|
+
if (failedBuild) recordFailedBuild(failedBuild, code, {
|
|
514
|
+
message,
|
|
515
|
+
remedy
|
|
516
|
+
});
|
|
440
517
|
if (acquiredBuild) logWriter().write(runFailureRecord({
|
|
441
518
|
code,
|
|
442
519
|
message,
|
|
@@ -524,6 +601,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
524
601
|
const configuration = opts.easProfile !== void 0 ? null : resolveConfiguration(opts.configuration, settings);
|
|
525
602
|
builtConfiguration = configuration ?? "Debug";
|
|
526
603
|
const buildScheme = resolveSchemeSelection(opts, settings);
|
|
604
|
+
builtScheme = buildScheme;
|
|
527
605
|
const release = isReleaseConfiguration(configuration);
|
|
528
606
|
const appMode = {
|
|
529
607
|
metro: "development",
|
|
@@ -548,7 +626,6 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
548
626
|
const deviceSlotWait = {
|
|
549
627
|
automatic: false,
|
|
550
628
|
waitMs: deviceSlotWaitMs,
|
|
551
|
-
displayName: basename(root),
|
|
552
629
|
reclaimIdleMinutes: deviceReclaimIdleMinutesSetting(settings),
|
|
553
630
|
...deviceWaitRun.policy,
|
|
554
631
|
onWait: (ms) => {
|
|
@@ -596,6 +673,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
596
673
|
}),
|
|
597
674
|
simSnapshot,
|
|
598
675
|
noWait: deviceSlotWaitMs === 0,
|
|
676
|
+
waitMs: deviceSlotWaitMs,
|
|
599
677
|
note,
|
|
600
678
|
phase,
|
|
601
679
|
log: (entry) => logWriter().write(entry)
|
|
@@ -793,6 +871,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
793
871
|
const prepareMs = prepare();
|
|
794
872
|
if (device.created || prepareMs >= 2e3) phase("device", `${deviceLabel(device, device.deviceUdid)} ${device.created ? "created" : "prepared"} (${formatDuration(prepareMs)})`);
|
|
795
873
|
}
|
|
874
|
+
builtDevice = iosLedgerDevice(device);
|
|
796
875
|
let bootDuration = "";
|
|
797
876
|
let bootPending = false;
|
|
798
877
|
let bootPromise;
|
|
@@ -945,7 +1024,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
945
1024
|
if (cancelled) return fail(cancelled);
|
|
946
1025
|
if (acquiredBuild) {
|
|
947
1026
|
const { code } = error;
|
|
948
|
-
recordFailedBuild(acquiredBuild, typeof code === "string" ? code : void 0);
|
|
1027
|
+
recordFailedBuild(acquiredBuild, typeof code === "string" ? code : void 0, { message: error instanceof Error ? error.message : String(error) });
|
|
949
1028
|
logWriter().write(thrownRunFailureRecord(error, progress.phase()));
|
|
950
1029
|
}
|
|
951
1030
|
recordRun({
|
|
@@ -1093,8 +1172,11 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
1093
1172
|
devServer,
|
|
1094
1173
|
fail,
|
|
1095
1174
|
note,
|
|
1175
|
+
phase,
|
|
1096
1176
|
enterPhase: progress.step,
|
|
1097
|
-
|
|
1177
|
+
enterActivity: progress.activity,
|
|
1178
|
+
selectors,
|
|
1179
|
+
logWriter
|
|
1098
1180
|
});
|
|
1099
1181
|
if (!localBoot) {
|
|
1100
1182
|
progress.step("device");
|
|
@@ -1185,6 +1267,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
|
|
|
1185
1267
|
} catch (error) {
|
|
1186
1268
|
return reportRunFailure(error);
|
|
1187
1269
|
} finally {
|
|
1270
|
+
artifact?.cancelFingerprintCheck();
|
|
1188
1271
|
await artifact?.release();
|
|
1189
1272
|
}
|
|
1190
1273
|
} finally {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-
|
|
2
|
-
import {
|
|
3
|
-
import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-
|
|
4
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
5
|
-
import { t as devClientScheme } from "./dev-client-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-Dj-WT4BP.mjs";
|
|
2
|
+
import { xn as schemesFromInfoPlist, yn as pickDevClientScheme } from "./ccache-BWTze1Ls.mjs";
|
|
3
|
+
import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-Be0UeVZU.mjs";
|
|
4
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DqaIBO5w.mjs";
|
|
5
|
+
import { t as devClientScheme } from "./dev-client-BMca82xo.mjs";
|
|
6
|
+
import { c as writeLastBuild, i as iosFacts, n as cacheDescription, o as lastBuildRecord } from "./ios-project-D8Jcy_br.mjs";
|
|
7
|
+
import { d as replaceCollector, u as collectorEntry } from "./dependencies-BGokZ-Ng.mjs";
|
|
8
|
+
import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-B5HlVMhQ.mjs";
|
|
9
9
|
export { appNameFromPath, buildLogFile, cacheDescription, collectorEntry, iosCommand as default, devClientScheme, deviceLabel, ensureWorkspaceStorageSafely, formatDuration, iosConfigurationSetting, iosFacts, isReleaseConfiguration, lastBuildRecord, phaseLine, pickDevClientScheme, podAction, registerIos, replaceCollector, resolveConfiguration, resolveDeviceType, resolveRuntime, runIosOperation, schemesFromInfoPlist, shortHash, shortUdid, writeLastBuild };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
2
|
//#region src/collector/ios.ts
|
|
3
3
|
const MESSAGE_TYPE_LEVEL = {
|
|
4
4
|
Debug: "debug",
|
|
@@ -90,6 +90,12 @@ const NOISE_RULES = [
|
|
|
90
90
|
exactSubsystem: "com.apple.runtime-issues",
|
|
91
91
|
category: "CFNetwork Performance Diagnostic",
|
|
92
92
|
level: "warn"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "swiftui-invalid-configuration",
|
|
96
|
+
exactSubsystem: "com.apple.SwiftUI",
|
|
97
|
+
category: "Invalid Configuration",
|
|
98
|
+
level: "warn"
|
|
93
99
|
}
|
|
94
100
|
];
|
|
95
101
|
function ruleMatches(rule, { subsystem, category, message }) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, t as getExecutor } from "./exec-
|
|
2
|
-
import { P as formatBytes, _ as loadConfig$1 } from "./config-
|
|
1
|
+
import { l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { P as formatBytes, _ as loadConfig$1 } from "./config-Cn94Jc0g.mjs";
|
|
3
3
|
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { n as runOperationFileQuiet, t as runOperationFile } from "./operation-exec-
|
|
5
|
-
import { i as stimDesktopInstalledAsync, n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-
|
|
6
|
-
import { dt as isStimOwnedSim } from "./android-
|
|
7
|
-
import {
|
|
4
|
+
import { n as runOperationFileQuiet, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
5
|
+
import { i as stimDesktopInstalledAsync, n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-CbWo21kb.mjs";
|
|
6
|
+
import { Ct as forgetCreatedDeviceAsync, Et as recordCreatedDeviceAsync, dt as isStimOwnedSim } from "./android-DriNoAVy.mjs";
|
|
7
|
+
import { n as signedTailFor } from "./apk-signed-tail-BHQHx3Rm.mjs";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import { closeSync, existsSync, lstatSync, mkdtempSync, openSync, readSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { tmpdir, totalmem } from "node:os";
|
|
@@ -14,6 +14,9 @@ import { IOS_SIMULATOR_APPS, isJsonObject, settingDefinition } from "@stim-cli/c
|
|
|
14
14
|
const READ_CHUNK_BYTES = 1048576;
|
|
15
15
|
const DEVICE_PATH_TIMEOUT_MS = 3e4;
|
|
16
16
|
const DEVICE_HASH_TIMEOUT_MS = 12e4;
|
|
17
|
+
const APKSIGNER_TIMEOUT_MS = 12e4;
|
|
18
|
+
const PACKAGE_NAME = /^[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)+$/;
|
|
19
|
+
const EMPTY_INPUT_SHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
17
20
|
const SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
18
21
|
function parseInstalledApkPath(text) {
|
|
19
22
|
if (typeof text !== "string") return null;
|
|
@@ -31,6 +34,30 @@ function parseDeviceSha256(text) {
|
|
|
31
34
|
const first = text.trim().split(/\s+/)[0] ?? "";
|
|
32
35
|
return SHA256_HEX.test(first) ? first : null;
|
|
33
36
|
}
|
|
37
|
+
function deviceTailProbeScript(packageName, tailBytes) {
|
|
38
|
+
return `for p in $(pm path ${packageName} | sed -n "s/^package://p"); do echo "path $p"; stat -c "size %s" "$p"; tail -c ${tailBytes} "$p" | sha256sum; done`;
|
|
39
|
+
}
|
|
40
|
+
const TAIL_PROBE = /^path \/.*\nsize (\d+)\n(\S+) {2}-$/gm;
|
|
41
|
+
function parseDeviceTailProbe(text) {
|
|
42
|
+
if (typeof text !== "string") return null;
|
|
43
|
+
const lines = text.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
44
|
+
if (lines.length === 0) return { installs: 0 };
|
|
45
|
+
const probes = [];
|
|
46
|
+
for (const [, size, digest] of lines.join("\n").matchAll(TAIL_PROBE)) {
|
|
47
|
+
const tailSha256 = parseDeviceSha256(digest);
|
|
48
|
+
if (!size || !tailSha256 || tailSha256 === EMPTY_INPUT_SHA256) return null;
|
|
49
|
+
probes.push({
|
|
50
|
+
size: Number(size),
|
|
51
|
+
tailSha256
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (probes.length * 3 !== lines.length) return null;
|
|
55
|
+
const [only, ...others] = probes;
|
|
56
|
+
return only && others.length === 0 ? {
|
|
57
|
+
installs: 1,
|
|
58
|
+
...only
|
|
59
|
+
} : { installs: "split" };
|
|
60
|
+
}
|
|
34
61
|
function parseAppContainerPath(text) {
|
|
35
62
|
if (typeof text !== "string") return null;
|
|
36
63
|
const lines = text.split("\n").map((line) => line.trim()).filter(Boolean);
|
|
@@ -90,8 +117,32 @@ function hashBundle(dir) {
|
|
|
90
117
|
};
|
|
91
118
|
return walk(dir, "") ? digest.digest("hex") : null;
|
|
92
119
|
}
|
|
120
|
+
async function deviceHoldsSignedTail({ serial, packageName }, tail, e) {
|
|
121
|
+
let probe;
|
|
122
|
+
try {
|
|
123
|
+
probe = parseDeviceTailProbe(await e.runFileAsync("adb", [
|
|
124
|
+
"-s",
|
|
125
|
+
serial,
|
|
126
|
+
"shell",
|
|
127
|
+
deviceTailProbeScript(packageName, tail.size - tail.tailOffset)
|
|
128
|
+
], { timeoutMs: DEVICE_PATH_TIMEOUT_MS }));
|
|
129
|
+
} catch {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (!probe) return null;
|
|
133
|
+
if (probe.installs !== 1) return false;
|
|
134
|
+
return probe.size === tail.size && probe.tailSha256 === tail.tailSha256;
|
|
135
|
+
}
|
|
93
136
|
async function deviceHoldsApk({ serial, packageName, apkPath }, { exec = null } = {}) {
|
|
94
137
|
const e = exec || getExecutor();
|
|
138
|
+
const tail = PACKAGE_NAME.test(packageName) ? await signedTailFor(apkPath, (file, args) => e.runFileAsync(file, args, { timeoutMs: APKSIGNER_TIMEOUT_MS })) : null;
|
|
139
|
+
if (tail) {
|
|
140
|
+
const held = await deviceHoldsSignedTail({
|
|
141
|
+
serial,
|
|
142
|
+
packageName
|
|
143
|
+
}, tail, e);
|
|
144
|
+
if (held !== null) return held;
|
|
145
|
+
}
|
|
95
146
|
let path;
|
|
96
147
|
try {
|
|
97
148
|
path = parseInstalledApkPath(await e.runFileAsync("adb", [
|
|
@@ -554,6 +605,25 @@ const BOOTSTATUS_ATTEMPT_FLOOR_MS = 1e3;
|
|
|
554
605
|
const BOOT_STATE_LIST_TIMEOUT_MS = 3e4;
|
|
555
606
|
const SPRINGBOARD_QUERY_TIMEOUT_MS = 1e4;
|
|
556
607
|
const SPRINGBOARD_POLL_MS = 250;
|
|
608
|
+
async function readSpringBoardPid(udid) {
|
|
609
|
+
try {
|
|
610
|
+
const output = await getExecutor().runFileAsync("xcrun", [
|
|
611
|
+
"simctl",
|
|
612
|
+
"spawn",
|
|
613
|
+
udid,
|
|
614
|
+
"notifyutil",
|
|
615
|
+
"-g",
|
|
616
|
+
"com.apple.springboard.finishedstartup"
|
|
617
|
+
], { timeoutMs: SPRINGBOARD_QUERY_TIMEOUT_MS });
|
|
618
|
+
const pid = Number(/^com\.apple\.springboard\.finishedstartup (\d+)$/m.exec(output)?.[1] ?? 0);
|
|
619
|
+
return pid > 0 ? pid : null;
|
|
620
|
+
} catch {
|
|
621
|
+
return null;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function springBoardRunning(launchctlList) {
|
|
625
|
+
return /^\d+[ \t]+\S+[ \t]+com\.apple\.SpringBoard$/m.test(launchctlList);
|
|
626
|
+
}
|
|
557
627
|
async function waitForSpringBoard(udid, deadline) {
|
|
558
628
|
for (;;) {
|
|
559
629
|
let output = null;
|
|
@@ -578,7 +648,10 @@ async function waitForSpringBoard(udid, deadline) {
|
|
|
578
648
|
state: "unreadable",
|
|
579
649
|
reason: `Could not read SpringBoard's startup state: ${output.trim() || "no output"}.`
|
|
580
650
|
};
|
|
581
|
-
if (Number(state[1]) > 0) return {
|
|
651
|
+
if (Number(state[1]) > 0) return {
|
|
652
|
+
state: "started",
|
|
653
|
+
pid: Number(state[1])
|
|
654
|
+
};
|
|
582
655
|
}
|
|
583
656
|
if (Date.now() >= deadline) return { state: "timed-out" };
|
|
584
657
|
await cancellableSleep(SPRINGBOARD_POLL_MS);
|
|
@@ -639,7 +712,7 @@ async function awaitBootCommand(args, attemptMs, onLine) {
|
|
|
639
712
|
const detail = lines.length ? `: ${lines.join(" | ")}` : "";
|
|
640
713
|
throw new Error(`${command} failed with exit code ${result.code ?? "unknown"}${detail}`);
|
|
641
714
|
}
|
|
642
|
-
async function bootIosSim(udid, { timeoutMs = IOS_BOOT_TIMEOUT_MS, attemptMs = BOOTSTATUS_ATTEMPT_MS, simulatorApp, env, openViewer = true, label = udid, out = () => {} } = {}) {
|
|
715
|
+
async function bootIosSim(udid, { timeoutMs = IOS_BOOT_TIMEOUT_MS, attemptMs = BOOTSTATUS_ATTEMPT_MS, simulatorApp, env, openViewer = true, label = udid, out = () => {}, onPhase } = {}) {
|
|
643
716
|
const exec = getExecutor();
|
|
644
717
|
const viewer = configuredIosSimulatorViewer(simulatorApp, env);
|
|
645
718
|
const started = Date.now();
|
|
@@ -680,6 +753,7 @@ async function bootIosSim(udid, { timeoutMs = IOS_BOOT_TIMEOUT_MS, attemptMs = B
|
|
|
680
753
|
monitor.unref();
|
|
681
754
|
try {
|
|
682
755
|
try {
|
|
756
|
+
onPhase?.({ phase: "boot_requested" });
|
|
683
757
|
await awaitBootCommand([
|
|
684
758
|
"simctl",
|
|
685
759
|
"boot",
|
|
@@ -712,15 +786,24 @@ async function bootIosSim(udid, { timeoutMs = IOS_BOOT_TIMEOUT_MS, attemptMs = B
|
|
|
712
786
|
if (state !== "Booting" && state !== "Booted" && state !== void 0) throw new Error(`Simulator ${udid} reports "${state ?? "missing"}" after ${waited}s of boot wait.`);
|
|
713
787
|
if (deadline - Date.now() <= 0) throw new Error(`Simulator ${udid} did not finish booting within ${Math.round(timeoutMs / 1e3)}s.`);
|
|
714
788
|
}
|
|
789
|
+
onPhase?.({ phase: "bootstatus_done" });
|
|
715
790
|
phase = "waiting for SpringBoard";
|
|
716
|
-
|
|
791
|
+
const springBoard = await waitForSpringBoard(udid, deadline);
|
|
792
|
+
if (springBoard.state === "timed-out") throw new Error(`Simulator ${udid} did not finish booting within ${Math.round(timeoutMs / 1e3)}s.`);
|
|
793
|
+
if (springBoard.state === "started") onPhase?.({
|
|
794
|
+
phase: "springboard_started",
|
|
795
|
+
pid: springBoard.pid
|
|
796
|
+
});
|
|
717
797
|
} catch (error) {
|
|
718
798
|
const named = memoryCulpritAdvice(await memoryCulpritsUnderAsync(sample(), exec));
|
|
719
799
|
throw new Error(`${error?.message || error} Last boot output: ${phase}. Highest observed memory pressure: ${worst ?? "unknown"}; unavailable samples: ${unknown}.${coverage()}${named ? ` ${named}` : ""} ${recovery} These observations do not establish an OOM crash.`, { cause: error });
|
|
720
800
|
} finally {
|
|
721
801
|
clearInterval(monitor);
|
|
722
802
|
}
|
|
723
|
-
if (openViewer)
|
|
803
|
+
if (openViewer) {
|
|
804
|
+
await viewer.open(udid);
|
|
805
|
+
onPhase?.({ phase: "viewer_opened" });
|
|
806
|
+
}
|
|
724
807
|
}
|
|
725
808
|
async function shutdownIosSim(udid, operation) {
|
|
726
809
|
if (!operation) {
|
|
@@ -1101,4 +1184,4 @@ function parseIosRuntimes(out) {
|
|
|
1101
1184
|
}] : []);
|
|
1102
1185
|
}
|
|
1103
1186
|
//#endregion
|
|
1104
|
-
export {
|
|
1187
|
+
export { springBoardRunning as A, reportMemoryCulprits as B, renameIosSim as C, resolveOwnedIosSim as D, resolveIosCreation as E, hostMemoryPressureAdvice as F, deviceHoldsBundle as G, memoryCulpritFindings as H, memoryCulpritsUnder as I, memoryCulpritsUnderAsync as L, waitForSpringBoard as M, configuredIosSimulatorViewer as N, sanitizeDeviceLabel as O, parseIosSimulatorApp as P, readHostMemoryPressure as R, readSpringBoardPid as S, resetIosPrivacy as T, readMemoryCulpritsAsync as U, memoryCulpritAdvice as V, deviceHoldsApk as W, ownedSimName as _, createOwnedIosSim as a, parseSimctlList as b, eraseIosSim as c, listAllIosSims as d, listAllIosSimsAsync as f, listUserApps as g, listIosRuntimesAsync as h, createIosSimSnapshot as i, uninstallIosApp as j, shutdownIosSim as k, iosRuntimeMatches as l, listIosRuntimes as m, bootIosSim as n, deleteIosSim as o, listIosDeviceTypesAsync as p, clearIosAppData as r, deleteParkedIosSim as s, IOS_BOOT_TIMEOUT_MS as t, iosSimulatorFailureAdvice as u, parkedSimName as v, resetIosKeychain as w, pickDefaultIosCreation as x, parseRuntimeVersion as y, readHostMemoryPressureAsync as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { n as TOOL_ERROR_PREFIX } from "./ios-device-
|
|
1
|
+
import { t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { $t as INSTALL_ERROR, rn as appProcessFromPid } from "./ccache-BWTze1Ls.mjs";
|
|
3
|
+
import { n as TOOL_ERROR_PREFIX } from "./ios-device-CiBA-er9.mjs";
|
|
4
4
|
import { mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as formatDuration, l as phaseLine } from "./command-output-
|
|
3
|
-
import { a as workspaceLinkLine } from "./stim-desktop-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { w as workspaceAgentDeviceDir } from "./workspace-state-BjqdjnJR.mjs";
|
|
2
|
+
import { i as formatDuration, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
3
|
+
import { a as workspaceLinkLine } from "./stim-desktop-CbWo21kb.mjs";
|
|
4
|
+
import { Mn as isEasAuthFailureText, On as UPLOAD_TIMEOUT_MS, jn as easAuthNote, kn as cacheLevel } from "./ccache-BWTze1Ls.mjs";
|
|
5
|
+
import { q as recordFinishedBuild } from "./workspaces-DFbj07jp.mjs";
|
|
6
|
+
import { P as compilationCacheActivityLine, k as COMPILATION_CACHE_NOT_RUN } from "./toolchain-CbCG6C5Z.mjs";
|
|
7
|
+
import { i as deviceLabel } from "./support-Be0UeVZU.mjs";
|
|
7
8
|
import { buildDiagnostics } from "@stim-cli/core/state";
|
|
8
9
|
import chalk from "chalk";
|
|
9
10
|
//#region src/commands/ios/result.ts
|
|
10
|
-
function lastBuildRecord({ devicePlacement, fingerprint = null, cacheKey = null, cacheHit = false, cacheSkipped = false, durationMs = 0, appPath = null, bundleId = null, startedAt, status, errorCode = null, missReason = null, diagnostics = null, configuration = null, buildMachine = "auto", builtOn, offloadedTo = null, offloadFallback = null }) {
|
|
11
|
+
function lastBuildRecord({ devicePlacement, fingerprint = null, cacheKey = null, cacheHit = false, cacheSkipped = false, durationMs = 0, appPath = null, bundleId = null, startedAt, status, errorCode = null, missReason = null, diagnostics = null, configuration = null, buildMachine = "auto", builtOn, offloadedTo = null, offloadFallback = null, ledger }) {
|
|
11
12
|
const record = {
|
|
12
13
|
platform: "ios",
|
|
13
14
|
fingerprint,
|
|
@@ -30,6 +31,7 @@ function lastBuildRecord({ devicePlacement, fingerprint = null, cacheKey = null,
|
|
|
30
31
|
if (missReason && !cacheLevel(cacheHit)) record.missReason = missReason;
|
|
31
32
|
const recorded = status === "failed" ? buildDiagnostics(diagnostics) : [];
|
|
32
33
|
if (recorded.length) record.diagnostics = recorded;
|
|
34
|
+
if (ledger) record.ledger = ledger;
|
|
33
35
|
return record;
|
|
34
36
|
}
|
|
35
37
|
function iosFacts({ root, slot, udid, deviceName, deviceType = null, runtime = null, fingerprint, configuration = null, scheme = null, cacheKey, cacheHit, cacheSkipped = false, compilationCache = COMPILATION_CACHE_NOT_RUN, waitedForBuild = null, appPath, bundleId, installSkipped = false, metroPort, logsDir, durationMs, launched = true, webPreviewUrl = null, lease, devServer = null, buildMachine = "auto", builtOn, offloadedTo = null, offloadFallback = null }) {
|
|
@@ -68,6 +70,13 @@ function iosFacts({ root, slot, udid, deviceName, deviceType = null, runtime = n
|
|
|
68
70
|
...devServer ? { devServer } : {}
|
|
69
71
|
};
|
|
70
72
|
}
|
|
73
|
+
function iosLedgerDevice(device) {
|
|
74
|
+
const name = device?.deviceName ?? device?.name;
|
|
75
|
+
return name && name !== device?.deviceUdid ? {
|
|
76
|
+
name,
|
|
77
|
+
runtime: device?.runtime ?? null
|
|
78
|
+
} : null;
|
|
79
|
+
}
|
|
71
80
|
function writeLastBuild(root, record, { record: recordBuild = recordFinishedBuild } = {}) {
|
|
72
81
|
try {
|
|
73
82
|
recordBuild(root, record);
|
|
@@ -118,7 +127,11 @@ function reportIosResult({ output, devicePlacement, host, slot, root, json, rele
|
|
|
118
127
|
buildMachine,
|
|
119
128
|
builtOn,
|
|
120
129
|
offloadedTo,
|
|
121
|
-
offloadFallback
|
|
130
|
+
offloadFallback,
|
|
131
|
+
ledger: {
|
|
132
|
+
scheme: buildScheme,
|
|
133
|
+
device: iosLedgerDevice(device)
|
|
134
|
+
}
|
|
122
135
|
}));
|
|
123
136
|
closeWriter();
|
|
124
137
|
const facts = iosFacts({
|
|
@@ -194,4 +207,4 @@ var IosRecipeRefusal = class extends Error {
|
|
|
194
207
|
}
|
|
195
208
|
};
|
|
196
209
|
//#endregion
|
|
197
|
-
export {
|
|
210
|
+
export { iosLedgerDevice as a, writeLastBuild as c, iosFacts as i, cacheDescription as n, lastBuildRecord as o, finishIosUpload as r, reportIosResult as s, IosRecipeRefusal as t };
|