stim 1.17.2 → 1.18.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 +50 -1
- package/dist/{activity-IRvJY_ru.mjs → activity-BxnkDZDi.mjs} +4 -4
- package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-CZ66YA4T.mjs} +8 -8
- package/dist/android-BKA16DTf.mjs +4 -0
- package/dist/{android-B9yaNKwa.mjs → android-BvwuMUJ9.mjs} +192 -98
- package/dist/{android-DE4v59Mb.mjs → android-CBwCNicO.mjs} +2 -2
- package/dist/{android-B_YNZy61.mjs → android-DC3ZLuw0.mjs} +9 -9
- package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-BBFyr9CA.mjs} +5 -5
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/api-D0VtFhqk.mjs +152 -0
- package/dist/api-run.d.mts +1 -0
- package/dist/api-run.mjs +145 -0
- package/dist/api.d.mts +212 -0
- package/dist/api.mjs +2 -0
- package/dist/{app-install-VPkI5WEg.mjs → app-install-D-PUENug.mjs} +3 -3
- package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
- package/dist/{budget-DfcgFdQB.mjs → budget-DIhL2BKx.mjs} +1578 -58
- package/dist/build-facts-DcLv2HSd.d.mts +111 -0
- package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-BI7ozfmH.mjs} +3 -3
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{chrome-BrcVWQyD.mjs → chrome-DJnmnS5q.mjs} +1 -1
- package/dist/cli-DNJMwADx.mjs +68 -0
- package/dist/cli.mjs +1 -1
- package/dist/{client-SvBdgObD.mjs → client-DzhapoMB.mjs} +139 -32
- package/dist/collector-run.mjs +9 -9
- package/dist/{command-output-CDAIFD-8.mjs → command-output-CBtzyIgF.mjs} +2 -2
- package/dist/{config-D0DbpZtM.mjs → config-CgYMahz7.mjs} +5 -5
- package/dist/{created-devices-CpvzBL25.mjs → created-devices-DKbeWsiK.mjs} +2 -2
- package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-xKoOypBm.mjs} +2 -2
- package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-BLfcgc4O.mjs} +1 -1
- package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CLnIH02x.mjs} +2 -2
- package/dist/{device-C8IOoJPv.mjs → device-D7oCHGWi.mjs} +8 -8
- package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-EUOOYr8T.mjs} +13 -13
- package/dist/device-host-worker.mjs +19 -19
- package/dist/{device-ios-C2Um-XUR.mjs → device-ios-6MewKKnc.mjs} +13 -13
- package/dist/{device-lease-DpoS36_u.mjs → device-lease-Co-EwifR.mjs} +9 -9
- package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-w1xhCqIW.mjs} +4 -4
- package/dist/{device-pool-3o7s5lo4.mjs → device-pool-F5WvRPtD.mjs} +3 -3
- package/dist/{device-remote-hFSkpfQu.mjs → device-remote-tHbd1fKy.mjs} +15 -15
- package/dist/{doctor-CFv1fCrF.mjs → doctor-B9ckYUoU.mjs} +33 -30
- package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics-BRXOqDzG.mjs} +11 -11
- package/dist/{exec-CaErVv7t.mjs → exec-DWhCZDGm.mjs} +65 -2
- package/dist/{gc-DEmkg3Xh.mjs → gc-Dh6mXOKC.mjs} +23 -469
- package/dist/{gradle-dJpre3Yn.mjs → gradle-C6GKnunQ.mjs} +6 -6
- package/dist/{guide-status-Du-ZQ3FD.mjs → guide-status-Bhf9SJXc.mjs} +3 -3
- package/dist/{guide-CSmhMTf8.mjs → guide-tm6igAaa.mjs} +290 -53
- package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bv285t_t.mjs} +3 -3
- package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C-rMtppF.mjs} +2 -2
- package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-D5mNmtj4.mjs} +1 -1
- package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-DN8Iz4mJ.mjs} +9 -9
- package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-B-wEjlwG.mjs} +5 -5
- package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DeeOG8xZ.mjs} +6 -6
- package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-jjtxAn5C.mjs} +7 -8
- package/dist/{ios-DSfnPfse.mjs → ios-B3SbOWdw.mjs} +19 -7
- package/dist/{ios-Cr1h5gnO.mjs → ios-Bvbf0SGY.mjs} +1 -1
- package/dist/{ios-BJ4XUSe1.mjs → ios-CPdkoKaa.mjs} +181 -95
- package/dist/ios-DNpdygiv.mjs +7 -0
- package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-Bn7jWDB1.mjs} +1 -1
- package/dist/{ios-device-pAN4t54-.mjs → ios-device-vOaByMhw.mjs} +3 -3
- package/dist/{ios-state-8L3lgum6.mjs → ios-state-B2pES6Vs.mjs} +1 -1
- package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-hskNcWkZ.mjs} +5 -5
- package/dist/{logs-BAaS7gS2.mjs → logs-1Ylc1Ri6.mjs} +13 -13
- package/dist/macos-Ck7OBMNY.mjs +2 -0
- package/dist/{macos-BIRQS90f.mjs → macos-DF6C7wUU.mjs} +118 -34
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +349 -47
- package/dist/{metro-g8NqiJp-.mjs → metro-Dh8T4Ytd.mjs} +5 -5
- package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-CEUw9RMH.mjs} +4 -4
- package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
- package/dist/{named-ports-C8m8EQs2.mjs → named-ports-BFIz1Shz.mjs} +61 -6
- package/dist/{native-run-D1Q56rAD.mjs → native-run-B06FkmZx.mjs} +4 -4
- package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-D_603JiC.mjs} +6 -6
- package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
- package/dist/offload-worker.d.mts +3 -17
- package/dist/offload-worker.mjs +10 -11
- package/dist/{ownership-DyRQru0q.mjs → ownership-D6Se7gg_.mjs} +3 -3
- package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
- package/dist/placement-log-BcPhRwR4.mjs +84 -0
- package/dist/{build-plan-BDsSi09V.mjs → plan-placement-CtxkCO54.mjs} +122 -48
- package/dist/{ports-4nYqxPWC.mjs → ports-BLTtfBq-.mjs} +3 -3
- package/dist/{prebuild-D7RUMkwN.mjs → prebuild-juCyreaR.mjs} +5 -5
- package/dist/preview-D5V07Nrl.mjs +987 -0
- package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
- package/dist/{project-D47Rh0ly.mjs → project-C3ChRLZy.mjs} +4 -68
- package/dist/projects-DD7dBTCj.mjs +92 -0
- package/dist/{pull-request-pxnDCQzn.mjs → pull-request-u4vp7zmK.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/{recordings-BNgsD1Tr.mjs → recordings-BAWltsVt.mjs} +1 -1
- package/dist/{reload-DcRxj3qG.mjs → reload-DvyWzVjJ.mjs} +15 -15
- package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-BGg7aGIZ.mjs} +5 -5
- package/dist/{run-CkE9y0nc.mjs → run-vhtDgpHO.mjs} +5 -5
- package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-B9E7S1aR.mjs} +4 -5
- package/dist/server-expo-Db9HBUoa.mjs +2 -0
- package/dist/{server-expo-CHTyXD0G.mjs → server-expo-DoBHhuzK.mjs} +5 -6
- package/dist/{settings-SR9OmW9h.mjs → settings-Byp2AQ_E.mjs} +6 -5
- package/dist/{settings-Cfd-0r2d.mjs → settings-CQyMElEP.mjs} +24 -763
- package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
- package/dist/settings.schema.json +126 -3
- package/dist/{simslim-BWNrc3M3.mjs → simslim-EHBQ2R4G.mjs} +7 -7
- package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-C1nqh4mu.mjs} +6 -6
- package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
- package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
- package/dist/{stage-CzaiwFsI.mjs → stage-g_WqWeaE.mjs} +14 -3
- package/dist/{start-DUz3mYdb.mjs → start-D-IeOyoK.mjs} +19 -19
- package/dist/{start-AlfCPRVU.mjs → start-NTc1Ifqs.mjs} +1 -1
- package/dist/{state-PeQiJuIu.mjs → state-BG-aAk4k.mjs} +4 -4
- package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
- package/dist/{state-DyaNTgfR.mjs → state-xnqpx3AD.mjs} +2 -2
- package/dist/{stats-Bq4fJOdB.mjs → stats-DY6ekz8F.mjs} +5 -5
- package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
- package/dist/{status-BA2pehwf.mjs → status-DCjZeE-K.mjs} +33 -34
- package/dist/{status-CzS4bPO9.mjs → status-Dcr0Qexd.mjs} +5 -5
- package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-Behws_fi.mjs} +1 -1
- package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-aR_WsNOA.mjs} +1 -1
- package/dist/{stop-BIiM49EY.mjs → stop-BGhKMOuH.mjs} +5 -5
- package/dist/{stop-DQIasgKp.mjs → stop-BTjs3xbc.mjs} +17 -18
- package/dist/{stop-zF1y04f2.mjs → stop-DIJtD2GL.mjs} +2 -2
- package/dist/supervisor-run.d.mts +24 -22
- package/dist/supervisor-run.mjs +21 -22
- package/dist/{support-CsJNVfOc.mjs → support-BaayeYCf.mjs} +7 -7
- package/dist/{support-WvD__tSV.mjs → support-Bwvbrq5-.mjs} +5 -5
- package/dist/{toolchain-DNyR3NPq.mjs → toolchain-Bnyd_K3A.mjs} +471 -22
- package/dist/{trigger-Bemu8ytw.mjs → trigger-CJMhwXe8.mjs} +5 -5
- package/dist/trigger-DWAq9hkw.mjs +2 -0
- package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-CjB-MP6H.mjs} +7 -7
- package/dist/web-B6_bFDn7.mjs +2 -0
- package/dist/{web-Dl0KSRHf.mjs → web-DTU0uiWj.mjs} +22 -22
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-C59dqG-Z.mjs} +3 -3
- package/dist/{ownership-BMLqyBgJ.mjs → workspaces-xXItD8Dj.mjs} +577 -23
- package/dist/{worktree-j3IcFAI5.mjs → worktree-BJfnU6r5.mjs} +1 -1
- package/dist/{worktree-Be_7NLKy.mjs → worktree-BSYlofkq.mjs} +234 -35
- package/dist/worktree-CsKYexJM.mjs +753 -0
- package/package.json +10 -5
- package/dist/build-progress-D0WkjCPd.mjs +0 -1036
- package/dist/build-slots-41v_d2x9.mjs +0 -142
- package/dist/cli-CYXb29oE.mjs +0 -51
- package/dist/deps-iKw0eD4P.mjs +0 -438
- package/dist/errors-B6W7FkxQ.mjs +0 -15
- package/dist/idle-BXG__1BA.mjs +0 -176
- package/dist/in-use-CvGOUn-x.mjs +0 -130
- package/dist/preview-B-g9d7kV.mjs +0 -318
- package/dist/process-identity-BmRm1qV0.mjs +0 -12
- package/dist/server-expo-CeakhI8P.mjs +0 -2
- package/dist/state-BKa8wNN5.mjs +0 -148
- package/dist/stop-cause-rhmGfwvt.mjs +0 -97
- package/dist/trigger-CXts6qt1.mjs +0 -2
- package/dist/watchman-APYjXSQa.mjs +0 -48
- package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
- package/dist/workspaces-Bcib97-6.mjs +0 -306
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import { r as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
|
|
2
|
+
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-CBtzyIgF.mjs";
|
|
4
|
+
import { _ as loadConfig$1 } from "./config-CgYMahz7.mjs";
|
|
5
|
+
import { h as resolvePackageJson } from "./project-C3ChRLZy.mjs";
|
|
6
|
+
import { _ as workspaceDerivedData, f as sharedCcache$1, p as sharedCompilationCache$1, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
|
|
7
|
+
import { r as register } from "./cache-manifest-BI7ozfmH.mjs";
|
|
8
|
+
import { o as machineNumber } from "./budget-DIhL2BKx.mjs";
|
|
9
|
+
import { a as spawnDeclared } from "./spawn-claims-Kqiifsk2.mjs";
|
|
10
|
+
import { o as androidHome } from "./android-DC3ZLuw0.mjs";
|
|
11
|
+
import { Q as resolveOptimizations } from "./settings-CQyMElEP.mjs";
|
|
12
|
+
import { t as cleanLine } from "./server-expo-DoBHhuzK.mjs";
|
|
11
13
|
import { createRequire } from "node:module";
|
|
12
|
-
import { createHash } from "node:crypto";
|
|
13
14
|
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
14
|
-
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
15
|
+
import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
15
16
|
import { stimBuildDigest } from "@stim-cli/core/state";
|
|
16
17
|
import { fileURLToPath } from "node:url";
|
|
18
|
+
import { homedir } from "node:os";
|
|
17
19
|
import chalk from "chalk";
|
|
20
|
+
import { createHash } from "node:crypto";
|
|
18
21
|
const CCACHE_SLOPPINESS = "pch_defines,time_macros";
|
|
19
22
|
const STATS_LOG_FILE = "ccache-stats.log";
|
|
20
23
|
const CCACHE_UNAVAILABLE = {
|
|
@@ -32,7 +35,11 @@ const CCACHE_NOT_RUN = {
|
|
|
32
35
|
function ccacheStatsLog(root) {
|
|
33
36
|
return join(workspaceLogsDir$1(root), STATS_LOG_FILE);
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
function ccacheMaxSize(config = loadConfig$1(), env = process.env) {
|
|
39
|
+
const { value, error } = machineNumber("caches.ccacheMaxGb", config, env);
|
|
40
|
+
return error || value === void 0 ? "5G" : `${value}G`;
|
|
41
|
+
}
|
|
42
|
+
function ccacheEnvironment({ binary, dir, workspaceRoot, statsLog, maxSize = "5G" }) {
|
|
36
43
|
return {
|
|
37
44
|
CMAKE_C_COMPILER_LAUNCHER: binary,
|
|
38
45
|
CMAKE_CXX_COMPILER_LAUNCHER: binary,
|
|
@@ -40,7 +47,7 @@ function ccacheEnvironment({ binary, dir, workspaceRoot, statsLog }) {
|
|
|
40
47
|
CCACHE_BASEDIR: workspaceRoot,
|
|
41
48
|
CCACHE_NOHASHDIR: "true",
|
|
42
49
|
CCACHE_SLOPPINESS,
|
|
43
|
-
CCACHE_MAXSIZE:
|
|
50
|
+
CCACHE_MAXSIZE: maxSize,
|
|
44
51
|
CCACHE_STATSLOG: statsLog
|
|
45
52
|
};
|
|
46
53
|
}
|
|
@@ -95,7 +102,7 @@ function lookupCcache() {
|
|
|
95
102
|
return null;
|
|
96
103
|
}
|
|
97
104
|
}
|
|
98
|
-
function readOrNull(file) {
|
|
105
|
+
function readOrNull$1(file) {
|
|
99
106
|
try {
|
|
100
107
|
return readFileSync(file, "utf-8");
|
|
101
108
|
} catch {
|
|
@@ -115,7 +122,7 @@ function resolveCcache({ root, dir = sharedCcache$1(), lookup = lookupCcache, on
|
|
|
115
122
|
onNote(chalk.dim(phaseLine("cache", "ccache off (not installed; brew install ccache)")));
|
|
116
123
|
return null;
|
|
117
124
|
}
|
|
118
|
-
const declared = projectCmakeLauncher(readOrNull(join(root, "android", "app", "build.gradle")));
|
|
125
|
+
const declared = projectCmakeLauncher(readOrNull$1(join(root, "android", "app", "build.gradle")));
|
|
119
126
|
if (declared) {
|
|
120
127
|
onNote(chalk.dim(phaseLine("cache", `ccache off (android/app/build.gradle sets ${declared} itself)`)));
|
|
121
128
|
return null;
|
|
@@ -135,7 +142,8 @@ function resolveCcache({ root, dir = sharedCcache$1(), lookup = lookupCcache, on
|
|
|
135
142
|
binary,
|
|
136
143
|
dir,
|
|
137
144
|
workspaceRoot: canonical(root),
|
|
138
|
-
statsLog
|
|
145
|
+
statsLog,
|
|
146
|
+
maxSize: ccacheMaxSize()
|
|
139
147
|
})
|
|
140
148
|
};
|
|
141
149
|
}
|
|
@@ -1075,6 +1083,438 @@ async function buildIos({ root, udid = null, logWriter, project = null, scheme =
|
|
|
1075
1083
|
};
|
|
1076
1084
|
}
|
|
1077
1085
|
//#endregion
|
|
1086
|
+
//#region src/engine/deps.ts
|
|
1087
|
+
const DEPS_ERROR = "STIM_DEPS_FAILED";
|
|
1088
|
+
const TRANSCRIPT_LINES = 2e3;
|
|
1089
|
+
const MAX_POD_DIAGNOSTIC_LINES = 15;
|
|
1090
|
+
const POD_MARKER = /^\[!\]/;
|
|
1091
|
+
const POD_CONTINUATION = /^\s+\S/;
|
|
1092
|
+
const RUBY_HEAD = /^\S.*\.rb:\d+:in\s+(?:`[^']*'|'[^']*'):\s*\S/;
|
|
1093
|
+
const RUBY_FRAME = /^\s*from\s+\S/;
|
|
1094
|
+
const RUBY_CONTEXT_BEFORE = 4;
|
|
1095
|
+
const BUNDLER_FROZEN = /frozen mode|lockfile can't be updated|in deployment mode after changing/i;
|
|
1096
|
+
const BUNDLER_NO_COCOAPODS = /cocoapods is not currently included in the bundle|command not found: pod\b/i;
|
|
1097
|
+
function extractPodDiagnostics(transcript) {
|
|
1098
|
+
if (typeof transcript !== "string" || transcript === "") return null;
|
|
1099
|
+
const lines = transcript.split("\n").map((line) => line.replace(/\r$/, ""));
|
|
1100
|
+
return extractPodBangBlocks(lines) || extractRubyHead(lines);
|
|
1101
|
+
}
|
|
1102
|
+
function extractPodBangBlocks(lines) {
|
|
1103
|
+
const blocks = [];
|
|
1104
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
1105
|
+
const line = lines[i];
|
|
1106
|
+
if (line === void 0 || !POD_MARKER.test(line)) continue;
|
|
1107
|
+
const block = [line];
|
|
1108
|
+
let j = i + 1;
|
|
1109
|
+
for (; j < lines.length; j += 1) {
|
|
1110
|
+
const next = lines[j];
|
|
1111
|
+
if (next === void 0 || !POD_CONTINUATION.test(next)) break;
|
|
1112
|
+
block.push(next);
|
|
1113
|
+
}
|
|
1114
|
+
blocks.push(block);
|
|
1115
|
+
i = j - 1;
|
|
1116
|
+
}
|
|
1117
|
+
if (blocks.length === 0) return null;
|
|
1118
|
+
const out = [];
|
|
1119
|
+
let dropped = 0;
|
|
1120
|
+
for (const block of blocks) {
|
|
1121
|
+
const room = MAX_POD_DIAGNOSTIC_LINES - out.length;
|
|
1122
|
+
if (room <= 0) {
|
|
1123
|
+
dropped += block.length;
|
|
1124
|
+
continue;
|
|
1125
|
+
}
|
|
1126
|
+
out.push(...block.slice(0, room));
|
|
1127
|
+
dropped += Math.max(0, block.length - room);
|
|
1128
|
+
}
|
|
1129
|
+
if (dropped > 0) out.push(`(+${dropped} more [!] lines in the build log)`);
|
|
1130
|
+
return {
|
|
1131
|
+
source: "cocoapods",
|
|
1132
|
+
lines: out
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
function extractRubyHead(lines) {
|
|
1136
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
1137
|
+
const line = lines[i];
|
|
1138
|
+
if (line === void 0 || !RUBY_HEAD.test(line) || RUBY_FRAME.test(line)) continue;
|
|
1139
|
+
let start = i;
|
|
1140
|
+
while (start > 0 && i - start < RUBY_CONTEXT_BEFORE) {
|
|
1141
|
+
const prev = lines[start - 1];
|
|
1142
|
+
if (prev === void 0 || prev.trim() === "" || RUBY_FRAME.test(prev) || POD_MARKER.test(prev)) break;
|
|
1143
|
+
start -= 1;
|
|
1144
|
+
}
|
|
1145
|
+
let end = i + 1;
|
|
1146
|
+
while (end < lines.length) {
|
|
1147
|
+
const next = lines[end];
|
|
1148
|
+
if (next === void 0 || next.trim() === "" || RUBY_FRAME.test(next)) break;
|
|
1149
|
+
end += 1;
|
|
1150
|
+
}
|
|
1151
|
+
return {
|
|
1152
|
+
source: "ruby",
|
|
1153
|
+
lines: lines.slice(start, end).filter((entry) => entry.trim() !== "").slice(0, MAX_POD_DIAGNOSTIC_LINES)
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
return null;
|
|
1157
|
+
}
|
|
1158
|
+
function podsAreStale(lockText, manifestText) {
|
|
1159
|
+
const lock = normalize(lockText);
|
|
1160
|
+
const manifest = normalize(manifestText);
|
|
1161
|
+
if (lock === null && manifest === null) return {
|
|
1162
|
+
noPods: true,
|
|
1163
|
+
stale: false
|
|
1164
|
+
};
|
|
1165
|
+
if (lock === null) return {
|
|
1166
|
+
stale: true,
|
|
1167
|
+
reason: "ios/Podfile.lock is missing but ios/Pods exists"
|
|
1168
|
+
};
|
|
1169
|
+
if (manifest === null) return {
|
|
1170
|
+
stale: true,
|
|
1171
|
+
reason: "ios/Pods/Manifest.lock is missing (pods have never been installed here)"
|
|
1172
|
+
};
|
|
1173
|
+
if (lock !== manifest) return {
|
|
1174
|
+
stale: true,
|
|
1175
|
+
reason: "ios/Podfile.lock and ios/Pods/Manifest.lock differ"
|
|
1176
|
+
};
|
|
1177
|
+
return { stale: false };
|
|
1178
|
+
}
|
|
1179
|
+
function normalize(text) {
|
|
1180
|
+
if (typeof text !== "string") return null;
|
|
1181
|
+
return text.replace(/\r\n/g, "\n").trimEnd();
|
|
1182
|
+
}
|
|
1183
|
+
function podfilePath(root) {
|
|
1184
|
+
return join(root, "ios", "Podfile");
|
|
1185
|
+
}
|
|
1186
|
+
function readPodState(root) {
|
|
1187
|
+
return {
|
|
1188
|
+
hasPodfile: existsSync(podfilePath(root)),
|
|
1189
|
+
lockText: readOrNull(join(root, "ios", "Podfile.lock")),
|
|
1190
|
+
manifestText: readOrNull(join(root, "ios", "Pods", "Manifest.lock"))
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
function readOrNull(file) {
|
|
1194
|
+
try {
|
|
1195
|
+
return readFileSync(file, "utf-8");
|
|
1196
|
+
} catch {
|
|
1197
|
+
return null;
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
function podEnv(root, options = {}) {
|
|
1201
|
+
return podEnvForRuby(readRubyVersion(root), options);
|
|
1202
|
+
}
|
|
1203
|
+
function podEnvForRuby(version, { env = process.env, home = homedir(), exists = existsSync } = {}) {
|
|
1204
|
+
const out = {
|
|
1205
|
+
...env,
|
|
1206
|
+
FORCE_COLOR: "0",
|
|
1207
|
+
CLICOLOR: "0",
|
|
1208
|
+
LANG: env.LANG ?? "en_US.UTF-8",
|
|
1209
|
+
LC_ALL: env.LC_ALL ?? env.LANG ?? "en_US.UTF-8"
|
|
1210
|
+
};
|
|
1211
|
+
if (!version) return out;
|
|
1212
|
+
const candidates = [
|
|
1213
|
+
{ bin: join(home, ".rbenv", "versions", version, "bin") },
|
|
1214
|
+
{
|
|
1215
|
+
bin: join(home, ".rvm", "rubies", `ruby-${version}`, "bin"),
|
|
1216
|
+
gems: join(home, ".rvm", "gems", `ruby-${version}`)
|
|
1217
|
+
},
|
|
1218
|
+
{ bin: join(home, ".asdf", "installs", "ruby", version, "bin") },
|
|
1219
|
+
{ bin: join(home, ".local", "share", "mise", "installs", "ruby", version, "bin") }
|
|
1220
|
+
];
|
|
1221
|
+
for (const c of candidates) {
|
|
1222
|
+
if (!exists(c.bin)) continue;
|
|
1223
|
+
out.PATH = `${c.bin}${delimiter}${out.PATH ?? ""}`;
|
|
1224
|
+
if (c.gems && exists(c.gems)) {
|
|
1225
|
+
out.GEM_HOME = c.gems;
|
|
1226
|
+
out.GEM_PATH = c.gems;
|
|
1227
|
+
}
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
return out;
|
|
1231
|
+
}
|
|
1232
|
+
function readRubyVersion(root, { read = readFileSync } = {}) {
|
|
1233
|
+
try {
|
|
1234
|
+
const first = String(read(join(root, ".ruby-version"), "utf-8")).split("\n").map((l) => l.trim()).find((l) => l && !l.startsWith("#"));
|
|
1235
|
+
if (!first) return null;
|
|
1236
|
+
return first.replace(/^ruby-/, "");
|
|
1237
|
+
} catch {
|
|
1238
|
+
return null;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
function bundlerEnv(root, gemfile) {
|
|
1242
|
+
return {
|
|
1243
|
+
...podEnv(root),
|
|
1244
|
+
BUNDLE_GEMFILE: gemfile,
|
|
1245
|
+
BUNDLE_FROZEN: "true"
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
const BUNDLE_PATH_SETTING = /^BUNDLE_PATH:[ \t]*["']?([^"'\r\n]+?)["']?[ \t]*$/m;
|
|
1249
|
+
function bundlePathInsideProject(root, env) {
|
|
1250
|
+
const fromEnv = env.BUNDLE_PATH;
|
|
1251
|
+
const configured = fromEnv || BUNDLE_PATH_SETTING.exec(readOrNull(join(root, ".bundle", "config")) ?? "")?.[1];
|
|
1252
|
+
if (!configured || configured.startsWith("~")) return null;
|
|
1253
|
+
const resolved = resolve(root, configured);
|
|
1254
|
+
if (resolved !== root && !resolved.startsWith(root + sep)) return null;
|
|
1255
|
+
return {
|
|
1256
|
+
path: relative(root, resolved) || ".",
|
|
1257
|
+
where: fromEnv ? "where the BUNDLE_PATH environment variable points" : "where its own .bundle/config points BUNDLE_PATH"
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
async function runCaptured(ctx) {
|
|
1261
|
+
const startedAt = ctx.now();
|
|
1262
|
+
const transcript = [];
|
|
1263
|
+
const push = (line) => {
|
|
1264
|
+
const msg = stripAnsi(String(line)).trimEnd();
|
|
1265
|
+
if (!msg.trim()) return;
|
|
1266
|
+
transcript.push(msg);
|
|
1267
|
+
if (transcript.length > TRANSCRIPT_LINES) transcript.splice(TRANSCRIPT_LINES / 2, 1);
|
|
1268
|
+
ctx.logWriter?.write?.({
|
|
1269
|
+
src: "build",
|
|
1270
|
+
level: "debug",
|
|
1271
|
+
msg,
|
|
1272
|
+
raw: true,
|
|
1273
|
+
event: ctx.event
|
|
1274
|
+
});
|
|
1275
|
+
};
|
|
1276
|
+
let child;
|
|
1277
|
+
try {
|
|
1278
|
+
child = spawnDeclared(() => ctx.spawn(ctx.cmd, ctx.args, {
|
|
1279
|
+
cwd: ctx.cwd,
|
|
1280
|
+
stdio: [
|
|
1281
|
+
"ignore",
|
|
1282
|
+
"pipe",
|
|
1283
|
+
"pipe"
|
|
1284
|
+
],
|
|
1285
|
+
env: ctx.env
|
|
1286
|
+
}));
|
|
1287
|
+
} catch (error) {
|
|
1288
|
+
return {
|
|
1289
|
+
transcript,
|
|
1290
|
+
code: null,
|
|
1291
|
+
signal: null,
|
|
1292
|
+
error,
|
|
1293
|
+
durationMs: ctx.now() - startedAt
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1296
|
+
const reader = {
|
|
1297
|
+
out: createLineReader(push),
|
|
1298
|
+
err: createLineReader(push)
|
|
1299
|
+
};
|
|
1300
|
+
child.stdout?.setEncoding?.("utf-8");
|
|
1301
|
+
child.stderr?.setEncoding?.("utf-8");
|
|
1302
|
+
child.stdout?.on("data", (chunk) => reader.out.push(chunk));
|
|
1303
|
+
child.stderr?.on("data", (chunk) => reader.err.push(chunk));
|
|
1304
|
+
const stopHeartbeat = ctx.label ? startBuildHeartbeat({
|
|
1305
|
+
intervalMs: ctx.heartbeatMs,
|
|
1306
|
+
elapsed: () => ctx.now() - startedAt,
|
|
1307
|
+
emit: ctx.onHeartbeat,
|
|
1308
|
+
label: ctx.label,
|
|
1309
|
+
estimateMs: ctx.estimateMs ?? null
|
|
1310
|
+
}) : () => {};
|
|
1311
|
+
let result;
|
|
1312
|
+
try {
|
|
1313
|
+
result = await waitForChild(child);
|
|
1314
|
+
} finally {
|
|
1315
|
+
stopHeartbeat();
|
|
1316
|
+
}
|
|
1317
|
+
reader.out.flush();
|
|
1318
|
+
reader.err.flush();
|
|
1319
|
+
return {
|
|
1320
|
+
transcript,
|
|
1321
|
+
code: result.code ?? null,
|
|
1322
|
+
signal: result.signal ?? null,
|
|
1323
|
+
error: result.error ?? null,
|
|
1324
|
+
durationMs: ctx.now() - startedAt
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
async function ensureBundledGems(root, pin, ctx) {
|
|
1328
|
+
const env = bundlerEnv(root, pin.gemfile);
|
|
1329
|
+
const cwd = dirname(pin.gemfile);
|
|
1330
|
+
const check = await runCaptured({
|
|
1331
|
+
...ctx,
|
|
1332
|
+
cmd: "bundle",
|
|
1333
|
+
args: ["check", "--dry-run"],
|
|
1334
|
+
cwd,
|
|
1335
|
+
env,
|
|
1336
|
+
event: "bundle_check",
|
|
1337
|
+
label: "gems"
|
|
1338
|
+
});
|
|
1339
|
+
if (check.error) return bundlerSpawnFailure("bundle check", check, pin);
|
|
1340
|
+
if (check.code === 0) return { bundler: true };
|
|
1341
|
+
const install = await runCaptured({
|
|
1342
|
+
...ctx,
|
|
1343
|
+
cmd: "bundle",
|
|
1344
|
+
args: ["install"],
|
|
1345
|
+
cwd,
|
|
1346
|
+
env,
|
|
1347
|
+
event: "bundle_install",
|
|
1348
|
+
label: "gems"
|
|
1349
|
+
});
|
|
1350
|
+
if (install.error) return bundlerSpawnFailure("bundle install", install, pin);
|
|
1351
|
+
const inProject = bundlePathInsideProject(cwd, env);
|
|
1352
|
+
const note = inProject ? `\`bundle install\` put this project's gems in ${inProject.path}${sep}, ${inProject.where}; Gemfile.lock itself is never written.` : void 0;
|
|
1353
|
+
if (install.code === 0) return {
|
|
1354
|
+
bundler: true,
|
|
1355
|
+
note
|
|
1356
|
+
};
|
|
1357
|
+
const how = install.signal ? `signal ${install.signal}` : `exit code ${install.code}`;
|
|
1358
|
+
const transcript = install.transcript.join("\n");
|
|
1359
|
+
const extracted = extractPodDiagnostics(transcript);
|
|
1360
|
+
return {
|
|
1361
|
+
bundler: false,
|
|
1362
|
+
failure: {
|
|
1363
|
+
failed: true,
|
|
1364
|
+
code: DEPS_ERROR,
|
|
1365
|
+
reason: `\`bundle install\` failed (${how}).`,
|
|
1366
|
+
remedy: frozenRemedy(root, pin, transcript) || gemInstallRemedy(root, pin),
|
|
1367
|
+
diagnosticSource: extracted ? extracted.source : "tail",
|
|
1368
|
+
diagnosticLines: extracted ? extracted.lines : [],
|
|
1369
|
+
lastLines: install.transcript.slice(-20),
|
|
1370
|
+
durationMs: install.durationMs
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
function bundlerSpawnFailure(command, run, pin) {
|
|
1375
|
+
if (isMissingBinary(run.error)) return {
|
|
1376
|
+
bundler: false,
|
|
1377
|
+
note: missingBundlerNote(pin)
|
|
1378
|
+
};
|
|
1379
|
+
return {
|
|
1380
|
+
bundler: false,
|
|
1381
|
+
failure: {
|
|
1382
|
+
failed: true,
|
|
1383
|
+
code: DEPS_ERROR,
|
|
1384
|
+
reason: `Could not run \`${command}\`: ${run.error?.message || run.error}`,
|
|
1385
|
+
remedy: `Bundler is how this project pins its CocoaPods (${pin.lockfile}). Check that \`bundle\` runs in ${dirname(pin.gemfile)}, then run again.`,
|
|
1386
|
+
lastLines: run.transcript.slice(-20),
|
|
1387
|
+
durationMs: run.durationMs
|
|
1388
|
+
}
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1391
|
+
function missingBundlerNote(pin) {
|
|
1392
|
+
return `${pin.lockfile} pins this project's CocoaPods, but \`bundle\` is not on PATH, so pods run as plain \`pod install\` with whatever CocoaPods PATH resolves to (\`gem install bundler\` to use the pin).`;
|
|
1393
|
+
}
|
|
1394
|
+
function frozenRemedy(root, pin, transcript) {
|
|
1395
|
+
if (!BUNDLER_FROZEN.test(transcript)) return void 0;
|
|
1396
|
+
return `Stim runs bundler with BUNDLE_FROZEN so it can never write into your checkout, and ${pin.gemfile} no longer matches ${pin.lockfile}. Run \`cd ${root} && bundle install\` yourself, keep the updated Gemfile.lock, then run again.`;
|
|
1397
|
+
}
|
|
1398
|
+
function gemInstallRemedy(root, pin) {
|
|
1399
|
+
const version = readRubyVersion(root);
|
|
1400
|
+
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.`;
|
|
1401
|
+
}
|
|
1402
|
+
async function runPodInstall(root, logWriter, { spawnFn = null, now = Date.now, heartbeatMs = HEARTBEAT_INTERVAL_MS, estimateMs = null, onHeartbeat = (line) => console.error(line) } = {}) {
|
|
1403
|
+
const iosDir = join(root, "ios");
|
|
1404
|
+
if (!existsSync(iosDir)) return {
|
|
1405
|
+
failed: true,
|
|
1406
|
+
code: DEPS_ERROR,
|
|
1407
|
+
reason: `No ios/ directory in ${root}, so there is nothing to pod install.`,
|
|
1408
|
+
remedy: "Run `stim ios` on a project with native iOS sources, or let prebuild generate them.",
|
|
1409
|
+
lastLines: []
|
|
1410
|
+
};
|
|
1411
|
+
const ctx = {
|
|
1412
|
+
logWriter,
|
|
1413
|
+
spawn: spawnFn || ((cmd, args, opts) => getExecutor().spawn(cmd, args, opts)),
|
|
1414
|
+
now,
|
|
1415
|
+
heartbeatMs,
|
|
1416
|
+
onHeartbeat
|
|
1417
|
+
};
|
|
1418
|
+
const notes = [];
|
|
1419
|
+
const pin = bundlerPin(root);
|
|
1420
|
+
let bundler = false;
|
|
1421
|
+
if (pin) {
|
|
1422
|
+
const gems = await ensureBundledGems(root, pin, ctx);
|
|
1423
|
+
if (gems.failure) return {
|
|
1424
|
+
...gems.failure,
|
|
1425
|
+
notes
|
|
1426
|
+
};
|
|
1427
|
+
if (gems.note) notes.push(gems.note);
|
|
1428
|
+
bundler = gems.bundler;
|
|
1429
|
+
}
|
|
1430
|
+
const args = bundler ? [
|
|
1431
|
+
"bundle",
|
|
1432
|
+
"exec",
|
|
1433
|
+
"pod",
|
|
1434
|
+
"install"
|
|
1435
|
+
] : ["pod", "install"];
|
|
1436
|
+
const command = args.join(" ");
|
|
1437
|
+
const run = await runCaptured({
|
|
1438
|
+
...ctx,
|
|
1439
|
+
cmd: args[0],
|
|
1440
|
+
args: args.slice(1),
|
|
1441
|
+
cwd: iosDir,
|
|
1442
|
+
env: bundler && pin ? bundlerEnv(root, pin.gemfile) : podEnv(root),
|
|
1443
|
+
event: "pod_install",
|
|
1444
|
+
label: "pods",
|
|
1445
|
+
estimateMs
|
|
1446
|
+
});
|
|
1447
|
+
if (run.error) return {
|
|
1448
|
+
...(bundler ? missingBundle(run.error, pin) : missingPod(run.error)) || {
|
|
1449
|
+
failed: true,
|
|
1450
|
+
code: "STIM_DEPS_FAILED",
|
|
1451
|
+
reason: `Could not run \`${command}\`: ${run.error?.message || run.error}`,
|
|
1452
|
+
lastLines: run.transcript.slice(-20),
|
|
1453
|
+
durationMs: run.durationMs
|
|
1454
|
+
},
|
|
1455
|
+
command,
|
|
1456
|
+
notes
|
|
1457
|
+
};
|
|
1458
|
+
if (run.code !== 0) {
|
|
1459
|
+
const how = run.signal ? `signal ${run.signal}` : `exit code ${run.code}`;
|
|
1460
|
+
const transcript = run.transcript.join("\n");
|
|
1461
|
+
const extracted = extractPodDiagnostics(transcript);
|
|
1462
|
+
return {
|
|
1463
|
+
failed: true,
|
|
1464
|
+
code: DEPS_ERROR,
|
|
1465
|
+
reason: `\`${command}\` failed (${how}).`,
|
|
1466
|
+
remedy: podFailureRemedy(root, pin, transcript),
|
|
1467
|
+
command,
|
|
1468
|
+
notes,
|
|
1469
|
+
diagnosticSource: extracted ? extracted.source : "tail",
|
|
1470
|
+
diagnosticLines: extracted ? extracted.lines : [],
|
|
1471
|
+
lastLines: run.transcript.slice(-20),
|
|
1472
|
+
durationMs: run.durationMs
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
return {
|
|
1476
|
+
ok: true,
|
|
1477
|
+
command,
|
|
1478
|
+
notes,
|
|
1479
|
+
durationMs: run.durationMs
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
function podFailureRemedy(root, pin, transcript) {
|
|
1483
|
+
if (pin) {
|
|
1484
|
+
const frozen = frozenRemedy(root, pin, transcript);
|
|
1485
|
+
if (frozen) return frozen;
|
|
1486
|
+
if (BUNDLER_NO_COCOAPODS.test(transcript)) return `${pin.lockfile} resolves cocoapods, but bundler found no \`pod\` executable in the bundle it loaded: the installed gems belong to a different Gemfile than ${pin.gemfile}, or that Gemfile's bundle was never installed. Run \`cd ${root} && bundle install && bundle exec pod --version\` and make that work, then run again.`;
|
|
1487
|
+
}
|
|
1488
|
+
const pinned = /Could not find proper version of cocoapods/.test(transcript) ? readRubyVersion(root) : null;
|
|
1489
|
+
if (!pinned) return void 0;
|
|
1490
|
+
return `This repo pins ruby ${pinned} (.ruby-version) and its Gemfile's cocoapods was installed under it; the shell's ruby is likely a different version, so bundler looks in the wrong gem home. Put ruby ${pinned} on PATH (rbenv/rvm/asdf/mise) -- \`bundle install\` will NOT fix this.`;
|
|
1491
|
+
}
|
|
1492
|
+
function isMissingBinary(err) {
|
|
1493
|
+
const nodeErr = err;
|
|
1494
|
+
const message = String(nodeErr?.message || err || "");
|
|
1495
|
+
return nodeErr?.code === "ENOENT" || /ENOENT|not found/i.test(message);
|
|
1496
|
+
}
|
|
1497
|
+
function missingBundle(err, pin) {
|
|
1498
|
+
if (!isMissingBinary(err)) return null;
|
|
1499
|
+
return {
|
|
1500
|
+
failed: true,
|
|
1501
|
+
code: DEPS_ERROR,
|
|
1502
|
+
reason: "Bundler is not installed: no `bundle` executable on PATH.",
|
|
1503
|
+
remedy: `${pin?.lockfile ?? "Gemfile.lock"} pins this project's CocoaPods, so pods run through bundler. Install bundler (\`gem install bundler\`) and run again.`,
|
|
1504
|
+
lastLines: []
|
|
1505
|
+
};
|
|
1506
|
+
}
|
|
1507
|
+
function missingPod(err) {
|
|
1508
|
+
if (!isMissingBinary(err)) return null;
|
|
1509
|
+
return {
|
|
1510
|
+
failed: true,
|
|
1511
|
+
code: DEPS_ERROR,
|
|
1512
|
+
reason: "CocoaPods is not installed: no `pod` executable on PATH.",
|
|
1513
|
+
remedy: "Install CocoaPods (`brew install cocoapods`, or `gem install cocoapods`) and run again.",
|
|
1514
|
+
lastLines: []
|
|
1515
|
+
};
|
|
1516
|
+
}
|
|
1517
|
+
//#endregion
|
|
1078
1518
|
//#region src/offload/manifest.ts
|
|
1079
1519
|
function manifestDigest(entries) {
|
|
1080
1520
|
const hash = createHash("sha256");
|
|
@@ -1087,7 +1527,10 @@ const distDir = dirname(fileURLToPath(import.meta.url));
|
|
|
1087
1527
|
function quiet(file, args) {
|
|
1088
1528
|
return getExecutor().runFileQuiet(file, args, { timeoutMs: 2e4 });
|
|
1089
1529
|
}
|
|
1090
|
-
function iosToolchain() {
|
|
1530
|
+
function iosToolchain(root) {
|
|
1531
|
+
return iosToolchainForRuby(readRubyVersion(root));
|
|
1532
|
+
}
|
|
1533
|
+
function iosToolchainForRuby(rubyVersion) {
|
|
1091
1534
|
const xcode = quiet("xcodebuild", ["-version"]);
|
|
1092
1535
|
return {
|
|
1093
1536
|
stimBuild: stimBuildDigest(distDir),
|
|
@@ -1098,9 +1541,15 @@ function iosToolchain() {
|
|
|
1098
1541
|
"iphonesimulator",
|
|
1099
1542
|
"--show-sdk-version"
|
|
1100
1543
|
])?.trim() ?? null,
|
|
1101
|
-
cocoapods:
|
|
1544
|
+
cocoapods: cocoapodsVersion(rubyVersion)
|
|
1102
1545
|
};
|
|
1103
1546
|
}
|
|
1547
|
+
function cocoapodsVersion(rubyVersion) {
|
|
1548
|
+
return getExecutor().runFileQuiet("pod", ["--version"], {
|
|
1549
|
+
timeoutMs: 2e4,
|
|
1550
|
+
env: Object.fromEntries(Object.entries(podEnvForRuby(rubyVersion)).filter((entry) => entry[1] !== void 0))
|
|
1551
|
+
})?.trim().split("\n").pop()?.trim() ?? null;
|
|
1552
|
+
}
|
|
1104
1553
|
function macosToolchain() {
|
|
1105
1554
|
const xcode = quiet("xcodebuild", ["-version"]);
|
|
1106
1555
|
return {
|
|
@@ -1190,7 +1639,7 @@ function sdkPackages() {
|
|
|
1190
1639
|
platforms
|
|
1191
1640
|
};
|
|
1192
1641
|
}
|
|
1193
|
-
function workerToolchain() {
|
|
1642
|
+
function workerToolchain(rubyVersion = null) {
|
|
1194
1643
|
let listed = null;
|
|
1195
1644
|
try {
|
|
1196
1645
|
listed = JSON.parse(quiet("xcrun", [
|
|
@@ -1202,7 +1651,7 @@ function workerToolchain() {
|
|
|
1202
1651
|
]) ?? "null");
|
|
1203
1652
|
} catch {}
|
|
1204
1653
|
return {
|
|
1205
|
-
...
|
|
1654
|
+
...iosToolchainForRuby(rubyVersion),
|
|
1206
1655
|
macosSdk: quiet("xcrun", [
|
|
1207
1656
|
"--sdk",
|
|
1208
1657
|
"macosx",
|
|
@@ -1295,4 +1744,4 @@ function toolchainMismatches(target, worker) {
|
|
|
1295
1744
|
return out;
|
|
1296
1745
|
}
|
|
1297
1746
|
//#endregion
|
|
1298
|
-
export {
|
|
1747
|
+
export { CCACHE_NOT_RUN as A, readBundleId as C, describeDiagnostic as D, tailLines as E, resolveCcache as F, ccacheActivityLine as M, projectCmakeLauncher as N, bundlerPin as O, readCcacheActivity as P, readBundleExecutable as S, startBuildHeartbeat as T, buildIos as _, toolchainMismatches as a, detectXcodeMajor as b, DEPS_ERROR as c, readRubyVersion as d, runCaptured as f, HEARTBEAT_INTERVAL_MS as g, COMPILATION_CACHE_UNAVAILABLE as h, macosToolchain as i, CCACHE_UNAVAILABLE as j, podInstallCommand as k, podsAreStale as l, COMPILATION_CACHE_NOT_RUN as m, androidToolchain as n, workerToolchain as o, runPodInstall as p, iosToolchain as r, manifestDigest as s, androidRequirements as t, readPodState as u, ccacheEnabled as v, resolveScheme as w, discoverXcodeProject as x, compilationCacheActivityLine as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
1
|
+
import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
|
|
2
|
+
import { t as spawnEntry } from "./spawn-entry-Dcb7sDUz.mjs";
|
|
3
|
+
import { n as windowsLauncherArgs } from "./detached-entry-BLfcgc4O.mjs";
|
|
4
|
+
import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
|
|
5
|
+
import { n as stampAttempt, r as due, t as capChildLog } from "./attempt-DW-mQqM7.mjs";
|
|
6
6
|
import { closeSync, openSync } from "node:fs";
|
|
7
7
|
import { maintenanceChildLogFile, maintenanceRunClaims, readMaintenanceAttempt, readMaintenanceState } from "@stim-cli/core/state";
|
|
8
8
|
import { readClaimSet } from "@stim-cli/core/ownership-claim";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { randomUUID } from "node:crypto";
|
|
1
|
+
import { n as ownership_claim_exports } from "./process-identity-Biv3arCO.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
|
|
3
|
+
import { c as gitCommonDirOnDisk } from "./worktree-CsKYexJM.mjs";
|
|
4
|
+
import { D as discoverAgentSessions, E as attributeAgentSessions, T as agentKey, a as updateWorkspaceState, u as ensureWorkspaceStorage, v as workspaceDir, w as withDirLock } from "./workspace-state-C59dqG-Z.mjs";
|
|
5
|
+
import { I as ownedAvdDirectory } from "./android-DC3ZLuw0.mjs";
|
|
6
|
+
import { o as pullRequestLookups } from "./pull-request-u4vp7zmK.mjs";
|
|
8
7
|
import { existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
9
8
|
import { basename, dirname, join } from "node:path";
|
|
10
9
|
import { ENDED_AGENT_RETENTION_MS, READY_PHASE_MS, WARM_KEY, agentSessionsCacheFile, diskUsageCacheFile, pullRequestCacheFile, readAgentSessionsCache, readDiskUsage, readEndedAgentSessions, readPullRequestCache, readWarmRecord, readWorkspaceAgent, readWorkspaceState, workspaceEndedAgentsFile, workspaceEndedAgentsLock } from "@stim-cli/core/state";
|
|
11
10
|
import { homedir } from "node:os";
|
|
11
|
+
import { randomUUID } from "node:crypto";
|
|
12
12
|
//#region src/workspace/merge-state.ts
|
|
13
13
|
const FETCH_TIMEOUT_MS = 3e4;
|
|
14
14
|
const FETCH_FRESH_MS = 6e5;
|