stim 1.3.1 → 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.
Files changed (67) hide show
  1. package/README.md +16 -3
  2. package/dist/{android-hMj83VpN.mjs → android-DJWiTBkz.mjs} +65 -72
  3. package/dist/{android-cas-DXorPCi_.mjs → android-cas-CSS8gjR7.mjs} +15 -12
  4. package/dist/{android-CT-PkXUh.mjs → android-sobvO9ia.mjs} +197 -114
  5. package/dist/{app-install-DIp9riNx.mjs → app-install--PAocWvq.mjs} +2 -2
  6. package/dist/{build-slots-C4AouyNz.mjs → build-slots-CuPszJDu.mjs} +7 -8
  7. package/dist/{cache-manifest-CXR-Y8pH.mjs → cache-manifest-uoOKhgUD.mjs} +1 -1
  8. package/dist/cache-manifest.mjs +1 -1
  9. package/dist/cli.mjs +14 -13
  10. package/dist/collector-run.mjs +4 -4
  11. package/dist/{command-output-8wHMEde0.mjs → command-output-BuIb_ZOI.mjs} +1 -4
  12. package/dist/{config-CcefMY2Q.mjs → config-DMP7L7H6.mjs} +52 -52
  13. package/dist/dependency-state-CTL8A9p3.mjs +76 -0
  14. package/dist/{deps-0Yt0Inly.mjs → deps-BAGOnrc7.mjs} +1 -1
  15. package/dist/{dev-client-VfSZNLT4.mjs → dev-client-BoifdqkU.mjs} +12 -12
  16. package/dist/{device-Bbv45Z9Z.mjs → device-BUw4JBuH.mjs} +7 -7
  17. package/dist/{xcode-xnxyvJkD.mjs → device-DvKJ454A.mjs} +208 -967
  18. package/dist/{device-lease-CJwK7OZr.mjs → device-lease-r7yEQ1R8.mjs} +3 -3
  19. package/dist/{device-pool-CcBNTvM7.mjs → device-pool-DU4FQKp5.mjs} +4 -4
  20. package/dist/{device-remote-DAA0Zm6Z.mjs → device-remote-BTUqbl0i.mjs} +7 -6
  21. package/dist/{doctor-B4EITgQB.mjs → doctor-Di_B26uh.mjs} +396 -117
  22. package/dist/{error-diagnostics-DwhNBFDU.mjs → error-diagnostics-CTePWAzW.mjs} +7 -6
  23. package/dist/{gc-BRu62v4o.mjs → gc-C20dWw_8.mjs} +61 -27
  24. package/dist/{guide-D95E0u3i.mjs → guide-sAnoty2y.mjs} +151 -20
  25. package/dist/guide-status-BF6RsJJp.mjs +271 -0
  26. package/dist/{ios-DAju3TVy.mjs → ios-BdpkncL6.mjs} +2667 -2607
  27. package/dist/{ios-device-CWOM_S44.mjs → ios-device-DJOi9FR5.mjs} +1 -1
  28. package/dist/{logs-CAdwW6c2.mjs → logs-BfQdIhiF.mjs} +5 -5
  29. package/dist/metro-ato6ef3J.mjs +99 -0
  30. package/dist/named-ports-DH9SXd0f.mjs +137 -0
  31. package/dist/{ownership-8O073GIC.mjs → ownership-CD_XnpDu.mjs} +5 -5
  32. package/dist/{ownership-DXcol4oU.mjs → ownership-CVY9cqCr.mjs} +6 -6
  33. package/dist/ports-A6uTJSPj.mjs +39 -0
  34. package/dist/ports-BZprTJRa.mjs +90 -0
  35. package/dist/{project-fKmuIaMI.mjs → project-B_SDt4ip.mjs} +2 -2
  36. package/dist/{reclaim-CUmwucWG.mjs → reclaim-C_rB25f4.mjs} +20 -13
  37. package/dist/{reload-CWpXoOgN.mjs → reload-CYBJbJfI.mjs} +8 -8
  38. package/dist/rolldown-runtime-BsOwBuO_.mjs +30 -0
  39. package/dist/{server-bare-DEzPZLvf.mjs → server-bare-H3pAhbMs.mjs} +11 -35
  40. package/dist/server-expo-CSwUVYOa.mjs +2 -0
  41. package/dist/{server-expo-DizT4OMk.mjs → server-expo-Ds8_mfng.mjs} +6 -14
  42. package/dist/{settings-DEJf6_kJ.mjs → settings-kO2ZqIKy.mjs} +2 -2
  43. package/dist/{slot-launch-CZklomj6.mjs → slot-launch-BpHiHH6A.mjs} +4 -4
  44. package/dist/{start-B5G4NjiA.mjs → start-DiEfqEWk.mjs} +20 -22
  45. package/dist/state-CnWzvCWP.mjs +131 -0
  46. package/dist/{stats-CaaQr4yN.mjs → stats-DHrO0frH.mjs} +4 -4
  47. package/dist/{stats-BR-kwj0B.mjs → stats-Fo9ACIv7.mjs} +1 -1
  48. package/dist/{status-CI9clRSb.mjs → status-J5LAXpag.mjs} +15 -12
  49. package/dist/{stop-CjlgDk0a.mjs → stop-0jJNahwN.mjs} +15 -14
  50. package/dist/{stop-CQhffpmX.mjs → stop-CM1fejKW.mjs} +2 -2
  51. package/dist/supervisor-run.d.mts +7 -28
  52. package/dist/supervisor-run.mjs +20 -11
  53. package/dist/{teardown--gESs9ck.mjs → teardown-CAVcWeRD.mjs} +148 -109
  54. package/dist/{workspace-process-lock-IBj1Towr.mjs → workspace-process-lock-Bz19_R9R.mjs} +4 -4
  55. package/dist/workspace-state-WVwWw_hB.mjs +146 -0
  56. package/dist/{worktree-DtQGO9-s.mjs → worktree-CeUKDAQw.mjs} +38 -34
  57. package/dist/{worktree-Eq6TLH8N.mjs → worktree-DJnBbQZ9.mjs} +79 -22
  58. package/dist/xcode-BqDeRkpT.mjs +860 -0
  59. package/package.json +7 -7
  60. package/shim/expo-metro-config.cjs +11 -17
  61. package/dist/doctor-BueDfLYG.mjs +0 -530
  62. package/dist/metro-CORqXyTL.mjs +0 -184
  63. package/dist/ownership-claim-BtPtJVmq.mjs +0 -584
  64. package/dist/server-expo-44em5Pmg.mjs +0 -2
  65. package/dist/state-B3XA2wp2.mjs +0 -268
  66. package/shim/metro-cache-generation.cjs +0 -20
  67. package/shim/metro-cache-generation.d.cts +0 -5
