stim 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-DVsvSwf7.mjs} +1 -1
- package/dist/{act-BbHS3oV8.mjs → act-C-BqJEpu.mjs} +157 -35
- package/dist/{activity-BpjwrQXU.mjs → activity-Lnb_EoRY.mjs} +4 -5
- package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-DbXy5tg8.mjs} +4 -4
- package/dist/{android-saBeB4lr.mjs → android-B5P81yI-.mjs} +1 -1
- package/dist/{android-CNZgRC-4.mjs → android-CSbLRD53.mjs} +5 -5
- package/dist/{android-BGwuK3Mc.mjs → android-CiNQw3kq.mjs} +73 -49
- package/dist/{android-Cjcj8MCw.mjs → android-DTAcRwBC.mjs} +81 -34
- package/dist/{android-cas-BVqh2Zep.mjs → android-cas-BTVhZ0Qs.mjs} +4 -4
- package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
- package/dist/api.d.mts +8 -5
- package/dist/api.mjs +27 -27
- package/dist/apk-signed-tail-B46U9hXc.mjs +142 -0
- package/dist/{artifact-Co8zixVx.mjs → artifact-BxREhAaV.mjs} +23 -18
- package/dist/{artifact-DN8JNwqS.mjs → artifact-CsAP6AGK.mjs} +35 -20
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/{browser-web-CCgZsHmI.mjs → browser-web-rYPyqhTf.mjs} +11 -12
- package/dist/{budget-HyShrIpL.mjs → budget-k2mZGvvk.mjs} +196 -33
- package/dist/{build-CAiw8Ezm.mjs → build-DPhApsjV.mjs} +26 -23
- package/dist/{build-cache-CKCzxzxA.mjs → build-cache-DrXNCy3T.mjs} +103 -21
- package/dist/{build-plan-zCuHGlA8.mjs → build-plan-DrMMdayj.mjs} +5 -5
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-BEZ9Bpl1.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-h1FKhZeg.mjs → ccache-Bx5TbxwG.mjs} +6 -6
- package/dist/{cli-C4w607Pz.mjs → cli-BBKFGOFl.mjs} +19 -19
- package/dist/cli.mjs +1 -1
- package/dist/{client-BQsmyp_-.mjs → client-D9CaRks-.mjs} +36 -61
- package/dist/collector-run.mjs +4 -4
- package/dist/{command-output-BBvS1H6v.mjs → command-output-BF5AR2dL.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-BktkY_zC.mjs} +321 -15
- package/dist/{launch-DscF1QfM.mjs → dependencies-Dw6wfQdv.mjs} +258 -255
- package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-DFB41vfr.mjs} +1 -1
- package/dist/{dev-client-CHoXXZeg.mjs → dev-client-DXR_tPVY.mjs} +2 -2
- package/dist/{device-B9FqTBYW.mjs → device-BK-zwyd_.mjs} +13 -13
- package/dist/{device-F5-4z9ef.mjs → device-BcYeHSFu.mjs} +14 -14
- package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-DCSvUF0l.mjs} +10 -17
- package/dist/device-host-worker.mjs +11 -13
- package/dist/{device-ios-DkHBrmvH.mjs → device-ios-BLGfXQeK.mjs} +49 -17
- package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-BmvIl7bI.mjs} +4 -4
- package/dist/{device-pool-BIg8MU8l.mjs → device-pool-Dluix4H3.mjs} +3 -3
- package/dist/{doctor-k3P3PizH.mjs → doctor-Bhg1ii70.mjs} +14 -14
- package/dist/{doctor-A_Nr_fDe.mjs → doctor-Cp-BhzTS.mjs} +1 -1
- package/dist/{doctor-Bm8TVpGn.mjs → doctor-OnwP94ne.mjs} +72 -23
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-D3a04Mhu.mjs} +8 -2
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-BStK05nt.mjs} +4 -4
- package/dist/{eas-build-CyDKNTBP.mjs → eas-build-Dsj93iM9.mjs} +2 -2
- package/dist/{eas-fallback-gaZi-dJL.mjs → eas-fallback-FwkeqqGi.mjs} +10 -10
- package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-B5vygTiD.mjs} +5 -5
- package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-BOOm9Db7.mjs} +8 -8
- package/dist/{gc-eaz403W6.mjs → gc-C_79zvz4.mjs} +2 -2
- package/dist/{gc-B9jcnmIk.mjs → gc-ldgr-hXU.mjs} +74 -43
- package/dist/{guide-DR0K0xW9.mjs → guide-D7K0X6KG.mjs} +272 -52
- package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-Bk54ej6n.mjs} +3 -3
- package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-fHO8yqzc.mjs} +5 -5
- package/dist/{hosted-ios-RtVcJH3u.mjs → hosted-ios-D55QhYaD.mjs} +1 -1
- package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-BfbmDM4M.mjs} +17 -11
- package/dist/hosted-logs-sync-B0pvmOk-.mjs +195 -0
- package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-CPl0OZ9h.mjs} +5 -5
- package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CpDB3-PO.mjs} +6 -7
- package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-FfxL1KdG.mjs} +22 -9
- package/dist/{ios-Dvt97HgQ.mjs → ios-B7-lToDu.mjs} +8 -8
- package/dist/{ios-BQzvJlzw.mjs → ios-WxpDJ5T1.mjs} +72 -5
- package/dist/{ios-device-CKSvk0bu.mjs → ios-device-CsyryvpT.mjs} +1 -1
- package/dist/{ios-BRVM8b0P.mjs → ios-ftxdQbJS.mjs} +74 -46
- package/dist/{ios-project-DCUDo06I.mjs → ios-project-Ty5pHl9O.mjs} +6 -6
- package/dist/{ios-state-CT9nV5SP.mjs → ios-state-Cw7-WQf2.mjs} +1 -1
- package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-BMhXYVDS.mjs} +4 -4
- package/dist/{launch-D0lPvFFu.mjs → launch-DOp8RjDz.mjs} +31 -26
- package/dist/{logs-BsIRre8x.mjs → logs-dQDki6Tt.mjs} +9 -173
- package/dist/{logs-Crs9y34Z.mjs → logs-s1dRIG1E.mjs} +85 -36
- package/dist/{macos-CcUlJPMu.mjs → macos-B0VEV3Gf.mjs} +1 -1
- package/dist/{macos-D477nfzH.mjs → macos-DBBPNnIA.mjs} +18 -19
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +28 -11
- package/dist/{metro-1pJgCX4U.mjs → metro-CjC10t6E.mjs} +2 -2
- package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-B6_PgD0L.mjs} +2 -3
- package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BG0j1X4g.mjs} +2 -2
- package/dist/{native-android-BvMizJn1.mjs → native-android-CL2NGiik.mjs} +17 -17
- package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-btSUulme.mjs} +3 -3
- package/dist/{native-run-D5OJsGwA.mjs → native-run-BfIDFKLH.mjs} +2 -3
- package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-Dq3RBcON.mjs} +6 -7
- package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-BW7H8JGu.mjs} +2 -2
- package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-CBXJAxfC.mjs} +15 -16
- package/dist/offload-worker.d.mts +3 -1
- package/dist/offload-worker.mjs +31 -21
- package/dist/{ownership-jxxz-19m.mjs → ownership-BjYvMNX_.mjs} +2 -2
- package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-lmj6kcPm.mjs} +3 -3
- package/dist/{placement-log-DjOXJRIH.mjs → placement-log-DIFPQAXp.mjs} +1 -1
- package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-IiiSQhtz.mjs} +3 -3
- package/dist/{ports-DtS1Amb0.mjs → ports-C2_w1Z0Z.mjs} +3 -3
- package/dist/prebuild-gmouvmJZ.mjs +1247 -0
- package/dist/{project-BiC68mIp.mjs → project-BUu6Is4k.mjs} +15 -16
- package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-Cgg99REN.mjs} +47 -33
- package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-oNwqF5Wb.mjs} +7 -7
- package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-BhA3KUte.mjs} +49 -8
- package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-B-nf4rjN.mjs} +37 -23
- package/dist/{recordings-BaoQ0t-J.mjs → recordings-BldzVKq0.mjs} +1 -1
- package/dist/{reload-Beftw2X3.mjs → reload-C9OduiNc.mjs} +1 -1
- package/dist/{reload-FbSgMF8x.mjs → reload-CCR7KC_l.mjs} +14 -14
- package/dist/{remote-BuZj6AyU.mjs → remote-C8S7FlPF.mjs} +7 -7
- package/dist/{result-CR2vk2cj.mjs → result-7F5hEwQJ.mjs} +16 -16
- package/dist/{run-BtzE09Dl.mjs → run-BqB0v3pt.mjs} +1 -1
- package/dist/{selection-D5cxEl3t.mjs → selection-BNPBZ6T5.mjs} +155 -42
- package/dist/{server-bare-CH9X0RLn.mjs → server-bare-A75rDIdD.mjs} +1 -1
- package/dist/{server-command-CaBbDNU2.mjs → server-command-CssKFOD7.mjs} +4 -4
- package/dist/{server-expo-Ck8EIidM.mjs → server-expo-eQfOdydb.mjs} +2 -2
- package/dist/server-expo-wvcj5tiZ.mjs +2 -0
- package/dist/{settings-B5tCoq9N.mjs → settings-CosW5X-S.mjs} +1 -1
- package/dist/{settings-DzH9mGQZ.mjs → settings-OaGQF-ri.mjs} +1 -1
- package/dist/{settings-write-n0zwfohx.mjs → settings-write-QjYfSrjF.mjs} +5 -5
- package/dist/settings.schema.json +33 -6
- package/dist/{simslim-BjxszUAb.mjs → simslim-Bax1qcxu.mjs} +3 -2
- package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-CYCEhfBY.mjs} +6 -6
- package/dist/{stage-D8xlRU2D.mjs → stage-jKQ7CP_B.mjs} +1 -1
- package/dist/{start-C1JLjkNw.mjs → start-C_wefNKB.mjs} +1 -1
- package/dist/{start-YMpNwLhh.mjs → start-_BdJ32cZ.mjs} +9 -10
- package/dist/{state-DMRNP7-4.mjs → state-C1i2nMOP.mjs} +2 -3
- package/dist/{state-DPaM3u5K.mjs → state-C4OdpOTF.mjs} +1 -2
- package/dist/{stats-CP7STzZw.mjs → stats-tEpEEH-u.mjs} +4 -4
- package/dist/{status-cNw6i0_t.mjs → status-B9M7x4CZ.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-CRXz-Gtj.mjs} +1 -1
- package/dist/{status-CRLiJ-O_.mjs → status-DQrqodLj.mjs} +22 -23
- package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-B5wDIH_o.mjs} +4 -4
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-6Dqp-gjX.mjs} +1 -1
- package/dist/{stop-Br7LKxBE.mjs → stop-CmdNhGlC.mjs} +2 -2
- package/dist/{stop-Db9Kh-UA.mjs → stop-DRqQVqDJ.mjs} +21 -19
- package/dist/{stop-COP6PQqw.mjs → stop-ySNQHXMG.mjs} +4 -5
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +14 -15
- package/dist/{support-Cxj9CmII.mjs → support-BGSCBoib.mjs} +4 -4
- package/dist/{support-qKcbgmI5.mjs → support-CVOCp0Ft.mjs} +9 -9
- package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-CfUzt_0Z.mjs} +1 -1
- package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-x6HPpl_2.mjs} +9 -9
- package/dist/toolchain-DoavrvIA.mjs +2 -0
- package/dist/toolchain-J4J8MrAr.mjs +2107 -0
- package/dist/trigger-DzJu208Q.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-KVaWWNyn.mjs} +1 -1
- package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-DvhTX_eu.mjs} +3 -4
- package/dist/web-BFLueSh-.mjs +2 -0
- package/dist/{web-B4Yjyt1G.mjs → web-Bihbf7-u.mjs} +8 -9
- package/dist/web-run.mjs +4 -4
- package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-pUg3_RRA.mjs} +45 -7
- package/dist/{workspaces-C9w4aeXF.mjs → workspaces-g2lhdBXF.mjs} +17 -17
- package/dist/{worktree-CclFIe1Z.mjs → worktree-BKuklFh_.mjs} +34 -31
- package/dist/{worktree-Ct9Gk3KL.mjs → worktree-Bm4cb-nU.mjs} +1 -1
- package/package.json +8 -8
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-JUaqOLpc.mjs +0 -501
- package/dist/server-expo-C16Zf2k7.mjs +0 -2
- package/dist/toolchain-DB1aeqxO.mjs +0 -2
- package/dist/toolchain-VzLJzZ7O.mjs +0 -908
- package/dist/trigger-BLsHgAGR.mjs +0 -2
- package/dist/web-DS4UDWvf.mjs +0 -2
- package/dist/xcode-CiIIDnuD.mjs +0 -910
|
@@ -2,7 +2,7 @@ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
|
2
2
|
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
3
3
|
import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
|
|
4
4
|
import { n as windowsLauncherArgs } from "./detached-entry-KmieOKgN.mjs";
|
|
5
|
-
import { n as stampAttempt, r as due, t as capChildLog } from "./attempt-
|
|
5
|
+
import { n as stampAttempt, r as due, t as capChildLog } from "./attempt-ClyJlZPT.mjs";
|
|
6
6
|
import { readClaimSet } from "@stim-cli/core/ownership-claim";
|
|
7
7
|
import { closeSync, openSync } from "node:fs";
|
|
8
8
|
import { maintenanceChildLogFile, maintenanceRunClaims, readMaintenanceAttempt, readMaintenanceState } from "@stim-cli/core/state";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, E as debugLog, l as WorkspaceProcessCleanupError, n as isTimeoutError, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { E as workspaceDir, M as withDirLock, _ as ensureWorkspaceStorage, h as discoverAgentSessions, m as attributeAgentSessions, o as updateWorkspaceState, p as agentKey } from "./workspace-state-pUg3_RRA.mjs";
|
|
3
3
|
import { l as gitQuietAsync, o as git$1, s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { V as ownedAvdDirectory } from "./android-Cjcj8MCw.mjs";
|
|
4
|
+
import { Tt as linkedWorktreesOnDisk, bt as gitCommonDirOnDisk } from "./settings-CosW5X-S.mjs";
|
|
5
|
+
import { V as ownedAvdDirectory } from "./android-DTAcRwBC.mjs";
|
|
7
6
|
import { s as pullRequestLookups } from "./pull-request-CbNlkFok.mjs";
|
|
8
7
|
import { clearClaimChild, markClaimChildPending, releaseClaim, setClaimChild, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
9
8
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-
|
|
3
|
-
import { f as refuseNoProject, l as phaseLine } from "./command-output-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { o as readWebRecord, r as cdpEndpoint } from "./state-DMRNP7-4.mjs";
|
|
1
|
+
import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-pUg3_RRA.mjs";
|
|
2
|
+
import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-BktkY_zC.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-BF5AR2dL.mjs";
|
|
4
|
+
import { Y as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, tt as settingShapeErrors } from "./settings-CosW5X-S.mjs";
|
|
5
|
+
import { f as projectRegistry, n as findCommandWorkspace } from "./project-BUu6Is4k.mjs";
|
|
6
|
+
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-6Dqp-gjX.mjs";
|
|
7
|
+
import { o as readWebRecord, r as cdpEndpoint } from "./state-C1i2nMOP.mjs";
|
|
9
8
|
import { t as liveWebRecord } from "./page-CzEA_-5_.mjs";
|
|
10
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
9
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-Dq3RBcON.mjs";
|
|
11
10
|
import chalk from "chalk";
|
|
12
11
|
//#region src/commands/web.ts
|
|
13
12
|
const printNote = (line) => console.error(line);
|
package/dist/web-run.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, S as process_identity_exports, o as cancellableSleep, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { f as signalProcessTree } from "./metro-
|
|
2
|
+
import { Tt as recordCreatedDevice } from "./android-DTAcRwBC.mjs";
|
|
3
|
+
import { f as signalProcessTree } from "./metro-CjC10t6E.mjs";
|
|
4
4
|
import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
|
|
5
|
-
import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-
|
|
6
|
-
import { l as probeWebDrivers } from "./activity-
|
|
5
|
+
import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-C1i2nMOP.mjs";
|
|
6
|
+
import { l as probeWebDrivers } from "./activity-Lnb_EoRY.mjs";
|
|
7
7
|
import { t as connectOwnedBrowser } from "./cdp-BG3FJCCx.mjs";
|
|
8
8
|
import { t as relaunchWithLogFile } from "./detached-entry-KmieOKgN.mjs";
|
|
9
9
|
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-BvV8ssI3.mjs";
|
|
@@ -1,12 +1,50 @@
|
|
|
1
1
|
import { S as process_identity_exports, t as getExecutor } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { st as workspaceHiddenSetting } from "./settings-B5tCoq9N.mjs";
|
|
2
|
+
import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-BktkY_zC.mjs";
|
|
3
|
+
import { st as workspaceHiddenSetting } from "./settings-CosW5X-S.mjs";
|
|
5
4
|
import { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
6
5
|
import { homedir } from "node:os";
|
|
7
6
|
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
8
|
-
import {
|
|
7
|
+
import { buildCacheRoot as sharedBuildCache, ensurePrivateDir, withDirLock as withDirLock$1, withDirLockAsync as withDirLockAsync$1, workspaceId as workspaceId$1, workspaceName as workspaceName$1, workspaceStateDir as workspaceDir } from "@stim-cli/core";
|
|
8
|
+
import { WORKSPACE_AGENT_KEY, emulatorLogFile, isJsonObject, readJsonObject, readWorkspaceState, readWorkspaceState as readWorkspaceState$1, sharedCcache as sharedCcache$1, sharedCompilationCache as sharedCompilationCache$1, supervisorLogFile, supervisorPidFile, workspaceAgentDeviceDir, workspaceDerivedData, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir as workspaceLogsDir$1, workspaceMetadataFile, workspaceStateFile as workspaceStateFile$1, workspaceStateLock } from "@stim-cli/core/state";
|
|
9
|
+
import { join as join$1, resolve as resolve$1 } from "path";
|
|
9
10
|
import { readFile, readdir } from "node:fs/promises";
|
|
11
|
+
//#region src/workspace/paths.ts
|
|
12
|
+
function ensureWorkspaceStorage(projectRoot) {
|
|
13
|
+
const canonicalRoot = resolve$1(projectRoot);
|
|
14
|
+
const dir = workspaceDir(canonicalRoot);
|
|
15
|
+
const file = workspaceMetadataFile(canonicalRoot);
|
|
16
|
+
ensurePrivateDir(dir);
|
|
17
|
+
return withDirLock$1(join$1(dir, "metadata.lock"), () => {
|
|
18
|
+
if (!existsSync(file)) {
|
|
19
|
+
const metadata = {
|
|
20
|
+
projectRoot: canonicalRoot,
|
|
21
|
+
workspace: workspaceName$1(canonicalRoot),
|
|
22
|
+
version: 1
|
|
23
|
+
};
|
|
24
|
+
const tmp = `${file}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
25
|
+
writeFileSync(tmp, `${JSON.stringify(metadata, null, 2)}\n`);
|
|
26
|
+
try {
|
|
27
|
+
renameSync(tmp, file);
|
|
28
|
+
} catch (error) {
|
|
29
|
+
rmSync(tmp, { force: true });
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
return dir;
|
|
33
|
+
}
|
|
34
|
+
if (readJsonObject(file)?.projectRoot === canonicalRoot) return dir;
|
|
35
|
+
const error = /* @__PURE__ */ new Error(`Stim workspace collision at ${dir}: its workspace.json does not belong to ${canonicalRoot}.`);
|
|
36
|
+
error.code = "STIM_WORKSPACE_COLLISION";
|
|
37
|
+
throw error;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** Initializes or validates workspace storage after asynchronously acquiring its metadata lock. */
|
|
41
|
+
function ensureWorkspaceStorageAsync(projectRoot, signal) {
|
|
42
|
+
signal?.throwIfAborted();
|
|
43
|
+
const dir = workspaceDir(resolve$1(projectRoot));
|
|
44
|
+
ensurePrivateDir(dir);
|
|
45
|
+
return withDirLockAsync$1(join$1(dir, "metadata.lock"), () => ensureWorkspaceStorage(projectRoot), { signal });
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
10
48
|
//#region src/agent-sessions.ts
|
|
11
49
|
const TITLE_MAX_LENGTH = 120;
|
|
12
50
|
const SESSION_ID = /^[A-Za-z0-9._:-]{1,128}$/;
|
|
@@ -255,7 +293,7 @@ function attributeAgentSessions(workspaces, sessions, now) {
|
|
|
255
293
|
//#region src/workspace/workspace-state.ts
|
|
256
294
|
function withWorkspaceStateLock(root, fn) {
|
|
257
295
|
const file = workspaceStateFile$1(root);
|
|
258
|
-
return withDirLock(workspaceStateLock(root), fn, { ensureParent: () => {
|
|
296
|
+
return withDirLock$1(workspaceStateLock(root), fn, { ensureParent: () => {
|
|
259
297
|
ensureWorkspaceStorage(root);
|
|
260
298
|
mkdirSync(dirname(file), { recursive: true });
|
|
261
299
|
} });
|
|
@@ -264,7 +302,7 @@ function withWorkspaceStateLock(root, fn) {
|
|
|
264
302
|
async function withWorkspaceStateLockAsync(root, fn, signal) {
|
|
265
303
|
await ensureWorkspaceStorageAsync(root, signal);
|
|
266
304
|
const file = workspaceStateFile$1(root);
|
|
267
|
-
return withDirLockAsync(workspaceStateLock(root), fn, {
|
|
305
|
+
return withDirLockAsync$1(workspaceStateLock(root), fn, {
|
|
268
306
|
ensureParent: () => mkdirSync(dirname(file), { recursive: true }),
|
|
269
307
|
signal
|
|
270
308
|
});
|
|
@@ -389,4 +427,4 @@ function workspaceUsePatch(now, env, commandCwd) {
|
|
|
389
427
|
};
|
|
390
428
|
}
|
|
391
429
|
//#endregion
|
|
392
|
-
export { recordWorkspaceUseAsync as a, withWorkspaceStateLock as c, writeWorkspaceState as d, writeWorkspaceStateAsync as f, discoverAgentSessions as h, recordWorkspaceUse as i, withWorkspaceStateLockAsync as l, attributeAgentSessions as m, clearWorkspaceStateKeys as n, updateWorkspaceState as o, agentKey as p, readWorkspaceState$1 as r, updateWorkspaceStateAsync as s, clearWorkspaceStateKey as t, workspaceLastUsed as u };
|
|
430
|
+
export { workspaceName$1 as A, supervisorPidFile as C, workspaceId$1 as D, workspaceDir as E, withDirLock$1 as M, withDirLockAsync$1 as N, workspaceLogErrorIndex as O, supervisorLogFile as S, workspaceDerivedData as T, ensureWorkspaceStorage as _, recordWorkspaceUseAsync as a, sharedCcache$1 as b, withWorkspaceStateLock as c, writeWorkspaceState as d, writeWorkspaceStateAsync as f, emulatorLogFile as g, discoverAgentSessions as h, recordWorkspaceUse as i, workspaceStateFile$1 as j, workspaceLogsDir$1 as k, withWorkspaceStateLockAsync as l, attributeAgentSessions as m, clearWorkspaceStateKeys as n, updateWorkspaceState as o, agentKey as p, readWorkspaceState$1 as r, updateWorkspaceStateAsync as s, clearWorkspaceStateKey as t, workspaceLastUsed as u, ensureWorkspaceStorageAsync as v, workspaceAgentDeviceDir as w, sharedCompilationCache$1 as x, sharedBuildCache as y };
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, S as process_identity_exports, c as throwIfCancelled, d as workspaceProcessLockError, f as workspaceProcessLockPath, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, o as cancellableSleep, t as getExecutor, u as withWorkspaceProcessLock, v as stopDeclaringSpawnsOn } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, I as listMountedVolumes, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, _ as loadConfig$1, d as getConfigDir, g as isPathPrefix, j as acquireAvdClaim, p as getProject } from "./config-
|
|
2
|
+
import { A as workspaceName$1, E as workspaceDir, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, u as workspaceLastUsed, w as workspaceAgentDeviceDir } from "./workspace-state-pUg3_RRA.mjs";
|
|
3
|
+
import { F as isOnMountedVolume, G as projectDeviceSlots, H as deviceSlotPlatforms, I as listMountedVolumes, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, _ as loadConfig$1, d as getConfigDir, g as isPathPrefix, j as acquireAvdClaim, p as getProject } from "./config-BktkY_zC.mjs";
|
|
4
4
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
5
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-BF5AR2dL.mjs";
|
|
6
6
|
import { t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { i as
|
|
12
|
-
import { c as pidExists, f as signalProcessTree, p as signalProcessTreeAsync } from "./metro-1pJgCX4U.mjs";
|
|
13
|
-
import { _ as chromeProcessStateAsync, c as webClaimRoot, i as clearWebRecord, o as readWebRecord, p as webProfileDir, t as CDP_PORT_LABEL, u as webFacts, v as liveProfileHolder, y as removeSingletonFiles } from "./state-DMRNP7-4.mjs";
|
|
7
|
+
import { Pt as repoRootAsync, dt as resolveTailscaleBinary } from "./settings-CosW5X-S.mjs";
|
|
8
|
+
import { a as macosRuntimeClaim, n as macosDir } from "./state-C4OdpOTF.mjs";
|
|
9
|
+
import { Ct as forgetCreatedDeviceAsync, H as ownedAvdMatchesConfiguration, K as ownedAvdSystemImage, L as listOrphanedAvdDirectories, S as deleteAvd, St as forgetCreatedDevice, Tt as recordCreatedDevice, V as ownedAvdDirectory, _t as parkSim, bt as removeParkedAfter, g as avdPathExists, ht as eraseParkedAfter, it as shutdownAndroidEmulator, j as listAdbDevicesAsync, lt as wipeAvdUserData, nt as resolveOwnedAvdSerialAsync, p as assertOwnedAvdStoppedAsync, st as waitForAndroidEmulatorShutdown, ut as isStimOwnedAvd, v as avdStorageRoots, wt as readCreatedDevices$1, yt as readParked } from "./android-DTAcRwBC.mjs";
|
|
10
|
+
import { c as pidExists, f as signalProcessTree, p as signalProcessTreeAsync } from "./metro-CjC10t6E.mjs";
|
|
11
|
+
import { _ as chromeProcessStateAsync, c as webClaimRoot, i as clearWebRecord, o as readWebRecord, p as webProfileDir, t as CDP_PORT_LABEL, u as webFacts, v as liveProfileHolder, y as removeSingletonFiles } from "./state-C1i2nMOP.mjs";
|
|
14
12
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
15
|
-
import { N as listBuildLocks, d as readAgentDeviceRecords, t as agentDeviceDaemon } from "./activity-
|
|
16
|
-
import {
|
|
17
|
-
import { r as releaseBrowserPort } from "./named-ports-
|
|
13
|
+
import { N as listBuildLocks, d as readAgentDeviceRecords, t as agentDeviceDaemon } from "./activity-Lnb_EoRY.mjs";
|
|
14
|
+
import { C as renameIosSim, D as resolveOwnedIosSim, c as eraseIosSim, f as listAllIosSimsAsync, k as shutdownIosSim, o as deleteIosSim, p as listIosDeviceTypesAsync, s as deleteParkedIosSim, v as parkedSimName, y as parseRuntimeVersion } from "./ios-WxpDJ5T1.mjs";
|
|
15
|
+
import { r as releaseBrowserPort } from "./named-ports-BG0j1X4g.mjs";
|
|
18
16
|
import { createHash, randomUUID } from "node:crypto";
|
|
19
17
|
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, watch, writeFileSync } from "node:fs";
|
|
20
18
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -23,24 +21,26 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "nod
|
|
|
23
21
|
import { ambientContext, ambientEnv, ambientWrite } from "@stim-cli/core";
|
|
24
22
|
import { buildSlotsDir, hostedNativeRecords, isJsonObject, macosAppState, parseHostedNativePlacement, readJsonFile, readMacosRecord, requireAutomaticMachine, tryAcquireBuildSlotClaim, unreadableHostedNative } from "@stim-cli/core/state";
|
|
25
23
|
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, relative as relative$1 } from "path";
|
|
24
|
+
import { request } from "node:https";
|
|
26
25
|
import chalk from "chalk";
|
|
27
26
|
import { existsSync as existsSync$1, lstatSync as lstatSync$1, readdirSync as readdirSync$1, statSync as statSync$1 } from "fs";
|
|
28
27
|
import { lstat, readFile, readdir, rm, stat, unlink } from "node:fs/promises";
|
|
29
28
|
import { resolve4 } from "node:dns/promises";
|
|
30
|
-
import { request } from "node:https";
|
|
31
29
|
//#region src/commands/gc/results.ts
|
|
32
|
-
function createGcResults() {
|
|
30
|
+
function createGcResults(observe) {
|
|
33
31
|
const results = [];
|
|
34
32
|
return {
|
|
35
33
|
record(kind, status, label, { id = null, bytes = null, detail = null } = {}) {
|
|
36
|
-
|
|
34
|
+
const result = {
|
|
37
35
|
kind,
|
|
38
36
|
status,
|
|
39
37
|
label,
|
|
40
38
|
id,
|
|
41
39
|
bytes,
|
|
42
40
|
detail
|
|
43
|
-
}
|
|
41
|
+
};
|
|
42
|
+
results.push(result);
|
|
43
|
+
observe?.(result);
|
|
44
44
|
},
|
|
45
45
|
take() {
|
|
46
46
|
return results.splice(0);
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
import { D as ownership_claim_exports, S as process_identity_exports, b as operationState, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, n as isTimeoutError, t as getExecutor, v as stopDeclaringSpawnsOn } from "./exec-VFRpu1iA.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { E as upsertProject, G as projectDeviceSlots, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, S as removeProject, _ as loadConfig$1, a as clearDevice, d as getConfigDir, g as isPathPrefix, j as acquireAvdClaim, p as getProject } from "./config-
|
|
4
|
-
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-
|
|
2
|
+
import { E as workspaceDir, a as recordWorkspaceUseAsync, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, w as workspaceAgentDeviceDir } from "./workspace-state-pUg3_RRA.mjs";
|
|
3
|
+
import { E as upsertProject, G as projectDeviceSlots, L as measuredDirectorySizeAsync, O as withConfigLockAsync$1, S as removeProject, _ as loadConfig$1, a as clearDevice, d as getConfigDir, g as isPathPrefix, j as acquireAvdClaim, p as getProject } from "./config-BktkY_zC.mjs";
|
|
4
|
+
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-BF5AR2dL.mjs";
|
|
5
5
|
import { c as gitQuiet, o as git, r as childEnvironment, s as gitAsync, t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { o as
|
|
14
|
-
import { Cr as discoverCaches, S as withdrawDevServerStopRequest, Vt as endRecordedSession, Xn as resolveEasCliBin, b as requestDevServerStop, c as readVolumeSpace, it as planCacheEmptying, l as readVolumeSpaceAsync, o as machineNumber, u as resolveBudget, zn as runProcessOperation } from "./budget-HyShrIpL.mjs";
|
|
6
|
+
import { At as podsOutOfSync, B as readCommittedSettings, Bt as unpushedCommitsAsync, Ct as hasUncommittedWorkAsync, Dt as listWorktreesAsync, Ft as resolveFullRef, Gt as removeTemporaryEntryAsync, Ht as filesystemDevice, It as resolveFullRefAsync, J as resolveProjectSettings, Mt as removeWorktreeAsync, Ot as locallyKnownUpstream, Rt as restoreFileAsync, St as hasRemoteAsync, Vt as warmWorktreePaths, X as resolveSettings, _t as dirtyPathsAsync, a as SETTING_SHAPE_REMEDY, at as unknownSettingKeys, bt as gitCommonDirOnDisk, ft as branchExistsAsync, ht as depsOutOfSync, jt as readWorktreeExclude, mt as deleteBranchAsync, pt as cloneIgnoredEntries, q as resolveIosProjectDir, tt as settingShapeErrors, wt as isPodInstallChurn, xt as hasPopulatedSubmodulesAsync, yt as gitCommonDirAsync, zt as sourceCheckoutOf } from "./settings-CosW5X-S.mjs";
|
|
7
|
+
import { F as readRemoteSessionId, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, i as findProjectRoot$1, k as clearRemoteSession, o as isMobileProject } from "./project-BUu6Is4k.mjs";
|
|
8
|
+
import { t as macosAppPresent } from "./state-C4OdpOTF.mjs";
|
|
9
|
+
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-6Dqp-gjX.mjs";
|
|
10
|
+
import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-DTAcRwBC.mjs";
|
|
11
|
+
import { c as pidExists, d as resolveProjectMetro, p as signalProcessTreeAsync, r as killMetroTreeAsync } from "./metro-CjC10t6E.mjs";
|
|
12
|
+
import { o as readWebRecord } from "./state-C1i2nMOP.mjs";
|
|
13
|
+
import { Dr as discoverCaches, Gt as endRecordedSession, S as withdrawDevServerStopRequest, Un as runProcessOperation, b as requestDevServerStop, c as readVolumeSpace, ct as planCacheEmptying, er as resolveEasCliBin, l as readVolumeSpaceAsync, o as machineNumber, u as resolveBudget } from "./budget-k2mZGvvk.mjs";
|
|
15
14
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
16
|
-
import { p as cacheUser } from "./native-run-
|
|
17
|
-
import { A as teardownOwnedIosSim, C as withManagedTunnelRemovalLock, O as teardownOwnedAvd, a as collectWorkspaceOutputs, f as emptyWorkspaceDir, g as resolveSupervisorTarget, k as teardownOwnedBrowser, p as withIdleWorkspace, v as stopTunnel, x as withManagedRemoteWorktreeRemovalLock } from "./workspaces-
|
|
18
|
-
import { D as releaseWorkspaceLeases, t as agentDeviceDaemon } from "./activity-
|
|
19
|
-
import {
|
|
20
|
-
import { t as clearNamedPorts } from "./named-ports-
|
|
21
|
-
import { r as HEARTBEAT_INTERVAL_MS, x as podInstallCommand } from "./xcode-CiIIDnuD.mjs";
|
|
15
|
+
import { p as cacheUser } from "./native-run-BfIDFKLH.mjs";
|
|
16
|
+
import { A as teardownOwnedIosSim, C as withManagedTunnelRemovalLock, O as teardownOwnedAvd, a as collectWorkspaceOutputs, f as emptyWorkspaceDir, g as resolveSupervisorTarget, k as teardownOwnedBrowser, p as withIdleWorkspace, v as stopTunnel, x as withManagedRemoteWorktreeRemovalLock } from "./workspaces-g2lhdBXF.mjs";
|
|
17
|
+
import { D as releaseWorkspaceLeases, t as agentDeviceDaemon } from "./activity-Lnb_EoRY.mjs";
|
|
18
|
+
import { L as readHostMemoryPressure, R as readHostMemoryPressureAsync } from "./ios-WxpDJ5T1.mjs";
|
|
19
|
+
import { t as clearNamedPorts } from "./named-ports-BG0j1X4g.mjs";
|
|
22
20
|
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
23
|
-
import {
|
|
24
|
-
import { i as stopHostedAndroid } from "./hosted-android-
|
|
25
|
-
import { r as stopHostedIos } from "./hosted-ios-
|
|
26
|
-
import { n as stopMacosApp } from "./stop-
|
|
27
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
28
|
-
import { n as removePhoneReverses } from "./phone-reverses-
|
|
29
|
-
import { a as discoverXcodeProject } from "./react-native-build-
|
|
30
|
-
import { n as hasInstalledDependencies, r as installedNpmTreeIsValid, t as dependencyState } from "./dependency-state-
|
|
31
|
-
import { a as forgetStatusMeasures, p as mergeStateAsync, t as startWarmProgress } from "./warm-progress-
|
|
21
|
+
import { D as runCaptured, O as runPodInstall, S as DEPS_ERROR, T as readPodState, Y as podInstallCommand, j as HEARTBEAT_INTERVAL_MS, w as podsAreStale } from "./toolchain-J4J8MrAr.mjs";
|
|
22
|
+
import { i as stopHostedAndroid } from "./hosted-android-Bk54ej6n.mjs";
|
|
23
|
+
import { r as stopHostedIos } from "./hosted-ios-D55QhYaD.mjs";
|
|
24
|
+
import { n as stopMacosApp } from "./stop-ySNQHXMG.mjs";
|
|
25
|
+
import { n as verifyCollectorOwnership } from "./ownership-BjYvMNX_.mjs";
|
|
26
|
+
import { n as removePhoneReverses } from "./phone-reverses-lmj6kcPm.mjs";
|
|
27
|
+
import { a as discoverXcodeProject } from "./react-native-build-oNwqF5Wb.mjs";
|
|
28
|
+
import { n as hasInstalledDependencies, r as installedNpmTreeIsValid, t as dependencyState } from "./dependency-state-DFB41vfr.mjs";
|
|
29
|
+
import { a as forgetStatusMeasures, p as mergeStateAsync, t as startWarmProgress } from "./warm-progress-DvhTX_eu.mjs";
|
|
32
30
|
import { o as pullRequestLookupAsync, r as endedPullRequest } from "./pull-request-CbNlkFok.mjs";
|
|
33
|
-
import { r as workspaceRecordingEnabled } from "./recordings-
|
|
31
|
+
import { r as workspaceRecordingEnabled } from "./recordings-BldzVKq0.mjs";
|
|
34
32
|
import { claimRemoveCommand, clearFreeClaimSet, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
35
33
|
import { createHash, randomUUID } from "node:crypto";
|
|
36
34
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -2440,18 +2438,23 @@ function deleteInBackground(trash) {
|
|
|
2440
2438
|
child.on?.("error", () => {});
|
|
2441
2439
|
child.unref?.();
|
|
2442
2440
|
const captured = child.pid === void 0 ? null : captureProcessIdentity(child.pid);
|
|
2441
|
+
if (captured?.ok === false && captured.reason.startsWith("NOT_FOUND")) {
|
|
2442
|
+
(0, ownership_claim_exports.clearClaimChild)(trash.claim);
|
|
2443
|
+
(0, ownership_claim_exports.releaseClaim)(trash.claim);
|
|
2444
|
+
return existsSync(trash.dir) ? "left" : "deleted";
|
|
2445
|
+
}
|
|
2443
2446
|
if (!captured?.ok || child.pid === void 0) throw new Error("the trash deletion process was not recorded");
|
|
2444
2447
|
(0, ownership_claim_exports.setClaimChild)(trash.claim, {
|
|
2445
2448
|
pid: child.pid,
|
|
2446
2449
|
processToken: captured.token
|
|
2447
2450
|
});
|
|
2448
|
-
return
|
|
2451
|
+
return "background";
|
|
2449
2452
|
} catch {
|
|
2450
2453
|
try {
|
|
2451
2454
|
(0, ownership_claim_exports.clearClaimChild)(trash.claim);
|
|
2452
2455
|
} catch {}
|
|
2453
2456
|
(0, ownership_claim_exports.releaseClaim)(trash.claim);
|
|
2454
|
-
return
|
|
2457
|
+
return "left";
|
|
2455
2458
|
}
|
|
2456
2459
|
}
|
|
2457
2460
|
/**
|
|
@@ -2461,7 +2464,7 @@ function deleteInBackground(trash) {
|
|
|
2461
2464
|
* `left` means the entry waits for gc with its claim released.
|
|
2462
2465
|
*/
|
|
2463
2466
|
async function disposeTrash(trash, operation) {
|
|
2464
|
-
if (!getExecutor().reportSignal?.()) return deleteInBackground(trash)
|
|
2467
|
+
if (!getExecutor().reportSignal?.()) return deleteInBackground(trash);
|
|
2465
2468
|
try {
|
|
2466
2469
|
await deleteTrashEntry(trash.dir, operation);
|
|
2467
2470
|
return "deleted";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as worktreeCommand, a as matchWorktreeEntry, c as reclaimKeys, d as removalBlockers, f as removalPath, g as warmedWorkspace, h as warmWorktreeTarget, i as excludeWatchmanCookies, l as registerRemove, m as removeWorktreeTarget, n as dependencyInstallCommand, o as nestedWorktrees, p as removalRemedy, r as excludePodChurn, s as porcelainPath, t as customIosDirs, u as registerWarm } from "./worktree-
|
|
1
|
+
import { _ as worktreeCommand, a as matchWorktreeEntry, c as reclaimKeys, d as removalBlockers, f as removalPath, g as warmedWorkspace, h as warmWorktreeTarget, i as excludeWatchmanCookies, l as registerRemove, m as removeWorktreeTarget, n as dependencyInstallCommand, o as nestedWorktrees, p as removalRemedy, r as excludePodChurn, s as porcelainPath, t as customIosDirs, u as registerWarm } from "./worktree-BKuklFh_.mjs";
|
|
2
2
|
export { customIosDirs, worktreeCommand as default, dependencyInstallCommand, excludePodChurn, excludeWatchmanCookies, matchWorktreeEntry, nestedWorktrees, porcelainPath, reclaimKeys, registerRemove, registerWarm, removalBlockers, removalPath, removalRemedy, removeWorktreeTarget, warmWorktreeTarget, warmedWorkspace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stim",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "Stim: fast, isolated React Native environments for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@expo/fingerprint": "^0.
|
|
56
|
-
"@stim-cli/agent-driver": "1.
|
|
57
|
-
"@stim-cli/agent-driver-agent-device": "1.
|
|
58
|
-
"@stim-cli/cache": "1.
|
|
59
|
-
"@stim-cli/core": "1.
|
|
60
|
-
"@stim-cli/metro": "1.
|
|
55
|
+
"@expo/fingerprint": "^0.21.5",
|
|
56
|
+
"@stim-cli/agent-driver": "1.26.0",
|
|
57
|
+
"@stim-cli/agent-driver-agent-device": "1.26.0",
|
|
58
|
+
"@stim-cli/cache": "1.26.0",
|
|
59
|
+
"@stim-cli/core": "1.26.0",
|
|
60
|
+
"@stim-cli/metro": "1.26.0",
|
|
61
61
|
"@xmldom/xmldom": "0.9.12",
|
|
62
62
|
"chalk": "^6.0.0",
|
|
63
63
|
"commander": "^15.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"ws": "^8.21.3"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@stim-cli/expo-build-cache": "1.
|
|
69
|
+
"@stim-cli/expo-build-cache": "1.26.0",
|
|
70
70
|
"@types/cross-spawn": "^6.0.6",
|
|
71
71
|
"@types/which": "^3.0.4",
|
|
72
72
|
"@types/ws": "^8.18.1",
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { v as withDirLock$1, y as withDirLockAsync$1 } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { d as getConfigDir } from "./config-BZhXY15H.mjs";
|
|
3
|
-
import { renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
-
import { ensurePrivateDir } from "@stim-cli/core";
|
|
5
|
-
import { createdDevicesFile, createdDevicesLock, readCreatedDevices, readCreatedDevices as readCreatedDevices$1 } from "@stim-cli/core/state";
|
|
6
|
-
//#region src/devices/created-devices.ts
|
|
7
|
-
function update(platform, change) {
|
|
8
|
-
const dir = getConfigDir();
|
|
9
|
-
withDirLock$1(createdDevicesLock(), () => {
|
|
10
|
-
const current = readCreatedDevices();
|
|
11
|
-
const entries = new Set(current[platform]);
|
|
12
|
-
if (!change(entries)) return;
|
|
13
|
-
const next = {
|
|
14
|
-
version: 1,
|
|
15
|
-
ios: [...current.ios],
|
|
16
|
-
android: [...current.android],
|
|
17
|
-
web: [...current.web],
|
|
18
|
-
[platform]: [...entries]
|
|
19
|
-
};
|
|
20
|
-
const file = createdDevicesFile();
|
|
21
|
-
const tmp = `${file}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
22
|
-
writeFileSync(tmp, `${JSON.stringify(next, null, 2)}\n`, { mode: 384 });
|
|
23
|
-
try {
|
|
24
|
-
renameSync(tmp, file);
|
|
25
|
-
} catch (error) {
|
|
26
|
-
rmSync(tmp, { force: true });
|
|
27
|
-
throw error;
|
|
28
|
-
}
|
|
29
|
-
}, { ensureParent: () => ensurePrivateDir(dir) });
|
|
30
|
-
}
|
|
31
|
-
function recordCreatedDevice(platform, id) {
|
|
32
|
-
update(platform, (entries) => entries.size !== entries.add(id).size);
|
|
33
|
-
}
|
|
34
|
-
function forgetCreatedDevice(platform, id) {
|
|
35
|
-
update(platform, (entries) => entries.delete(id));
|
|
36
|
-
}
|
|
37
|
-
/** Waits asynchronously for the ledger lock, then records the device. */
|
|
38
|
-
function recordCreatedDeviceAsync(platform, id) {
|
|
39
|
-
return withDirLockAsync$1(createdDevicesLock(), () => recordCreatedDevice(platform, id), { ensureParent: () => ensurePrivateDir(getConfigDir()) });
|
|
40
|
-
}
|
|
41
|
-
/** Waits asynchronously for the ledger lock, then atomically forgets the device. The synchronous transaction decides whether to commit the removal; cancellation stops admission. */
|
|
42
|
-
function forgetCreatedDeviceAsync(platform, id, signal, transaction = (forget) => {
|
|
43
|
-
forget();
|
|
44
|
-
return true;
|
|
45
|
-
}) {
|
|
46
|
-
return withDirLockAsync$1(createdDevicesLock(), () => transaction(() => forgetCreatedDevice(platform, id)), {
|
|
47
|
-
ensureParent: () => ensurePrivateDir(getConfigDir()),
|
|
48
|
-
signal
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
export { recordCreatedDeviceAsync as a, recordCreatedDevice as i, forgetCreatedDeviceAsync as n, readCreatedDevices$1 as r, forgetCreatedDevice as t };
|
package/dist/paths-DQtTgsBf.mjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { existsSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { buildCacheRoot as sharedBuildCache, ensurePrivateDir, withDirLock as withDirLock$1, withDirLockAsync as withDirLockAsync$1, workspaceId as workspaceId$1, workspaceName as workspaceName$1, workspaceStateDir as workspaceDir } from "@stim-cli/core";
|
|
3
|
-
import { emulatorLogFile, readJsonObject, sharedCcache as sharedCcache$1, sharedCompilationCache as sharedCompilationCache$1, supervisorLogFile, supervisorPidFile, workspaceAgentDeviceDir, workspaceDerivedData, workspaceLogErrorIndex, workspaceLogsDir as workspaceLogsDir$1, workspaceMetadataFile, workspaceStateFile as workspaceStateFile$1, workspaceStateLock } from "@stim-cli/core/state";
|
|
4
|
-
import { join, resolve } from "path";
|
|
5
|
-
//#region src/workspace/paths.ts
|
|
6
|
-
function ensureWorkspaceStorage(projectRoot) {
|
|
7
|
-
const canonicalRoot = resolve(projectRoot);
|
|
8
|
-
const dir = workspaceDir(canonicalRoot);
|
|
9
|
-
const file = workspaceMetadataFile(canonicalRoot);
|
|
10
|
-
ensurePrivateDir(dir);
|
|
11
|
-
return withDirLock$1(join(dir, "metadata.lock"), () => {
|
|
12
|
-
if (!existsSync(file)) {
|
|
13
|
-
const metadata = {
|
|
14
|
-
projectRoot: canonicalRoot,
|
|
15
|
-
workspace: workspaceName$1(canonicalRoot),
|
|
16
|
-
version: 1
|
|
17
|
-
};
|
|
18
|
-
const tmp = `${file}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
19
|
-
writeFileSync(tmp, `${JSON.stringify(metadata, null, 2)}\n`);
|
|
20
|
-
try {
|
|
21
|
-
renameSync(tmp, file);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
rmSync(tmp, { force: true });
|
|
24
|
-
throw error;
|
|
25
|
-
}
|
|
26
|
-
return dir;
|
|
27
|
-
}
|
|
28
|
-
if (readJsonObject(file)?.projectRoot === canonicalRoot) return dir;
|
|
29
|
-
const error = /* @__PURE__ */ new Error(`Stim workspace collision at ${dir}: its workspace.json does not belong to ${canonicalRoot}.`);
|
|
30
|
-
error.code = "STIM_WORKSPACE_COLLISION";
|
|
31
|
-
throw error;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/** Initializes or validates workspace storage after asynchronously acquiring its metadata lock. */
|
|
35
|
-
function ensureWorkspaceStorageAsync(projectRoot, signal) {
|
|
36
|
-
signal?.throwIfAborted();
|
|
37
|
-
const dir = workspaceDir(resolve(projectRoot));
|
|
38
|
-
ensurePrivateDir(dir);
|
|
39
|
-
return withDirLockAsync$1(join(dir, "metadata.lock"), () => ensureWorkspaceStorage(projectRoot), { signal });
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
export { workspaceStateLock as _, sharedCcache$1 as a, supervisorPidFile as c, workspaceDir as d, workspaceId$1 as f, workspaceStateFile$1 as g, workspaceName$1 as h, sharedBuildCache as i, workspaceAgentDeviceDir as l, workspaceLogsDir$1 as m, ensureWorkspaceStorage as n, sharedCompilationCache$1 as o, workspaceLogErrorIndex as p, ensureWorkspaceStorageAsync as r, supervisorLogFile as s, emulatorLogFile as t, workspaceDerivedData as u, withDirLock$1 as v, withDirLockAsync$1 as y };
|