stim 1.26.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acquire-artifact-DVsvSwf7.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-C-BqJEpu.mjs → act-ROviTF_t.mjs} +297 -122
- package/dist/{activity-Lnb_EoRY.mjs → activity-Cd-ysFes.mjs} +6 -6
- package/dist/{agent-device-usage-output-DbXy5tg8.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CSbLRD53.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-CiNQw3kq.mjs → android-Cd6w7_qw.mjs} +96 -43
- package/dist/{android-B5P81yI-.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-DTAcRwBC.mjs → android-DriNoAVy.mjs} +23 -18
- package/dist/{android-cas-BTVhZ0Qs.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api.d.mts +13 -3
- package/dist/api.mjs +39 -29
- package/dist/{apk-signed-tail-B46U9hXc.mjs → apk-signed-tail-BHQHx3Rm.mjs} +2 -2
- package/dist/{artifact-BxREhAaV.mjs → artifact-0AGJYB9O.mjs} +18 -23
- package/dist/{artifact-CsAP6AGK.mjs → artifact-faemIZv5.mjs} +19 -24
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-rYPyqhTf.mjs → browser-web-slD8AvLp.mjs} +16 -16
- package/dist/{build-cache-DrXNCy3T.mjs → build-cache-gBJ-WKzA.mjs} +43 -21
- package/dist/{build-DPhApsjV.mjs → build-hS0QyFlQ.mjs} +35 -31
- package/dist/{build-plan-DrMMdayj.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BEZ9Bpl1.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-k2mZGvvk.mjs → ccache-BWTze1Ls.mjs} +560 -1603
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-BBKFGOFl.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-D9CaRks-.mjs → client-xsdxrhWA.mjs} +48 -62
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BF5AR2dL.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BktkY_zC.mjs → config-Cn94Jc0g.mjs} +23 -4
- package/dist/{dependencies-Dw6wfQdv.mjs → dependencies-BGokZ-Ng.mjs} +108 -60
- package/dist/{dependency-state-DFB41vfr.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-DXR_tPVY.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-BcYeHSFu.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-DCSvUF0l.mjs → device-capacity-6LP7QsaA.mjs} +101 -16
- package/dist/device-host-worker.mjs +19 -19
- package/dist/{device-ios-BLGfXQeK.mjs → device-ios-534c14fz.mjs} +251 -23
- package/dist/{device-lease-run-BmvIl7bI.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-Dluix4H3.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-BK-zwyd_.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-Cp-BhzTS.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-Bhg1ii70.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-OnwP94ne.mjs → doctor-F-3VUUyN.mjs} +76 -32
- package/dist/{doctor-fingerprint-D3a04Mhu.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BStK05nt.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-Dsj93iM9.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-B5vygTiD.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-BOOm9Db7.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-C_79zvz4.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-ldgr-hXU.mjs → gc-CGZ1Yg88.mjs} +160 -45
- package/dist/{guide-D7K0X6KG.mjs → guide-_rfEh_zM.mjs} +580 -183
- package/dist/{hosted-android-Bk54ej6n.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-fHO8yqzc.mjs → hosted-client-D7Pk_Oo1.mjs} +12 -8
- package/dist/{hosted-logs-BfbmDM4M.mjs → hosted-logs-B1gqQuva.mjs} +8 -8
- package/dist/{hosted-logs-sync-B0pvmOk-.mjs → hosted-logs-sync-Dg3qrZmV.mjs} +5 -5
- package/dist/{hosted-macos-CPl0OZ9h.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-CpDB3-PO.mjs → hosted-native-CdgaiuyP.mjs} +17 -16
- package/dist/{idle-shutdown-FfxL1KdG.mjs → idle-shutdown-Cbvo5KEh.mjs} +7 -8
- package/dist/{ios-ftxdQbJS.mjs → ios-B5HlVMhQ.mjs} +92 -37
- package/dist/{ios-B7-lToDu.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-WxpDJ5T1.mjs → ios-E26qSpkb.mjs} +27 -11
- package/dist/{ios-device-CsyryvpT.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-Ty5pHl9O.mjs → ios-project-D8Jcy_br.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-Cw7-WQf2.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-BMhXYVDS.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-DOp8RjDz.mjs → launch-CRyBeNsA.mjs} +42 -38
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-dQDki6Tt.mjs → logs-CC_-ZzEE.mjs} +7 -7
- package/dist/{logs-s1dRIG1E.mjs → logs-aJQb-RDg.mjs} +46 -21
- package/dist/{macos-B0VEV3Gf.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-DBBPNnIA.mjs → macos-DlCBhMw5.mjs} +73 -38
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-CjC10t6E.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-B6_PgD0L.mjs → metro-gateway-BnHdqMO_.mjs} +3 -3
- package/dist/{named-ports-BG0j1X4g.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-CL2NGiik.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-btSUulme.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-Dq3RBcON.mjs → native-runtime-DqaIBO5w.mjs} +9 -8
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-BW7H8JGu.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-CBXJAxfC.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -17
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.mjs +23 -24
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-BjYvMNX_.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-lmj6kcPm.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DIFPQAXp.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-IiiSQhtz.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-C2_w1Z0Z.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/{prebuild-gmouvmJZ.mjs → prebuild-BDpToDgR.mjs} +16 -17
- package/dist/{project-BUu6Is4k.mjs → project-DYj-HVx6.mjs} +17 -17
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-Cgg99REN.mjs → react-native-android-DDBccgJw.mjs} +32 -26
- package/dist/{react-native-build-oNwqF5Wb.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BhA3KUte.mjs → react-native-doctor-B-Mw6DcR.mjs} +6 -6
- package/dist/{react-native-ios-B-nf4rjN.mjs → react-native-ios-DjYwUF9U.mjs} +23 -17
- package/dist/{recordings-BldzVKq0.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-C9OduiNc.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-CCR7KC_l.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-C8S7FlPF.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-7F5hEwQJ.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BqB0v3pt.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-BNPBZ6T5.mjs → selection-Bs8phwhN.mjs} +37 -29
- package/dist/{server-bare-A75rDIdD.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CssKFOD7.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-eQfOdydb.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-CosW5X-S.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-OaGQF-ri.mjs → settings-CMHhQNwI.mjs} +24 -3
- package/dist/settings-payload-cm60Zhib.mjs +257 -0
- package/dist/settings-write-BdNRLlBn.mjs +185 -0
- package/dist/settings.schema.json +51 -33
- package/dist/{simslim-Bax1qcxu.mjs → simslim-DCQwzoPy.mjs} +2 -2
- package/dist/{slot-launch-CYCEhfBY.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-jKQ7CP_B.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C_wefNKB.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-_BdJ32cZ.mjs → start-DrPwER_2.mjs} +27 -22
- package/dist/{state-C1i2nMOP.mjs → state-BX1y5syV.mjs} +4 -4
- package/dist/{state-C4OdpOTF.mjs → state-CZxLyetD.mjs} +2 -2
- package/dist/{stats-tEpEEH-u.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-CRXz-Gtj.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-DQrqodLj.mjs → status-BfnK9pUd.mjs} +25 -25
- package/dist/{status-B9M7x4CZ.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-B5wDIH_o.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-6Dqp-gjX.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-ySNQHXMG.mjs → stop-CH79S3IZ.mjs} +5 -5
- package/dist/{stop-DRqQVqDJ.mjs → stop-D-EAr25B.mjs} +21 -20
- package/dist/{stop-CmdNhGlC.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.mjs +17 -17
- package/dist/{support-CVOCp0Ft.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-BGSCBoib.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-CfUzt_0Z.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-x6HPpl_2.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/{toolchain-J4J8MrAr.mjs → toolchain-CbCG6C5Z.mjs} +321 -15
- package/dist/{toolchain-DoavrvIA.mjs → toolchain-JYAOquPg.mjs} +1 -1
- package/dist/{trigger-KVaWWNyn.mjs → trigger-DMou-X7j.mjs} +2 -2
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-DvhTX_eu.mjs → warm-progress-C0RsbngN.mjs} +731 -727
- package/dist/{web-Bihbf7-u.mjs → web-Cq_AQ4DK.mjs} +9 -9
- package/dist/web-Je6abcpz.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-pUg3_RRA.mjs → workspace-state-BjqdjnJR.mjs} +3 -3
- package/dist/{workspaces-g2lhdBXF.mjs → workspaces-DFbj07jp.mjs} +1795 -70
- package/dist/{worktree-BKuklFh_.mjs → worktree-COAJ3-OD.mjs} +934 -514
- package/dist/{worktree-Bm4cb-nU.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +7 -7
- package/dist/ccache-Bx5TbxwG.mjs +0 -143
- package/dist/eas-fallback-FwkeqqGi.mjs +0 -381
- package/dist/hosted-ios-D55QhYaD.mjs +0 -15
- package/dist/native-run-BfIDFKLH.mjs +0 -275
- package/dist/server-expo-wvcj5tiZ.mjs +0 -2
- package/dist/settings-write-QjYfSrjF.mjs +0 -360
- package/dist/trigger-DzJu208Q.mjs +0 -2
- package/dist/web-BFLueSh-.mjs +0 -2
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, S as process_identity_exports, c as throwIfCancelled, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn, x as withDrainingCancellation } from "./exec-
|
|
2
|
-
import { E as workspaceDir, u as workspaceLastUsed } from "./workspace-state-
|
|
3
|
-
import { F as isOnMountedVolume, G as projectDeviceSlots, I as listMountedVolumes, L as measuredDirectorySizeAsync, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, S as removeProject, _ as loadConfig$1, d as getConfigDir, j as acquireAvdClaim } from "./config-
|
|
4
|
-
import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-
|
|
5
|
-
import { t as runOperationFile } from "./operation-exec-
|
|
6
|
-
import {
|
|
7
|
-
import { i as findProjectRoot$1, v as detectIsExpo } from "./project-
|
|
8
|
-
import { Ct as forgetCreatedDeviceAsync, F as listAvdsAsync, L as listOrphanedAvdDirectories, V as ownedAvdDirectory, ft as POOL_SETTING_REMEDY, h as avdNameAbsent, vt as parkedMaxSetting, wt as readCreatedDevices$1 } from "./android-
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, c as throwIfCancelled, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { E as workspaceDir, u as workspaceLastUsed } from "./workspace-state-BjqdjnJR.mjs";
|
|
3
|
+
import { F as isOnMountedVolume, G as projectDeviceSlots, I as listMountedVolumes, L as measuredDirectorySizeAsync, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, S as removeProject, _ as loadConfig$1, d as getConfigDir, j as acquireAvdClaim } from "./config-Cn94Jc0g.mjs";
|
|
4
|
+
import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-Dj-WT4BP.mjs";
|
|
5
|
+
import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
6
|
+
import { At as listWorktreesAsync, Bt as resolveSourceCheckoutAsync, Gt as TRASH_CLAIMS, Jt as deleteTrashEntry, qt as TRASH_MANIFEST } from "./settings-BDVI8Ivc.mjs";
|
|
7
|
+
import { i as findProjectRoot$1, v as detectIsExpo } from "./project-DYj-HVx6.mjs";
|
|
8
|
+
import { Ct as forgetCreatedDeviceAsync, F as listAvdsAsync, L as listOrphanedAvdDirectories, V as ownedAvdDirectory, ft as POOL_SETTING_REMEDY, h as avdNameAbsent, vt as parkedMaxSetting, wt as readCreatedDevices$1 } from "./android-DriNoAVy.mjs";
|
|
9
|
+
import { $ as gradleVersionLines, $n as memoryCacheKind, B as includesArchives, Ct as describeError, En as runProcessOperation, F as gcOptionsOf, Ft as withEasProjectLock, G as planCacheEmptying, H as includesRecordings, J as selectsBeyondCaches, Jn as parseArchiveSelector, K as previewScopedEmptying, L as openGcLog, Q as deleteGradleVersions, St as deleteEasSessions, U as includesWorkspaceOutputs, V as includesParkedDevices, W as isWorkspacesScope, X as collectGradleVersions, Y as trimCaches, Zn as collectMemoryReport, _t as findStaleDeviceRecords, ar as scopedMemoryReport, at as DEVICE_LIST_TIMEOUT_MS, bt as withAndroidAvdSizes, ct as collectParkedSims, dt as deleteProjectDevices, er as memoryLines, et as gradleVersionsPending, fr as sizeCaches, gt as findOrphanedDevices, ht as eraseParkedDevices, ir as reclaimMemory, it as collectInventory, lt as deleteParkedAvds, mt as deviceSweepIsScoped, nr as memorySweepIsScoped, ot as collectDeviceLeases, pt as describeUnverifiableDevices, q as selectCaches, rr as memoryWorkPending, rt as getMachineCacheReport, sr as phase, st as collectParkedAvds, tr as memoryScope, tt as includesGradleVersions, ur as discoverCaches, ut as deleteParkedSims, vt as findStaleProjectDevices, wt as withRemoteSessionGcLocks, xt as collectEasSessionSweep, yt as unverifiedDeviceCommand, z as emptyCaches } from "./ccache-BWTze1Ls.mjs";
|
|
10
|
+
import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-DrP4OuuM.mjs";
|
|
11
|
+
import { A as collectIdleDevicesAsync, Ct as createGcResults, Dt as readConcurrency, Et as mapLimited, F as parseIdleDuration, I as shutDownIdleDevices, N as idleDeviceLines, Ot as sizeConcurrency, St as GC_OUTPUT, Tt as eachLimited, _ as withIdleWorkspace, a as collectOrphanedWorkspaces, bt as listBuildSlots, c as isInsideWorkspaces, d as rootPresence, f as sizeText, h as ARTIFACT_DIRS, i as clearWorkspaceOutputs, k as collectIdleDevices, l as listWorkspaceDirs, n as REBUILD_COST, o as collectWorkspaceOutputs, r as WORKSPACE_OUTPUT_DIRS, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, y as workspaceInUseAsync } from "./workspaces-DFbj07jp.mjs";
|
|
11
12
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { S as
|
|
19
|
-
import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-
|
|
13
|
+
import { N as listBuildLocks, k as removeExpiredLease } from "./activity-Cd-ysFes.mjs";
|
|
14
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-E26qSpkb.mjs";
|
|
15
|
+
import { r as readCollectors } from "./ownership-Bx-0cku-.mjs";
|
|
16
|
+
import { A as reclaimProject, M as sweepArchiveStaging, a as matchWorktreeEntry, j as deleteSelectedArchives, k as describeDereferenced } from "./worktree-COAJ3-OD.mjs";
|
|
17
|
+
import { p as writeCacheFile } from "./warm-progress-C0RsbngN.mjs";
|
|
18
|
+
import { a as restoreProblem, o as workspaceKeys } from "./lightened-BCsdAGj_.mjs";
|
|
19
|
+
import { C as worktreeRemovalReason, S as worktreePullRequestNote, _ as ownedDeviceUsage, a as previewMaintenance, b as collectWorktreeSweep, c as deleteTempLeftovers, d as appRoots, f as artifactWorktrees, h as finishedWorkspaces, l as tempLeftoverLines, m as collectArtifactsAsync, o as triggeringRoot, p as clearArtifact, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, v as maintenancePinned, x as removeWorktrees, y as candidateRootsAsync } from "./act-ROviTF_t.mjs";
|
|
20
|
+
import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-C5nCKWp9.mjs";
|
|
20
21
|
import { claimRemoveCommand, isClaimRefusal, isClaimUnavailable, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
21
22
|
import { existsSync, lstatSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
22
23
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
@@ -571,10 +572,15 @@ async function readManifest(dir) {
|
|
|
571
572
|
const parsed = JSON.parse(await readFile(join(dir, TRASH_MANIFEST), "utf8"));
|
|
572
573
|
if (!parsed || typeof parsed !== "object" || !("worktree" in parsed) || !("createdAt" in parsed)) return null;
|
|
573
574
|
const { worktree, createdAt } = parsed;
|
|
574
|
-
|
|
575
|
+
if (typeof worktree !== "string" || typeof createdAt !== "string") return null;
|
|
576
|
+
return "kind" in parsed && parsed.kind === "warm" ? {
|
|
577
|
+
worktree,
|
|
578
|
+
createdAt,
|
|
579
|
+
kind: "warm"
|
|
580
|
+
} : {
|
|
575
581
|
worktree,
|
|
576
582
|
createdAt
|
|
577
|
-
}
|
|
583
|
+
};
|
|
578
584
|
} catch {
|
|
579
585
|
return null;
|
|
580
586
|
}
|
|
@@ -598,7 +604,7 @@ async function collectTrash({ signal, operation } = {}) {
|
|
|
598
604
|
live: false
|
|
599
605
|
};
|
|
600
606
|
const live = claim.live;
|
|
601
|
-
const kept = claim.kept ?? (manifest ? await worktreeKept(manifest.worktree) : null);
|
|
607
|
+
const kept = claim.kept ?? (manifest && manifest.kind !== "warm" ? await worktreeKept(manifest.worktree) : null);
|
|
602
608
|
entries.push({
|
|
603
609
|
path,
|
|
604
610
|
worktree: manifest?.worktree ?? null,
|
|
@@ -796,7 +802,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
|
|
|
796
802
|
orphaned: [],
|
|
797
803
|
notices: [],
|
|
798
804
|
deletionSafe: true
|
|
799
|
-
}, agentDeviceUsage = null, swiftpmCacheUsage, machineCaches, tempLeftovers, trash, gradleVersions, caches = [], workspaceOutputs = null, workspaceLogs = [], recordings = [], worktreeSweep = null, memory, cacheScope = null, olderThan = null }, { now = Date.now() } = {}) {
|
|
805
|
+
}, agentDeviceUsage = null, swiftpmCacheUsage, machineCaches, tempLeftovers, trash, gradleVersions, caches = [], workspaceOutputs = null, worktreeDependencies, workspaceLogs = [], recordings = [], worktreeSweep = null, memory, cacheScope = null, olderThan = null }, { now = Date.now() } = {}) {
|
|
800
806
|
const lines = archiveLines(archives);
|
|
801
807
|
const parkedHostedLines = formatParkedHostedDeviceReport(parkedHostedDevices, now);
|
|
802
808
|
const easLedgerLines = staleEasLedgerLines(staleEasLedgerEntries);
|
|
@@ -825,6 +831,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
|
|
|
825
831
|
expiredLeases,
|
|
826
832
|
easSessionSweep.orphaned,
|
|
827
833
|
workspaceOutputs?.workspaces.filter((entry) => entry.willClear) ?? [],
|
|
834
|
+
dependencyCandidates(worktreeDependencies),
|
|
828
835
|
workspaceLogs.filter((entry) => entry.willTrim),
|
|
829
836
|
worktreeSweep?.worktrees.filter((entry) => !entry.skipped) ?? []
|
|
830
837
|
].every((found) => found.length === 0)) {
|
|
@@ -924,6 +931,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
|
|
|
924
931
|
lines.push(`Skipped (${skipped.length}) - not classified as dead:`);
|
|
925
932
|
for (const entry of skipped) lines.push(` ${entry.dir}: ${entry.reason}`);
|
|
926
933
|
}
|
|
934
|
+
lines.push(...worktreeDependencyLines(worktreeDependencies));
|
|
927
935
|
lines.push(...workspaceLogLines(workspaceLogs));
|
|
928
936
|
lines.push(...recordingLines(recordings));
|
|
929
937
|
lines.push(...cacheLines(caches, workspaceOutputs));
|
|
@@ -937,6 +945,16 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
|
|
|
937
945
|
lines.push(...maintenanceReportLines(maintenance));
|
|
938
946
|
return lines;
|
|
939
947
|
}
|
|
948
|
+
function dependencyCandidates(found) {
|
|
949
|
+
return found?.candidates.map(({ path }) => path) ?? [];
|
|
950
|
+
}
|
|
951
|
+
function worktreeDependencyLines(found) {
|
|
952
|
+
if (!found || !found.candidates.length && !found.skips.length) return [];
|
|
953
|
+
const lines = [`Worktree dependencies (${found.candidates.length} of ${found.candidates.length + found.skips.length} would be LIGHTENED; the next start, ios or android restores them with worktree warm):`];
|
|
954
|
+
for (const { path } of found.candidates) lines.push(` ${path}`, " would be LIGHTENED");
|
|
955
|
+
for (const { target, reason } of found.skips) lines.push(` ${target}`, ` kept: ${reason}`);
|
|
956
|
+
return lines;
|
|
957
|
+
}
|
|
940
958
|
function workspaceLogLines(workspaceLogs) {
|
|
941
959
|
const over = workspaceLogs.filter((w) => w.trimBytes > 0);
|
|
942
960
|
if (!over.length) return [];
|
|
@@ -990,13 +1008,14 @@ function workspaceOutputLines(outputs, bytes) {
|
|
|
990
1008
|
const lines = [
|
|
991
1009
|
` ${formatBytes(bytes).padStart(10)} Workspace build outputs (detected)`,
|
|
992
1010
|
` ${outputs.root}`,
|
|
993
|
-
` ${WORKSPACE_OUTPUT_DIRS.join(", ")}, macOS Swift scratch and staged app bundles of each workspace; workspace.json, state.json, logs and device records stay`,
|
|
1011
|
+
` ${WORKSPACE_OUTPUT_DIRS.join(", ")}, macOS Swift scratch and staged app bundles of each workspace, and the git-ignored in-tree build directories of its project; workspace.json, state.json, logs and device records stay`,
|
|
994
1012
|
` ${REBUILD_COST}`
|
|
995
1013
|
];
|
|
996
1014
|
for (const w of outputs.workspaces) {
|
|
997
1015
|
const idle = w.idleDays === null ? "last use unknown" : `idle ${w.idleDays}d`;
|
|
998
1016
|
lines.push(` ${sizeText(w.bytes).padStart(8)} ${w.projectRoot ?? w.dir} (${idle})`);
|
|
999
|
-
lines.push(
|
|
1017
|
+
if (w.inTreeDirs.length) lines.push(` with ${w.inTreeDirs.join(", ")}`);
|
|
1018
|
+
lines.push(w.willClear ? " would be LIGHTENED" : ` kept: ${w.keptReason}`);
|
|
1000
1019
|
}
|
|
1001
1020
|
return lines;
|
|
1002
1021
|
}
|
|
@@ -1028,7 +1047,7 @@ function cacheLines(caches, workspaceOutputs) {
|
|
|
1028
1047
|
const clearing = outputs?.workspaces.filter((w) => w.willClear) ?? [];
|
|
1029
1048
|
if (clearing.length) {
|
|
1030
1049
|
const clearBytes = clearing.reduce((n, w) => n + (w.bytes ?? 0), 0);
|
|
1031
|
-
lines.push(` would
|
|
1050
|
+
lines.push(` would lighten ${clearing.length} workspace${clearing.length === 1 ? "" : "s"}, freeing ${formatBytes(clearBytes)} of build outputs`);
|
|
1032
1051
|
}
|
|
1033
1052
|
}
|
|
1034
1053
|
return lines;
|
|
@@ -1123,7 +1142,7 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
|
|
|
1123
1142
|
orphaned: [],
|
|
1124
1143
|
notices: [],
|
|
1125
1144
|
deletionSafe: true
|
|
1126
|
-
}, workspaceOutputs = null, workspaceLogs = [], recordings = [], agentDeviceUsage = null, swiftpmCacheUsage = null, machineCaches = null, tempLeftovers = null, trash = null, gradleVersions = null, caches = [], memory = null }) {
|
|
1145
|
+
}, workspaceOutputs = null, workspaceLogs = [], worktreeDependencies = null, recordings = [], agentDeviceUsage = null, swiftpmCacheUsage = null, machineCaches = null, tempLeftovers = null, trash = null, gradleVersions = null, caches = [], memory = null }) {
|
|
1127
1146
|
return {
|
|
1128
1147
|
...archives ? {
|
|
1129
1148
|
archived: archives.records,
|
|
@@ -1280,6 +1299,15 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
|
|
|
1280
1299
|
reason: w.keptCode,
|
|
1281
1300
|
detail: w.keptReason
|
|
1282
1301
|
})),
|
|
1302
|
+
worktreeDependencies: [...(worktreeDependencies?.candidates ?? []).map(({ path }) => ({
|
|
1303
|
+
path,
|
|
1304
|
+
willDelete: true,
|
|
1305
|
+
detail: null
|
|
1306
|
+
})), ...(worktreeDependencies?.skips ?? []).map(({ target, reason }) => ({
|
|
1307
|
+
path: target,
|
|
1308
|
+
willDelete: false,
|
|
1309
|
+
detail: reason
|
|
1310
|
+
}))],
|
|
1283
1311
|
recordings: recordings.map((r) => ({
|
|
1284
1312
|
dir: r.dir,
|
|
1285
1313
|
projectRoot: r.projectRoot,
|
|
@@ -1293,6 +1321,7 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
|
|
|
1293
1321
|
workspaceBuildOutputs: (workspaceOutputs?.workspaces ?? []).map((w) => ({
|
|
1294
1322
|
dir: w.dir,
|
|
1295
1323
|
projectRoot: w.projectRoot,
|
|
1324
|
+
inTreeDirs: w.inTreeDirs,
|
|
1296
1325
|
bytes: w.bytes,
|
|
1297
1326
|
idleDays: w.idleDays,
|
|
1298
1327
|
willClear: w.willClear,
|
|
@@ -1321,11 +1350,85 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
|
|
|
1321
1350
|
};
|
|
1322
1351
|
}
|
|
1323
1352
|
//#endregion
|
|
1353
|
+
//#region src/commands/gc/dependencies.ts
|
|
1354
|
+
const NO_RESTORE = "Stim has no workspace in its worktree, so no start, ios or android run would restore it";
|
|
1355
|
+
/**
|
|
1356
|
+
* node_modules and ios/Pods of linked worktrees `gc --delete` lightens: idle for LIGHTEN_AFTER_MS, holding a Stim
|
|
1357
|
+
* workspace that restores them, and with nothing running from them.
|
|
1358
|
+
*/
|
|
1359
|
+
async function collectWorktreeDependencies({ now, operation }) {
|
|
1360
|
+
const found = await collectArtifactsAsync("dependencies", {
|
|
1361
|
+
now,
|
|
1362
|
+
windowMs: LIGHTEN_AFTER_MS,
|
|
1363
|
+
protectedRoot: canonicalPath(operation?.cwd ?? process.cwd()),
|
|
1364
|
+
pinned: maintenancePinned
|
|
1365
|
+
}, operation?.signal ?? new AbortController().signal, operation);
|
|
1366
|
+
const sources = /* @__PURE__ */ new Map();
|
|
1367
|
+
const candidates = [];
|
|
1368
|
+
const skips = [...found.skips];
|
|
1369
|
+
for (const candidate of found.candidates) {
|
|
1370
|
+
const reason = workspaceKeys(candidate.keys).length ? await restoreProblem(candidate, sources, operation) : NO_RESTORE;
|
|
1371
|
+
if (reason) skips.push({
|
|
1372
|
+
target: candidate.path,
|
|
1373
|
+
reason
|
|
1374
|
+
});
|
|
1375
|
+
else candidates.push(candidate);
|
|
1376
|
+
}
|
|
1377
|
+
return {
|
|
1378
|
+
candidates,
|
|
1379
|
+
skips
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
async function lightenWorktreeDependencies(found, { log, record } = GC_OUTPUT, operation) {
|
|
1383
|
+
if (!found?.candidates.length) return 0;
|
|
1384
|
+
const worktrees = artifactWorktrees();
|
|
1385
|
+
const protectedRoot = canonicalPath(operation?.cwd ?? process.cwd());
|
|
1386
|
+
const restoreCache = /* @__PURE__ */ new Map();
|
|
1387
|
+
let failures = 0;
|
|
1388
|
+
for (const { worktree, path } of found.candidates) {
|
|
1389
|
+
operation?.signal.throwIfAborted();
|
|
1390
|
+
try {
|
|
1391
|
+
const outcome = await clearArtifact({
|
|
1392
|
+
kind: "would-delete-dependencies",
|
|
1393
|
+
target: path,
|
|
1394
|
+
bytes: 0,
|
|
1395
|
+
reason: "gc --delete"
|
|
1396
|
+
}, "dependencies", {
|
|
1397
|
+
windowMs: LIGHTEN_AFTER_MS,
|
|
1398
|
+
protectedRoot,
|
|
1399
|
+
pinned: maintenancePinned,
|
|
1400
|
+
worktrees,
|
|
1401
|
+
requireRestorable: true,
|
|
1402
|
+
restoreCache
|
|
1403
|
+
});
|
|
1404
|
+
if (outcome.status === "done") {
|
|
1405
|
+
log(chalk.green(`Lightened ${worktree}: deleted ${path}, freeing ${formatBytes(outcome.bytes)}; the next start, ios or android restores it with worktree warm`));
|
|
1406
|
+
record("worktreeDependencies", "done", path, { bytes: outcome.bytes });
|
|
1407
|
+
} else {
|
|
1408
|
+
log(chalk.yellow(`Kept ${path}: ${outcome.detail}`));
|
|
1409
|
+
record("worktreeDependencies", "kept", path, {
|
|
1410
|
+
bytes: null,
|
|
1411
|
+
detail: outcome.detail
|
|
1412
|
+
});
|
|
1413
|
+
}
|
|
1414
|
+
} catch (error) {
|
|
1415
|
+
operation?.signal.throwIfAborted();
|
|
1416
|
+
failures++;
|
|
1417
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
1418
|
+
log(chalk.red(`Could not delete ${path}: ${detail}`));
|
|
1419
|
+
record("worktreeDependencies", "failed", path, {
|
|
1420
|
+
bytes: null,
|
|
1421
|
+
detail
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
return failures;
|
|
1426
|
+
}
|
|
1427
|
+
//#endregion
|
|
1324
1428
|
//#region src/commands/gc/worktree-sizes.ts
|
|
1325
1429
|
const SIZE_TIMEOUT_MS = 3e4;
|
|
1326
1430
|
const BUILD_STATE_MAX_AGE_MS = 36e5;
|
|
1327
1431
|
const BUILD_STATE_TIMEOUT_MS = 1e4;
|
|
1328
|
-
const BUILD_STATE_CONCURRENCY = 4;
|
|
1329
1432
|
const PNPM_STORE = ".pnpm-store";
|
|
1330
1433
|
const WORKTREES_DIR = ".worktrees";
|
|
1331
1434
|
function isDirectory(path) {
|
|
@@ -1394,8 +1497,8 @@ async function duSize(dir, operation) {
|
|
|
1394
1497
|
/**
|
|
1395
1498
|
* Sizes the regenerable directories maintenance clears and a project-local `.pnpm-store` in each worktree of the
|
|
1396
1499
|
* sweep, from the disk-usage cache while an entry is under an hour old and no entry was added to or removed from the
|
|
1397
|
-
* directory since. Stale directories are measured with one `du` each,
|
|
1398
|
-
*
|
|
1500
|
+
* directory since. Stale directories are measured with one `du` each, at most 4 at once, one at a time while the
|
|
1501
|
+
* operation declares its children on a claim, with 10 seconds each, so a
|
|
1399
1502
|
* slow tree delays only itself; a directory du could not measure in time is reported unmeasured (null). Without
|
|
1400
1503
|
* `measure`, stale directories are reported unmeasured without a `du`. Also lists
|
|
1401
1504
|
* the directories directly under a repository's `.worktrees/` that are no git worktree at all.
|
|
@@ -1421,7 +1524,7 @@ async function measureWorktreeSweep(sweep, operation, measure = true) {
|
|
|
1421
1524
|
}] : [])) : [];
|
|
1422
1525
|
const worktrees = new Set(due.map(({ sizes }) => sizes)).size;
|
|
1423
1526
|
if (due.length) phase("worktrees", `measuring the build state of ${plural(worktrees, "worktree")}`, operation);
|
|
1424
|
-
await eachLimited(due, operation
|
|
1527
|
+
await eachLimited(due, sizeConcurrency(operation), async ({ dir, sizes }) => {
|
|
1425
1528
|
operation?.signal.throwIfAborted();
|
|
1426
1529
|
const measuredAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1427
1530
|
const bytes = await duSize(dir, operation);
|
|
@@ -1477,7 +1580,7 @@ async function unlistedWorktreeDirs(operation) {
|
|
|
1477
1580
|
if ("refusal" in source || repositories.has(source.path)) continue;
|
|
1478
1581
|
repositories.set(source.path, entries.map((entry) => canonicalPath(entry.path)));
|
|
1479
1582
|
}
|
|
1480
|
-
const
|
|
1583
|
+
const unlisted = [];
|
|
1481
1584
|
for (const [repository, listed] of repositories) {
|
|
1482
1585
|
operation?.signal.throwIfAborted();
|
|
1483
1586
|
const parent = join(repository, WORKTREES_DIR);
|
|
@@ -1493,18 +1596,21 @@ async function unlistedWorktreeDirs(operation) {
|
|
|
1493
1596
|
if (!isDirectory(path) || hasLiveGitDir(path)) continue;
|
|
1494
1597
|
const real = canonicalPath(path);
|
|
1495
1598
|
if (listed.some((entry) => entry === real || entry.startsWith(`${real}${sep}`))) continue;
|
|
1496
|
-
|
|
1599
|
+
unlisted.push({
|
|
1497
1600
|
path,
|
|
1498
|
-
repository
|
|
1499
|
-
bytes: await measuredDirectorySizeAsync(path, {
|
|
1500
|
-
timeoutMs: SIZE_TIMEOUT_MS,
|
|
1501
|
-
operation,
|
|
1502
|
-
signal: operation?.signal
|
|
1503
|
-
})
|
|
1601
|
+
repository
|
|
1504
1602
|
});
|
|
1505
1603
|
}
|
|
1506
1604
|
}
|
|
1507
|
-
return
|
|
1605
|
+
return await mapLimited(unlisted, sizeConcurrency(operation), async ({ path, repository }) => ({
|
|
1606
|
+
path,
|
|
1607
|
+
repository,
|
|
1608
|
+
bytes: await measuredDirectorySizeAsync(path, {
|
|
1609
|
+
timeoutMs: SIZE_TIMEOUT_MS,
|
|
1610
|
+
operation,
|
|
1611
|
+
signal: operation?.signal
|
|
1612
|
+
})
|
|
1613
|
+
}));
|
|
1508
1614
|
}
|
|
1509
1615
|
//#endregion
|
|
1510
1616
|
//#region src/commands/gc/ledger.ts
|
|
@@ -2211,7 +2317,8 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
|
|
|
2211
2317
|
now,
|
|
2212
2318
|
exclude: isWorkspacesScope(scope) ? await removedWholeWorkspaceDirs(operation) : [],
|
|
2213
2319
|
signal: operation?.signal,
|
|
2214
|
-
operation
|
|
2320
|
+
operation,
|
|
2321
|
+
lighten: true
|
|
2215
2322
|
}) : null,
|
|
2216
2323
|
workspaceLogs: [],
|
|
2217
2324
|
recordings: includesRecordings(scope) ? await collectRecordings({
|
|
@@ -2483,6 +2590,11 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
|
|
|
2483
2590
|
now,
|
|
2484
2591
|
exclude: goneWorkspaceDirs,
|
|
2485
2592
|
signal: operation?.signal,
|
|
2593
|
+
operation,
|
|
2594
|
+
lighten: true
|
|
2595
|
+
}),
|
|
2596
|
+
worktreeDependencies: await collectWorktreeDependencies({
|
|
2597
|
+
now,
|
|
2486
2598
|
operation
|
|
2487
2599
|
}),
|
|
2488
2600
|
workspaceLogs: await collectWorkspaceLogs({
|
|
@@ -2821,7 +2933,7 @@ async function reclaimParkedDevices(report, deps, output) {
|
|
|
2821
2933
|
}
|
|
2822
2934
|
function reportActionable(report) {
|
|
2823
2935
|
const { deadProjects, invalidProjects, orphanedDevices, staleDevices, staleDeviceRecords, buildLocks, buildSlots, deviceLeases, easSessionSweep, caches, olderThan, all, cacheScope: cache } = report;
|
|
2824
|
-
return archiveWorkPending(report.archives, deadProjects.length + invalidProjects.length > 0 || report.orphanedWorkspaces.length > 0 || Boolean(report.workspaceOutputs?.workspaces.some((entry) => entry.willClear)) || report.workspaceLogs.some((entry) => entry.willTrim) || report.recordings.some((entry) => entry.willDelete && !entry.withWorkspace) || Boolean(report.tempLeftovers?.entries.some((entry) => entry.willDelete)) || Boolean(report.trash?.entries.some((entry) => entry.willDelete)) || Boolean(report.worktreeSweep?.worktrees.some((entry) => !entry.skipped)) || report.parkedSims.length > 0 || report.parkedAvds.length + report.parkedHostedDevices.filter((device) => device.listed !== false).length > 0 || orphanedDevices.length > 0 || staleDevices.length + report.finishedDevices.length > 0 || staleDeviceRecords.length > 0 || report.staleLedgerEntries.length + report.staleEasLedgerEntries.length > 0 || report.staleStatusCaches.length > 0 || buildLocks.stale.length > 0 || buildSlots.stale.length > 0 || deviceLeases.expired.length > 0 || easSessionSweep.orphaned.length > 0 || (olderThan !== null || all) && caches.length > 0 || scopedWorkPending(cache, report));
|
|
2936
|
+
return archiveWorkPending(report.archives, deadProjects.length + invalidProjects.length > 0 || report.orphanedWorkspaces.length > 0 || Boolean(report.workspaceOutputs?.workspaces.some((entry) => entry.willClear)) || Boolean(report.worktreeDependencies?.candidates.length) || report.workspaceLogs.some((entry) => entry.willTrim) || report.recordings.some((entry) => entry.willDelete && !entry.withWorkspace) || Boolean(report.tempLeftovers?.entries.some((entry) => entry.willDelete)) || Boolean(report.trash?.entries.some((entry) => entry.willDelete)) || Boolean(report.worktreeSweep?.worktrees.some((entry) => !entry.skipped)) || report.parkedSims.length > 0 || report.parkedAvds.length + report.parkedHostedDevices.filter((device) => device.listed !== false).length > 0 || orphanedDevices.length > 0 || staleDevices.length + report.finishedDevices.length > 0 || staleDeviceRecords.length > 0 || report.staleLedgerEntries.length + report.staleEasLedgerEntries.length > 0 || report.staleStatusCaches.length > 0 || buildLocks.stale.length > 0 || buildSlots.stale.length > 0 || deviceLeases.expired.length > 0 || easSessionSweep.orphaned.length > 0 || (olderThan !== null || all) && caches.length > 0 || scopedWorkPending(cache, report));
|
|
2825
2937
|
}
|
|
2826
2938
|
async function runGcCore(opts, deps, execution, reportOnly = false) {
|
|
2827
2939
|
const { output, takeResults } = execution;
|
|
@@ -2901,9 +3013,12 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
|
|
|
2901
3013
|
deleteFailures += report.workspaceOutputs ? (await clearWorkspaceOutputs(report.workspaceOutputs, {
|
|
2902
3014
|
olderThan,
|
|
2903
3015
|
signal,
|
|
2904
|
-
operation: deps.operation
|
|
3016
|
+
operation: deps.operation,
|
|
3017
|
+
lighten: true
|
|
2905
3018
|
}, output)).failures : 0;
|
|
2906
3019
|
throwIfCancelled(signal, "GC");
|
|
3020
|
+
deleteFailures += await lightenWorktreeDependencies(report.worktreeDependencies, output, deps.operation);
|
|
3021
|
+
throwIfCancelled(signal, "GC");
|
|
2907
3022
|
deleteFailures += await trimWorkspaceLogs(report.workspaceLogs, output, deps.operation);
|
|
2908
3023
|
throwIfCancelled(signal, "GC");
|
|
2909
3024
|
deleteFailures += await deleteRecordings(report.recordings, {
|
|
@@ -3020,14 +3135,14 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
|
|
|
3020
3135
|
output.fail();
|
|
3021
3136
|
}
|
|
3022
3137
|
throwIfCancelled(signal, "GC");
|
|
3023
|
-
if (all) await emptyCaches(caches, output, signal, deps.operation);
|
|
3138
|
+
if (all) deleteFailures += await emptyCaches(caches, output, signal, deps.operation);
|
|
3024
3139
|
else if (olderThan === null) {
|
|
3025
3140
|
if (caches.length) output.log(chalk.dim("Shared caches left alone: pass --cache all to empty them, or --older-than <days> to trim them."));
|
|
3026
|
-
} else await trimCaches(caches, olderThan, output, signal, deps.operation);
|
|
3141
|
+
} else deleteFailures += (await trimCaches(caches, olderThan, output, signal, deps.operation)).failures;
|
|
3027
3142
|
return payload(deleteFailures);
|
|
3028
3143
|
}
|
|
3029
3144
|
function gcCommand(program) {
|
|
3030
|
-
program.command("gc").description("Report what Stim has left behind: dead project entries, orphaned workspace directories, clean Stim-managed linked worktrees whose branch is merged or whose pull request was merged or closed, orphaned owned devices and EAS sessions, records of devices that no longer exist, build locks whose builder is gone, expired physical-device leases, the shared build caches, the build outputs and logs of each workspace, the memory of watchman and of the Gradle and Kotlin daemons, and recognized leftovers in TMPDIR. Reports by default; pass --delete to act.").option("--worktrees", "also remove clean, idle Stim-managed linked worktrees, not only merged ones: with --delete run `stim worktree remove` (never --force) on each; idle means unused for --older-than days, 7 without it").option("--delete", "actually prune the reported entries, reap the reported devices,
|
|
3145
|
+
program.command("gc").description("Report what Stim has left behind: dead project entries, orphaned workspace directories, clean Stim-managed linked worktrees whose branch is merged or whose pull request was merged or closed, orphaned owned devices and EAS sessions, records of devices that no longer exist, build locks whose builder is gone, expired physical-device leases, the shared build caches, the build outputs and logs of each workspace, the memory of watchman and of the Gradle and Kotlin daemons, and recognized leftovers in TMPDIR. Reports by default; pass --delete to act.").option("--worktrees", "also remove clean, idle Stim-managed linked worktrees, not only merged ones: with --delete run `stim worktree remove` (never --force) on each; idle means unused for --older-than days, 7 without it").option("--delete", "actually prune the reported entries, reap the reported devices, lighten every workspace that is not building and ran no ios, android or macos command in the last 15 minutes by clearing its build outputs, a running dev server or booted device included, and trim its Metro, client and device logs to their newest 8 MiB").option("--older-than <days>", "also reap owned devices whose workspace has not been used this long, trim shared cache entries nothing has used in that time and device recordings made before it, and clear workspace build outputs only for workspaces idle this long and parked devices only once parked this long", (v) => {
|
|
3031
3146
|
const n = parseInt(v, 10);
|
|
3032
3147
|
if (!Number.isFinite(n) || String(n) !== String(v).trim()) throw new InvalidArgumentError("must be a whole number of days, e.g. --older-than 30");
|
|
3033
3148
|
return n;
|