stim 1.8.0 → 1.9.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 +23 -155
- package/dist/{android-BRgBYzU0.mjs → android-BPGizezh.mjs} +112 -135
- package/dist/{android-DeYdjjBP.mjs → android-DEgo4oCo.mjs} +2 -2
- package/dist/{android-DWssqHQ8.mjs → android-_y4Ohi5z.mjs} +54 -15
- package/dist/android-cas-compiler.mjs +2 -2
- package/dist/{android-cas-SWIjzeuL.mjs → android-cas-eiExNLf7.mjs} +21 -14
- package/dist/app-install-Uf3a83Tv.mjs +819 -0
- package/dist/{build-lock-CgtsB6TV.mjs → build-lock-DPXPLgTc.mjs} +120 -24
- package/dist/build-progress-CVqkfPC6.mjs +188 -0
- package/dist/{cache-manifest-CYJi8-Hx.mjs → cache-manifest-Dg7OnMrp.mjs} +4 -4
- package/dist/cache-manifest.mjs +1 -1
- package/dist/cli.mjs +22 -19
- package/dist/collector-run.d.mts +2 -0
- package/dist/collector-run.mjs +10 -9
- package/dist/{command-output-B3ycpsYv.mjs → command-output-gByVmIjy.mjs} +11 -2
- package/dist/{config-B7iyKWkL.mjs → config-Cp9lM3wX.mjs} +187 -57
- package/dist/{dependency-state-D0M7oKA7.mjs → dependency-state-Bq5DcLGn.mjs} +2 -2
- package/dist/{deps-oCXVNEqQ.mjs → deps-Cip5vUm1.mjs} +8 -5
- package/dist/{detached-entry-Bpo6ZY_I.mjs → detached-entry-KEu0_AXL.mjs} +1 -1
- package/dist/{device-BUoZyMoR.mjs → dev-client-HyqISM0h.mjs} +1178 -635
- package/dist/{device-RdujjHLB.mjs → device-D4U-xLty.mjs} +13 -20
- package/dist/{device-lease-Ffz_M5t0.mjs → device-lease-Crs-HkJY.mjs} +16 -9
- package/dist/{device-pool-BxRwdufO.mjs → device-pool-CnTAz8X1.mjs} +7 -7
- package/dist/{device-remote-ByN8P6CB.mjs → device-remote-AQ5rQPqr.mjs} +482 -35
- package/dist/{doctor-BMt156qe.mjs → doctor-B_Ei3bZu.mjs} +95 -107
- package/dist/{error-diagnostics-D1Kaf-eT.mjs → error-diagnostics-Vfz83GCF.mjs} +22 -16
- package/dist/exec-jIAlgilk.mjs +132 -0
- package/dist/{gc-v2YcoJvm.mjs → gc-Ckw8RQHi.mjs} +763 -126
- package/dist/{guide-BTAlD1_y.mjs → guide-BiAbhs1J.mjs} +891 -501
- package/dist/{guide-status-Craq9z0t.mjs → guide-status-BAMVU0ZA.mjs} +5 -3
- package/dist/{ios-BcCiI4TS.mjs → ios-BL2NFckr.mjs} +43 -20
- package/dist/{ios-BP04pY5f.mjs → ios-BzUJWk1K.mjs} +141 -175
- package/dist/{ios-device-CauFJiYx.mjs → ios-device-D972i9wf.mjs} +149 -52
- package/dist/{ios-device-CFXA46ez.mjs → ios-device-DPsSm0v_.mjs} +3 -2
- package/dist/launch-verify-Q_OtW1Rf.mjs +365 -0
- package/dist/{logs-CakdBTtm.mjs → logs-CI9NQSK7.mjs} +18 -13
- package/dist/{logs-query-BGL-Pl12.mjs → logs-query-Cqma3WIu.mjs} +36 -28
- package/dist/{metro-C7bcJ0uo.mjs → metro-DrLHaMn2.mjs} +78 -8
- package/dist/{named-ports-DzMOlmaX.mjs → named-ports-CmLQSIRj.mjs} +4 -4
- package/dist/{ndjson-BZwI1NBv.mjs → ndjson-9uFNRwfe.mjs} +36 -3
- package/dist/{ownership-Cp52QAK1.mjs → ownership-D15Op8vN.mjs} +3 -3
- package/dist/{ownership-wolE-0Do.mjs → ownership-DCQPuWEc.mjs} +26 -7
- package/dist/{ports-BIbJaKNW.mjs → ports-BNKoWVWZ.mjs} +3 -3
- package/dist/{process-output-Dl5uKE03.mjs → process-output-Fpl8PYi8.mjs} +1 -1
- package/dist/{project-DDZWf_16.mjs → project-DS112DYB.mjs} +8 -3
- package/dist/{reload-BdypPbjM.mjs → reload-ZNJUo1pl.mjs} +12 -13
- package/dist/{server-bare-BQkyxa_b.mjs → server-bare-DWkkcIxV.mjs} +2 -2
- package/dist/{server-expo-BVAA1OqJ.mjs → server-expo-B_lctBR3.mjs} +8 -7
- package/dist/server-expo-CeILEu86.mjs +2 -0
- package/dist/settings-BKNh5rl4.mjs +376 -0
- package/dist/{settings-BXXorVM2.mjs → settings-D030k0t4.mjs} +464 -152
- package/dist/settings.schema.json +989 -0
- package/dist/{teardown-BJqEzPo_.mjs → sim-pool-KaIsp2Ft.mjs} +14 -419
- package/dist/simslim-B_LsGLuJ.mjs +259 -0
- package/dist/{slot-launch-ZUUe0TQP.mjs → slot-launch-DU9A-gYw.mjs} +4 -4
- package/dist/spawn-claims-Dn3C_N6w.mjs +49 -0
- package/dist/{start-CmxtOKjU.mjs → start-DYkkKF0s.mjs} +27 -31
- package/dist/{state-DZobzxLW.mjs → state-NcJzMEBF.mjs} +5 -3
- package/dist/{stats-CLg5RuDS.mjs → stats-B63-JVAY.mjs} +4 -4
- package/dist/{stats-BYcZ6n1h.mjs → stats-DG9e66Rz.mjs} +66 -5
- package/dist/status-S6ehL4Ui.mjs +932 -0
- package/dist/{stop-C8JW6kKp.mjs → stop-BO28HGqF.mjs} +101 -25
- package/dist/{stop-B1kOpYei.mjs → stop-T1R-cZRz.mjs} +2 -2
- package/dist/supervisor-run.mjs +52 -34
- package/dist/{workspace-process-lock-BYfZz_S-.mjs → workspace-process-lock-DWaiRD0e.mjs} +14 -9
- package/dist/{workspace-state-BT5E3SA2.mjs → workspace-state-DF2gCFhx.mjs} +52 -29
- package/dist/worktree-DKhSF0UX.mjs +2 -0
- package/dist/{worktree-CFLA-6MX.mjs → worktree-LGB-UwgG.mjs} +603 -59
- package/dist/{worktree-FG_ZKKdb.mjs → worktree-R_cUlE7s.mjs} +62 -41
- package/dist/{xcode-B6YaWeg0.mjs → xcode-BZqyxh3e.mjs} +216 -58
- package/package.json +5 -6
- package/skill/SKILL.md +2 -0
- package/dist/app-install-BDbsSgCl.mjs +0 -1175
- package/dist/build-slots-C-oAHRT1.mjs +0 -151
- package/dist/dev-client-BmT-ioFI.mjs +0 -797
- package/dist/exec-B29XNuhP.mjs +0 -77
- package/dist/reclaim-KJ-0uWEF.mjs +0 -361
- package/dist/server-expo-YDDG3eP7.mjs +0 -2
- package/dist/status-DdkLki47.mjs +0 -426
- package/dist/{metro-store-CDDZHtPl.mjs → metro-store-DzeWkfqW.mjs} +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { f as getProject, u as getConfigDir, w as upsertProject } from "./config-Cp9lM3wX.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-jIAlgilk.mjs";
|
|
3
|
+
import { n as appProjectProblem } from "./project-DS112DYB.mjs";
|
|
3
4
|
import { accessSync, constants, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
4
5
|
import { delimiter, join, resolve } from "node:path";
|
|
5
6
|
//#region src/diagnostics/stim-installations.ts
|
|
@@ -163,6 +164,7 @@ function recordDoctorRun(projectRoot, platform, version, now = /* @__PURE__ */ n
|
|
|
163
164
|
version
|
|
164
165
|
};
|
|
165
166
|
try {
|
|
167
|
+
if (appProjectProblem(projectRoot)) return;
|
|
166
168
|
upsertProject(projectRoot, (existing) => {
|
|
167
169
|
const doctorRuns = { ...existing.doctorRuns };
|
|
168
170
|
for (const target of platform ? [platform] : PLATFORMS) doctorRuns[target] = run;
|
|
@@ -245,7 +247,7 @@ function renderGuideStatus({ running, doctor, latest }) {
|
|
|
245
247
|
}
|
|
246
248
|
async function guideStatus({ projectRoot, running, now = /* @__PURE__ */ new Date(), fetch: fetchImpl = fetch }) {
|
|
247
249
|
const doctor = [];
|
|
248
|
-
if (projectRoot) {
|
|
250
|
+
if (projectRoot && !appProjectProblem(projectRoot)) {
|
|
249
251
|
let runs = null;
|
|
250
252
|
try {
|
|
251
253
|
runs = getProject(projectRoot)?.doctorRuns ?? {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-
|
|
1
|
+
import { g as loadConfig } from "./config-Cp9lM3wX.mjs";
|
|
2
|
+
import { t as getExecutor } from "./exec-jIAlgilk.mjs";
|
|
3
|
+
import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
|
|
4
|
+
import { I as IOS_SIMULATOR_APPS } from "./settings-D030k0t4.mjs";
|
|
4
5
|
import { existsSync, mkdtempSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
5
6
|
import { dirname, join, resolve } from "node:path";
|
|
6
7
|
import { tmpdir } from "node:os";
|
|
@@ -29,15 +30,22 @@ const OPEN_OPTIONS = {
|
|
|
29
30
|
killSignal: "SIGKILL"
|
|
30
31
|
};
|
|
31
32
|
function parseIosSimulatorApp(value, source = "iosSimulatorApp in machine config") {
|
|
32
|
-
if (value === void 0
|
|
33
|
-
if (value
|
|
34
|
-
const error = /* @__PURE__ */ new Error(`Invalid ${source}. Use "xcode" or "
|
|
33
|
+
if (value === void 0) return "xcode";
|
|
34
|
+
if (IOS_SIMULATOR_APPS.includes(value)) return value;
|
|
35
|
+
const error = /* @__PURE__ */ new Error(`Invalid ${source}. Use "xcode", "siniulator", or "stim-desktop".`);
|
|
35
36
|
Object.assign(error, { code: "STIM_BAD_ARG" });
|
|
36
37
|
throw error;
|
|
37
38
|
}
|
|
38
39
|
function configuredIosSimulatorViewer(override) {
|
|
39
40
|
const app = override ?? parseIosSimulatorApp(loadConfig()?.iosSimulatorApp);
|
|
40
41
|
const exec = getExecutor();
|
|
42
|
+
if (app === "stim-desktop") return { open: (udid) => {
|
|
43
|
+
exec.runFileQuiet("open", [
|
|
44
|
+
"-a",
|
|
45
|
+
"Stim",
|
|
46
|
+
`stim-desktop://open?udid=${udid}`
|
|
47
|
+
], OPEN_OPTIONS);
|
|
48
|
+
} };
|
|
41
49
|
if (app === "siniulator") return { open: (udid) => {
|
|
42
50
|
exec.runFileQuiet("open", [
|
|
43
51
|
"-a",
|
|
@@ -96,17 +104,29 @@ function parseSimctlList(jsonOutput, { includeUnavailable = false } = {}) {
|
|
|
96
104
|
}
|
|
97
105
|
return sims;
|
|
98
106
|
}
|
|
107
|
+
const SIMCTL_CREATE_TIMEOUT_MS = 18e4;
|
|
108
|
+
const SIMCTL_OPTIONS = {
|
|
109
|
+
timeoutMs: 6e4,
|
|
110
|
+
killSignal: "SIGKILL"
|
|
111
|
+
};
|
|
112
|
+
const SIMCTL_LIST_ARGS = [
|
|
113
|
+
"simctl",
|
|
114
|
+
"list",
|
|
115
|
+
"devices",
|
|
116
|
+
"--json"
|
|
117
|
+
];
|
|
99
118
|
function listAllIosSims({ timeoutMs = 3e4, includeUnavailable = false } = {}) {
|
|
100
|
-
return parseSimctlList(getExecutor().runFile("xcrun",
|
|
101
|
-
"simctl",
|
|
102
|
-
"list",
|
|
103
|
-
"devices",
|
|
104
|
-
"--json"
|
|
105
|
-
], {
|
|
119
|
+
return parseSimctlList(getExecutor().runFile("xcrun", SIMCTL_LIST_ARGS, {
|
|
106
120
|
timeoutMs,
|
|
107
121
|
killSignal: "SIGKILL"
|
|
108
122
|
}), { includeUnavailable });
|
|
109
123
|
}
|
|
124
|
+
async function listAllIosSimsAsync({ timeoutMs = 3e4 } = {}) {
|
|
125
|
+
return parseSimctlList(await getExecutor().runFileAsync("xcrun", SIMCTL_LIST_ARGS, {
|
|
126
|
+
timeoutMs,
|
|
127
|
+
killSignal: "SIGKILL"
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
110
130
|
function parseRuntimeVersion(runtimeId) {
|
|
111
131
|
const m = runtimeId.match(/iOS-(\d+)(?:-(\d+))?$/);
|
|
112
132
|
if (!m) return runtimeId;
|
|
@@ -252,7 +272,7 @@ async function bootIosSim(udid, { timeoutMs = IOS_BOOT_TIMEOUT_MS, attemptMs = B
|
|
|
252
272
|
viewer.open(udid);
|
|
253
273
|
}
|
|
254
274
|
function shutdownIosSim(udid) {
|
|
255
|
-
getExecutor().runQuiet(`xcrun simctl shutdown ${udid}
|
|
275
|
+
getExecutor().runQuiet(`xcrun simctl shutdown ${udid}`, SIMCTL_OPTIONS);
|
|
256
276
|
}
|
|
257
277
|
function listIosDeviceTypes() {
|
|
258
278
|
const out = getExecutor().runFile("xcrun", [
|
|
@@ -350,7 +370,10 @@ function createOwnedIosSim(label, { deviceType, runtime, suffix = "" } = {}, cho
|
|
|
350
370
|
runtime: choice.runtime
|
|
351
371
|
}, suffix);
|
|
352
372
|
return {
|
|
353
|
-
udid: getExecutor().run(`xcrun simctl create "${name}" "${choice.deviceTypeId}" "${choice.runtimeId}"
|
|
373
|
+
udid: getExecutor().run(`xcrun simctl create "${name}" "${choice.deviceTypeId}" "${choice.runtimeId}"`, {
|
|
374
|
+
timeoutMs: SIMCTL_CREATE_TIMEOUT_MS,
|
|
375
|
+
killSignal: "SIGKILL"
|
|
376
|
+
}).trim(),
|
|
354
377
|
name,
|
|
355
378
|
deviceType: choice.deviceType,
|
|
356
379
|
runtime: choice.runtime
|
|
@@ -362,7 +385,7 @@ function renameIosSim(udid, name) {
|
|
|
362
385
|
"rename",
|
|
363
386
|
udid,
|
|
364
387
|
name
|
|
365
|
-
]);
|
|
388
|
+
], SIMCTL_OPTIONS);
|
|
366
389
|
}
|
|
367
390
|
function resetIosPrivacy(udid) {
|
|
368
391
|
getExecutor().runFile("xcrun", [
|
|
@@ -371,7 +394,7 @@ function resetIosPrivacy(udid) {
|
|
|
371
394
|
udid,
|
|
372
395
|
"reset",
|
|
373
396
|
"all"
|
|
374
|
-
]);
|
|
397
|
+
], SIMCTL_OPTIONS);
|
|
375
398
|
}
|
|
376
399
|
function resetIosKeychain(udid) {
|
|
377
400
|
getExecutor().runFile("xcrun", [
|
|
@@ -379,7 +402,7 @@ function resetIosKeychain(udid) {
|
|
|
379
402
|
"keychain",
|
|
380
403
|
udid,
|
|
381
404
|
"reset"
|
|
382
|
-
]);
|
|
405
|
+
], SIMCTL_OPTIONS);
|
|
383
406
|
}
|
|
384
407
|
function uninstallIosApp(udid, bundleId) {
|
|
385
408
|
getExecutor().runFile("xcrun", [
|
|
@@ -387,7 +410,7 @@ function uninstallIosApp(udid, bundleId) {
|
|
|
387
410
|
"uninstall",
|
|
388
411
|
udid,
|
|
389
412
|
bundleId
|
|
390
|
-
]);
|
|
413
|
+
], SIMCTL_OPTIONS);
|
|
391
414
|
}
|
|
392
415
|
function parseUserApps(jsonOutput) {
|
|
393
416
|
const data = JSON.parse(jsonOutput);
|
|
@@ -482,7 +505,7 @@ function deleteIosSim(udid) {
|
|
|
482
505
|
const result = resolveOwnedIosSim(udid);
|
|
483
506
|
if (result.missing) return;
|
|
484
507
|
if (result.notOwned) throw new Error(`Refusing to delete simulator "${result.notOwned}" (${udid}): not a Stim-owned sim (name must start with "stim-").`);
|
|
485
|
-
getExecutor().run(`xcrun simctl delete ${udid}
|
|
508
|
+
getExecutor().run(`xcrun simctl delete ${udid}`, SIMCTL_OPTIONS);
|
|
486
509
|
}
|
|
487
510
|
const PARKED_DELETE_TIMEOUT_MS = 3e4;
|
|
488
511
|
function deleteParkedIosSim(udid) {
|
|
@@ -519,4 +542,4 @@ function listIosRuntimes() {
|
|
|
519
542
|
}));
|
|
520
543
|
}
|
|
521
544
|
//#endregion
|
|
522
|
-
export {
|
|
545
|
+
export { readHostMemoryPressure as A, resolveOwnedIosSim as C, configuredIosSimulatorViewer as D, uninstallIosApp as E, parseIosSimulatorApp as O, resolveIosCreation as S, shutdownIosSim as T, parseRuntimeVersion as _, deleteIosSim as a, resetIosKeychain as b, iosRuntimeMatches as c, listAllIosSimsAsync as d, listIosDeviceTypes as f, parkedSimName as g, ownedSimName as h, createOwnedIosSim as i, hostMemoryPressureAdvice as k, iosSimulatorFailureAdvice as l, listUserApps as m, bootIosSim as n, deleteParkedIosSim as o, listIosRuntimes as p, clearAppDataContainer as r, findAppDataContainer as s, IOS_BOOT_TIMEOUT_MS as t, listAllIosSims as u, parseSimctlList as v, sanitizeDeviceLabel as w, resetIosPrivacy as x, renameIosSim as y };
|