stim 1.19.0 → 1.20.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 +20 -3
- package/dist/{activity-BSw0x84R.mjs → activity-BrGh9EAI.mjs} +3 -3
- package/dist/{agent-device-usage-output-Bjxu_VmX.mjs → agent-device-usage-output-DVyv_hWj.mjs} +7 -7
- package/dist/android-0vv-OruW.mjs +6 -0
- package/dist/android-Brx6EKvJ.mjs +1258 -0
- package/dist/{android-BdQC6zs1.mjs → android-BsYNR81W.mjs} +103 -45
- package/dist/{android-DE5g_5gv.mjs → android-CK3fpEyZ.mjs} +2 -2
- package/dist/{android-cas-C87geAg-.mjs → android-cas-DCAuXryb.mjs} +9 -5
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api-run.mjs +159 -8
- package/dist/{api-DIf_s86s.mjs → api-zuX3ynYN.mjs} +5 -1
- package/dist/api.d.mts +98 -4
- package/dist/api.mjs +1 -1
- package/dist/{app-install-CFI4ptUL.mjs → app-install-0LgaQRT7.mjs} +9 -8
- package/dist/artifact-CnC0mfov.mjs +807 -0
- package/dist/artifact-DClXJNWx.mjs +772 -0
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +30 -0
- package/dist/{browser-web-CDhqQxhv.mjs → browser-web-CzBmhmgs.mjs} +19 -19
- package/dist/{budget-Dz-kyXLv.mjs → budget-BONq9vXY.mjs} +3101 -3062
- package/dist/build-BixRI6sB.mjs +462 -0
- package/dist/{build-facts-B87vo-Im.d.mts → build-facts-DcLv2HSd.d.mts} +1 -32
- package/dist/build-plan-CP0tckNU.mjs +553 -0
- package/dist/{cache-manifest-DiwKSyv9.mjs → cache-manifest-qA3dT2x2.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{manifest-CX0d1IkZ.mjs → ccache-CjHQ5F8g.mjs} +13 -19
- package/dist/{chrome-BTUOo8p2.mjs → chrome-Dp2lMLBe.mjs} +1 -1
- package/dist/{cli-C9Zvgbdc.mjs → cli-B2R8wH1F.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-CuUo8Nvg.mjs → client-BLy1Pw2V.mjs} +89 -307
- package/dist/collector-run.d.mts +4 -0
- package/dist/collector-run.mjs +7 -7
- package/dist/{command-output-Bt8ygHE7.mjs → command-output-BjPN99ZB.mjs} +2 -2
- package/dist/{config-DC5jEtd1.mjs → config-D0LhTY3S.mjs} +8 -12
- package/dist/{created-devices-D0s26Hx5.mjs → created-devices-HU_DAb_Q.mjs} +7 -6
- package/dist/{dependency-state-DKaS1OM9.mjs → dependency-state-B2m8eqsS.mjs} +2 -2
- package/dist/{detached-entry-pB_IPfV4.mjs → detached-entry-BXq4fIl-.mjs} +1 -1
- package/dist/{dev-client-CDY_zAmD.mjs → dev-client-ClATaJoH.mjs} +2 -2
- package/dist/{device-BHw0WlHl.mjs → device-B7lsC0K1.mjs} +8 -8
- package/dist/device-DVCwAFlX.mjs +727 -0
- package/dist/{device-capacity-BoN1jQkO.mjs → device-capacity-Ca_ke1LE.mjs} +13 -14
- package/dist/device-host-worker.mjs +38 -18
- package/dist/device-ios-CRUqPxKw.mjs +413 -0
- package/dist/{device-lease-Cu7PtQpZ.mjs → device-lease-DHOBXGgS.mjs} +135 -22
- package/dist/{device-lease-run-D38SnZtt.mjs → device-lease-run-CvDeHTkG.mjs} +4 -4
- package/dist/{device-pool-CP4rAsHx.mjs → device-pool-L2-5GxMy.mjs} +3 -3
- package/dist/{device-remote-B5GiUifk.mjs → device-remote-Bmg42063.mjs} +17 -68
- package/dist/doctor-C2MSuMMg.mjs +515 -0
- package/dist/{doctor-PRJH94v6.mjs → doctor-DPAqhVCK.mjs} +333 -744
- package/dist/{doctor-watchman-wZhyTdp4.mjs → doctor-watchman-CB4NnVZm.mjs} +13 -12
- package/dist/{simslim-D9LkJxIO.mjs → eas-build-Dw_ec2Km.mjs} +6 -152
- package/dist/{stim-installations-DbmUjsLv.mjs → eas-session-ledger-DZlC-Fq3.mjs} +57 -4
- package/dist/{error-diagnostics--v5HGOU0.mjs → error-diagnostics-Du7I_GuY.mjs} +17 -12
- package/dist/errors-DzkMYh8Q.mjs +205 -0
- package/dist/{exec-i8GDPwq9.mjs → exec-B81Qodjn.mjs} +40 -10
- package/dist/{gc-CyHMcKcn.mjs → gc-PWp34zGb.mjs} +21 -20
- package/dist/{device-ios-B2ruohE-.mjs → gradle-C2OEKCCI.mjs} +21 -650
- package/dist/{guide-dRaQJJk9.mjs → guide-Dai9lphv.mjs} +504 -117
- package/dist/{hosted-android-Bs7fytj7.mjs → hosted-android-DQ-Agsd8.mjs} +5 -5
- package/dist/{hosted-client-C5G4h_OJ.mjs → hosted-client-Io01s5By.mjs} +9 -3
- package/dist/{hosted-ios-Bik035eL.mjs → hosted-ios-DIxFnYp-.mjs} +3 -3
- package/dist/{hosted-logs-CI9Az9a4.mjs → hosted-logs-DP-ABU_M.mjs} +8 -8
- package/dist/{hosted-macos-DABm3ScO.mjs → hosted-macos-Aziw9T_9.mjs} +7 -6
- package/dist/{hosted-native-DbV2aUVw.mjs → hosted-native-BdAQi21M.mjs} +17 -14
- package/dist/{idle-shutdown-DYiMBn34.mjs → idle-shutdown-DdMqoSUB.mjs} +7 -7
- package/dist/{ios-DYUr9LGc.mjs → ios-BZ9dg2Fr.mjs} +8 -7
- package/dist/{ios-BWbHFZVz.mjs → ios-CXLIUxXJ.mjs} +180 -24
- package/dist/ios-CZuv6gRv.mjs +1112 -0
- package/dist/{ios-DCrkgXEM.mjs → ios-VGvNdsv2.mjs} +1 -1
- package/dist/{ios-device-CrW8aMb5.mjs → ios-device-B1B14xND.mjs} +1 -1
- package/dist/{ios-device-CJ_ZOGky.mjs → ios-device-BreZOpM0.mjs} +3 -3
- package/dist/ios-project-B9drt_aY.mjs +197 -0
- package/dist/{ios-state-By0XuLTQ.mjs → ios-state-CjrL2qv-.mjs} +1 -1
- package/dist/js-swap-C8icNYIY.mjs +432 -0
- package/dist/launch-DxH0THLP.mjs +745 -0
- package/dist/{react-native-ios-CSpIxexZ.mjs → launch-YrbqaIFj.mjs} +59 -612
- package/dist/{launch-verify-DCveSE6d.mjs → launch-verify-BzRdbuO1.mjs} +26 -7
- package/dist/{logs-Bao1HOMy.mjs → logs-DHaRNfg7.mjs} +11 -11
- package/dist/macos-C0iljhsN.mjs +2 -0
- package/dist/{macos-ciyBdTY5.mjs → macos-V_3Ui7g4.mjs} +42 -50
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -10
- package/dist/{metro-DI2AjPF_.mjs → metro-D_j9sN-B.mjs} +18 -5
- package/dist/{metro-gateway-BxpJLIwh.mjs → metro-gateway-BBJldOdi.mjs} +2 -2
- package/dist/miss-reason-BPAzZS0r.mjs +238 -0
- package/dist/{named-ports-B4iWH4E-.mjs → named-ports-C2lvoPsb.mjs} +3 -3
- package/dist/native-android-lHzaew7r.mjs +226 -0
- package/dist/native-gradle-inputs-BQnIdAlL.mjs +356 -0
- package/dist/{native-runtime-BGxsbfny.mjs → native-runtime-BRmWL7ru.mjs} +9 -8
- package/dist/native-xcode-inputs-eutS19jU.mjs +307 -0
- package/dist/native-xcode-ios-DP3cHLwu.mjs +434 -0
- package/dist/{ndjson-LGZAMsqa.mjs → ndjson-GOnbyvso.mjs} +6 -6
- package/dist/offload-worker.d.mts +41 -7
- package/dist/offload-worker.mjs +409 -74
- package/dist/{ownership-EB0ySdGK.mjs → ownership-DXzMMSx6.mjs} +2 -2
- package/dist/{placement-log-Dxe34rJm.mjs → placement-log-reFbjqEr.mjs} +1 -1
- package/dist/plan-BDk2AeY_.mjs +260 -0
- package/dist/plan-placement-D_YYlE6N.mjs +73 -0
- package/dist/{ports-ByPc0_97.mjs → ports-jzvAJXXL.mjs} +3 -3
- package/dist/{prebuild-BKJ3wJI1.mjs → prebuild-Bw44QxVh.mjs} +4 -4
- package/dist/{preview-BbSottmO.mjs → preview-BaBJ72Al.mjs} +50 -32
- package/dist/project-B8_duAzW.mjs +1067 -0
- package/dist/project-plan-BPwbLwQu.mjs +10 -0
- package/dist/{pull-request-IHNdMnG8.mjs → pull-request-vOhLNmIb.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/react-native-android-chm1DMlA.mjs +921 -0
- package/dist/react-native-build-oAw6gQeW.mjs +239 -0
- package/dist/react-native-doctor-DYXoh-6I.mjs +78 -0
- package/dist/react-native-ios-SCTK_CT5.mjs +595 -0
- package/dist/{recordings-Bv8McZN4.mjs → recordings-Bk-VivUV.mjs} +1 -1
- package/dist/{reload-rAPdqeRR.mjs → reload-D34GkY78.mjs} +17 -13
- package/dist/remote-BU9UyhCJ.mjs +192 -0
- package/dist/{remote-cache-N3hAEaAL.mjs → remote-cache-Bsts6f6Y.mjs} +5 -5
- package/dist/result-BDoRk1k3.mjs +186 -0
- package/dist/{run-lAkle1-c.mjs → run-qvff78hv.mjs} +3 -3
- package/dist/{server-bare-CkIjnegq.mjs → server-bare-dWjAarki.mjs} +5 -5
- package/dist/server-command-7XIKlWtO.mjs +69 -0
- package/dist/{server-expo-n3tUi3Em.mjs → server-expo-CsYu2aKL.mjs} +107 -82
- package/dist/server-expo-DV43vep4.mjs +2 -0
- package/dist/{settings-CxgngUZk.mjs → settings-Bbztm4oV.mjs} +179 -129
- package/dist/{settings-2am7TSxp.mjs → settings-CT3E71-i.mjs} +6 -6
- package/dist/{state-lKh8shBp.d.mts → settings-vk3mJGSm.d.mts} +4 -2
- package/dist/settings.schema.json +84 -0
- package/dist/simslim-ChMfe8rg.mjs +149 -0
- package/dist/{slot-launch-HV_KtPIw.mjs → slot-launch-B9hn96wd.mjs} +6 -6
- package/dist/{stage-BgaZJVZY.mjs → stage-BNKKdDNc.mjs} +6 -3
- package/dist/start-CbQCSnXQ.mjs +2 -0
- package/dist/{start-DtxthMfI.mjs → start-CdvcTaXr.mjs} +97 -68
- package/dist/{state-Tp4uImDS.mjs → state-Boo0IMJq.mjs} +1 -1
- package/dist/{state-D2KtnALG.mjs → state-DI84A-uu.mjs} +29 -10
- package/dist/{stats-8EJ5ivFT.mjs → stats-BIIDrjA8.mjs} +5 -5
- package/dist/{status-BEeL6IKz.mjs → status-BDGHwkCs.mjs} +3 -1
- package/dist/{status-BOyp0CUl.mjs → status-DARMkc9q.mjs} +81 -293
- package/dist/status-watch-DvmI3SmN.mjs +296 -0
- package/dist/{stim-desktop-C65jk_q2.mjs → stim-desktop-8GQX2OV8.mjs} +1 -1
- package/dist/{stop-DRipAg-e.mjs → stop-CCZS-C9m.mjs} +2 -2
- package/dist/{stop-D0UIpZuh.mjs → stop-WQPQHLuy.mjs} +5 -5
- package/dist/{stop-zDlknFoz.mjs → stop-iNemHsJC.mjs} +21 -20
- package/dist/supervisor-run.d.mts +7 -2
- package/dist/supervisor-run.mjs +32 -20
- package/dist/{support-DsNaFg6D.mjs → support-CnE_SIjt.mjs} +17 -7
- package/dist/{support-CNqYkV0y.mjs → support-DCco5fut.mjs} +61 -8
- package/dist/{swiftpm-macos-aJzPAj1t.mjs → swiftpm-macos-afeNUExW.mjs} +5 -5
- package/dist/tailnet-CoJUb2tB.mjs +265 -0
- package/dist/toolchain-BIupIro1.mjs +2 -0
- package/dist/{toolchain-C3xSoyUl.mjs → toolchain-DqyDXs30.mjs} +206 -53
- package/dist/{trigger-CAhmG-4s.mjs → trigger-C0MWBi8O.mjs} +2 -2
- package/dist/trigger-SHLOWJ4O.mjs +2 -0
- package/dist/{warm-progress-pFLB2e6P.mjs → warm-progress-C3ASD6z5.mjs} +6 -6
- package/dist/{watchman-BL1IdOtq.mjs → watchman-CQl51YZu.mjs} +6 -6
- package/dist/{web-DbbrPUn0.mjs → web-B3eldHFH.mjs} +9 -13
- package/dist/web-BLXpOe6b.mjs +2 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-CR9X86xJ.mjs → workspace-state-CSIFuuDa.mjs} +33 -33
- package/dist/{workspaces-Djb2gfi9.mjs → workspaces-D2xSHBDY.mjs} +1260 -1258
- package/dist/{worktree-BL4M1rhB.mjs → worktree-BxDqaTev.mjs} +84 -48
- package/dist/worktree-q7_OZNY0.mjs +2 -0
- package/package.json +8 -6
- package/shim/native-android.gradle +101 -0
- package/dist/android-BXc6BmEi.mjs +0 -3732
- package/dist/android-BvV1gGdN.mjs +0 -4
- package/dist/ios-ITYno9rO.mjs +0 -2241
- package/dist/macos-nIOATJmR.mjs +0 -2
- package/dist/metro-store-BAHFcJm6.mjs +0 -106
- package/dist/miss-reason-CjQCOKqq.mjs +0 -1743
- package/dist/plan-placement-BVY59qa8.mjs +0 -290
- package/dist/project-B5eQ1USs.mjs +0 -612
- package/dist/react-native-ios-BMh2i25I.mjs +0 -2
- package/dist/server-expo-DGsdUGX2.mjs +0 -2
- package/dist/start-D8NbxNBb.mjs +0 -2
- package/dist/trigger-CoalsMTV.mjs +0 -2
- package/dist/web-DFpFeZu5.mjs +0 -2
- package/dist/worktree-DV-A0LNL.mjs +0 -2
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
-
import { t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { i as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { a as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
2
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
3
|
+
import { E as upsertProject, H as projectDeviceSlots, S as removeProject, _ as loadConfig$1, a as clearDevice, d as getConfigDir, g as isPathPrefix, k as acquireAvdClaim, p as getProject } from "./config-D0LhTY3S.mjs";
|
|
4
|
+
import { At as sourceCheckoutOf, Ct as podsOutOfSync, Dt as resolveFullRef, G as resolveIosProjectDir, K as resolveProjectSettings, Mt as warmWorktreePaths, Q as settingShapeErrors, R as readCommittedSettings, St as locallyKnownUpstream, Tt as removeWorktree, _t as hasRemote, a as SETTING_SHAPE_REMEDY, ct as branchExists, dt as depsOutOfSync, gt as hasPopulatedSubmodules, ht as gitCommonDirOnDisk, jt as unpushedCommits, kt as restoreFile, lt as cloneIgnoredEntries, mt as gitCommonDir, nt as unknownSettingKeys, pt as dirtyPaths, q as resolveSettings, ut as deleteBranch, vt as hasUncommittedWork, wt as readWorktreeExclude, xt as listWorktrees, yt as isPodInstallChurn } from "./settings-Bbztm4oV.mjs";
|
|
5
|
+
import { u as releaseWorkspaceLeases } from "./device-lease-DHOBXGgS.mjs";
|
|
6
|
+
import { i as recordWorkspaceUse, r as readWorkspaceState$1, x as workspaceDir, y as workspaceAgentDeviceDir } from "./workspace-state-CSIFuuDa.mjs";
|
|
7
|
+
import { a as formatElapsed, h as shortUdid, i as formatDuration, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-BjPN99ZB.mjs";
|
|
8
|
+
import { D as clearManagedMetroTunnel, N as readRemoteSession, O as clearRemoteSession, P as readRemoteSessionId, a as isMobileProject, j as readMetroTunnel, r as findProjectRoot, w as MODE_COMMAND } from "./project-B8_duAzW.mjs";
|
|
9
|
+
import { a as workspaceLinks, i as workspaceLinkLine } from "./stim-desktop-8GQX2OV8.mjs";
|
|
10
|
+
import { at as POOL_SETTING_REMEDY, dt as parkedMaxSetting } from "./android-BsYNR81W.mjs";
|
|
11
|
+
import { d as signalProcessTree, r as killMetroTree, s as pidExists, u as resolveProjectMetro } from "./metro-D_j9sN-B.mjs";
|
|
12
|
+
import { A as withManagedRemoteWorktreeRemovalLock, D as stopTunnel, M as withManagedTunnelRemovalLock, P as resolveSupervisorTarget, b as teardownOwnedIosSim, d as emptyWorkspaceDir, f as withIdleWorkspace, v as teardownOwnedAvd, y as teardownOwnedBrowser } from "./workspaces-D2xSHBDY.mjs";
|
|
13
|
+
import { _t as withdrawDevServerStopRequest, ht as requestDevServerStop, o as machineNumber } from "./budget-BONq9vXY.mjs";
|
|
14
|
+
import { t as clearNamedPorts } from "./named-ports-C2lvoPsb.mjs";
|
|
15
|
+
import { f as resolveEasCliBin } from "./remote-cache-Bsts6f6Y.mjs";
|
|
16
|
+
import { o as readWebRecord } from "./state-DI84A-uu.mjs";
|
|
17
|
+
import { t as agentDeviceDaemon } from "./activity-BrGh9EAI.mjs";
|
|
18
|
+
import { t as macosAppPresent } from "./state-Boo0IMJq.mjs";
|
|
19
|
+
import { L as podInstallCommand, d as DEPS_ERROR, f as podsAreStale, g as runPodInstall, h as runCaptured, p as readPodState, y as HEARTBEAT_INTERVAL_MS } from "./toolchain-DqyDXs30.mjs";
|
|
20
|
+
import { a as discoverXcodeProject } from "./react-native-build-oAw6gQeW.mjs";
|
|
21
|
+
import { i as stopHostedAndroid } from "./hosted-android-DQ-Agsd8.mjs";
|
|
22
|
+
import { i as endRecordedSession } from "./device-remote-Bmg42063.mjs";
|
|
23
|
+
import { n as verifyCollectorOwnership } from "./ownership-DXzMMSx6.mjs";
|
|
24
|
+
import { r as stopHostedIos } from "./hosted-ios-DIxFnYp-.mjs";
|
|
25
|
+
import { n as stopMacosApp } from "./stop-WQPQHLuy.mjs";
|
|
26
|
+
import { a as pullRequestLookup, r as endedPullRequest } from "./pull-request-vOhLNmIb.mjs";
|
|
27
|
+
import { a as forgetStatusMeasures, s as mergeState, t as startWarmProgress } from "./warm-progress-C3ASD6z5.mjs";
|
|
28
|
+
import { r as workspaceRecordingEnabled } from "./recordings-Bk-VivUV.mjs";
|
|
29
|
+
import { n as hasInstalledDependencies, r as installedNpmTreeIsValid, t as dependencyState } from "./dependency-state-B2m8eqsS.mjs";
|
|
29
30
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, utimesSync, writeFileSync } from "node:fs";
|
|
30
31
|
import { basename, dirname, join, relative } from "node:path";
|
|
31
32
|
import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, relative as relative$1, resolve as resolve$1 } from "path";
|
|
32
33
|
import { LAST_BUILD_KEYS, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, countErrorEntries, endedAgentSessionOf, listRecordedDevices, loadConfig, queryLogs, readArchives, readBuildHistory, readJsonObject, readLastBuilds, readMacosRecord, readPullRequestCache, readWorkspaceState, recordingEnabled, sortByTs } from "@stim-cli/core/state";
|
|
33
|
-
import { homedir } from "node:os";
|
|
34
|
-
import chalk from "chalk";
|
|
35
34
|
import { existsSync as existsSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, readlinkSync as readlinkSync$1, realpathSync as realpathSync$1, renameSync as renameSync$1, rmSync as rmSync$1, symlinkSync as symlinkSync$1, unlinkSync as unlinkSync$1, writeFileSync as writeFileSync$1 } from "fs";
|
|
36
35
|
import { withDirLock, workspaceName } from "@stim-cli/core";
|
|
37
36
|
import { claimRemoveCommand, clearFreeClaimSet, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
38
37
|
import { createHash, randomUUID } from "node:crypto";
|
|
38
|
+
import { homedir } from "node:os";
|
|
39
|
+
import chalk from "chalk";
|
|
39
40
|
import { createHash as createHash$1 } from "crypto";
|
|
40
41
|
//#region src/workspace/pods-relocate.ts
|
|
41
42
|
const CHECKSUMS_HEADER = "SPEC CHECKSUMS:\n";
|
|
@@ -944,7 +945,7 @@ async function reclaimProject(path, options = {}) {
|
|
|
944
945
|
};
|
|
945
946
|
}
|
|
946
947
|
async function reclaimIdleProject(path, workspaceExisted, { archive, deleteOwnedDevices = false, parkOwnedDevices = false, preserveProjectRecord = false, stopSession = defaultStopSession, stopMetroTunnel = defaultStopMetroTunnel, releaseLeases = releaseWorkspaceLeases, verifyCollector = verifyCollectorOwnership, teardownBrowser = teardownOwnedBrowser, stopRequester = { by: "stim gc --delete" } }) {
|
|
947
|
-
await clearNamedPorts(path
|
|
948
|
+
await clearNamedPorts(path);
|
|
948
949
|
const project = getProject(path);
|
|
949
950
|
for (const { platforms } of projectDeviceSlots(project)) if (platforms.android?.owned && platforms.android.avdName) (0, ownership_claim_exports.releaseClaim)(acquireAvdClaim(platforms.android.avdName));
|
|
950
951
|
const dereferenced = describeDereferenced(project);
|
|
@@ -977,7 +978,7 @@ async function reclaimIdleProject(path, workspaceExisted, { archive, deleteOwned
|
|
|
977
978
|
} else if (orphanIdentity === "same") {
|
|
978
979
|
let signalled = false;
|
|
979
980
|
try {
|
|
980
|
-
signalled = signalProcessTree(orphanServer.pid, "SIGTERM");
|
|
981
|
+
signalled = signalProcessTree(orphanServer.pid, "SIGTERM", { group: initialState?.supervisor?.mode === MODE_COMMAND });
|
|
981
982
|
} catch {}
|
|
982
983
|
if (signalled ? await (0, process_identity_exports.waitForProcessExit)(orphanServer, 1e4) : ["gone", "different"].includes((0, process_identity_exports.inspectProcessIdentity)(orphanServer))) killedPid = orphanServer.pid;
|
|
983
984
|
else {
|
|
@@ -1488,30 +1489,30 @@ function incompleteInstallRefusal(root, appDir) {
|
|
|
1488
1489
|
remedy: `Run \`stim worktree warm --refresh\` to install them in the source checkout -- it reinstalls rather than skipping, because no completed install of this ${dependencies.lock} is recorded -- then warm again.`
|
|
1489
1490
|
};
|
|
1490
1491
|
}
|
|
1491
|
-
function podsPlan({ hasIos, hasPodfile, podfileLockChanged, stale }) {
|
|
1492
|
+
function podsPlan({ hasIos, hasPodfile, podfileLockChanged, stale, dir = "ios/" }) {
|
|
1492
1493
|
if (!hasIos) return {
|
|
1493
1494
|
run: false,
|
|
1494
|
-
reason:
|
|
1495
|
+
reason: `no ${dir || "./"} directory`
|
|
1495
1496
|
};
|
|
1496
1497
|
if (!hasPodfile) return {
|
|
1497
1498
|
run: false,
|
|
1498
|
-
reason:
|
|
1499
|
+
reason: `no ${dir}Podfile`
|
|
1499
1500
|
};
|
|
1500
1501
|
if (stale.noPods) return {
|
|
1501
1502
|
run: false,
|
|
1502
|
-
reason:
|
|
1503
|
+
reason: `no ${dir}Pods and no ${dir}Podfile.lock`
|
|
1503
1504
|
};
|
|
1504
1505
|
if (podfileLockChanged) return {
|
|
1505
1506
|
run: true,
|
|
1506
|
-
reason:
|
|
1507
|
+
reason: `${dir}Podfile.lock changed`
|
|
1507
1508
|
};
|
|
1508
1509
|
if (stale.stale) return {
|
|
1509
1510
|
run: true,
|
|
1510
|
-
reason: stale.reason ??
|
|
1511
|
+
reason: stale.reason ?? `${dir}Pods does not match ${dir}Podfile.lock`
|
|
1511
1512
|
};
|
|
1512
1513
|
return {
|
|
1513
1514
|
run: false,
|
|
1514
|
-
reason:
|
|
1515
|
+
reason: `${dir}Podfile.lock unchanged`
|
|
1515
1516
|
};
|
|
1516
1517
|
}
|
|
1517
1518
|
function defaultBranchNote(branch, defaultBranch) {
|
|
@@ -1754,7 +1755,7 @@ function fastForward(root, upstream) {
|
|
|
1754
1755
|
};
|
|
1755
1756
|
}
|
|
1756
1757
|
}
|
|
1757
|
-
async function refreshMainCheckout({ root, appDir, settings, emit, spawnFn = null, now = Date.now, heartbeatMs = HEARTBEAT_INTERVAL_MS, installer = NO_INSTALLER_CLAIM, inspectOnly = false }) {
|
|
1758
|
+
async function refreshMainCheckout({ root, appDir, settings, iosProject, emit, spawnFn = null, now = Date.now, heartbeatMs = HEARTBEAT_INTERVAL_MS, installer = NO_INSTALLER_CLAIM, inspectOnly = false }) {
|
|
1758
1759
|
const state = readMainCheckoutState(root);
|
|
1759
1760
|
const refusal = mainCheckoutRefusal(root, state);
|
|
1760
1761
|
if (refusal) return refusal;
|
|
@@ -1863,12 +1864,14 @@ async function refreshMainCheckout({ root, appDir, settings, emit, spawnFn = nul
|
|
|
1863
1864
|
}
|
|
1864
1865
|
const app = relative(root, appDir) || ".";
|
|
1865
1866
|
const where = `source ${appDir}: `;
|
|
1866
|
-
const
|
|
1867
|
+
const ios = iosProject;
|
|
1868
|
+
const podState = readPodState(appDir, ios.dir);
|
|
1867
1869
|
const pods = podsPlan({
|
|
1868
|
-
hasIos: existsSync(
|
|
1870
|
+
hasIos: existsSync(ios.dir),
|
|
1869
1871
|
hasPodfile: podState.hasPodfile,
|
|
1870
|
-
podfileLockChanged: pathChangedBetween(root, before, head, gitPath(app,
|
|
1871
|
-
stale: podsAreStale(podState.lockText, podState.manifestText)
|
|
1872
|
+
podfileLockChanged: pathChangedBetween(root, before, head, gitPath(app, ios.relative, "Podfile.lock")),
|
|
1873
|
+
stale: podsAreStale(podState.lockText, podState.manifestText, podState.dir),
|
|
1874
|
+
dir: podState.dir
|
|
1872
1875
|
});
|
|
1873
1876
|
if (!pods.run) {
|
|
1874
1877
|
emit(stepLine("pods", `${where}${pods.reason}`, "skipped"));
|
|
@@ -1879,7 +1882,8 @@ async function refreshMainCheckout({ root, appDir, settings, emit, spawnFn = nul
|
|
|
1879
1882
|
spawnFn: spawn,
|
|
1880
1883
|
now,
|
|
1881
1884
|
heartbeatMs,
|
|
1882
|
-
onHeartbeat: emit
|
|
1885
|
+
onHeartbeat: emit,
|
|
1886
|
+
directory: ios.dir
|
|
1883
1887
|
});
|
|
1884
1888
|
const podCommand = result.command ?? "pod install";
|
|
1885
1889
|
emit(stepLine("pods", `${where}${pods.reason}`, result.durationMs === void 0 ? podCommand : `${podCommand} (${formatDuration(result.durationMs)})`));
|
|
@@ -2060,6 +2064,7 @@ function registerWarm(worktree) {
|
|
|
2060
2064
|
root,
|
|
2061
2065
|
appDir: mainCheckoutAppDir(root, target),
|
|
2062
2066
|
settings,
|
|
2067
|
+
iosProject: appIosProjectDir(mainCheckoutAppDir(root, target)),
|
|
2063
2068
|
emit: (line) => lines.push(line),
|
|
2064
2069
|
inspectOnly: true
|
|
2065
2070
|
});
|
|
@@ -2089,6 +2094,7 @@ function registerWarm(worktree) {
|
|
|
2089
2094
|
root,
|
|
2090
2095
|
appDir: mainCheckoutAppDir(root, target),
|
|
2091
2096
|
settings,
|
|
2097
|
+
iosProject: appIosProjectDir(mainCheckoutAppDir(root, target)),
|
|
2092
2098
|
emit: (line) => console.error(line),
|
|
2093
2099
|
installer: hold.installer
|
|
2094
2100
|
});
|
|
@@ -2129,6 +2135,36 @@ function porcelainPath(line) {
|
|
|
2129
2135
|
}
|
|
2130
2136
|
const SAFE_DIFF_PATH = /^[A-Za-z0-9._/-]+$/;
|
|
2131
2137
|
const POD_CHURN_PATH = /(?:^|\/)ios\/(?:Podfile\.lock|[^/]+\.xcodeproj\/project\.pbxproj)$/;
|
|
2138
|
+
function isPodChurn(path, iosDirs) {
|
|
2139
|
+
if (POD_CHURN_PATH.test(path)) return true;
|
|
2140
|
+
return iosDirs.some(({ dir, project }) => {
|
|
2141
|
+
const prefix = dir === "." ? "" : `${dir}/`;
|
|
2142
|
+
const rest = path.startsWith(prefix) ? path.slice(prefix.length) : null;
|
|
2143
|
+
return rest === "Podfile.lock" || project !== null && rest === `${project}.xcodeproj/project.pbxproj`;
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
function customIosDirs(worktree) {
|
|
2147
|
+
let root;
|
|
2148
|
+
try {
|
|
2149
|
+
root = realpathSync$1(worktree);
|
|
2150
|
+
} catch {
|
|
2151
|
+
return [];
|
|
2152
|
+
}
|
|
2153
|
+
return Object.keys(loadConfig$1()?.projects ?? {}).filter((path) => isPathPrefix(worktree, path)).map((path) => ({
|
|
2154
|
+
path,
|
|
2155
|
+
ios: appIosProjectDir(path)
|
|
2156
|
+
})).filter(({ ios }) => ios.custom && existsSync$1(ios.dir)).map(({ path, ios }) => ({
|
|
2157
|
+
dir: relative$1(root, ios.dir) || ".",
|
|
2158
|
+
project: discoverXcodeProject(path, ios.dir).name ?? null
|
|
2159
|
+
}));
|
|
2160
|
+
}
|
|
2161
|
+
function appIosProjectDir(appDir) {
|
|
2162
|
+
let settings = null;
|
|
2163
|
+
try {
|
|
2164
|
+
settings = resolveProjectSettings(appDir).settings;
|
|
2165
|
+
} catch {}
|
|
2166
|
+
return resolveIosProjectDir(settings, appDir);
|
|
2167
|
+
}
|
|
2132
2168
|
const WATCHMAN_COOKIE_PATH = /(?:^|\/)\.watchman-cookie-[A-Za-z0-9._-]+$/;
|
|
2133
2169
|
function excludeWatchmanCookies(lines) {
|
|
2134
2170
|
const kept = [];
|
|
@@ -2143,12 +2179,12 @@ function excludeWatchmanCookies(lines) {
|
|
|
2143
2179
|
cookies
|
|
2144
2180
|
};
|
|
2145
2181
|
}
|
|
2146
|
-
function excludePodChurn(lines) {
|
|
2182
|
+
function excludePodChurn(lines, iosDirs = []) {
|
|
2147
2183
|
const kept = [];
|
|
2148
2184
|
const restore = [];
|
|
2149
2185
|
for (const line of lines || []) {
|
|
2150
2186
|
const path = porcelainPath(line);
|
|
2151
|
-
if (path && String(line).startsWith(" M ") && SAFE_DIFF_PATH.test(path) &&
|
|
2187
|
+
if (path && String(line).startsWith(" M ") && SAFE_DIFF_PATH.test(path) && isPodChurn(path, iosDirs)) {
|
|
2152
2188
|
restore.push(path);
|
|
2153
2189
|
continue;
|
|
2154
2190
|
}
|
|
@@ -2401,7 +2437,7 @@ function canonicalExistingPath(target) {
|
|
|
2401
2437
|
function inspectRemoval(path, mergedHead) {
|
|
2402
2438
|
const gitAnswered = hasUncommittedWork(path);
|
|
2403
2439
|
const { lines: withoutCookies, cookies } = excludeWatchmanCookies(gitAnswered ? dirtyPaths(path, { limit: Infinity }) : []);
|
|
2404
|
-
const { lines: dirtyLines, restore: podChurn } = excludePodChurn(withoutCookies);
|
|
2440
|
+
const { lines: dirtyLines, restore: podChurn } = excludePodChurn(withoutCookies, customIosDirs(path));
|
|
2405
2441
|
const dirty = gitAnswered === null ? null : dirtyLines.length > 0;
|
|
2406
2442
|
const unpushed = unpushedCommits(path);
|
|
2407
2443
|
const blockers = removalBlockers({
|
|
@@ -2684,4 +2720,4 @@ function worktreeCommand(program) {
|
|
|
2684
2720
|
registerRemove(worktree);
|
|
2685
2721
|
}
|
|
2686
2722
|
//#endregion
|
|
2687
|
-
export {
|
|
2723
|
+
export { reclaimProject as _, matchWorktreeEntry as a, registerRemove as c, removalPath as d, removalRemedy as f, describeDereferenced as g, worktreeCommand as h, excludeWatchmanCookies as i, registerWarm as l, warmedWorkspace as m, dependencyInstallCommand as n, porcelainPath as o, removeWorktreeTarget as p, excludePodChurn as r, reclaimKeys as s, customIosDirs as t, removalBlockers as u, deleteSelectedArchives as v, sweepArchiveStaging as y };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as matchWorktreeEntry, c as registerRemove, d as removalPath, f as removalRemedy, h as worktreeCommand, i as excludeWatchmanCookies, l as registerWarm, m as warmedWorkspace, n as dependencyInstallCommand, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, t as customIosDirs, u as removalBlockers } from "./worktree-BxDqaTev.mjs";
|
|
2
|
+
export { customIosDirs, worktreeCommand as default, dependencyInstallCommand, excludePodChurn, excludeWatchmanCookies, matchWorktreeEntry, porcelainPath, reclaimKeys, registerRemove, registerWarm, removalBlockers, removalPath, removalRemedy, removeWorktreeTarget, warmedWorkspace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stim",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "Stim: fast, isolated React Native environments for coding agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -53,17 +53,19 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@expo/fingerprint": "^0.20.10",
|
|
56
|
-
"@stim-cli/cache": "^1.
|
|
57
|
-
"@stim-cli/core": "^1.
|
|
58
|
-
"@stim-cli/metro": "^1.
|
|
56
|
+
"@stim-cli/cache": "^1.20.0",
|
|
57
|
+
"@stim-cli/core": "^1.20.0",
|
|
58
|
+
"@stim-cli/metro": "^1.20.0",
|
|
59
|
+
"@xmldom/xmldom": "0.9.12",
|
|
59
60
|
"chalk": "^6.0.0",
|
|
60
61
|
"commander": "^15.0.0",
|
|
61
62
|
"cross-spawn": "^7.0.6",
|
|
62
63
|
"which": "^5.0.0",
|
|
63
|
-
"ws": "^8.21.3"
|
|
64
|
+
"ws": "^8.21.3",
|
|
65
|
+
"xcode": "3.0.1"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
|
-
"@stim-cli/expo-build-cache": "1.
|
|
68
|
+
"@stim-cli/expo-build-cache": "1.20.0",
|
|
67
69
|
"@types/cross-spawn": "^6.0.6",
|
|
68
70
|
"@types/which": "^3.0.4",
|
|
69
71
|
"@types/ws": "^8.18.1",
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import groovy.json.JsonOutput
|
|
2
|
+
import org.gradle.api.DefaultTask
|
|
3
|
+
import org.gradle.api.GradleException
|
|
4
|
+
import org.gradle.api.file.DirectoryProperty
|
|
5
|
+
import org.gradle.api.file.RegularFileProperty
|
|
6
|
+
import org.gradle.api.provider.Property
|
|
7
|
+
import org.gradle.api.provider.ListProperty
|
|
8
|
+
import org.gradle.api.tasks.Input
|
|
9
|
+
import org.gradle.api.tasks.InputDirectory
|
|
10
|
+
import org.gradle.api.tasks.Internal
|
|
11
|
+
import org.gradle.api.tasks.OutputFile
|
|
12
|
+
import org.gradle.api.tasks.PathSensitive
|
|
13
|
+
import org.gradle.api.tasks.PathSensitivity
|
|
14
|
+
import org.gradle.api.tasks.TaskAction
|
|
15
|
+
|
|
16
|
+
abstract class StimExportApk extends DefaultTask {
|
|
17
|
+
@InputDirectory @PathSensitive(PathSensitivity.ABSOLUTE)
|
|
18
|
+
abstract DirectoryProperty getApkDirectory()
|
|
19
|
+
@Internal abstract Property<Object> getArtifactLoader()
|
|
20
|
+
@Input abstract Property<String> getModulePath()
|
|
21
|
+
@Input abstract Property<String> getVariantName()
|
|
22
|
+
@Input abstract Property<String> getSdkDirectory()
|
|
23
|
+
@Input abstract ListProperty<String> getBuildDirectories()
|
|
24
|
+
@OutputFile abstract RegularFileProperty getModelFile()
|
|
25
|
+
|
|
26
|
+
@TaskAction
|
|
27
|
+
void exportModel() {
|
|
28
|
+
def artifacts = artifactLoader.get().load(apkDirectory.get())
|
|
29
|
+
if (artifacts == null) throw new GradleException("Stim could not load the selected variant's APK artifacts.")
|
|
30
|
+
def model = [
|
|
31
|
+
schema: 1,
|
|
32
|
+
module: modulePath.get(),
|
|
33
|
+
variant: variantName.get(),
|
|
34
|
+
applicationId: artifacts.applicationId,
|
|
35
|
+
sdkDirectory: sdkDirectory.get(),
|
|
36
|
+
buildDirectories: buildDirectories.get(),
|
|
37
|
+
elements: artifacts.elements.collect { artifact ->
|
|
38
|
+
[path: artifact.outputFile, filters: artifact.filters.collect { filter ->
|
|
39
|
+
[type: filter.filterType.name(), value: filter.identifier]
|
|
40
|
+
}]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
def output = modelFile.get().asFile
|
|
44
|
+
output.parentFile.mkdirs()
|
|
45
|
+
output.text = JsonOutput.toJson(model)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// https://docs.gradle.org/current/userguide/init_scripts.html: init scripts also apply to buildSrc and included builds.
|
|
50
|
+
if (gradle.parent != null) return
|
|
51
|
+
|
|
52
|
+
gradle.rootProject { root ->
|
|
53
|
+
def configureOnDemand = gradle.startParameter.configureOnDemand
|
|
54
|
+
def requested = root.providers.gradleProperty("stim.native.variant").get()
|
|
55
|
+
def output = root.providers.gradleProperty("stim.native.model").get()
|
|
56
|
+
def modules = []
|
|
57
|
+
def variants = []
|
|
58
|
+
def selected = []
|
|
59
|
+
root.tasks.register("stimExportAndroidApk") {
|
|
60
|
+
dependsOn(root.providers.provider {
|
|
61
|
+
// https://docs.gradle.org/current/userguide/configuration_on_demand.html: subprojects may remain unconfigured.
|
|
62
|
+
if (configureOnDemand) {
|
|
63
|
+
throw new GradleException("Stim native Android cannot enumerate application modules with configuration-on-demand enabled. Set org.gradle.configureondemand=false in gradle.properties. Configuration cache remains supported.")
|
|
64
|
+
}
|
|
65
|
+
if (modules.size() != 1) {
|
|
66
|
+
throw new GradleException("Stim requires one Android application module; found: " + (modules ? modules.join(", ") : "none") + ".")
|
|
67
|
+
}
|
|
68
|
+
if (selected.size() != 1) {
|
|
69
|
+
throw new GradleException("Stim could not select variant '" + requested + "'. Available variants: " + variants.join(", ") + ". Pass --variant with an exact variant name.")
|
|
70
|
+
}
|
|
71
|
+
selected
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
root.allprojects { project ->
|
|
75
|
+
project.pluginManager.withPlugin("com.android.application") {
|
|
76
|
+
modules.add(project.path)
|
|
77
|
+
def components = project.extensions.getByName("androidComponents")
|
|
78
|
+
// AGP's public APK provider carries producer dependencies; the loader handles its metadata.
|
|
79
|
+
// https://github.com/android/gradle-recipes/tree/agp-8.13/listenToArtifacts
|
|
80
|
+
def apkType = project.plugins.getPlugin("com.android.application").class.classLoader
|
|
81
|
+
.loadClass('com.android.build.api.artifact.SingleArtifact$APK').getField("INSTANCE").get(null)
|
|
82
|
+
components.onVariants(components.selector().all(), { variant ->
|
|
83
|
+
variants.add(variant.name)
|
|
84
|
+
if (variant.name != requested) return
|
|
85
|
+
def module = project.path
|
|
86
|
+
def sdk = components.sdkComponents.sdkDirectory.map { it.asFile.absolutePath }
|
|
87
|
+
selected.add(project.tasks.register("stimExport${variant.name.capitalize()}Apk", StimExportApk) {
|
|
88
|
+
apkDirectory.set(variant.artifacts.get(apkType))
|
|
89
|
+
artifactLoader.set(variant.artifacts.getBuiltArtifactsLoader())
|
|
90
|
+
modulePath.set(module)
|
|
91
|
+
variantName.set(requested)
|
|
92
|
+
sdkDirectory.set(sdk)
|
|
93
|
+
root.allprojects.each { owner ->
|
|
94
|
+
buildDirectories.add(owner.layout.buildDirectory.map { it.asFile.absolutePath })
|
|
95
|
+
}
|
|
96
|
+
modelFile.set(new File(output))
|
|
97
|
+
})
|
|
98
|
+
} as org.gradle.api.Action)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|