stim 1.24.0 → 1.26.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-CEs02U2o.mjs → acquire-artifact-DVsvSwf7.mjs} +1 -1
- package/dist/{act-Cyvm8xYc.mjs → act-C-BqJEpu.mjs} +158 -36
- package/dist/{activity-Dq3ZcdD8.mjs → activity-Lnb_EoRY.mjs} +4 -5
- package/dist/{agent-device-usage-output-CccomeE0.mjs → agent-device-usage-output-DbXy5tg8.mjs} +4 -4
- package/dist/{android-CX5IcRuf.mjs → android-B5P81yI-.mjs} +1 -1
- package/dist/{android-DcztblCT.mjs → android-CSbLRD53.mjs} +5 -5
- package/dist/{android-BZppyPe_.mjs → android-CiNQw3kq.mjs} +81 -52
- package/dist/{android-882m4hxX.mjs → android-DTAcRwBC.mjs} +81 -34
- package/dist/{android-cas-BtCOrNqb.mjs → android-cas-BTVhZ0Qs.mjs} +4 -4
- package/dist/{android-project-DVWyCbWU.d.mts → android-project-DUGMbq28.d.mts} +61 -3
- package/dist/api.d.mts +8 -5
- package/dist/api.mjs +27 -27
- package/dist/apk-signed-tail-B46U9hXc.mjs +142 -0
- package/dist/{artifact-BR5VNArK.mjs → artifact-BxREhAaV.mjs} +25 -19
- package/dist/{artifact-Bdt_n9Jc.mjs → artifact-CsAP6AGK.mjs} +36 -21
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/{browser-web-ycg9qWB8.mjs → browser-web-rYPyqhTf.mjs} +11 -12
- package/dist/{budget-dPGuhNai.mjs → budget-k2mZGvvk.mjs} +242 -38
- package/dist/{build-CaF574eS.mjs → build-DPhApsjV.mjs} +28 -24
- package/dist/{build-cache-HFUQ9eLz.mjs → build-cache-DrXNCy3T.mjs} +123 -23
- package/dist/{build-plan-JsDUq4w1.mjs → build-plan-DrMMdayj.mjs} +5 -5
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-BEZ9Bpl1.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-CCn1S6qG.mjs → ccache-Bx5TbxwG.mjs} +6 -6
- package/dist/{cli-xqAidP7O.mjs → cli-BBKFGOFl.mjs} +19 -19
- package/dist/cli.mjs +1 -1
- package/dist/{client-18-ZowoT.mjs → client-D9CaRks-.mjs} +55 -71
- package/dist/collector-run.mjs +4 -4
- package/dist/{command-output-DxC0k2rk.mjs → command-output-BF5AR2dL.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-BktkY_zC.mjs} +321 -15
- package/dist/{launch-BVlyQw3T.mjs → dependencies-Dw6wfQdv.mjs} +259 -256
- package/dist/{dependency-state-C56ll9hY.mjs → dependency-state-DFB41vfr.mjs} +1 -1
- package/dist/{dev-client-w_fok0Ek.mjs → dev-client-DXR_tPVY.mjs} +2 -2
- package/dist/{device-BktRGdjS.mjs → device-BK-zwyd_.mjs} +64 -33
- package/dist/{device-4RUugw5X.mjs → device-BcYeHSFu.mjs} +14 -14
- package/dist/{device-capacity-Ic-kdmEV.mjs → device-capacity-DCSvUF0l.mjs} +10 -17
- package/dist/device-host-worker.mjs +11 -13
- package/dist/{device-ios-DzpSlZyd.mjs → device-ios-BLGfXQeK.mjs} +68 -25
- package/dist/{device-lease-run-DUtkbqBQ.mjs → device-lease-run-BmvIl7bI.mjs} +5 -5
- package/dist/{device-pool-CgBHk401.mjs → device-pool-Dluix4H3.mjs} +3 -3
- package/dist/{doctor-DZgpqR6J.mjs → doctor-Bhg1ii70.mjs} +14 -14
- package/dist/{doctor-BZ6oxNum.mjs → doctor-Cp-BhzTS.mjs} +1 -1
- package/dist/{doctor-C33AzVfR.mjs → doctor-OnwP94ne.mjs} +81 -26
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-D3a04Mhu.mjs} +8 -2
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-B453A231.mjs → doctor-watchman-BStK05nt.mjs} +4 -4
- package/dist/{eas-build-CxKUNHsb.mjs → eas-build-Dsj93iM9.mjs} +2 -2
- package/dist/{eas-fallback-LMxk9Kw0.mjs → eas-fallback-FwkeqqGi.mjs} +13 -12
- package/dist/{eas-session-ledger-Ck6YXPAO.mjs → eas-session-ledger-B5vygTiD.mjs} +5 -5
- package/dist/{error-diagnostics-BkKCZq4P.mjs → error-diagnostics-BOOm9Db7.mjs} +8 -8
- package/dist/{errors-ccaPc4ox.mjs → errors-DHm_U5gv.mjs} +2 -1
- package/dist/{gc-DDWEAj0w.mjs → gc-C_79zvz4.mjs} +2 -2
- package/dist/{gc-yVKpAOKM.mjs → gc-ldgr-hXU.mjs} +74 -43
- package/dist/{guide-Bggftwc5.mjs → guide-D7K0X6KG.mjs} +374 -78
- package/dist/{hosted-android-D4dweBof.mjs → hosted-android-Bk54ej6n.mjs} +3 -3
- package/dist/{hosted-client-BBTVe3X6.mjs → hosted-client-fHO8yqzc.mjs} +5 -5
- package/dist/{hosted-ios-Sn0djzg8.mjs → hosted-ios-D55QhYaD.mjs} +1 -1
- package/dist/{hosted-logs-CYIZ5ubJ.mjs → hosted-logs-BfbmDM4M.mjs} +17 -11
- package/dist/hosted-logs-sync-B0pvmOk-.mjs +195 -0
- package/dist/{hosted-macos-CXjsUNBR.mjs → hosted-macos-CPl0OZ9h.mjs} +5 -5
- package/dist/{hosted-native-Doxbfzem.mjs → hosted-native-CpDB3-PO.mjs} +6 -7
- package/dist/{idle-shutdown-BInjLKqm.mjs → idle-shutdown-FfxL1KdG.mjs} +22 -9
- package/dist/{ios-BItP6lkn.mjs → ios-B7-lToDu.mjs} +8 -8
- package/dist/{ios-CVUFFZ6C.mjs → ios-WxpDJ5T1.mjs} +129 -14
- package/dist/{ios-device-BI38NFFH.mjs → ios-device-CsyryvpT.mjs} +1 -1
- package/dist/{ios-B1FXRCMX.mjs → ios-ftxdQbJS.mjs} +84 -51
- package/dist/{ios-project-KYqeJURj.mjs → ios-project-Ty5pHl9O.mjs} +6 -6
- package/dist/{ios-state-DlElquYD.mjs → ios-state-Cw7-WQf2.mjs} +1 -1
- package/dist/{js-swap-BvrQvXHY.mjs → js-swap-BMhXYVDS.mjs} +4 -4
- package/dist/{launch-SfzGH_s9.mjs → launch-DOp8RjDz.mjs} +32 -27
- package/dist/{logs-DXE32kyb.mjs → logs-dQDki6Tt.mjs} +9 -173
- package/dist/{logs-ovlU7m7N.mjs → logs-s1dRIG1E.mjs} +85 -36
- package/dist/{macos-B3BveDrU.mjs → macos-B0VEV3Gf.mjs} +1 -1
- package/dist/{macos-CCfhb-jT.mjs → macos-DBBPNnIA.mjs} +18 -19
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +28 -11
- package/dist/{metro-Bu8LBfzS.mjs → metro-CjC10t6E.mjs} +2 -2
- package/dist/{metro-gateway-DtsOy-0P.mjs → metro-gateway-B6_PgD0L.mjs} +2 -3
- package/dist/{named-ports-BWDuU5oQ.mjs → named-ports-BG0j1X4g.mjs} +2 -2
- package/dist/{native-android-96BBizbq.mjs → native-android-CL2NGiik.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-BcLYBZil.mjs → native-gradle-artifact-inputs-btSUulme.mjs} +3 -3
- package/dist/{native-run-BmH7U8pr.mjs → native-run-BfIDFKLH.mjs} +2 -3
- package/dist/{native-runtime-DgtJkzIa.mjs → native-runtime-Dq3RBcON.mjs} +6 -7
- package/dist/{native-xcode-inputs-irplbQb0.mjs → native-xcode-inputs-BW7H8JGu.mjs} +2 -2
- package/dist/{native-xcode-ios-BY-6hh6M.mjs → native-xcode-ios-CBXJAxfC.mjs} +18 -18
- package/dist/offload-worker.d.mts +7 -2
- package/dist/offload-worker.mjs +34 -23
- package/dist/{ownership-DxlZGDcV.mjs → ownership-BjYvMNX_.mjs} +2 -2
- package/dist/{phone-reverses-BdsdesVF.mjs → phone-reverses-lmj6kcPm.mjs} +3 -3
- package/dist/{placement-log-DUvqqsB-.mjs → placement-log-DIFPQAXp.mjs} +1 -1
- package/dist/{plan-placement-4axc0Hs7.mjs → plan-placement-IiiSQhtz.mjs} +3 -3
- package/dist/{ports-D-E_OiAO.mjs → ports-C2_w1Z0Z.mjs} +3 -3
- package/dist/prebuild-gmouvmJZ.mjs +1247 -0
- package/dist/{project-Dz-hWkb-.mjs → project-BUu6Is4k.mjs} +15 -16
- package/dist/{react-native-android-DOinxgwB.mjs → react-native-android-Cgg99REN.mjs} +48 -33
- package/dist/{react-native-build-AuCu-aAP.mjs → react-native-build-oNwqF5Wb.mjs} +8 -8
- package/dist/{react-native-doctor-2ivJUmwZ.mjs → react-native-doctor-BhA3KUte.mjs} +49 -8
- package/dist/{react-native-ios-D5zTIuH8.mjs → react-native-ios-B-nf4rjN.mjs} +40 -25
- package/dist/{recordings-CdPwYwvs.mjs → recordings-BldzVKq0.mjs} +1 -1
- package/dist/{reload-Ck9RJeSq.mjs → reload-C9OduiNc.mjs} +1 -1
- package/dist/{reload-C1TTVesC.mjs → reload-CCR7KC_l.mjs} +14 -14
- package/dist/{remote-DEZ7AOVq.mjs → remote-C8S7FlPF.mjs} +16 -7
- package/dist/{result-DqBrb12U.mjs → result-7F5hEwQJ.mjs} +17 -17
- package/dist/{run-BIwoU44q.mjs → run-BqB0v3pt.mjs} +1 -1
- package/dist/{selection-BLtvaqxc.mjs → selection-BNPBZ6T5.mjs} +157 -44
- package/dist/{server-bare-Z1ToVLPn.mjs → server-bare-A75rDIdD.mjs} +55 -3
- package/dist/{server-command-C0pmjNdG.mjs → server-command-CssKFOD7.mjs} +4 -4
- package/dist/{server-expo-Tt_hLRpy.mjs → server-expo-eQfOdydb.mjs} +8 -6
- package/dist/server-expo-wvcj5tiZ.mjs +2 -0
- package/dist/{settings-RKwY33wv.mjs → settings-CosW5X-S.mjs} +59 -61
- package/dist/{settings-kkt0vP4w.mjs → settings-OaGQF-ri.mjs} +1 -1
- package/dist/{settings-write--gj6MACV.mjs → settings-write-QjYfSrjF.mjs} +5 -5
- package/dist/settings.schema.json +71 -6
- package/dist/{simslim-CdWKT3vA.mjs → simslim-Bax1qcxu.mjs} +22 -6
- package/dist/{slot-launch-A1BgotaM.mjs → slot-launch-CYCEhfBY.mjs} +6 -6
- package/dist/{stage-ERTMh88n.mjs → stage-jKQ7CP_B.mjs} +1 -1
- package/dist/{start-Bmg_qmHi.mjs → start-C_wefNKB.mjs} +1 -1
- package/dist/{start-BKGrEhzG.mjs → start-_BdJ32cZ.mjs} +9 -10
- package/dist/{state-B1ig0Kqy.mjs → state-C1i2nMOP.mjs} +2 -3
- package/dist/{state-BfAltYJP.mjs → state-C4OdpOTF.mjs} +1 -2
- package/dist/{stats-B-ckuiUg.mjs → stats-tEpEEH-u.mjs} +4 -4
- package/dist/{status-Pw-807f0.mjs → status-B9M7x4CZ.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-CRXz-Gtj.mjs} +1 -1
- package/dist/{status-DfFp6a76.mjs → status-DQrqodLj.mjs} +22 -23
- package/dist/{status-watch-XC7F-AMf.mjs → status-watch-B5wDIH_o.mjs} +4 -4
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-6Dqp-gjX.mjs} +1 -1
- package/dist/{stop-BFu7X_Do.mjs → stop-CmdNhGlC.mjs} +2 -2
- package/dist/{stop-CL1kDHds.mjs → stop-DRqQVqDJ.mjs} +74 -53
- package/dist/{stop-DhclRwOO.mjs → stop-ySNQHXMG.mjs} +4 -5
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +15 -16
- package/dist/{support-B3tzVhKn.mjs → support-BGSCBoib.mjs} +4 -4
- package/dist/{support-B1W-hmC2.mjs → support-CVOCp0Ft.mjs} +15 -12
- package/dist/{swiftpm-artifact-inputs-BWYPj9Sn.mjs → swiftpm-artifact-inputs-CfUzt_0Z.mjs} +1 -1
- package/dist/{swiftpm-macos-BVCP5mO4.mjs → swiftpm-macos-x6HPpl_2.mjs} +10 -10
- package/dist/toolchain-DoavrvIA.mjs +2 -0
- package/dist/toolchain-J4J8MrAr.mjs +2107 -0
- package/dist/trigger-DzJu208Q.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-KVaWWNyn.mjs} +1 -1
- package/dist/{warm-progress-ol0ZypEu.mjs → warm-progress-DvhTX_eu.mjs} +3 -4
- package/dist/web-BFLueSh-.mjs +2 -0
- package/dist/{web-BH7peScT.mjs → web-Bihbf7-u.mjs} +8 -9
- package/dist/web-run.mjs +4 -4
- package/dist/{workspace-state-CeBpIZgr.mjs → workspace-state-pUg3_RRA.mjs} +45 -7
- package/dist/{workspaces-CSV2Orf4.mjs → workspaces-g2lhdBXF.mjs} +17 -17
- package/dist/{worktree-Dw8kfacb.mjs → worktree-BKuklFh_.mjs} +34 -31
- package/dist/{worktree-DEDUzO_L.mjs → worktree-Bm4cb-nU.mjs} +1 -1
- package/package.json +8 -8
- package/shim/bundle-response.cjs +53 -1
- package/shim/bundle-response.d.cts +1 -1
- package/shim/expo-metro-config.cjs +23 -1
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-DmVCf5xb.mjs +0 -501
- package/dist/server-expo-CEntXzRw.mjs +0 -2
- package/dist/toolchain-BjgKdoEf.mjs +0 -2
- package/dist/toolchain-D3bmRMia.mjs +0 -897
- package/dist/trigger-BLsHgAGR.mjs +0 -2
- package/dist/web-BdOFlTJr.mjs +0 -2
- package/dist/xcode-DHu41qQ4.mjs +0 -910
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, E as debugLog, S as process_identity_exports, b as operationState, c as throwIfCancelled, d as workspaceProcessLockError, l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, s as cancelledError, t as getExecutor, u as withWorkspaceProcessLock, y as isTermination } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { D as withConfigLock$1, F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, L as measuredDirectorySizeAsync, M as directorySize, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, _ as loadConfig$1, a as clearDevice, d as getConfigDir, o as clearSupervisor, p as getProject } from "./config-
|
|
2
|
+
import { D as workspaceId$1, E as workspaceDir, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, y as sharedBuildCache } from "./workspace-state-pUg3_RRA.mjs";
|
|
3
|
+
import { D as withConfigLock$1, F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, L as measuredDirectorySizeAsync, M as directorySize, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, _ as loadConfig$1, a as clearDevice, d as getConfigDir, o as clearSupervisor, p as getProject } from "./config-BktkY_zC.mjs";
|
|
4
4
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-
|
|
5
|
+
import { a as formatElapsed, l as phaseLine, o as formatLongDuration, s as isAppLaunchError, u as plural } from "./command-output-BF5AR2dL.mjs";
|
|
6
6
|
import { a as killOnAbort, n as runOperationFileQuiet, r as childEnvironment, t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-Bu8LBfzS.mjs";
|
|
7
|
+
import { Y as resolveProjectSettingsAsync, d as androidLayoutSetting, ut as planMetroReach } from "./settings-CosW5X-S.mjs";
|
|
8
|
+
import { C as resolvePackageJson, M as readMetroTunnel, N as readPidFile, P as readRemoteSession, i as findProjectRoot$1, j as clearWorkspaceSupervisor, k as clearRemoteSession, s as ownedDeviceLabel, v as detectIsExpo } from "./project-BUu6Is4k.mjs";
|
|
9
|
+
import { F as listAvdsAsync, G as ownedAvdSerialResolverAsync, I as listInstalledSystemImages, J as parseAvdSystemImage, V as ownedAvdDirectory, W as ownedAvdSerialResolver, d as androidToolPath, dt as isStimOwnedSim, m as avdIniPaths, mt as dropParked, o as androidHome, q as parseAvdDeviceProfile, ut as isStimOwnedAvd, v as avdStorageRoots, yt as readParked } from "./android-DTAcRwBC.mjs";
|
|
10
|
+
import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, r as killMetroTreeAsync, u as processCwds } from "./metro-CjC10t6E.mjs";
|
|
12
11
|
import { r as createNdjsonWriter, s as readNdjsonGenerations$1 } from "./ndjson-CgE_o3Dl.mjs";
|
|
13
|
-
import { C as environmentState, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as formatSpace, y as capacity } from "./eas-session-ledger-
|
|
14
|
-
import { i as registeredCaches } from "./cache-manifest-
|
|
12
|
+
import { C as environmentState, a as removeEasSessionClaim, d as parseWatchRoots, f as parseWatchmanClients, i as recordEasSessionClaim, l as parseSubscriberNames, n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, p as parseWatchmanPid, r as readEasSessionLedger$1, s as compareStimVersions, t as assertEasMachineRootWritable, u as parseTriggerCount, w as formatSpace, y as capacity } from "./eas-session-ledger-B5vygTiD.mjs";
|
|
13
|
+
import { i as registeredCaches } from "./cache-manifest-BEZ9Bpl1.mjs";
|
|
15
14
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
16
|
-
import { c as nativeRunWaitNotice, d as runCancellationSignal, m as claimForEmptying } from "./native-run-
|
|
17
|
-
import { A as teardownOwnedIosSim, B as GC_OUTPUT, E as eraseParkedIosSim, F as measureDu, I as writeUsageCache, M as teardownParkedIosSim, N as probePublicHttp, O as teardownOwnedAvd, P as canonical, R as listBuildSlots, T as eraseParkedAvd, a as collectWorkspaceOutputs, g as resolveSupervisorTarget, j as teardownParkedAvd, p as withIdleWorkspace, r as clearWorkspaceOutputs } from "./workspaces-
|
|
18
|
-
import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, i as createActivityReaderAsync, o as envDir, p as readHostProcessTableAsync, r as createActivityReader, s as idleForMs, x as listLeaseFiles } from "./activity-
|
|
19
|
-
import { c as expoConfigContents } from "./build-cache-
|
|
20
|
-
import {
|
|
21
|
-
import { n as supervisorError } from "./errors-
|
|
22
|
-
import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-
|
|
15
|
+
import { c as nativeRunWaitNotice, d as runCancellationSignal, m as claimForEmptying } from "./native-run-BfIDFKLH.mjs";
|
|
16
|
+
import { A as teardownOwnedIosSim, B as GC_OUTPUT, E as eraseParkedIosSim, F as measureDu, I as writeUsageCache, M as teardownParkedIosSim, N as probePublicHttp, O as teardownOwnedAvd, P as canonical, R as listBuildSlots, T as eraseParkedAvd, V as createGcResults, a as collectWorkspaceOutputs, g as resolveSupervisorTarget, j as teardownParkedAvd, p as withIdleWorkspace, r as clearWorkspaceOutputs } from "./workspaces-g2lhdBXF.mjs";
|
|
17
|
+
import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, i as createActivityReaderAsync, o as envDir, p as readHostProcessTableAsync, r as createActivityReader, s as idleForMs, x as listLeaseFiles } from "./activity-Lnb_EoRY.mjs";
|
|
18
|
+
import { c as expoConfigContents } from "./build-cache-DrXNCy3T.mjs";
|
|
19
|
+
import { A as uninstallIosApp, O as sanitizeDeviceLabel, U as deviceHoldsApk, W as deviceHoldsBundle, b as parseSimctlList, f as listAllIosSimsAsync, g as listUserApps, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, y as parseRuntimeVersion } from "./ios-WxpDJ5T1.mjs";
|
|
20
|
+
import { n as supervisorError } from "./errors-DHm_U5gv.mjs";
|
|
21
|
+
import { c as findBinUpward, n as expoBinFromPackage, r as expoBinPath, s as expoTelemetryEnv } from "./server-expo-eQfOdydb.mjs";
|
|
23
22
|
import { t as DEV_MENU_LAUNCH_ARGS } from "./ios-device-B6HK951C.mjs";
|
|
23
|
+
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
24
24
|
import { createRequire } from "node:module";
|
|
25
25
|
import { randomUUID } from "node:crypto";
|
|
26
|
-
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, statfsSync, writeFileSync } from "node:fs";
|
|
26
|
+
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, statfsSync, unlinkSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { homedir, platform, totalmem } from "node:os";
|
|
28
28
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
29
|
-
import { LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, ambientContext, cacheDirRefusal, compiledHelper, configDir, withAmbientContext } from "@stim-cli/core";
|
|
30
|
-
import { BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, DEV_SERVER_STOP_REQUEST_KEY, LAST_BUILD_KEYS, MACHINE_OWNER_KINDS, STATS_VERSION, buildWorkerRoot, decodeStats, isJsonObject, loadConfig, machineCacheUsageFile, parseMissReason, readDevServerStop, readDevServerStopRequest, readJsonObject, readMachineCacheUsage, readRunEstimates, readStats as readStats$1, runId, settingDefinition, settingValueError, statsFile, statsProjectKey as statsProjectKey$1, trimCapacityRefusals, trimCapacityWaits, trimSamples, wholePhases, workspaceBuildDetailFile } from "@stim-cli/core/state";
|
|
29
|
+
import { LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, ambientContext, cacheDirRefusal, compiledHelper, configDir, ensurePrivateDir, rotatedLogPath, withAmbientContext, withDirLock } from "@stim-cli/core";
|
|
30
|
+
import { BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, DEV_SERVER_STOP_REQUEST_KEY, LAST_BUILD_KEYS, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, STATS_VERSION, buildWorkerRoot, decodeStats, gcLogFile, isJsonObject, loadConfig, machineCacheUsageFile, maintenanceNdjsonFile, parseMissReason, readDevServerStop, readDevServerStopRequest, readJsonObject, readMachineCacheUsage, readRunEstimates, readStats as readStats$1, runId, settingDefinition, settingValueError, statsFile, statsProjectKey as statsProjectKey$1, trimCapacityRefusals, trimCapacityWaits, trimSamples, wholePhases, workspaceBuildDetailFile, workspaceLogsDir } from "@stim-cli/core/state";
|
|
31
31
|
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, relative as relative$1, resolve as resolve$1 } from "path";
|
|
32
32
|
import { fileURLToPath } from "node:url";
|
|
33
33
|
import chalk from "chalk";
|
|
@@ -2985,16 +2985,18 @@ async function launchIosApp({ udid, bundleId, metroPort, devClientScheme = null,
|
|
|
2985
2985
|
const e = exec || getExecutor();
|
|
2986
2986
|
const running = await iosAppProcess(udid, bundleId, { exec: e });
|
|
2987
2987
|
const stateUnknown = running.state === "unknown";
|
|
2988
|
+
const launchRestarts = metroPort === null || !devClientScheme || Boolean(consolePaths);
|
|
2988
2989
|
const launchArgs = [
|
|
2989
2990
|
"simctl",
|
|
2990
2991
|
"launch",
|
|
2991
2992
|
...consolePaths ? [`--stdout=${consolePaths.stdout}`, `--stderr=${consolePaths.stderr}`] : [],
|
|
2992
|
-
...stateUnknown ? ["--terminate-running-process"] : [],
|
|
2993
|
+
...stateUnknown || running.state === "running" && launchRestarts ? ["--terminate-running-process"] : [],
|
|
2993
2994
|
udid,
|
|
2994
2995
|
bundleId
|
|
2995
2996
|
];
|
|
2996
2997
|
const restart = {};
|
|
2997
|
-
if (running.state === "running")
|
|
2998
|
+
if (running.state === "running" && launchRestarts) restart.restartedPid = running.pid;
|
|
2999
|
+
else if (running.state === "running") {
|
|
2998
3000
|
try {
|
|
2999
3001
|
await e.runFileAsync("xcrun", [
|
|
3000
3002
|
"simctl",
|
|
@@ -3677,8 +3679,12 @@ const LAUNCH_UNVERIFIED = "unverified";
|
|
|
3677
3679
|
const LAUNCH_BUNDLING = "bundling";
|
|
3678
3680
|
const LAUNCH_FATAL = "fatal";
|
|
3679
3681
|
const VERIFY_TIMEOUT_MS = 2e4;
|
|
3682
|
+
const MANIFEST_GRACE_MS = 15e3;
|
|
3683
|
+
const MANIFEST_VERIFY_TIMEOUT_MS = 6e4;
|
|
3680
3684
|
const STABILITY_WINDOW_MS = 3e3;
|
|
3685
|
+
const JS_RUNNING_SETTLE_MS = 500;
|
|
3681
3686
|
const VERIFY_POLL_MS = 500;
|
|
3687
|
+
const DEVICE_LOG_LAG_LIMIT_MS = 1e4;
|
|
3682
3688
|
const BUNDLE_EVENTS = /* @__PURE__ */ new Set([
|
|
3683
3689
|
"bundle_build_started",
|
|
3684
3690
|
"bundle_build_done",
|
|
@@ -3714,6 +3720,21 @@ function isBundleRequestProof(record, since = 0, port = null, platform = null) {
|
|
|
3714
3720
|
if (!new RegExp(`:${digits}\\b`).test(rec.msg)) return false;
|
|
3715
3721
|
return BUNDLE_URL_PATH.test(rec.msg);
|
|
3716
3722
|
}
|
|
3723
|
+
const JS_RUNNING = /^Running "[^"]*"/;
|
|
3724
|
+
function isJsRunning(record, platform) {
|
|
3725
|
+
return record.src === "device" && record.platform === platform && (record.level === "info" || record.level === "debug") && typeof record.msg === "string" && JS_RUNNING.test(record.msg);
|
|
3726
|
+
}
|
|
3727
|
+
function jsRunningSince(signals, since, runtimeWaiting, platform) {
|
|
3728
|
+
if (since === null || runtimeWaiting) return null;
|
|
3729
|
+
const running = signals.find((record) => Number(record.ts) >= since && isJsRunning(record, platform));
|
|
3730
|
+
return running ? Number(running.ts) : null;
|
|
3731
|
+
}
|
|
3732
|
+
function settledWindowEnd(stabilityDeadline, jsRunningAt) {
|
|
3733
|
+
return stabilityDeadline !== null && jsRunningAt !== null ? Math.min(stabilityDeadline, jsRunningAt + JS_RUNNING_SETTLE_MS) : stabilityDeadline;
|
|
3734
|
+
}
|
|
3735
|
+
function jsRunningFields(jsRunningAt) {
|
|
3736
|
+
return jsRunningAt === null ? {} : { jsRunning: true };
|
|
3737
|
+
}
|
|
3717
3738
|
function expoBundleLine(msg) {
|
|
3718
3739
|
return /\bBundl(?:ing|ed)\b/.test(msg);
|
|
3719
3740
|
}
|
|
@@ -3729,7 +3750,20 @@ async function nativeLaunchFailure({ readCrashes, since, platform, processAlive,
|
|
|
3729
3750
|
waitedMs
|
|
3730
3751
|
} : null;
|
|
3731
3752
|
}
|
|
3732
|
-
|
|
3753
|
+
function manifestDeadline(records, { startedAt, timeoutMs }) {
|
|
3754
|
+
const base = startedAt + timeoutMs;
|
|
3755
|
+
const open = /* @__PURE__ */ new Set();
|
|
3756
|
+
let servedAt = null;
|
|
3757
|
+
for (const record of records.toSorted((a, b) => Number(a.ts) - Number(b.ts))) if (record.event === "manifest_request_started") open.add(record.requestId);
|
|
3758
|
+
else {
|
|
3759
|
+
open.delete(record.requestId);
|
|
3760
|
+
if (record.event === "manifest_request_finished") servedAt = Number(record.ts);
|
|
3761
|
+
}
|
|
3762
|
+
const cap = startedAt + Math.max(timeoutMs, MANIFEST_VERIFY_TIMEOUT_MS);
|
|
3763
|
+
if (open.size > 0) return cap;
|
|
3764
|
+
return servedAt === null ? base : Math.min(cap, Math.max(base, servedAt + MANIFEST_GRACE_MS));
|
|
3765
|
+
}
|
|
3766
|
+
async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metroPort = null, platform = null, mode = null, requireBundleResponse, timeoutMs = VERIFY_TIMEOUT_MS, stabilityMs = STABILITY_WINDOW_MS, pollMs = VERIFY_POLL_MS, readRecords = null, readDeviceRecords = null, readClientRecords = null, readNativeCrashes = null, processAlive = null, onReadinessPending = null, onActivity, deviceLogsThrough, now = Date.now, sleep = (ms) => new Promise((r) => setTimeout(r, ms)) } = {}) {
|
|
3733
3767
|
const delivered = (record) => deliveryOwner(record, {
|
|
3734
3768
|
slot,
|
|
3735
3769
|
appPid,
|
|
@@ -3738,8 +3772,13 @@ async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metr
|
|
|
3738
3772
|
const read = readRecords || (() => readMetroRecords(logsDir));
|
|
3739
3773
|
const readDevice = readDeviceRecords || (() => readNdjson(logsDir, "device.ndjson"));
|
|
3740
3774
|
const readClient = readClientRecords || (() => readNdjson(logsDir, "client.ndjson"));
|
|
3775
|
+
const deviceNow = () => {
|
|
3776
|
+
const at = now();
|
|
3777
|
+
return deviceLogsThrough ? Math.max(Math.min(at, deviceLogsThrough() ?? -Infinity), at - DEVICE_LOG_LAG_LIMIT_MS) : at;
|
|
3778
|
+
};
|
|
3741
3779
|
const startedAt = now();
|
|
3742
|
-
const
|
|
3780
|
+
const baseTimeoutMs = Math.max(0, timeoutMs);
|
|
3781
|
+
let bundleDeadline = startedAt + baseTimeoutMs;
|
|
3743
3782
|
let proof = null;
|
|
3744
3783
|
let activity = null;
|
|
3745
3784
|
let stabilityDeadline = null;
|
|
@@ -3760,6 +3799,10 @@ async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metr
|
|
|
3760
3799
|
const bundleRecords = metroRecords.filter((record) => (!requireBundleResponse || String(record.event).startsWith("bundle_response_")) && delivered(record));
|
|
3761
3800
|
const deviceRecords = readDevice().filter((record) => after(record, since) && (slot === void 0 || (record.slot ?? "default") === slot));
|
|
3762
3801
|
const clientRecords = readClient().filter((record) => after(record, since) && !platformShared);
|
|
3802
|
+
bundleDeadline = manifestDeadline(metroRecords.filter((record) => String(record.event).startsWith("manifest_request_") && (!platform || record.platform === platform)), {
|
|
3803
|
+
startedAt,
|
|
3804
|
+
timeoutMs: baseTimeoutMs
|
|
3805
|
+
});
|
|
3763
3806
|
if (now() >= nextCrashCheck) {
|
|
3764
3807
|
nextCrashCheck = now() + 2e3;
|
|
3765
3808
|
const crash = await nativeLaunchFailure({
|
|
@@ -3801,6 +3844,8 @@ async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metr
|
|
|
3801
3844
|
const runtimeWaiting = runtimeLoadingAt !== null && runtimeStartedAt === null;
|
|
3802
3845
|
const completedAt = proof ? Math.max(Number(proof.ts), runtimeStartedAt ?? 0) : null;
|
|
3803
3846
|
if (completedAt !== null) stabilityDeadline = completedAt + Math.max(0, stabilityMs);
|
|
3847
|
+
const jsRunningAt = jsRunningSince(signals, completedAt, runtimeWaiting, platform);
|
|
3848
|
+
const windowEnd = settledWindowEnd(stabilityDeadline, jsRunningAt);
|
|
3804
3849
|
const readinessDeadline = completedAt !== null ? completedAt + APP_READINESS_TIMEOUT_MS : bundleDeadline;
|
|
3805
3850
|
if (pendingAt === null) {
|
|
3806
3851
|
const pending = signals.find((record) => appReadinessSignal(record, platform) === "pending" && (runtimeWaiting || stabilityDeadline === null || Number(record.ts) <= stabilityDeadline));
|
|
@@ -3827,7 +3872,7 @@ async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metr
|
|
|
3827
3872
|
...pendingAt !== null ? { readiness: "error" } : {}
|
|
3828
3873
|
};
|
|
3829
3874
|
}
|
|
3830
|
-
if (proof &&
|
|
3875
|
+
if (proof && windowEnd !== null && (pendingAt !== null || deviceNow() >= windowEnd)) {
|
|
3831
3876
|
const errorSince = pendingAt === null ? Number(proof.ts ?? since ?? 0) : Number(since ?? 0);
|
|
3832
3877
|
const errors = [
|
|
3833
3878
|
...metroRecords.filter((record) => after(record, errorSince) && recordCouldBelongToPlatform(record, platform)),
|
|
@@ -3848,14 +3893,15 @@ async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metr
|
|
|
3848
3893
|
};
|
|
3849
3894
|
const actionableErrors = errors.filter((record) => !isIosConnectionRefusal(record, platform));
|
|
3850
3895
|
const appErrors = actionableErrors.some(isAppLaunchError);
|
|
3851
|
-
if (!runtimeWaiting && pendingAt === null || appErrors || ready ||
|
|
3896
|
+
if (!runtimeWaiting && pendingAt === null || appErrors || ready || deviceNow() >= readinessDeadline) return {
|
|
3852
3897
|
verified: true,
|
|
3853
3898
|
record: proof,
|
|
3854
3899
|
errors: actionableErrors,
|
|
3855
3900
|
processAlive: alive,
|
|
3856
3901
|
mode,
|
|
3857
3902
|
waitedMs,
|
|
3858
|
-
...pendingAt !== null ? { readiness: appErrors ? "error" : ready ? "ready" : "timed-out" } : {}
|
|
3903
|
+
...pendingAt !== null ? { readiness: appErrors ? "error" : ready ? "ready" : "timed-out" } : {},
|
|
3904
|
+
...jsRunningFields(jsRunningAt)
|
|
3859
3905
|
};
|
|
3860
3906
|
}
|
|
3861
3907
|
if ((!proof || runtimeWaiting) && now() >= bundleDeadline) return await bundleTimeoutOutcome({
|
|
@@ -3871,7 +3917,7 @@ async function verifyLaunch({ slot, appPid, platformShared, logsDir, since, metr
|
|
|
3871
3917
|
mode,
|
|
3872
3918
|
waitedMs: now() - startedAt
|
|
3873
3919
|
});
|
|
3874
|
-
await sleep(Math.min(pollMs, Math.max(0, (runtimeWaiting ? bundleDeadline : proof && pendingAt !== null ? readinessDeadline :
|
|
3920
|
+
await sleep(Math.min(pollMs, Math.max(0, (runtimeWaiting ? bundleDeadline : proof && pendingAt !== null ? readinessDeadline : windowEnd ?? bundleDeadline) - deviceNow())));
|
|
3875
3921
|
}
|
|
3876
3922
|
}
|
|
3877
3923
|
function launchActivity(pendingAt, proof, bundling) {
|
|
@@ -8512,6 +8558,152 @@ async function shutDownIdleDevices(devices, idleMs, recollect, { log, record } =
|
|
|
8512
8558
|
};
|
|
8513
8559
|
}
|
|
8514
8560
|
//#endregion
|
|
8561
|
+
//#region src/maintenance/log.ts
|
|
8562
|
+
function openRetainedLog(file, settings) {
|
|
8563
|
+
ensurePrivateDir(dirname(file));
|
|
8564
|
+
const rotated = rotatedLogPath(file);
|
|
8565
|
+
withDirLock(`${file}.lock`, () => {
|
|
8566
|
+
try {
|
|
8567
|
+
if (Date.now() - statSync(rotated).mtimeMs > settings.logRetentionDays * 864e5) unlinkSync(rotated);
|
|
8568
|
+
} catch {}
|
|
8569
|
+
});
|
|
8570
|
+
return createNdjsonWriter(file, { maxBytes: settings.logMaxMb * 1024 ** 2 });
|
|
8571
|
+
}
|
|
8572
|
+
function maintenanceLogger(settings, pass, trigger) {
|
|
8573
|
+
const file = maintenanceNdjsonFile();
|
|
8574
|
+
const writer = openRetainedLog(file, settings);
|
|
8575
|
+
return {
|
|
8576
|
+
write(event, level, msg, fields = {}) {
|
|
8577
|
+
if (level === "debug" && !settings.logChecks) return null;
|
|
8578
|
+
const record = {
|
|
8579
|
+
...fields,
|
|
8580
|
+
ts: Date.now(),
|
|
8581
|
+
src: "maintenance",
|
|
8582
|
+
level,
|
|
8583
|
+
msg,
|
|
8584
|
+
event,
|
|
8585
|
+
pass,
|
|
8586
|
+
trigger,
|
|
8587
|
+
mode: settings.mode === "on" ? "on" : "report"
|
|
8588
|
+
};
|
|
8589
|
+
if (!writer.write(record)) throw writer.lastError ?? /* @__PURE__ */ new Error(`Could not append ${file}`);
|
|
8590
|
+
if (typeof fields.workspace === "string" && [
|
|
8591
|
+
"maintenance_action",
|
|
8592
|
+
"maintenance_failure",
|
|
8593
|
+
"maintenance_skip"
|
|
8594
|
+
].includes(event)) {
|
|
8595
|
+
const workspace = createNdjsonWriter(join(workspaceLogsDir(fields.workspace), MAINTENANCE_LOG_NAME), { maxBytes: LOG_ROTATE_BYTES });
|
|
8596
|
+
try {
|
|
8597
|
+
if (!workspace.write(record)) throw workspace.lastError ?? /* @__PURE__ */ new Error("Could not append workspace maintenance log");
|
|
8598
|
+
} finally {
|
|
8599
|
+
workspace.close();
|
|
8600
|
+
}
|
|
8601
|
+
}
|
|
8602
|
+
return record;
|
|
8603
|
+
},
|
|
8604
|
+
close: () => writer.close()
|
|
8605
|
+
};
|
|
8606
|
+
}
|
|
8607
|
+
//#endregion
|
|
8608
|
+
//#region src/commands/gc/log.ts
|
|
8609
|
+
const VERBS = {
|
|
8610
|
+
done: "Cleared",
|
|
8611
|
+
kept: "Kept",
|
|
8612
|
+
failed: "Failed to clear"
|
|
8613
|
+
};
|
|
8614
|
+
function gcLogRecord(run, result, ts) {
|
|
8615
|
+
const path = [result.id, result.label].find((value) => value !== null && isAbsolute(value)) ?? null;
|
|
8616
|
+
const size = result.bytes ? ` (${formatBytes(result.bytes)})` : "";
|
|
8617
|
+
const why = result.detail ? `: ${result.detail}` : "";
|
|
8618
|
+
return {
|
|
8619
|
+
ts,
|
|
8620
|
+
src: "gc",
|
|
8621
|
+
level: result.status === "failed" ? "error" : "info",
|
|
8622
|
+
msg: `${VERBS[result.status]} ${result.kind} ${result.label}${size}${why}`,
|
|
8623
|
+
event: "gc_item",
|
|
8624
|
+
runId: run.runId ?? runId(),
|
|
8625
|
+
trigger: run.trigger,
|
|
8626
|
+
...run.via === void 0 ? {} : { via: run.via },
|
|
8627
|
+
...run.options === void 0 ? {} : { options: run.options },
|
|
8628
|
+
kind: result.kind,
|
|
8629
|
+
status: result.status,
|
|
8630
|
+
label: result.label,
|
|
8631
|
+
id: result.id,
|
|
8632
|
+
path,
|
|
8633
|
+
bytes: result.bytes,
|
|
8634
|
+
detail: result.detail
|
|
8635
|
+
};
|
|
8636
|
+
}
|
|
8637
|
+
function openGcLog(run) {
|
|
8638
|
+
let failed = false;
|
|
8639
|
+
let acted = run.holdKept !== true;
|
|
8640
|
+
const held = [];
|
|
8641
|
+
const append = (record) => {
|
|
8642
|
+
try {
|
|
8643
|
+
const writer = openRetainedLog(gcLogFile(), resolveMaintenanceSettings(loadConfig$1(), run.env));
|
|
8644
|
+
try {
|
|
8645
|
+
if (!writer.write(record)) throw writer.lastError ?? /* @__PURE__ */ new Error("write failed");
|
|
8646
|
+
} finally {
|
|
8647
|
+
writer.close();
|
|
8648
|
+
}
|
|
8649
|
+
} catch (error) {
|
|
8650
|
+
if (failed) return;
|
|
8651
|
+
failed = true;
|
|
8652
|
+
console.error(`Could not write the gc log ${gcLogFile()}: ${error instanceof Error ? error.message : error}`);
|
|
8653
|
+
}
|
|
8654
|
+
};
|
|
8655
|
+
return { record(result) {
|
|
8656
|
+
const record = gcLogRecord(run, result, Date.now());
|
|
8657
|
+
if (!acted && result.status === "kept") {
|
|
8658
|
+
held.push(record);
|
|
8659
|
+
return;
|
|
8660
|
+
}
|
|
8661
|
+
if (!acted) {
|
|
8662
|
+
acted = true;
|
|
8663
|
+
for (const earlier of held.splice(0)) append(earlier);
|
|
8664
|
+
}
|
|
8665
|
+
append(record);
|
|
8666
|
+
} };
|
|
8667
|
+
}
|
|
8668
|
+
const MAINTENANCE_KINDS = {
|
|
8669
|
+
"clear-outputs": "workspaceOutputs",
|
|
8670
|
+
"trim-cache": "cache",
|
|
8671
|
+
"empty-cache": "cache",
|
|
8672
|
+
"unregister-cache": "cache",
|
|
8673
|
+
"remove-worktree": "worktree",
|
|
8674
|
+
"remove-orphan": "workspaceDirectory",
|
|
8675
|
+
"delete-parked-device": "parkedDevice",
|
|
8676
|
+
"delete-devices": "device",
|
|
8677
|
+
"stop-workspace": "device",
|
|
8678
|
+
"shutdown-device": "idleDevice",
|
|
8679
|
+
"delete-temp-leftovers": "tempLeftover",
|
|
8680
|
+
"stop-gradle-daemons": "gradleDaemon",
|
|
8681
|
+
"delete-gradle-version": "gradleVersion",
|
|
8682
|
+
"clear-build-dirs": "buildDirectory",
|
|
8683
|
+
"delete-dependencies": "dependencies"
|
|
8684
|
+
};
|
|
8685
|
+
function maintenanceItem(action, outcome) {
|
|
8686
|
+
const name = action.kind.replace(/^would-/, "");
|
|
8687
|
+
const done = outcome.status === "done";
|
|
8688
|
+
return {
|
|
8689
|
+
kind: MAINTENANCE_KINDS[name] ?? name,
|
|
8690
|
+
status: outcome.status,
|
|
8691
|
+
label: action.target,
|
|
8692
|
+
id: action.dir ?? action.workspace ?? null,
|
|
8693
|
+
bytes: done && outcome.bytes ? outcome.bytes : null,
|
|
8694
|
+
detail: done ? outcome.detail ? `${action.reason} (${outcome.detail})` : action.reason : outcome.detail
|
|
8695
|
+
};
|
|
8696
|
+
}
|
|
8697
|
+
function gcOptionsOf(opts) {
|
|
8698
|
+
return {
|
|
8699
|
+
...opts.delete ? { delete: true } : {},
|
|
8700
|
+
...opts.worktrees ? { worktrees: true } : {},
|
|
8701
|
+
...opts.olderThan === void 0 ? {} : { olderThan: opts.olderThan },
|
|
8702
|
+
...opts.cache === void 0 ? {} : { cache: opts.cache },
|
|
8703
|
+
...opts.idle === void 0 ? {} : { idleMs: opts.idle }
|
|
8704
|
+
};
|
|
8705
|
+
}
|
|
8706
|
+
//#endregion
|
|
8515
8707
|
//#region src/supervisor/stop-cause.ts
|
|
8516
8708
|
function requestDevServerStop(root, processToken, requester) {
|
|
8517
8709
|
if (!processToken) return;
|
|
@@ -8888,7 +9080,7 @@ function isOtherWorkspace(root) {
|
|
|
8888
9080
|
function deviceLabel(device) {
|
|
8889
9081
|
return `${device.kind} ${device.name} in ${device.project}`;
|
|
8890
9082
|
}
|
|
8891
|
-
async function reclaimIdleDevices({ root, dryRun, note, now, env, signal, operation }) {
|
|
9083
|
+
async function reclaimIdleDevices({ root, dryRun, note, record, now, env, signal, operation }) {
|
|
8892
9084
|
if (deviceSweepIsScoped(env)) {
|
|
8893
9085
|
note(chalk.dim(phaseLine("budget", "idle devices left alone: STIM_HOME scopes this config, devices are global")));
|
|
8894
9086
|
return {
|
|
@@ -8908,7 +9100,7 @@ async function reclaimIdleDevices({ root, dryRun, note, now, env, signal, operat
|
|
|
8908
9100
|
targets: idle.map(deviceLabel),
|
|
8909
9101
|
failures: 0
|
|
8910
9102
|
};
|
|
8911
|
-
const { failures, shutDown } = await shutDownIdleDevices(idle, 0, () => collect(Date.now()), stepOutput(note), signal, operation);
|
|
9103
|
+
const { failures, shutDown } = await shutDownIdleDevices(idle, 0, () => collect(Date.now()), stepOutput(note, record), signal, operation);
|
|
8912
9104
|
return {
|
|
8913
9105
|
targets: shutDown.map(deviceLabel),
|
|
8914
9106
|
failures
|
|
@@ -8919,7 +9111,7 @@ function idleSince(path, now) {
|
|
|
8919
9111
|
const at = Date.parse(activity.lastActivityAt ?? "");
|
|
8920
9112
|
return activity.state === "idle" && Number.isFinite(at) ? at : null;
|
|
8921
9113
|
}
|
|
8922
|
-
async function reclaimIdleDevServers({ root, dryRun, note, now, env, signal, operation }) {
|
|
9114
|
+
async function reclaimIdleDevServers({ root, dryRun, note, record, now, env, signal, operation }) {
|
|
8923
9115
|
const config = loadConfig$1();
|
|
8924
9116
|
const other = isOtherWorkspace(root);
|
|
8925
9117
|
const serving = Object.entries(config?.projects ?? {}).flatMap(([path, project]) => {
|
|
@@ -8988,22 +9180,27 @@ async function reclaimIdleDevServers({ root, dryRun, note, now, env, signal, ope
|
|
|
8988
9180
|
signal?.throwIfAborted();
|
|
8989
9181
|
failures++;
|
|
8990
9182
|
note(chalk.red(`Could not stop the dev server of ${path}: ${error?.message || error}`));
|
|
9183
|
+
record?.("devServer", "failed", path, { detail: error instanceof Error ? error.message : String(error) });
|
|
8991
9184
|
continue;
|
|
8992
9185
|
}
|
|
8993
9186
|
if (!run.ran) {
|
|
8994
9187
|
note(chalk.yellow(`Kept the dev server of ${path}: ${run.reasons.join("; ")}`));
|
|
9188
|
+
record?.("devServer", "kept", path, { detail: run.reasons.join("; ") });
|
|
8995
9189
|
continue;
|
|
8996
9190
|
}
|
|
8997
9191
|
const stopped = run.value;
|
|
8998
9192
|
if (stopped === "busy" || stopped === "starting") {
|
|
8999
9193
|
const why = stopped === "busy" ? "it is no longer idle" : "a stim start holds its metro-start lock";
|
|
9000
9194
|
note(chalk.dim(`Kept the dev server of ${path}: ${why}`));
|
|
9195
|
+
record?.("devServer", "kept", path, { detail: why });
|
|
9001
9196
|
} else if (stopped.status === "stopped") {
|
|
9002
9197
|
targets.push(path);
|
|
9003
9198
|
note(chalk.green(`Stopped the idle dev server of ${path}`));
|
|
9199
|
+
record?.("devServer", "done", path);
|
|
9004
9200
|
} else if ("reason" in stopped) {
|
|
9005
9201
|
if (stopped.status === "stuck") failures++;
|
|
9006
9202
|
note(chalk.yellow(`Kept the dev server of ${path}: ${stopped.reason}`));
|
|
9203
|
+
record?.("devServer", stopped.status === "stuck" ? "failed" : "kept", path, { detail: stopped.reason });
|
|
9007
9204
|
}
|
|
9008
9205
|
}
|
|
9009
9206
|
return {
|
|
@@ -9011,7 +9208,7 @@ async function reclaimIdleDevServers({ root, dryRun, note, now, env, signal, ope
|
|
|
9011
9208
|
failures
|
|
9012
9209
|
};
|
|
9013
9210
|
}
|
|
9014
|
-
async function reclaimWorkspaceOutputs({ root, dryRun, now, note, diskRecovered, signal, operation }) {
|
|
9211
|
+
async function reclaimWorkspaceOutputs({ root, dryRun, now, note, record, diskRecovered, signal, operation }) {
|
|
9015
9212
|
const other = isOtherWorkspace(root);
|
|
9016
9213
|
const report = await collectWorkspaceOutputs({
|
|
9017
9214
|
olderThan: null,
|
|
@@ -9043,7 +9240,7 @@ async function reclaimWorkspaceOutputs({ root, dryRun, now, note, diskRecovered,
|
|
|
9043
9240
|
now,
|
|
9044
9241
|
signal,
|
|
9045
9242
|
operation
|
|
9046
|
-
}, stepOutput(note));
|
|
9243
|
+
}, stepOutput(note, record));
|
|
9047
9244
|
failures += result.failures;
|
|
9048
9245
|
targets.push(...result.cleared);
|
|
9049
9246
|
if (await diskRecovered()) break;
|
|
@@ -9059,23 +9256,23 @@ function cacheLabel(cache) {
|
|
|
9059
9256
|
function trimmableCaches(env = process.env, cwd) {
|
|
9060
9257
|
return planCacheEmptying(discoverCaches(env, cwd), false, env).filter((cache) => cache.prune !== "report-only" && cache.prune !== "atomic" && !cache.machineGlobal);
|
|
9061
9258
|
}
|
|
9062
|
-
async function reclaimStaleCacheEntries({ dryRun, note, env, cwd, signal }) {
|
|
9259
|
+
async function reclaimStaleCacheEntries({ dryRun, note, record, env, cwd, signal }) {
|
|
9063
9260
|
const caches = trimmableCaches(env, cwd);
|
|
9064
9261
|
if (dryRun) return {
|
|
9065
9262
|
targets: caches.map(cacheLabel),
|
|
9066
9263
|
failures: 0
|
|
9067
9264
|
};
|
|
9068
|
-
const { trimmed, failures } = await trimCaches(caches, 14, stepOutput(note), signal);
|
|
9265
|
+
const { trimmed, failures } = await trimCaches(caches, 14, stepOutput(note, record), signal);
|
|
9069
9266
|
return {
|
|
9070
9267
|
targets: trimmed.map(cacheLabel),
|
|
9071
9268
|
failures
|
|
9072
9269
|
};
|
|
9073
9270
|
}
|
|
9074
|
-
function stepOutput(note) {
|
|
9271
|
+
function stepOutput(note, record = () => {}) {
|
|
9075
9272
|
return {
|
|
9076
9273
|
log: note,
|
|
9077
9274
|
error: note,
|
|
9078
|
-
record
|
|
9275
|
+
record,
|
|
9079
9276
|
fail: () => {}
|
|
9080
9277
|
};
|
|
9081
9278
|
}
|
|
@@ -9175,6 +9372,12 @@ async function enforceBudget({ root, note, dryRun = false, budget: resolved, env
|
|
|
9175
9372
|
const reclaimed = [];
|
|
9176
9373
|
const plan = reclaimPlan(short);
|
|
9177
9374
|
if (plan.length) note(chalk.yellow(phaseLine("budget", `${describeShortfall(budget, measure, short).join("; ")}; ${dryRun ? "would reclaim" : "reclaiming"}`)));
|
|
9375
|
+
const gcLog = dryRun ? null : openGcLog({
|
|
9376
|
+
trigger: "budget",
|
|
9377
|
+
holdKept: true,
|
|
9378
|
+
env
|
|
9379
|
+
});
|
|
9380
|
+
const gcResults = gcLog && createGcResults(gcLog.record);
|
|
9178
9381
|
for (const step of plan) {
|
|
9179
9382
|
signal?.throwIfAborted();
|
|
9180
9383
|
if (!dryRun && (!overBudget(short) || DISK_ONLY.includes(step) && short.disk.length === 0)) break;
|
|
@@ -9185,6 +9388,7 @@ async function enforceBudget({ root, note, dryRun = false, budget: resolved, env
|
|
|
9185
9388
|
env,
|
|
9186
9389
|
dryRun,
|
|
9187
9390
|
note,
|
|
9391
|
+
record: gcResults?.record,
|
|
9188
9392
|
now: deps.now(),
|
|
9189
9393
|
diskRecovered: async () => budgetShortfalls(budget, {
|
|
9190
9394
|
volumes: await (deps.volumesAsync?.(paths) ?? deps.volumes(paths)),
|
|
@@ -9343,4 +9547,4 @@ function budgetLine(report) {
|
|
|
9343
9547
|
return `${report.volumes.length ? `${report.volumes.map((v) => `${v.freeGb} GB free on ${v.volume}`).join(", ")} (reclaims below ${Math.max(budget.minFreeDiskGb, budget.hardFloorDiskGb)} GB, ${budget.hardFloorDiskGb ? `refuses below ${budget.hardFloorDiskGb} GB` : "never refuses"})` : "disk budget off"}; ${report.memory ? `roughly ${report.memory.committedGb} GB of a ${budget.maxCommittedMemoryGb} GB memory budget committed` : "memory budget off"}`;
|
|
9344
9548
|
}
|
|
9345
9549
|
//#endregion
|
|
9346
|
-
export {
|
|
9550
|
+
export { recordCapacityWait as $, readProjectConfig as $n, LAUNCH_BUNDLING as $t, collectOwnedDeviceActivityAsync as A, launchAndroidApp as An, describeUnverifiableDevices as At, bundlingActivity as B, gateMetroOrigin as Bn, describeError as Bt, gcOptionsOf as C, deviceShellArg as Cn, stopIdleGradleDaemons as Cr, collectDeviceLeases as Ct, collectIdleDevices as D, installConflictKind as Dn, discoverCaches as Dr, deleteParkedSims as Dt, maintenanceLogger as E, installAndroidApp as En, readFootprints as Er, deleteParkedAvds as Et, ACTIVE_BUILD_KEY as F, writeDebugHttpHost as Fn, findStaleProjectDevices as Ft, runFailureRecord as G, UPLOAD_TIMEOUT_MS as Gn, endRecordedSession as Gt, parseActiveBuild as H, processContext as Hn, REMOTE_SESSION_ERROR as Ht, NO_BUILD_PROGRESS as I, pickDevClientScheme as In, unverifiedDeviceCommand as It, thrownRunFailureRecord as J, easAuthNote as Jn, readInstalledEasCliVersionAsync as Jt, startBuildProgress as K, cacheLevel as Kn, ensureMetroReachable as Kt, activeBuildState as L, readBundleSchemes as Ln, withAndroidAvdSizes as Lt, parseIdleDuration as M, launchIosApp as Mn, eraseParkedDevices as Mt, shutDownIdleDevices as N, restartedAppNote as Nn, findOrphanedDevices as Nt, collectIdleDevicesAsync as O, installIosApp as On, pruneCache as Or, deleteProjectDevices as Ot, workspaceBuildInProgress as P, reverseMetroPorts as Pn, findStaleDeviceRecords as Pt, recordCapacityRefusal as Q, providerFromConfig as Qn, withEasProjectLock as Qt, buildReport as R, schemesFromInfoPlist as Rn, collectEasSessionSweep as Rt, withdrawDevServerStopRequest as S, devClientUrl as Sn, scopedMemoryReport as Sr, DEVICE_LIST_TIMEOUT_MS$1 as St, openGcLog as T, hasMetroReverse as Tn, attributeMachineUsage as Tr, collectParkedSims as Tt, recordBuildPhase as U, runProcessOperation as Un, binOnPath as Ut, estimateBuild as V, exitAfterFlush as Vn, withRemoteSessionGcLocks as Vt, recordFinishedBuild as W, RESOLVE_TIMEOUT_MS as Wn, bundleEntryPoint as Wt, readRunEstimates as X, loadProjectProvider as Xn, remoteIosDeps as Xt, createRunRecorder as Y, isEasAuthFailureText as Yn, remoteAndroidDeps as Yt, readStats$1 as Z, ownerFromConfig as Zn, resolveRemoteContext as Zt, devServerStopRecord as _, IOS_DEV_MENU_OFF_DEFAULTS_PLIST as _n, memoryLines as _r, gradleVersionsPending as _t, inspectBudget as a, isBundleProof as an, remoteCommand as ar, includesRecordings as at, requestDevServerStop as b, appProcessFromPid as bn, memoryWorkPending as br, getMachineCacheReport as bt, readVolumeSpace as c, unattributedLaunchLines as cn, easCliSupport as cr, planCacheEmptying as ct, trimmableCaches as d, verifyLaunch as dn, parseArchiveSelector as dr, selectsBeyondCaches as dt, LAUNCH_FATAL as en, resolveEasCliBin as er, recordRunStats as et, stopOwnedMetro as f, verifyReleaseLaunch as fn, GRADLE_DAEMONS_KIND as fr, trimCaches as ft, devServerStopLevel as g, INSTALL_ERROR as gn, memoryCacheKind as gr, gradleVersionLines as gt, describeMetroLastStop as h, DEFAULT_METRO_PORT as hn, inspectWatchmanMemory as hr, deleteGradleVersions as ht, enforceBudget as i, VERIFY_TIMEOUT_MS as in, remoteCliInvocation as ir, includesParkedDevices as it, idleDeviceLines as j, launchAndroidReleaseApp as jn, deviceSweepIsScoped as jt, collectOwnedDeviceActivity as k, iosAppProcess as kn, sizeCaches as kr, describeParkedSims as kt, readVolumeSpaceAsync as l, unverifiedLaunchLines as ln, easCliUpgradeRemedy as lr, previewScopedEmptying as lt, describeDevServerStop as m, ADB_INSTALL_TIMEOUT_MS as mn, collectMemoryReport as mr, deleteGradleVersion as mt, budgetLine as n, MANIFEST_VERIFY_TIMEOUT_MS as nn, uploadRemote as nr, emptyCaches as nt, machineNumber as o, readCollectorRecords as on, MIN_EAS_CLI_DEVICE_VERSION as or, includesWorkspaceOutputs as ot, stopOwnedMetroForReset as p, APP_READINESS_TIMEOUT_MS as pn, WATCHMAN_KIND as pr, collectGradleVersions as pt, tapBuildLog as q, checkEasAuth as qn, ensureRemoteBootOwned as qt, cacheLabel as r, RELEASE_VERIFY_WAIT_MS as rn, bundleInvocation as rr, includesArchives as rt, peekBudget as s, readMetroRecords as sn, MIN_EAS_CLI_SIMULATOR_VERSION as sr, isWorkspacesScope as st, budgetGate as t, LAUNCH_UNVERIFIED as tn, resolveRemote as tr, statsProjectKey$1 as tt, resolveBudget as u, verifyAndroidReleaseLaunch as un, ownedSessionName as ur, selectCaches as ut, logVanishedSupervisor as v, androidAppProcess as vn, memoryScope as vr, includesGradleVersions as vt, maintenanceItem as w, ensureMetroReverse as wn, phase as wr, collectParkedAvds as wt, vanishedSupervisorMessage as x, clearOtherUserApps as xn, reclaimMemory as xr, collectInventory as xt, metroLastStop as y, androidDevClientUrl as yn, memorySweepIsScoped as yr, waitForGradleExit as yt, buildStatusLine as z, readRemoteSimulatorArch as zn, deleteEasSessions as zt };
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { c as throwIfCancelled, s as cancelledError, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { E as upsertProject, O as withConfigLockAsync, p as getProject, u as getConcurrencyLimits } from "./config-
|
|
4
|
-
import { l as phaseLine } from "./command-output-
|
|
5
|
-
import { a as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { k as hostSystemImageArch } from "./android-882m4hxX.mjs";
|
|
2
|
+
import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir } from "./workspace-state-pUg3_RRA.mjs";
|
|
3
|
+
import { E as upsertProject, O as withConfigLockAsync, p as getProject, u as getConcurrencyLimits } from "./config-BktkY_zC.mjs";
|
|
4
|
+
import { l as phaseLine } from "./command-output-BF5AR2dL.mjs";
|
|
5
|
+
import { K as resolveCacheProviderConfig, Y as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-CosW5X-S.mjs";
|
|
6
|
+
import { f as projectRegistry, v as detectIsExpo } from "./project-BUu6Is4k.mjs";
|
|
7
|
+
import { s as workspaceShareURL } from "./stim-desktop-6Dqp-gjX.mjs";
|
|
8
|
+
import { k as hostSystemImageArch } from "./android-DTAcRwBC.mjs";
|
|
10
9
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-
|
|
13
|
-
import { L as acquireBuildSlot, z as releaseBuildSlot } from "./workspaces-
|
|
14
|
-
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-
|
|
15
|
-
import {
|
|
16
|
-
import { m as listIosRuntimes } from "./ios-
|
|
17
|
-
import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-
|
|
18
|
-
import {
|
|
19
|
-
import { S as setRemoteLogSink } from "./client-
|
|
20
|
-
import {
|
|
21
|
-
import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { a as
|
|
26
|
-
import {
|
|
10
|
+
import { K as startBuildProgress, W as recordFinishedBuild, X as readRunEstimates, Y as createRunRecorder, et as recordRunStats, nr as uploadRemote, q as tapBuildLog, qn as checkEasAuth, tr as resolveRemote, tt as statsProjectKey } from "./budget-k2mZGvvk.mjs";
|
|
11
|
+
import { d as runCancellationSignal, f as withNativeBuildRun } from "./native-run-BfIDFKLH.mjs";
|
|
12
|
+
import { L as acquireBuildSlot, z as releaseBuildSlot } from "./workspaces-g2lhdBXF.mjs";
|
|
13
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-Lnb_EoRY.mjs";
|
|
14
|
+
import { b as providerUploadOutcome, w as storedAppId } from "./build-cache-DrXNCy3T.mjs";
|
|
15
|
+
import { m as listIosRuntimes } from "./ios-WxpDJ5T1.mjs";
|
|
16
|
+
import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
|
|
17
|
+
import { V as readBundleId } from "./toolchain-J4J8MrAr.mjs";
|
|
18
|
+
import { S as setRemoteLogSink } from "./client-D9CaRks-.mjs";
|
|
19
|
+
import { l as resolveBuildPlacement } from "./selection-BNPBZ6T5.mjs";
|
|
20
|
+
import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-CVOCp0Ft.mjs";
|
|
21
|
+
import { f as settleFingerprintCheck } from "./prebuild-gmouvmJZ.mjs";
|
|
22
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-Dq3RBcON.mjs";
|
|
23
|
+
import { t as acquireAndroidArtifact } from "./artifact-BxREhAaV.mjs";
|
|
24
|
+
import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-7F5hEwQJ.mjs";
|
|
25
|
+
import { a as lastBuildRecord } from "./ios-project-Ty5pHl9O.mjs";
|
|
26
|
+
import { t as acquireIosArtifact } from "./artifact-CsAP6AGK.mjs";
|
|
27
27
|
import { constants, promises } from "node:fs";
|
|
28
28
|
import { basename, join } from "node:path";
|
|
29
29
|
import { hostSimulatorArch } from "@stim-cli/core";
|
|
30
|
+
import chalk from "chalk";
|
|
30
31
|
import { loadCacheProvider } from "@stim-cli/cache";
|
|
31
32
|
//#region src/commands/android/build.ts
|
|
32
33
|
async function buildAndroidOperation(context, root, options, { artifactScope, cachePolicy } = {}) {
|
|
@@ -182,6 +183,7 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
|
|
|
182
183
|
resolveRemoteBuild: resolveRemote,
|
|
183
184
|
uploadRemoteBuild: uploadRemote,
|
|
184
185
|
loadCacheProviderModule: loadCacheProvider,
|
|
186
|
+
storedAppId,
|
|
185
187
|
acquireSlot: acquireBuildSlot,
|
|
186
188
|
releaseSlot: releaseBuildSlot,
|
|
187
189
|
now: Date.now
|
|
@@ -199,6 +201,7 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
|
|
|
199
201
|
await finishAndroidUpload(artifact.uploadPending, artifact.remote, phase);
|
|
200
202
|
const uploaded = providerUploadOutcome(artifact.providerUpload ? await artifact.providerUpload : null, artifact.providerName, context.env);
|
|
201
203
|
if (uploaded) phase("cache", uploaded.line);
|
|
204
|
+
await settleFingerprintCheck(artifact.fingerprintCheck, "android", (line) => phase("fingerprint", chalk.yellow(line)), (entry) => writer.write(entry));
|
|
202
205
|
const links = { workspace: await workspaceShareURL(root, { platform: "android" }, runCancellationSignal(context) ?? context.signal) };
|
|
203
206
|
throwIfCancelled(runCancellationSignal(context), "Android build");
|
|
204
207
|
record.appPath = apkPath;
|
|
@@ -481,6 +484,7 @@ async function buildIosOperation(context, root, options) {
|
|
|
481
484
|
});
|
|
482
485
|
throw failure;
|
|
483
486
|
} finally {
|
|
487
|
+
artifact?.cancelFingerprintCheck();
|
|
484
488
|
await artifact?.release();
|
|
485
489
|
failureAfterCleanup = built && runCancellationSignal(context)?.aborted ? cancelledError("iOS build") : null;
|
|
486
490
|
if (failureAfterCleanup) {
|