stim 1.11.0 → 1.13.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 +3 -1
- package/dist/{activity-BtG4Va9l.mjs → activity-DfVKZTEB.mjs} +44 -26
- package/dist/{android-BA2i_KAV.mjs → android-BHfAu2mf.mjs} +1 -1
- package/dist/{android-C1q4l523.mjs → android-CD8pr8Q2.mjs} +112 -54
- package/dist/{android-cas-DfJkwCXW.mjs → android-cas-B9Kv9aIy.mjs} +12 -10
- package/dist/{android-C4zG2Tuc.mjs → android-qx_31wJo.mjs} +414 -118
- package/dist/{app-install-DHut6JnV.mjs → app-install-CDFY2nUL.mjs} +1 -1
- package/dist/budget-E5o91NR1.mjs +1739 -0
- package/dist/{build-plan-CeAYgKAx.mjs → build-plan-BTa93o_r.mjs} +125 -107
- package/dist/{build-progress-CDwogz6R.mjs → build-progress-l7d-X-ZP.mjs} +76 -8
- package/dist/{cache-manifest-Pubfp8wV.mjs → cache-manifest-DWPF4RKJ.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cdp-Dq_ypAlJ.mjs +115 -0
- package/dist/chrome-B5hWgQJS.mjs +61 -0
- package/dist/cli.mjs +17 -16
- package/dist/collector-run.mjs +15 -9
- package/dist/{command-output-D5z2_bcF.mjs → command-output-BIL7rlX7.mjs} +1 -1
- package/dist/{config-BEq0Qw_a.mjs → config-0jCcMM0E.mjs} +10 -1
- package/dist/created-devices-Cd558h31.mjs +37 -0
- package/dist/{dependency-state-r9UesA9a.mjs → dependency-state-DNN0yfx6.mjs} +1 -1
- package/dist/{deps-OF7CD5Dx.mjs → deps-2Wo81np9.mjs} +2 -2
- package/dist/{device-BwH2iI3O.mjs → device-Cf7vl-so.mjs} +7 -7
- package/dist/{device-lease-D83nqeMX.mjs → device-lease-CL9dZf73.mjs} +55 -6
- package/dist/{device-pool-DHj7cdPy.mjs → device-pool-MuoiyRcu.mjs} +4 -4
- package/dist/{device-remote-BQZSnnmE.mjs → device-remote-DT9ngZiD.mjs} +254 -579
- package/dist/{doctor-D8QdMRMf.mjs → doctor-D2iysNNH.mjs} +50 -20
- package/dist/{error-diagnostics-UYFSQwRy.mjs → error-diagnostics-BoiOhck8.mjs} +7 -7
- package/dist/{gc-COZteyiq.mjs → gc-eA-PRBX8.mjs} +1022 -131
- package/dist/{guide-NDvTmMi-.mjs → guide-BfZ0OmiP.mjs} +909 -132
- package/dist/{guide-status-CWvti2Lg.mjs → guide-status-BaMYu55M.mjs} +2 -2
- package/dist/{idle-NETbeNiQ.mjs → idle-DxLi5OkN.mjs} +43 -10
- package/dist/{in-use-DVhlSoyn.mjs → in-use-wYEaKQM9.mjs} +11 -7
- package/dist/{ios-CQLKpNfr.mjs → ios-CcfCeZ19.mjs} +103 -58
- package/dist/{ios-DArbmwer.mjs → ios-CmEzZiOj.mjs} +31 -22
- package/dist/{ios-device-CwDZo0X4.mjs → ios-device-BW-t_Lkv.mjs} +1 -1
- package/dist/{launch-verify-CuPDGXdr.mjs → launch-verify-CuJaBpEa.mjs} +33 -20
- package/dist/{logs-B44a1UeU.mjs → logs-DcSRbC2t.mjs} +12 -11
- package/dist/{merge-state-DDxS-XIZ.mjs → merge-state-ytFQCeh4.mjs} +38 -8
- package/dist/{metro-BWLOJ_Wr.mjs → metro-BPeY1YMh.mjs} +5 -5
- package/dist/{named-ports-Dc7neAlc.mjs → named-ports-n7tnJsI8.mjs} +78 -6
- package/dist/native-runtime-CiiFHt0e.mjs +74 -0
- package/dist/{ownership-D2xbLVoz.mjs → ownership-Bz2kETAS.mjs} +2 -2
- package/dist/{ownership-BiojdtAp.mjs → ownership-PUP4Dwai.mjs} +175 -217
- package/dist/page-BTu7I60K.mjs +29 -0
- package/dist/{ports-DwBaRFJs.mjs → ports-C5UutqpJ.mjs} +5 -5
- package/dist/{project-BXZzOABt.mjs → project-DGeclhvO.mjs} +55 -87
- package/dist/{reload-By9Dwsrt.mjs → reload-C-cV5yy_.mjs} +80 -21
- package/dist/remote-cache--aehr4Pr.mjs +526 -0
- package/dist/{server-bare-D_RK1RCj.mjs → server-bare-Bq8BpSIo.mjs} +1 -1
- package/dist/server-expo-BeYwP_Xy.mjs +2 -0
- package/dist/{server-expo-o6H5gcBc.mjs → server-expo-DUCg52-K.mjs} +2 -2
- package/dist/{settings-C0ugALSC.mjs → settings-ssVBToDR.mjs} +29 -17
- package/dist/{settings-B5oFZEri.mjs → settings-xB0Frkg6.mjs} +13 -4
- package/dist/settings.schema.json +74 -2
- package/dist/{simslim-CIR3IYJO.mjs → simslim-Bbg9UWrt.mjs} +13 -6
- package/dist/{slot-launch-rggO1Esw.mjs → slot-launch-BIWEW-wI.mjs} +4 -4
- package/dist/{spawn-claims-BJwXTMPt.mjs → spawn-claims-PT8aQpCa.mjs} +1 -1
- package/dist/{start-BSsf2tUs.mjs → start-BZhItkiL.mjs} +110 -18
- package/dist/{start-i8zc9VmS.mjs → start-Rw2GD3nV.mjs} +1 -1
- package/dist/{state-WGdIbi_d.mjs → state-DwAU2_-D.mjs} +15 -3
- package/dist/state-l1pYwOre.mjs +148 -0
- package/dist/{stats-DBYJ5bxL.mjs → stats-CaSwmsSZ.mjs} +4 -4
- package/dist/{stats-BAgJaLA4.mjs → stats-D8rUTPHd.mjs} +1 -1
- package/dist/{status-CitcBRsC.mjs → status-TJlL0HWo.mjs} +649 -116
- package/dist/{status-Q-WDEGCB.mjs → status-sszP4XKU.mjs} +130 -28
- package/dist/stim-desktop-CXt8-Z3J.mjs +40 -0
- package/dist/{stop-DIhrvu0B.mjs → stop-BZ2qMiBP.mjs} +50 -18
- package/dist/{stop-rst5mL14.mjs → stop-DskDKNTU.mjs} +2 -2
- package/dist/supervisor-run.mjs +11 -11
- package/dist/web-run.d.mts +22 -0
- package/dist/web-run.mjs +481 -0
- package/dist/web-sWXd5iek.mjs +394 -0
- package/dist/{worktree-DhxDTK44.mjs → worktree-3cBa-bQt.mjs} +1 -1
- package/dist/{worktree-KOjMX3zA.mjs → worktree-D4Do_XiQ.mjs} +229 -21
- package/dist/{worktree-BlizKDpZ.mjs → worktree-DeBQSVtR.mjs} +3 -1
- package/dist/{xcode-B5SPD--o.mjs → xcode-LM6A8cNZ.mjs} +7 -7
- package/package.json +5 -5
- package/dist/budget-De3P2rq_.mjs +0 -620
- package/dist/native-run-D7yB_AsB.mjs +0 -143
- package/dist/server-expo-B-CCUJZj.mjs +0 -2
- package/dist/workspace-process-lock-Cx74RSDZ.mjs +0 -57
- package/dist/workspaces-COD2xCz-.mjs +0 -1013
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
//#region src/web/chrome.ts
|
|
6
|
+
const CHROME_INSTALL_REMEDY = "Install Google Chrome from https://www.google.com/chrome/ (or Chromium), then run `stim doctor`.";
|
|
7
|
+
const MAC_APPS = [["Google Chrome.app", "Google Chrome"], ["Chromium.app", "Chromium"]];
|
|
8
|
+
const PATH_NAMES = [
|
|
9
|
+
"google-chrome",
|
|
10
|
+
"google-chrome-stable",
|
|
11
|
+
"chromium",
|
|
12
|
+
"chromium-browser"
|
|
13
|
+
];
|
|
14
|
+
function chromeCandidates(host, { home = homedir(), env = process.env } = {}) {
|
|
15
|
+
if (host === "darwin") return ["/Applications", join(home, "Applications")].flatMap((dir) => MAC_APPS.map(([app, binary]) => join(dir, app, "Contents", "MacOS", binary)));
|
|
16
|
+
if (host === "win32") return [
|
|
17
|
+
env.PROGRAMFILES,
|
|
18
|
+
env["PROGRAMFILES(X86)"],
|
|
19
|
+
env.LOCALAPPDATA
|
|
20
|
+
].filter((dir) => Boolean(dir)).map((dir) => join(dir, "Google", "Chrome", "Application", "chrome.exe"));
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
/** The installed Chrome or Chromium executable Stim launches, or null when none is installed. */
|
|
24
|
+
function findChrome({ host = process.platform, exists = existsSync, findExecutable = (name) => getExecutor().findExecutable(name) } = {}) {
|
|
25
|
+
const installed = chromeCandidates(host).find((path) => exists(path));
|
|
26
|
+
if (installed) return installed;
|
|
27
|
+
for (const name of PATH_NAMES) {
|
|
28
|
+
const found = findExecutable(name);
|
|
29
|
+
if (found) return found;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const DESKTOP_WINDOW = {
|
|
34
|
+
width: 1280,
|
|
35
|
+
height: 800
|
|
36
|
+
};
|
|
37
|
+
const PHONE_SCREEN = {
|
|
38
|
+
width: 390,
|
|
39
|
+
height: 844,
|
|
40
|
+
deviceScaleFactor: 3
|
|
41
|
+
};
|
|
42
|
+
function chromeArgs({ profile, port, headless, ignoreCertificateErrors, viewport }) {
|
|
43
|
+
const window = viewport === "phone" ? PHONE_SCREEN : DESKTOP_WINDOW;
|
|
44
|
+
return [
|
|
45
|
+
`--user-data-dir=${profile}`,
|
|
46
|
+
`--remote-debugging-port=${port}`,
|
|
47
|
+
...headless ? ["--headless"] : [],
|
|
48
|
+
`--window-size=${window.width},${window.height}`,
|
|
49
|
+
"--no-first-run",
|
|
50
|
+
"--no-default-browser-check",
|
|
51
|
+
"--disable-search-engine-choice-screen",
|
|
52
|
+
"--disable-background-networking",
|
|
53
|
+
"--disable-sync",
|
|
54
|
+
"--password-store=basic",
|
|
55
|
+
"--use-mock-keychain",
|
|
56
|
+
...ignoreCertificateErrors ? ["--ignore-certificate-errors"] : [],
|
|
57
|
+
"about:blank"
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { findChrome as i, PHONE_SCREEN as n, chromeArgs as r, CHROME_INSTALL_REMEDY as t };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { v as refuseRelativeStimPaths } from "./config-0jCcMM0E.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
//#region bin/cli.ts
|
|
6
6
|
const commands = /* @__PURE__ */ new Map([
|
|
7
|
-
["doctor", () => import("./doctor-
|
|
8
|
-
["worktree", () => import("./worktree-
|
|
9
|
-
["start", () => import("./start-
|
|
10
|
-
["ports", () => import("./ports-
|
|
11
|
-
["stop", () => import("./stop-
|
|
12
|
-
["ios", () => import("./ios-
|
|
13
|
-
["android", () => import("./android-
|
|
14
|
-
["
|
|
15
|
-
["
|
|
16
|
-
["
|
|
17
|
-
["
|
|
18
|
-
["
|
|
19
|
-
["
|
|
20
|
-
["
|
|
21
|
-
["
|
|
7
|
+
["doctor", () => import("./doctor-D2iysNNH.mjs")],
|
|
8
|
+
["worktree", () => import("./worktree-3cBa-bQt.mjs")],
|
|
9
|
+
["start", () => import("./start-Rw2GD3nV.mjs")],
|
|
10
|
+
["ports", () => import("./ports-C5UutqpJ.mjs")],
|
|
11
|
+
["stop", () => import("./stop-DskDKNTU.mjs")],
|
|
12
|
+
["ios", () => import("./ios-CcfCeZ19.mjs")],
|
|
13
|
+
["android", () => import("./android-CD8pr8Q2.mjs")],
|
|
14
|
+
["web", () => import("./web-sWXd5iek.mjs")],
|
|
15
|
+
["reload", () => import("./reload-C-cV5yy_.mjs")],
|
|
16
|
+
["device", () => import("./device-Cf7vl-so.mjs")],
|
|
17
|
+
["logs", () => import("./logs-DcSRbC2t.mjs")],
|
|
18
|
+
["settings", () => import("./settings-ssVBToDR.mjs")],
|
|
19
|
+
["status", () => import("./status-TJlL0HWo.mjs")],
|
|
20
|
+
["stats", () => import("./stats-CaSwmsSZ.mjs")],
|
|
21
|
+
["gc", () => import("./gc-eA-PRBX8.mjs")],
|
|
22
|
+
["guide", () => import("./guide-BfZ0OmiP.mjs")]
|
|
22
23
|
]);
|
|
23
24
|
const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
|
|
24
25
|
const program = new Command();
|
package/dist/collector-run.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as validateDeviceSlot, O as process_identity_exports, z as deviceSlotKey } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
3
3
|
import { r as createNdjsonWriter } from "./ndjson-CDY9IkVC.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { M as workspaceLogsDir } from "./metro-BPeY1YMh.mjs";
|
|
5
5
|
import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
6
6
|
import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-BiOsSVzd.mjs";
|
|
7
|
-
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-
|
|
8
|
-
import { a as watchAppPid, i as waitForAppPid, n as parseLogcatLine, r as startAndroidLogcat, t as androidClockOffset } from "./android-
|
|
7
|
+
import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-Bz2kETAS.mjs";
|
|
8
|
+
import { a as watchAppPid, i as waitForAppPid, n as parseLogcatLine, r as startAndroidLogcat, t as androidClockOffset } from "./android-BHfAu2mf.mjs";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
11
11
|
import { isAbsolute, join, resolve } from "node:path";
|
|
@@ -95,6 +95,12 @@ const NOISE_RULES = [
|
|
|
95
95
|
exactSubsystem: "com.apple.UIKit",
|
|
96
96
|
category: "UIFocus",
|
|
97
97
|
messageEquals: "RCTScrollViewComponentView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: "cfnetwork-performance-diagnostic",
|
|
101
|
+
exactSubsystem: "com.apple.runtime-issues",
|
|
102
|
+
category: "CFNetwork Performance Diagnostic",
|
|
103
|
+
level: "warn"
|
|
98
104
|
}
|
|
99
105
|
];
|
|
100
106
|
function ruleMatches(rule, { subsystem, category, message }) {
|
|
@@ -106,21 +112,21 @@ function ruleMatches(rule, { subsystem, category, message }) {
|
|
|
106
112
|
if (rule.messageIncludes && !rule.messageIncludes.some((p) => message.includes(p))) return false;
|
|
107
113
|
return true;
|
|
108
114
|
}
|
|
109
|
-
function
|
|
115
|
+
function matchingNoiseRule(event) {
|
|
110
116
|
const subsystem = typeof event?.subsystem === "string" ? event.subsystem : "";
|
|
111
117
|
const category = typeof event?.category === "string" ? event.category : "";
|
|
112
118
|
const message = typeof event?.eventMessage === "string" ? event.eventMessage : "";
|
|
113
|
-
|
|
119
|
+
return NOISE_RULES.find((rule) => ruleMatches(rule, {
|
|
114
120
|
subsystem,
|
|
115
121
|
category,
|
|
116
122
|
message
|
|
117
|
-
}))
|
|
118
|
-
return null;
|
|
123
|
+
}));
|
|
119
124
|
}
|
|
120
125
|
function levelForEvent(event) {
|
|
121
126
|
const level = levelFromMessageType(event?.messageType);
|
|
122
127
|
if (level !== "error" && level !== "fatal") return level;
|
|
123
|
-
|
|
128
|
+
const rule = matchingNoiseRule(event);
|
|
129
|
+
return rule ? rule.level ?? "info" : level;
|
|
124
130
|
}
|
|
125
131
|
function procFromImagePath(path) {
|
|
126
132
|
if (typeof path !== "string" || !path) return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NO_PROJECT_REFUSAL } from "./project-
|
|
1
|
+
import { t as NO_PROJECT_REFUSAL } from "./project-DGeclhvO.mjs";
|
|
2
2
|
import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
|
|
3
3
|
import { quotedPath } from "@stim-cli/core";
|
|
4
4
|
import chalk from "chalk";
|
|
@@ -379,6 +379,15 @@ function releaseAndroidConsolePort(projectPath, consolePort, slot = "default") {
|
|
|
379
379
|
return true;
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
+
function clearAndroidBootPending(projectPath, avdName, slot = "default") {
|
|
383
|
+
withConfigLock(() => {
|
|
384
|
+
const cfg = loadConfig();
|
|
385
|
+
const android = deviceSlotPlatforms(cfg?.projects?.[projectPath], slot)?.android;
|
|
386
|
+
if (!cfg || android?.avdName !== avdName || !android.bootPending) return;
|
|
387
|
+
delete android.bootPending;
|
|
388
|
+
saveConfig(cfg);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
382
391
|
function clearDevice(projectPath, platform, slot = "default", expectedId) {
|
|
383
392
|
return withConfigLock(() => {
|
|
384
393
|
const cfg = loadConfig();
|
|
@@ -512,4 +521,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
|
|
|
512
521
|
return result;
|
|
513
522
|
}
|
|
514
523
|
//#endregion
|
|
515
|
-
export {
|
|
524
|
+
export { ownership_claim_exports as A, deviceSlotPlatforms as B, setDevice as C, writeConfigSetting as D, withConfigLock$1 as E, measuredDirectorySize as F, validateDeviceSlot as G, parseDeviceSlotOption as H, volumeRootFor as I, assignSlotDevice as L, formatBytes as M, isOnMountedVolume as N, process_identity_exports as O, listMountedVolumes as P, deviceSlotFileKey as R, saveConfig as S, upsertProject as T, projectDeviceSlots as U, parseDeviceSlotKey as V, removeSlotDevice as W, loadConfig$1 as _, clearDevice as a, releaseMetroPort as b, ensureConfig as c, getConfigDir as d, getConfigPath$1 as f, isPathPrefix as g, getRepoSettings as h, clearAndroidBootPending as i, directorySize as j, acquireAvdClaim as k, findEnclosingWorktreeRoot as l, getProjectSettings as m, allMetroPorts as n, clearSupervisor as o, getProject as p, claimMetroPort as r, configCorruptRepair as s, allConsolePortsAndSerials as t, getConcurrencyLimits as u, refuseRelativeStimPaths as v, setSupervisor as w, removeProject as x, releaseAndroidConsolePort as y, deviceSlotKey as z };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { d as getConfigDir } from "./config-0jCcMM0E.mjs";
|
|
2
|
+
import { F as withDirLock } from "./metro-BPeY1YMh.mjs";
|
|
3
|
+
import { mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { createdDevicesFile, createdDevicesLock, readCreatedDevices, readCreatedDevices as readCreatedDevices$1 } from "@stim-cli/core/state";
|
|
5
|
+
//#region src/devices/created-devices.ts
|
|
6
|
+
function update(platform, change) {
|
|
7
|
+
const dir = getConfigDir();
|
|
8
|
+
withDirLock(createdDevicesLock(), () => {
|
|
9
|
+
const current = readCreatedDevices();
|
|
10
|
+
const entries = new Set(current[platform]);
|
|
11
|
+
if (!change(entries)) return;
|
|
12
|
+
const next = {
|
|
13
|
+
version: 1,
|
|
14
|
+
ios: [...current.ios],
|
|
15
|
+
android: [...current.android],
|
|
16
|
+
web: [...current.web],
|
|
17
|
+
[platform]: [...entries]
|
|
18
|
+
};
|
|
19
|
+
const file = createdDevicesFile();
|
|
20
|
+
const tmp = `${file}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
21
|
+
writeFileSync(tmp, `${JSON.stringify(next, null, 2)}\n`);
|
|
22
|
+
try {
|
|
23
|
+
renameSync(tmp, file);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
rmSync(tmp, { force: true });
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
}, { ensureParent: () => mkdirSync(dir, { recursive: true }) });
|
|
29
|
+
}
|
|
30
|
+
function recordCreatedDevice(platform, id) {
|
|
31
|
+
update(platform, (entries) => entries.size !== entries.add(id).size);
|
|
32
|
+
}
|
|
33
|
+
function forgetCreatedDevice(platform, id) {
|
|
34
|
+
update(platform, (entries) => entries.delete(id));
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { readCreatedDevices$1 as n, recordCreatedDevice as r, forgetCreatedDevice as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
2
|
-
import { y as repoRoot } from "./worktree-
|
|
2
|
+
import { y as repoRoot } from "./worktree-DeBQSVtR.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { dirname, join, relative } from "node:path";
|
|
5
5
|
//#region src/dependency-state.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
2
|
-
import { a as spawnDeclared } from "./spawn-claims-
|
|
2
|
+
import { a as spawnDeclared } from "./spawn-claims-PT8aQpCa.mjs";
|
|
3
3
|
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
-
import { d as startBuildHeartbeat, m as bundlerPin, n as HEARTBEAT_INTERVAL_MS } from "./xcode-
|
|
4
|
+
import { d as startBuildHeartbeat, m as bundlerPin, n as HEARTBEAT_INTERVAL_MS } from "./xcode-LM6A8cNZ.mjs";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { delimiter, dirname, join, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { homedir } from "node:os";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as
|
|
2
|
-
import {
|
|
3
|
-
import { r as clockTime } from "./command-output-
|
|
4
|
-
import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-
|
|
5
|
-
import {
|
|
6
|
-
import { d as waitForDevice, s as parseDeviceWait, t as selectFromPool } from "./device-pool-
|
|
7
|
-
import { a as iosPoolCandidates, c as listIosDevices, o as iosPoolNoCandidatesRefusal, s as isWirelessIosDevice, u as resolveIosPhysicalDevice } from "./ios-device-
|
|
1
|
+
import { H as parseDeviceSlotOption, U as projectDeviceSlots, p as getProject, z as deviceSlotKey } from "./config-0jCcMM0E.mjs";
|
|
2
|
+
import { a as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-DGeclhvO.mjs";
|
|
3
|
+
import { r as clockTime } from "./command-output-BIL7rlX7.mjs";
|
|
4
|
+
import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-CL9dZf73.mjs";
|
|
5
|
+
import { D as listAdbDevices, H as physicalDeviceModel, J as resolvePhysicalDevice, M as memoizeEmulatorProbe, T as getAvdNameForSerial, W as probeEmulatorSerial, o as androidPoolCandidates, s as androidPoolNoCandidatesRefusal } from "./android-qx_31wJo.mjs";
|
|
6
|
+
import { d as waitForDevice, s as parseDeviceWait, t as selectFromPool } from "./device-pool-MuoiyRcu.mjs";
|
|
7
|
+
import { a as iosPoolCandidates, c as listIosDevices, o as iosPoolNoCandidatesRefusal, s as isWirelessIosDevice, u as resolveIosPhysicalDevice } from "./ios-device-BW-t_Lkv.mjs";
|
|
8
8
|
import chalk from "chalk";
|
|
9
9
|
//#region src/commands/device.ts
|
|
10
10
|
const DEFAULT_FOR = "5m";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as ownership_claim_exports, G as validateDeviceSlot, V as parseDeviceSlotKey, d as getConfigDir, z as deviceSlotKey } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
3
|
-
import { r as register } from "./cache-manifest-
|
|
4
|
-
import {
|
|
5
|
-
import { n as declareSpawnsOn, o as stopDeclaringSpawnsOn } from "./spawn-claims-
|
|
6
|
-
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-
|
|
3
|
+
import { r as register } from "./cache-manifest-DWPF4RKJ.mjs";
|
|
4
|
+
import { C as sharedBuildCache, F as withDirLock, b as writeWorkspaceState, h as readWorkspaceState, m as clearWorkspaceStateKeys, v as withWorkspaceStateLock } from "./metro-BPeY1YMh.mjs";
|
|
5
|
+
import { n as declareSpawnsOn, o as stopDeclaringSpawnsOn } from "./spawn-claims-PT8aQpCa.mjs";
|
|
6
|
+
import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-BIL7rlX7.mjs";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { existsSync as existsSync$1, mkdirSync as mkdirSync$1, readFileSync as readFileSync$1, rmSync as rmSync$1, writeFileSync as writeFileSync$1 } from "fs";
|
|
9
9
|
import { join } from "path";
|
|
10
10
|
import { artifactIn, buildCacheKey, resolveArtifact, storeArtifact } from "@stim-cli/core";
|
|
11
11
|
import { join as join$1 } from "node:path";
|
|
12
12
|
import { createHash, randomBytes } from "node:crypto";
|
|
13
|
+
import { isDeepStrictEqual } from "util";
|
|
13
14
|
import * as expoFingerprint from "@expo/fingerprint";
|
|
14
15
|
import { buildUploadTimeoutMs } from "@stim-cli/cache";
|
|
15
16
|
const ASSET_MANIFEST_FILE = "assets-manifest.json";
|
|
@@ -388,6 +389,54 @@ async function refingerprintAfterMutation({ projectRoot, platform, previousHash,
|
|
|
388
389
|
moved: computed.hash !== previousHash
|
|
389
390
|
};
|
|
390
391
|
}
|
|
392
|
+
const CONFIG_INPUT_REASONS = /* @__PURE__ */ new Set([
|
|
393
|
+
"expoConfig",
|
|
394
|
+
"expoConfigPlugins",
|
|
395
|
+
"expoConfigExternalFile"
|
|
396
|
+
]);
|
|
397
|
+
function writtenByBuild(name, platform) {
|
|
398
|
+
return name === platform || name.startsWith(`${platform}/`) || name.startsWith("node_modules/") || name.includes("/node_modules/");
|
|
399
|
+
}
|
|
400
|
+
const PREBUILD_WRITTEN_IDS = [["ios", "bundleIdentifier"], ["android", "package"]];
|
|
401
|
+
function expoConfigContents(sources) {
|
|
402
|
+
const source = sources.find((s) => s.type === "contents" && s.id === "expoConfig");
|
|
403
|
+
if (source?.type !== "contents") return null;
|
|
404
|
+
try {
|
|
405
|
+
const parsed = JSON.parse(String(source.contents));
|
|
406
|
+
return parsed && typeof parsed === "object" ? parsed : null;
|
|
407
|
+
} catch {
|
|
408
|
+
return null;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function onlyPrebuildIdsAdded(before, after) {
|
|
412
|
+
const previous = expoConfigContents(before);
|
|
413
|
+
const current = expoConfigContents(after);
|
|
414
|
+
if (!previous || !current) return false;
|
|
415
|
+
const stripped = { ...current };
|
|
416
|
+
for (const [section, key] of PREBUILD_WRITTEN_IDS) {
|
|
417
|
+
const was = previous[section];
|
|
418
|
+
const now = stripped[section];
|
|
419
|
+
if (now?.[key] === void 0 || was?.[key] !== void 0) continue;
|
|
420
|
+
const rest = { ...now };
|
|
421
|
+
delete rest[key];
|
|
422
|
+
if (was === void 0 && Object.keys(rest).length === 0) delete stripped[section];
|
|
423
|
+
else stripped[section] = rest;
|
|
424
|
+
}
|
|
425
|
+
return isDeepStrictEqual(previous, stripped);
|
|
426
|
+
}
|
|
427
|
+
function configInputsChanged(before, after, { prebuildRan }) {
|
|
428
|
+
return compareSourceLists(before, after).filter((change) => change.reasons.some((reason) => CONFIG_INPUT_REASONS.has(reason))).filter((change) => !(prebuildRan && change.name === "expoConfig" && onlyPrebuildIdsAdded(before, after))).map((change) => change.name);
|
|
429
|
+
}
|
|
430
|
+
function inputsChangedDuringBuild({ platform, lookup, prebuildRan, compiled, current }) {
|
|
431
|
+
const names = new Set(configInputsChanged(lookup, current, { prebuildRan }));
|
|
432
|
+
for (const change of compareSourceLists(compiled, current)) if (!writtenByBuild(change.name, platform)) names.add(change.name);
|
|
433
|
+
return [...names];
|
|
434
|
+
}
|
|
435
|
+
function changedDuringBuildLine(changed) {
|
|
436
|
+
const shown = changed.slice(0, 3);
|
|
437
|
+
const more = changed.length > shown.length ? `, and ${changed.length - shown.length} more` : "";
|
|
438
|
+
return `${shown.join(", ")}${more} changed while the build ran, so the artifact may not match its key; the build will be installed but not cached`;
|
|
439
|
+
}
|
|
391
440
|
function untrackedNativeFiles({ projectRoot, exec = getExecutor() }) {
|
|
392
441
|
let out;
|
|
393
442
|
try {
|
|
@@ -1055,4 +1104,4 @@ function withHolderLock(io, root, fn) {
|
|
|
1055
1104
|
return io.withHolderLock ? io.withHolderLock(root, fn) : fn();
|
|
1056
1105
|
}
|
|
1057
1106
|
//#endregion
|
|
1058
|
-
export {
|
|
1107
|
+
export { providerDownloadPath as A, captureAssetManifest as B, diffFingerprintSources as C, fingerprintProject as D, fingerprintDiffRecord as E, storedAssetManifest as F, readAssetManifest as H, storedSources as I, untrackedMissLine as L, refingerprintAfterMutation as M, resolveBuild as N, inputsChangedDuringBuild as O, storeBuild as P, untrackedNativeFiles as R, configInputsChanged as S, filesystemBuildCapability as T, compareAssetManifests as V, waitForBuild as _, parseLease as a, buildCacheKey as b, raiseLease as c, removeExpiredLease as d, selectPoolDevice as f, releaseBuildLock as g, listBuildLocks as h, listLeaseFiles as i, providerUploadOutcome as j, prepareProviderDownloadDir as k, releaseRunLease as l, acquireBuildLock as m, fileLeaseIo as n, parseLeaseDuration as o, takeLease as p, leaseIsExpired as r, parseWorkspaceLeases as s, deviceLeasePath as t, releaseWorkspaceLeases as u, waitForSharedBuild as v, entryDir as w, changedDuringBuildLine as x, artifactIn as y, assetDiffReason as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as formatElapsed, r as clockTime } from "./command-output-
|
|
3
|
-
import { a as parseLease, c as raiseLease, f as selectPoolDevice, l as releaseRunLease, n as fileLeaseIo, p as takeLease, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-
|
|
4
|
-
import { a as VERIFY_TIMEOUT_MS, p as APP_READINESS_TIMEOUT_MS } from "./launch-verify-
|
|
1
|
+
import { z as deviceSlotKey } from "./config-0jCcMM0E.mjs";
|
|
2
|
+
import { a as formatElapsed, r as clockTime } from "./command-output-BIL7rlX7.mjs";
|
|
3
|
+
import { a as parseLease, c as raiseLease, f as selectPoolDevice, l as releaseRunLease, n as fileLeaseIo, p as takeLease, r as leaseIsExpired, t as deviceLeasePath } from "./device-lease-CL9dZf73.mjs";
|
|
4
|
+
import { a as VERIFY_TIMEOUT_MS, p as APP_READINESS_TIMEOUT_MS } from "./launch-verify-CuJaBpEa.mjs";
|
|
5
5
|
//#region src/engine/device-lease-run.ts
|
|
6
6
|
const LEASE_STEP_FLOOR_MS = 6e4;
|
|
7
7
|
const DEBUG_VERIFY_STEP_MS = VERIFY_TIMEOUT_MS + APP_READINESS_TIMEOUT_MS;
|