stim 1.26.0 → 1.28.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-CKByBnTD.mjs} +2 -2
- package/dist/{act-C-BqJEpu.mjs → act-8iswyfRa.mjs} +319 -126
- package/dist/{activity-Lnb_EoRY.mjs → activity-DRMg4_mD.mjs} +6 -6
- package/dist/{agent-device-usage-output-DbXy5tg8.mjs → agent-device-usage-output-tE90fDdo.mjs} +5 -5
- package/dist/{android-CiNQw3kq.mjs → android-CHmSU4B4.mjs} +101 -45
- package/dist/{android-DTAcRwBC.mjs → android-CsPs-7Mg.mjs} +23 -18
- package/dist/{android-B5P81yI-.mjs → android-D577ApKG.mjs} +37 -15
- package/dist/{android-CSbLRD53.mjs → android-YWCbmkVK.mjs} +5 -5
- package/dist/{android-cas-BTVhZ0Qs.mjs → android-cas-_aDifWW0.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api.d.mts +14 -4
- package/dist/api.mjs +39 -29
- package/dist/{apk-signed-tail-B46U9hXc.mjs → apk-signed-tail-CQbwM0qO.mjs} +2 -2
- package/dist/{artifact-CsAP6AGK.mjs → artifact-DYtHjxsn.mjs} +19 -24
- package/dist/{artifact-BxREhAaV.mjs → artifact-bFkfD3vf.mjs} +18 -23
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/auto-placement-BVqs8AJi.mjs +350 -0
- package/dist/{browser-web-rYPyqhTf.mjs → browser-web-BUaLcafY.mjs} +16 -16
- package/dist/{build-DPhApsjV.mjs → build-cQURy_KW.mjs} +35 -31
- package/dist/{build-cache-DrXNCy3T.mjs → build-cache-CZULpXVl.mjs} +43 -21
- package/dist/{build-plan-DrMMdayj.mjs → build-plan-CxoYfxsc.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-Bm_A1xX9.mjs} +562 -1604
- 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-CpbaLDa7.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-D9CaRks-.mjs → client-YxCer6ab.mjs} +84 -65
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BF5AR2dL.mjs → command-output-C8R1KIvi.mjs} +1 -1
- package/dist/{config-BktkY_zC.mjs → config-Cn94Jc0g.mjs} +23 -4
- package/dist/{dependencies-Dw6wfQdv.mjs → dependencies-DKeMzwXY.mjs} +108 -60
- package/dist/{dependency-state-DFB41vfr.mjs → dependency-state-CojA2o0t.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-DXR_tPVY.mjs → dev-client-D-BW5uiq.mjs} +2 -2
- package/dist/{device-BK-zwyd_.mjs → device-CgXfbcz5.mjs} +25 -24
- package/dist/{device-capacity-DCSvUF0l.mjs → device-capacity-Cd8lMSn3.mjs} +175 -22
- package/dist/{device-BcYeHSFu.mjs → device-eeK95Lir.mjs} +16 -16
- package/dist/device-host-worker.mjs +22 -20
- package/dist/{device-ios-BLGfXQeK.mjs → device-ios-Cc9ulihb.mjs} +251 -23
- package/dist/{device-lease-run-BmvIl7bI.mjs → device-lease-run-Mtzp4THX.mjs} +5 -5
- package/dist/{device-pool-Dluix4H3.mjs → device-pool-eRz6DtCg.mjs} +3 -3
- package/dist/{doctor-Bhg1ii70.mjs → doctor-Bz_ouYAW.mjs} +28 -16
- package/dist/{doctor-Cp-BhzTS.mjs → doctor-C2QyhejJ.mjs} +1 -1
- 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-BTW82PDC.mjs} +5 -5
- package/dist/{doctor-OnwP94ne.mjs → doctor-xf7ht-5n.mjs} +76 -32
- package/dist/{eas-build-Dsj93iM9.mjs → eas-build-Dm6q68QY.mjs} +4 -4
- package/dist/eas-fallback-DajNpxf-.mjs +87 -0
- package/dist/{eas-session-ledger-B5vygTiD.mjs → eas-session-ledger-CBFo_Uo1.mjs} +37 -8
- package/dist/{error-diagnostics-BOOm9Db7.mjs → error-diagnostics-D1QfyJzQ.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-ldgr-hXU.mjs → gc-DM5oMm-J.mjs} +161 -45
- package/dist/{gc-C_79zvz4.mjs → gc-PLFwb0k4.mjs} +2 -2
- package/dist/{guide-D7K0X6KG.mjs → guide-C4I46XAk.mjs} +674 -213
- package/dist/{hosted-android-Bk54ej6n.mjs → hosted-android-DlaKLbW0.mjs} +6 -7
- package/dist/{hosted-client-fHO8yqzc.mjs → hosted-client-DDRm9hPJ.mjs} +51 -20
- package/dist/{hosted-logs-BfbmDM4M.mjs → hosted-logs-bSebOKbz.mjs} +8 -8
- package/dist/{hosted-logs-sync-B0pvmOk-.mjs → hosted-logs-sync-B0c53W_c.mjs} +5 -5
- package/dist/{hosted-macos-CPl0OZ9h.mjs → hosted-macos-B7-8Pv4H.mjs} +6 -6
- package/dist/{hosted-native-CpDB3-PO.mjs → hosted-native-CDe33CSr.mjs} +22 -18
- package/dist/{idle-shutdown-FfxL1KdG.mjs → idle-shutdown-CQ0QwU9J.mjs} +7 -8
- package/dist/{ios-WxpDJ5T1.mjs → ios-B1DYuOjh.mjs} +27 -11
- package/dist/{ios-B7-lToDu.mjs → ios-B1HvafEG.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-device-CsyryvpT.mjs → ios-device-B4elVFKi.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-Ty5pHl9O.mjs → ios-project-CR4mZ7CH.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-BPHqMDdZ.mjs} +1 -1
- package/dist/{ios-ftxdQbJS.mjs → ios-tg4tp3q1.mjs} +94 -37
- package/dist/{js-swap-BMhXYVDS.mjs → js-swap-CVpSW1fn.mjs} +8 -7
- package/dist/{launch-DOp8RjDz.mjs → launch-DoySmhjz.mjs} +42 -38
- package/dist/lightened-DFAJgfIk.mjs +171 -0
- package/dist/{logs-s1dRIG1E.mjs → logs-BGsW7iPe.mjs} +46 -21
- package/dist/{logs-dQDki6Tt.mjs → logs-DI5ILkYB.mjs} +7 -7
- package/dist/{macos-DBBPNnIA.mjs → macos-Bo9st9Di.mjs} +73 -38
- package/dist/{macos-B0VEV3Gf.mjs → macos-C12RMJQF.mjs} +1 -1
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-CjC10t6E.mjs → metro-BnhXV2Mj.mjs} +4 -4
- package/dist/{metro-gateway-B6_PgD0L.mjs → metro-request-DXyKjVDF.mjs} +26 -47
- package/dist/{named-ports-BG0j1X4g.mjs → named-ports-Phoi2POD.mjs} +3 -3
- package/dist/{native-android-CL2NGiik.mjs → native-android-vxgtLD7w.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-btSUulme.mjs → native-gradle-artifact-inputs-BN96IVw8.mjs} +5 -5
- package/dist/{native-runtime-Dq3RBcON.mjs → native-runtime-DG4Rodzj.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-BKarCoKg.mjs} +3 -3
- package/dist/{native-xcode-ios-CBXJAxfC.mjs → native-xcode-ios-8A-efGa5.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-DJCq48IJ.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-lmj6kcPm.mjs → phone-reverses-BzTa8g1F.mjs} +18 -4
- package/dist/{placement-log-DIFPQAXp.mjs → placement-log-Cvhta5ib.mjs} +3 -3
- package/dist/{plan-placement-IiiSQhtz.mjs → plan-placement-WkZdccuN.mjs} +36 -10
- package/dist/{ports-C2_w1Z0Z.mjs → ports-UV4mJgyC.mjs} +3 -3
- package/dist/{prebuild-gmouvmJZ.mjs → prebuild-k8d_tqOq.mjs} +16 -17
- package/dist/{project-BUu6Is4k.mjs → project-Sui52ywT.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-DANlGGQf.mjs} +32 -26
- package/dist/{react-native-build-oNwqF5Wb.mjs → react-native-build-jUHnIfZ9.mjs} +9 -9
- package/dist/{react-native-doctor-BhA3KUte.mjs → react-native-doctor-DCWRjS7K.mjs} +6 -6
- package/dist/{react-native-ios-B-nf4rjN.mjs → react-native-ios-BwMsFMXi.mjs} +23 -17
- package/dist/{recordings-BldzVKq0.mjs → recordings-iy0mkm7b.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-C9OduiNc.mjs → reload-Bj7QyuDy.mjs} +1 -1
- package/dist/{reload-CCR7KC_l.mjs → reload-c_uEyc_X.mjs} +16 -16
- package/dist/{remote-C8S7FlPF.mjs → remote-DFlpAqdV.mjs} +23 -10
- package/dist/{result-7F5hEwQJ.mjs → result-BIcXREyC.mjs} +32 -21
- package/dist/{run-BqB0v3pt.mjs → run-y2HwyNvg.mjs} +3 -3
- package/dist/{selection-BNPBZ6T5.mjs → selection-CXgM_VK_.mjs} +37 -29
- package/dist/{server-bare-A75rDIdD.mjs → server-bare-2N4vSRZG.mjs} +2 -2
- package/dist/{server-command-CssKFOD7.mjs → server-command-qneHPcRI.mjs} +6 -6
- package/dist/{server-expo-eQfOdydb.mjs → server-expo-Ccm9zB0o.mjs} +4 -4
- package/dist/server-expo-WulkyAwT.mjs +2 -0
- package/dist/{settings-CosW5X-S.mjs → settings-CY5JZlNN.mjs} +375 -62
- package/dist/{settings-OaGQF-ri.mjs → settings-Cfd_Q6ys.mjs} +24 -3
- package/dist/settings-payload-DwQiEMCn.mjs +257 -0
- package/dist/settings-write-CJpjkeAd.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-BpmanOnk.mjs} +6 -6
- package/dist/{stage-jKQ7CP_B.mjs → stage-CmugrSG5.mjs} +2 -2
- package/dist/{start-C_wefNKB.mjs → start-CHH3zgIU.mjs} +1 -1
- package/dist/{start-_BdJ32cZ.mjs → start-DYLk6GXn.mjs} +27 -22
- package/dist/{state-C1i2nMOP.mjs → state-B2QJbDwz.mjs} +4 -4
- package/dist/{state-C4OdpOTF.mjs → state-BXC1Lfxw.mjs} +2 -2
- package/dist/{stats-tEpEEH-u.mjs → stats-DxKqhcGp.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-BHCkOZga.mjs} +51 -28
- package/dist/{status-B9M7x4CZ.mjs → status-D_Ljc89p.mjs} +1 -1
- package/dist/{status-watch-B5wDIH_o.mjs → status-watch-BmsPqYSU.mjs} +18 -7
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-6Dqp-gjX.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-DRqQVqDJ.mjs → stop-D-dGE9gh.mjs} +21 -20
- package/dist/{stop-ySNQHXMG.mjs → stop-DQvE-P76.mjs} +10 -6
- package/dist/{stop-CmdNhGlC.mjs → stop-b2pouxAO.mjs} +2 -2
- package/dist/supervisor-run.mjs +237 -63
- package/dist/{support-BGSCBoib.mjs → support-04IhBUTT.mjs} +6 -6
- package/dist/{support-CVOCp0Ft.mjs → support-BtlJKjyQ.mjs} +12 -11
- package/dist/{swiftpm-artifact-inputs-CfUzt_0Z.mjs → swiftpm-artifact-inputs-Cj2UpmPN.mjs} +4 -4
- package/dist/{swiftpm-macos-x6HPpl_2.mjs → swiftpm-macos-BhF2stxY.mjs} +11 -12
- package/dist/{toolchain-J4J8MrAr.mjs → toolchain-mLA_km-b.mjs} +321 -15
- package/dist/{toolchain-DoavrvIA.mjs → toolchain-qktiV8xc.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-B0Vpuvpl.mjs} +731 -727
- package/dist/{web-Bihbf7-u.mjs → web-BYmK0TjL.mjs} +9 -9
- package/dist/web-CrVLVQZY.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-kIZrdlSg.mjs} +3 -3
- package/dist/{workspaces-g2lhdBXF.mjs → workspaces-CmOcceDN.mjs} +1879 -74
- package/dist/{worktree-BKuklFh_.mjs → worktree-2dk5edza.mjs} +933 -534
- package/dist/worktree-nliAoHxB.mjs +2 -0
- 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
- package/dist/worktree-Bm4cb-nU.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-kIZrdlSg.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-C8R1KIvi.mjs";
|
|
5
|
+
import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
6
|
+
import { $t as TRASH_MANIFEST, Ft as matchWorktreeEntry, Wt as resolveSourceCheckoutAsync, Zt as TRASH_CLAIMS, en as deleteTrashEntry, jt as listWorktreesAsync } from "./settings-CY5JZlNN.mjs";
|
|
7
|
+
import { i as findProjectRoot$1, v as detectIsExpo } from "./project-Sui52ywT.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-CsPs-7Mg.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-Bm_A1xX9.mjs";
|
|
10
|
+
import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-CBFo_Uo1.mjs";
|
|
11
|
+
import { At as mapLimited, Dt as createGcResults, Et as GC_OUTPUT, I as idleDeviceLines, M as collectIdleDevices, Mt as sizeConcurrency, N as collectIdleDevicesAsync, R as parseIdleDuration, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, f as rootPresence, g as ARTIFACT_DIRS, i as clearWorkspaceOutputs, jt as readConcurrency, kt as eachLimited, n as REBUILD_COST, o as collectWorkspaceOutputs, p as sizeText, r as WORKSPACE_OUTPUT_DIRS, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, wt as listBuildSlots, z as shutDownIdleDevices } from "./workspaces-CmOcceDN.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-DRMg4_mD.mjs";
|
|
14
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-B1DYuOjh.mjs";
|
|
15
|
+
import { r as readCollectors } from "./ownership-DJCq48IJ.mjs";
|
|
16
|
+
import { A as deleteSelectedArchives, O as describeDereferenced, j as sweepArchiveStaging, k as reclaimProject } from "./worktree-2dk5edza.mjs";
|
|
17
|
+
import { p as writeCacheFile } from "./warm-progress-B0Vpuvpl.mjs";
|
|
18
|
+
import { a as restoreProblem, o as workspaceKeys } from "./lightened-DFAJgfIk.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-8iswyfRa.mjs";
|
|
20
|
+
import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-tE90fDdo.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) {
|
|
@@ -1350,6 +1453,7 @@ async function buildStateDirs(path, keys, operation) {
|
|
|
1350
1453
|
const worktree = {
|
|
1351
1454
|
path,
|
|
1352
1455
|
linked: true,
|
|
1456
|
+
locked: Boolean(matchWorktreeEntry(entries, path)?.locked),
|
|
1353
1457
|
keys: own
|
|
1354
1458
|
};
|
|
1355
1459
|
const dirs = /* @__PURE__ */ new Map();
|
|
@@ -1394,8 +1498,8 @@ async function duSize(dir, operation) {
|
|
|
1394
1498
|
/**
|
|
1395
1499
|
* Sizes the regenerable directories maintenance clears and a project-local `.pnpm-store` in each worktree of the
|
|
1396
1500
|
* 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
|
-
*
|
|
1501
|
+
* directory since. Stale directories are measured with one `du` each, at most 4 at once, one at a time while the
|
|
1502
|
+
* operation declares its children on a claim, with 10 seconds each, so a
|
|
1399
1503
|
* slow tree delays only itself; a directory du could not measure in time is reported unmeasured (null). Without
|
|
1400
1504
|
* `measure`, stale directories are reported unmeasured without a `du`. Also lists
|
|
1401
1505
|
* the directories directly under a repository's `.worktrees/` that are no git worktree at all.
|
|
@@ -1421,7 +1525,7 @@ async function measureWorktreeSweep(sweep, operation, measure = true) {
|
|
|
1421
1525
|
}] : [])) : [];
|
|
1422
1526
|
const worktrees = new Set(due.map(({ sizes }) => sizes)).size;
|
|
1423
1527
|
if (due.length) phase("worktrees", `measuring the build state of ${plural(worktrees, "worktree")}`, operation);
|
|
1424
|
-
await eachLimited(due, operation
|
|
1528
|
+
await eachLimited(due, sizeConcurrency(operation), async ({ dir, sizes }) => {
|
|
1425
1529
|
operation?.signal.throwIfAborted();
|
|
1426
1530
|
const measuredAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1427
1531
|
const bytes = await duSize(dir, operation);
|
|
@@ -1477,7 +1581,7 @@ async function unlistedWorktreeDirs(operation) {
|
|
|
1477
1581
|
if ("refusal" in source || repositories.has(source.path)) continue;
|
|
1478
1582
|
repositories.set(source.path, entries.map((entry) => canonicalPath(entry.path)));
|
|
1479
1583
|
}
|
|
1480
|
-
const
|
|
1584
|
+
const unlisted = [];
|
|
1481
1585
|
for (const [repository, listed] of repositories) {
|
|
1482
1586
|
operation?.signal.throwIfAborted();
|
|
1483
1587
|
const parent = join(repository, WORKTREES_DIR);
|
|
@@ -1493,18 +1597,21 @@ async function unlistedWorktreeDirs(operation) {
|
|
|
1493
1597
|
if (!isDirectory(path) || hasLiveGitDir(path)) continue;
|
|
1494
1598
|
const real = canonicalPath(path);
|
|
1495
1599
|
if (listed.some((entry) => entry === real || entry.startsWith(`${real}${sep}`))) continue;
|
|
1496
|
-
|
|
1600
|
+
unlisted.push({
|
|
1497
1601
|
path,
|
|
1498
|
-
repository
|
|
1499
|
-
bytes: await measuredDirectorySizeAsync(path, {
|
|
1500
|
-
timeoutMs: SIZE_TIMEOUT_MS,
|
|
1501
|
-
operation,
|
|
1502
|
-
signal: operation?.signal
|
|
1503
|
-
})
|
|
1602
|
+
repository
|
|
1504
1603
|
});
|
|
1505
1604
|
}
|
|
1506
1605
|
}
|
|
1507
|
-
return
|
|
1606
|
+
return await mapLimited(unlisted, sizeConcurrency(operation), async ({ path, repository }) => ({
|
|
1607
|
+
path,
|
|
1608
|
+
repository,
|
|
1609
|
+
bytes: await measuredDirectorySizeAsync(path, {
|
|
1610
|
+
timeoutMs: SIZE_TIMEOUT_MS,
|
|
1611
|
+
operation,
|
|
1612
|
+
signal: operation?.signal
|
|
1613
|
+
})
|
|
1614
|
+
}));
|
|
1508
1615
|
}
|
|
1509
1616
|
//#endregion
|
|
1510
1617
|
//#region src/commands/gc/ledger.ts
|
|
@@ -2211,7 +2318,8 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
|
|
|
2211
2318
|
now,
|
|
2212
2319
|
exclude: isWorkspacesScope(scope) ? await removedWholeWorkspaceDirs(operation) : [],
|
|
2213
2320
|
signal: operation?.signal,
|
|
2214
|
-
operation
|
|
2321
|
+
operation,
|
|
2322
|
+
lighten: true
|
|
2215
2323
|
}) : null,
|
|
2216
2324
|
workspaceLogs: [],
|
|
2217
2325
|
recordings: includesRecordings(scope) ? await collectRecordings({
|
|
@@ -2483,6 +2591,11 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
|
|
|
2483
2591
|
now,
|
|
2484
2592
|
exclude: goneWorkspaceDirs,
|
|
2485
2593
|
signal: operation?.signal,
|
|
2594
|
+
operation,
|
|
2595
|
+
lighten: true
|
|
2596
|
+
}),
|
|
2597
|
+
worktreeDependencies: await collectWorktreeDependencies({
|
|
2598
|
+
now,
|
|
2486
2599
|
operation
|
|
2487
2600
|
}),
|
|
2488
2601
|
workspaceLogs: await collectWorkspaceLogs({
|
|
@@ -2821,7 +2934,7 @@ async function reclaimParkedDevices(report, deps, output) {
|
|
|
2821
2934
|
}
|
|
2822
2935
|
function reportActionable(report) {
|
|
2823
2936
|
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));
|
|
2937
|
+
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
2938
|
}
|
|
2826
2939
|
async function runGcCore(opts, deps, execution, reportOnly = false) {
|
|
2827
2940
|
const { output, takeResults } = execution;
|
|
@@ -2901,9 +3014,12 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
|
|
|
2901
3014
|
deleteFailures += report.workspaceOutputs ? (await clearWorkspaceOutputs(report.workspaceOutputs, {
|
|
2902
3015
|
olderThan,
|
|
2903
3016
|
signal,
|
|
2904
|
-
operation: deps.operation
|
|
3017
|
+
operation: deps.operation,
|
|
3018
|
+
lighten: true
|
|
2905
3019
|
}, output)).failures : 0;
|
|
2906
3020
|
throwIfCancelled(signal, "GC");
|
|
3021
|
+
deleteFailures += await lightenWorktreeDependencies(report.worktreeDependencies, output, deps.operation);
|
|
3022
|
+
throwIfCancelled(signal, "GC");
|
|
2907
3023
|
deleteFailures += await trimWorkspaceLogs(report.workspaceLogs, output, deps.operation);
|
|
2908
3024
|
throwIfCancelled(signal, "GC");
|
|
2909
3025
|
deleteFailures += await deleteRecordings(report.recordings, {
|
|
@@ -3020,14 +3136,14 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
|
|
|
3020
3136
|
output.fail();
|
|
3021
3137
|
}
|
|
3022
3138
|
throwIfCancelled(signal, "GC");
|
|
3023
|
-
if (all) await emptyCaches(caches, output, signal, deps.operation);
|
|
3139
|
+
if (all) deleteFailures += await emptyCaches(caches, output, signal, deps.operation);
|
|
3024
3140
|
else if (olderThan === null) {
|
|
3025
3141
|
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);
|
|
3142
|
+
} else deleteFailures += (await trimCaches(caches, olderThan, output, signal, deps.operation)).failures;
|
|
3027
3143
|
return payload(deleteFailures);
|
|
3028
3144
|
}
|
|
3029
3145
|
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,
|
|
3146
|
+
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
3147
|
const n = parseInt(v, 10);
|
|
3032
3148
|
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
3149
|
return n;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-
|
|
1
|
+
import { _t as findStaleDeviceRecords, ft as describeParkedSims, gt as findOrphanedDevices, pt as describeUnverifiableDevices, q as selectCaches, ut as deleteParkedSims, vt as findStaleProjectDevices } from "./ccache-Bm_A1xX9.mjs";
|
|
2
|
+
import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-DM5oMm-J.mjs";
|
|
3
3
|
export { collectGcReport, gcCommand as default, deleteParkedSims, describeParkedSims, describeUnverifiableDevices, executeGc, findOrphanedDevices, findStaleDeviceRecords, findStaleProjectDevices, formatGcReport, readGcReport, runGc, selectCaches, withGcMaintenanceClaim };
|