stim 1.4.0 → 1.5.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 -3
- package/dist/{android-BkM4qTaN.mjs → android-DJWiTBkz.mjs} +5 -5
- package/dist/{android-cas-BjLRZyks.mjs → android-cas-CSS8gjR7.mjs} +5 -5
- package/dist/{android-BTR1KTMP.mjs → android-sobvO9ia.mjs} +22 -22
- package/dist/{build-slots-D6sDzOe-.mjs → build-slots-CuPszJDu.mjs} +1 -1
- package/dist/{cache-manifest-D02TpYjA.mjs → cache-manifest-uoOKhgUD.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cli.mjs +14 -14
- package/dist/collector-run.mjs +3 -3
- package/dist/{config-6vdGngKa.mjs → config-DMP7L7H6.mjs} +1 -1
- package/dist/{dependency-state-BMirHEPD.mjs → dependency-state-CTL8A9p3.mjs} +1 -1
- package/dist/{deps-Ck4wuTwa.mjs → deps-BAGOnrc7.mjs} +1 -1
- package/dist/{dev-client-Cd0v7iZk.mjs → dev-client-BoifdqkU.mjs} +9 -9
- package/dist/{device-CKXLnRRb.mjs → device-BUw4JBuH.mjs} +5 -5
- package/dist/{device-CMDFzx7C.mjs → device-DvKJ454A.mjs} +8 -8
- package/dist/{device-lease-DDJr85OK.mjs → device-lease-r7yEQ1R8.mjs} +3 -3
- package/dist/{device-pool-DJvbIBGW.mjs → device-pool-DU4FQKp5.mjs} +2 -2
- package/dist/{device-remote-CMfHhoc8.mjs → device-remote-BTUqbl0i.mjs} +6 -6
- package/dist/{doctor-B_mfURdt.mjs → doctor-Di_B26uh.mjs} +25 -168
- package/dist/{error-diagnostics-_VmkqRZo.mjs → error-diagnostics-CTePWAzW.mjs} +6 -6
- package/dist/{gc-0AyxmECv.mjs → gc-C20dWw_8.mjs} +12 -12
- package/dist/{guide-CGxdmQ0K.mjs → guide-sAnoty2y.mjs} +26 -14
- package/dist/guide-status-BF6RsJJp.mjs +271 -0
- package/dist/{ios-CtmGLx3X.mjs → ios-BdpkncL6.mjs} +21 -21
- package/dist/{logs-BF3qPA7w.mjs → logs-BfQdIhiF.mjs} +4 -4
- package/dist/{metro-DFLmaVz8.mjs → metro-ato6ef3J.mjs} +3 -3
- package/dist/{named-ports-BO7Zpjp0.mjs → named-ports-DH9SXd0f.mjs} +3 -3
- package/dist/{ownership-BvSpZVBk.mjs → ownership-CD_XnpDu.mjs} +3 -3
- package/dist/{ownership-C08Yzrp7.mjs → ownership-CVY9cqCr.mjs} +3 -3
- package/dist/{ports-BiKqP92J.mjs → ports-A6uTJSPj.mjs} +3 -3
- package/dist/{ports-ClqG8GPt.mjs → ports-BZprTJRa.mjs} +1 -1
- package/dist/{project-CBFCwnN5.mjs → project-B_SDt4ip.mjs} +2 -2
- package/dist/{reclaim-DpDVo-AP.mjs → reclaim-C_rB25f4.mjs} +10 -10
- package/dist/{reload-ByTqg6ZI.mjs → reload-CYBJbJfI.mjs} +6 -6
- package/dist/{server-bare-Buk-k8tI.mjs → server-bare-H3pAhbMs.mjs} +11 -32
- package/dist/server-expo-CSwUVYOa.mjs +2 -0
- package/dist/{server-expo-D4P7iTvf.mjs → server-expo-Ds8_mfng.mjs} +6 -14
- package/dist/{settings-DwfltIXQ.mjs → settings-kO2ZqIKy.mjs} +2 -2
- package/dist/{slot-launch-DeKen9e5.mjs → slot-launch-BpHiHH6A.mjs} +3 -3
- package/dist/{start-BpKUHcU_.mjs → start-DiEfqEWk.mjs} +16 -20
- package/dist/{state-CDbvmZdt.mjs → state-CnWzvCWP.mjs} +2 -2
- package/dist/{stats-k5qMjyxo.mjs → stats-DHrO0frH.mjs} +3 -3
- package/dist/{stats-C59QLKm2.mjs → stats-Fo9ACIv7.mjs} +1 -1
- package/dist/{status-Y2ij3dm6.mjs → status-J5LAXpag.mjs} +14 -12
- package/dist/{stop-_P2OQwmZ.mjs → stop-0jJNahwN.mjs} +11 -11
- package/dist/{stop-vKmmxhea.mjs → stop-CM1fejKW.mjs} +2 -2
- package/dist/supervisor-run.d.mts +4 -1
- package/dist/supervisor-run.mjs +18 -10
- package/dist/{teardown-KsPpvldq.mjs → teardown-CAVcWeRD.mjs} +5 -5
- package/dist/{workspace-process-lock-UEIrvZMJ.mjs → workspace-process-lock-Bz19_R9R.mjs} +1 -1
- package/dist/{workspace-state-Do1e2mOH.mjs → workspace-state-WVwWw_hB.mjs} +1 -1
- package/dist/{worktree-BvcAIMdJ.mjs → worktree-CeUKDAQw.mjs} +25 -20
- package/dist/{worktree-DWNx4tUg.mjs → worktree-DJnBbQZ9.mjs} +49 -22
- package/dist/{xcode-D9tVItl-.mjs → xcode-BqDeRkpT.mjs} +4 -4
- package/package.json +5 -5
- package/shim/expo-metro-config.cjs +11 -17
- package/dist/server-expo-Dho5Raiw.mjs +0 -2
- package/shim/metro-cache-generation.cjs +0 -20
- package/shim/metro-cache-generation.d.cts +0 -5
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { D as withDirLock, F as deviceSlotPlatforms, P as deviceSlotKey, f as getProject } from "./config-
|
|
3
|
-
import { r as readWorkspaceState } from "./workspace-state-
|
|
4
|
-
import { d as readWorkspaceLaunches } from "./state-
|
|
2
|
+
import { D as withDirLock, F as deviceSlotPlatforms, P as deviceSlotKey, f as getProject } from "./config-DMP7L7H6.mjs";
|
|
3
|
+
import { r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
|
|
4
|
+
import { d as readWorkspaceLaunches } from "./state-CnWzvCWP.mjs";
|
|
5
5
|
import { n as deviceConsoleLevel } from "./ios-device-D3pzTKQE.mjs";
|
|
6
|
-
import { i as resolveProjectMetro } from "./metro-
|
|
6
|
+
import { i as resolveProjectMetro } from "./metro-ato6ef3J.mjs";
|
|
7
7
|
import { n as parseLogcatLine, t as androidClockOffset } from "./android-BW8i_YxU.mjs";
|
|
8
8
|
import { _ as launchErrorPreview } from "./command-output-BuIb_ZOI.mjs";
|
|
9
|
-
import { n as androidHome } from "./android-
|
|
10
|
-
import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-
|
|
9
|
+
import { n as androidHome } from "./android-DJWiTBkz.mjs";
|
|
10
|
+
import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-r7yEQ1R8.mjs";
|
|
11
11
|
import { l as readLogRecords, t as attachExpoErrorContext } from "./logs-query-Cdp5aaCH.mjs";
|
|
12
12
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
13
13
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { A as isOnMountedVolume, C as withConfigLock, E as ownership_claim_exports, F as deviceSlotPlatforms, L as projectDeviceSlots, M as volumeRootFor, O as directorySize, f as getProject, g as loadConfig, i as clearDevice, j as listMountedVolumes, k as formatBytes, u as getConfigDir, v as removeProject } from "./config-
|
|
3
|
-
import { i as registeredCaches } from "./cache-manifest-
|
|
4
|
-
import { h as workspaceDir, y as workspaceStateFile } from "./workspace-state-
|
|
5
|
-
import {
|
|
6
|
-
import { a as findProjectRoot, i as detectIsExpo } from "./project-
|
|
2
|
+
import { A as isOnMountedVolume, C as withConfigLock, E as ownership_claim_exports, F as deviceSlotPlatforms, L as projectDeviceSlots, M as volumeRootFor, O as directorySize, f as getProject, g as loadConfig, i as clearDevice, j as listMountedVolumes, k as formatBytes, u as getConfigDir, v as removeProject } from "./config-DMP7L7H6.mjs";
|
|
3
|
+
import { i as registeredCaches } from "./cache-manifest-uoOKhgUD.mjs";
|
|
4
|
+
import { h as workspaceDir, y as workspaceStateFile } from "./workspace-state-WVwWw_hB.mjs";
|
|
5
|
+
import { g as repoRoot, s as gitCommonDir } from "./worktree-DJnBbQZ9.mjs";
|
|
6
|
+
import { a as findProjectRoot, i as detectIsExpo } from "./project-B_SDt4ip.mjs";
|
|
7
7
|
import { m as shortUdid, o as formatLongDuration, u as plural } from "./command-output-BuIb_ZOI.mjs";
|
|
8
|
-
import { B as listBuildLocks, S as listOrphanedAvdDirectories, T as ownedAvdDirectory, b as listAvds } from "./android-
|
|
9
|
-
import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-
|
|
10
|
-
import { S as resolveEasCliBin, a as POOL_SETTING_REMEDY, i as teardownParkedIosSim, l as parkedMaxSetting, n as teardownOwnedIosSim, r as teardownParkedAvd, s as dropParked, t as teardownOwnedAvd, u as readParked } from "./teardown-
|
|
8
|
+
import { B as listBuildLocks, S as listOrphanedAvdDirectories, T as ownedAvdDirectory, b as listAvds } from "./android-DJWiTBkz.mjs";
|
|
9
|
+
import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-kO2ZqIKy.mjs";
|
|
10
|
+
import { S as resolveEasCliBin, a as POOL_SETTING_REMEDY, i as teardownParkedIosSim, l as parkedMaxSetting, n as teardownOwnedIosSim, r as teardownParkedAvd, s as dropParked, t as teardownOwnedAvd, u as readParked } from "./teardown-CAVcWeRD.mjs";
|
|
11
11
|
import { d as listIosDeviceTypes, g as parseRuntimeVersion, u as listAllIosSims } from "./ios-Deh5js5V.mjs";
|
|
12
|
-
import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-
|
|
13
|
-
import { n as listBuildSlots } from "./build-slots-
|
|
14
|
-
import { C as verifyStoppedSession, S as stopSessionArgs, _ as inspectSessionForTeardown, d as withEasProjectLock, f as easMachineStateRoot, g as getSessionArgs, h as findOrphanedOwnedSessions, m as removeEasSessionClaim, p as readEasSessionLedger, u as withRemoteSessionLock, v as isDefinitiveMissingSessionError, x as parseSessionListPage, y as listOwnedSessionsArgs } from "./device-remote-
|
|
15
|
-
import { n as reclaimProject, t as describeDereferenced } from "./reclaim-
|
|
12
|
+
import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-r7yEQ1R8.mjs";
|
|
13
|
+
import { n as listBuildSlots } from "./build-slots-CuPszJDu.mjs";
|
|
14
|
+
import { C as verifyStoppedSession, S as stopSessionArgs, _ as inspectSessionForTeardown, d as withEasProjectLock, f as easMachineStateRoot, g as getSessionArgs, h as findOrphanedOwnedSessions, m as removeEasSessionClaim, p as readEasSessionLedger, u as withRemoteSessionLock, v as isDefinitiveMissingSessionError, x as parseSessionListPage, y as listOwnedSessionsArgs } from "./device-remote-BTUqbl0i.mjs";
|
|
15
|
+
import { n as reclaimProject, t as describeDereferenced } from "./reclaim-C_rB25f4.mjs";
|
|
16
16
|
import { InvalidArgumentError } from "commander";
|
|
17
17
|
import { existsSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from "fs";
|
|
18
18
|
import { homedir, tmpdir } from "os";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
|
|
2
|
+
import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-kO2ZqIKy.mjs";
|
|
3
|
+
import { t as guideStatus } from "./guide-status-BF6RsJJp.mjs";
|
|
2
4
|
import chalk from "chalk";
|
|
3
5
|
//#endregion
|
|
4
6
|
//#region src/guide/index.ts
|
|
@@ -65,8 +67,12 @@ If warm fails or reports incomplete, resolve the reported failure first.
|
|
|
65
67
|
A warm that cannot record its ownership claim refuses before copying. Follow
|
|
66
68
|
the printed remedy and keep concurrent runs on the same STIM_HOME.
|
|
67
69
|
|
|
68
|
-
Before native worktree work, run doctor for the platform in scope.
|
|
69
|
-
the
|
|
70
|
+
Before native worktree work, run doctor for the platform in scope. The STATUS
|
|
71
|
+
block at the top of this topic says when it is due here: never run in this
|
|
72
|
+
checkout, older than seven days, or run under another Stim version. No block
|
|
73
|
+
means doctor is current and Stim is up to date; the same block names a newer
|
|
74
|
+
Stim release when one exists. Doctor checks the source
|
|
75
|
+
checkout from a linked worktree. Fix relevant findings and inspect the
|
|
70
76
|
upstream gap; in the single-checkout workflow those seed findings do not
|
|
71
77
|
appear. It also prints the running CLI version and the stim installation
|
|
72
78
|
resolved from PATH. If that resolved installation is older than another one,
|
|
@@ -153,7 +159,7 @@ RULES DURING THE LOOP
|
|
|
153
159
|
change does not need one.
|
|
154
160
|
- For stale Metro transforms or file-map state, use stim start --reset-cache.
|
|
155
161
|
It restarts only this app's verified owned Metro, preserving devices and other
|
|
156
|
-
apps' caches. See guide lifecycle for reset scope
|
|
162
|
+
apps' caches. See guide lifecycle for reset scope.
|
|
157
163
|
- Reload is not part of the normal workflow. Use stim reload on an owned local
|
|
158
164
|
simulator or emulator when an error screen remains after the fix, and on
|
|
159
165
|
Android after a failed first bundle load. It reloads JavaScript and never
|
|
@@ -2425,12 +2431,11 @@ a seed belongs to this workflow.
|
|
|
2425
2431
|
|
|
2426
2432
|
# If stale Metro transforms or file-map state require recovery:
|
|
2427
2433
|
stim start --reset-cache
|
|
2428
|
-
# Restarts only this app's verified owned Metro, retaining its port/devices
|
|
2429
|
-
#
|
|
2430
|
-
#
|
|
2431
|
-
#
|
|
2432
|
-
#
|
|
2433
|
-
# managers must honor Metro's fileMapCacheDirectory for file-map invalidation.
|
|
2434
|
+
# Restarts only this app's verified owned Metro, retaining its port/devices,
|
|
2435
|
+
# with Metro's own reset (resetCache on a bare server, expo start --clear).
|
|
2436
|
+
# That clears every store in the app's Metro config, including this app's
|
|
2437
|
+
# shared transform store, so other worktrees of the SAME app rebuild their
|
|
2438
|
+
# transforms too. Other apps and native build caches are unchanged.
|
|
2434
2439
|
|
|
2435
2440
|
# 3. Owned device booted, native inputs fingerprinted, cached build
|
|
2436
2441
|
# installed (or built), app launched wired to port 8082, device-log
|
|
@@ -4819,10 +4824,17 @@ function renderIndex(version) {
|
|
|
4819
4824
|
lines.push("", "Read one with: stim guide <topic> (sectioned topics: stim guide <topic> <section>)");
|
|
4820
4825
|
return lines.join("\n");
|
|
4821
4826
|
}
|
|
4822
|
-
function guideCommand(program, version) {
|
|
4823
|
-
|
|
4827
|
+
function guideCommand(program, version, status = (running) => guideStatus({
|
|
4828
|
+
projectRoot: findProjectRoot(process.cwd()),
|
|
4829
|
+
running
|
|
4830
|
+
})) {
|
|
4831
|
+
program.command("guide [topic] [section]").description("Print reference documentation for THIS version of Stim (topics: " + topicNames().join(", ") + "). A topic with sections prints its section index; name a section to print only it, e.g. `stim guide errors STIM_NO_METRO` or `stim guide lifecycle builds`. Generated by the binary, so it cannot drift from the installed CLI.").action(async (topic, section) => {
|
|
4832
|
+
const withStatus = async (body) => {
|
|
4833
|
+
const block = await status(version);
|
|
4834
|
+
return block ? `${block}\n\n${body}` : body;
|
|
4835
|
+
};
|
|
4824
4836
|
if (!topic) {
|
|
4825
|
-
console.log(renderIndex(version));
|
|
4837
|
+
console.log(await withStatus(renderIndex(version)));
|
|
4826
4838
|
return;
|
|
4827
4839
|
}
|
|
4828
4840
|
const body = renderTopic(topic);
|
|
@@ -4834,7 +4846,7 @@ function guideCommand(program, version) {
|
|
|
4834
4846
|
process.exit(1);
|
|
4835
4847
|
}
|
|
4836
4848
|
if (!section) {
|
|
4837
|
-
console.log(body);
|
|
4849
|
+
console.log(topic === "agent" ? await withStatus(body) : body);
|
|
4838
4850
|
return;
|
|
4839
4851
|
}
|
|
4840
4852
|
const index = renderSectionIndex(topic);
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
+
import { S as upsertProject, f as getProject, u as getConfigDir } from "./config-DMP7L7H6.mjs";
|
|
3
|
+
import { accessSync, constants, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { delimiter, join, resolve } from "node:path";
|
|
5
|
+
//#region src/stim-installations.ts
|
|
6
|
+
const VERSION_OUTPUT_LIMIT = 4096;
|
|
7
|
+
function parsedVersion(version) {
|
|
8
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(version);
|
|
9
|
+
if (!match) return null;
|
|
10
|
+
const core = [
|
|
11
|
+
match[1],
|
|
12
|
+
match[2],
|
|
13
|
+
match[3]
|
|
14
|
+
];
|
|
15
|
+
if (core.some((part) => part.length > 1 && part.startsWith("0"))) return null;
|
|
16
|
+
const prereleaseParts = match[4]?.split(".");
|
|
17
|
+
if (prereleaseParts?.some((part) => !part || /^\d+$/.test(part) && part.length > 1 && part.startsWith("0"))) return null;
|
|
18
|
+
const prerelease = prereleaseParts?.map((part) => /^\d+$/.test(part) ? Number(part) : part);
|
|
19
|
+
return {
|
|
20
|
+
core: core.map(Number),
|
|
21
|
+
prerelease: prerelease ?? null
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function compareStimVersions(left, right) {
|
|
25
|
+
const a = parsedVersion(left);
|
|
26
|
+
const b = parsedVersion(right);
|
|
27
|
+
if (!a || !b) return null;
|
|
28
|
+
for (let index = 0; index < a.core.length; index += 1) {
|
|
29
|
+
const difference = (a.core[index] ?? 0) - (b.core[index] ?? 0);
|
|
30
|
+
if (difference !== 0) return difference;
|
|
31
|
+
}
|
|
32
|
+
if (!a.prerelease && !b.prerelease) return 0;
|
|
33
|
+
if (!a.prerelease) return 1;
|
|
34
|
+
if (!b.prerelease) return -1;
|
|
35
|
+
for (let index = 0; index < Math.max(a.prerelease.length, b.prerelease.length); index += 1) {
|
|
36
|
+
const x = a.prerelease[index];
|
|
37
|
+
const y = b.prerelease[index];
|
|
38
|
+
if (x === void 0) return -1;
|
|
39
|
+
if (y === void 0) return 1;
|
|
40
|
+
if (x === y) continue;
|
|
41
|
+
if (typeof x === "number" && typeof y === "number") return x - y;
|
|
42
|
+
if (typeof x === "number") return -1;
|
|
43
|
+
if (typeof y === "number") return 1;
|
|
44
|
+
return x < y ? -1 : 1;
|
|
45
|
+
}
|
|
46
|
+
return 0;
|
|
47
|
+
}
|
|
48
|
+
function parseStimVersionOutput(output) {
|
|
49
|
+
const version = output?.split("\n")[0]?.trim() ?? "";
|
|
50
|
+
return parsedVersion(version) ? version.replace(/^v/, "") : null;
|
|
51
|
+
}
|
|
52
|
+
function executableNames(platform) {
|
|
53
|
+
return platform === "win32" ? [
|
|
54
|
+
"stim.cmd",
|
|
55
|
+
"stim.exe",
|
|
56
|
+
"stim"
|
|
57
|
+
] : ["stim"];
|
|
58
|
+
}
|
|
59
|
+
function stimExecutablePaths(pathValue, { platform = process.platform, cwd = process.cwd() } = {}) {
|
|
60
|
+
const found = [];
|
|
61
|
+
const seen = /* @__PURE__ */ new Set();
|
|
62
|
+
for (const entry of pathValue.split(delimiter)) {
|
|
63
|
+
const directory = resolve(cwd, entry || ".");
|
|
64
|
+
for (const name of executableNames(platform)) {
|
|
65
|
+
const path = join(directory, name);
|
|
66
|
+
try {
|
|
67
|
+
accessSync(path, platform === "win32" ? constants.F_OK : constants.X_OK);
|
|
68
|
+
if (!statSync(path).isFile()) continue;
|
|
69
|
+
const realPath = realpathSync(path);
|
|
70
|
+
if (seen.has(realPath)) continue;
|
|
71
|
+
seen.add(realPath);
|
|
72
|
+
found.push({
|
|
73
|
+
path,
|
|
74
|
+
realPath
|
|
75
|
+
});
|
|
76
|
+
} catch {}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return found;
|
|
80
|
+
}
|
|
81
|
+
function canonicalPath(path) {
|
|
82
|
+
if (!path) return null;
|
|
83
|
+
try {
|
|
84
|
+
return realpathSync(resolve(path));
|
|
85
|
+
} catch {
|
|
86
|
+
return resolve(path);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function analyzeStimVersions(runningVersion, runningPath, installations) {
|
|
90
|
+
const candidates = [runningVersion, ...installations.map((entry) => entry.version)];
|
|
91
|
+
const versions = [...new Set(candidates)].filter((version) => version !== null && compareStimVersions(version, version) !== null).toSorted((left, right) => -(compareStimVersions(left, right) ?? 0));
|
|
92
|
+
const highestVersion = versions[0] ?? null;
|
|
93
|
+
const resolved = installations[0] ?? null;
|
|
94
|
+
return {
|
|
95
|
+
runningVersion,
|
|
96
|
+
runningPath,
|
|
97
|
+
resolved,
|
|
98
|
+
installations,
|
|
99
|
+
versions,
|
|
100
|
+
highestVersion,
|
|
101
|
+
resolvedIsOlder: Boolean(resolved?.version && highestVersion && (compareStimVersions(resolved.version, highestVersion) ?? 0) < 0)
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function probeStimVersion(path, timeoutMs) {
|
|
105
|
+
return new Promise((resolveProbe) => {
|
|
106
|
+
let settled = false;
|
|
107
|
+
let output = "";
|
|
108
|
+
const finish = (version) => {
|
|
109
|
+
if (settled) return;
|
|
110
|
+
settled = true;
|
|
111
|
+
clearTimeout(timer);
|
|
112
|
+
resolveProbe(version);
|
|
113
|
+
};
|
|
114
|
+
let child;
|
|
115
|
+
try {
|
|
116
|
+
child = getExecutor().spawn(path, ["--version"], {
|
|
117
|
+
stdio: [
|
|
118
|
+
"ignore",
|
|
119
|
+
"pipe",
|
|
120
|
+
"ignore"
|
|
121
|
+
],
|
|
122
|
+
detached: process.platform !== "win32"
|
|
123
|
+
});
|
|
124
|
+
} catch {
|
|
125
|
+
resolveProbe(null);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const timer = setTimeout(() => {
|
|
129
|
+
try {
|
|
130
|
+
if (process.platform !== "win32" && child.pid) process.kill(-child.pid, "SIGKILL");
|
|
131
|
+
else child.kill("SIGKILL");
|
|
132
|
+
} catch {}
|
|
133
|
+
finish(null);
|
|
134
|
+
}, timeoutMs);
|
|
135
|
+
child.stdout?.on("data", (chunk) => {
|
|
136
|
+
if (output.length < VERSION_OUTPUT_LIMIT) output += String(chunk).slice(0, VERSION_OUTPUT_LIMIT - output.length);
|
|
137
|
+
});
|
|
138
|
+
child.on("error", () => finish(null));
|
|
139
|
+
child.on("close", (code) => finish(code === 0 ? parseStimVersionOutput(output) : null));
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
async function inspectStimVersions(runningVersion, { pathValue = process.env.PATH ?? "", runningPath = process.argv[1], probeTimeoutMs = 5e3 } = {}) {
|
|
143
|
+
const paths = stimExecutablePaths(pathValue);
|
|
144
|
+
const versions = await Promise.all(paths.map((entry) => probeStimVersion(entry.path, probeTimeoutMs)));
|
|
145
|
+
const installations = paths.map((entry, index) => ({
|
|
146
|
+
path: entry.path,
|
|
147
|
+
realPath: entry.realPath,
|
|
148
|
+
version: versions[index] ?? null
|
|
149
|
+
}));
|
|
150
|
+
return analyzeStimVersions(runningVersion, canonicalPath(runningPath), installations);
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/guide-status.ts
|
|
154
|
+
const DAY_MS = 864e5;
|
|
155
|
+
const DOCTOR_STALE_MS = 7 * DAY_MS;
|
|
156
|
+
const UPDATE_CHECK_INTERVAL_MS = DAY_MS;
|
|
157
|
+
const UPDATE_CHECK_TIMEOUT_MS = 2e3;
|
|
158
|
+
const LATEST_URL = "https://registry.npmjs.org/stim/latest";
|
|
159
|
+
const PLATFORMS = ["ios", "android"];
|
|
160
|
+
function recordDoctorRun(projectRoot, platform, version, now = /* @__PURE__ */ new Date()) {
|
|
161
|
+
const run = {
|
|
162
|
+
at: now.toISOString(),
|
|
163
|
+
version
|
|
164
|
+
};
|
|
165
|
+
try {
|
|
166
|
+
upsertProject(projectRoot, (existing) => {
|
|
167
|
+
const doctorRuns = { ...existing.doctorRuns };
|
|
168
|
+
for (const target of platform ? [platform] : PLATFORMS) doctorRuns[target] = run;
|
|
169
|
+
return { doctorRuns };
|
|
170
|
+
});
|
|
171
|
+
} catch {}
|
|
172
|
+
}
|
|
173
|
+
function doctorDueReason(record, running, now) {
|
|
174
|
+
const at = record ? Date.parse(record.at) : NaN;
|
|
175
|
+
if (!record || Number.isNaN(at)) return "never run";
|
|
176
|
+
if (record.version !== running) return `last run with stim ${record.version}`;
|
|
177
|
+
const age = now.getTime() - at;
|
|
178
|
+
if (age > DOCTOR_STALE_MS) return `last run ${Math.floor(age / DAY_MS)} days ago`;
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
function updateCacheFile() {
|
|
182
|
+
return join(getConfigDir(), "update-check.json");
|
|
183
|
+
}
|
|
184
|
+
function readUpdateCache() {
|
|
185
|
+
try {
|
|
186
|
+
const parsed = JSON.parse(readFileSync(updateCacheFile(), "utf-8"));
|
|
187
|
+
if (typeof parsed?.checkedAt !== "string") return null;
|
|
188
|
+
return {
|
|
189
|
+
checkedAt: parsed.checkedAt,
|
|
190
|
+
latest: typeof parsed.latest === "string" ? parsed.latest : null
|
|
191
|
+
};
|
|
192
|
+
} catch {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
function writeUpdateCache(cache) {
|
|
197
|
+
const target = updateCacheFile();
|
|
198
|
+
const tmp = `${target}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
199
|
+
try {
|
|
200
|
+
mkdirSync(getConfigDir(), { recursive: true });
|
|
201
|
+
writeFileSync(tmp, `${JSON.stringify(cache)}\n`);
|
|
202
|
+
renameSync(tmp, target);
|
|
203
|
+
} catch {
|
|
204
|
+
try {
|
|
205
|
+
unlinkSync(tmp);
|
|
206
|
+
} catch {}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function fetchLatest(fetchImpl) {
|
|
210
|
+
const res = await fetchImpl(LATEST_URL, { signal: AbortSignal.timeout(UPDATE_CHECK_TIMEOUT_MS) });
|
|
211
|
+
if (!res.ok) return null;
|
|
212
|
+
const body = await res.json();
|
|
213
|
+
return typeof body.version === "string" ? body.version : null;
|
|
214
|
+
}
|
|
215
|
+
async function checkForUpdate(running, { now = /* @__PURE__ */ new Date(), fetch: fetchImpl = fetch } = {}) {
|
|
216
|
+
if (process.env.STIM_NO_UPDATE_CHECK) return null;
|
|
217
|
+
const cached = readUpdateCache();
|
|
218
|
+
const checkedAt = cached ? Date.parse(cached.checkedAt) : NaN;
|
|
219
|
+
let latest = cached?.latest ?? null;
|
|
220
|
+
if (Number.isNaN(checkedAt) || now.getTime() - checkedAt > UPDATE_CHECK_INTERVAL_MS) {
|
|
221
|
+
try {
|
|
222
|
+
latest = await fetchLatest(fetchImpl);
|
|
223
|
+
} catch {
|
|
224
|
+
latest = null;
|
|
225
|
+
}
|
|
226
|
+
writeUpdateCache({
|
|
227
|
+
checkedAt: now.toISOString(),
|
|
228
|
+
latest
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
if (!latest) return null;
|
|
232
|
+
const comparison = compareStimVersions(latest, running);
|
|
233
|
+
return comparison !== null && comparison > 0 ? latest : null;
|
|
234
|
+
}
|
|
235
|
+
function renderGuideStatus({ running, doctor, latest }) {
|
|
236
|
+
const lines = [];
|
|
237
|
+
if (doctor.length) {
|
|
238
|
+
const named = doctor.map((due) => `${due.platform} (${due.reason})`).join(" and ");
|
|
239
|
+
const command = doctor.length === 1 ? `stim doctor --platform ${doctor[0]?.platform}` : "stim doctor";
|
|
240
|
+
lines.push(` Doctor is due for ${named}.`, ` Run before native work: ${command}`);
|
|
241
|
+
}
|
|
242
|
+
if (latest) lines.push(` stim ${latest} is available (running ${running}): npm install -g stim@latest`);
|
|
243
|
+
if (!lines.length) return null;
|
|
244
|
+
return ["STATUS", ...lines].join("\n");
|
|
245
|
+
}
|
|
246
|
+
async function guideStatus({ projectRoot, running, now = /* @__PURE__ */ new Date(), fetch: fetchImpl = fetch }) {
|
|
247
|
+
const doctor = [];
|
|
248
|
+
if (projectRoot) {
|
|
249
|
+
let runs = null;
|
|
250
|
+
try {
|
|
251
|
+
runs = getProject(projectRoot)?.doctorRuns ?? {};
|
|
252
|
+
} catch {}
|
|
253
|
+
if (runs) for (const platform of PLATFORMS) {
|
|
254
|
+
const reason = doctorDueReason(runs[platform], running, now);
|
|
255
|
+
if (reason) doctor.push({
|
|
256
|
+
platform,
|
|
257
|
+
reason
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return renderGuideStatus({
|
|
262
|
+
running,
|
|
263
|
+
doctor,
|
|
264
|
+
latest: await checkForUpdate(running, {
|
|
265
|
+
now,
|
|
266
|
+
fetch: fetchImpl
|
|
267
|
+
})
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
export { inspectStimVersions as i, recordDoctorRun as n, compareStimVersions as r, guideStatus as t };
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { E as ownership_claim_exports, P as deviceSlotKey, S as upsertProject, f as getProject, l as getConcurrencyLimits, z as validateDeviceSlot } from "./config-
|
|
2
|
+
import { E as ownership_claim_exports, P as deviceSlotKey, S as upsertProject, f as getProject, l as getConcurrencyLimits, z as validateDeviceSlot } from "./config-DMP7L7H6.mjs";
|
|
3
3
|
import { r as createNdjsonWriter } from "./ndjson-BZwI1NBv.mjs";
|
|
4
|
-
import { _ as workspaceLogsDir, h as workspaceDir, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-
|
|
5
|
-
import {
|
|
6
|
-
import { a as findProjectRoot, c as projectShortcut, i as detectIsExpo, r as detectBundleId, t as appProjectProblem } from "./project-
|
|
7
|
-
import { n as MODE_EXPO, p as writeWorkspaceLaunch, t as MODE_BARE } from "./state-
|
|
8
|
-
import { i as resolveProjectMetro, r as pidExists } from "./metro-
|
|
9
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
4
|
+
import { _ as workspaceLogsDir, h as workspaceDir, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
|
|
5
|
+
import { T as removeTemporaryEntry, g as repoRoot, s as gitCommonDir, w as makeTemporaryDirectory } from "./worktree-DJnBbQZ9.mjs";
|
|
6
|
+
import { a as findProjectRoot, c as projectShortcut, i as detectIsExpo, r as detectBundleId, t as appProjectProblem } from "./project-B_SDt4ip.mjs";
|
|
7
|
+
import { n as MODE_EXPO, p as writeWorkspaceLaunch, t as MODE_BARE } from "./state-CnWzvCWP.mjs";
|
|
8
|
+
import { i as resolveProjectMetro, r as pidExists } from "./metro-ato6ef3J.mjs";
|
|
9
|
+
import { n as verifyCollectorOwnership } from "./ownership-CD_XnpDu.mjs";
|
|
10
10
|
import { _ as launchErrorPreview, c as launchErrorReport, g as stepTimer, h as stepClock, i as formatDuration, l as phaseLine, m as shortUdid, n as appReadinessMessage, p as shortHash } from "./command-output-BuIb_ZOI.mjs";
|
|
11
|
-
import { $ as providerDownloadPath, G as buildCacheKey, J as filesystemBuildCapability, K as describeFingerprintMiss, Q as prepareProviderDownloadDir, R as WAIT_CEILING_MS, U as takeoverLine, V as releaseBuildLock, W as waitForBuild, X as fingerprintDiffSuffix, Y as fingerprintDiffRecord, Z as fingerprintProject, at as untrackedMissLine, et as providerUploadOutcome, nt as resolveBuild, ot as untrackedNativeFiles, rt as storeBuild, tt as refingerprintAfterMutation, z as acquireBuildLock } from "./android-
|
|
12
|
-
import { A as resolveSettings, B as artifactCachePolicy, D as remoteDeviceSettingError, F as tunnelModeSetting, H as optimizationBuildProfile, I as unknownSettingKeys, N as settingShapeErrors, O as remoteIosSetting, R as detectProviders, T as publicUrlSetting, U as resolveOptimizations, _ as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, d as cacheProviderSettingError, f as iosLanHostSetting, g as iosSigningIdentitySha1Setting, h as iosSigningIdentitySettingError, k as resolveCacheProviderConfig, m as iosSigningIdentitySetting, p as iosLanHostSettingError, r as REMOTE_DEVICE_BACKENDS, x as metroWarmupUrlSetting } from "./settings-
|
|
13
|
-
import { C as resolveRemote, S as resolveEasCliBin, _ as exitAfterFlush, a as POOL_SETTING_REMEDY, f as RESOLVE_TIMEOUT_MS, g as easAuthNote, h as checkEasAuth, l as parkedMaxSetting, m as cacheLevel, p as UPLOAD_TIMEOUT_MS, v as isEasAuthFailureText, w as uploadRemote, y as loadProjectProvider } from "./teardown-
|
|
14
|
-
import { _ as easDeviceBuildRemedy, a as swapJsBundle, c as ensureWorkspaceStorageSafely, d as launchOutcomeRecord, f as noMetroMessage, g as warmMetro, h as sleep, l as gateShouldRetry, m as resolveMetroWithRetry, n as pickDevClientScheme, o as needsPrebuild, p as noMetroRemedy, r as schemesFromInfoPlist, s as runPrebuild, t as devClientScheme, u as isPhysicalDeviceRequest, v as isEasBuildFailure, y as resolveEasDevelopmentBuild } from "./dev-client-
|
|
15
|
-
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-
|
|
11
|
+
import { $ as providerDownloadPath, G as buildCacheKey, J as filesystemBuildCapability, K as describeFingerprintMiss, Q as prepareProviderDownloadDir, R as WAIT_CEILING_MS, U as takeoverLine, V as releaseBuildLock, W as waitForBuild, X as fingerprintDiffSuffix, Y as fingerprintDiffRecord, Z as fingerprintProject, at as untrackedMissLine, et as providerUploadOutcome, nt as resolveBuild, ot as untrackedNativeFiles, rt as storeBuild, tt as refingerprintAfterMutation, z as acquireBuildLock } from "./android-DJWiTBkz.mjs";
|
|
12
|
+
import { A as resolveSettings, B as artifactCachePolicy, D as remoteDeviceSettingError, F as tunnelModeSetting, H as optimizationBuildProfile, I as unknownSettingKeys, N as settingShapeErrors, O as remoteIosSetting, R as detectProviders, T as publicUrlSetting, U as resolveOptimizations, _ as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, d as cacheProviderSettingError, f as iosLanHostSetting, g as iosSigningIdentitySha1Setting, h as iosSigningIdentitySettingError, k as resolveCacheProviderConfig, m as iosSigningIdentitySetting, p as iosLanHostSettingError, r as REMOTE_DEVICE_BACKENDS, x as metroWarmupUrlSetting } from "./settings-kO2ZqIKy.mjs";
|
|
13
|
+
import { C as resolveRemote, S as resolveEasCliBin, _ as exitAfterFlush, a as POOL_SETTING_REMEDY, f as RESOLVE_TIMEOUT_MS, g as easAuthNote, h as checkEasAuth, l as parkedMaxSetting, m as cacheLevel, p as UPLOAD_TIMEOUT_MS, v as isEasAuthFailureText, w as uploadRemote, y as loadProjectProvider } from "./teardown-CAVcWeRD.mjs";
|
|
14
|
+
import { _ as easDeviceBuildRemedy, a as swapJsBundle, c as ensureWorkspaceStorageSafely, d as launchOutcomeRecord, f as noMetroMessage, g as warmMetro, h as sleep, l as gateShouldRetry, m as resolveMetroWithRetry, n as pickDevClientScheme, o as needsPrebuild, p as noMetroRemedy, r as schemesFromInfoPlist, s as runPrebuild, t as devClientScheme, u as isPhysicalDeviceRequest, v as isEasBuildFailure, y as resolveEasDevelopmentBuild } from "./dev-client-BoifdqkU.mjs";
|
|
15
|
+
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
|
|
16
16
|
import { C as launchIosApp, E as unverifiedLaunchLines, O as verifyLaunch, T as readMetroRecords, b as isBundleProof, c as RELEASE_VERIFY_WAIT_MS, f as clearOtherUserApps, i as LAUNCH_BUNDLING, k as verifyReleaseLaunch, m as devClientUrl, n as DEFAULT_METRO_PORT, o as LAUNCH_FATAL, s as LAUNCH_UNVERIFIED, v as installIosApp, w as readCollectorRecords, y as iosAppProcess } from "./app-install--PAocWvq.mjs";
|
|
17
17
|
import { f as listIosRuntimes } from "./ios-Deh5js5V.mjs";
|
|
18
|
-
import { a as lostLine, c as releaseLeaseOnSignal, i as leaseExpiryText, l as runLease, n as DEBUG_VERIFY_STEP_MS, o as lostRefusal, r as acquireRunLease, s as parseDeviceWait, t as selectFromPool, u as waitFlagConflict } from "./device-pool-
|
|
19
|
-
import { r as releaseBuildSlot, t as acquireBuildSlot } from "./build-slots-
|
|
20
|
-
import { a as statsProjectKey, i as recordRunStats, n as readRunEstimates, t as createRunRecorder } from "./stats-
|
|
21
|
-
import { c as unknownIosRuntimeRefusal, i as ensureOwnedDevice, n as clearIosAdoptionPending, r as ensureBooted, s as unknownIosDeviceTypeRefusal, t as checkDeviceCapacity } from "./device-
|
|
22
|
-
import { a as ensureMetroReachable, b as ownedSessionName, c as remoteIosDeps, l as resolveRemoteContext, n as binOnPath, o as ensureRemoteBootOwned, r as bundleEntryPoint, w as gateMetroOrigin } from "./device-remote-
|
|
23
|
-
import { a as compilationCacheActivityLine, c as readBundleExecutable, l as readBundleId, p as describeDiagnostic, r as buildIos, s as discoverXcodeProject, t as COMPILATION_CACHE_NOT_RUN, u as resolveScheme } from "./xcode-
|
|
24
|
-
import { n as nativeRunCommand, t as launchSlotScope } from "./slot-launch-
|
|
18
|
+
import { a as lostLine, c as releaseLeaseOnSignal, i as leaseExpiryText, l as runLease, n as DEBUG_VERIFY_STEP_MS, o as lostRefusal, r as acquireRunLease, s as parseDeviceWait, t as selectFromPool, u as waitFlagConflict } from "./device-pool-DU4FQKp5.mjs";
|
|
19
|
+
import { r as releaseBuildSlot, t as acquireBuildSlot } from "./build-slots-CuPszJDu.mjs";
|
|
20
|
+
import { a as statsProjectKey, i as recordRunStats, n as readRunEstimates, t as createRunRecorder } from "./stats-Fo9ACIv7.mjs";
|
|
21
|
+
import { c as unknownIosRuntimeRefusal, i as ensureOwnedDevice, n as clearIosAdoptionPending, r as ensureBooted, s as unknownIosDeviceTypeRefusal, t as checkDeviceCapacity } from "./device-DvKJ454A.mjs";
|
|
22
|
+
import { a as ensureMetroReachable, b as ownedSessionName, c as remoteIosDeps, l as resolveRemoteContext, n as binOnPath, o as ensureRemoteBootOwned, r as bundleEntryPoint, w as gateMetroOrigin } from "./device-remote-BTUqbl0i.mjs";
|
|
23
|
+
import { a as compilationCacheActivityLine, c as readBundleExecutable, l as readBundleId, p as describeDiagnostic, r as buildIos, s as discoverXcodeProject, t as COMPILATION_CACHE_NOT_RUN, u as resolveScheme } from "./xcode-BqDeRkpT.mjs";
|
|
24
|
+
import { n as nativeRunCommand, t as launchSlotScope } from "./slot-launch-BpHiHH6A.mjs";
|
|
25
25
|
import { t as spawnEntry } from "./spawn-entry-nCE6m770.mjs";
|
|
26
|
-
import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-
|
|
26
|
+
import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-CTePWAzW.mjs";
|
|
27
27
|
import { a as iosDeviceProcess, c as listIosDevices, d as verifyIosDeviceReleaseLaunch, i as installIosDeviceApp, l as localNetworkPending, n as LAUNCH_PROBE_TIMEOUT_MS, o as iosPoolCandidates, r as awaitIosDeviceLaunch, s as iosPoolNoCandidatesRefusal, t as DEVICECTL_INSTALL_TIMEOUT_MS, u as resolveIosPhysicalDevice } from "./ios-device-DJOi9FR5.mjs";
|
|
28
|
-
import { a as runPodInstall, n as podsAreStale, r as readPodState } from "./deps-
|
|
28
|
+
import { a as runPodInstall, n as podsAreStale, r as readPodState } from "./deps-BAGOnrc7.mjs";
|
|
29
29
|
import { existsSync, mkdirSync, mkdtempSync, openSync, rmSync, writeFileSync } from "node:fs";
|
|
30
30
|
import { InvalidArgumentError } from "commander";
|
|
31
31
|
import { X509Certificate } from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as loadConfig, h as isPathPrefix, z as validateDeviceSlot } from "./config-
|
|
1
|
+
import { g as loadConfig, h as isPathPrefix, z as validateDeviceSlot } from "./config-DMP7L7H6.mjs";
|
|
2
2
|
import { n as SOURCES, t as LEVELS } from "./ndjson-BZwI1NBv.mjs";
|
|
3
|
-
import { _ as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-
|
|
4
|
-
import { a as findProjectRoot } from "./project-
|
|
3
|
+
import { _ as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
|
|
4
|
+
import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
|
|
5
5
|
import { _ as launchErrorPreview } from "./command-output-BuIb_ZOI.mjs";
|
|
6
|
-
import { i as captureWorkspaceCrashes, t as errorDiagnostics } from "./error-diagnostics-
|
|
6
|
+
import { i as captureWorkspaceCrashes, t as errorDiagnostics } from "./error-diagnostics-CTePWAzW.mjs";
|
|
7
7
|
import { a as followLogs, c as queryLogs, i as fileSizes, n as buildCriteria, o as logFiles, r as compileGrep, s as parseSince } from "./logs-query-Cdp5aaCH.mjs";
|
|
8
8
|
import { realpathSync } from "node:fs";
|
|
9
9
|
import { relative, sep } from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { w as process_identity_exports } from "./config-
|
|
3
|
-
import { r as readWorkspaceState } from "./workspace-state-
|
|
4
|
-
import { t as isMetroRunning } from "./ports-
|
|
2
|
+
import { w as process_identity_exports } from "./config-DMP7L7H6.mjs";
|
|
3
|
+
import { r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
|
|
4
|
+
import { t as isMetroRunning } from "./ports-BZprTJRa.mjs";
|
|
5
5
|
import { readlinkSync, realpathSync } from "fs";
|
|
6
6
|
import { sep } from "path";
|
|
7
7
|
//#region src/metro.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { C as withConfigLock, f as getProject, g as loadConfig, s as ensureConfig, u as getConfigDir, w as process_identity_exports, y as saveConfig } from "./config-
|
|
3
|
-
import { n as isPortFree } from "./ports-
|
|
4
|
-
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-
|
|
2
|
+
import { C as withConfigLock, f as getProject, g as loadConfig, s as ensureConfig, u as getConfigDir, w as process_identity_exports, y as saveConfig } from "./config-DMP7L7H6.mjs";
|
|
3
|
+
import { n as isPortFree } from "./ports-BZprTJRa.mjs";
|
|
4
|
+
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
|
|
5
5
|
import { realpathSync } from "node:fs";
|
|
6
6
|
//#region src/named-ports.ts
|
|
7
7
|
const FIRST_PORT = 8900;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { w as process_identity_exports } from "./config-
|
|
2
|
-
import { a as withWorkspaceStateLock, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-
|
|
3
|
-
import { r as pidExists } from "./metro-
|
|
1
|
+
import { w as process_identity_exports } from "./config-DMP7L7H6.mjs";
|
|
2
|
+
import { a as withWorkspaceStateLock, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
|
|
3
|
+
import { r as pidExists } from "./metro-ato6ef3J.mjs";
|
|
4
4
|
import { realpathSync } from "node:fs";
|
|
5
5
|
//#region src/collector/state.ts
|
|
6
6
|
function collectorRoot(root) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { u as getConfigDir, w as process_identity_exports } from "./config-
|
|
2
|
+
import { u as getConfigDir, w as process_identity_exports } from "./config-DMP7L7H6.mjs";
|
|
3
3
|
import { t as createLineReader } from "./process-output-C7IlIzd7.mjs";
|
|
4
|
-
import { r as pidExists } from "./metro-
|
|
5
|
-
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-
|
|
4
|
+
import { r as pidExists } from "./metro-ato6ef3J.mjs";
|
|
5
|
+
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
|
|
6
6
|
import { closeSync, mkdirSync, openSync, readFileSync, unlinkSync } from "node:fs";
|
|
7
7
|
import { createHash, randomUUID } from "node:crypto";
|
|
8
8
|
import { basename, join, resolve, sep } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as getProject } from "./config-
|
|
2
|
-
import { a as findProjectRoot } from "./project-
|
|
3
|
-
import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-
|
|
1
|
+
import { f as getProject } from "./config-DMP7L7H6.mjs";
|
|
2
|
+
import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
|
|
3
|
+
import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-DH9SXd0f.mjs";
|
|
4
4
|
//#region src/commands/ports.ts
|
|
5
5
|
async function inProject(action) {
|
|
6
6
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as isOnMountedVolume, g as loadConfig, j as listMountedVolumes, n as allMetroPorts, r as claimMetroPort, v as removeProject } from "./config-
|
|
1
|
+
import { A as isOnMountedVolume, g as loadConfig, j as listMountedVolumes, n as allMetroPorts, r as claimMetroPort, v as removeProject } from "./config-DMP7L7H6.mjs";
|
|
2
2
|
import { existsSync } from "fs";
|
|
3
3
|
import { request } from "http";
|
|
4
4
|
import { connect } from "net";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as findEnclosingWorktreeRoot, f as getProject } from "./config-
|
|
2
|
-
import {
|
|
1
|
+
import { c as findEnclosingWorktreeRoot, f as getProject } from "./config-DMP7L7H6.mjs";
|
|
2
|
+
import { g as repoRoot } from "./worktree-DJnBbQZ9.mjs";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync, realpathSync } from "fs";
|
|
4
4
|
import { basename, dirname, join, resolve } from "path";
|
|
5
5
|
import { createRequire } from "module";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { E as ownership_claim_exports, L as projectDeviceSlots, T as acquireAvdClaim, f as getProject, v as removeProject, w as process_identity_exports } from "./config-
|
|
2
|
-
import { h as workspaceDir, r as readWorkspaceState } from "./workspace-state-
|
|
3
|
-
import { a as clearRemoteSession, i as clearManagedMetroTunnel, s as readMetroTunnel, u as readRemoteSessionId } from "./state-
|
|
4
|
-
import { i as resolveProjectMetro, n as killMetroTree, r as pidExists } from "./metro-
|
|
5
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
6
|
-
import { S as resolveEasCliBin, l as parkedMaxSetting, n as teardownOwnedIosSim, t as teardownOwnedAvd } from "./teardown-
|
|
7
|
-
import { l as releaseWorkspaceLeases } from "./device-lease-
|
|
8
|
-
import { i as endRecordedSession } from "./device-remote-
|
|
9
|
-
import { t as clearNamedPorts } from "./named-ports-
|
|
10
|
-
import { r as stopTunnel, t as resolveSupervisorTarget } from "./ownership-
|
|
1
|
+
import { E as ownership_claim_exports, L as projectDeviceSlots, T as acquireAvdClaim, f as getProject, v as removeProject, w as process_identity_exports } from "./config-DMP7L7H6.mjs";
|
|
2
|
+
import { h as workspaceDir, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
|
|
3
|
+
import { a as clearRemoteSession, i as clearManagedMetroTunnel, s as readMetroTunnel, u as readRemoteSessionId } from "./state-CnWzvCWP.mjs";
|
|
4
|
+
import { i as resolveProjectMetro, n as killMetroTree, r as pidExists } from "./metro-ato6ef3J.mjs";
|
|
5
|
+
import { n as verifyCollectorOwnership } from "./ownership-CD_XnpDu.mjs";
|
|
6
|
+
import { S as resolveEasCliBin, l as parkedMaxSetting, n as teardownOwnedIosSim, t as teardownOwnedAvd } from "./teardown-CAVcWeRD.mjs";
|
|
7
|
+
import { l as releaseWorkspaceLeases } from "./device-lease-r7yEQ1R8.mjs";
|
|
8
|
+
import { i as endRecordedSession } from "./device-remote-BTUqbl0i.mjs";
|
|
9
|
+
import { t as clearNamedPorts } from "./named-ports-DH9SXd0f.mjs";
|
|
10
|
+
import { r as stopTunnel, t as resolveSupervisorTarget } from "./ownership-CVY9cqCr.mjs";
|
|
11
11
|
import { existsSync, rmSync } from "node:fs";
|
|
12
12
|
//#region src/reclaim.ts
|
|
13
13
|
async function reapCollectors(root, { verify = verifyCollectorOwnership, collectors }) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { F as deviceSlotPlatforms, I as parseDeviceSlotKey, f as getProject } from "./config-
|
|
2
|
-
import { a as findProjectRoot } from "./project-
|
|
3
|
-
import { d as readWorkspaceLaunches } from "./state-
|
|
4
|
-
import { i as resolveProjectMetro } from "./metro-
|
|
1
|
+
import { F as deviceSlotPlatforms, I as parseDeviceSlotKey, f as getProject } from "./config-DMP7L7H6.mjs";
|
|
2
|
+
import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
|
|
3
|
+
import { d as readWorkspaceLaunches } from "./state-CnWzvCWP.mjs";
|
|
4
|
+
import { i as resolveProjectMetro } from "./metro-ato6ef3J.mjs";
|
|
5
5
|
import { l as phaseLine } from "./command-output-BuIb_ZOI.mjs";
|
|
6
|
-
import { N as resolveOwnedAvdSerial } from "./android-
|
|
6
|
+
import { N as resolveOwnedAvdSerial } from "./android-DJWiTBkz.mjs";
|
|
7
7
|
import { u as androidAppProcess, y as iosAppProcess } from "./app-install--PAocWvq.mjs";
|
|
8
8
|
import { x as resolveOwnedIosSim } from "./ios-Deh5js5V.mjs";
|
|
9
|
-
import { n as nativeRunCommand } from "./slot-launch-
|
|
9
|
+
import { n as nativeRunCommand } from "./slot-launch-BpHiHH6A.mjs";
|
|
10
10
|
import chalk from "chalk";
|
|
11
11
|
import { WebSocket } from "ws";
|
|
12
12
|
//#region src/engine/reload.ts
|