stim 1.25.0 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{acquire-artifact-zA4S7RHE.mjs → acquire-artifact-BKN2Yuhg.mjs} +2 -2
- package/dist/{act-BbHS3oV8.mjs → act-ROviTF_t.mjs} +415 -118
- package/dist/{activity-BpjwrQXU.mjs → activity-Cd-ysFes.mjs} +6 -7
- package/dist/{agent-device-usage-output-Bnkerfod.mjs → agent-device-usage-output-C5nCKWp9.mjs} +5 -5
- package/dist/{android-CNZgRC-4.mjs → android--HBgpvpW.mjs} +5 -5
- package/dist/{android-BGwuK3Mc.mjs → android-Cd6w7_qw.mjs} +134 -57
- package/dist/{android-saBeB4lr.mjs → android-Deb9X3_Y.mjs} +37 -15
- package/dist/{android-Cjcj8MCw.mjs → android-DriNoAVy.mjs} +99 -47
- package/dist/{android-cas-BVqh2Zep.mjs → android-cas-D5e6ecUg.mjs} +4 -4
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-project-CTYaETc0.d.mts → android-project-DUGMbq28.d.mts} +55 -1
- package/dist/api.d.mts +20 -7
- package/dist/api.mjs +42 -32
- package/dist/apk-signed-tail-BHQHx3Rm.mjs +142 -0
- package/dist/{artifact-Co8zixVx.mjs → artifact-0AGJYB9O.mjs} +28 -28
- package/dist/{artifact-DN8JNwqS.mjs → artifact-faemIZv5.mjs} +40 -30
- package/dist/{artifact-platform-CMRc0M_r.mjs → artifact-platform-BO2Uvk_A.mjs} +1 -1
- package/dist/{attempt-DW-mQqM7.mjs → attempt-ClyJlZPT.mjs} +4 -2
- package/dist/auto-placement-z-H5pJza.mjs +350 -0
- package/dist/{browser-web-CCgZsHmI.mjs → browser-web-slD8AvLp.mjs} +16 -17
- package/dist/{build-cache-CKCzxzxA.mjs → build-cache-gBJ-WKzA.mjs} +141 -37
- package/dist/{build-CAiw8Ezm.mjs → build-hS0QyFlQ.mjs} +38 -31
- package/dist/{build-plan-zCuHGlA8.mjs → build-plan-CBqYbzYM.mjs} +7 -6
- package/dist/{cache-manifest-BPXRONJz.mjs → cache-manifest-DEjqGGat.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{budget-HyShrIpL.mjs → ccache-BWTze1Ls.mjs} +634 -1514
- package/dist/{cdp-BG3FJCCx.mjs → cdp-C3svvXiE.mjs} +1 -1
- package/dist/{chrome-BvV8ssI3.mjs → chrome-DyDWurWG.mjs} +1 -1
- package/dist/{cli-C4w607Pz.mjs → cli-ftXDLto1.mjs} +24 -23
- package/dist/cli.mjs +1 -1
- package/dist/{client-BQsmyp_-.mjs → client-xsdxrhWA.mjs} +77 -116
- package/dist/collector-run.d.mts +10 -9
- package/dist/collector-run.mjs +42 -27
- package/dist/{command-output-BBvS1H6v.mjs → command-output-Dj-WT4BP.mjs} +1 -1
- package/dist/{config-BZhXY15H.mjs → config-Cn94Jc0g.mjs} +343 -18
- package/dist/{launch-DscF1QfM.mjs → dependencies-BGokZ-Ng.mjs} +330 -279
- package/dist/{dependency-state-BwNCYG5Q.mjs → dependency-state-C3OtgG94.mjs} +14 -7
- package/dist/{detached-entry-KmieOKgN.mjs → detached-entry-BPlSaCwC.mjs} +1 -1
- package/dist/{dev-client-CHoXXZeg.mjs → dev-client-BMca82xo.mjs} +2 -2
- package/dist/{device-F5-4z9ef.mjs → device-BJm0irrq.mjs} +16 -16
- package/dist/{device-capacity-ZYaRALv5.mjs → device-capacity-6LP7QsaA.mjs} +103 -25
- package/dist/device-host-worker.mjs +19 -21
- package/dist/{device-ios-DkHBrmvH.mjs → device-ios-534c14fz.mjs} +288 -28
- package/dist/{device-lease-run-ogEeJ62K.mjs → device-lease-run-DwsGfjUN.mjs} +5 -5
- package/dist/{device-pool-BIg8MU8l.mjs → device-pool-BnQqvs6o.mjs} +3 -3
- package/dist/{device-B9FqTBYW.mjs → device-tM41-TUq.mjs} +25 -24
- package/dist/{doctor-A_Nr_fDe.mjs → doctor-Dbx1ZpD2.mjs} +1 -1
- package/dist/{doctor-k3P3PizH.mjs → doctor-DyqE9n1J.mjs} +28 -16
- package/dist/{doctor-Bm8TVpGn.mjs → doctor-F-3VUUyN.mjs} +128 -35
- package/dist/{doctor-fingerprint-zlujA1Gs.mjs → doctor-fingerprint-o7ZI9YLn.mjs} +9 -3
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-BovI1y3-.mjs → doctor-watchman-CxDbyrrt.mjs} +5 -5
- package/dist/{eas-build-CyDKNTBP.mjs → eas-build-CjNSWmjo.mjs} +4 -4
- package/dist/eas-fallback-9fqb46kW.mjs +87 -0
- package/dist/{eas-session-ledger-BMCA1gdO.mjs → eas-session-ledger-DrP4OuuM.mjs} +6 -6
- package/dist/{error-diagnostics-B1Mj_-7h.mjs → error-diagnostics-snej9k4j.mjs} +51 -25
- package/dist/{exec-VFRpu1iA.mjs → exec-aULwtNly.mjs} +57 -6
- package/dist/{gc-eaz403W6.mjs → gc-BRwAY3qT.mjs} +2 -2
- package/dist/{gc-B9jcnmIk.mjs → gc-CGZ1Yg88.mjs} +218 -72
- package/dist/{guide-DR0K0xW9.mjs → guide-_rfEh_zM.mjs} +839 -222
- package/dist/{hosted-android-Bvb2-ZxD.mjs → hosted-android-BMKzUNnY.mjs} +4 -4
- package/dist/{hosted-client-rsRqysJc.mjs → hosted-client-D7Pk_Oo1.mjs} +13 -9
- package/dist/{hosted-logs-CWKGYWNX.mjs → hosted-logs-B1gqQuva.mjs} +18 -12
- package/dist/hosted-logs-sync-Dg3qrZmV.mjs +195 -0
- package/dist/{hosted-macos-d0pv9Tth.mjs → hosted-macos-B9w4H8hc.mjs} +6 -6
- package/dist/{hosted-native-BxTizGU2.mjs → hosted-native-CdgaiuyP.mjs} +17 -17
- package/dist/{idle-shutdown-BIyfl0Zj.mjs → idle-shutdown-Cbvo5KEh.mjs} +21 -9
- package/dist/{ios-BRVM8b0P.mjs → ios-B5HlVMhQ.mjs} +138 -55
- package/dist/{ios-Dvt97HgQ.mjs → ios-Bk4mWbtS.mjs} +8 -8
- package/dist/{ios-ENC4sRPA.mjs → ios-CsRVik64.mjs} +7 -1
- package/dist/{ios-BQzvJlzw.mjs → ios-E26qSpkb.mjs} +94 -11
- package/dist/{ios-device-CKSvk0bu.mjs → ios-device-C_QkIf1Z.mjs} +3 -3
- package/dist/{ios-device-B6HK951C.mjs → ios-device-CiBA-er9.mjs} +1 -1
- package/dist/{ios-project-DCUDo06I.mjs → ios-project-D8Jcy_br.mjs} +22 -9
- package/dist/{ios-signing-4c_qXvQm.mjs → ios-signing-BJzvDPfU.mjs} +2 -2
- package/dist/{ios-state-CT9nV5SP.mjs → ios-state-BZ03NFgF.mjs} +1 -1
- package/dist/{js-swap-Z9HbC4cj.mjs → js-swap-Dg2a945i.mjs} +8 -7
- package/dist/{launch-D0lPvFFu.mjs → launch-CRyBeNsA.mjs} +53 -44
- package/dist/lightened-BCsdAGj_.mjs +171 -0
- package/dist/{logs-BsIRre8x.mjs → logs-CC_-ZzEE.mjs} +10 -174
- package/dist/{logs-Crs9y34Z.mjs → logs-aJQb-RDg.mjs} +112 -38
- package/dist/{macos-CcUlJPMu.mjs → macos-BGmTpnv9.mjs} +1 -1
- package/dist/{macos-D477nfzH.mjs → macos-DlCBhMw5.mjs} +73 -39
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +30 -13
- package/dist/{metro-1pJgCX4U.mjs → metro-CvyD-xwe.mjs} +4 -4
- package/dist/{metro-gateway-Bp9gJQAN.mjs → metro-gateway-BnHdqMO_.mjs} +3 -4
- package/dist/{named-ports-BVbn8SvC.mjs → named-ports-BCyMWA6b.mjs} +3 -3
- package/dist/{native-android-BvMizJn1.mjs → native-android-DlpxCyOP.mjs} +17 -18
- package/dist/{native-gradle-artifact-inputs-BJscK4vN.mjs → native-gradle-artifact-inputs-C13qT7R_.mjs} +5 -5
- package/dist/{native-runtime-B9w_Qyz3.mjs → native-runtime-DqaIBO5w.mjs} +9 -9
- package/dist/{native-source-D-4Dh4JU.mjs → native-source-D1AzWiuP.mjs} +1 -1
- package/dist/{native-xcode-inputs-Cv4l-obn.mjs → native-xcode-inputs-B1W8SrxB.mjs} +3 -3
- package/dist/{native-xcode-ios-DGrg90hE.mjs → native-xcode-ios-QPP0Rm68.mjs} +17 -18
- package/dist/{ndjson-CgE_o3Dl.mjs → ndjson-Dy2W4vRa.mjs} +2 -2
- package/dist/offload-worker.d.mts +3 -1
- package/dist/offload-worker.mjs +34 -25
- package/dist/{operation-exec-CUZifp6Z.mjs → operation-exec-Dp4FuIGR.mjs} +1 -1
- package/dist/{ownership-jxxz-19m.mjs → ownership-Bx-0cku-.mjs} +3 -3
- package/dist/{page-CzEA_-5_.mjs → page-CQJlcj3x.mjs} +2 -2
- package/dist/{phone-reverses-CYb7RRAx.mjs → phone-reverses-C9yAaKEv.mjs} +18 -4
- package/dist/{placement-log-DjOXJRIH.mjs → placement-log-BXUbiZM6.mjs} +3 -3
- package/dist/{plan-placement-BqKgKHCi.mjs → plan-placement-UxnQjv5Z.mjs} +36 -10
- package/dist/{ports-DtS1Amb0.mjs → ports-uUrghqWN.mjs} +3 -3
- package/dist/prebuild-BDpToDgR.mjs +1246 -0
- package/dist/{project-BiC68mIp.mjs → project-DYj-HVx6.mjs} +17 -18
- package/dist/{pull-request-CbNlkFok.mjs → pull-request-BzLmzAIQ.mjs} +2 -2
- package/dist/pull-requests.mjs +1 -1
- package/dist/{react-native-android-DRYqoJc4.mjs → react-native-android-DDBccgJw.mjs} +56 -36
- package/dist/{react-native-build-CwZB-agu.mjs → react-native-build-DaK2IFyP.mjs} +9 -9
- package/dist/{react-native-doctor-BCrytK7h.mjs → react-native-doctor-B-Mw6DcR.mjs} +50 -9
- package/dist/{react-native-ios-Cr1buNFo.mjs → react-native-ios-DjYwUF9U.mjs} +45 -25
- package/dist/{recordings-BaoQ0t-J.mjs → recordings-C20iUZfp.mjs} +1 -1
- package/dist/{registration-CN6nlhcD.mjs → registration-BwCe64PH.mjs} +1 -1
- package/dist/{reload-Beftw2X3.mjs → reload-DJBeF_rC.mjs} +1 -1
- package/dist/{reload-FbSgMF8x.mjs → reload-fUdkH2_p.mjs} +16 -16
- package/dist/{remote-BuZj6AyU.mjs → remote-y6n99WMW.mjs} +22 -9
- package/dist/{result-CR2vk2cj.mjs → result-CTqBw2Te.mjs} +32 -21
- package/dist/{run-BtzE09Dl.mjs → run-DaCeNKRm.mjs} +3 -3
- package/dist/{selection-D5cxEl3t.mjs → selection-Bs8phwhN.mjs} +183 -62
- package/dist/{server-bare-CH9X0RLn.mjs → server-bare-BOh-iZEj.mjs} +2 -2
- package/dist/{server-command-CaBbDNU2.mjs → server-command-8CuA51Cv.mjs} +6 -6
- package/dist/{server-expo-Ck8EIidM.mjs → server-expo-ABQs2XFA.mjs} +4 -4
- package/dist/server-expo-Ba_Y21vB.mjs +2 -0
- package/dist/{settings-B5tCoq9N.mjs → settings-BDVI8Ivc.mjs} +331 -62
- package/dist/{settings-DzH9mGQZ.mjs → settings-CMHhQNwI.mjs} +24 -3
- package/dist/settings-payload-cm60Zhib.mjs +257 -0
- package/dist/settings-write-BdNRLlBn.mjs +185 -0
- package/dist/settings.schema.json +84 -39
- package/dist/{simslim-BjxszUAb.mjs → simslim-DCQwzoPy.mjs} +4 -3
- package/dist/{slot-launch-QeuJMlnJ.mjs → slot-launch-0l7RqSpr.mjs} +6 -6
- package/dist/{stage-D8xlRU2D.mjs → stage-F4cAfJGi.mjs} +2 -2
- package/dist/{start-C1JLjkNw.mjs → start-DcqnF9p8.mjs} +1 -1
- package/dist/{start-YMpNwLhh.mjs → start-DrPwER_2.mjs} +27 -23
- package/dist/{state-DMRNP7-4.mjs → state-BX1y5syV.mjs} +4 -5
- package/dist/{state-DPaM3u5K.mjs → state-CZxLyetD.mjs} +2 -3
- package/dist/{stats-CP7STzZw.mjs → stats-GxuCbles.mjs} +5 -5
- package/dist/{stats-report-n2U5plhk.mjs → stats-report-B86Cv7Uc.mjs} +1 -1
- package/dist/{status-Fect2w9R.mjs → status-7ULDEJ1e.mjs} +1 -1
- package/dist/{status-CRLiJ-O_.mjs → status-BfnK9pUd.mjs} +25 -26
- package/dist/{status-cNw6i0_t.mjs → status-Bj7ZYvvc.mjs} +1 -1
- package/dist/{status-watch-Bc2J4TZn.mjs → status-watch-BfabQn03.mjs} +5 -5
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-DS0mzR8U.mjs → stim-desktop-CbWo21kb.mjs} +2 -2
- package/dist/{stop-COP6PQqw.mjs → stop-CH79S3IZ.mjs} +5 -6
- package/dist/{stop-Db9Kh-UA.mjs → stop-D-EAr25B.mjs} +25 -22
- package/dist/{stop-Br7LKxBE.mjs → stop-x1Yu3He4.mjs} +2 -2
- package/dist/supervisor-run.d.mts +1 -0
- package/dist/supervisor-run.mjs +17 -18
- package/dist/{support-qKcbgmI5.mjs → support-Be0UeVZU.mjs} +10 -10
- package/dist/{support-Cxj9CmII.mjs → support-CNg_YsOk.mjs} +6 -6
- package/dist/{swiftpm-artifact-inputs-iY9fsmOc.mjs → swiftpm-artifact-inputs-uPqYvGBv.mjs} +4 -4
- package/dist/{swiftpm-macos-Bp_sn9P4.mjs → swiftpm-macos-Ch4YjY_A.mjs} +11 -12
- package/dist/toolchain-CbCG6C5Z.mjs +2413 -0
- package/dist/toolchain-JYAOquPg.mjs +2 -0
- package/dist/{trigger-CBMe2YLH.mjs → trigger-DMou-X7j.mjs} +3 -3
- package/dist/trigger-qp2ji5wE.mjs +2 -0
- package/dist/{warm-progress-BV3ZPmcY.mjs → warm-progress-C0RsbngN.mjs} +731 -728
- package/dist/{web-B4Yjyt1G.mjs → web-Cq_AQ4DK.mjs} +9 -10
- package/dist/web-Je6abcpz.mjs +2 -0
- package/dist/web-run.mjs +9 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-CPSp3mav.mjs → workspace-state-BjqdjnJR.mjs} +46 -8
- package/dist/{workspaces-C9w4aeXF.mjs → workspaces-DFbj07jp.mjs} +1801 -76
- package/dist/{worktree-CclFIe1Z.mjs → worktree-COAJ3-OD.mjs} +934 -511
- package/dist/{worktree-Ct9Gk3KL.mjs → worktree-JGUd_53L.mjs} +1 -1
- package/package.json +8 -8
- package/dist/ccache-h1FKhZeg.mjs +0 -143
- package/dist/created-devices-D2Aca-xu.mjs +0 -52
- package/dist/eas-fallback-gaZi-dJL.mjs +0 -381
- package/dist/hosted-ios-RtVcJH3u.mjs +0 -15
- package/dist/native-run-D5OJsGwA.mjs +0 -276
- package/dist/paths-DQtTgsBf.mjs +0 -42
- package/dist/prebuild-JUaqOLpc.mjs +0 -501
- package/dist/server-expo-C16Zf2k7.mjs +0 -2
- package/dist/settings-write-n0zwfohx.mjs +0 -360
- 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
|
@@ -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 {
|
|
9
|
-
import {
|
|
10
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-B9w_Qyz3.mjs";
|
|
1
|
+
import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-BjqdjnJR.mjs";
|
|
2
|
+
import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
|
|
4
|
+
import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, rt as settingShapeErrors } from "./settings-BDVI8Ivc.mjs";
|
|
5
|
+
import { f as projectRegistry, n as findCommandWorkspace } from "./project-DYj-HVx6.mjs";
|
|
6
|
+
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CbWo21kb.mjs";
|
|
7
|
+
import { o as readWebRecord, r as cdpEndpoint } from "./state-BX1y5syV.mjs";
|
|
8
|
+
import { t as liveWebRecord } from "./page-CQJlcj3x.mjs";
|
|
9
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DqaIBO5w.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,12 +1,12 @@
|
|
|
1
|
-
import { D as ownership_claim_exports, S as process_identity_exports, o as cancellableSleep, t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import { f as signalProcessTree } from "./metro-
|
|
4
|
-
import {
|
|
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-
|
|
7
|
-
import { t as connectOwnedBrowser } from "./cdp-
|
|
8
|
-
import { t as relaunchWithLogFile } from "./detached-entry-
|
|
9
|
-
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-
|
|
1
|
+
import { D as ownership_claim_exports, S as process_identity_exports, o as cancellableSleep, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { Tt as recordCreatedDevice } from "./android-DriNoAVy.mjs";
|
|
3
|
+
import { f as signalProcessTree } from "./metro-CvyD-xwe.mjs";
|
|
4
|
+
import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.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-BX1y5syV.mjs";
|
|
6
|
+
import { l as probeWebDrivers } from "./activity-Cd-ysFes.mjs";
|
|
7
|
+
import { t as connectOwnedBrowser } from "./cdp-C3svvXiE.mjs";
|
|
8
|
+
import { t as relaunchWithLogFile } from "./detached-entry-BPlSaCwC.mjs";
|
|
9
|
+
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-DyDWurWG.mjs";
|
|
10
10
|
import { existsSync, mkdirSync, openSync, realpathSync } from "node:fs";
|
|
11
11
|
import { isAbsolute, resolve } from "node:path";
|
|
12
12
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
package/dist/windows-report.mjs
CHANGED
|
@@ -1,12 +1,50 @@
|
|
|
1
|
-
import { S as process_identity_exports, t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { st as workspaceHiddenSetting } from "./settings-B5tCoq9N.mjs";
|
|
1
|
+
import { S as process_identity_exports, t as getExecutor } from "./exec-aULwtNly.mjs";
|
|
2
|
+
import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-Cn94Jc0g.mjs";
|
|
3
|
+
import { lt as workspaceHiddenSetting } from "./settings-BDVI8Ivc.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 };
|