stim 1.3.0 → 1.4.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 +17 -3
- package/dist/{android-CqcW1hrP.mjs → android-BTR1KTMP.mjs} +206 -120
- package/dist/{android-BqVIJoG7.mjs → android-BkM4qTaN.mjs} +76 -77
- package/dist/{android-cas-BR5YJBYv.mjs → android-cas-BjLRZyks.mjs} +15 -12
- package/dist/{app-install-DIp9riNx.mjs → app-install--PAocWvq.mjs} +2 -2
- package/dist/{build-slots-C3-R4XQr.mjs → build-slots-D6sDzOe-.mjs} +7 -8
- package/dist/{cache-manifest-CXR-Y8pH.mjs → cache-manifest-D02TpYjA.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cli.mjs +14 -13
- package/dist/collector-run.mjs +4 -4
- package/dist/{command-output-8wHMEde0.mjs → command-output-BuIb_ZOI.mjs} +1 -4
- package/dist/{config-CcefMY2Q.mjs → config-6vdGngKa.mjs} +51 -51
- package/dist/dependency-state-BMirHEPD.mjs +76 -0
- package/dist/{deps-Spz8ozgo.mjs → deps-Ck4wuTwa.mjs} +1 -1
- package/dist/{dev-client-BjisHDB5.mjs → dev-client-Cd0v7iZk.mjs} +12 -12
- package/dist/{device-BkiW-gkk.mjs → device-CKXLnRRb.mjs} +7 -7
- package/dist/device-CMDFzx7C.mjs +1136 -0
- package/dist/{device-lease-BJYybF-2.mjs → device-lease-DDJr85OK.mjs} +3 -3
- package/dist/{device-pool-CPbLGfrB.mjs → device-pool-DJvbIBGW.mjs} +4 -4
- package/dist/{device-remote-AkYCKS8U.mjs → device-remote-CMfHhoc8.mjs} +7 -6
- package/dist/{doctor-Bmv86UUW.mjs → doctor-B_mfURdt.mjs} +536 -114
- package/dist/{error-diagnostics-DHC31rXA.mjs → error-diagnostics-_VmkqRZo.mjs} +8 -7
- package/dist/{gc-GGu-8ULN.mjs → gc-0AyxmECv.mjs} +61 -27
- package/dist/{guide-92CPA21s.mjs → guide-CGxdmQ0K.mjs} +236 -67
- package/dist/{ios-BSXFeO5H.mjs → ios-CtmGLx3X.mjs} +2667 -2607
- package/dist/{ios-device-CWOM_S44.mjs → ios-device-DJOi9FR5.mjs} +1 -1
- package/dist/{logs-DPNF4C9s.mjs → logs-BF3qPA7w.mjs} +32 -7
- package/dist/{logs-query-R-Cqc6Qv.mjs → logs-query-Cdp5aaCH.mjs} +1 -1
- package/dist/metro-DFLmaVz8.mjs +99 -0
- package/dist/named-ports-BO7Zpjp0.mjs +137 -0
- package/dist/{ownership-8O073GIC.mjs → ownership-BvSpZVBk.mjs} +5 -5
- package/dist/{ownership-BpCKiRlQ.mjs → ownership-C08Yzrp7.mjs} +6 -6
- package/dist/ports-BiKqP92J.mjs +39 -0
- package/dist/ports-ClqG8GPt.mjs +90 -0
- package/dist/{project-fKmuIaMI.mjs → project-CBFCwnN5.mjs} +2 -2
- package/dist/{reclaim-iW9Cad7k.mjs → reclaim-DpDVo-AP.mjs} +20 -13
- package/dist/{reload-DazHDSFA.mjs → reload-ByTqg6ZI.mjs} +8 -8
- package/dist/rolldown-runtime-BsOwBuO_.mjs +30 -0
- package/dist/{server-bare-DEzPZLvf.mjs → server-bare-Buk-k8tI.mjs} +3 -6
- package/dist/{server-expo-DizT4OMk.mjs → server-expo-D4P7iTvf.mjs} +3 -3
- package/dist/server-expo-Dho5Raiw.mjs +2 -0
- package/dist/{settings-DEJf6_kJ.mjs → settings-DwfltIXQ.mjs} +2 -2
- package/dist/{slot-launch-cci0xvmC.mjs → slot-launch-DeKen9e5.mjs} +4 -4
- package/dist/{start-mObjQH2W.mjs → start-BpKUHcU_.mjs} +16 -14
- package/dist/state-CDbvmZdt.mjs +131 -0
- package/dist/{stats-BR-kwj0B.mjs → stats-C59QLKm2.mjs} +1 -1
- package/dist/{stats-CaaQr4yN.mjs → stats-k5qMjyxo.mjs} +4 -4
- package/dist/{status-BxQNqu9t.mjs → status-Y2ij3dm6.mjs} +13 -12
- package/dist/{stop-DimGXEKY.mjs → stop-_P2OQwmZ.mjs} +15 -14
- package/dist/{stop-CrHGcjrV.mjs → stop-vKmmxhea.mjs} +2 -2
- package/dist/supervisor-run.d.mts +3 -27
- package/dist/supervisor-run.mjs +7 -6
- package/dist/{teardown-ClFp1Aax.mjs → teardown-KsPpvldq.mjs} +248 -110
- package/dist/{workspace-process-lock-3NcQnZ0X.mjs → workspace-process-lock-UEIrvZMJ.mjs} +4 -4
- package/dist/workspace-state-Do1e2mOH.mjs +146 -0
- package/dist/{worktree-DxTgN1CJ.mjs → worktree-BvcAIMdJ.mjs} +132 -123
- package/dist/{worktree-Eq6TLH8N.mjs → worktree-DWNx4tUg.mjs} +32 -2
- package/dist/xcode-D9tVItl-.mjs +860 -0
- package/package.json +7 -7
- package/dist/doctor-fAMXC4vl.mjs +0 -530
- package/dist/metro-CORqXyTL.mjs +0 -184
- package/dist/ownership-claim-Bf2CAfw3.mjs +0 -570
- package/dist/server-expo-44em5Pmg.mjs +0 -2
- package/dist/state-B3XA2wp2.mjs +0 -268
- package/dist/xcode-D7sAp-Zy.mjs +0 -1858
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { D as withDirLock, F as deviceSlotPlatforms, P as deviceSlotKey, f as getProject } from "./config-6vdGngKa.mjs";
|
|
3
|
+
import { r as readWorkspaceState } from "./workspace-state-Do1e2mOH.mjs";
|
|
4
|
+
import { d as readWorkspaceLaunches } from "./state-CDbvmZdt.mjs";
|
|
4
5
|
import { n as deviceConsoleLevel } from "./ios-device-D3pzTKQE.mjs";
|
|
5
|
-
import { i as resolveProjectMetro } from "./metro-
|
|
6
|
+
import { i as resolveProjectMetro } from "./metro-DFLmaVz8.mjs";
|
|
6
7
|
import { n as parseLogcatLine, t as androidClockOffset } from "./android-BW8i_YxU.mjs";
|
|
7
|
-
import { _ as launchErrorPreview } from "./command-output-
|
|
8
|
-
import { n as androidHome } from "./android-
|
|
9
|
-
import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-
|
|
10
|
-
import {
|
|
8
|
+
import { _ as launchErrorPreview } from "./command-output-BuIb_ZOI.mjs";
|
|
9
|
+
import { n as androidHome } from "./android-BkM4qTaN.mjs";
|
|
10
|
+
import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-DDJr85OK.mjs";
|
|
11
|
+
import { l as readLogRecords, t as attachExpoErrorContext } from "./logs-query-Cdp5aaCH.mjs";
|
|
11
12
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
13
|
import { createHash, randomUUID } from "node:crypto";
|
|
13
14
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { t as getExecutor } from "./exec-CyylIdq9.mjs";
|
|
2
|
-
import { A as
|
|
3
|
-
import { i as registeredCaches } from "./cache-manifest-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { a as findProjectRoot, i as detectIsExpo } from "./project-
|
|
7
|
-
import { m as shortUdid, o as formatLongDuration, u as plural } from "./command-output-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as POOL_SETTING_REMEDY, c as parkedMaxSetting, i as teardownParkedIosSim, l as readParked, n as teardownOwnedIosSim, r as teardownParkedAvd, s as dropParked, t as teardownOwnedAvd, x as resolveEasCliBin } from "./teardown-ClFp1Aax.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-6vdGngKa.mjs";
|
|
3
|
+
import { i as registeredCaches } from "./cache-manifest-D02TpYjA.mjs";
|
|
4
|
+
import { h as workspaceDir, y as workspaceStateFile } from "./workspace-state-Do1e2mOH.mjs";
|
|
5
|
+
import { _ as repoRoot, s as gitCommonDir } from "./worktree-DWNx4tUg.mjs";
|
|
6
|
+
import { a as findProjectRoot, i as detectIsExpo } from "./project-CBFCwnN5.mjs";
|
|
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-BkM4qTaN.mjs";
|
|
9
|
+
import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-DwfltIXQ.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-KsPpvldq.mjs";
|
|
12
11
|
import { d as listIosDeviceTypes, g as parseRuntimeVersion, u as listAllIosSims } from "./ios-Deh5js5V.mjs";
|
|
13
|
-
import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-
|
|
14
|
-
import { n as listBuildSlots } from "./build-slots-
|
|
15
|
-
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-
|
|
16
|
-
import { n as reclaimProject, t as describeDereferenced } from "./reclaim-
|
|
12
|
+
import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-DDJr85OK.mjs";
|
|
13
|
+
import { n as listBuildSlots } from "./build-slots-D6sDzOe-.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-CMfHhoc8.mjs";
|
|
15
|
+
import { n as reclaimProject, t as describeDereferenced } from "./reclaim-DpDVo-AP.mjs";
|
|
17
16
|
import { InvalidArgumentError } from "commander";
|
|
18
17
|
import { existsSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from "fs";
|
|
19
18
|
import { homedir, tmpdir } from "os";
|
|
@@ -690,13 +689,20 @@ function collectDeviceLeases(now) {
|
|
|
690
689
|
}
|
|
691
690
|
function deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRecords) {
|
|
692
691
|
let deleteFailures = 0;
|
|
693
|
-
function reap(d) {
|
|
692
|
+
function reap(d, onlyIfMissing = false) {
|
|
694
693
|
const r = d.kind === "ios" ? teardownOwnedIosSim(d.id, {
|
|
695
694
|
del: true,
|
|
696
695
|
label: d.name
|
|
697
696
|
}) : teardownOwnedAvd(d.name, {
|
|
698
697
|
del: true,
|
|
699
|
-
|
|
698
|
+
onlyIfMissing,
|
|
699
|
+
..."project" in d ? { owner: {
|
|
700
|
+
projectPath: d.project,
|
|
701
|
+
slot: d.slot
|
|
702
|
+
} } : {},
|
|
703
|
+
..."project" in d ? { onRemoved: () => {
|
|
704
|
+
if (clearDevice(d.project, d.kind, d.slot, d.id)) console.log(chalk.dim(` cleared the ${d.kind} record for ${d.project}`));
|
|
705
|
+
} } : {},
|
|
700
706
|
..."orphanedDirectory" in d ? { orphanedDirectory: d.orphanedDirectory } : {}
|
|
701
707
|
});
|
|
702
708
|
const what = d.kind === "ios" ? `ios sim ${d.name} (${d.id})` : `android avd ${d.name}`;
|
|
@@ -712,15 +718,20 @@ function deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRecords)
|
|
|
712
718
|
for (const d of orphanedDevices) reap(d);
|
|
713
719
|
for (const d of staleDevices) {
|
|
714
720
|
const status = reap(d);
|
|
715
|
-
if (status === "torn-down" || status === "missing") {
|
|
716
|
-
clearDevice(d.project, d.kind, d.slot);
|
|
721
|
+
if (d.kind === "ios" && (status === "torn-down" || status === "missing")) {
|
|
722
|
+
clearDevice(d.project, d.kind, d.slot, d.id);
|
|
717
723
|
console.log(chalk.dim(` cleared the ${d.kind} record for ${d.project}`));
|
|
718
724
|
}
|
|
719
725
|
}
|
|
720
|
-
for (const r of staleDeviceRecords) {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
726
|
+
for (const r of staleDeviceRecords) if (r.kind === "android" && r.owned) reap({
|
|
727
|
+
...r,
|
|
728
|
+
name: r.id,
|
|
729
|
+
idleDays: 0
|
|
730
|
+
}, true);
|
|
731
|
+
else if (withConfigLock(() => {
|
|
732
|
+
if (r.kind === "android" && deviceSlotPlatforms(getProject(r.project), r.slot)?.android?.owned) return false;
|
|
733
|
+
return clearDevice(r.project, r.kind, r.slot, r.id);
|
|
734
|
+
})) console.log(chalk.green(`Cleared the ${r.kind} record for ${r.project} (${r.id} is not on this machine)`));
|
|
724
735
|
return deleteFailures;
|
|
725
736
|
}
|
|
726
737
|
//#endregion
|
|
@@ -932,7 +943,7 @@ function malformedRemoteSessionLockNotice(roots) {
|
|
|
932
943
|
for (const root of roots) {
|
|
933
944
|
const lockPath = join(workspaceDir(root), "remote-session.lock");
|
|
934
945
|
if (!existsSync(lockPath)) continue;
|
|
935
|
-
if (readClaimSet(lockPath).unresolved.length === 0) continue;
|
|
946
|
+
if ((0, ownership_claim_exports.readClaimSet)(lockPath).unresolved.length === 0) continue;
|
|
936
947
|
return `EAS session sweep skipped: the remote-session lock at ${lockPath} has a malformed owner record.`;
|
|
937
948
|
}
|
|
938
949
|
return null;
|
|
@@ -1154,7 +1165,7 @@ function unresolvedLockLines(locks, slots) {
|
|
|
1154
1165
|
" remove one yourself once you know nothing is building with it"
|
|
1155
1166
|
];
|
|
1156
1167
|
}
|
|
1157
|
-
function formatGcReport({ skipped = [], deadProjects = [], invalidProjects = [], parkedSims = [], parkedAvds = [], orphanedDevices = [], staleDevices = [], staleDeviceRecords = [], buildLocks = {
|
|
1168
|
+
function formatGcReport({ skipped = [], deadProjects = [], orphanedPorts, invalidProjects = [], parkedSims = [], parkedAvds = [], orphanedDevices = [], staleDevices = [], staleDeviceRecords = [], buildLocks = {
|
|
1158
1169
|
stale: [],
|
|
1159
1170
|
live: [],
|
|
1160
1171
|
unresolved: []
|
|
@@ -1187,6 +1198,7 @@ function formatGcReport({ skipped = [], deadProjects = [], invalidProjects = [],
|
|
|
1187
1198
|
}
|
|
1188
1199
|
lines.push(...projectEntryLines(`Dead project entries (${deadProjects.length}):`, deadProjects));
|
|
1189
1200
|
lines.push(...projectEntryLines(`Invalid project entries (${invalidProjects.length}) - the key is not an absolute path:`, invalidProjects));
|
|
1201
|
+
lines.push(...namedPortLines(orphanedPorts));
|
|
1190
1202
|
lines.push(...formatParkedSimReport(parkedSims, now));
|
|
1191
1203
|
lines.push(...formatParkedAvdReport(parkedAvds, now));
|
|
1192
1204
|
if (orphanedDevices.length) {
|
|
@@ -1292,6 +1304,14 @@ function leaseGarbageLines({ expired, kept }) {
|
|
|
1292
1304
|
function deviceSizeSuffix(device) {
|
|
1293
1305
|
return device.kind === "android" && device.bytes !== void 0 ? ` - ${formatBytes(device.bytes)} on disk` : "";
|
|
1294
1306
|
}
|
|
1307
|
+
function namedPortLines(ports = []) {
|
|
1308
|
+
if (!ports.length) return [];
|
|
1309
|
+
return [
|
|
1310
|
+
`Orphaned named ports (${ports.length}):`,
|
|
1311
|
+
...ports.map(({ project, label, port }) => ` ${project}: ${label} (${port})`),
|
|
1312
|
+
" --delete stops TCP listeners and releases these allocations."
|
|
1313
|
+
];
|
|
1314
|
+
}
|
|
1295
1315
|
//#endregion
|
|
1296
1316
|
//#region src/commands/gc.ts
|
|
1297
1317
|
function removeInvalidProjectEntries(invalidProjects) {
|
|
@@ -1464,6 +1484,11 @@ async function collectGcReport({ olderThan = null, cache = null, now = Date.now(
|
|
|
1464
1484
|
return {
|
|
1465
1485
|
skipped,
|
|
1466
1486
|
deadProjects,
|
|
1487
|
+
orphanedPorts: deadProjects.flatMap((project) => Object.entries(cfg?.projects[project]?.ports ?? {}).map(([label, port]) => ({
|
|
1488
|
+
project,
|
|
1489
|
+
label,
|
|
1490
|
+
port
|
|
1491
|
+
}))),
|
|
1467
1492
|
invalidProjects,
|
|
1468
1493
|
parkedSims,
|
|
1469
1494
|
parkedAvds,
|
|
@@ -1591,7 +1616,16 @@ async function runGcCore(opts, deps) {
|
|
|
1591
1616
|
let deleteFailures = deleteParkedSims(report.parkedSims, deps) + deleteParkedAvds(report.parkedAvds);
|
|
1592
1617
|
removeInvalidProjectEntries(invalidProjects);
|
|
1593
1618
|
for (const path of deadProjects) {
|
|
1594
|
-
|
|
1619
|
+
if (existsSync(path) || !isOnMountedVolume(path)) {
|
|
1620
|
+
console.log(chalk.yellow(`Kept ${path}: its absence can no longer be confirmed.`));
|
|
1621
|
+
continue;
|
|
1622
|
+
}
|
|
1623
|
+
const result = await reclaimProject(path).catch((error) => {
|
|
1624
|
+
deleteFailures++;
|
|
1625
|
+
console.log(chalk.red(`Could not prune ${path}; its registry entry was kept: ${error.message}`));
|
|
1626
|
+
return null;
|
|
1627
|
+
});
|
|
1628
|
+
if (!result) continue;
|
|
1595
1629
|
if (result.keptEntry) console.log(chalk.yellow(`Could not fully prune ${path}; its registry entry was kept.`));
|
|
1596
1630
|
else console.log(chalk.green(`Pruned ${path}`));
|
|
1597
1631
|
for (const dir of result.removedWorkspaceDirs) console.log(chalk.dim(` removed workspace output ${dir}`));
|
|
@@ -1606,7 +1640,7 @@ async function runGcCore(opts, deps) {
|
|
|
1606
1640
|
}
|
|
1607
1641
|
deleteFailures += deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRecords);
|
|
1608
1642
|
for (const lock of buildLocks.stale) {
|
|
1609
|
-
const cleared = clearFreeClaimSet({
|
|
1643
|
+
const cleared = (0, ownership_claim_exports.clearFreeClaimSet)({
|
|
1610
1644
|
root: lock.path,
|
|
1611
1645
|
label: `${lock.platform} build`
|
|
1612
1646
|
});
|
|
@@ -1623,7 +1657,7 @@ async function runGcCore(opts, deps) {
|
|
|
1623
1657
|
console.log(chalk.green(`Cleared the ${lock.platform} build lock left by pid ${lock.pid ?? "?"} (${lock.projectRoot || "unrecorded workspace"})`));
|
|
1624
1658
|
}
|
|
1625
1659
|
for (const slot of buildSlots.stale) {
|
|
1626
|
-
const cleared = clearFreeClaimSet({
|
|
1660
|
+
const cleared = (0, ownership_claim_exports.clearFreeClaimSet)({
|
|
1627
1661
|
root: slot.path,
|
|
1628
1662
|
label: "build slot"
|
|
1629
1663
|
});
|