stim 1.29.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acquire-artifact-C2DKfenN.mjs → acquire-artifact-CrZ4rEbI.mjs} +1 -1
- package/dist/{act-CrTcskiE.mjs → act-BaKjDWGw.mjs} +12 -12
- package/dist/{activity-BR5oHSO5.mjs → activity-BTaUf0tc.mjs} +2 -2
- package/dist/{agent-device-usage-output-W0x4SoC7.mjs → agent-device-usage-output-DYBpO17K.mjs} +3 -3
- package/dist/{android-BPmCmyAy.mjs → android-BCYLwmH6.mjs} +5 -5
- package/dist/{android-CLU_MMnb.mjs → android-BEQUDpOg.mjs} +1 -1
- package/dist/{android-l616dRP1.mjs → android-BWqdDK6R.mjs} +36 -34
- package/dist/{android-BHKgeOuq.mjs → android-DdKG6lyD.mjs} +39 -30
- package/dist/api.mjs +21 -21
- package/dist/{apk-signed-tail-B-wKoF_8.mjs → apk-signed-tail-B8kw4a8K.mjs} +1 -1
- package/dist/{artifact-Dm9ScLrh.mjs → artifact-DTHXcmQ3.mjs} +11 -11
- package/dist/{artifact-DHuFYfhD.mjs → artifact-M6W2l-xh.mjs} +11 -11
- package/dist/{auto-placement-C8sJsyMN.mjs → auto-placement-CZaWDmcY.mjs} +8 -8
- package/dist/{browser-web-_tQTbQUs.mjs → browser-web-JQ7lFej3.mjs} +5 -5
- package/dist/{build-DtCU9Kim.mjs → build-C2ZWoCmg.mjs} +18 -18
- package/dist/{build-cache-BGwTsIEa.mjs → build-cache-DlC3owap.mjs} +1 -1
- package/dist/{build-plan-CWyjMPKo.mjs → build-plan-J3iRR3gI.mjs} +5 -5
- package/dist/{ccache-DsDkdP72.mjs → ccache-B8gY50-h.mjs} +11 -11
- package/dist/{cli-3fjOg-Oc.mjs → cli-xRPXJPtA.mjs} +17 -17
- package/dist/cli.mjs +1 -1
- package/dist/{client-BTUH8TF1.mjs → client-DrHykA24.mjs} +3 -3
- package/dist/collector-run.mjs +1 -1
- package/dist/{command-output-DjCsmzLZ.mjs → command-output-BBW8eWPL.mjs} +1 -1
- package/dist/{dependencies-CHNqX6Pr.mjs → dependencies-vUh9mp5z.mjs} +31 -30
- package/dist/{dev-client-CROrxj1x.mjs → dev-client-CASgAOu7.mjs} +2 -2
- package/dist/device-ChnO7bR9.mjs +761 -0
- package/dist/device-CsIdRXfm.mjs +175 -0
- package/dist/{device-Bmm5qjM-.mjs → device-android-CcdQqQWg.mjs} +26 -193
- package/dist/{device-capacity-B2ChA-bz.mjs → device-capacity-C5C_jOQd.mjs} +9 -9
- package/dist/device-host-worker.mjs +40 -31
- package/dist/{device-ios-CYzivd31.mjs → device-ios-DbmtPIiw.mjs} +24 -14
- package/dist/{device-lease-run-qRq_2W2V.mjs → device-lease-run-Do6zYA7y.mjs} +3 -3
- package/dist/{device-pool-CrmiE4_x.mjs → device-pool-CpoYiCGO.mjs} +2 -2
- package/dist/{device-provision-CK2XiEp1.mjs → device-provision-B5Ms94qY.mjs} +6 -6
- package/dist/{doctor-Dr3C1iXV.mjs → doctor-CJSB5q-s.mjs} +14 -14
- package/dist/{doctor-Cp4-HN1f.mjs → doctor-CLE4AZEI.mjs} +12 -12
- package/dist/{doctor-BO_kaFWX.mjs → doctor-CpfbYh3Q.mjs} +1 -1
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-watchman-CJr2aXXv.mjs → doctor-watchman-D1IyMle9.mjs} +2 -2
- package/dist/{eas-build-D-9HmGZS.mjs → eas-build-DIDOHw2P.mjs} +2 -2
- package/dist/{eas-fallback-Cemt2GVL.mjs → eas-fallback-DVS9oBSc.mjs} +2 -2
- package/dist/{eas-session-ledger-B0KLZx5m.mjs → eas-session-ledger-CW3l-inB.mjs} +1 -1
- package/dist/{error-diagnostics-CV_1RoEH.mjs → error-diagnostics-XJ9eWdtq.mjs} +5 -5
- package/dist/{gc-DjXwQXHK.mjs → gc-BVIcxCxE.mjs} +2 -2
- package/dist/{gc-CKHqL4aS.mjs → gc-Co7PE36D.mjs} +13 -13
- package/dist/{guide-CeRlWVsS.mjs → guide-DkepBgHT.mjs} +110 -13
- package/dist/{hosted-android-DI_vvv7U.mjs → hosted-android-Du7NxufJ.mjs} +2 -2
- package/dist/{hosted-client-CgoxdU9j.mjs → hosted-client-Cect92SZ.mjs} +2 -2
- package/dist/{hosted-logs-C-4INmkn.mjs → hosted-logs-Opcjv1Lr.mjs} +3 -3
- package/dist/{hosted-logs-sync-Bf5s02fi.mjs → hosted-logs-sync-wsI7N1Hv.mjs} +6 -10
- package/dist/{hosted-macos-Doh85YUM.mjs → hosted-macos-BP9Kucat.mjs} +4 -4
- package/dist/{hosted-native-DvZENAL-.mjs → hosted-native-DmdLSmvu.mjs} +6 -5
- package/dist/{idle-shutdown-BM37gMfU.mjs → idle-shutdown-BcMN_cLm.mjs} +4 -4
- package/dist/{ios-CNDH6fNF.mjs → ios-BFkBHuRT.mjs} +8 -8
- package/dist/{ios-UM_dManb.mjs → ios-CG0IsLtt.mjs} +24 -24
- package/dist/{ios-CoMCWfub.mjs → ios-CXnoVO_z.mjs} +2 -2
- package/dist/{ios-device-L1-pota_.mjs → ios-device-ClSfuu-_.mjs} +1 -1
- package/dist/{ios-project-DJYptOCh.mjs → ios-project-BM9TbTE7.mjs} +5 -5
- package/dist/{js-swap-BthE4kZC.mjs → js-swap-9Rx-5Nqz.mjs} +3 -3
- package/dist/{launch-D798aSm8.mjs → launch-DvJV1Mx4.mjs} +14 -14
- package/dist/{lightened-vSxkstg6.mjs → lightened-23pqe7LS.mjs} +2 -2
- package/dist/{logs-BND8MiBq.mjs → logs-DJgZlf2K.mjs} +5 -5
- package/dist/{logs-CilPftm3.mjs → logs-Pkeh3wZk.mjs} +5 -4
- package/dist/{macos-CxUi9xcE.mjs → macos-DPvPQadc.mjs} +15 -15
- package/dist/{macos-BOQrKYeJ.mjs → macos-Du07NsOB.mjs} +1 -1
- package/dist/maintenance-run.mjs +4 -4
- package/dist/{native-android-BkhrCjdX.mjs → native-android-CBOM1_gB.mjs} +12 -12
- package/dist/{native-gradle-artifact-inputs-Cw4P6Gyr.mjs → native-gradle-artifact-inputs-D_iAfPuS.mjs} +3 -3
- package/dist/{native-runtime-DyH2gkXK.mjs → native-runtime-D4cTwU0Z.mjs} +3 -3
- package/dist/{native-xcode-inputs-DV8jr3kJ.mjs → native-xcode-inputs-BF-ogSnG.mjs} +1 -1
- package/dist/{native-xcode-ios-DdpPG2iT.mjs → native-xcode-ios-DwJBfMP6.mjs} +12 -12
- package/dist/offload-worker.mjs +15 -15
- package/dist/{phone-reverses-DZRad8HT.mjs → phone-reverses-CvhhkGMH.mjs} +2 -2
- package/dist/{placement-log-CoN6xrjY.mjs → placement-log-CRR_TE1r.mjs} +1 -1
- package/dist/{plan-placement-7sHuqR-r.mjs → plan-placement-CdLc-pTb.mjs} +4 -4
- package/dist/{ports-VQSAPZhl.mjs → ports-g4N_cfyg.mjs} +1 -1
- package/dist/{prebuild-Bqp0LFGN.mjs → prebuild-DBJMhwSS.mjs} +6 -6
- package/dist/{project-D1n0K4yg.mjs → project-DPQjnpcI.mjs} +11 -11
- package/dist/{react-native-android-FQ-yX3Mv.mjs → react-native-android-idMWOwkX.mjs} +21 -21
- package/dist/{react-native-build-D58bIqV9.mjs → react-native-build-BSoh4HkH.mjs} +5 -5
- package/dist/{react-native-doctor-AkUH2aca.mjs → react-native-doctor-CYibY8-4.mjs} +8 -7
- package/dist/{react-native-ios-Dmsv8j7T.mjs → react-native-ios-13KIIOOy.mjs} +15 -14
- package/dist/{reload-CDKEzzaf.mjs → reload-B9DZOjcV.mjs} +1 -1
- package/dist/{reload-BV0nD-k9.mjs → reload-BUQI3dSu.mjs} +8 -8
- package/dist/{remote-C8xyslUa.mjs → remote-C-RGHhAP.mjs} +6 -6
- package/dist/{result-9fqcJ90W.mjs → result-W4HCum4A.mjs} +11 -11
- package/dist/{selection-D1ZDzHFX.mjs → selection-PCMT97XD.mjs} +1 -1
- package/dist/{server-command-RlS-Kl4a.mjs → server-command-oqi3TDy7.mjs} +2 -2
- package/dist/server-expo-BUFAq2In.mjs +2 -0
- package/dist/{server-expo-bB1VV2k-.mjs → server-expo-C1K07shx.mjs} +1 -1
- package/dist/{settings-BcVCcAT5.mjs → settings-CKlMOmhj.mjs} +2 -2
- package/dist/{settings-payload-_aatELz2.mjs → settings-payload-CE-NZ6Lq.mjs} +1 -1
- package/dist/{settings-write-CkTVGQ4O.mjs → settings-write-D7Xwa_-M.mjs} +2 -2
- package/dist/{slot-launch-Dbgfh8gc.mjs → slot-launch-CeIK1iUI.mjs} +4 -4
- package/dist/{stage-BuHuRj1y.mjs → stage-Blqe6bWb.mjs} +1 -1
- package/dist/{start-Dlv4XXTP.mjs → start-B7J5a9nS.mjs} +5 -5
- package/dist/{start-Cr-c3Xhq.mjs → start-CvP2pJjc.mjs} +1 -1
- package/dist/{stats-D5c-uIBp.mjs → stats-Uo7l8OAk.mjs} +3 -3
- package/dist/{status-DbQv--Yb.mjs → status-CqJI1TgG.mjs} +1 -1
- package/dist/{status-D6PBK6_-.mjs → status-_rWXFSO7.mjs} +15 -15
- package/dist/{status-watch-okrpea4i.mjs → status-watch-CnSyXUmj.mjs} +3 -3
- package/dist/status-worker.mjs +1 -1
- package/dist/{stop-CHtAiv79.mjs → stop-Bogo9oO2.mjs} +2 -2
- package/dist/{stop-uRQ-zYcl.mjs → stop-CMVfaA-6.mjs} +2 -2
- package/dist/{stop-p9uSKuGE.mjs → stop-CnF9ixYe.mjs} +10 -10
- package/dist/supervisor-run.mjs +9 -9
- package/dist/{support-PFyTkrnr.mjs → support-BGqpYMV8.mjs} +15 -11
- package/dist/{support-BMpQIug0.mjs → support-DUevTPur.mjs} +7 -7
- package/dist/{swiftpm-artifact-inputs-Cddq6jN2.mjs → swiftpm-artifact-inputs-BcJk6-3u.mjs} +1 -1
- package/dist/{swiftpm-macos-BSj9iZlI.mjs → swiftpm-macos-DBrmoocG.mjs} +4 -4
- package/dist/toolchain-Cw9VVHOY.mjs +2 -0
- package/dist/{toolchain-CLGnEUgT.mjs → toolchain-DLdoyxIt.mjs} +18 -10
- package/dist/{warm-progress--KkkBBaq.mjs → warm-progress-DQ2wQZKp.mjs} +1 -1
- package/dist/web-CI_qCRPw.mjs +2 -0
- package/dist/{web-xlVssjQf.mjs → web-g9U7L1sR.mjs} +3 -3
- package/dist/web-run.mjs +2 -2
- package/dist/{workspaces-CvSYD_78.mjs → workspaces-7_RWoi6c.mjs} +4 -4
- package/dist/{worktree-DTOIohFe.mjs → worktree-DEet9H3p.mjs} +1 -1
- package/dist/{worktree-CaQBf6kh.mjs → worktree-qKJ3x07S.mjs} +13 -13
- package/package.json +7 -7
- package/dist/device-BvpasThQ.mjs +0 -297
- package/dist/server-expo-BVV9qy31.mjs +0 -2
- package/dist/toolchain-B-mzR9Rh.mjs +0 -2
- package/dist/web-BxSo493O.mjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
2
2
|
import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
3
|
-
import { f as refuseNoProject, l as phaseLine } from "./command-output-
|
|
3
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-BBW8eWPL.mjs";
|
|
4
4
|
import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, rt as settingShapeErrors } from "./settings-D776ygML.mjs";
|
|
5
|
-
import { f as projectRegistry, n as findCommandWorkspace } from "./project-
|
|
5
|
+
import { f as projectRegistry, n as findCommandWorkspace } from "./project-DPQjnpcI.mjs";
|
|
6
6
|
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
|
|
7
7
|
import { o as readWebRecord, r as cdpEndpoint } from "./state-D5ZxwCGJ.mjs";
|
|
8
8
|
import { t as liveWebRecord } from "./page-CQJlcj3x.mjs";
|
|
9
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
9
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-D4cTwU0Z.mjs";
|
|
10
10
|
import chalk from "chalk";
|
|
11
11
|
//#region src/commands/web.ts
|
|
12
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-aULwtNly.mjs";
|
|
2
|
-
import { Tt as recordCreatedDevice } from "./android-
|
|
2
|
+
import { Tt as recordCreatedDevice } from "./android-DdKG6lyD.mjs";
|
|
3
3
|
import { f as signalProcessTree } from "./metro-BMQHczcf.mjs";
|
|
4
4
|
import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
|
|
5
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-D5ZxwCGJ.mjs";
|
|
6
|
-
import { l as probeWebDrivers } from "./activity-
|
|
6
|
+
import { l as probeWebDrivers } from "./activity-BTaUf0tc.mjs";
|
|
7
7
|
import { t as connectOwnedBrowser } from "./cdp-C3svvXiE.mjs";
|
|
8
8
|
import { t as relaunchWithLogFile } from "./detached-entry-BPlSaCwC.mjs";
|
|
9
9
|
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-DyDWurWG.mjs";
|
|
@@ -2,16 +2,16 @@ import { D as ownership_claim_exports, S as process_identity_exports, b as opera
|
|
|
2
2
|
import { A as workspaceName$1, E as workspaceDir, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, u as workspaceLastUsed, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
3
|
import { D as withConfigLock$1, 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$1, j as acquireAvdClaim, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
4
4
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
5
|
-
import { a as formatElapsed, d as quotedPath$1, l as phaseLine, o as formatLongDuration, u as plural } from "./command-output-
|
|
5
|
+
import { a as formatElapsed, d as quotedPath$1, l as phaseLine, o as formatLongDuration, u as plural } from "./command-output-BBW8eWPL.mjs";
|
|
6
6
|
import { c as gitQuiet, l as gitQuietAsync, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
7
7
|
import { Pt as lockReason, Vt as repoRootAsync, Xt as worktreeLockAsync, Yt as worktreeLock, pt as resolveTailscaleBinary } from "./settings-D776ygML.mjs";
|
|
8
8
|
import { a as macosRuntimeClaim, n as macosDir } from "./state-C2AUjjhg.mjs";
|
|
9
|
-
import { Ct as forgetCreatedDeviceAsync, G as ownedAvdSerialResolverAsync, H as ownedAvdMatchesConfiguration, K as ownedAvdSystemImage,
|
|
9
|
+
import { Ct as forgetCreatedDeviceAsync, G as ownedAvdSerialResolverAsync, H as ownedAvdMatchesConfiguration, K as ownedAvdSystemImage, M as listAdbDevicesAsync, R as listOrphanedAvdDirectories, S as deleteAvd, St as forgetCreatedDevice, Tt as recordCreatedDevice, V as ownedAvdDirectory, W as ownedAvdSerialResolver, _t as parkSim, bt as removeParkedAfter, g as avdPathExists, ht as eraseParkedAfter, it as shutdownAndroidEmulator, 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-DdKG6lyD.mjs";
|
|
10
10
|
import { c as pidExists, f as signalProcessTree, p as signalProcessTreeAsync } from "./metro-BMQHczcf.mjs";
|
|
11
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-D5ZxwCGJ.mjs";
|
|
12
12
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
13
|
-
import { N as listBuildLocks, d as readAgentDeviceRecords, i as createActivityReaderAsync, r as createActivityReader, s as idleForMs, t as agentDeviceDaemon } from "./activity-
|
|
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-
|
|
13
|
+
import { N as listBuildLocks, d as readAgentDeviceRecords, i as createActivityReaderAsync, r as createActivityReader, s as idleForMs, t as agentDeviceDaemon } from "./activity-BTaUf0tc.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-CXnoVO_z.mjs";
|
|
15
15
|
import { r as releaseBrowserPort } from "./named-ports-DcktE2Pw.mjs";
|
|
16
16
|
import { createHash, randomUUID } from "node:crypto";
|
|
17
17
|
import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, watch, writeFileSync } from "node:fs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as nestedWorktrees, c as registerRemove, d as removalPath, f as removalRemedy, g as worktreeCommand, h as warmedWorkspace, i as excludeWatchmanCookies, l as registerWarm, m as warmWorktreeTarget, n as dependencyInstallCommand, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, t as customIosDirs, u as removalBlockers } from "./worktree-
|
|
1
|
+
import { a as nestedWorktrees, c as registerRemove, d as removalPath, f as removalRemedy, g as worktreeCommand, h as warmedWorkspace, i as excludeWatchmanCookies, l as registerWarm, m as warmWorktreeTarget, n as dependencyInstallCommand, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, t as customIosDirs, u as removalBlockers } from "./worktree-qKJ3x07S.mjs";
|
|
2
2
|
export { customIosDirs, worktreeCommand as default, dependencyInstallCommand, excludePodChurn, excludeWatchmanCookies, nestedWorktrees, porcelainPath, reclaimKeys, registerRemove, registerWarm, removalBlockers, removalPath, removalRemedy, removeWorktreeTarget, warmWorktreeTarget, warmedWorkspace };
|
|
@@ -1,32 +1,32 @@
|
|
|
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-aULwtNly.mjs";
|
|
2
2
|
import { E as workspaceDir, a as recordWorkspaceUseAsync, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
|
|
3
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$1, j as acquireAvdClaim, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
4
|
-
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-
|
|
4
|
+
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-BBW8eWPL.mjs";
|
|
5
5
|
import { c as gitQuiet, l as gitQuietAsync, o as git, r as childEnvironment, s as gitAsync, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
|
|
6
6
|
import { Ct as gitCommonDirOnDisk, Dt as isPodInstallChurn, Et as hasUncommittedWorkAsync, Ft as matchWorktreeEntry, Gt as restoreFileAsync, Ht as resolveFullRef, It as nativeCanonicalPath, Jt as warmWorktreePaths, Kt as sourceCheckoutOf, Lt as podsOutOfSync, Mt as locallyKnownUpstream, Q as resolveSettings, Rt as readWorktreeExclude, St as gitCommonDirAsync, Tt as hasRemoteAsync, Ut as resolveFullRefAsync, V as readCommittedSettings, X as resolveProjectSettings, Y as resolveIosProjectDir, _ as inertSettingWarning, _t as deleteBranchAsync, a as SETTING_SHAPE_REMEDY, bt as dirtyPathsAsync, gt as cloneIgnoredEntries, ht as branchExistsAsync, jt as listWorktreesAsync, nn as moveIgnoredTreesToTrash, qt as unpushedCommitsAsync, rn as restoreTrashedTrees, rt as settingShapeErrors, st as unknownSettingKeys, tn as disposeTrash, vt as depsOutOfSync, wt as hasPopulatedSubmodulesAsync, zt as removeWorktreeAsync } from "./settings-D776ygML.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-
|
|
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-DPQjnpcI.mjs";
|
|
8
8
|
import { t as macosAppPresent } from "./state-C2AUjjhg.mjs";
|
|
9
9
|
import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
|
|
10
|
-
import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-
|
|
10
|
+
import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-DdKG6lyD.mjs";
|
|
11
11
|
import { c as pidExists, d as resolveProjectMetro, p as signalProcessTreeAsync, r as killMetroTreeAsync } from "./metro-BMQHczcf.mjs";
|
|
12
|
-
import { A as diskPressureLevel, D as requestDevServerStop, En as runProcessOperation, G as planCacheEmptying, Ln as resolveEasCliBin, N as lowestFree, Ot as endRecordedSession, _ as resolveBudget, g as readVolumeSpaceAsync, h as readVolumeSpace, k as withdrawDevServerStopRequest, p as machineNumber, ur as discoverCaches } from "./ccache-
|
|
12
|
+
import { A as diskPressureLevel, D as requestDevServerStop, En as runProcessOperation, G as planCacheEmptying, Ln as resolveEasCliBin, N as lowestFree, Ot as endRecordedSession, _ as resolveBudget, g as readVolumeSpaceAsync, h as readVolumeSpace, k as withdrawDevServerStopRequest, p as machineNumber, ur as discoverCaches } from "./ccache-B8gY50-h.mjs";
|
|
13
13
|
import { o as readWebRecord } from "./state-D5ZxwCGJ.mjs";
|
|
14
|
-
import { C as stopTunnel, E as withManagedRemoteWorktreeRemovalLock, O as withManagedTunnelRemovalLock, _ as emptyWorkspaceDir, ht as teardownOwnedIosSim, mt as teardownOwnedBrowser, o as collectWorkspaceOutputs, pt as teardownOwnedAvd, v as withIdleWorkspace, x as resolveSupervisorTarget } from "./workspaces-
|
|
14
|
+
import { C as stopTunnel, E as withManagedRemoteWorktreeRemovalLock, O as withManagedTunnelRemovalLock, _ as emptyWorkspaceDir, ht as teardownOwnedIosSim, mt as teardownOwnedBrowser, o as collectWorkspaceOutputs, pt as teardownOwnedAvd, v as withIdleWorkspace, x as resolveSupervisorTarget } from "./workspaces-7_RWoi6c.mjs";
|
|
15
15
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
16
|
-
import {
|
|
17
|
-
import { D as releaseWorkspaceLeases, t as agentDeviceDaemon } from "./activity-
|
|
18
|
-
import { R as readHostMemoryPressure, z as readHostMemoryPressureAsync } from "./ios-
|
|
16
|
+
import { C as DEPS_ERROR, E as readPodState, M as HEARTBEAT_INTERVAL_MS, O as runCaptured, T as podsAreStale, X as podInstallCommand, k as runPodInstall, lt as cacheUser } from "./toolchain-DLdoyxIt.mjs";
|
|
17
|
+
import { D as releaseWorkspaceLeases, t as agentDeviceDaemon } from "./activity-BTaUf0tc.mjs";
|
|
18
|
+
import { R as readHostMemoryPressure, z as readHostMemoryPressureAsync } from "./ios-CXnoVO_z.mjs";
|
|
19
19
|
import { t as clearNamedPorts } from "./named-ports-DcktE2Pw.mjs";
|
|
20
20
|
import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
|
|
21
|
-
import { i as stopHostedAndroid } from "./hosted-android-
|
|
22
|
-
import { a as stopHostedIos, n as removePhoneReverses } from "./phone-reverses-
|
|
23
|
-
import { r as stopMacosApp } from "./stop-
|
|
21
|
+
import { i as stopHostedAndroid } from "./hosted-android-Du7NxufJ.mjs";
|
|
22
|
+
import { a as stopHostedIos, n as removePhoneReverses } from "./phone-reverses-CvhhkGMH.mjs";
|
|
23
|
+
import { r as stopMacosApp } from "./stop-CMVfaA-6.mjs";
|
|
24
24
|
import { n as verifyCollectorOwnership } from "./ownership-Dtz9G5Gl.mjs";
|
|
25
25
|
import { o as pullRequestLookupAsync, r as endedPullRequest } from "./pull-request-BzLmzAIQ.mjs";
|
|
26
|
-
import { c as mergeStateAsync, d as forgetStatusMeasures, t as startWarmProgress } from "./warm-progress
|
|
26
|
+
import { c as mergeStateAsync, d as forgetStatusMeasures, t as startWarmProgress } from "./warm-progress-DQ2wQZKp.mjs";
|
|
27
27
|
import { r as workspaceRecordingEnabled } from "./recordings-CHMaF73C.mjs";
|
|
28
28
|
import { i as installedNpmTreeProblems, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-CPKAKCZ8.mjs";
|
|
29
|
-
import { a as discoverXcodeProject } from "./react-native-build-
|
|
29
|
+
import { a as discoverXcodeProject } from "./react-native-build-BSoh4HkH.mjs";
|
|
30
30
|
import { claimRemoveCommand, clearFreeClaimSet, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
31
31
|
import { createHash, randomUUID } from "node:crypto";
|
|
32
32
|
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stim",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Stim: fast, isolated React Native environments for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@expo/fingerprint": "^0.21.5",
|
|
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.
|
|
56
|
+
"@stim-cli/agent-driver": "1.30.0",
|
|
57
|
+
"@stim-cli/agent-driver-agent-device": "1.30.0",
|
|
58
|
+
"@stim-cli/cache": "1.30.0",
|
|
59
|
+
"@stim-cli/core": "1.30.0",
|
|
60
|
+
"@stim-cli/metro": "1.30.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.30.0",
|
|
70
70
|
"@types/cross-spawn": "^6.0.6",
|
|
71
71
|
"@types/which": "^3.0.4",
|
|
72
72
|
"@types/ws": "^8.18.1",
|
package/dist/device-BvpasThQ.mjs
DELETED
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import { G as projectDeviceSlots, V as deviceSlotKey, W as parseDeviceSlotOption, p as getProject } from "./config-AbUjIBOQ.mjs";
|
|
2
|
-
import { r as clockTime } from "./command-output-DjCsmzLZ.mjs";
|
|
3
|
-
import { i as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-D1n0K4yg.mjs";
|
|
4
|
-
import { A as listAdbDevices, O as getAvdNameForSerialAsync, R as memoizeEmulatorProbe, Y as physicalDeviceModel, Z as probeEmulatorSerial, c as androidPoolNoCandidatesRefusal, rt as resolvePhysicalDevice, s as androidPoolCandidates } from "./android-BHKgeOuq.mjs";
|
|
5
|
-
import { En as runProcessOperation } from "./ccache-DsDkdP72.mjs";
|
|
6
|
-
import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-BR5oHSO5.mjs";
|
|
7
|
-
import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-qRq_2W2V.mjs";
|
|
8
|
-
import { n as runProvision } from "./device-provision-CK2XiEp1.mjs";
|
|
9
|
-
import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-L1-pota_.mjs";
|
|
10
|
-
import { t as selectFromPool } from "./device-pool-CrmiE4_x.mjs";
|
|
11
|
-
import chalk from "chalk";
|
|
12
|
-
//#region src/commands/device.ts
|
|
13
|
-
const DEFAULT_FOR = "5m";
|
|
14
|
-
const DEFAULT_DEPS = {
|
|
15
|
-
findProjectRoot,
|
|
16
|
-
getProject,
|
|
17
|
-
avdNameOf: getAvdNameForSerialAsync,
|
|
18
|
-
listIosDevices,
|
|
19
|
-
listAdbDevices,
|
|
20
|
-
physicalDeviceModel,
|
|
21
|
-
probeEmulatorSerial,
|
|
22
|
-
takeLease,
|
|
23
|
-
releaseLeases: releaseWorkspaceLeases,
|
|
24
|
-
waitForDevice,
|
|
25
|
-
selectFromPool,
|
|
26
|
-
io: fileLeaseIo,
|
|
27
|
-
now: () => Date.now(),
|
|
28
|
-
sleep: (ms) => new Promise((r) => setTimeout(r, ms)),
|
|
29
|
-
out: (line) => console.log(line),
|
|
30
|
-
note: (line) => console.error(line)
|
|
31
|
-
};
|
|
32
|
-
function grantLine(facts, durationText) {
|
|
33
|
-
return `locked ${facts.deviceName ? `${facts.deviceName} (${facts.id})` : facts.id} for ${facts.holder} until ${clockTime(facts.expiresAt)} (${durationText}). Renew: stim device lock ${facts.platform}${facts.slot ? ` --slot ${facts.slot}` : ""} --for ${durationText}. Release: stim device unlock${facts.slot ? ` --slot ${facts.slot}` : ""}.`;
|
|
34
|
-
}
|
|
35
|
-
function releasedLine(lease) {
|
|
36
|
-
return `unlocked ${lease.deviceName ? `${lease.deviceName} (${lease.id})` : lease.id} -- the ${lease.platform} lease ran until ${clockTime(lease.expiresAt)}.`;
|
|
37
|
-
}
|
|
38
|
-
function readPlatform(value) {
|
|
39
|
-
return value === "ios" || value === "android" ? value : null;
|
|
40
|
-
}
|
|
41
|
-
async function resolveDevice(platform, requested, d) {
|
|
42
|
-
if (platform === "ios") {
|
|
43
|
-
const resolved = resolveIosPhysicalDevice(requested, await d.listIosDevices());
|
|
44
|
-
if (!resolved.udid) return {
|
|
45
|
-
code: "STIM_NO_DEVICE",
|
|
46
|
-
message: resolved.error,
|
|
47
|
-
remedy: resolved.remedy ?? null
|
|
48
|
-
};
|
|
49
|
-
return {
|
|
50
|
-
id: resolved.udid,
|
|
51
|
-
deviceName: resolved.name ?? resolved.udid
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
const resolved = resolvePhysicalDevice(requested, d.listAdbDevices(), d.probeEmulatorSerial);
|
|
55
|
-
if (!resolved.serial) return {
|
|
56
|
-
code: "STIM_NO_DEVICE",
|
|
57
|
-
message: resolved.error,
|
|
58
|
-
remedy: resolved.remedy ?? null
|
|
59
|
-
};
|
|
60
|
-
return {
|
|
61
|
-
id: resolved.serial,
|
|
62
|
-
deviceName: d.physicalDeviceModel(resolved.serial) ?? resolved.serial
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
async function findOwnedVirtualDevice(project, platform, id, avdNameOf) {
|
|
66
|
-
let running;
|
|
67
|
-
for (const { slot, platforms } of projectDeviceSlots(project)) {
|
|
68
|
-
if (platform === "ios") {
|
|
69
|
-
const sim = platforms.ios;
|
|
70
|
-
if (sim?.owned && sim.deviceUdid && sim.deviceUdid.toLowerCase() === id.toLowerCase()) return {
|
|
71
|
-
id: sim.deviceUdid,
|
|
72
|
-
deviceName: sim.deviceName ?? null,
|
|
73
|
-
slot
|
|
74
|
-
};
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
const emulator = platforms.android;
|
|
78
|
-
if (!emulator?.owned || !emulator.avdName || !/^emulator-\d+$/.test(id)) continue;
|
|
79
|
-
running ??= { name: await avdNameOf(id) };
|
|
80
|
-
if (running.name === emulator.avdName) return {
|
|
81
|
-
id,
|
|
82
|
-
deviceName: emulator.deviceName ?? emulator.avdName,
|
|
83
|
-
slot
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
function isFailure(value) {
|
|
89
|
-
return "code" in value;
|
|
90
|
-
}
|
|
91
|
-
async function poolDevice(platform, idLabel, waitSeconds, deadline, root, d, slot) {
|
|
92
|
-
const isEmulator = memoizeEmulatorProbe(d.probeEmulatorSerial);
|
|
93
|
-
const pooled = await d.selectFromPool({
|
|
94
|
-
...slot ? { slot } : {},
|
|
95
|
-
root,
|
|
96
|
-
platform,
|
|
97
|
-
idLabel,
|
|
98
|
-
list: async () => platform === "ios" ? iosPoolCandidates(await d.listIosDevices()).map((entry) => ({
|
|
99
|
-
id: entry.udid,
|
|
100
|
-
name: entry.name,
|
|
101
|
-
fallback: isWirelessIosDevice(entry)
|
|
102
|
-
})) : androidPoolCandidates(d.listAdbDevices(), isEmulator).map((entry) => ({ id: entry.serial })),
|
|
103
|
-
noCandidates: async () => {
|
|
104
|
-
const resolved = platform === "ios" ? iosPoolNoCandidatesRefusal(await d.listIosDevices()) : androidPoolNoCandidatesRefusal(d.listAdbDevices(), isEmulator);
|
|
105
|
-
return {
|
|
106
|
-
message: resolved.error,
|
|
107
|
-
remedy: resolved.remedy
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
waitSeconds,
|
|
111
|
-
deadline,
|
|
112
|
-
now: d.now,
|
|
113
|
-
sleep: d.sleep,
|
|
114
|
-
warn: (line) => d.note(chalk.yellow(line)),
|
|
115
|
-
io: d.io
|
|
116
|
-
});
|
|
117
|
-
if (pooled.status === "refused") return {
|
|
118
|
-
code: pooled.refusal.code,
|
|
119
|
-
message: pooled.refusal.message,
|
|
120
|
-
remedy: pooled.refusal.remedy,
|
|
121
|
-
...pooled.refusal.lease === null ? {} : { lease: pooled.refusal.lease }
|
|
122
|
-
};
|
|
123
|
-
const name = pooled.candidate.name ?? (platform === "ios" ? pooled.candidate.id : d.physicalDeviceModel(pooled.candidate.id));
|
|
124
|
-
return {
|
|
125
|
-
id: pooled.candidate.id,
|
|
126
|
-
deviceName: name ?? pooled.candidate.id
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
async function runLock(platformArg, idArg, opts = {}, overrides = {}) {
|
|
130
|
-
const d = {
|
|
131
|
-
...DEFAULT_DEPS,
|
|
132
|
-
...overrides
|
|
133
|
-
};
|
|
134
|
-
const json = Boolean(opts.json);
|
|
135
|
-
const report = (failure) => {
|
|
136
|
-
d.note(chalk.red(`${failure.code}: ${failure.message}`));
|
|
137
|
-
if (failure.remedy) d.note(chalk.dim(failure.remedy));
|
|
138
|
-
if (json) d.out(JSON.stringify({
|
|
139
|
-
code: failure.code,
|
|
140
|
-
message: failure.message,
|
|
141
|
-
remedy: failure.remedy,
|
|
142
|
-
...failure.lease === void 0 ? {} : { lease: failure.lease }
|
|
143
|
-
}));
|
|
144
|
-
return failure;
|
|
145
|
-
};
|
|
146
|
-
const platform = readPlatform(platformArg);
|
|
147
|
-
if (!platform) return report({
|
|
148
|
-
code: "STIM_BAD_ARG",
|
|
149
|
-
message: `\`stim device lock\` takes ios or android, not ${JSON.stringify(platformArg)}.`,
|
|
150
|
-
remedy: "Run `stim device lock ios` or `stim device lock android`."
|
|
151
|
-
});
|
|
152
|
-
const root = d.findProjectRoot(process.cwd());
|
|
153
|
-
if (!root) return report(NO_PROJECT_REFUSAL);
|
|
154
|
-
const durationText = String(opts.for ?? DEFAULT_FOR).trim();
|
|
155
|
-
const duration = parseLeaseDuration(durationText);
|
|
156
|
-
if ("error" in duration) return report({
|
|
157
|
-
code: "STIM_BAD_ARG",
|
|
158
|
-
message: duration.error,
|
|
159
|
-
remedy: "Pass a whole number of seconds or minutes from 10s to 30m, e.g. --for 90s or --for 10m."
|
|
160
|
-
});
|
|
161
|
-
const wait = parseDeviceWait(opts.wait);
|
|
162
|
-
if ("error" in wait) return report({
|
|
163
|
-
code: "STIM_BAD_ARG",
|
|
164
|
-
message: wait.error,
|
|
165
|
-
remedy: "Pass a whole number of seconds, e.g. --wait 90. `--wait 0` refuses a leased device at once."
|
|
166
|
-
});
|
|
167
|
-
const idLabel = platform === "ios" ? "udid" : "serial";
|
|
168
|
-
const deadline = d.now() + wait.seconds * 1e3;
|
|
169
|
-
const lastLine = { at: null };
|
|
170
|
-
const owned = idArg ? await findOwnedVirtualDevice(d.getProject(root), platform, idArg, d.avdNameOf) : null;
|
|
171
|
-
if (owned && opts.slot && opts.slot !== owned.slot) return report({
|
|
172
|
-
code: "STIM_BAD_ARG",
|
|
173
|
-
message: `${owned.id} is this workspace's ${platform} device in slot ${owned.slot}, not ${opts.slot}.`,
|
|
174
|
-
remedy: `Run \`stim device lock ${platform} ${owned.id}\` without --slot, or with --slot ${owned.slot}.`
|
|
175
|
-
});
|
|
176
|
-
const held = owned ? d.io.readHolder(root)[deviceSlotKey(platform, owned.slot)] : void 0;
|
|
177
|
-
if (owned && held && held.id !== owned.id) return report({
|
|
178
|
-
code: "STIM_DEVICE_BUSY",
|
|
179
|
-
message: `This workspace already leases ${held.id} for ${platform} in slot ${owned.slot}, and a workspace holds one lease per platform and slot.`,
|
|
180
|
-
remedy: `Release it with \`stim device unlock ${platform}${owned.slot === "default" ? "" : ` --slot ${owned.slot}`}\` once nothing depends on it, then lock ${owned.id}.`
|
|
181
|
-
});
|
|
182
|
-
const slot = owned ? owned.slot === "default" ? void 0 : owned.slot : opts.slot;
|
|
183
|
-
const device = owned ? owned : idArg ? await resolveDevice(platform, idArg, d) : await poolDevice(platform, idLabel, wait.seconds, deadline, root, d, opts.slot);
|
|
184
|
-
if (isFailure(device)) return report(device);
|
|
185
|
-
for (;;) {
|
|
186
|
-
const outcome = await d.waitForDevice({
|
|
187
|
-
...slot ? { slot } : {},
|
|
188
|
-
root,
|
|
189
|
-
platform,
|
|
190
|
-
id: device.id,
|
|
191
|
-
idLabel,
|
|
192
|
-
waitSeconds: wait.seconds,
|
|
193
|
-
now: d.now,
|
|
194
|
-
sleep: d.sleep,
|
|
195
|
-
warn: (line) => d.note(chalk.yellow(line)),
|
|
196
|
-
io: d.io,
|
|
197
|
-
deadline,
|
|
198
|
-
lastLine
|
|
199
|
-
});
|
|
200
|
-
if (outcome.status === "refused") return report({
|
|
201
|
-
...outcome.refusal,
|
|
202
|
-
lease: outcome.refusal.lease
|
|
203
|
-
});
|
|
204
|
-
const taken = d.takeLease({
|
|
205
|
-
...slot ? { slot } : {},
|
|
206
|
-
root,
|
|
207
|
-
platform,
|
|
208
|
-
id: device.id,
|
|
209
|
-
deviceName: device.deviceName,
|
|
210
|
-
kind: "declared",
|
|
211
|
-
durationMs: duration.ms
|
|
212
|
-
}, d.io);
|
|
213
|
-
if (taken.status === "unreadable") return report({
|
|
214
|
-
code: "STIM_DEVICE_BUSY",
|
|
215
|
-
message: `The lease file at ${taken.path} does not parse, so Stim cannot tell who holds that device.`,
|
|
216
|
-
remedy: `Read ${taken.path} and, once you know no run depends on it, delete it. \`stim gc\` reports it on every run.`,
|
|
217
|
-
lease: {
|
|
218
|
-
platform: null,
|
|
219
|
-
id: null,
|
|
220
|
-
deviceName: null,
|
|
221
|
-
holder: null,
|
|
222
|
-
expiresAt: null
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
if (taken.status === "held") continue;
|
|
226
|
-
const facts = {
|
|
227
|
-
...taken.lease.slot ? { slot: taken.lease.slot } : {},
|
|
228
|
-
platform,
|
|
229
|
-
id: taken.lease.id,
|
|
230
|
-
deviceName: taken.lease.deviceName,
|
|
231
|
-
holder: taken.lease.holder,
|
|
232
|
-
kind: "declared",
|
|
233
|
-
grantedAt: taken.lease.grantedAt,
|
|
234
|
-
expiresAt: taken.lease.expiresAt,
|
|
235
|
-
leaseSeconds: Math.round(duration.ms / 1e3)
|
|
236
|
-
};
|
|
237
|
-
if (json) d.out(JSON.stringify(facts));
|
|
238
|
-
else d.out(chalk.green(grantLine(facts, durationText)));
|
|
239
|
-
return facts;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
async function runUnlock(platformArg, opts = {}, overrides = {}) {
|
|
243
|
-
const d = {
|
|
244
|
-
...DEFAULT_DEPS,
|
|
245
|
-
...overrides
|
|
246
|
-
};
|
|
247
|
-
const json = Boolean(opts.json);
|
|
248
|
-
const report = (failure) => {
|
|
249
|
-
d.note(chalk.red(`${failure.code}: ${failure.message}`));
|
|
250
|
-
if (failure.remedy) d.note(chalk.dim(failure.remedy));
|
|
251
|
-
if (json) d.out(JSON.stringify({
|
|
252
|
-
code: failure.code,
|
|
253
|
-
message: failure.message,
|
|
254
|
-
remedy: failure.remedy
|
|
255
|
-
}));
|
|
256
|
-
return failure;
|
|
257
|
-
};
|
|
258
|
-
const platform = platformArg === void 0 ? null : readPlatform(platformArg);
|
|
259
|
-
if (platformArg !== void 0 && !platform) return report({
|
|
260
|
-
code: "STIM_BAD_ARG",
|
|
261
|
-
message: `\`stim device unlock\` takes ios or android, not ${JSON.stringify(platformArg)}.`,
|
|
262
|
-
remedy: "Run `stim device unlock` for every lease this workspace holds, or name one platform."
|
|
263
|
-
});
|
|
264
|
-
const root = d.findProjectRoot(process.cwd());
|
|
265
|
-
if (!root) return report(NO_PROJECT_REFUSAL);
|
|
266
|
-
const released = d.releaseLeases(root, {
|
|
267
|
-
platform,
|
|
268
|
-
...opts.slot ? { slot: opts.slot } : {}
|
|
269
|
-
}, d.io);
|
|
270
|
-
if (released.length === 0) d.note(chalk.dim(`No ${platform ? `${platform} ` : ""}device lease to release for ${root}. \`stim status\` lists every lease on this machine.`));
|
|
271
|
-
if (json) d.out(JSON.stringify(released.map((lease) => ({
|
|
272
|
-
...lease,
|
|
273
|
-
holder: root
|
|
274
|
-
}))));
|
|
275
|
-
else for (const lease of released) d.out(chalk.green(releasedLine(lease)));
|
|
276
|
-
return released;
|
|
277
|
-
}
|
|
278
|
-
function registerDevice(program, deps = {}) {
|
|
279
|
-
const device = program.command("device").description("Lease a connected physical device to this workspace, give it back, or provision iOS signing for it");
|
|
280
|
-
device.command("lock").argument("<platform>", "ios or android").argument("[id]", "the UDID or serial to lease, a connected device or this workspace's own simulator or emulator; without one, the first free connected device is used").description("Lease a connected physical device, or this workspace's own simulator or emulator, to this workspace for a declared time, so another workspace's `--device` run waits and agents see the device as driven. Nothing but this command and a `--device` run moves the expiry.").option("--for <duration>", `How long to hold it: a whole number of seconds or minutes from 10s to 30m (default ${DEFAULT_FOR})`).option("--wait <seconds>", "How long to wait for a device another workspace holds, before refusing with STIM_DEVICE_BUSY (default 60, 0 refuses at once)").option("--slot <name>", "Use this workspace device slot", parseDeviceSlotOption).option("--json", "print the lease as JSON on stdout").action(async (platform, id, opts) => {
|
|
281
|
-
if ("code" in await runLock(platform, id, opts, deps)) process.exit(1);
|
|
282
|
-
});
|
|
283
|
-
device.command("unlock").argument("[platform]", "ios or android; without one, every lease this workspace holds is released").description("Release the device lease or leases this workspace holds. Releasing nothing is not an error.").option("--slot <name>", "Use this workspace device slot", parseDeviceSlotOption).option("--json", "print the released leases as JSON on stdout").action(async (platform, opts) => {
|
|
284
|
-
const result = await runUnlock(platform, opts, deps);
|
|
285
|
-
if (!Array.isArray(result)) process.exit(1);
|
|
286
|
-
});
|
|
287
|
-
device.command("provision").argument("<platform>", "ios").argument("[udid]", "the connected iPhone or iPad to provision for; required when more than one is connected").description("Register a connected iPhone with the project's Apple Developer team and create or refresh its iOS App Development profile, through xcodebuild -allowProvisioningUpdates. It lists the account changes and asks first; no build ever does this.").option("--scheme <name>", "Xcode scheme whose signed targets to provision (default: ios.scheme, then detected)").option("--configuration <name>", "build configuration to provision (default: ios.configuration, then Debug)").option("--yes", "confirm the listed Apple Developer account changes without a prompt").option("--json", "print the plan and result, or the refusal, as JSON on stdout").action(async (platform, udid, opts) => {
|
|
288
|
-
const root = findProjectRoot(process.cwd()) ?? process.cwd();
|
|
289
|
-
const { value: result, interrupted } = await runProcessOperation(root, (operation) => runProvision(platform, udid, opts, { operation }));
|
|
290
|
-
if ("code" in result) process.exit(interrupted ?? 1);
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
function deviceCommand(program) {
|
|
294
|
-
registerDevice(program);
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
|
-
export { deviceCommand as default, grantLine, registerDevice, releasedLine, runLock, runUnlock };
|
package/dist/web-BxSo493O.mjs
DELETED