stim 1.12.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-CCZJs__P.mjs → activity-DfVKZTEB.mjs} +42 -25
- package/dist/{android-BQiKJYK0.mjs → android-BHfAu2mf.mjs} +1 -1
- package/dist/{android-B7X-8H7h.mjs → android-CD8pr8Q2.mjs} +62 -47
- package/dist/{android-cas-DzLPXiEn.mjs → android-cas-B9Kv9aIy.mjs} +9 -7
- package/dist/{android-75Sk2rIR.mjs → android-qx_31wJo.mjs} +395 -116
- package/dist/{app-install-CsZi0SAT.mjs → app-install-CDFY2nUL.mjs} +1 -1
- package/dist/{budget-DbzW5VTD.mjs → budget-E5o91NR1.mjs} +154 -37
- package/dist/{build-plan-CqntbR7b.mjs → build-plan-BTa93o_r.mjs} +21 -88
- package/dist/{build-progress-h60GPV27.mjs → build-progress-l7d-X-ZP.mjs} +75 -7
- package/dist/cdp-Dq_ypAlJ.mjs +115 -0
- package/dist/chrome-B5hWgQJS.mjs +61 -0
- package/dist/cli.mjs +16 -15
- package/dist/collector-run.mjs +14 -8
- package/dist/{command-output-BWCj5Vh-.mjs → command-output-BIL7rlX7.mjs} +1 -1
- package/dist/created-devices-Cd558h31.mjs +37 -0
- package/dist/{deps-CO-_7UOm.mjs → deps-2Wo81np9.mjs} +1 -1
- package/dist/{device-9r9xRYDa.mjs → device-Cf7vl-so.mjs} +6 -6
- package/dist/{device-lease-B9LAXIUH.mjs → device-lease-CL9dZf73.mjs} +52 -3
- package/dist/{device-pool-BoezJd-c.mjs → device-pool-MuoiyRcu.mjs} +3 -3
- package/dist/{device-remote-C0_o-tJH.mjs → device-remote-DT9ngZiD.mjs} +10 -10
- package/dist/{doctor-LfDlbR-N.mjs → doctor-D2iysNNH.mjs} +47 -18
- package/dist/{error-diagnostics-CCxjn31V.mjs → error-diagnostics-BoiOhck8.mjs} +6 -6
- package/dist/{gc-C4nQFcTX.mjs → gc-eA-PRBX8.mjs} +853 -126
- package/dist/{guide-BPBlh9ML.mjs → guide-BfZ0OmiP.mjs} +736 -110
- package/dist/{guide-status-i9ogHt4v.mjs → guide-status-BaMYu55M.mjs} +1 -1
- package/dist/{idle-S3tFZ53_.mjs → idle-DxLi5OkN.mjs} +42 -9
- package/dist/{in-use-D9XYEgFD.mjs → in-use-wYEaKQM9.mjs} +9 -5
- package/dist/{ios-CDzWL1mj.mjs → ios-CcfCeZ19.mjs} +98 -54
- package/dist/{ios-CZWOHTTc.mjs → ios-CmEzZiOj.mjs} +10 -5
- package/dist/{ios-device-D9cLxVr5.mjs → ios-device-BW-t_Lkv.mjs} +1 -1
- package/dist/{launch-verify-B2oR_kFN.mjs → launch-verify-CuJaBpEa.mjs} +33 -20
- package/dist/{logs-SzuYudOj.mjs → logs-DcSRbC2t.mjs} +11 -10
- package/dist/{metro-Dzo30hvJ.mjs → metro-BPeY1YMh.mjs} +4 -4
- package/dist/{named-ports-Dn1o61D9.mjs → named-ports-n7tnJsI8.mjs} +78 -6
- package/dist/native-runtime-CiiFHt0e.mjs +74 -0
- package/dist/{ownership-Dqnrjrio.mjs → ownership-Bz2kETAS.mjs} +1 -1
- package/dist/{ownership-B8d4kXBx.mjs → ownership-PUP4Dwai.mjs} +134 -209
- package/dist/page-BTu7I60K.mjs +29 -0
- package/dist/{ports-Dp_QTwTC.mjs → ports-C5UutqpJ.mjs} +4 -4
- package/dist/{project-B8rbutVC.mjs → project-DGeclhvO.mjs} +53 -17
- package/dist/{reload-nocmx8KB.mjs → reload-C-cV5yy_.mjs} +79 -20
- package/dist/{remote-cache-BRsRZru5.mjs → remote-cache--aehr4Pr.mjs} +3 -3
- package/dist/{server-bare-Gn3ssSdK.mjs → server-bare-Bq8BpSIo.mjs} +1 -1
- package/dist/server-expo-BeYwP_Xy.mjs +2 -0
- package/dist/{server-expo-CeT1nIIk.mjs → server-expo-DUCg52-K.mjs} +2 -2
- package/dist/{settings-bE-Gu3Ti.mjs → settings-ssVBToDR.mjs} +10 -10
- package/dist/{settings-BlyDn2Oz.mjs → settings-xB0Frkg6.mjs} +11 -2
- package/dist/settings.schema.json +53 -1
- package/dist/{simslim-COtEEP7x.mjs → simslim-Bbg9UWrt.mjs} +12 -6
- package/dist/{slot-launch-DIACGEfH.mjs → slot-launch-BIWEW-wI.mjs} +3 -3
- package/dist/{start-BboE1HIS.mjs → start-BZhItkiL.mjs} +11 -10
- package/dist/{start-BFstVBlx.mjs → start-Rw2GD3nV.mjs} +1 -1
- package/dist/{state-DcDgzfu3.mjs → state-DwAU2_-D.mjs} +1 -1
- package/dist/state-l1pYwOre.mjs +148 -0
- package/dist/{stats-DiCtmluY.mjs → stats-CaSwmsSZ.mjs} +2 -2
- package/dist/{status-DI9Tjo7T.mjs → status-TJlL0HWo.mjs} +624 -103
- package/dist/{status-BUASYyy_.mjs → status-sszP4XKU.mjs} +59 -2
- package/dist/{stim-desktop-D0xhpZt8.mjs → stim-desktop-CXt8-Z3J.mjs} +13 -2
- package/dist/{stop-Bn6v-GvS.mjs → stop-BZ2qMiBP.mjs} +37 -12
- package/dist/{stop-BI7QY76M.mjs → stop-DskDKNTU.mjs} +2 -2
- package/dist/supervisor-run.mjs +10 -10
- 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-B5sTRskL.mjs → worktree-3cBa-bQt.mjs} +1 -1
- package/dist/{worktree-ChDL5fO1.mjs → worktree-D4Do_XiQ.mjs} +226 -19
- package/dist/{xcode-BzplpQzc.mjs → xcode-LM6A8cNZ.mjs} +5 -5
- package/package.json +5 -5
- package/dist/server-expo-eWi9Coof.mjs +0 -2
- package/dist/workspace-process-lock-BvvJTfo_.mjs +0 -57
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { U as projectDeviceSlots, z as deviceSlotKey } from "./config-0jCcMM0E.mjs";
|
|
2
|
-
import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-
|
|
2
|
+
import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-BIL7rlX7.mjs";
|
|
3
|
+
import { r as cdpEndpoint } from "./state-l1pYwOre.mjs";
|
|
3
4
|
import { sep } from "path";
|
|
4
5
|
//#region src/status.ts
|
|
5
6
|
const IOS_SIM_MB = 1500;
|
|
6
7
|
const ANDROID_EMULATOR_MB = 2500;
|
|
7
8
|
const METRO_MB = 700;
|
|
9
|
+
const BROWSER_MB = 500;
|
|
8
10
|
function remoteDeviceState(record, ledger, root) {
|
|
9
11
|
if (!record) return null;
|
|
10
12
|
const claim = ledger.claims.get(record.sessionId);
|
|
@@ -142,6 +144,49 @@ function environmentState(project, { simsByUdid = {}, metro = null, worktrees =
|
|
|
142
144
|
remoteDevices: remote ? [remote] : []
|
|
143
145
|
};
|
|
144
146
|
}
|
|
147
|
+
/** Adds the workspace's owned Chrome to its status: the web entry, its memory, and an unverifiable browser. */
|
|
148
|
+
function withWebFacts(state, web) {
|
|
149
|
+
if (!web) return state;
|
|
150
|
+
const running = web.status === "running";
|
|
151
|
+
const issues = [...state.issues];
|
|
152
|
+
if (web.status === "orphaned") issues.push({
|
|
153
|
+
code: "browser-orphaned",
|
|
154
|
+
severity: "warning",
|
|
155
|
+
message: `the owned Chrome (pid ${web.record.chromeProcess?.pid}) runs without its supervisor, so its page logs are not captured`,
|
|
156
|
+
remedy: "stim stop",
|
|
157
|
+
workspace: state.path
|
|
158
|
+
});
|
|
159
|
+
if (web.status === "unverified") issues.push({
|
|
160
|
+
code: "browser-unverified",
|
|
161
|
+
severity: "error",
|
|
162
|
+
message: `browser supervisor pid ${web.record.pid} or its Chrome could not be verified`,
|
|
163
|
+
remedy: "stim guide errors teardown",
|
|
164
|
+
workspace: state.path
|
|
165
|
+
});
|
|
166
|
+
return {
|
|
167
|
+
...state,
|
|
168
|
+
live: state.live || running || web.status === "orphaned",
|
|
169
|
+
memoryMb: state.memoryMb + (running || web.status === "orphaned" ? BROWSER_MB : 0),
|
|
170
|
+
warnings: issues.map(issueText),
|
|
171
|
+
issues,
|
|
172
|
+
web: webBrowserState(web)
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function webBrowserState({ record, status }) {
|
|
176
|
+
const running = status === "running";
|
|
177
|
+
return {
|
|
178
|
+
browser: "chrome",
|
|
179
|
+
version: record.version ?? null,
|
|
180
|
+
running,
|
|
181
|
+
pid: running ? record.chromeProcess?.pid ?? null : null,
|
|
182
|
+
supervisorPid: running ? record.pid : null,
|
|
183
|
+
url: record.url,
|
|
184
|
+
headless: record.headless,
|
|
185
|
+
viewport: record.viewport,
|
|
186
|
+
profile: record.profile,
|
|
187
|
+
cdpEndpoint: running ? cdpEndpoint(record.cdpPort) : null
|
|
188
|
+
};
|
|
189
|
+
}
|
|
145
190
|
function androidIssues(android, recordedSerial, runtime, expected) {
|
|
146
191
|
const issues = [];
|
|
147
192
|
if (runtime.serial && recordedSerial && runtime.serial !== recordedSerial) issues.push(["avd-serial-changed", `owned AVD ${android.avdName} changed serial (${recordedSerial} -> ${runtime.serial}), so Metro forwarding is lost; rerun with the same build options, then reopen agent-device on ${runtime.serial}`]);
|
|
@@ -153,6 +198,18 @@ function androidIssues(android, recordedSerial, runtime, expected) {
|
|
|
153
198
|
function issueText(issue) {
|
|
154
199
|
return `${issue.slot ? `${issue.slot}: ` : ""}${issue.message}; run \`${issue.remedy}\``;
|
|
155
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Activity as status reports it: `lastActivityAt` rounded down to the minute, the precision its readers show, so a
|
|
203
|
+
* new log record within the same minute does not change the payload.
|
|
204
|
+
*/
|
|
205
|
+
function statusActivity(activity) {
|
|
206
|
+
const at = Date.parse(activity.lastActivityAt ?? "");
|
|
207
|
+
if (!Number.isFinite(at)) return activity;
|
|
208
|
+
return {
|
|
209
|
+
...activity,
|
|
210
|
+
lastActivityAt: (/* @__PURE__ */ new Date(at - at % 6e4)).toISOString()
|
|
211
|
+
};
|
|
212
|
+
}
|
|
156
213
|
function activityLabel(activity, now) {
|
|
157
214
|
if (!activity) return null;
|
|
158
215
|
if (activity.state === "driven") {
|
|
@@ -272,4 +329,4 @@ function deviceLeaseLines(states, now) {
|
|
|
272
329
|
return lines;
|
|
273
330
|
}
|
|
274
331
|
//#endregion
|
|
275
|
-
export { deviceLeaseStates as a, formatSpace as c, poolLine as d, remoteDeviceLine as f, unprovisionedWorktrees as h, deviceLeaseLines as i, gitSummaryText as l,
|
|
332
|
+
export { withWebFacts as _, deviceLeaseStates as a, formatSpace as c, poolLine as d, remoteDeviceLine as f, unprovisionedWorktrees as g, tightVolumes as h, deviceLeaseLines as i, gitSummaryText as l, statusActivity as m, activityLabel as n, diskLine as o, remoteDeviceState as p, capacity as r, environmentState as s, RECENT_LAUNCH_MS as t, parseDfFree as u };
|
|
@@ -2,8 +2,19 @@ import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
|
|
|
2
2
|
//#region src/devices/stim-desktop.ts
|
|
3
3
|
const LAUNCH_SERVICES_LOOKUP = `ObjC.import('AppKit'); const url = $.NSWorkspace.sharedWorkspace.URLForApplicationWithBundleIdentifier('dev.stim.desktop'); url.isNil() ? '' : url.path.js`;
|
|
4
4
|
const STIM_DESKTOP_INSTALLED = "Stim Desktop installed";
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* macOS `open` passes its environment to an app it launches, so Stim Desktop
|
|
7
|
+
* started by a command run under a scoped `STIM_HOME` would serve that home.
|
|
8
|
+
*/
|
|
9
|
+
const STIM_DESKTOP_OPEN_OPTIONS = {
|
|
10
|
+
timeoutMs: 5e3,
|
|
11
|
+
killSignal: "SIGKILL",
|
|
12
|
+
omitEnv: ["STIM_HOME"]
|
|
13
|
+
};
|
|
14
|
+
/** Stim Desktop sets `STIM_DESKTOP_APP` to its bundle path for every command it runs; a non-empty value means Desktop is installed. */
|
|
15
|
+
function stimDesktopInstalled(platform = process.platform, env = process.env) {
|
|
6
16
|
if (platform !== "darwin") return false;
|
|
17
|
+
if (env.STIM_DESKTOP_APP) return true;
|
|
7
18
|
const found = getExecutor().runFileQuiet("osascript", [
|
|
8
19
|
"-l",
|
|
9
20
|
"JavaScript",
|
|
@@ -26,4 +37,4 @@ function settingDefault(setting, desktopInstalled = stimDesktopInstalled) {
|
|
|
26
37
|
};
|
|
27
38
|
}
|
|
28
39
|
//#endregion
|
|
29
|
-
export {
|
|
40
|
+
export { settingDefault as n, stimDesktopInstalled as r, STIM_DESKTOP_OPEN_OPTIONS as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { A as ownership_claim_exports, B as deviceSlotPlatforms, E as withConfigLock, G as validateDeviceSlot, H as parseDeviceSlotOption, O as process_identity_exports, T as upsertProject, U as projectDeviceSlots, V as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-0jCcMM0E.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
import { a as clearRemoteSession, c as readMetroTunnel, i as clearManagedMetroTunnel, o as clearWorkspaceLaunches, s as clearWorkspaceSupervisor, u as readRemoteSession } from "./state-
|
|
5
|
-
import {
|
|
6
|
-
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-
|
|
7
|
-
import { u as releaseWorkspaceLeases } from "./device-lease-
|
|
8
|
-
import {
|
|
9
|
-
import { n as verifyCollectorOwnership } from "./ownership-
|
|
10
|
-
import { f as resolveEasCliBin } from "./remote-cache
|
|
11
|
-
import { _ as describeNativeRunHolder, b as requestNativeRunCancel, f as NATIVE_RUN_LOCK, g as decideStopAction, h as clearNativeRunCancel, i as endRecordedSession, p as NATIVE_RUN_WAIT_MS, v as nativeRunHolder, y as nativeRunWaitNotice } from "./device-remote-
|
|
2
|
+
import { a as pidExists, b as writeWorkspaceState, c as resolveProjectMetro, h as readWorkspaceState, k as workspaceDir, l as signalProcessTree, m as clearWorkspaceStateKeys, n as killMetroTree, v as withWorkspaceStateLock } from "./metro-BPeY1YMh.mjs";
|
|
3
|
+
import { i as findCommandWorkspace } from "./project-DGeclhvO.mjs";
|
|
4
|
+
import { a as clearRemoteSession, c as readMetroTunnel, i as clearManagedMetroTunnel, o as clearWorkspaceLaunches, s as clearWorkspaceSupervisor, u as readRemoteSession } from "./state-DwAU2_-D.mjs";
|
|
5
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-n7tnJsI8.mjs";
|
|
6
|
+
import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-BIL7rlX7.mjs";
|
|
7
|
+
import { u as releaseWorkspaceLeases } from "./device-lease-CL9dZf73.mjs";
|
|
8
|
+
import { f as teardownOwnedAvd, i as stopTunnel, m as teardownOwnedIosSim, p as teardownOwnedBrowser, t as resolveSupervisorTarget } from "./ownership-PUP4Dwai.mjs";
|
|
9
|
+
import { n as verifyCollectorOwnership } from "./ownership-Bz2kETAS.mjs";
|
|
10
|
+
import { f as resolveEasCliBin } from "./remote-cache--aehr4Pr.mjs";
|
|
11
|
+
import { _ as describeNativeRunHolder, b as requestNativeRunCancel, f as NATIVE_RUN_LOCK, g as decideStopAction, h as clearNativeRunCancel, i as endRecordedSession, p as NATIVE_RUN_WAIT_MS, v as nativeRunHolder, y as nativeRunWaitNotice } from "./device-remote-DT9ngZiD.mjs";
|
|
12
12
|
import chalk from "chalk";
|
|
13
13
|
//#region src/commands/stop.ts
|
|
14
14
|
const DEFAULT_WAIT_MS = 1e4;
|
|
@@ -148,6 +148,7 @@ async function runStop(options) {
|
|
|
148
148
|
return true;
|
|
149
149
|
},
|
|
150
150
|
clearRegistration: async () => true,
|
|
151
|
+
teardownBrowser: null,
|
|
151
152
|
releaseLeases: (projectRoot) => releaseWorkspaceLeases(projectRoot, { slot })
|
|
152
153
|
});
|
|
153
154
|
result.outcomes.port = {
|
|
@@ -162,7 +163,7 @@ async function runStop(options) {
|
|
|
162
163
|
result.summary = summarize(root, result.outcomes, result.ok);
|
|
163
164
|
return result;
|
|
164
165
|
}
|
|
165
|
-
async function stopWorkspace({ root, project = void 0, state = void 0, collectors = void 0, signalCollector = (pid) => signalProcessTree(pid), verifyCollector = verifyCollectorOwnership, clearCollectors = clearCollectorState, isAlive = pidExists, killGroup = killMetroTree, signalServer = (pid) => signalProcessTree(pid), inspectIdentity = process_identity_exports.inspectProcessIdentity, waitForDeath = void 0, waitMs = DEFAULT_WAIT_MS, resolveMetro = resolveProjectMetro, teardownIos = teardownOwnedIosSim, teardownAvd = teardownOwnedAvd, remoteDevice = void 0, teardownRemoteSession = defaultTeardownRemoteSession, metroTunnel = void 0, stopMetroTunnel = stopTunnel, releaseLeases = releaseWorkspaceLeases, freePort = defaultFreePort, clearRegistration = defaultClearRegistration, clearState = clearSupervisorState, report = (line) => console.error(line) }) {
|
|
166
|
+
async function stopWorkspace({ root, project = void 0, state = void 0, collectors = void 0, signalCollector = (pid) => signalProcessTree(pid), verifyCollector = verifyCollectorOwnership, clearCollectors = clearCollectorState, isAlive = pidExists, killGroup = killMetroTree, signalServer = (pid) => signalProcessTree(pid), inspectIdentity = process_identity_exports.inspectProcessIdentity, waitForDeath = void 0, waitMs = DEFAULT_WAIT_MS, resolveMetro = resolveProjectMetro, teardownIos = teardownOwnedIosSim, teardownAvd = teardownOwnedAvd, teardownBrowser = (projectRoot) => teardownOwnedBrowser(projectRoot), remoteDevice = void 0, teardownRemoteSession = defaultTeardownRemoteSession, metroTunnel = void 0, stopMetroTunnel = stopTunnel, releaseLeases = releaseWorkspaceLeases, freePort = defaultFreePort, clearRegistration = defaultClearRegistration, clearState = clearSupervisorState, report = (line) => console.error(line) }) {
|
|
166
167
|
const proj = project === void 0 ? getProject(root) : project;
|
|
167
168
|
const sup = state === void 0 ? readSupervisorState(root) : state;
|
|
168
169
|
const collectorRecords = collectors === void 0 ? readCollectorState(root) : collectors;
|
|
@@ -315,6 +316,8 @@ async function stopWorkspace({ root, project = void 0, state = void 0, collector
|
|
|
315
316
|
});
|
|
316
317
|
if (Object.values(outcomes.device).some((device) => device?.status === "failed")) ok = false;
|
|
317
318
|
}
|
|
319
|
+
outcomes.device.web = await closeBrowser(root, teardownBrowser, report);
|
|
320
|
+
if (outcomes.device.web && outcomes.device.web.status !== "shut-down") ok = false;
|
|
318
321
|
const remote = remoteDevice === void 0 ? readRemoteSession(root) : remoteDevice;
|
|
319
322
|
const sessionId = typeof remote?.sessionId === "string" ? remote.sessionId : null;
|
|
320
323
|
if (sessionId) {
|
|
@@ -664,6 +667,28 @@ function reportDevice(label, r, report, kind) {
|
|
|
664
667
|
remedy
|
|
665
668
|
};
|
|
666
669
|
}
|
|
670
|
+
async function closeBrowser(root, teardownBrowser, report) {
|
|
671
|
+
if (!teardownBrowser) return null;
|
|
672
|
+
const r = await teardownBrowser(root);
|
|
673
|
+
if (r.status === "missing") return null;
|
|
674
|
+
if (r.status === "torn-down") {
|
|
675
|
+
report(chalk.green(phaseLine("device", `closed ${r.label}; its profile is kept`)));
|
|
676
|
+
return {
|
|
677
|
+
status: "shut-down",
|
|
678
|
+
label: "Chrome"
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
const remedy = "run `stim status`, then `stim guide errors teardown`";
|
|
682
|
+
report(chalk.red(phaseLine("device", `did not close the owned Chrome: ${r.reason}`)));
|
|
683
|
+
report(chalk.dim(phaseLine("", remedy)));
|
|
684
|
+
return {
|
|
685
|
+
status: r.status,
|
|
686
|
+
kind: r.kind ?? null,
|
|
687
|
+
label: "Chrome",
|
|
688
|
+
reason: r.reason,
|
|
689
|
+
remedy
|
|
690
|
+
};
|
|
691
|
+
}
|
|
667
692
|
function summarize(root, outcomes, ok) {
|
|
668
693
|
const parts = [];
|
|
669
694
|
if (outcomes.supervisor.status === "stopped") parts.push(`supervisor pid ${outcomes.supervisor.pid} stopped`);
|
|
@@ -851,7 +876,7 @@ async function stopWorkspaceNow({ root, slot, report = (line) => console.error(l
|
|
|
851
876
|
}
|
|
852
877
|
function stopCommand(program) {
|
|
853
878
|
program.command("stop").description("The inverse of `start`: halt this workspace's supervisor, shut the owned device down (never deleted), and free the reserved port. Non-destructive -- the device stays assigned, so coming back costs a boot. Acts on the current workspace.").option("--slot <name>", "Stop only this device slot, keeping the shared server running. Use 'default' for the workspace's default device.", parseDeviceSlotOption).option("--json", "print the per-step outcomes as JSON").action(async (opts) => {
|
|
854
|
-
const root =
|
|
879
|
+
const root = findCommandWorkspace(process.cwd());
|
|
855
880
|
if (!root) {
|
|
856
881
|
refuseNoProject({ json: Boolean(opts.json) });
|
|
857
882
|
return;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as resolveSupervisorTarget } from "./ownership-
|
|
2
|
-
import { a as resolveCollectorTargets, c as stopWorkspaceNow, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-
|
|
1
|
+
import { t as resolveSupervisorTarget } from "./ownership-PUP4Dwai.mjs";
|
|
2
|
+
import { a as resolveCollectorTargets, c as stopWorkspaceNow, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-BZ2qMiBP.mjs";
|
|
3
3
|
export { clearCollectorState, clearSupervisorState, stopCommand as default, readCollectorState, readSupervisorState, resolveCollectorTargets, resolveSupervisorTarget, runStop, stopWorkspaceNow };
|
package/dist/supervisor-run.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { O as process_identity_exports, U as projectDeviceSlots, V as parseDeviceSlotKey, o as clearSupervisor, p as getProject, w as setSupervisor } from "./config-0jCcMM0E.mjs";
|
|
2
2
|
import { r as createNdjsonWriter } from "./ndjson-CDY9IkVC.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { r as detectIsExpo } from "./project-
|
|
3
|
+
import { M as workspaceLogsDir, b as writeWorkspaceState, h as readWorkspaceState$1, m as clearWorkspaceStateKeys, v as withWorkspaceStateLock } from "./metro-BPeY1YMh.mjs";
|
|
4
|
+
import { r as detectIsExpo } from "./project-DGeclhvO.mjs";
|
|
5
5
|
import { t as describeError } from "./errors-B6W7FkxQ.mjs";
|
|
6
6
|
import { t as relaunchWithLogFile } from "./detached-entry-DJHoca49.mjs";
|
|
7
|
-
import { l as readPidFile, n as MODE_EXPO, p as writePidFile, r as clearExpoMetroTunnel, s as clearWorkspaceSupervisor, t as MODE_BARE } from "./state-
|
|
8
|
-
import {
|
|
9
|
-
import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-
|
|
10
|
-
import { n as createActivityReader } from "./activity-
|
|
11
|
-
import {
|
|
12
|
-
import { s as workspaceBuildInProgress } from "./idle-
|
|
13
|
-
import { n as withIdleWorkspace } from "./in-use-
|
|
7
|
+
import { l as readPidFile, n as MODE_EXPO, p as writePidFile, r as clearExpoMetroTunnel, s as clearWorkspaceSupervisor, t as MODE_BARE } from "./state-DwAU2_-D.mjs";
|
|
8
|
+
import { a as withWorkspaceProcessLock } from "./named-ports-n7tnJsI8.mjs";
|
|
9
|
+
import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-CL9dZf73.mjs";
|
|
10
|
+
import { n as createActivityReader } from "./activity-DfVKZTEB.mjs";
|
|
11
|
+
import { R as ownedAvdSerialResolver } from "./android-qx_31wJo.mjs";
|
|
12
|
+
import { s as workspaceBuildInProgress } from "./idle-DxLi5OkN.mjs";
|
|
13
|
+
import { n as withIdleWorkspace } from "./in-use-wYEaKQM9.mjs";
|
|
14
14
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
15
15
|
import { LOG_ROTATE_BYTES } from "@stim-cli/core";
|
|
16
16
|
import { IDLE_STOP_KEY } from "@stim-cli/core/state";
|
|
@@ -264,7 +264,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
|
|
|
264
264
|
return writer.write(entry);
|
|
265
265
|
} });
|
|
266
266
|
try {
|
|
267
|
-
server = await (mode === "expo-child" ? startExpo || (await import("./server-expo-
|
|
267
|
+
server = await (mode === "expo-child" ? startExpo || (await import("./server-expo-BeYwP_Xy.mjs")).startExpoServer : startBare || (await import("./server-bare-Bq8BpSIo.mjs")).startBareServer)({
|
|
268
268
|
root,
|
|
269
269
|
port,
|
|
270
270
|
logsDir,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { WebViewport } from "@stim-cli/core/state";
|
|
2
|
+
//#region src/web/run.d.ts
|
|
3
|
+
interface WebSupervisorOptions {
|
|
4
|
+
root: string;
|
|
5
|
+
launchId: string | null;
|
|
6
|
+
chrome: string;
|
|
7
|
+
url: string;
|
|
8
|
+
port: number;
|
|
9
|
+
headless: boolean;
|
|
10
|
+
viewport: WebViewport;
|
|
11
|
+
ignoreCertificateErrors: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function parseArgs(argv: string[]): WebSupervisorOptions | {
|
|
14
|
+
error: string;
|
|
15
|
+
};
|
|
16
|
+
declare function runWebSupervisor(options: WebSupervisorOptions, { onExit, stderr }?: {
|
|
17
|
+
onExit?: (code: number) => void;
|
|
18
|
+
stderr?: (line: string) => void;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
declare function main(argv?: string[]): Promise<void>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { WebSupervisorOptions, main, parseArgs, runWebSupervisor };
|