@@ -1,15 +1,12 @@
1
- import { p as readWorkspaceState } from "./state-B3XA2wp2.mjs";
1
+ import { i as __require, t as __commonJSMin } from "./rolldown-runtime-BsOwBuO_.mjs";
2
2
  import { n as supervisorError } from "./errors-B6W7FkxQ.mjs";
3
- import { C as projectMetroSharedCache } from "./settings-DEJf6_kJ.mjs";
3
+ import { C as projectMetroSharedCache } from "./settings-kO2ZqIKy.mjs";
4
4
  import { a as metroStoreRoot, o as registerMetroStore, t as appendCacheStore } from "./metro-store-CDDZHtPl.mjs";
5
5
  import { createRequire } from "node:module";
6
- import { dirname, isAbsolute, join, relative, sep } from "node:path";
7
- //#region \0rolldown/runtime.js
8
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
- var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
6
+ import { isAbsolute, join, relative, sep } from "node:path";
10
7
  //#endregion
11
- //#region shim/bundle-response.cjs
12
- var require_bundle_response = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8
+ //#region src/supervisor/server-bare.ts
9
+ var import_bundle_response = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
13
10
  const { randomUUID } = __require("node:crypto");
14
11
  function bundleResponseMiddleware(write) {
15
12
  return (req, res, next) => {
@@ -55,29 +52,7 @@ var require_bundle_response = /* @__PURE__ */ __commonJSMin(((exports, module) =
55
52
  };
56
53
  }
57
54
  module.exports = { bundleResponseMiddleware };
58
- }));
59
- //#endregion
60
- //#region shim/metro-cache-generation.cjs
61
- var require_metro_cache_generation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
62
- const { createHash } = __require("node:crypto");
63
- const { mkdirSync } = __require("node:fs");
64
- const { join: join$1 } = __require("node:path");
65
- function applyMetroCacheGeneration(config, generation, directory) {
66
- if (!generation) return config;
67
- const fileMapCacheDirectory = join$1(directory, generation);
68
- mkdirSync(fileMapCacheDirectory, { recursive: true });
69
- return {
70
- ...config,
71
- cacheVersion: createHash("sha256").update(JSON.stringify([config.cacheVersion ?? "1.0", generation])).digest("hex"),
72
- fileMapCacheDirectory
73
- };
74
- }
75
- module.exports = { applyMetroCacheGeneration };
76
- }));
77
- //#endregion
78
- //#region src/supervisor/server-bare.ts
79
- var import_bundle_response = require_bundle_response();
80
- var import_metro_cache_generation = require_metro_cache_generation();
55
+ })))();
81
56
  const BARE_PACKAGES = [
82
57
  "metro",
83
58
  "@react-native/dev-middleware",
@@ -269,13 +244,14 @@ function closeHttpServer(httpServer, timeoutMs) {
269
244
  }
270
245
  });
271
246
  }
