stim 1.23.1 → 1.25.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 +3 -2
- package/dist/{acquire-artifact-BzYRDgaP.mjs → acquire-artifact-zA4S7RHE.mjs} +2 -2
- package/dist/{act-vxiMwdf5.mjs → act-BbHS3oV8.mjs} +41 -26
- package/dist/{activity-BpWUPgUm.mjs → activity-BpjwrQXU.mjs} +6 -6
- package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-Bnkerfod.mjs} +5 -5
- package/dist/{android-DtfRGLcc.mjs → android-BGwuK3Mc.mjs} +75 -50
- package/dist/{android-CLi6DSiS.mjs → android-CNZgRC-4.mjs} +5 -5
- package/dist/{android-C7sVmyI9.mjs → android-Cjcj8MCw.mjs} +140 -46
- package/dist/{android-cas-ngferVq2.mjs → android-cas-BVqh2Zep.mjs} +3 -3
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-DVWyCbWU.d.mts → android-project-CTYaETc0.d.mts} +6 -2
- package/dist/{android-DR5lZ2Az.mjs → android-saBeB4lr.mjs} +13 -3
- package/dist/api.d.mts +22 -5
- package/dist/api.mjs +32 -31
- package/dist/{artifact-Xvgibgzq.mjs → artifact-Co8zixVx.mjs} +19 -17
- package/dist/{artifact-DBI3DALs.mjs → artifact-DN8JNwqS.mjs} +18 -17
- package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
- package/dist/{browser-web-BJN9ZHxB.mjs → browser-web-CCgZsHmI.mjs} +16 -17
- package/dist/{budget-3ivAK99e.mjs → budget-HyShrIpL.mjs} +149 -47
- package/dist/{build-Dv9s8Fz-.mjs → build-CAiw8Ezm.mjs} +33 -29
- package/dist/{build-cache-Dv7RN200.mjs → build-cache-CKCzxzxA.mjs} +172 -21
- package/dist/{build-plan-BmbdHQbr.mjs → build-plan-zCuHGlA8.mjs} +8 -7
- package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-CH2EWGPB.mjs → ccache-h1FKhZeg.mjs} +6 -6
- package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
- package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
- package/dist/{cli-BkK6Wr5i.mjs → cli-C4w607Pz.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-B4MMzfo_.mjs → client-BQsmyp_-.mjs} +274 -39
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-YKGWivpG.mjs → command-output-BBvS1H6v.mjs} +3 -2
- package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
- package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
- package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-BwNCYG5Q.mjs} +2 -2
- package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
- package/dist/{dev-client-BFxiDpkf.mjs → dev-client-CHoXXZeg.mjs} +3 -3
- package/dist/{device-CiNYxqp6.mjs → device-B9FqTBYW.mjs} +81 -54
- package/dist/{device-B7ljwccX.mjs → device-F5-4z9ef.mjs} +16 -16
- package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-ZYaRALv5.mjs} +20 -16
- package/dist/device-host-worker.mjs +17 -17
- package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DkHBrmvH.mjs} +32 -50
- package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-ogEeJ62K.mjs} +6 -6
- package/dist/{device-pool-B4iOXIrD.mjs → device-pool-BIg8MU8l.mjs} +3 -3
- package/dist/{doctor-DRu-8ld6.mjs → doctor-A_Nr_fDe.mjs} +1 -1
- package/dist/{doctor-HUC1igzw.mjs → doctor-Bm8TVpGn.mjs} +37 -31
- package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-C6t4Maue.mjs → doctor-k3P3PizH.mjs} +14 -14
- package/dist/{doctor-watchman-iGBpC6KM.mjs → doctor-watchman-BovI1y3-.mjs} +5 -5
- package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CyDKNTBP.mjs} +4 -4
- package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-gaZi-dJL.mjs} +16 -15
- package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-BMCA1gdO.mjs} +12 -8
- package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-B1Mj_-7h.mjs} +17 -42
- package/dist/{errors-ccaPc4ox.mjs → errors-DHm_U5gv.mjs} +2 -1
- package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
- package/dist/{gc-BW8E1uSC.mjs → gc-B9jcnmIk.mjs} +205 -28
- package/dist/{gc-dDE4QPVu.mjs → gc-eaz403W6.mjs} +2 -2
- package/dist/{guide-DYYEO3Wz.mjs → guide-DR0K0xW9.mjs} +328 -89
- package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-Bvb2-ZxD.mjs} +4 -4
- package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-rsRqysJc.mjs} +4 -4
- package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-RtVcJH3u.mjs} +1 -1
- package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CWKGYWNX.mjs} +11 -6
- package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-d0pv9Tth.mjs} +7 -7
- package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-BxTizGU2.mjs} +58 -11
- package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BIyfl0Zj.mjs} +10 -10
- package/dist/{ios-hcBpnEGk.mjs → ios-BQzvJlzw.mjs} +122 -17
- package/dist/{ios-CWjqfSm_.mjs → ios-BRVM8b0P.mjs} +81 -49
- package/dist/{ios-DTOYZGMJ.mjs → ios-Dvt97HgQ.mjs} +8 -8
- package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
- package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
- package/dist/{ios-device-DFGuwF4U.mjs → ios-device-CKSvk0bu.mjs} +3 -3
- package/dist/{ios-project-CSZYI1iu.mjs → ios-project-DCUDo06I.mjs} +5 -5
- package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
- package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-CT9nV5SP.mjs} +15 -7
- package/dist/{js-swap-BSBHldmm.mjs → js-swap-Z9HbC4cj.mjs} +7 -6
- package/dist/{launch-D-zq8SHG.mjs → launch-D0lPvFFu.mjs} +49 -30
- package/dist/{launch-CP2wDCVd.mjs → launch-DscF1QfM.mjs} +52 -50
- package/dist/{logs-pNvA2hHK.mjs → logs-BsIRre8x.mjs} +16 -9
- package/dist/{logs-By5aw3g9.mjs → logs-Crs9y34Z.mjs} +8 -6
- package/dist/{macos-CPMahOC2.mjs → macos-CcUlJPMu.mjs} +1 -1
- package/dist/{macos-C67FZ2ft.mjs → macos-D477nfzH.mjs} +49 -42
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +7 -7
- package/dist/{metro-DiXtA3Ty.mjs → metro-1pJgCX4U.mjs} +4 -4
- package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-Bp9gJQAN.mjs} +3 -4
- package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BVbn8SvC.mjs} +3 -3
- package/dist/{native-android-_MWSs3PP.mjs → native-android-BvMizJn1.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BJscK4vN.mjs} +5 -5
- package/dist/{native-run-Dv88i0aU.mjs → native-run-D5OJsGwA.mjs} +6 -6
- package/dist/{native-runtime-DBRfY_PN.mjs → native-runtime-B9w_Qyz3.mjs} +10 -9
- package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
- package/dist/{native-xcode-inputs-CqViUh3r.mjs → native-xcode-inputs-Cv4l-obn.mjs} +2 -2
- package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-DGrg90hE.mjs} +21 -20
- package/dist/offload-worker.d.mts +12 -4
- package/dist/offload-worker.mjs +78 -43
- package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
- package/dist/{ownership-C5fo5Edb.mjs → ownership-jxxz-19m.mjs} +3 -3
- package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
- package/dist/phone-reverses-CYb7RRAx.mjs +57 -0
- package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DjOXJRIH.mjs} +1 -1
- package/dist/{plan-placement-cr0fEU7b.mjs → plan-placement-BqKgKHCi.mjs} +3 -3
- package/dist/{ports-DpXjKkSV.mjs → ports-DtS1Amb0.mjs} +3 -3
- package/dist/{prebuild-BligW0QS.mjs → prebuild-JUaqOLpc.mjs} +14 -9
- package/dist/{project-DhCtQWWU.mjs → project-BiC68mIp.mjs} +21 -17
- package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-ZlhQfhvq.mjs → react-native-android-DRYqoJc4.mjs} +76 -32
- package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-CwZB-agu.mjs} +23 -20
- package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-BCrytK7h.mjs} +10 -9
- package/dist/{react-native-ios-C5W0SA6f.mjs → react-native-ios-Cr1buNFo.mjs} +41 -24
- package/dist/{recordings-CQmfzAh7.mjs → recordings-BaoQ0t-J.mjs} +1 -1
- package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
- package/dist/{reload-QcwnYLYV.mjs → reload-Beftw2X3.mjs} +1 -1
- package/dist/{reload-COJWTbae.mjs → reload-FbSgMF8x.mjs} +144 -42
- package/dist/{remote-DR8qUERM.mjs → remote-BuZj6AyU.mjs} +16 -7
- package/dist/{result-utnBea7x.mjs → result-CR2vk2cj.mjs} +41 -18
- package/dist/{run-DidHghD1.mjs → run-BtzE09Dl.mjs} +2 -2
- package/dist/{selection-DSMbWEX2.mjs → selection-D5cxEl3t.mjs} +13 -7
- package/dist/{server-bare-CafzuyFB.mjs → server-bare-CH9X0RLn.mjs} +56 -4
- package/dist/{server-command-B9o92sLM.mjs → server-command-CaBbDNU2.mjs} +5 -5
- package/dist/server-expo-C16Zf2k7.mjs +2 -0
- package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Ck8EIidM.mjs} +14 -9
- package/dist/{settings-C7O8A6ZI.mjs → settings-B5tCoq9N.mjs} +132 -39
- package/dist/{settings-PfJx8uK1.mjs → settings-DzH9mGQZ.mjs} +1 -1
- package/dist/{settings-write-Chuy7Cte.mjs → settings-write-n0zwfohx.mjs} +7 -7
- package/dist/settings.schema.json +51 -0
- package/dist/{simslim-BNckWpXi.mjs → simslim-BjxszUAb.mjs} +22 -7
- package/dist/{slot-launch-B7AuoWJv.mjs → slot-launch-QeuJMlnJ.mjs} +6 -6
- package/dist/{stage-C4u17aES.mjs → stage-D8xlRU2D.mjs} +2 -3
- package/dist/{start-BL_BsiWt.mjs → start-C1JLjkNw.mjs} +1 -1
- package/dist/{start-CU8mCPC7.mjs → start-YMpNwLhh.mjs} +75 -35
- package/dist/{state--smjFSTL.mjs → state-DMRNP7-4.mjs} +4 -4
- package/dist/{state-08I3hw3_.mjs → state-DPaM3u5K.mjs} +2 -2
- package/dist/{stats-CO6sK0Nh.mjs → stats-CP7STzZw.mjs} +5 -5
- package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
- package/dist/{status-_WPHzVft.mjs → status-CRLiJ-O_.mjs} +24 -24
- package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
- package/dist/{status-CrJutl6-.mjs → status-cNw6i0_t.mjs} +1 -1
- package/dist/{status-watch-BHFasOZN.mjs → status-watch-Bc2J4TZn.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/stim-clonefile.c +18 -0
- package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
- package/dist/{stop-iuFHjUST.mjs → stop-Br7LKxBE.mjs} +2 -2
- package/dist/{stop-CR5689oB.mjs → stop-COP6PQqw.mjs} +5 -5
- package/dist/{stop-BJ06ipTZ.mjs → stop-Db9Kh-UA.mjs} +109 -56
- package/dist/supervisor-run.mjs +17 -17
- package/dist/{support-CbXPbUMJ.mjs → support-Cxj9CmII.mjs} +6 -6
- package/dist/{support-TWuQlHQo.mjs → support-qKcbgmI5.mjs} +14 -11
- package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-iY9fsmOc.mjs} +4 -4
- package/dist/{swiftpm-macos-DbwGCpZg.mjs → swiftpm-macos-Bp_sn9P4.mjs} +15 -14
- package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-DB1aeqxO.mjs} +1 -1
- package/dist/{toolchain-B9hCFCQw.mjs → toolchain-VzLJzZ7O.mjs} +69 -37
- package/dist/trigger-BLsHgAGR.mjs +2 -0
- package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
- package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-BV3ZPmcY.mjs} +6 -6
- package/dist/{web-DRF_oFXk.mjs → web-B4Yjyt1G.mjs} +12 -10
- package/dist/web-DS4UDWvf.mjs +2 -0
- package/dist/web-run.mjs +8 -9
- package/dist/windows-report.mjs +12 -1
- package/dist/windows-report.ps1 +1 -1
- package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CPSp3mav.mjs} +11 -4
- package/dist/{workspaces-e41xsjKr.mjs → workspaces-C9w4aeXF.mjs} +36 -32
- package/dist/{worktree-B4Nj3EGS.mjs → worktree-CclFIe1Z.mjs} +324 -99
- package/dist/{worktree-BEwxVwKF.mjs → worktree-Ct9Gk3KL.mjs} +1 -1
- package/dist/{xcode-Rq744mBF.mjs → xcode-CiIIDnuD.mjs} +42 -28
- package/package.json +7 -7
- 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/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
- package/dist/server-expo-Ddr8cG_c.mjs +0 -2
- package/dist/trigger-yb_nFzPF.mjs +0 -2
- package/dist/web-kDE9Myoy.mjs +0 -2
package/README.md
CHANGED
|
@@ -188,8 +188,9 @@ refuses with `STIM_CLAIM_UNAVAILABLE` instead of a cancellation or timeout
|
|
|
188
188
|
error. Child cleanup errors name the launcher PID; unverifiable processes and descendants
|
|
189
189
|
are left untouched. On POSIX, a launcher that exited before identity capture can only
|
|
190
190
|
finish successfully once its process group is proven gone.
|
|
191
|
-
After a termination request, cleanup waits
|
|
192
|
-
|
|
191
|
+
After a termination request, cleanup waits for a child to close, then for its
|
|
192
|
+
process group to exit: each wait is 5 seconds times the host's load per CPU,
|
|
193
|
+
from 5 to 15 seconds. Overall cleanup has a 35 second budget, including temporary-worktree
|
|
193
194
|
removal; unfinished cleanup returns `STIM_CLAIM_UNAVAILABLE` and leaves
|
|
194
195
|
unresolved resources in place. Credential refresh waits asynchronously and
|
|
195
196
|
checks cancellation before writing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { I as waitForSharedBuild } from "./activity-
|
|
1
|
+
import { l as WorkspaceProcessCleanupError } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { I as waitForSharedBuild } from "./activity-BpjwrQXU.mjs";
|
|
3
3
|
import { rmSync } from "node:fs";
|
|
4
4
|
//#region src/engine/artifact-lifecycle.ts
|
|
5
5
|
async function runArtifactLifecycle(phases) {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as WorkspaceProcessCleanupError, n as isTimeoutError, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { g as workspaceStateFile$1, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { F as isOnMountedVolume, G as projectDeviceSlots, I as listMountedVolumes, L as measuredDirectorySizeAsync, N as directorySizeAsync, P as formatBytes, _ as loadConfig$1, p as getProject } from "./config-
|
|
4
|
-
import { o as formatLongDuration, u as plural } from "./command-output-
|
|
5
|
-
import { c as gitQuiet, l as gitQuietAsync, n as runOperationFileQuiet, r as childEnvironment } from "./operation-exec-
|
|
6
|
-
import { r as readWorkspaceState$1, u as workspaceLastUsed } from "./workspace-state-
|
|
7
|
-
import {
|
|
8
|
-
import { i as findProjectRoot$1 } from "./project-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { F as isOnMountedVolume, G as projectDeviceSlots, I as listMountedVolumes, L as measuredDirectorySizeAsync, N as directorySizeAsync, P as formatBytes, _ as loadConfig$1, p as getProject } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { o as formatLongDuration, u as plural } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { c as gitQuiet, l as gitQuietAsync, n as runOperationFileQuiet, r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
|
|
6
|
+
import { r as readWorkspaceState$1, u as workspaceLastUsed } from "./workspace-state-CPSp3mav.mjs";
|
|
7
|
+
import { Bt as unpushedCommitsAsync, Ct as hasUncommittedWorkAsync, D as maintenanceKeepSetting, Dt as listWorktreesAsync, Et as listWorktrees, Gt as removeTemporaryEntryAsync, It as resolveFullRefAsync, J as resolveProjectSettings, Lt as resolveSourceCheckoutAsync, Y as resolveProjectSettingsAsync, _t as dirtyPathsAsync, xt as hasPopulatedSubmodulesAsync, zt as sourceCheckoutOf } from "./settings-B5tCoq9N.mjs";
|
|
8
|
+
import { i as findProjectRoot$1 } from "./project-BiC68mIp.mjs";
|
|
9
|
+
import { F as listAvdsAsync, G as ownedAvdSerialResolverAsync, P as listAvds, V as ownedAvdDirectory, yt as readParked } from "./android-Cjcj8MCw.mjs";
|
|
10
|
+
import { a as unregister, n as readManifest } from "./cache-manifest-BPXRONJz.mjs";
|
|
11
|
+
import { A as workspaceBuildInProgress, Cr as discoverCaches, Ct as deleteParkedSims, Dt as deviceSweepIsScoped, E as collectOwnedDeviceActivityAsync, Q as emptyCaches, St as deleteParkedAvds, T as collectOwnedDeviceActivity, br as phase, bt as collectParkedAvds, d as trimmableCaches, f as stopOwnedMetro, hr as memorySweepIsScoped, ht as waitForGradleExit, i as enforceBudget, it as planCacheEmptying, jt as findStaleProjectDevices, lt as collectGradleVersions, o as machineNumber, r as cacheLabel, u as resolveBudget, ur as collectMemoryReport, ut as deleteGradleVersion, vt as DEVICE_LIST_TIMEOUT_MS, wr as pruneCache, wt as deleteProjectDevices, xt as collectParkedSims, yr as stopIdleGradleDaemons } from "./budget-HyShrIpL.mjs";
|
|
11
12
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, x as listLeaseFiles } from "./activity-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { s as metroStoreRoot } from "./errors-ccaPc4ox.mjs";
|
|
13
|
+
import { B as GC_OUTPUT, H as takeGcResults, a as collectWorkspaceOutputs, c as listWorkspaceDirs, d as workspaceDirRemoved, h as workspaceInUseAsync, i as collectOrphanedWorkspaces, m as workspaceInUse, o as deleteOrphanedWorkspaces, p as withIdleWorkspace, r as clearWorkspaceOutputs, s as isInsideWorkspaces } from "./workspaces-C9w4aeXF.mjs";
|
|
14
|
+
import { N as listBuildLocks, b as leaseIsExpired, g as workspaceActivity, x as listLeaseFiles } from "./activity-BpjwrQXU.mjs";
|
|
15
|
+
import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-BQzvJlzw.mjs";
|
|
16
|
+
import { s as metroStoreRoot } from "./errors-DHm_U5gv.mjs";
|
|
17
17
|
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
18
|
-
import { A as
|
|
19
|
-
import { c as FETCH_FRESH_MS, d as localDefaultBranchAsync, l as fetchDefaultBranchAsync, o as recordPullRequestLookup, p as mergeStateAsync, u as lastFetchedAtAsync } from "./warm-progress-
|
|
20
|
-
import { n as describePullRequest, r as endedPullRequest, s as pullRequestLookups } from "./pull-request-
|
|
18
|
+
import { A as measurePressureAsync, D as measureDisk, E as cacheBlocked, I as lowestFree, L as protectWindowMs, N as diskPressureLevel, O as measureDiskAsync, P as levelFloors, a as matchWorktreeEntry, c as reclaimKeys, i as excludeWatchmanCookies, k as measurePressure, m as removeWorktreeTarget, o as nestedWorktrees, r as excludePodChurn, s as porcelainPath } from "./worktree-CclFIe1Z.mjs";
|
|
19
|
+
import { c as FETCH_FRESH_MS, d as localDefaultBranchAsync, l as fetchDefaultBranchAsync, o as recordPullRequestLookup, p as mergeStateAsync, u as lastFetchedAtAsync } from "./warm-progress-BV3ZPmcY.mjs";
|
|
20
|
+
import { n as describePullRequest, r as endedPullRequest, s as pullRequestLookups } from "./pull-request-CbNlkFok.mjs";
|
|
21
21
|
import { readClaimSet } from "@stim-cli/core/ownership-claim";
|
|
22
22
|
import { existsSync, lstatSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
|
|
23
23
|
import { tmpdir } from "node:os";
|
|
@@ -1700,20 +1700,33 @@ const STIM_PREFIXES = [
|
|
|
1700
1700
|
const STAGING_PREFIX = ".stim-delete-";
|
|
1701
1701
|
const TRACE_PATTERN = /^instruments.*\.ktrace$/;
|
|
1702
1702
|
const TRACE_PROCESSES = /* @__PURE__ */ new Set(["xctrace", "Instruments"]);
|
|
1703
|
+
const SWIFTPM_PATTERN = /^TemporaryDirectory\.[A-Za-z0-9]{6}$/;
|
|
1704
|
+
const SWIFTPM_PROCESSES = /* @__PURE__ */ new Set([
|
|
1705
|
+
"swift",
|
|
1706
|
+
"swift-build",
|
|
1707
|
+
"swift-frontend",
|
|
1708
|
+
"swift-package",
|
|
1709
|
+
"swift-run",
|
|
1710
|
+
"swift-test",
|
|
1711
|
+
"xcodebuild"
|
|
1712
|
+
]);
|
|
1703
1713
|
const REMEDIES = {
|
|
1704
1714
|
stim: "stim gc --delete removes them once they are idle for 24 hours",
|
|
1705
1715
|
xctrace: "stim gc --delete removes them once they are idle for 24 hours and no xctrace or Instruments process runs; export a recording you need first",
|
|
1716
|
+
swiftpm: "stim gc --delete removes them once they are idle for 24 hours and no swift or xcodebuild process runs",
|
|
1706
1717
|
jest: "Jest owns this cache; clear it with `npx jest --clearCache`"
|
|
1707
1718
|
};
|
|
1708
1719
|
const LABELS = {
|
|
1709
1720
|
stim: "Stim temp directories",
|
|
1710
1721
|
xctrace: "xctrace recordings (instruments*.ktrace)",
|
|
1722
|
+
swiftpm: "SwiftPM temp directories (TemporaryDirectory.*)",
|
|
1711
1723
|
jest: "Jest cache"
|
|
1712
1724
|
};
|
|
1713
1725
|
function kindOf(name, stat, jestName) {
|
|
1714
1726
|
const unstaged = name.startsWith(STAGING_PREFIX) ? name.slice(13) : name;
|
|
1715
1727
|
if (stat.isDirectory() && STIM_PREFIXES.some((prefix) => unstaged.startsWith(prefix))) return "stim";
|
|
1716
1728
|
if ((stat.isFile() || stat.isDirectory()) && TRACE_PATTERN.test(name)) return "xctrace";
|
|
1729
|
+
if (stat.isDirectory() && SWIFTPM_PATTERN.test(name)) return "swiftpm";
|
|
1717
1730
|
if (stat.isDirectory() && name === jestName) return "jest";
|
|
1718
1731
|
return null;
|
|
1719
1732
|
}
|
|
@@ -1812,8 +1825,8 @@ function temporaryRoot(env) {
|
|
|
1812
1825
|
}
|
|
1813
1826
|
/**
|
|
1814
1827
|
* Recognized leftovers directly inside the user's TMPDIR, never following a symlink: Stim's own temp directories,
|
|
1815
|
-
* xctrace recordings and Jest's cache.
|
|
1816
|
-
* 24 hours. Null with STIM_HOME set, because TMPDIR is shared by every Stim home, and for the real TMPDIR a test
|
|
1828
|
+
* xctrace recordings, SwiftPM's `TemporaryDirectory.*` and Jest's cache. All but Jest's are deleted, and only once
|
|
1829
|
+
* nothing in them changed for 24 hours. Null with STIM_HOME set, because TMPDIR is shared by every Stim home, and for the real TMPDIR a test
|
|
1817
1830
|
* process recorded in STIM_TEST_GUARD_REAL_TMPDIR.
|
|
1818
1831
|
*/
|
|
1819
1832
|
async function collectTempLeftovers({ now = Date.now(), env = process.env, signal, operation } = {}) {
|
|
@@ -1833,16 +1846,16 @@ async function collectTempLeftovers({ now = Date.now(), env = process.env, signa
|
|
|
1833
1846
|
const registeredProjects = () => Object.keys(loadConfig$1()?.projects ?? {}).flatMap((key) => [key, canonicalKey(key)]);
|
|
1834
1847
|
let projects = registeredProjects();
|
|
1835
1848
|
let executables;
|
|
1836
|
-
const
|
|
1849
|
+
const busy = async (processes) => {
|
|
1837
1850
|
if (executables === void 0) executables = await runningExecutables(operation, signal);
|
|
1838
1851
|
const listed = executables;
|
|
1839
1852
|
if (listed === null) return "the running processes could not be listed";
|
|
1840
|
-
const running = [...
|
|
1853
|
+
const running = [...processes].filter((name) => listed.has(name));
|
|
1841
1854
|
return running.length ? `${running.join(" and ")} is running` : null;
|
|
1842
1855
|
};
|
|
1843
1856
|
const judge = async (path, stat, kind, identity = path) => {
|
|
1844
1857
|
const scan = await walk(path, stat, signal);
|
|
1845
|
-
const kept = now - scan.newest < MIN_AGE_MS ? `modified within the last ${TEMP_LEFTOVER_MIN_AGE_HOURS}h` : kind === "stim" ? stimKept(identity, scan, projects) : scan.unreadable ?? await
|
|
1858
|
+
const kept = now - scan.newest < MIN_AGE_MS ? `modified within the last ${TEMP_LEFTOVER_MIN_AGE_HOURS}h` : kind === "stim" ? stimKept(identity, scan, projects) : scan.unreadable ?? await busy(kind === "xctrace" ? TRACE_PROCESSES : SWIFTPM_PROCESSES);
|
|
1846
1859
|
return {
|
|
1847
1860
|
bytes: scan.bytes,
|
|
1848
1861
|
kept
|
|
@@ -1851,7 +1864,7 @@ async function collectTempLeftovers({ now = Date.now(), env = process.env, signa
|
|
|
1851
1864
|
const recheck = async (staged, original, kind) => {
|
|
1852
1865
|
const stat = await lstatOrError(staged);
|
|
1853
1866
|
if (!stat || "error" in stat || stat.isSymbolicLink()) return "it changed while it was being deleted";
|
|
1854
|
-
if (kind
|
|
1867
|
+
if (kind !== "stim") executables = void 0;
|
|
1855
1868
|
else projects = registeredProjects();
|
|
1856
1869
|
return (await judge(staged, stat, kind, original)).kept;
|
|
1857
1870
|
};
|
|
@@ -1896,6 +1909,7 @@ function summarize(report) {
|
|
|
1896
1909
|
return [
|
|
1897
1910
|
"stim",
|
|
1898
1911
|
"xctrace",
|
|
1912
|
+
"swiftpm",
|
|
1899
1913
|
"jest"
|
|
1900
1914
|
].flatMap((kind) => {
|
|
1901
1915
|
const entries = report.entries.filter((entry) => entry.kind === kind);
|
|
@@ -1950,7 +1964,7 @@ async function deleteTempLeftovers(options = {}, output = GC_OUTPUT) {
|
|
|
1950
1964
|
try {
|
|
1951
1965
|
if (entry.kind === "jest") continue;
|
|
1952
1966
|
const name = basename(entry.path);
|
|
1953
|
-
const staged = entry.kind
|
|
1967
|
+
const staged = entry.kind !== "stim" || name.startsWith(STAGING_PREFIX) ? entry.path : join(report.root, `${STAGING_PREFIX}${name}`);
|
|
1954
1968
|
const before = staged === entry.path ? null : await report.recheck?.(entry.path, entry.path, entry.kind) ?? null;
|
|
1955
1969
|
if (before) {
|
|
1956
1970
|
output.record("tempLeftover", "kept", entry.path, {
|
|
@@ -2062,7 +2076,7 @@ async function planLevel2({ settings, sizes, protectedRoot, pinned, now, operati
|
|
|
2062
2076
|
kind: "would-delete-temp-leftovers",
|
|
2063
2077
|
target: leftovers.root,
|
|
2064
2078
|
bytes: deletable.reduce((sum, entry) => sum + entry.bytes, 0),
|
|
2065
|
-
reason: "disk pressure level 2, Stim temp directories
|
|
2079
|
+
reason: "disk pressure level 2, Stim temp directories, xctrace recordings and SwiftPM temp directories unmodified for 24 hours",
|
|
2066
2080
|
level: 2
|
|
2067
2081
|
});
|
|
2068
2082
|
const options = {
|
|
@@ -2242,7 +2256,7 @@ async function planPressureLevels(level, context) {
|
|
|
2242
2256
|
function triggeringRoot(operation) {
|
|
2243
2257
|
return canonicalPath(findProjectRoot$1(operation?.cwd ?? process.cwd()) ?? join(configDir(), "maintenance", "no-project"));
|
|
2244
2258
|
}
|
|
2245
|
-
async function plannedMaintenance(pressure,
|
|
2259
|
+
async function plannedMaintenance(pressure, recordedSizes, settings, { devices = true, sweep = false, worktrees = false, refresh = true, operation } = {}) {
|
|
2246
2260
|
const env = operation?.env ?? process.env;
|
|
2247
2261
|
const resolved = resolveBudget({ env });
|
|
2248
2262
|
if (resolved.error) throw new Error(resolved.error);
|
|
@@ -2272,6 +2286,7 @@ async function plannedMaintenance(pressure, sizes, settings, { devices = true, s
|
|
|
2272
2286
|
signal: operation?.signal,
|
|
2273
2287
|
operation
|
|
2274
2288
|
});
|
|
2289
|
+
const sizes = recordedSizes.filter((size) => size.category !== "workspace-outputs" || !workspaceDirRemoved(size.dir));
|
|
2275
2290
|
const currentSizes = sizes.map((size) => {
|
|
2276
2291
|
if (size.category === "compilation-cache") return {
|
|
2277
2292
|
...size,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1, v as withDirLock$1, y as withDirLockAsync$1 } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { U as parseDeviceSlotKey, V as deviceSlotKey, d as getConfigDir, q as validateDeviceSlot } from "./config-
|
|
4
|
-
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-
|
|
5
|
-
import { n as runOperationFileQuiet } from "./operation-exec-
|
|
6
|
-
import { c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1 } from "./workspace-state-
|
|
7
|
-
import {
|
|
3
|
+
import { U as parseDeviceSlotKey, V as deviceSlotKey, d as getConfigDir, q as validateDeviceSlot } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { n as runOperationFileQuiet } from "./operation-exec-CUZifp6Z.mjs";
|
|
6
|
+
import { c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1 } from "./workspace-state-CPSp3mav.mjs";
|
|
7
|
+
import { y as resolveBuild } from "./build-cache-CKCzxzxA.mjs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
import { closeSync, fstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { homedir } from "node:os";
|
package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-Bnkerfod.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as formatBytes } from "./config-
|
|
3
|
-
import { o as formatLongDuration } from "./command-output-
|
|
4
|
-
import { F as
|
|
5
|
-
import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-
|
|
1
|
+
import { S as process_identity_exports } from "./exec-VFRpu1iA.mjs";
|
|
2
|
+
import { P as formatBytes } from "./config-BZhXY15H.mjs";
|
|
3
|
+
import { o as formatLongDuration } from "./command-output-BBvS1H6v.mjs";
|
|
4
|
+
import { F as measureDu, I as writeUsageCache, P as canonical, c as listWorkspaceDirs } from "./workspaces-C9w4aeXF.mjs";
|
|
5
|
+
import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-BpjwrQXU.mjs";
|
|
6
6
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
8
|
import { isAbsolute, join, relative, sep } from "node:path";
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as ownership_claim_exports, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
2
|
import { m as workspaceLogsDir$1, t as emulatorLogFile } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { B as deviceSlotFileKey, E as upsertProject, H as deviceSlotPlatforms, W as parseDeviceSlotOption, p as getProject, q as validateDeviceSlot, u as getConcurrencyLimits } from "./config-
|
|
4
|
-
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as
|
|
3
|
+
import { B as deviceSlotFileKey, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync$1, W as parseDeviceSlotOption, p as getProject, q as validateDeviceSlot, u as getConcurrencyLimits } from "./config-BZhXY15H.mjs";
|
|
4
|
+
import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
|
|
5
|
+
import { a as recordWorkspaceUseAsync, f as writeWorkspaceStateAsync, r as readWorkspaceState$1 } from "./workspace-state-CPSp3mav.mjs";
|
|
6
|
+
import { K as resolveCacheProviderConfig, M as metroPortSetting, P as metroWarmupUrlSetting, R as projectSettingsContextAsync, U as remoteEasFallbackSetting, X as resolveSettings, Y as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, it as tunnelModeSetting, lt as detectProviders, z as publicUrlSetting } from "./settings-B5tCoq9N.mjs";
|
|
7
|
+
import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunchAsync } from "./project-BiC68mIp.mjs";
|
|
8
|
+
import { A as listAdbDevices, I as listInstalledSystemImages, St as configuredAndroidEmulatorApp, Y as physicalDeviceModel, Z as probeEmulatorSerial, a as androidDeviceAbi, ct as waitForBoot, nt as resolveOwnedAvdSerialAsync, rt as resolvePhysicalDevice } from "./android-Cjcj8MCw.mjs";
|
|
9
|
+
import { c as pidExists, d as resolveProjectMetro } from "./metro-1pJgCX4U.mjs";
|
|
8
10
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { n as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { n as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { n as
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { r as finishAndroidRun } from "./launch-D-zq8SHG.mjs";
|
|
11
|
+
import { Dn as launchAndroidReleaseApp, En as launchAndroidApp, G as createRunRecorder, Gt as remoteAndroidDeps, H as startBuildProgress, Ht as ensureMetroReachable, J as recordCapacityRefusal, K as readRunEstimates, Ln as exitAfterFlush, M as NO_BUILD_PROGRESS, Qn as uploadRemote, Sn as installAndroidApp, U as tapBuildLog, Un as checkEasAuth, Ut as ensureRemoteBootOwned, V as runFailureRecord, W as thrownRunFailureRecord, X as recordRunStats, Xn as resolveEasCliBin, Z as statsProjectKey$1, Zn as resolveRemote, dn as DEFAULT_METRO_PORT, on as verifyAndroidReleaseLaunch, or as ownedSessionName, qt as resolveRemoteContext, sn as verifyLaunch, t as budgetGate, un as ADB_INSTALL_TIMEOUT_MS, zn as runProcessOperation, zt as binOnPath } from "./budget-HyShrIpL.mjs";
|
|
12
|
+
import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-D5OJsGwA.mjs";
|
|
13
|
+
import { L as acquireBuildSlot, z as releaseBuildSlot } from "./workspaces-C9w4aeXF.mjs";
|
|
14
|
+
import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BpjwrQXU.mjs";
|
|
15
|
+
import { x as storedAppId } from "./build-cache-CKCzxzxA.mjs";
|
|
16
|
+
import { t as CCACHE_NOT_RUN } from "./ccache-h1FKhZeg.mjs";
|
|
17
|
+
import { S as setRemoteLogSink } from "./client-BQsmyp_-.mjs";
|
|
18
|
+
import { a as parseBuildMachineOption, c as resolveBuildPlacement } from "./selection-D5cxEl3t.mjs";
|
|
19
|
+
import { r as hostedMetroSettings } from "./metro-gateway-Bp9gJQAN.mjs";
|
|
20
|
+
import { a as writeHostedAndroidAsync, i as writeDevicePlacementAsync, t as readHostedAndroid } from "./ios-state-CT9nV5SP.mjs";
|
|
21
|
+
import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-Bvb2-ZxD.mjs";
|
|
22
|
+
import { n as verifyCollectorOwnership } from "./ownership-jxxz-19m.mjs";
|
|
23
|
+
import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-QeuJMlnJ.mjs";
|
|
24
|
+
import { c as startDevServer } from "./start-YMpNwLhh.mjs";
|
|
25
|
+
import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-ogEeJ62K.mjs";
|
|
26
|
+
import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-ZYaRALv5.mjs";
|
|
27
|
+
import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-CyDKNTBP.mjs";
|
|
28
|
+
import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-B9w_Qyz3.mjs";
|
|
29
|
+
import { n as devicePlacementRecord } from "./placement-log-DjOXJRIH.mjs";
|
|
30
|
+
import { S as pooledAndroidDevice, a as PLATFORM, b as noDeviceDiagnostic, g as dumpApkManifest, h as displayPath, o as androidBuildOptions, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme } from "./support-Cxj9CmII.mjs";
|
|
31
|
+
import { t as acquireAndroidArtifact } from "./artifact-Co8zixVx.mjs";
|
|
32
|
+
import { a as persistLastBuild, c as androidDeviceSelectorRefusal, i as logPostBuildFailure, n as finishAndroidUpload, o as persistThrownBuild, s as reportAndroidResult, u as resolveAndroidRunPlan } from "./result-CR2vk2cj.mjs";
|
|
33
|
+
import { n as automaticDevicePlacement, r as devicePlacementLine, t as checkEasFallback } from "./eas-fallback-gaZi-dJL.mjs";
|
|
34
|
+
import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-B9FqTBYW.mjs";
|
|
35
|
+
import { t as selectFromPool } from "./device-pool-BIg8MU8l.mjs";
|
|
36
|
+
import { r as finishAndroidRun } from "./launch-D0lPvFFu.mjs";
|
|
36
37
|
import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
|
|
37
|
-
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-
|
|
38
|
+
import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-zCuHGlA8.mjs";
|
|
38
39
|
import { basename, join } from "node:path";
|
|
39
40
|
import { workspaceId } from "@stim-cli/core";
|
|
40
41
|
import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
|
|
@@ -201,8 +202,8 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
201
202
|
note: out,
|
|
202
203
|
enterPhase
|
|
203
204
|
});
|
|
204
|
-
writePlacement(root, slot, run.placement);
|
|
205
|
-
writeLaunch(root, "android", {
|
|
205
|
+
await writePlacement(root, slot, run.placement);
|
|
206
|
+
await writeLaunch(root, "android", {
|
|
206
207
|
appId: packageName,
|
|
207
208
|
deviceId: run.placement.session,
|
|
208
209
|
metroPort,
|
|
@@ -235,7 +236,7 @@ async function finishHostedAndroidRun({ target, artifact, root, slot = "default"
|
|
|
235
236
|
record: report.record,
|
|
236
237
|
startedAt,
|
|
237
238
|
durationMs: now() - started,
|
|
238
|
-
status: "
|
|
239
|
+
status: "ok",
|
|
239
240
|
out
|
|
240
241
|
});
|
|
241
242
|
await finishAndroidUpload(artifact.uploadPending, artifact.remote, phase);
|
|
@@ -339,7 +340,7 @@ function runAndroidOperation(context, root, opts = {}) {
|
|
|
339
340
|
platform: PLATFORM,
|
|
340
341
|
slot: opts.slot ?? "default"
|
|
341
342
|
}, async (claim) => {
|
|
342
|
-
|
|
343
|
+
await recordWorkspaceUseAsync(root, /* @__PURE__ */ new Date(), context.env, context.cwd, context.signal);
|
|
343
344
|
const progress = startBuildProgress({
|
|
344
345
|
root,
|
|
345
346
|
platform: PLATFORM,
|
|
@@ -371,10 +372,10 @@ function runAndroidOperation(context, root, opts = {}) {
|
|
|
371
372
|
}
|
|
372
373
|
}, { write: (line) => context.output("stderr", `${chalk.dim(phaseLine("lock", line))}\n`) });
|
|
373
374
|
}
|
|
374
|
-
function resolveRunAndroidOptions({ context, root, json = false, remoteDevice: commandRemoteBackend = null, resolveSettingsFor = resolveSettings, resolveRemoteDeviceContext = resolveRemoteContext, remoteDeviceDeps: makeRemoteDeviceDeps = remoteAndroidDeps, resolveEasBin = resolveEasCliBin, ensureMetroReachable: ensureRemoteMetro = ensureMetroReachable, ensureRemoteBootOwned: ensureRemoteOwned = ensureRemoteBootOwned, detectRemoteProviders = detectProviders, metroCheck = true, useBuildCache = true, easProfile, resolveEasDevelopmentBuild: resolveEasBuild = resolveEasDevelopmentBuild, variant: variantFlag = null, systemImage: systemImageFlag = null, deviceProfile: deviceProfileFlag, device: deviceFlag = null, wait: waitFlag = void 0, waitConflict = false, acquireLease = acquireRunLease, makeRunLease = runLease, selectPool = selectFromPool, onLeaseSignal = releaseLeaseOnAbort, listDevices = listAdbDevices, deviceModel = physicalDeviceModel, deviceAbi = androidDeviceAbi, isEmulatorDevice = probeEmulatorSerial, readApkPackage = async (apkPath) => apkPackage(await dumpApkManifest(apkPath, { context })), getLimits = getConcurrencyLimits, checkCapacity = checkDeviceCapacity, acquireSlot = acquireBuildSlot, releaseSlot = releaseBuildSlot, ensureDevice = ensureOwnedDevice, listSystemImages = listInstalledSystemImages, listDeviceProfiles, ensureDeviceBooted = ensureBooted, resolveAvdSerial = resolveOwnedAvdSerialAsync, waitForDeviceBoot = waitForBoot, dataFreeBytes, trimCaches, wipeDevice, resolveMetro = resolveProjectMetro, warmMetro: prewarmMetro = warmMetro, startServer = startDevServer, readState = readWorkspaceState$1, pidAlive = pidExists, verifyCollector = verifyCollectorOwnership, verifyLaunched = verifyLaunch, ensureStorage = ensureWorkspaceStorageSafely, acquireLock = acquireBuildLock, releaseLock = releaseBuildLock, waitForBuild: waitForBuild$1 = waitForBuild, easAuth = checkEasAuth, resolveRemoteBuild = resolveRemote, uploadRemoteBuild = uploadRemote, resolveCacheProvider = resolveCacheProviderConfig, loadCacheProviderModule = loadCacheProvider, install = installAndroidApp, launch = launchAndroidApp, launchRelease = launchAndroidReleaseApp, verifyReleaseLaunched = verifyAndroidReleaseLaunch, resolveDevClientScheme = (projectRoot, apkPath, options) => androidDevClientScheme(projectRoot, apkPath, {
|
|
375
|
+
function resolveRunAndroidOptions({ context, root, json = false, remoteDevice: commandRemoteBackend = null, resolveSettingsFor = resolveSettings, resolveRemoteDeviceContext = resolveRemoteContext, remoteDeviceDeps: makeRemoteDeviceDeps = remoteAndroidDeps, resolveEasBin = resolveEasCliBin, ensureMetroReachable: ensureRemoteMetro = ensureMetroReachable, ensureRemoteBootOwned: ensureRemoteOwned = ensureRemoteBootOwned, detectRemoteProviders = detectProviders, metroCheck = true, useBuildCache = true, easProfile, resolveEasDevelopmentBuild: resolveEasBuild = resolveEasDevelopmentBuild, variant: variantFlag = null, systemImage: systemImageFlag = null, deviceProfile: deviceProfileFlag, device: deviceFlag = null, wait: waitFlag = void 0, waitConflict = false, acquireLease = acquireRunLease, makeRunLease = runLease, selectPool = selectFromPool, onLeaseSignal = releaseLeaseOnAbort, listDevices = listAdbDevices, deviceModel = physicalDeviceModel, deviceAbi = androidDeviceAbi, isEmulatorDevice = probeEmulatorSerial, readApkPackage = async (apkPath) => apkPackage(await dumpApkManifest(apkPath, { context })), getLimits = getConcurrencyLimits, checkCapacity = checkDeviceCapacity, acquireSlot = acquireBuildSlot, releaseSlot = releaseBuildSlot, ensureDevice = ensureOwnedDevice, listSystemImages = listInstalledSystemImages, listDeviceProfiles, ensureDeviceBooted = ensureBooted, resolveAvdSerial = resolveOwnedAvdSerialAsync, waitForDeviceBoot = waitForBoot, dataFreeBytes, trimCaches, wipeDevice, resolveMetro = resolveProjectMetro, warmMetro: prewarmMetro = warmMetro, startServer = startDevServer, readState = readWorkspaceState$1, pidAlive = pidExists, verifyCollector = verifyCollectorOwnership, verifyLaunched = verifyLaunch, ensureStorage = ensureWorkspaceStorageSafely, acquireLock = acquireBuildLock, releaseLock = releaseBuildLock, waitForBuild: waitForBuild$1 = waitForBuild, easAuth = checkEasAuth, resolveRemoteBuild = resolveRemote, uploadRemoteBuild = uploadRemote, resolveCacheProvider = resolveCacheProviderConfig, loadCacheProviderModule = loadCacheProvider, storedAppId: storedAppId$1 = storedAppId, install = installAndroidApp, launch = launchAndroidApp, launchRelease = launchAndroidReleaseApp, verifyReleaseLaunched = verifyAndroidReleaseLaunch, resolveDevClientScheme = (projectRoot, apkPath, options) => androidDevClientScheme(projectRoot, apkPath, {
|
|
375
376
|
...options,
|
|
376
377
|
context
|
|
377
|
-
}), spawn = (cmd, args, opts) => getExecutor().spawn(cmd, args, opts), kill = (pid, signal) => process.kill(pid, signal), createWriter = createNdjsonWriter, writeLaunch =
|
|
378
|
+
}), spawn = (cmd, args, opts) => getExecutor().spawn(cmd, args, opts), kill = (pid, signal) => process.kill(pid, signal), createWriter = createNdjsonWriter, writeLaunch = writeWorkspaceLaunchAsync, writeState = writeWorkspaceStateAsync, recordBuild, recordStats = recordRunStats, recordCapacityRefusal: recordRefusal, readEstimates = readRunEstimates, now = Date.now, out = (line) => context ? context.output("stderr", `${line}\n`) : console.error(line), emit = (line) => context ? context.output("stdout", `${line}\n`) : console.log(line) } = {}) {
|
|
378
379
|
return {
|
|
379
380
|
root,
|
|
380
381
|
json,
|
|
@@ -434,6 +435,7 @@ function resolveRunAndroidOptions({ context, root, json = false, remoteDevice: c
|
|
|
434
435
|
uploadRemoteBuild,
|
|
435
436
|
resolveCacheProvider,
|
|
436
437
|
loadCacheProviderModule,
|
|
438
|
+
storedAppId: storedAppId$1,
|
|
437
439
|
install,
|
|
438
440
|
launch,
|
|
439
441
|
launchRelease,
|
|
@@ -512,7 +514,7 @@ function avdSetupFailure(error, root, logFile) {
|
|
|
512
514
|
}
|
|
513
515
|
async function runAndroid(options = {}) {
|
|
514
516
|
const { context } = options;
|
|
515
|
-
let { root, json, commandRemoteBackend, resolveSettingsFor, resolveRemoteDeviceContext, makeRemoteDeviceDeps, resolveEasBin, ensureRemoteMetro, ensureRemoteOwned, detectRemoteProviders, metroCheck, useBuildCache: requestedBuildCache, easProfile, resolveEasBuild, variantFlag, systemImageFlag, deviceProfileFlag, deviceFlag, waitFlag, waitConflict, acquireLease, makeRunLease, selectPool, onLeaseSignal, listDevices, deviceModel, deviceAbi, isEmulatorDevice, readApkPackage, getLimits, checkCapacity, acquireSlot, releaseSlot, ensureDevice, listSystemImages, listDeviceProfiles, ensureDeviceBooted, resolveAvdSerial, waitForDeviceBoot, dataFreeBytes, trimCaches, wipeDevice, resolveMetro, prewarmMetro, startServer, readState, pidAlive, verifyCollector, verifyLaunched, ensureStorage, acquireLock, releaseLock, waitForBuild, easAuth, resolveRemoteBuild, uploadRemoteBuild, resolveCacheProvider, loadCacheProviderModule, install, launch, launchRelease, verifyReleaseLaunched, resolveDevClientScheme, spawn, kill, createWriter, writeLaunch, writeState, recordBuild, recordStats, recordCapacityRefusal: recordRefusal = recordCapacityRefusal, readEstimates, now, out, emit } = androidSlotOptions(options);
|
|
517
|
+
let { root, json, commandRemoteBackend, resolveSettingsFor, resolveRemoteDeviceContext, makeRemoteDeviceDeps, resolveEasBin, ensureRemoteMetro, ensureRemoteOwned, detectRemoteProviders, metroCheck, useBuildCache: requestedBuildCache, easProfile, resolveEasBuild, variantFlag, systemImageFlag, deviceProfileFlag, deviceFlag, waitFlag, waitConflict, acquireLease, makeRunLease, selectPool, onLeaseSignal, listDevices, deviceModel, deviceAbi, isEmulatorDevice, readApkPackage, getLimits, checkCapacity, acquireSlot, releaseSlot, ensureDevice, listSystemImages, listDeviceProfiles, ensureDeviceBooted, resolveAvdSerial, waitForDeviceBoot, dataFreeBytes, trimCaches, wipeDevice, resolveMetro, prewarmMetro, startServer, readState, pidAlive, verifyCollector, verifyLaunched, ensureStorage, acquireLock, releaseLock, waitForBuild, easAuth, resolveRemoteBuild, uploadRemoteBuild, resolveCacheProvider, loadCacheProviderModule, storedAppId, install, launch, launchRelease, verifyReleaseLaunched, resolveDevClientScheme, spawn, kill, createWriter, writeLaunch, writeState, recordBuild, recordStats, recordCapacityRefusal: recordRefusal = recordCapacityRefusal, readEstimates, now, out, emit } = androidSlotOptions(options);
|
|
516
518
|
const progress = options.progress ?? NO_BUILD_PROGRESS;
|
|
517
519
|
const slot = validateDeviceSlot(options.slot);
|
|
518
520
|
const started = now();
|
|
@@ -589,13 +591,14 @@ async function runAndroid(options = {}) {
|
|
|
589
591
|
const recordRun = stats.record;
|
|
590
592
|
let ccacheActivity = CCACHE_NOT_RUN;
|
|
591
593
|
let reclaimed = [];
|
|
594
|
+
let artifactAcquired = false;
|
|
592
595
|
const fail = (code, message, remedy, { lastBuildStatus = false, setup = false, diagnostics = [], buildDiagnostics: rawDiagnostics = [], retainedClaimRoots, lines = [], logPath = null, lease } = {}) => {
|
|
593
596
|
const cancellation = cancelledFailure(context, PLATFORM, {
|
|
594
597
|
code,
|
|
595
598
|
message
|
|
596
599
|
});
|
|
597
600
|
if (cancellation) ({code, message, remedy, lines} = cancellation);
|
|
598
|
-
if (lastBuildStatus) persistLastBuild({
|
|
601
|
+
if (lastBuildStatus || artifactAcquired) persistLastBuild({
|
|
599
602
|
recordBuild,
|
|
600
603
|
root,
|
|
601
604
|
record,
|
|
@@ -606,6 +609,11 @@ async function runAndroid(options = {}) {
|
|
|
606
609
|
diagnostics: rawDiagnostics,
|
|
607
610
|
out
|
|
608
611
|
});
|
|
612
|
+
logPostBuildFailure(artifactAcquired, writer, runFailureRecord({
|
|
613
|
+
code,
|
|
614
|
+
message,
|
|
615
|
+
phase: progress.phase()
|
|
616
|
+
}));
|
|
609
617
|
out(phaseLine("error", chalk.red(`${code}: ${message}`)));
|
|
610
618
|
for (const diagnostic of diagnostics) out(phaseLine("error", chalk.red(diagnostic)));
|
|
611
619
|
for (const line of lines) out(phaseLine("", chalk.dim(line)));
|
|
@@ -684,8 +692,10 @@ async function runAndroid(options = {}) {
|
|
|
684
692
|
wait: waitFlag,
|
|
685
693
|
waitConflict,
|
|
686
694
|
remote: commandRemoteBackend,
|
|
687
|
-
buildCache: requestedBuildCache
|
|
695
|
+
buildCache: requestedBuildCache,
|
|
696
|
+
buildMachine: placement.selected
|
|
688
697
|
}, {
|
|
698
|
+
preflight: integration.preflight,
|
|
689
699
|
resolveCacheProvider,
|
|
690
700
|
runtimeKind: integration.runtimeKind,
|
|
691
701
|
variantProblem: integration.variantProblem,
|
|
@@ -766,7 +776,7 @@ async function runAndroid(options = {}) {
|
|
|
766
776
|
if ("failure" in hosting) return fail(hosting.failure.code, hosting.failure.message, hosting.failure.remedy);
|
|
767
777
|
const { target, hostedTarget, budget, selectors } = hosting;
|
|
768
778
|
record.devicePlacement = hosting.devicePlacement;
|
|
769
|
-
|
|
779
|
+
await writeDevicePlacementAsync(root, slot, PLATFORM, record.devicePlacement);
|
|
770
780
|
const physical = target.kind === "physical";
|
|
771
781
|
const remoteBackend = target.kind === "remote" ? target.backend : null;
|
|
772
782
|
if (hostedTarget) {
|
|
@@ -811,12 +821,12 @@ async function runAndroid(options = {}) {
|
|
|
811
821
|
const appIds = await integration.appIds();
|
|
812
822
|
let androidPackage = appIds.androidPackage;
|
|
813
823
|
record.bundleId = androidPackage;
|
|
814
|
-
const registerProject = () => upsertProject(root, {
|
|
824
|
+
const registerProject = () => withConfigLockAsync$1(() => upsertProject(root, {
|
|
815
825
|
bundleId: appIds.bundleId ?? void 0,
|
|
816
826
|
androidPackage: androidPackage ?? void 0,
|
|
817
827
|
isExpo
|
|
818
|
-
});
|
|
819
|
-
if (remoteBackend !== "eas") registerProject();
|
|
828
|
+
}));
|
|
829
|
+
if (remoteBackend !== "eas") await registerProject();
|
|
820
830
|
const project = getProject(root);
|
|
821
831
|
const label = projectShortcut(root, project);
|
|
822
832
|
let remoteDevice = null;
|
|
@@ -1046,7 +1056,9 @@ async function runAndroid(options = {}) {
|
|
|
1046
1056
|
platform: "android",
|
|
1047
1057
|
isExpo,
|
|
1048
1058
|
appId: androidPackage,
|
|
1049
|
-
bundleUrl: metroWarmupUrlSetting(settings, "android")
|
|
1059
|
+
bundleUrl: metroWarmupUrlSetting(settings, "android"),
|
|
1060
|
+
logsDir,
|
|
1061
|
+
root
|
|
1050
1062
|
});
|
|
1051
1063
|
const acquiredArtifact = await acquireAndroidArtifact({
|
|
1052
1064
|
context,
|
|
@@ -1101,6 +1113,7 @@ async function runAndroid(options = {}) {
|
|
|
1101
1113
|
resolveRemoteBuild,
|
|
1102
1114
|
uploadRemoteBuild,
|
|
1103
1115
|
loadCacheProviderModule,
|
|
1116
|
+
storedAppId,
|
|
1104
1117
|
acquireSlot,
|
|
1105
1118
|
releaseSlot,
|
|
1106
1119
|
now
|
|
@@ -1116,6 +1129,7 @@ async function runAndroid(options = {}) {
|
|
|
1116
1129
|
ccacheActivity = artifact.ccache;
|
|
1117
1130
|
androidPackage = artifact.androidPackage;
|
|
1118
1131
|
record.appPath = apkPath;
|
|
1132
|
+
artifactAcquired = true;
|
|
1119
1133
|
if (runCancellation(context)) return fail("STIM_CANCELLED", "before install");
|
|
1120
1134
|
if (hostedTarget) return finishHostedAndroidRun({
|
|
1121
1135
|
target: hostedTarget,
|
|
@@ -1129,7 +1143,7 @@ async function runAndroid(options = {}) {
|
|
|
1129
1143
|
logsDir,
|
|
1130
1144
|
selectors,
|
|
1131
1145
|
place: options.placeHostedAndroid ?? placeHostedAndroid,
|
|
1132
|
-
writePlacement: options.writeHostedAndroid ??
|
|
1146
|
+
writePlacement: options.writeHostedAndroid ?? writeHostedAndroidAsync,
|
|
1133
1147
|
verifyLaunch: verifyLaunched,
|
|
1134
1148
|
writeLaunch,
|
|
1135
1149
|
readApkPackage,
|
|
@@ -1258,7 +1272,7 @@ async function runAndroid(options = {}) {
|
|
|
1258
1272
|
writer,
|
|
1259
1273
|
phase,
|
|
1260
1274
|
fail,
|
|
1261
|
-
readApkPackage,
|
|
1275
|
+
readApkPackage: (path) => artifact.apkPackage ?? readApkPackage(path),
|
|
1262
1276
|
readProjectPackage: async () => (await integration.appIds()).androidPackage,
|
|
1263
1277
|
packageRemedy: integration.packageRemedy,
|
|
1264
1278
|
install,
|
|
@@ -1308,6 +1322,17 @@ async function runAndroid(options = {}) {
|
|
|
1308
1322
|
message: "while finishing the run"
|
|
1309
1323
|
});
|
|
1310
1324
|
if (cancelled) return fail(cancelled.code, cancelled.message, cancelled.remedy, { lastBuildStatus: true });
|
|
1325
|
+
logPostBuildFailure(artifactAcquired, writer, thrownRunFailureRecord(error, progress.phase()));
|
|
1326
|
+
persistThrownBuild({
|
|
1327
|
+
acquired: artifactAcquired,
|
|
1328
|
+
error,
|
|
1329
|
+
recordBuild,
|
|
1330
|
+
root,
|
|
1331
|
+
record,
|
|
1332
|
+
startedAt,
|
|
1333
|
+
durationMs: now() - started,
|
|
1334
|
+
out
|
|
1335
|
+
});
|
|
1311
1336
|
recordRun({
|
|
1312
1337
|
failed: true,
|
|
1313
1338
|
durationMs: now() - started
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-
|
|
2
|
-
import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-
|
|
3
|
-
import { r as lastBuildRecord, t as androidFacts } from "./result-
|
|
4
|
-
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-
|
|
5
|
-
import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-
|
|
1
|
+
import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-BBvS1H6v.mjs";
|
|
2
|
+
import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-Cxj9CmII.mjs";
|
|
3
|
+
import { r as lastBuildRecord, t as androidFacts } from "./result-CR2vk2cj.mjs";
|
|
4
|
+
import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-BGwuK3Mc.mjs";
|
|
5
|
+
import { a as killPreviousCollector, i as collectorLogFile, o as startCollector } from "./launch-D0lPvFFu.mjs";
|
|
6
6
|
export { NO_DEVICE, NO_FINGERPRINT, androidDevClientScheme, androidFacts, androidSystemImageSetting, androidVariantSetting, apkDevClientFacts, apkPackage, collectorLogFile, androidCommand as default, displayPath, dumpApkManifest, findAapt, formatDuration, isReleaseVariant, killPreviousCollector, lastBuildRecord, noDeviceDiagnostic, parseXmltree, phaseLine, registerAndroid, resolveSystemImage, resolveVariant, runAndroid, runAndroidOperation, shortHash, startCollector };
|