stim 1.9.0 → 1.10.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/dist/{android-_y4Ohi5z.mjs → android-787HhP5w.mjs} +119 -29
- package/dist/{android-BPGizezh.mjs → android-DBkeHwpm.mjs} +168 -95
- package/dist/{android-DEgo4oCo.mjs → android-DPov-fv2.mjs} +2 -2
- package/dist/{android-cas-eiExNLf7.mjs → android-cas-CITmIeWY.mjs} +9 -8
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{app-install-Uf3a83Tv.mjs → app-install-CrJ6t_bv.mjs} +2 -2
- package/dist/budget-BP4jZZL4.mjs +620 -0
- package/dist/build-progress-BXx-ZBe4.mjs +512 -0
- package/dist/{cache-manifest-Dg7OnMrp.mjs → cache-manifest-Pubfp8wV.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cli.mjs +16 -16
- package/dist/collector-run.d.mts +5 -1
- package/dist/collector-run.mjs +7 -7
- package/dist/{command-output-gByVmIjy.mjs → command-output-D5z2_bcF.mjs} +1 -1
- package/dist/{config-Cp9lM3wX.mjs → config-BEq0Qw_a.mjs} +14 -131
- package/dist/{dependency-state-Bq5DcLGn.mjs → dependency-state-r9UesA9a.mjs} +2 -2
- package/dist/{deps-Cip5vUm1.mjs → deps-DP4eWqea.mjs} +3 -3
- package/dist/{detached-entry-KEu0_AXL.mjs → detached-entry-DJHoca49.mjs} +1 -1
- package/dist/{dev-client-HyqISM0h.mjs → dev-client-92U593KT.mjs} +137 -250
- package/dist/{device-D4U-xLty.mjs → device-DhTZe7L4.mjs} +7 -7
- package/dist/{build-lock-DPXPLgTc.mjs → device-lease-CbEaIk7b.mjs} +370 -12
- package/dist/{device-pool-CnTAz8X1.mjs → device-pool-Di8Q-9Ro.mjs} +4 -4
- package/dist/{device-remote-AQ5rQPqr.mjs → device-remote-Dy1jGj3U.mjs} +547 -468
- package/dist/{doctor-B_Ei3bZu.mjs → doctor-B-inAJmt.mjs} +58 -22
- package/dist/{error-diagnostics-Vfz83GCF.mjs → error-diagnostics-xxWKNO3-.mjs} +11 -12
- package/dist/{exec-jIAlgilk.mjs → exec-DK8KaVHK.mjs} +3 -2
- package/dist/{gc-Ckw8RQHi.mjs → gc-ChPFZMRC.mjs} +500 -1114
- package/dist/{guide-BiAbhs1J.mjs → guide-DwmaD_Wa.mjs} +882 -528
- package/dist/guide-status-CWvti2Lg.mjs +125 -0
- package/dist/idle-DpRLp5lj.mjs +157 -0
- package/dist/in-use-CjUluqIX.mjs +245 -0
- package/dist/{ios-BL2NFckr.mjs → ios-B2Fpqvlb.mjs} +25 -59
- package/dist/{ios-BzUJWk1K.mjs → ios-Dd-hYJBh.mjs} +130 -89
- package/dist/{ios-device-DPsSm0v_.mjs → ios-device-BiOsSVzd.mjs} +1 -1
- package/dist/{ios-device-D972i9wf.mjs → ios-device-CtRdEVjx.mjs} +3 -3
- package/dist/{launch-verify-Q_OtW1Rf.mjs → launch-verify-CQS_Kg-C.mjs} +5 -5
- package/dist/{logs-CI9NQSK7.mjs → logs-MARIy6m9.mjs} +9 -9
- package/dist/{metro-DrLHaMn2.mjs → metro-BWLOJ_Wr.mjs} +116 -10
- package/dist/{named-ports-CmLQSIRj.mjs → named-ports-DiTfSz6p.mjs} +4 -4
- package/dist/{ndjson-9uFNRwfe.mjs → ndjson-CDY9IkVC.mjs} +3 -56
- package/dist/{ndjson-DvHSsNU9.d.mts → ndjson-Du3j0AQ9.d.mts} +1 -0
- package/dist/{ownership-D15Op8vN.mjs → ownership-D2xbLVoz.mjs} +2 -3
- package/dist/ownership-DZjdx8Gq.mjs +1180 -0
- package/dist/{ports-BNKoWVWZ.mjs → ports-CLSSFOuz.mjs} +3 -3
- package/dist/{project-DS112DYB.mjs → project-BXZzOABt.mjs} +2 -2
- package/dist/{reload-ZNJUo1pl.mjs → reload-DoETJ3rl.mjs} +9 -10
- package/dist/{server-bare-DWkkcIxV.mjs → server-bare-DVbb7kXH.mjs} +1 -1
- package/dist/{server-expo-B_lctBR3.mjs → server-expo-BvOCeakp.mjs} +4 -4
- package/dist/server-expo-DBVTdult.mjs +2 -0
- package/dist/{settings-D030k0t4.mjs → settings-DOugPlPz.mjs} +16 -428
- package/dist/{settings-BKNh5rl4.mjs → settings-EWYNwe72.mjs} +16 -14
- package/dist/settings.schema.json +75 -0
- package/dist/{simslim-B_LsGLuJ.mjs → simslim-Ca3487H6.mjs} +182 -5
- package/dist/{slot-launch-DU9A-gYw.mjs → slot-launch-C5cg0fmk.mjs} +4 -4
- package/dist/{spawn-claims-Dn3C_N6w.mjs → spawn-claims-CUleC2cM.mjs} +1 -1
- package/dist/{start-DYkkKF0s.mjs → start-F9gv5dcC.mjs} +147 -98
- package/dist/start-VoFsPSes.mjs +2 -0
- package/dist/{state-NcJzMEBF.mjs → state-WGdIbi_d.mjs} +2 -2
- package/dist/{stats-DG9e66Rz.mjs → stats-BAgJaLA4.mjs} +1 -1
- package/dist/{stats-B63-JVAY.mjs → stats-DBYJ5bxL.mjs} +4 -4
- package/dist/{status-S6ehL4Ui.mjs → status-DLCD-o3s.mjs} +63 -231
- package/dist/status-Dr4fRkym.mjs +216 -0
- package/dist/{guide-status-BAMVU0ZA.mjs → stim-installations-CINXy_su.mjs} +3 -124
- package/dist/{stop-BO28HGqF.mjs → stop-Dj4pfmyv.mjs} +22 -18
- package/dist/{stop-T1R-cZRz.mjs → stop-ZvOeTmKb.mjs} +2 -2
- package/dist/supervisor-run.d.mts +11 -2
- package/dist/supervisor-run.mjs +185 -17
- package/dist/{workspace-process-lock-DWaiRD0e.mjs → workspace-process-lock-BXA96myD.mjs} +2 -2
- package/dist/workspaces-BTUyFfkv.mjs +1003 -0
- package/dist/{worktree-DKhSF0UX.mjs → worktree-4aZg2NnI.mjs} +1 -1
- package/dist/{worktree-LGB-UwgG.mjs → worktree-BMS7GeqB.mjs} +40 -122
- package/dist/{worktree-R_cUlE7s.mjs → worktree-BlizKDpZ.mjs} +143 -18
- package/dist/{xcode-BZqyxh3e.mjs → xcode-B2tBkf0m.mjs} +9 -158
- package/package.json +6 -5
- package/dist/build-progress-CVqkfPC6.mjs +0 -188
- package/dist/device-lease-Crs-HkJY.mjs +0 -366
- package/dist/logs-query-Cqma3WIu.mjs +0 -298
- package/dist/ownership-DCQPuWEc.mjs +0 -489
- package/dist/public-http-probe-CyMDrQ3c.mjs +0 -61
- package/dist/server-expo-CeILEu86.mjs +0 -2
- package/dist/sim-pool-KaIsp2Ft.mjs +0 -723
- package/dist/spawn-entry-nCE6m770.mjs +0 -14
- package/dist/workspace-state-DF2gCFhx.mjs +0 -169
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { basename, dirname, join } from "node:path";
|
|
2
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
-
//#region src/spawn-entry.ts
|
|
4
|
-
const DEV_ENTRIES = {
|
|
5
|
-
"supervisor-run": "./supervisor/run.ts",
|
|
6
|
-
"collector-run": "./collector/run.ts"
|
|
7
|
-
};
|
|
8
|
-
function spawnEntry(name) {
|
|
9
|
-
const here = fileURLToPath(import.meta.url);
|
|
10
|
-
if (basename(dirname(here)) === "src") return fileURLToPath(new URL(DEV_ENTRIES[name], import.meta.url));
|
|
11
|
-
return join(dirname(here), `${name}.mjs`);
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { spawnEntry as t };
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { A as withDirLock, N as readJsonObject, u as getConfigDir } from "./config-Cp9lM3wX.mjs";
|
|
2
|
-
import { existsSync, mkdirSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { join, resolve } from "path";
|
|
4
|
-
import { buildCacheRoot as sharedBuildCache, workspaceId, workspaceName as workspaceName$1, workspaceStateDir as workspaceDir } from "@stim-cli/core";
|
|
5
|
-
import { dirname as dirname$1, join as join$1 } from "node:path";
|
|
6
|
-
//#region src/workspace/paths.ts
|
|
7
|
-
const WORKSPACE_METADATA_FILE_NAME = "workspace.json";
|
|
8
|
-
function workspaceMetadataFile(projectRoot) {
|
|
9
|
-
return join(workspaceDir(projectRoot), WORKSPACE_METADATA_FILE_NAME);
|
|
10
|
-
}
|
|
11
|
-
function ensureWorkspaceStorage(projectRoot) {
|
|
12
|
-
const canonicalRoot = resolve(projectRoot);
|
|
13
|
-
const dir = workspaceDir(canonicalRoot);
|
|
14
|
-
const file = workspaceMetadataFile(canonicalRoot);
|
|
15
|
-
mkdirSync(dir, { recursive: true });
|
|
16
|
-
return withDirLock(join(dir, "metadata.lock"), () => {
|
|
17
|
-
if (!existsSync(file)) {
|
|
18
|
-
const metadata = {
|
|
19
|
-
projectRoot: canonicalRoot,
|
|
20
|
-
workspace: workspaceName$1(canonicalRoot),
|
|
21
|
-
version: 1
|
|
22
|
-
};
|
|
23
|
-
const tmp = `${file}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
24
|
-
writeFileSync(tmp, `${JSON.stringify(metadata, null, 2)}\n`);
|
|
25
|
-
try {
|
|
26
|
-
renameSync(tmp, file);
|
|
27
|
-
} catch (error) {
|
|
28
|
-
rmSync(tmp, { force: true });
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
return dir;
|
|
32
|
-
}
|
|
33
|
-
if (readJsonObject(file)?.projectRoot === canonicalRoot) return dir;
|
|
34
|
-
const error = /* @__PURE__ */ new Error(`Stim workspace collision at ${dir}: its workspace.json does not belong to ${canonicalRoot}.`);
|
|
35
|
-
error.code = "STIM_WORKSPACE_COLLISION";
|
|
36
|
-
throw error;
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function workspaceLogsDir(projectRoot) {
|
|
40
|
-
return join(workspaceDir(projectRoot), "logs");
|
|
41
|
-
}
|
|
42
|
-
function workspaceLogErrorIndex(projectRoot) {
|
|
43
|
-
return join(workspaceDir(projectRoot), "log-error-index.json");
|
|
44
|
-
}
|
|
45
|
-
function workspaceDerivedData(projectRoot) {
|
|
46
|
-
return join(workspaceDir(projectRoot), "derived-data");
|
|
47
|
-
}
|
|
48
|
-
function supervisorPidFile(projectRoot) {
|
|
49
|
-
return join(workspaceDir(projectRoot), "supervisor.pid");
|
|
50
|
-
}
|
|
51
|
-
function workspaceStateFile(projectRoot) {
|
|
52
|
-
return join(workspaceDir(projectRoot), "state.json");
|
|
53
|
-
}
|
|
54
|
-
function workspaceStateLock(projectRoot) {
|
|
55
|
-
return join(workspaceDir(projectRoot), "state.lock");
|
|
56
|
-
}
|
|
57
|
-
function supervisorLogFile(projectRoot) {
|
|
58
|
-
return join(workspaceLogsDir(projectRoot), "supervisor.log");
|
|
59
|
-
}
|
|
60
|
-
function emulatorLogFile(projectRoot) {
|
|
61
|
-
return join(workspaceLogsDir(projectRoot), "emulator.log");
|
|
62
|
-
}
|
|
63
|
-
function sharedCompilationCache() {
|
|
64
|
-
return join(getConfigDir(), "compilation-cache");
|
|
65
|
-
}
|
|
66
|
-
function sharedCcache() {
|
|
67
|
-
return join(getConfigDir(), "ccache");
|
|
68
|
-
}
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region src/workspace/workspace-state.ts
|
|
71
|
-
function readWorkspaceState(root) {
|
|
72
|
-
return readJsonObject(workspaceStateFile(root));
|
|
73
|
-
}
|
|
74
|
-
function withWorkspaceStateLock(root, fn) {
|
|
75
|
-
const file = workspaceStateFile(root);
|
|
76
|
-
return withDirLock(workspaceStateLock(root), fn, { ensureParent: () => {
|
|
77
|
-
ensureWorkspaceStorage(root);
|
|
78
|
-
mkdirSync(dirname$1(file), { recursive: true });
|
|
79
|
-
} });
|
|
80
|
-
}
|
|
81
|
-
function writeWorkspaceState(root, patch) {
|
|
82
|
-
return updateWorkspaceState(root, (state) => ({
|
|
83
|
-
...state,
|
|
84
|
-
...patch
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
function updateWorkspaceState(root, update) {
|
|
88
|
-
return withWorkspaceStateLock(root, () => replaceWorkspaceState(root, update(readWorkspaceState(root) ?? {})));
|
|
89
|
-
}
|
|
90
|
-
function replaceWorkspaceState(root, state) {
|
|
91
|
-
const file = workspaceStateFile(root);
|
|
92
|
-
mkdirSync(dirname$1(file), { recursive: true });
|
|
93
|
-
const tmp = `${file}.tmp-${process.pid}`;
|
|
94
|
-
writeFileSync(tmp, `${JSON.stringify(state, null, 2)}\n`);
|
|
95
|
-
renameSync(tmp, file);
|
|
96
|
-
return state;
|
|
97
|
-
}
|
|
98
|
-
function clearWorkspaceStateKeys(root, keys) {
|
|
99
|
-
if (!existsSync(workspaceStateFile(root))) return;
|
|
100
|
-
withWorkspaceStateLock(root, () => {
|
|
101
|
-
const state = readWorkspaceState(root);
|
|
102
|
-
const file = workspaceStateFile(root);
|
|
103
|
-
if (!state) {
|
|
104
|
-
try {
|
|
105
|
-
rmSync(file, { force: true });
|
|
106
|
-
} catch {}
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
let changed = false;
|
|
110
|
-
for (const key of keys) {
|
|
111
|
-
if (!(key in state)) continue;
|
|
112
|
-
delete state[key];
|
|
113
|
-
changed = true;
|
|
114
|
-
}
|
|
115
|
-
if (!changed) return;
|
|
116
|
-
if (Object.keys(state).length === 0) {
|
|
117
|
-
rmSync(file, { force: true });
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
replaceWorkspaceState(root, state);
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function clearWorkspaceStateKey(root, key, shouldClear) {
|
|
124
|
-
return withWorkspaceStateLock(root, () => {
|
|
125
|
-
const state = readWorkspaceState(root);
|
|
126
|
-
if (!state || !(key in state)) return true;
|
|
127
|
-
if (!shouldClear(state[key])) return false;
|
|
128
|
-
delete state[key];
|
|
129
|
-
const file = workspaceStateFile(root);
|
|
130
|
-
if (Object.keys(state).length === 0) {
|
|
131
|
-
try {
|
|
132
|
-
rmSync(file, { force: true });
|
|
133
|
-
} catch {}
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
|
-
replaceWorkspaceState(root, state);
|
|
137
|
-
return true;
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
function recordWorkspaceUse(root, now = /* @__PURE__ */ new Date()) {
|
|
141
|
-
try {
|
|
142
|
-
writeWorkspaceState(root, { lastUsedAt: now.toISOString() });
|
|
143
|
-
} catch {}
|
|
144
|
-
}
|
|
145
|
-
function lastUseFrom(state, logMtimes) {
|
|
146
|
-
const candidates = [
|
|
147
|
-
Date.parse(String(state?.lastUsedAt ?? "")),
|
|
148
|
-
Date.parse(String(state?.lastBuild?.startedAt ?? "")),
|
|
149
|
-
Date.parse(String(state?.supervisor?.startedAt ?? "")),
|
|
150
|
-
...logMtimes
|
|
151
|
-
].filter(Number.isFinite);
|
|
152
|
-
return candidates.length ? Math.max(...candidates) : NaN;
|
|
153
|
-
}
|
|
154
|
-
function workspaceLastUsed(root) {
|
|
155
|
-
const logs = workspaceLogsDir(root);
|
|
156
|
-
let mtimes = [];
|
|
157
|
-
try {
|
|
158
|
-
mtimes = readdirSync(logs).flatMap((name) => {
|
|
159
|
-
try {
|
|
160
|
-
return [statSync(join$1(logs, name)).mtimeMs];
|
|
161
|
-
} catch {
|
|
162
|
-
return [];
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
} catch {}
|
|
166
|
-
return lastUseFrom(readWorkspaceState(root), mtimes);
|
|
167
|
-
}
|
|
168
|
-
//#endregion
|
|
169
|
-
export { workspaceStateFile as S, workspaceDir as _, updateWorkspaceState as a, workspaceLogsDir as b, writeWorkspaceState as c, sharedBuildCache as d, sharedCcache as f, workspaceDerivedData as g, supervisorPidFile as h, recordWorkspaceUse as i, emulatorLogFile as l, supervisorLogFile as m, clearWorkspaceStateKeys as n, withWorkspaceStateLock as o, sharedCompilationCache as p, readWorkspaceState as r, workspaceLastUsed as s, clearWorkspaceStateKey as t, ensureWorkspaceStorage as u, workspaceId as v, workspaceName$1 as x, workspaceLogErrorIndex as y };
|