272
- async function startBareServer({ root, port, logsDir, writer = null, deps = null, reporterFactory = void 0, cacheStore = void 0, fileStore = void 0, closeTimeoutMs = 5e3 }) {
247
+ async function startBareServer({ root, port, logsDir, writer = null, deps = null, reporterFactory = void 0, cacheStore = void 0, fileStore = void 0, closeTimeoutMs = 5e3, resetCache = false }) {
273
248
  const { metro, devMiddleware, serverApi } = deps || resolveBareDeps(root);
274
249
  const makeReporter = reporterFactory === void 0 ? loadNdjsonReporter(root) : reporterFactory;
275
- const config = (0, import_metro_cache_generation.applyMetroCacheGeneration)(await metro.loadConfig({
250
+ const config = await metro.loadConfig({
276
251
  cwd: root,
277
- port
278
- }), readWorkspaceState(root)?.metroCacheGeneration, join(dirname(logsDir), "metro-file-map"));
252
+ port,
253
+ resetCache
254
+ });
279
255
  if (installSharedCacheStore({
280
256
  root,
281
257
  config,
@@ -0,0 +1,2 @@
1
+ import { p as startExpoServer } from "./server-expo-Ds8_mfng.mjs";
2
+ export { startExpoServer };
@@ -1,10 +1,9 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
2
  import { r as createNdjsonWriter } from "./ndjson-BZwI1NBv.mjs";
3
- import { p as readWorkspaceState } from "./state-B3XA2wp2.mjs";
4
- import { l as resolvePackageJson } from "./project-fKmuIaMI.mjs";
3
+ import { l as resolvePackageJson } from "./project-B_SDt4ip.mjs";
5
4
  import { n as supervisorError } from "./errors-B6W7FkxQ.mjs";
6
5
  import { n as stripAnsi, t as createLineReader } from "./process-output-C7IlIzd7.mjs";
7
- import { C as projectMetroSharedCache } from "./settings-DEJf6_kJ.mjs";
6
+ import { C as projectMetroSharedCache } from "./settings-kO2ZqIKy.mjs";
8
7
  import { a as metroStoreRoot, i as metroStoreConfirmedRoot, n as expoMetroConfigPath, o as registerMetroStore, r as expoMetroStoreEnv } from "./metro-store-CDDZHtPl.mjs";
9
8
  import { accessSync, constants, existsSync, readFileSync } from "node:fs";
10
9
  import { dirname, join, parse } from "node:path";
@@ -193,7 +192,7 @@ function resolveMetroStoreInjection(root, { log, env }) {
193
192
  });
194
193
  return additions;
195
194
  }
196
- async function startExpoServer({ root, port, logsDir, writer = null, spawnFn = null, killTimeoutMs = 5e3, tunnel = false, onTunnelUrl = null }) {
195
+ async function startExpoServer({ root, port, logsDir, writer = null, spawnFn = null, killTimeoutMs = 5e3, tunnel = false, resetCache = false, onTunnelUrl = null }) {
197
196
  const bin = expoBinPath(root);
198
197
  if (!bin) {
199
198
  const refusal = expoBinRefusal(root);
@@ -201,22 +200,17 @@ async function startExpoServer({ root, port, logsDir, writer = null, spawnFn = n
201
200
  }
202
201
  const log = writer || createNdjsonWriter(join(logsDir, "metro.ndjson"));
203
202
  const spawn = spawnFn || ((cmd, args, opts) => getExecutor().spawn(cmd, args, opts));
204
- const args = tunnel ? [
203
+ const args = [
205
204
  "start",
206
205
  "--port",
207
206
  String(port),
208
- "--tunnel"
209
- ] : [
210
- "start",
211
- "--port",
212
- String(port)
207
+ ...tunnel ? ["--tunnel"] : [],
208
+ ...resetCache ? ["--clear"] : []
213
209
  ];
214
210
  const storeEnv = resolveMetroStoreInjection(root, {
215
211
  log,
216
212
  env: process.env
217
213
  });
218
- const generation = readWorkspaceState(root)?.metroCacheGeneration;
219
- if (generation && !storeEnv) throw supervisorError("STIM_BAD_ARG", "The saved Metro cache reset requires the Expo config adapter.", "Use Expo SDK 54 or newer and repair the Stim installation before starting this app.");
220
214
  const child = spawn(bin, args, {
221
215
  cwd: root,
222
216
  stdio: [
@@ -230,8 +224,6 @@ async function startExpoServer({ root, port, logsDir, writer = null, spawnFn = n
230
224
  FORCE_COLOR: "0",
231
225
  ...expoProxyEnv(process.env),
232
226
  ...storeEnv,
233
- STIM_METRO_CACHE_GENERATION: generation ?? "",
234
- STIM_METRO_FILE_MAP: join(dirname(logsDir), "metro-file-map"),
235
227
  ...tunnel ? { EXPO_UNSTABLE_TUNNEL_V2: "1" } : {}
236
228
  }
237
229
  });
@@ -1,5 +1,5 @@
1
- import { d as getConfigPath, g as loadConfig, m as getRepoSettings, p as getProjectSettings } from "./config-CcefMY2Q.mjs";
2
- import { g as repoRoot, s as gitCommonDir } from "./worktree-Eq6TLH8N.mjs";
1
+ import { d as getConfigPath, g as loadConfig, m as getRepoSettings, p as getProjectSettings } from "./config-DMP7L7H6.mjs";
2
+ import { g as repoRoot, s as gitCommonDir } from "./worktree-DJnBbQZ9.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { isAbsolute } from "node:path";
5
5
  import { existsSync, readFileSync, realpathSync, statSync } from "fs";
@@ -1,7 +1,7 @@
1
- import { f as getProject } from "./config-CcefMY2Q.mjs";
2
- import { p as readWorkspaceState } from "./state-B3XA2wp2.mjs";
3
- import { h as deviceShellArg } from "./app-install-DIp9riNx.mjs";
4
- import { n as fileLeaseIo } from "./device-lease-CJwK7OZr.mjs";
1
+ import { f as getProject } from "./config-DMP7L7H6.mjs";
2
+ import { r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
3
+ import { h as deviceShellArg } from "./app-install--PAocWvq.mjs";
4
+ import { n as fileLeaseIo } from "./device-lease-r7yEQ1R8.mjs";
5
5
  //#region src/engine/slot-launch.ts
6
6
  function launchSlotScope(root, slot = "default") {
7
7
  if (slot !== "default") return slot;
@@ -1,26 +1,24 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { E as inspectProcessIdentity, O as waitForProcessExit, S as upsertProject, T as captureProcessToken, a as clearSupervisor, f as getProject } from "./config-CcefMY2Q.mjs";
3
- import { C as supervisorLogFile, D as workspaceLogsDir, _ as writeWorkspaceState, c as readMetroTunnel, i as clearManagedMetroTunnel, p as readWorkspaceState, s as clearWorkspaceSupervisor, y as ensureWorkspaceStorage } from "./state-B3XA2wp2.mjs";
4
- import { g as repoRoot, s as gitCommonDir } from "./worktree-Eq6TLH8N.mjs";
5
- import { a as findProjectRoot, i as detectIsExpo, n as detectAndroidPackage, r as detectBundleId, t as appProjectProblem } from "./project-fKmuIaMI.mjs";
2
+ import { S as upsertProject, a as clearSupervisor, f as getProject, w as process_identity_exports } from "./config-DMP7L7H6.mjs";
3
+ import { _ as workspaceLogsDir, c as ensureWorkspaceStorage, f as supervisorLogFile, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
4
+ import { g as repoRoot, s as gitCommonDir } from "./worktree-DJnBbQZ9.mjs";
5
+ import { a as findProjectRoot, i as detectIsExpo, n as detectAndroidPackage, r as detectBundleId, t as appProjectProblem } from "./project-B_SDt4ip.mjs";
6
6
  import { n as supervisorError } from "./errors-B6W7FkxQ.mjs";
7
- import { i as resolveProjectMetro, n as killMetroTree, o as reserveMetroPort, r as pidExists } from "./metro-CORqXyTL.mjs";
8
- import { g as stepTimer, l as phaseLine } from "./command-output-8wHMEde0.mjs";
9
- import { A as resolveSettings, D as remoteDeviceSettingError, E as remoteAndroidSetting, F as tunnelModeSetting, I as unknownSettingKeys, L as PUBLIC_METRO_ENV, N as settingShapeErrors, O as remoteIosSetting, R as detectProviders, S as ngrokUrlSetting, T as publicUrlSetting, a as SETTING_SHAPE_REMEDY, b as metroTunnelSettingError, d as cacheProviderSettingError, k as resolveCacheProviderConfig, z as planMetroReach } from "./settings-DEJf6_kJ.mjs";
10
- import { n as expoMetroConfigPath } from "./metro-store-CDDZHtPl.mjs";
11
- import { o as expoSdkMajor } from "./server-expo-DizT4OMk.mjs";
12
- import { n as workspaceProcessLockError, t as withWorkspaceProcessLock } from "./workspace-process-lock-IBj1Towr.mjs";
7
+ import { i as clearManagedMetroTunnel, o as clearWorkspaceSupervisor, s as readMetroTunnel } from "./state-CnWzvCWP.mjs";
8
+ import { r as reserveMetroPort } from "./ports-BZprTJRa.mjs";
9
+ import { i as resolveProjectMetro, n as killMetroTree, r as pidExists } from "./metro-ato6ef3J.mjs";
10
+ import { g as stepTimer, l as phaseLine } from "./command-output-BuIb_ZOI.mjs";
11
+ import { A as resolveSettings, D as remoteDeviceSettingError, E as remoteAndroidSetting, F as tunnelModeSetting, I as unknownSettingKeys, L as PUBLIC_METRO_ENV, N as settingShapeErrors, O as remoteIosSetting, R as detectProviders, S as ngrokUrlSetting, T as publicUrlSetting, a as SETTING_SHAPE_REMEDY, b as metroTunnelSettingError, d as cacheProviderSettingError, k as resolveCacheProviderConfig, z as planMetroReach } from "./settings-kO2ZqIKy.mjs";
12
+ import { n as workspaceProcessLockError, t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
13
13
  import { t as spawnEntry } from "./spawn-entry-nCE6m770.mjs";
14
14
  import { c as queryLogs } from "./logs-query-Cdp5aaCH.mjs";
15
- import { a as withManagedRemoteWorktreeLock, i as terminateChild, n as startTunnelSequence, r as stopTunnel, s as withManagedTunnelLock, t as resolveSupervisorTarget } from "./ownership-DXcol4oU.mjs";
15
+ import { a as withManagedRemoteWorktreeLock, i as terminateChild, n as startTunnelSequence, r as stopTunnel, s as withManagedTunnelLock, t as resolveSupervisorTarget } from "./ownership-CVY9cqCr.mjs";
16
16
  import { mkdirSync, openSync, readFileSync } from "node:fs";
17
- import { randomUUID } from "node:crypto";
18
17
  import { dirname } from "node:path";
19
18
  import { CACHE_PROVIDER_ENV, cacheProviderEnv } from "@stim-cli/cache";
20
19
  import chalk from "chalk";
21
20
  //#region src/supervisor/cache-reset.ts
22
- async function resetMetroCache(root) {
23
- if (detectIsExpo(root) && ((expoSdkMajor(root) ?? 0) < 54 || !expoMetroConfigPath())) throw supervisorError("STIM_BAD_ARG", "An isolated Metro cache reset requires Expo SDK 54 or newer and the Stim Metro config adapter.", "Upgrade Expo or repair the Stim installation before retrying. The running server was not changed.");
21
+ async function stopOwnedMetroForReset(root) {
24
22
  const project = getProject(root);
25
23
  const port = project?.metroPort;
26
24
  const target = resolveSupervisorTarget({
@@ -35,12 +33,11 @@ async function resetMetroCache(root) {
35
33
  pid: target.pid,
36
34
  processToken: target.processToken
37
35
  };
38
- if (!killMetroTree(target.pid, target.processToken) || !await waitForProcessExit(expected, 1e4)) throw supervisorError("STIM_SUPERVISOR_EXITED", "The owned Metro supervisor could not be stopped for a cache reset.", "Inspect `stim status` and `stim logs`, then retry. No cache reset was recorded.");
36
+ if (!killMetroTree(target.pid, target.processToken) || !await (0, process_identity_exports.waitForProcessExit)(expected, 1e4)) throw supervisorError("STIM_SUPERVISOR_EXITED", "The owned Metro supervisor could not be stopped for a cache reset.", "Inspect `stim status` and `stim logs`, then retry. No cache reset was recorded.");
39
37
  if (port && !(await resolveProjectMetro(port, root)).missing) throw supervisorError("STIM_SUPERVISOR_EXITED", `Port ${port} is still occupied after stopping Metro.`, "Inspect the listener before retrying. Stim does not terminate unrecorded processes.");
40
38
  clearWorkspaceSupervisor(root, expected);
41
39
  clearSupervisor(root, expected);
42
40
  }
43
- writeWorkspaceState(root, { metroCacheGeneration: randomUUID() });
44
41
  }
45
42
  //#endregion
46
43
  //#region src/commands/start.ts
@@ -62,7 +59,7 @@ function parseWait(value) {
62
59
  if (!Number.isFinite(seconds) || seconds <= 0) return { error: `Invalid --wait value ${JSON.stringify(value)}. Pass a number of seconds, e.g. --wait 90.` };
63
60
  return { seconds };
64
61
  }
65
- function liveSupervisor({ state, project, port, isAlive = pidExists, inspectIdentity = inspectProcessIdentity } = {}) {
62
+ function liveSupervisor({ state, project, port, isAlive = pidExists, inspectIdentity = process_identity_exports.inspectProcessIdentity } = {}) {
66
63
  const target = resolveSupervisorTarget({
67
64
  state: state?.supervisor,
68
65
  record: project?.supervisor,
@@ -142,7 +139,7 @@ function registerStart(program, overrides = {}) {
142
139
  ...DEFAULT_START_DEPS,
143
140
  ...overrides
144
141
  };
145
- program.command("start").description("Start this workspace's dev server under a detached supervisor and wait until it verifies as this project's. Idempotent: a healthy dev server on the reserved port is a no-op. Structured logs land in the global workspace logs directory.").option("--json", "Emit the facts as a single JSON line on stdout; every other line goes to stderr").option("--wait <seconds>", `How long to wait for the dev server to answer (default ${DEFAULT_WAIT_SECONDS})`).option("--remote", "Prepare the dev server for a remote device").option("--reset-cache", "Restart owned Metro with fresh per-app transform and file-map cache state").action(async (opts) => {
142
+ program.command("start").description("Start this workspace's dev server under a detached supervisor and wait until it verifies as this project's. Idempotent: a healthy dev server on the reserved port is a no-op. Structured logs land in the global workspace logs directory.").option("--json", "Emit the facts as a single JSON line on stdout; every other line goes to stderr").option("--wait <seconds>", `How long to wait for the dev server to answer (default ${DEFAULT_WAIT_SECONDS})`).option("--remote", "Prepare the dev server for a remote device").option("--reset-cache", "Restart owned Metro and clear this app's Metro caches").action(async (opts) => {
146
143
  const json = Boolean(opts.json);
147
144
  const waitTimer = stepTimer();
148
145
  const out = (line) => {
@@ -240,7 +237,7 @@ function registerStart(program, overrides = {}) {
240
237
  });
241
238
  if (opts.resetCache) {
242
239
  try {
243
- await resetMetroCache(root);
240
+ await stopOwnedMetroForReset(root);
244
241
  } catch (error) {
245
242
  const failure = error;
246
243
  return fail({
@@ -249,7 +246,7 @@ function registerStart(program, overrides = {}) {
249
246
  remedy: failure.remedy
250
247
  });
251
248
  }
252
- note(phaseLine("cache", "fresh Metro cache state for this app; shared cache entries and devices preserved"));
249
+ note(phaseLine("cache", "clearing this app's Metro transform and file-map caches; devices preserved"));
253
250
  }
254
251
  const logsDir = workspaceLogsDir(root);
255
252
  const logFile = supervisorLogFile(root);
@@ -285,7 +282,8 @@ function registerStart(program, overrides = {}) {
285
282
  root,
286
283
  "--port",
287
284
  String(port),
288
- ...tunnel ? ["--tunnel"] : []
285
+ ...tunnel ? ["--tunnel"] : [],
286
+ ...opts.resetCache ? ["--reset-cache"] : []
289
287
  ];
290
288
  const childEnv = {
291
289
  ...process.env,
@@ -488,7 +486,7 @@ function registerStart(program, overrides = {}) {
488
486
  }
489
487
  const handoffRecord = {
490
488
  pid: child.pid,
491
- processToken: child.pid ? captureProcessToken(child.pid) : null,
489
+ processToken: child.pid ? (0, process_identity_exports.captureProcessToken)(child.pid) : null,
492
490
  port,
493
491
  mode: isExpo ? "expo-child" : "bare-inproc",
494
492
  startedAt: new Date(spawnedTs ?? Date.now()).toISOString()
@@ -0,0 +1,131 @@
1
+ import { I as parseDeviceSlotKey, P as deviceSlotKey, w as process_identity_exports } from "./config-DMP7L7H6.mjs";
2
+ import { a as withWorkspaceStateLock, i as updateWorkspaceState, p as supervisorPidFile, r as readWorkspaceState, t as clearWorkspaceStateKey, y as workspaceStateFile } from "./workspace-state-WVwWw_hB.mjs";
3
+ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
+ import { dirname } from "node:path";
5
+ //#region src/supervisor/state.ts
6
+ const MODE_BARE = "bare-inproc";
7
+ const MODE_EXPO = "expo-child";
8
+ function readMetroTunnel(root) {
9
+ const record = readWorkspaceState(root)?.metroTunnel;
10
+ if (!record || typeof record !== "object") return null;
11
+ const kind = record.kind;
12
+ const url = record.url;
13
+ if (typeof url !== "string" || url.length === 0) return null;
14
+ if (kind === "expo") return {
15
+ kind: "expo",
16
+ url
17
+ };
18
+ if (kind === "managed") {
19
+ const provider = record.provider;
20
+ const pid = record.pid;
21
+ const port = record.port;
22
+ const startedAt = record.startedAt;
23
+ const processToken = record.processToken;
24
+ const logFile = record.logFile;
25
+ if (provider !== "ngrok" && provider !== "cloudflared" || typeof pid !== "number" || typeof port !== "number") return null;
26
+ return {
27
+ kind: "managed",
28
+ provider,
29
+ pid,
30
+ url,
31
+ port,
32
+ startedAt: typeof startedAt === "string" ? startedAt : "",
33
+ processToken: typeof processToken === "string" && processToken.length > 0 ? processToken : null,
34
+ ...typeof logFile === "string" && logFile.length > 0 ? { logFile } : {}
35
+ };
36
+ }
37
+ return null;
38
+ }
39
+ function parseWorkspaceLaunchRecord(value) {
40
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
41
+ const record = value;
42
+ if (typeof record.appId !== "string" || record.appId.length === 0) return null;
43
+ if (typeof record.deviceId !== "string" || record.deviceId.length === 0) return null;
44
+ if (record.metroPort !== null && typeof record.metroPort !== "number") return null;
45
+ if (typeof record.release !== "boolean") return null;
46
+ if (typeof record.launchedAt !== "string") return null;
47
+ return record;
48
+ }
49
+ function readWorkspaceLaunches(root) {
50
+ const launches = readWorkspaceState(root)?.launches;
51
+ if (!launches || typeof launches !== "object" || Array.isArray(launches)) return {};
52
+ const records = {};
53
+ for (const [key, value] of Object.entries(launches)) {
54
+ const record = parseWorkspaceLaunchRecord(value);
55
+ if (parseDeviceSlotKey(key) && record) records[key] = record;
56
+ }
57
+ return records;
58
+ }
59
+ function writeWorkspaceLaunch(root, platform, record, slot = "default") {
60
+ updateWorkspaceState(root, (state) => {
61
+ const launches = state.launches && typeof state.launches === "object" ? state.launches : {};
62
+ return {
63
+ ...state,
64
+ launches: {
65
+ ...launches,
66
+ [deviceSlotKey(platform, slot)]: record
67
+ }
68
+ };
69
+ });
70
+ }
71
+ function readRemoteSession(root) {
72
+ const record = readWorkspaceState(root)?.remoteDevice;
73
+ if (!record || typeof record !== "object") return null;
74
+ const id = record.sessionId;
75
+ if (typeof id !== "string" || id.length === 0) return null;
76
+ const platform = record.platform;
77
+ const startedAt = record.startedAt;
78
+ return {
79
+ platform: platform === "ios" || platform === "android" ? platform : null,
80
+ sessionId: id,
81
+ startedAt: typeof startedAt === "string" ? startedAt : null
82
+ };
83
+ }
84
+ function readRemoteSessionId(root) {
85
+ return readRemoteSession(root)?.sessionId ?? null;
86
+ }
87
+ function clearRemoteSession(root, expectedSessionId) {
88
+ clearWorkspaceStateKey(root, "remoteDevice", (value) => {
89
+ if (typeof value !== "object" || value === null) return false;
90
+ return value.sessionId === expectedSessionId;
91
+ });
92
+ }
93
+ function clearWorkspaceSupervisor(root, expected) {
94
+ return withWorkspaceStateLock(root, () => {
95
+ const current = readWorkspaceState(root)?.supervisor;
96
+ if (current && expected !== void 0 && !(0, process_identity_exports.sameProcessRecord)(current, expected)) return false;
97
+ clearWorkspaceStateKey(root, "supervisor", () => true);
98
+ clearExpoMetroTunnel(root);
99
+ if (expected === void 0 || readPidFile(root) === expected?.pid) rmSync(supervisorPidFile(root), { force: true });
100
+ return true;
101
+ });
102
+ }
103
+ function clearExpoMetroTunnel(root) {
104
+ clearWorkspaceStateKey(root, "metroTunnel", (value) => {
105
+ return typeof value === "object" && value !== null && value.kind === "expo";
106
+ });
107
+ }
108
+ function clearManagedMetroTunnel(root, expected) {
109
+ if (!existsSync(workspaceStateFile(root))) return true;
110
+ return clearWorkspaceStateKey(root, "metroTunnel", (value) => {
111
+ if (typeof value !== "object" || value === null) return false;
112
+ const record = value;
113
+ return record.kind === "managed" && record.provider === expected.provider && record.pid === expected.pid && record.url === expected.url && record.port === expected.port && record.startedAt === expected.startedAt && (record.processToken ?? null) === (expected.processToken ?? null) && (record.logFile ?? null) === (expected.logFile ?? null);
114
+ });
115
+ }
116
+ function writePidFile(root, pid) {
117
+ const file = supervisorPidFile(root);
118
+ mkdirSync(dirname(file), { recursive: true });
119
+ writeFileSync(file, `${pid}\n`);
120
+ return file;
121
+ }
122
+ function readPidFile(root) {
123
+ try {
124
+ const pid = parseInt(readFileSync(supervisorPidFile(root), "utf-8").trim(), 10);
125
+ return Number.isFinite(pid) ? pid : null;
126
+ } catch {
127
+ return null;
128
+ }
129
+ }
130
+ //#endregion
131
+ export { clearRemoteSession as a, readPidFile as c, readWorkspaceLaunches as d, writePidFile as f, clearManagedMetroTunnel as i, readRemoteSession as l, MODE_EXPO as n, clearWorkspaceSupervisor as o, writeWorkspaceLaunch as p, clearExpoMetroTunnel as r, readMetroTunnel as s, MODE_BARE as t, readRemoteSessionId as u };
@@ -1,7 +1,7 @@
1
- import { g as repoRoot, s as gitCommonDir } from "./worktree-Eq6TLH8N.mjs";
2
- import { a as findProjectRoot } from "./project-fKmuIaMI.mjs";
3
- import { o as formatLongDuration } from "./command-output-8wHMEde0.mjs";
4
- import { a as statsProjectKey, r as readStats } from "./stats-BR-kwj0B.mjs";
1
+ import { g as repoRoot, s as gitCommonDir } from "./worktree-DJnBbQZ9.mjs";
2
+ import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
3
+ import { o as formatLongDuration } from "./command-output-BuIb_ZOI.mjs";
4
+ import { a as statsProjectKey, r as readStats } from "./stats-Fo9ACIv7.mjs";
5
5
  import chalk from "chalk";
6
6
  //#region src/commands/stats.ts
7
7
  const PLATFORMS = ["ios", "android"];
@@ -1,4 +1,4 @@
1
- import { C as withConfigLock, u as getConfigDir } from "./config-CcefMY2Q.mjs";
1
+ import { C as withConfigLock, u as getConfigDir } from "./config-DMP7L7H6.mjs";
2
2
  import { readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { basename, dirname, join, relative, resolve } from "node:path";
4
4
  const PLATFORMS = ["ios", "android"];
@@ -1,17 +1,18 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { P as volumeRootFor, g as loadConfig, u as getConfigDir, z as projectDeviceSlots } from "./config-CcefMY2Q.mjs";
3
- import { D as workspaceLogsDir } from "./state-B3XA2wp2.mjs";
4
- import { f as listWorktrees } from "./worktree-Eq6TLH8N.mjs";
5
- import { a as findProjectRoot, c as projectShortcut } from "./project-fKmuIaMI.mjs";
6
- import { a as isMetroRunning, i as resolveProjectMetro } from "./metro-CORqXyTL.mjs";
7
- import { a as formatElapsed, r as clockTime, u as plural } from "./command-output-8wHMEde0.mjs";
8
- import { N as resolveOwnedAvdSerial } from "./android-hMj83VpN.mjs";
9
- import { a as POOL_SETTING_REMEDY, c as parkedMaxSetting, l as readParked } from "./teardown--gESs9ck.mjs";
2
+ import { L as projectDeviceSlots, M as volumeRootFor, g as loadConfig, u as getConfigDir } from "./config-DMP7L7H6.mjs";
3
+ import { _ as workspaceLogsDir } from "./workspace-state-WVwWw_hB.mjs";
4
+ import { v as resolveSourceCheckout } from "./worktree-DJnBbQZ9.mjs";
5
+ import { a as findProjectRoot, c as projectShortcut } from "./project-B_SDt4ip.mjs";
6
+ import { t as isMetroRunning } from "./ports-BZprTJRa.mjs";
7
+ import { i as resolveProjectMetro } from "./metro-ato6ef3J.mjs";
8
+ import { a as formatElapsed, r as clockTime, u as plural } from "./command-output-BuIb_ZOI.mjs";
9
+ import { N as resolveOwnedAvdSerial } from "./android-DJWiTBkz.mjs";
10
+ import { a as POOL_SETTING_REMEDY, l as parkedMaxSetting, u as readParked } from "./teardown-CAVcWeRD.mjs";
10
11
  import { u as listAllIosSims } from "./ios-Deh5js5V.mjs";
11
- import { i as listLeaseFiles } from "./device-lease-CJwK7OZr.mjs";
12
+ import { i as listLeaseFiles } from "./device-lease-r7yEQ1R8.mjs";
12
13
  import { c as queryLogs } from "./logs-query-Cdp5aaCH.mjs";
13
- import { t as resolveSupervisorTarget } from "./ownership-DXcol4oU.mjs";
14
- import { i as readSupervisorState } from "./stop-CjlgDk0a.mjs";
14
+ import { t as resolveSupervisorTarget } from "./ownership-CVY9cqCr.mjs";
15
+ import { i as readSupervisorState } from "./stop-0jJNahwN.mjs";
15
16
  import { existsSync } from "fs";
16
17
  import { totalmem } from "os";
17
18
  import chalk from "chalk";
@@ -212,7 +213,9 @@ function statusCommand(program) {
212
213
  simsAvailable = false;
213
214
  simctlError = String(e?.message || e).split("\n")[0] ?? "";
214
215
  }
215
- const worktrees = listWorktrees(process.cwd()).slice(1);
216
+ const source = resolveSourceCheckout(process.cwd());
217
+ const sourcePath = "path" in source ? source.path : null;
218
+ const worktrees = source.entries.filter((entry) => !entry.bare && entry.path !== sourcePath);
216
219
  const states = [];
217
220
  const labelOnlyRoots = [];
218
221
  for (const [path, proj] of projects) {
@@ -1,14 +1,15 @@
1
- import { C as withConfigLock, D as sameProcessRecord, E as inspectProcessIdentity, L as deviceSlotPlatforms, O as waitForProcessExit, R as parseDeviceSlotKey, S as upsertProject, V as validateDeviceSlot, a as clearSupervisor, f as getProject, z as projectDeviceSlots } from "./config-CcefMY2Q.mjs";
2
- import { T as workspaceDir, _ as writeWorkspaceState, a as clearRemoteSession, c as readMetroTunnel, i as clearManagedMetroTunnel, m as withWorkspaceStateLock, o as clearWorkspaceStateKeys, p as readWorkspaceState, s as clearWorkspaceSupervisor, u as readRemoteSession } from "./state-B3XA2wp2.mjs";
3
- import { a as findProjectRoot } from "./project-fKmuIaMI.mjs";
4
- import { i as resolveProjectMetro, n as killMetroTree, r as pidExists } from "./metro-CORqXyTL.mjs";
5
- import { n as verifyCollectorOwnership } from "./ownership-8O073GIC.mjs";
6
- import { f as releasedLeaseFact, l as phaseLine, u as plural } from "./command-output-8wHMEde0.mjs";
7
- import { n as teardownOwnedIosSim, t as teardownOwnedAvd, x as resolveEasCliBin } from "./teardown--gESs9ck.mjs";
8
- import { t as withWorkspaceProcessLock } from "./workspace-process-lock-IBj1Towr.mjs";
9
- import { l as releaseWorkspaceLeases } from "./device-lease-CJwK7OZr.mjs";
10
- import { i as endRecordedSession } from "./device-remote-DAA0Zm6Z.mjs";
11
- import { r as stopTunnel, t as resolveSupervisorTarget } from "./ownership-DXcol4oU.mjs";
1
+ import { C as withConfigLock, F as deviceSlotPlatforms, I as parseDeviceSlotKey, L as projectDeviceSlots, S as upsertProject, a as clearSupervisor, f as getProject, w as process_identity_exports, z as validateDeviceSlot } from "./config-DMP7L7H6.mjs";
2
+ import { a as withWorkspaceStateLock, h as workspaceDir, n as clearWorkspaceStateKeys, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
3
+ import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
4
+ import { a as clearRemoteSession, i as clearManagedMetroTunnel, l as readRemoteSession, o as clearWorkspaceSupervisor, s as readMetroTunnel } from "./state-CnWzvCWP.mjs";
5
+ import { i as resolveProjectMetro, n as killMetroTree, r as pidExists } from "./metro-ato6ef3J.mjs";
6
+ import { n as verifyCollectorOwnership } from "./ownership-CD_XnpDu.mjs";
7
+ import { f as releasedLeaseFact, l as phaseLine, u as plural } from "./command-output-BuIb_ZOI.mjs";
8
+ import { S as resolveEasCliBin, n as teardownOwnedIosSim, t as teardownOwnedAvd } from "./teardown-CAVcWeRD.mjs";
9
+ import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
10
+ import { l as releaseWorkspaceLeases } from "./device-lease-r7yEQ1R8.mjs";
11
+ import { i as endRecordedSession } from "./device-remote-BTUqbl0i.mjs";
12
+ import { r as stopTunnel, t as resolveSupervisorTarget } from "./ownership-CVY9cqCr.mjs";
12
13
  import chalk from "chalk";
13
14
  //#region src/commands/stop.ts
14
15
  const DEFAULT_WAIT_MS = 1e4;
@@ -34,7 +35,7 @@ function clearCollectorState(root, expected) {
34
35
  clearWorkspaceStateKeys(root, ["collectors"]);
35
36
  return true;
36
37
  }
37
- for (const [platform, record] of Object.entries(expected ?? {})) if (sameProcessRecord(current[platform], record)) delete current[platform];
38
+ for (const [platform, record] of Object.entries(expected ?? {})) if ((0, process_identity_exports.sameProcessRecord)(current[platform], record)) delete current[platform];
38
39
  if (Object.keys(current).length) writeWorkspaceState(root, { collectors: current });
39
40
  else clearWorkspaceStateKeys(root, ["collectors"]);
40
41
  return Object.keys(current).length === 0;
@@ -142,12 +143,12 @@ async function runStop(options) {
142
143
  result.summary = summarize(root, result.outcomes, result.ok);
143
144
  return result;
144
145
  }
145
- async function stopWorkspace({ root, project = void 0, state = void 0, collectors = void 0, signalCollector = (pid) => process.kill(pid, "SIGTERM"), verifyCollector = verifyCollectorOwnership, clearCollectors = clearCollectorState, isAlive = pidExists, killGroup = killMetroTree, inspectIdentity = 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) }) {
146
+ async function stopWorkspace({ root, project = void 0, state = void 0, collectors = void 0, signalCollector = (pid) => process.kill(pid, "SIGTERM"), verifyCollector = verifyCollectorOwnership, clearCollectors = clearCollectorState, isAlive = pidExists, killGroup = killMetroTree, 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) }) {
146
147
  const proj = project === void 0 ? getProject(root) : project;
147
148
  const sup = state === void 0 ? readSupervisorState(root) : state;
148
149
  const collectorRecords = collectors === void 0 ? readCollectorState(root) : collectors;
149
150
  const reservedPort = typeof proj?.metroPort === "number" ? proj.metroPort : null;
150
- const waiter = waitForDeath ?? ((pid, processToken) => waitForProcessExit({
151
+ const waiter = waitForDeath ?? ((pid, processToken) => (0, process_identity_exports.waitForProcessExit)({
151
152
  pid,
152
153
  processToken
153
154
  }, waitMs));
@@ -1,3 +1,3 @@
1
- import { t as resolveSupervisorTarget } from "./ownership-DXcol4oU.mjs";
2
- import { a as resolveCollectorTargets, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-CjlgDk0a.mjs";
1
+ import { t as resolveSupervisorTarget } from "./ownership-CVY9cqCr.mjs";
2
+ import { a as resolveCollectorTargets, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-0jJNahwN.mjs";
3
3
  export { clearCollectorState, clearSupervisorState, stopCommand as default, readCollectorState, readSupervisorState, resolveCollectorTargets, resolveSupervisorTarget, runStop };
@@ -1,34 +1,10 @@
1
1
  import { t as NdjsonWriter } from "./ndjson-DvHSsNU9.mjs";
2
- //#region src/process-identity.d.ts
3
- interface ProcessRecord {
4
- pid?: unknown;
5
- processToken?: unknown;
6
- }
2
+ import * as import__stim_cli_core_process_identity from "@stim-cli/core/process-identity";
7
3
  //#endregion
8
4
  //#region src/supervisor/state.d.ts
9
5
  declare const MODE_BARE = "bare-inproc";
10
6
  declare const MODE_EXPO = "expo-child";
11
- interface WorkspaceState {
12
- metroCacheGeneration?: string;
13
- supervisor?: Record<string, unknown>;
14
- collectors?: Record<string, unknown>;
15
- lastBuild?: Record<string, unknown>;
16
- launches?: Record<string, WorkspaceLaunchRecord>;
17
- remoteDevice?: Record<string, unknown>;
18
- metroTunnel?: Record<string, unknown>;
19
- [key: string]: unknown;
20
- }
21
- interface WorkspaceLaunchRecord {
22
- appId: string;
23
- deviceId: string;
24
- metroPort: number | null;
25
- release: boolean;
26
- launchedAt: string;
27
- }
28
- declare function readWorkspaceState(root: string): WorkspaceState | null;
29
- declare function withWorkspaceStateLock<T>(root: string, fn: () => T): T;
30
- declare function writeWorkspaceState(root: string, patch: WorkspaceState): WorkspaceState;
31
- declare function clearWorkspaceSupervisor(root: string, expected?: ProcessRecord | null): boolean;
7
+ declare function clearWorkspaceSupervisor(root: string, expected?: process_identity_d_exports.ProcessRecord | null): boolean;
32
8
  declare function clearExpoMetroTunnel(root: string): void;
33
9
  declare function writePidFile(root: string, pid: number): string;
34
10
  declare function readPidFile(root: string): number | null;
@@ -38,6 +14,7 @@ interface ParsedSupervisorArgs {
38
14
  root?: string;
39
15
  port?: number;
40
16
  tunnel?: boolean;
17
+ resetCache?: boolean;
41
18
  error?: string;
42
19
  }
43
20
  declare function parseArgs(argv: string[]): ParsedSupervisorArgs;
@@ -58,12 +35,14 @@ type ServerStarter = (opts: {
58
35
  logsDir: string;
59
36
  writer?: NdjsonWriter | null;
60
37
  tunnel?: boolean;
38
+ resetCache?: boolean;
61
39
  onTunnelUrl?: ((url: string) => void) | null;
62
40
  }) => Promise<ServerHandle>;
63
41
  interface RunSupervisorOptions {
64
42
  root: string;
65
43
  port: number;
66
44
  tunnel?: boolean;
45
+ resetCache?: boolean;
67
46
  isExpo?: (projectRoot: string) => boolean;
68
47
  startBare?: ServerStarter | null;
69
48
  startExpo?: ServerStarter | null;
@@ -72,7 +51,7 @@ interface RunSupervisorOptions {
72
51
  attachSignals?: boolean;
73
52
  stderr?: (line: string) => void;
74
53
  }
75
- declare function runSupervisor({ root, port, tunnel, isExpo, startBare, startExpo, now, onExit, attachSignals, stderr }: RunSupervisorOptions): Promise<{
54
+ declare function runSupervisor({ root, port, tunnel, resetCache, isExpo, startBare, startExpo, now, onExit, attachSignals, stderr }: RunSupervisorOptions): Promise<{
76
55
  mode: string;
77
56
  server: ServerHandle | undefined;
78
57
  shutdown: (code: number, event: string, msg: string) => Promise<void>;
@@ -80,4 +59,4 @@ declare function runSupervisor({ root, port, tunnel, isExpo, startBare, startExp
80
59
  } | null>;
81
60
  declare function main(argv?: string[]): Promise<void>;
82
61
  //#endregion
83
- export { MODE_BARE, MODE_EXPO, RunSupervisorOptions, ServerExitInfo, ServerHandle, type WorkspaceState, clearExpoMetroTunnel, clearWorkspaceSupervisor, main, parseArgs, readPidFile, readWorkspaceState, runSupervisor, withWorkspaceStateLock, writePidFile, writeWorkspaceState };
62
+ export { MODE_BARE, MODE_EXPO, RunSupervisorOptions, ServerExitInfo, ServerHandle, clearExpoMetroTunnel, clearWorkspaceSupervisor, main, parseArgs, readPidFile, runSupervisor, writePidFile };