stim 1.19.0 → 1.20.1
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-BaMpUQ4-.mjs} +3 -3
- package/dist/{agent-device-usage-output-Bjxu_VmX.mjs → agent-device-usage-output-VPaOgGaF.mjs} +7 -7
- package/dist/android-CLbBJ2ve.mjs +1258 -0
- package/dist/{android-DE5g_5gv.mjs → android-CZh6ElG5.mjs} +2 -2
- package/dist/{android-BdQC6zs1.mjs → android-DE8-JfGW.mjs} +105 -47
- package/dist/{android-cas-C87geAg-.mjs → android-cas-BFpS84v2.mjs} +9 -5
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/android-eXfIjKJr.mjs +6 -0
- 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-Cg9YJy3x.mjs} +9 -8
- package/dist/artifact-Ctb2jpw6.mjs +807 -0
- package/dist/artifact-DXk_Fle_.mjs +772 -0
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +30 -0
- package/dist/{browser-web-CDhqQxhv.mjs → browser-web-xQWC2RWl.mjs} +19 -19
- package/dist/{budget-Dz-kyXLv.mjs → budget-RFbwFpG5.mjs} +3101 -3062
- package/dist/build-COBA1tBc.mjs +462 -0
- package/dist/{build-facts-B87vo-Im.d.mts → build-facts-DcLv2HSd.d.mts} +1 -32
- package/dist/build-plan-CRjAA6Qi.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-CtbqWxIC.mjs} +13 -19
- package/dist/{chrome-BTUOo8p2.mjs → chrome-Dp2lMLBe.mjs} +1 -1
- package/dist/{cli-C9Zvgbdc.mjs → cli-sGqlPu1n.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-CuUo8Nvg.mjs → client-zqjFd79D.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-CPDq_90S.mjs} +2 -2
- package/dist/{config-DC5jEtd1.mjs → config-D0LhTY3S.mjs} +8 -12
- package/dist/{created-devices-D0s26Hx5.mjs → created-devices-CXBMtoj5.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-BqYjMIaC.mjs} +2 -2
- package/dist/{device-BHw0WlHl.mjs → device-BgNj-qVj.mjs} +8 -8
- package/dist/device-D4DqjSZZ.mjs +727 -0
- package/dist/{device-capacity-BoN1jQkO.mjs → device-capacity-DrwHwR97.mjs} +13 -14
- package/dist/device-host-worker.mjs +38 -18
- package/dist/device-ios-DE8KJd3b.mjs +413 -0
- package/dist/{device-lease-Cu7PtQpZ.mjs → device-lease-C309csaB.mjs} +138 -24
- package/dist/{device-lease-run-D38SnZtt.mjs → device-lease-run-Baelt3nc.mjs} +4 -4
- package/dist/{device-pool-CP4rAsHx.mjs → device-pool-DtK9S6AD.mjs} +3 -3
- package/dist/{device-remote-B5GiUifk.mjs → device-remote-DjsNw8DD.mjs} +17 -68
- package/dist/doctor-DiP9HsIP.mjs +515 -0
- package/dist/{doctor-PRJH94v6.mjs → doctor-Dunu3Nv1.mjs} +333 -744
- package/dist/{doctor-watchman-wZhyTdp4.mjs → doctor-watchman-XJzT8tK-.mjs} +15 -13
- package/dist/{simslim-D9LkJxIO.mjs → eas-build-0gadvrca.mjs} +6 -152
- package/dist/{stim-installations-DbmUjsLv.mjs → eas-session-ledger-DJDeL4Uq.mjs} +57 -4
- package/dist/{error-diagnostics--v5HGOU0.mjs → error-diagnostics-BhQtoLrZ.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-D5cz5G0k.mjs} +22 -21
- package/dist/{device-ios-B2ruohE-.mjs → gradle-CZZo1TSA.mjs} +21 -650
- package/dist/{guide-dRaQJJk9.mjs → guide-DakjcoUt.mjs} +503 -251
- package/dist/{hosted-android-Bs7fytj7.mjs → hosted-android-C-D8Dj0_.mjs} +5 -5
- package/dist/{hosted-client-C5G4h_OJ.mjs → hosted-client--hNFgixu.mjs} +9 -3
- package/dist/{hosted-ios-Bik035eL.mjs → hosted-ios-Chx9XQyI.mjs} +3 -3
- package/dist/{hosted-logs-CI9Az9a4.mjs → hosted-logs-Bkz0Hxzh.mjs} +8 -8
- package/dist/{hosted-macos-DABm3ScO.mjs → hosted-macos-ckTjN-0V.mjs} +7 -6
- package/dist/{hosted-native-DbV2aUVw.mjs → hosted-native-3KXZ5-qn.mjs} +17 -14
- package/dist/{idle-shutdown-DYiMBn34.mjs → idle-shutdown-DhAUyf5s.mjs} +7 -7
- package/dist/{ios-DYUr9LGc.mjs → ios-BDBN-xpf.mjs} +8 -7
- package/dist/ios-CQ8bHQXB.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-BWHKGaJq.mjs} +3 -3
- package/dist/{ios-BWbHFZVz.mjs → ios-o896T9PE.mjs} +195 -35
- package/dist/ios-project-BeOXKPt2.mjs +197 -0
- package/dist/{ios-state-By0XuLTQ.mjs → ios-state-BsXMwo5y.mjs} +1 -1
- package/dist/js-swap-Z_mSuRrx.mjs +432 -0
- package/dist/{react-native-ios-CSpIxexZ.mjs → launch-BootbMk4.mjs} +59 -612
- package/dist/launch-V1zqiOYn.mjs +745 -0
- package/dist/{launch-verify-DCveSE6d.mjs → launch-verify-Dl78EVgR.mjs} +26 -7
- package/dist/{logs-Bao1HOMy.mjs → logs-Bh4eqCCc.mjs} +11 -11
- package/dist/{macos-ciyBdTY5.mjs → macos-D7irBW3A.mjs} +42 -50
- package/dist/macos-kivF8qKz.mjs +2 -0
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -10
- package/dist/{metro-DI2AjPF_.mjs → metro-_ZIE3Axg.mjs} +18 -5
- package/dist/{metro-gateway-BxpJLIwh.mjs → metro-gateway-BzlQZQmU.mjs} +2 -2
- package/dist/miss-reason-SuTptY-I.mjs +238 -0
- package/dist/{named-ports-B4iWH4E-.mjs → named-ports-O1TIl7tx.mjs} +3 -3
- package/dist/native-android-D94RlJ-X.mjs +226 -0
- package/dist/native-gradle-inputs-BQnIdAlL.mjs +356 -0
- package/dist/{native-runtime-BGxsbfny.mjs → native-runtime-D024BAvm.mjs} +9 -8
- package/dist/native-xcode-inputs-UElfGs59.mjs +306 -0
- package/dist/native-xcode-ios-CjS-nDVY.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-BrjepDiv.mjs} +2 -2
- package/dist/{placement-log-Dxe34rJm.mjs → placement-log-BItXET1x.mjs} +1 -1
- package/dist/plan-Jwu_vr-F.mjs +260 -0
- package/dist/plan-placement-B466UYMU.mjs +73 -0
- package/dist/{ports-ByPc0_97.mjs → ports-BFRL6JTj.mjs} +3 -3
- package/dist/{prebuild-BKJ3wJI1.mjs → prebuild-DB_zLOLc.mjs} +4 -4
- package/dist/{preview-BbSottmO.mjs → preview-BRLFRhTz.mjs} +50 -32
- package/dist/project-DX8fXyw_.mjs +1131 -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-CuXM3QS8.mjs +921 -0
- package/dist/react-native-build-JUF31S8U.mjs +239 -0
- package/dist/react-native-doctor-BQHqiXaQ.mjs +78 -0
- package/dist/react-native-ios-DtVO4qf2.mjs +595 -0
- package/dist/{recordings-Bv8McZN4.mjs → recordings-Bk-VivUV.mjs} +1 -1
- package/dist/{reload-rAPdqeRR.mjs → reload-D9V7D8gP.mjs} +17 -13
- package/dist/remote-CZiTijxG.mjs +192 -0
- package/dist/{remote-cache-N3hAEaAL.mjs → remote-cache-fxcl5C-L.mjs} +5 -5
- package/dist/result-BrfgXtdO.mjs +186 -0
- package/dist/{run-lAkle1-c.mjs → run-ClC8UVB5.mjs} +3 -3
- package/dist/{server-bare-CkIjnegq.mjs → server-bare-dWjAarki.mjs} +5 -5
- package/dist/server-command-DnJYLnr4.mjs +69 -0
- package/dist/{server-expo-n3tUi3Em.mjs → server-expo-CUuzP9Mp.mjs} +107 -82
- package/dist/server-expo-Dvkd7JcF.mjs +2 -0
- package/dist/{settings-CxgngUZk.mjs → settings-Bbztm4oV.mjs} +179 -129
- package/dist/{settings-2am7TSxp.mjs → settings-BuKMOANA.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-CeCRr6MK.mjs} +6 -6
- package/dist/{stage-BgaZJVZY.mjs → stage-BNKKdDNc.mjs} +6 -3
- package/dist/{start-DtxthMfI.mjs → start-CRkG-mZ7.mjs} +97 -68
- package/dist/start-mh6bS27z.mjs +2 -0
- package/dist/{state-Tp4uImDS.mjs → state-BUpAmt2r.mjs} +1 -1
- package/dist/{state-D2KtnALG.mjs → state-lqxdOH_g.mjs} +32 -12
- package/dist/{stats-8EJ5ivFT.mjs → stats-CaB1MxMi.mjs} +5 -5
- package/dist/{status-BEeL6IKz.mjs → status-BDGHwkCs.mjs} +3 -1
- package/dist/{status-BOyp0CUl.mjs → status-C7vzkInu.mjs} +81 -293
- package/dist/status-watch-ZaVqRdtW.mjs +296 -0
- package/dist/{stim-desktop-C65jk_q2.mjs → stim-desktop-8GQX2OV8.mjs} +1 -1
- package/dist/{stop-zDlknFoz.mjs → stop-BO80KJoT.mjs} +21 -20
- package/dist/{stop-DRipAg-e.mjs → stop-BU7JaFCg.mjs} +2 -2
- package/dist/{stop-D0UIpZuh.mjs → stop-Cftw_sXJ.mjs} +5 -5
- package/dist/supervisor-run.d.mts +7 -2
- package/dist/supervisor-run.mjs +32 -20
- package/dist/{support-DsNaFg6D.mjs → support-Ca6PZbpr.mjs} +17 -7
- package/dist/{support-CNqYkV0y.mjs → support-Co0wk8Cv.mjs} +61 -8
- package/dist/{swiftpm-macos-aJzPAj1t.mjs → swiftpm-macos-siFSkmCO.mjs} +5 -5
- package/dist/tailnet-D7-tE_ug.mjs +265 -0
- package/dist/toolchain-B12psPA2.mjs +2 -0
- package/dist/{toolchain-C3xSoyUl.mjs → toolchain-SqehyPLw.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-5FAXkXIg.mjs} +6 -6
- package/dist/{watchman-BL1IdOtq.mjs → watchman-CqmaGcIb.mjs} +6 -6
- package/dist/{web-DbbrPUn0.mjs → web-BTjzE8mc.mjs} +9 -13
- package/dist/web-CHN5gh34.mjs +2 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-CR9X86xJ.mjs → workspace-state-CvgTFe-h.mjs} +36 -36
- package/dist/{workspaces-Djb2gfi9.mjs → workspaces-C4kqIOlx.mjs} +1260 -1258
- package/dist/worktree-Cgnm6vZt.mjs +2 -0
- package/dist/{worktree-BL4M1rhB.mjs → worktree-DtRsh6go.mjs} +86 -50
- package/package.json +6 -5
- 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,18 +1,18 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
2
|
+
import { b as workspaceDerivedData } from "./workspace-state-CvgTFe-h.mjs";
|
|
2
3
|
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
3
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
4
|
-
import {
|
|
5
|
-
import { Ot as resolveOptimizations } from "./settings-CxgngUZk.mjs";
|
|
4
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-CPDq_90S.mjs";
|
|
5
|
+
import { o as androidHome } from "./android-DE8-JfGW.mjs";
|
|
6
6
|
import { a as spawnDeclared } from "./spawn-claims-Kqiifsk2.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { t as cleanLine } from "./server-expo-
|
|
7
|
+
import { p as resolveOptimizations } from "./errors-DzkMYh8Q.mjs";
|
|
8
|
+
import { t as cleanLine } from "./server-expo-CUuzP9Mp.mjs";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
|
-
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
10
|
+
import { existsSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
|
|
11
11
|
import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
12
12
|
import { stimBuildDigest } from "@stim-cli/core/state";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
|
-
import { homedir } from "node:os";
|
|
15
14
|
import { createHash } from "node:crypto";
|
|
15
|
+
import { homedir, tmpdir } from "node:os";
|
|
16
16
|
//#region src/engine/bundler.ts
|
|
17
17
|
const COCOAPODS_SPEC = /^ {4}cocoapods \(/m;
|
|
18
18
|
function bundlerPin(root) {
|
|
@@ -269,12 +269,12 @@ function resolveScheme(project, { exec = null, scheme: requested = null } = {})
|
|
|
269
269
|
return { error: {
|
|
270
270
|
code: "STIM_NO_SCHEME",
|
|
271
271
|
message: `No shared Xcode scheme named ${JSON.stringify(requested)} in ${project.path}. Available schemes: ${listing.schemes.join(", ") || "none"}.`,
|
|
272
|
-
remedy: "Pass an exact available name with --scheme, or share the intended app scheme in Xcode."
|
|
272
|
+
remedy: "Pass an exact available name with --scheme or set it in ios.scheme, or share the intended app scheme in Xcode."
|
|
273
273
|
} };
|
|
274
274
|
}
|
|
275
275
|
let scheme = pickScheme(listing.schemes, listing.name || project.name);
|
|
276
276
|
if (!scheme && project.dir) try {
|
|
277
|
-
const app = JSON.parse(readFileSync(join(project.dir, "..", "app.json"), "utf8"));
|
|
277
|
+
const app = JSON.parse(readFileSync(join(project.appRoot ?? join(project.dir, ".."), "app.json"), "utf8"));
|
|
278
278
|
scheme = pickScheme(listing.schemes, app?.name);
|
|
279
279
|
} catch {}
|
|
280
280
|
if (!scheme) {
|
|
@@ -282,7 +282,7 @@ function resolveScheme(project, { exec = null, scheme: requested = null } = {})
|
|
|
282
282
|
return { error: {
|
|
283
283
|
code: "STIM_NO_SCHEME",
|
|
284
284
|
message: `Could not select an app scheme in ${project.path} (schemes: ${found}).`,
|
|
285
|
-
remedy: listing.schemes.length > 0 ? "Pass --scheme <name
|
|
285
|
+
remedy: listing.schemes.length > 0 ? "Pass --scheme <name>, or set ios.scheme, to select the intended shared app scheme. Stim does not guess between unmatched schemes." : "Share the app scheme in Xcode (Product > Scheme > Manage Schemes, tick Shared) so xcodebuild can see it."
|
|
286
286
|
} };
|
|
287
287
|
}
|
|
288
288
|
return {
|
|
@@ -554,7 +554,7 @@ function compilationCacheActivityLine(activity) {
|
|
|
554
554
|
if (activity.status === "not-run") return "not run; artifact cache supplied the app";
|
|
555
555
|
return "unavailable; Xcode did not report reliable statistics";
|
|
556
556
|
}
|
|
557
|
-
async function buildXcode({ root, udid = null, logWriter, project, scheme = null, configuration = "Debug", sdk = "iphonesimulator", destination = null, arch = null, derivedDataPath = null, extraArgs = [], compilationCache, startedAt: clockStart, now = () => Date.now(), exec = null, heartbeatMs = HEARTBEAT_INTERVAL_MS, estimateMs = null, onHeartbeat = (line) => console.error(line) }) {
|
|
557
|
+
async function buildXcode({ root, udid = null, logWriter, project, scheme = null, configuration = "Debug", applicationTarget, sdk = "iphonesimulator", destination = null, arch = null, derivedDataPath = null, extraArgs = [], compilationCache, startedAt: clockStart, now = () => Date.now(), exec = null, heartbeatMs = HEARTBEAT_INTERVAL_MS, estimateMs = null, onHeartbeat = (line) => console.error(line) }) {
|
|
558
558
|
if (!root || typeof root !== "string") throw new TypeError("buildXcode requires {root}");
|
|
559
559
|
if (!logWriter || typeof logWriter.write !== "function") throw new TypeError("buildXcode requires {logWriter} with a write() method");
|
|
560
560
|
if (!udid && !destination) throw new TypeError("buildXcode requires {udid} (or an explicit {destination})");
|
|
@@ -783,6 +783,7 @@ async function buildXcode({ root, udid = null, logWriter, project, scheme = null
|
|
|
783
783
|
for (const item of Array.isArray(targets) ? targets : []) {
|
|
784
784
|
const settings = item?.buildSettings;
|
|
785
785
|
if (settings?.PRODUCT_TYPE !== "com.apple.product-type.application" || settings.PLATFORM_NAME !== sdk) continue;
|
|
786
|
+
if (applicationTarget && (settings.TARGET_NAME !== applicationTarget.name || typeof settings.PROJECT_FILE_PATH !== "string" || realpathSync(settings.PROJECT_FILE_PATH) !== realpathSync(applicationTarget.projectPath))) continue;
|
|
786
787
|
const dir = settings.TARGET_BUILD_DIR;
|
|
787
788
|
const name = settings.FULL_PRODUCT_NAME;
|
|
788
789
|
if (typeof dir !== "string" || !isAbsolute(dir) || typeof name !== "string" || basename(name) !== name || !name.endsWith(".app")) continue;
|
|
@@ -919,7 +920,7 @@ function extractRubyHead(lines) {
|
|
|
919
920
|
}
|
|
920
921
|
return null;
|
|
921
922
|
}
|
|
922
|
-
function podsAreStale(lockText, manifestText) {
|
|
923
|
+
function podsAreStale(lockText, manifestText, dir = "ios/") {
|
|
923
924
|
const lock = normalize(lockText);
|
|
924
925
|
const manifest = normalize(manifestText);
|
|
925
926
|
if (lock === null && manifest === null) return {
|
|
@@ -928,15 +929,15 @@ function podsAreStale(lockText, manifestText) {
|
|
|
928
929
|
};
|
|
929
930
|
if (lock === null) return {
|
|
930
931
|
stale: true,
|
|
931
|
-
reason:
|
|
932
|
+
reason: `${dir}Podfile.lock is missing but ${dir}Pods exists`
|
|
932
933
|
};
|
|
933
934
|
if (manifest === null) return {
|
|
934
935
|
stale: true,
|
|
935
|
-
reason:
|
|
936
|
+
reason: `${dir}Pods/Manifest.lock is missing (pods have never been installed here)`
|
|
936
937
|
};
|
|
937
938
|
if (lock !== manifest) return {
|
|
938
939
|
stale: true,
|
|
939
|
-
reason:
|
|
940
|
+
reason: `${dir}Podfile.lock and ${dir}Pods/Manifest.lock differ`
|
|
940
941
|
};
|
|
941
942
|
return { stale: false };
|
|
942
943
|
}
|
|
@@ -944,14 +945,13 @@ function normalize(text) {
|
|
|
944
945
|
if (typeof text !== "string") return null;
|
|
945
946
|
return text.replace(/\r\n/g, "\n").trimEnd();
|
|
946
947
|
}
|
|
947
|
-
function
|
|
948
|
-
|
|
949
|
-
}
|
|
950
|
-
function readPodState(root) {
|
|
948
|
+
function readPodState(root, directory = join(root, "ios")) {
|
|
949
|
+
const rel = relative(root, directory);
|
|
951
950
|
return {
|
|
952
|
-
hasPodfile: existsSync(
|
|
953
|
-
lockText: readOrNull(join(
|
|
954
|
-
manifestText: readOrNull(join(
|
|
951
|
+
hasPodfile: existsSync(join(directory, "Podfile")),
|
|
952
|
+
lockText: readOrNull(join(directory, "Podfile.lock")),
|
|
953
|
+
manifestText: readOrNull(join(directory, "Pods", "Manifest.lock")),
|
|
954
|
+
dir: rel ? `${rel}/` : ""
|
|
955
955
|
};
|
|
956
956
|
}
|
|
957
957
|
function readOrNull(file) {
|
|
@@ -964,7 +964,96 @@ function readOrNull(file) {
|
|
|
964
964
|
function podEnv(root, options = {}) {
|
|
965
965
|
return podEnvForRuby(readRubyVersion(root), options);
|
|
966
966
|
}
|
|
967
|
-
|
|
967
|
+
const LOGIN_ENV_BEGIN = "@@ruby-env-begin@@";
|
|
968
|
+
const LOGIN_ENV_END = "@@ruby-env-end@@";
|
|
969
|
+
const LOGIN_ENV_SCRIPT = `printf '\\n${LOGIN_ENV_BEGIN}\\nPATH=%s\\nGEM_HOME=%s\\nGEM_PATH=%s\\n${LOGIN_ENV_END}\\n' "\$PATH" "\$GEM_HOME" "\$GEM_PATH" > "\$1"`;
|
|
970
|
+
function parseLoginRubyEnv(output) {
|
|
971
|
+
const lines = output.split("\n").map((line) => line.replace(/\r$/, ""));
|
|
972
|
+
const begin = lines.lastIndexOf(LOGIN_ENV_BEGIN);
|
|
973
|
+
const end = lines.indexOf(LOGIN_ENV_END, begin + 1);
|
|
974
|
+
if (begin < 0 || end < 0) return null;
|
|
975
|
+
const out = {};
|
|
976
|
+
for (const line of lines.slice(begin + 1, end)) {
|
|
977
|
+
const eq = line.indexOf("=");
|
|
978
|
+
if (eq < 0) continue;
|
|
979
|
+
const key = line.slice(0, eq);
|
|
980
|
+
const value = line.slice(eq + 1);
|
|
981
|
+
if (value && (key === "PATH" || key === "GEM_HOME" || key === "GEM_PATH")) out[key] = value;
|
|
982
|
+
}
|
|
983
|
+
return out;
|
|
984
|
+
}
|
|
985
|
+
const loginRubyEnvByShell = /* @__PURE__ */ new Map();
|
|
986
|
+
const LOGIN_ENV_OPTIONS = {
|
|
987
|
+
timeoutMs: 1e4,
|
|
988
|
+
killSignal: "SIGKILL",
|
|
989
|
+
detachedSilent: true
|
|
990
|
+
};
|
|
991
|
+
function readLoginRubyEnv(shell = process.env.SHELL, platform = process.platform) {
|
|
992
|
+
if (platform !== "darwin" || !shell || !isAbsolute(shell)) return null;
|
|
993
|
+
if (loginRubyEnvByShell.has(shell)) return loginRubyEnvByShell.get(shell) ?? null;
|
|
994
|
+
let dir = null;
|
|
995
|
+
let parsed = null;
|
|
996
|
+
try {
|
|
997
|
+
dir = mkdtempSync(join(tmpdir(), "stim-ruby-env-"));
|
|
998
|
+
const file = join(dir, "env");
|
|
999
|
+
getExecutor().runFile(shell, [
|
|
1000
|
+
"-lic",
|
|
1001
|
+
LOGIN_ENV_SCRIPT,
|
|
1002
|
+
"stim",
|
|
1003
|
+
file
|
|
1004
|
+
], LOGIN_ENV_OPTIONS);
|
|
1005
|
+
parsed = parseLoginRubyEnv(readFileSync(file, "utf-8"));
|
|
1006
|
+
} catch {
|
|
1007
|
+
parsed = null;
|
|
1008
|
+
} finally {
|
|
1009
|
+
if (dir) rmSync(dir, {
|
|
1010
|
+
recursive: true,
|
|
1011
|
+
force: true
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
loginRubyEnvByShell.set(shell, parsed);
|
|
1015
|
+
return parsed;
|
|
1016
|
+
}
|
|
1017
|
+
async function readLoginRubyEnvAsync(shell = process.env.SHELL, platform = process.platform) {
|
|
1018
|
+
if (platform !== "darwin" || !shell || !isAbsolute(shell)) return null;
|
|
1019
|
+
if (loginRubyEnvByShell.has(shell)) return loginRubyEnvByShell.get(shell) ?? null;
|
|
1020
|
+
let dir = null;
|
|
1021
|
+
let parsed = null;
|
|
1022
|
+
try {
|
|
1023
|
+
dir = mkdtempSync(join(tmpdir(), "stim-ruby-env-"));
|
|
1024
|
+
const file = join(dir, "env");
|
|
1025
|
+
await getExecutor().runFileAsync(shell, [
|
|
1026
|
+
"-lic",
|
|
1027
|
+
LOGIN_ENV_SCRIPT,
|
|
1028
|
+
"stim",
|
|
1029
|
+
file
|
|
1030
|
+
], LOGIN_ENV_OPTIONS);
|
|
1031
|
+
parsed = parseLoginRubyEnv(readFileSync(file, "utf-8"));
|
|
1032
|
+
} catch {
|
|
1033
|
+
parsed = null;
|
|
1034
|
+
} finally {
|
|
1035
|
+
if (dir) rmSync(dir, {
|
|
1036
|
+
recursive: true,
|
|
1037
|
+
force: true
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
loginRubyEnvByShell.set(shell, parsed);
|
|
1041
|
+
return parsed;
|
|
1042
|
+
}
|
|
1043
|
+
function rubyPathEntries(login, callerPath, exists) {
|
|
1044
|
+
const have = new Set((callerPath ?? "").split(delimiter));
|
|
1045
|
+
const gemDirs = [login.GEM_HOME, ...(login.GEM_PATH ?? "").split(delimiter)].filter((dir) => !!dir);
|
|
1046
|
+
return (login.PATH ?? "").split(delimiter).filter((entry) => {
|
|
1047
|
+
if (!entry || have.has(entry)) return false;
|
|
1048
|
+
if (gemDirs.some((gem) => entry === gem || entry.startsWith(gem + sep))) return true;
|
|
1049
|
+
return exists(join(entry, "ruby")) || exists(join(entry, "pod"));
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
function prependPath(entries, existing) {
|
|
1053
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1054
|
+
return [...entries, ...(existing ?? "").split(delimiter)].filter((entry) => entry && !seen.has(entry) && seen.add(entry)).join(delimiter);
|
|
1055
|
+
}
|
|
1056
|
+
function podEnvForRuby(version, { env = process.env, home = homedir(), exists = existsSync, loginEnv = readLoginRubyEnv } = {}) {
|
|
968
1057
|
const out = {
|
|
969
1058
|
...env,
|
|
970
1059
|
FORCE_COLOR: "0",
|
|
@@ -972,8 +1061,7 @@ function podEnvForRuby(version, { env = process.env, home = homedir(), exists =
|
|
|
972
1061
|
LANG: env.LANG ?? "en_US.UTF-8",
|
|
973
1062
|
LC_ALL: env.LC_ALL ?? env.LANG ?? "en_US.UTF-8"
|
|
974
1063
|
};
|
|
975
|
-
|
|
976
|
-
const candidates = [
|
|
1064
|
+
const candidates = version ? [
|
|
977
1065
|
{ bin: join(home, ".rbenv", "versions", version, "bin") },
|
|
978
1066
|
{
|
|
979
1067
|
bin: join(home, ".rvm", "rubies", `ruby-${version}`, "bin"),
|
|
@@ -981,7 +1069,7 @@ function podEnvForRuby(version, { env = process.env, home = homedir(), exists =
|
|
|
981
1069
|
},
|
|
982
1070
|
{ bin: join(home, ".asdf", "installs", "ruby", version, "bin") },
|
|
983
1071
|
{ bin: join(home, ".local", "share", "mise", "installs", "ruby", version, "bin") }
|
|
984
|
-
];
|
|
1072
|
+
] : [];
|
|
985
1073
|
for (const c of candidates) {
|
|
986
1074
|
if (!exists(c.bin)) continue;
|
|
987
1075
|
out.PATH = `${c.bin}${delimiter}${out.PATH ?? ""}`;
|
|
@@ -989,10 +1077,27 @@ function podEnvForRuby(version, { env = process.env, home = homedir(), exists =
|
|
|
989
1077
|
out.GEM_HOME = c.gems;
|
|
990
1078
|
out.GEM_PATH = c.gems;
|
|
991
1079
|
}
|
|
992
|
-
|
|
1080
|
+
return out;
|
|
993
1081
|
}
|
|
1082
|
+
if (env.GEM_HOME) return out;
|
|
1083
|
+
const login = loginEnv();
|
|
1084
|
+
if (!login) return out;
|
|
1085
|
+
const rubyPath = rubyPathEntries(login, out.PATH, exists);
|
|
1086
|
+
if (rubyPath.length) out.PATH = prependPath(rubyPath, out.PATH);
|
|
1087
|
+
if (login.GEM_HOME) out.GEM_HOME = login.GEM_HOME;
|
|
1088
|
+
if (login.GEM_PATH) out.GEM_PATH = login.GEM_PATH;
|
|
994
1089
|
return out;
|
|
995
1090
|
}
|
|
1091
|
+
async function podEnvForRubyAsync(version) {
|
|
1092
|
+
let loginNeeded = false;
|
|
1093
|
+
const withoutLogin = podEnvForRuby(version, { loginEnv: () => {
|
|
1094
|
+
loginNeeded = true;
|
|
1095
|
+
return null;
|
|
1096
|
+
} });
|
|
1097
|
+
if (!loginNeeded) return withoutLogin;
|
|
1098
|
+
const login = await readLoginRubyEnvAsync();
|
|
1099
|
+
return podEnvForRuby(version, { loginEnv: () => login });
|
|
1100
|
+
}
|
|
996
1101
|
function readRubyVersion(root, { read = readFileSync } = {}) {
|
|
997
1102
|
try {
|
|
998
1103
|
const first = String(read(join(root, ".ruby-version"), "utf-8")).split("\n").map((l) => l.trim()).find((l) => l && !l.startsWith("#"));
|
|
@@ -1163,12 +1268,12 @@ function gemInstallRemedy(root, pin) {
|
|
|
1163
1268
|
const version = readRubyVersion(root);
|
|
1164
1269
|
return `${version ? `This repo pins ruby ${version} (.ruby-version), so put that ruby on PATH (rbenv/rvm/asdf/mise) first. ` : ""}Bundler could not install the gems ${pin.lockfile} pins, so \`bundle exec pod install\` cannot run. Run \`cd ${root} && bundle install\` and fix what it reports, then run again.`;
|
|
1165
1270
|
}
|
|
1166
|
-
async function runPodInstall(root, logWriter, { spawnFn = null, now = Date.now, heartbeatMs = HEARTBEAT_INTERVAL_MS, estimateMs = null, onHeartbeat = (line) => console.error(line) } = {}) {
|
|
1167
|
-
const iosDir =
|
|
1271
|
+
async function runPodInstall(root, logWriter, { spawnFn = null, now = Date.now, heartbeatMs = HEARTBEAT_INTERVAL_MS, estimateMs = null, onHeartbeat = (line) => console.error(line), directory = join(root, "ios") } = {}) {
|
|
1272
|
+
const iosDir = directory;
|
|
1168
1273
|
if (!existsSync(iosDir)) return {
|
|
1169
1274
|
failed: true,
|
|
1170
1275
|
code: DEPS_ERROR,
|
|
1171
|
-
reason: `No
|
|
1276
|
+
reason: `No ${relative(root, iosDir) || "."}/ directory in ${root}, so there is nothing to pod install.`,
|
|
1172
1277
|
remedy: "Run `stim ios` on a project with native iOS sources, or let prebuild generate them.",
|
|
1173
1278
|
lastLines: []
|
|
1174
1279
|
};
|
|
@@ -1284,28 +1389,66 @@ const distDir = dirname(fileURLToPath(import.meta.url));
|
|
|
1284
1389
|
function quiet(file, args) {
|
|
1285
1390
|
return getExecutor().runFileQuiet(file, args, { timeoutMs: 2e4 });
|
|
1286
1391
|
}
|
|
1287
|
-
function iosToolchain(root) {
|
|
1288
|
-
return iosToolchainForRuby(readRubyVersion(root));
|
|
1392
|
+
function iosToolchain(root, native) {
|
|
1393
|
+
return iosToolchainForRuby(native ? null : readRubyVersion(root), native);
|
|
1289
1394
|
}
|
|
1290
|
-
function
|
|
1291
|
-
|
|
1395
|
+
async function quietAsync(file, args) {
|
|
1396
|
+
try {
|
|
1397
|
+
return await getExecutor().runFileAsync(file, args, { timeoutMs: 2e4 });
|
|
1398
|
+
} catch {
|
|
1399
|
+
return null;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
async function iosToolchainAsync(root) {
|
|
1403
|
+
const rubyVersion = readRubyVersion(root);
|
|
1404
|
+
const [xcode, simulatorSdk, cocoapods] = await Promise.all([
|
|
1405
|
+
quietAsync("xcodebuild", ["-version"]),
|
|
1406
|
+
quietAsync("xcrun", [
|
|
1407
|
+
"--sdk",
|
|
1408
|
+
"iphonesimulator",
|
|
1409
|
+
"--show-sdk-version"
|
|
1410
|
+
]),
|
|
1411
|
+
cocoapodsVersionAsync(rubyVersion)
|
|
1412
|
+
]);
|
|
1413
|
+
return assembleIosToolchain(xcode, simulatorSdk, cocoapods);
|
|
1414
|
+
}
|
|
1415
|
+
function iosToolchainForRuby(rubyVersion, native) {
|
|
1416
|
+
return assembleIosToolchain(quiet("xcodebuild", ["-version"]), quiet("xcrun", [
|
|
1417
|
+
"--sdk",
|
|
1418
|
+
"iphonesimulator",
|
|
1419
|
+
"--show-sdk-version"
|
|
1420
|
+
]), native ? null : cocoapodsVersion(rubyVersion));
|
|
1421
|
+
}
|
|
1422
|
+
function assembleIosToolchain(xcode, simulatorSdk, cocoapods) {
|
|
1292
1423
|
return {
|
|
1293
1424
|
stimBuild: stimBuildDigest(distDir),
|
|
1294
1425
|
arch: process.arch,
|
|
1295
1426
|
xcode: xcode ? xcode.trim().replace(/\n/g, " / ") : null,
|
|
1296
|
-
simulatorSdk:
|
|
1297
|
-
|
|
1298
|
-
"iphonesimulator",
|
|
1299
|
-
"--show-sdk-version"
|
|
1300
|
-
])?.trim() ?? null,
|
|
1301
|
-
cocoapods: cocoapodsVersion(rubyVersion)
|
|
1427
|
+
simulatorSdk: simulatorSdk?.trim() ?? null,
|
|
1428
|
+
cocoapods
|
|
1302
1429
|
};
|
|
1303
1430
|
}
|
|
1431
|
+
function podProbeEnv(env) {
|
|
1432
|
+
return Object.fromEntries(Object.entries(env).filter((entry) => entry[1] !== void 0));
|
|
1433
|
+
}
|
|
1434
|
+
function podVersionLine(output) {
|
|
1435
|
+
return output?.trim().split("\n").pop()?.trim() ?? null;
|
|
1436
|
+
}
|
|
1304
1437
|
function cocoapodsVersion(rubyVersion) {
|
|
1305
|
-
return getExecutor().runFileQuiet("pod", ["--version"], {
|
|
1438
|
+
return podVersionLine(getExecutor().runFileQuiet("pod", ["--version"], {
|
|
1306
1439
|
timeoutMs: 2e4,
|
|
1307
|
-
env:
|
|
1308
|
-
})
|
|
1440
|
+
env: podProbeEnv(podEnvForRuby(rubyVersion))
|
|
1441
|
+
}));
|
|
1442
|
+
}
|
|
1443
|
+
async function cocoapodsVersionAsync(rubyVersion) {
|
|
1444
|
+
try {
|
|
1445
|
+
return podVersionLine(await getExecutor().runFileAsync("pod", ["--version"], {
|
|
1446
|
+
timeoutMs: 2e4,
|
|
1447
|
+
env: podProbeEnv(await podEnvForRubyAsync(rubyVersion))
|
|
1448
|
+
}));
|
|
1449
|
+
} catch {
|
|
1450
|
+
return null;
|
|
1451
|
+
}
|
|
1309
1452
|
}
|
|
1310
1453
|
function macosToolchain() {
|
|
1311
1454
|
const xcode = quiet("xcodebuild", ["-version"]);
|
|
@@ -1396,7 +1539,17 @@ function sdkPackages() {
|
|
|
1396
1539
|
platforms
|
|
1397
1540
|
};
|
|
1398
1541
|
}
|
|
1399
|
-
function workerToolchain(rubyVersion = null) {
|
|
1542
|
+
function workerToolchain(rubyVersion = null, native) {
|
|
1543
|
+
if (native === "gradle") return {
|
|
1544
|
+
...androidToolchain(),
|
|
1545
|
+
xcode: null,
|
|
1546
|
+
simulatorSdk: null,
|
|
1547
|
+
cocoapods: null,
|
|
1548
|
+
macosSdk: null,
|
|
1549
|
+
bundler: null,
|
|
1550
|
+
runtimes: [],
|
|
1551
|
+
androidSdk: sdkPackages()
|
|
1552
|
+
};
|
|
1400
1553
|
let listed = null;
|
|
1401
1554
|
try {
|
|
1402
1555
|
listed = JSON.parse(quiet("xcrun", [
|
|
@@ -1408,16 +1561,16 @@ function workerToolchain(rubyVersion = null) {
|
|
|
1408
1561
|
]) ?? "null");
|
|
1409
1562
|
} catch {}
|
|
1410
1563
|
return {
|
|
1411
|
-
...iosToolchainForRuby(rubyVersion),
|
|
1412
|
-
macosSdk: quiet("xcrun", [
|
|
1564
|
+
...iosToolchainForRuby(rubyVersion, native),
|
|
1565
|
+
macosSdk: native ? null : quiet("xcrun", [
|
|
1413
1566
|
"--sdk",
|
|
1414
1567
|
"macosx",
|
|
1415
1568
|
"--show-sdk-version"
|
|
1416
1569
|
])?.trim() ?? null,
|
|
1417
|
-
bundler: quiet("bundle", ["--version"])?.trim() || null,
|
|
1570
|
+
bundler: native ? null : quiet("bundle", ["--version"])?.trim() || null,
|
|
1418
1571
|
runtimes: iphoneRuntimes(listed),
|
|
1419
|
-
jdk: localJdk(),
|
|
1420
|
-
androidSdk: sdkPackages()
|
|
1572
|
+
jdk: native ? null : localJdk(),
|
|
1573
|
+
androidSdk: native ? null : sdkPackages()
|
|
1421
1574
|
};
|
|
1422
1575
|
}
|
|
1423
1576
|
/** The API level of an SDK `platforms/` directory: `android-37.0` and `android-37` are both 37. */
|
|
@@ -1485,12 +1638,12 @@ function toolchainMismatches(target, worker) {
|
|
|
1485
1638
|
code: "simulator-sdk",
|
|
1486
1639
|
reason: versionMismatch("simulator SDK", worker.simulatorSdk, ios.simulatorSdk)
|
|
1487
1640
|
});
|
|
1488
|
-
if (target.cocoapodsPinned) {
|
|
1641
|
+
if (!target.native && target.cocoapodsPinned) {
|
|
1489
1642
|
if (!worker.bundler) out.push({
|
|
1490
1643
|
code: "bundler",
|
|
1491
1644
|
reason: "no Bundler there to run the CocoaPods this project's Gemfile.lock pins"
|
|
1492
1645
|
});
|
|
1493
|
-
} else if (worker.cocoapods !== ios.cocoapods) out.push({
|
|
1646
|
+
} else if (!target.native && worker.cocoapods !== ios.cocoapods) out.push({
|
|
1494
1647
|
code: "cocoapods",
|
|
1495
1648
|
reason: versionMismatch("CocoaPods", worker.cocoapods, ios.cocoapods)
|
|
1496
1649
|
});
|
|
@@ -1501,4 +1654,4 @@ function toolchainMismatches(target, worker) {
|
|
|
1501
1654
|
return out;
|
|
1502
1655
|
}
|
|
1503
1656
|
//#endregion
|
|
1504
|
-
export {
|
|
1657
|
+
export { readBundleId as A, compilationCacheSettings as C, parseXcodeMajor as D, parseSwiftVersion as E, describeDiagnostic as F, bundlerPin as I, podInstallCommand as L, startBuildHeartbeat as M, swiftPrefixMappingSupported as N, pickXcodeProject as O, tailLines as P, compilationCacheActivityLine as S, detectXcodeMajor as T, COMPILATION_CACHE_NOT_RUN as _, iphoneRuntimes as a, SWIFT_PREFIX_MAPPING_MIN_SWIFT as b, parseAndroidRequirements as c, DEPS_ERROR as d, podsAreStale as f, runPodInstall as g, runCaptured as h, iosToolchainAsync as i, resolveScheme as j, readBundleExecutable as k, toolchainMismatches as l, readRubyVersion as m, androidToolchain as n, jdkMajor as o, readPodState as p, iosToolchain as r, macosToolchain as s, androidRequirements as t, workerToolchain as u, COMPILATION_CACHE_UNAVAILABLE as v, detectSwiftVersion as w, buildXcode as x, HEARTBEAT_INTERVAL_MS as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
2
2
|
import { t as spawnEntry } from "./spawn-entry-Dcb7sDUz.mjs";
|
|
3
|
-
import { n as windowsLauncherArgs } from "./detached-entry-
|
|
3
|
+
import { n as windowsLauncherArgs } from "./detached-entry-BXq4fIl-.mjs";
|
|
4
4
|
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
5
5
|
import { n as stampAttempt, r as due, t as capChildLog } from "./attempt-DW-mQqM7.mjs";
|
|
6
6
|
import { closeSync, openSync } from "node:fs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as ownership_claim_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
-
import { n as debugLog, t as getExecutor } from "./exec-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { I as ownedAvdDirectory } from "./android-
|
|
6
|
-
import { o as pullRequestLookups } from "./pull-request-
|
|
2
|
+
import { n as debugLog, t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
3
|
+
import { bt as linkedWorktreesOnDisk, ht as gitCommonDirOnDisk } from "./settings-Bbztm4oV.mjs";
|
|
4
|
+
import { D as withDirLock, a as updateWorkspaceState, d as discoverAgentSessions, l as agentKey, p as ensureWorkspaceStorage, u as attributeAgentSessions, x as workspaceDir } from "./workspace-state-CvgTFe-h.mjs";
|
|
5
|
+
import { I as ownedAvdDirectory } from "./android-DE8-JfGW.mjs";
|
|
6
|
+
import { o as pullRequestLookups } from "./pull-request-vOhLNmIb.mjs";
|
|
7
7
|
import { existsSync, mkdirSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { basename, dirname, join, sep } from "node:path";
|
|
9
9
|
import { ENDED_AGENT_RETENTION_MS, READY_PHASE_MS, WARM_KEY, agentSessionsCacheFile, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, pullRequestCacheFile, readAgentSessionsCache, readDiskUsage, readDiskUsageFailure, readEndedAgentSessions, readPullRequestCache, readWarmRecord, readWorkspaceAgent, readWorkspaceState, workspaceEndedAgentsFile, workspaceEndedAgentsLock } from "@stim-cli/core/state";
|
|
10
|
-
import { homedir } from "node:os";
|
|
11
10
|
import { clearClaimChild, markClaimChildPending, releaseClaim, setClaimChild, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
|
|
12
11
|
import { captureProcessIdentity } from "@stim-cli/core/process-identity";
|
|
13
12
|
import { randomUUID } from "node:crypto";
|
|
13
|
+
import { homedir } from "node:os";
|
|
14
14
|
//#region src/workspace/merge-state.ts
|
|
15
15
|
const FETCH_TIMEOUT_MS = 3e4;
|
|
16
16
|
const FETCH_FRESH_MS = 6e5;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as isInsideProject } from "./metro-
|
|
6
|
-
import { r as cdpEndpoint } from "./state-
|
|
1
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
2
|
+
import { H as projectDeviceSlots, R as deviceSlotKey } from "./config-D0LhTY3S.mjs";
|
|
3
|
+
import { y as workspaceAgentDeviceDir } from "./workspace-state-CvgTFe-h.mjs";
|
|
4
|
+
import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-CPDq_90S.mjs";
|
|
5
|
+
import { n as isInsideProject } from "./metro-_ZIE3Axg.mjs";
|
|
6
|
+
import { r as cdpEndpoint } from "./state-lqxdOH_g.mjs";
|
|
7
7
|
import { basename, sep } from "path";
|
|
8
8
|
import { ACTIVITY_RECENCY_BASES } from "@stim-cli/core/state";
|
|
9
9
|
//#region src/status.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as recordWorkspaceUse,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-
|
|
1
|
+
import { E as upsertProject, p as getProject } from "./config-D0LhTY3S.mjs";
|
|
2
|
+
import { K as resolveProjectSettings, Q as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-Bbztm4oV.mjs";
|
|
3
|
+
import { i as recordWorkspaceUse, w as workspaceLogsDir } from "./workspace-state-CvgTFe-h.mjs";
|
|
4
|
+
import { f as refuseNoProject, l as phaseLine } from "./command-output-CPDq_90S.mjs";
|
|
5
|
+
import { d as projectRegistry, n as findCommandWorkspace } from "./project-DX8fXyw_.mjs";
|
|
6
|
+
import { a as workspaceLinks, i as workspaceLinkLine } from "./stim-desktop-8GQX2OV8.mjs";
|
|
7
|
+
import { o as readWebRecord, r as cdpEndpoint } from "./state-lqxdOH_g.mjs";
|
|
8
|
+
import { n as ensureWorkspaceStorageSafely } from "./native-runtime-D024BAvm.mjs";
|
|
9
9
|
import { t as liveWebRecord } from "./page-Bv9s2KwY.mjs";
|
|
10
10
|
import chalk from "chalk";
|
|
11
11
|
//#region src/commands/web.ts
|
|
@@ -14,11 +14,7 @@ async function runWeb({ root, headed, note }) {
|
|
|
14
14
|
const startedAt = Date.now();
|
|
15
15
|
await ensureWorkspaceStorageSafely(root, { note });
|
|
16
16
|
if (!getProject(root)) upsertProject(root, {});
|
|
17
|
-
const settings =
|
|
18
|
-
projectPath: root,
|
|
19
|
-
gitCommonDir: gitCommonDir(root),
|
|
20
|
-
repoRoot: repoRoot(root)
|
|
21
|
-
});
|
|
17
|
+
const { settings } = resolveProjectSettings(root);
|
|
22
18
|
const [shapeError] = settingShapeErrors(settings);
|
|
23
19
|
if (shapeError) return {
|
|
24
20
|
ok: false,
|
package/dist/web-run.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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 {
|
|
2
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
3
|
+
import { r as recordCreatedDevice } from "./created-devices-CXBMtoj5.mjs";
|
|
4
|
+
import { d as signalProcessTree } from "./metro-_ZIE3Axg.mjs";
|
|
5
|
+
import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
|
|
6
|
+
import { t as relaunchWithLogFile } from "./detached-entry-BXq4fIl-.mjs";
|
|
7
|
+
import { _ as removeSingletonFiles, c as webClaimRoot, d as webLogFile, f as webProfileDir, g as liveProfileHolder, h as chromeProcessState, i as clearWebRecord, l as webDir, m as writeWebRecord, n as browserLogFile, s as updateWebRecord } from "./state-lqxdOH_g.mjs";
|
|
8
|
+
import { c as probeWebDrivers } from "./activity-BaMpUQ4-.mjs";
|
|
9
9
|
import { t as connectOwnedBrowser } from "./cdp-Dq_ypAlJ.mjs";
|
|
10
|
-
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-
|
|
10
|
+
import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-Dp2lMLBe.mjs";
|
|
11
11
|
import { existsSync, mkdirSync, openSync, realpathSync } from "node:fs";
|
|
12
12
|
import { isAbsolute, resolve } from "node:path";
|
|
13
13
|
import { WEB_VIEWPORTS } from "@stim-cli/core/state";
|
|
@@ -451,7 +451,7 @@ async function runWebSupervisor(options, { onExit = (code) => process.exit(code)
|
|
|
451
451
|
let cdp = null;
|
|
452
452
|
let finished = false;
|
|
453
453
|
let stopping = false;
|
|
454
|
-
const chromeGone = () => !chromeRecord || chromeProcessState(chromeRecord) === "gone";
|
|
454
|
+
const chromeGone = () => !chromeRecord || chromeProcessState(chromeRecord, profile) === "gone";
|
|
455
455
|
const finish = (code, level, event, msg) => {
|
|
456
456
|
if (finished) return;
|
|
457
457
|
finished = true;
|
|
@@ -484,7 +484,7 @@ async function runWebSupervisor(options, { onExit = (code) => process.exit(code)
|
|
|
484
484
|
} catch {}
|
|
485
485
|
const deadline = Date.now() + CHROME_EXIT_WAIT_MS;
|
|
486
486
|
while (!chromeGone() && Date.now() < deadline) await sleep(POLL_MS);
|
|
487
|
-
const state = chromeRecord ? chromeProcessState(chromeRecord) : "gone";
|
|
487
|
+
const state = chromeRecord ? chromeProcessState(chromeRecord, profile) : "gone";
|
|
488
488
|
if (chromeRecord && (state === "running" || state === "lingering")) {
|
|
489
489
|
try {
|
|
490
490
|
signalProcessTree(chromeRecord.pid, "SIGKILL", { group: true });
|