stim 1.17.2 → 1.18.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 (150) hide show
  1. package/README.md +50 -1
  2. package/dist/{activity-IRvJY_ru.mjs → activity-BxnkDZDi.mjs} +4 -4
  3. package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-CZ66YA4T.mjs} +8 -8
  4. package/dist/android-BKA16DTf.mjs +4 -0
  5. package/dist/{android-B9yaNKwa.mjs → android-BvwuMUJ9.mjs} +192 -98
  6. package/dist/{android-DE4v59Mb.mjs → android-CBwCNicO.mjs} +2 -2
  7. package/dist/{android-B_YNZy61.mjs → android-DC3ZLuw0.mjs} +9 -9
  8. package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-BBFyr9CA.mjs} +5 -5
  9. package/dist/android-cas-compiler.mjs +2 -2
  10. package/dist/api-D0VtFhqk.mjs +152 -0
  11. package/dist/api-run.d.mts +1 -0
  12. package/dist/api-run.mjs +145 -0
  13. package/dist/api.d.mts +212 -0
  14. package/dist/api.mjs +2 -0
  15. package/dist/{app-install-VPkI5WEg.mjs → app-install-D-PUENug.mjs} +3 -3
  16. package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
  17. package/dist/{budget-DfcgFdQB.mjs → budget-DIhL2BKx.mjs} +1578 -58
  18. package/dist/build-facts-DcLv2HSd.d.mts +111 -0
  19. package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-BI7ozfmH.mjs} +3 -3
  20. package/dist/cache-manifest.mjs +1 -1
  21. package/dist/{chrome-BrcVWQyD.mjs → chrome-DJnmnS5q.mjs} +1 -1
  22. package/dist/cli-DNJMwADx.mjs +68 -0
  23. package/dist/cli.mjs +1 -1
  24. package/dist/{client-SvBdgObD.mjs → client-DzhapoMB.mjs} +139 -32
  25. package/dist/collector-run.mjs +9 -9
  26. package/dist/{command-output-CDAIFD-8.mjs → command-output-CBtzyIgF.mjs} +2 -2
  27. package/dist/{config-D0DbpZtM.mjs → config-CgYMahz7.mjs} +5 -5
  28. package/dist/{created-devices-CpvzBL25.mjs → created-devices-DKbeWsiK.mjs} +2 -2
  29. package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-xKoOypBm.mjs} +2 -2
  30. package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-BLfcgc4O.mjs} +1 -1
  31. package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CLnIH02x.mjs} +2 -2
  32. package/dist/{device-C8IOoJPv.mjs → device-D7oCHGWi.mjs} +8 -8
  33. package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-EUOOYr8T.mjs} +13 -13
  34. package/dist/device-host-worker.mjs +19 -19
  35. package/dist/{device-ios-C2Um-XUR.mjs → device-ios-6MewKKnc.mjs} +13 -13
  36. package/dist/{device-lease-DpoS36_u.mjs → device-lease-Co-EwifR.mjs} +9 -9
  37. package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-w1xhCqIW.mjs} +4 -4
  38. package/dist/{device-pool-3o7s5lo4.mjs → device-pool-F5WvRPtD.mjs} +3 -3
  39. package/dist/{device-remote-hFSkpfQu.mjs → device-remote-tHbd1fKy.mjs} +15 -15
  40. package/dist/{doctor-CFv1fCrF.mjs → doctor-B9ckYUoU.mjs} +33 -30
  41. package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics-BRXOqDzG.mjs} +11 -11
  42. package/dist/{exec-CaErVv7t.mjs → exec-DWhCZDGm.mjs} +65 -2
  43. package/dist/{gc-DEmkg3Xh.mjs → gc-Dh6mXOKC.mjs} +23 -469
  44. package/dist/{gradle-dJpre3Yn.mjs → gradle-C6GKnunQ.mjs} +6 -6
  45. package/dist/{guide-status-Du-ZQ3FD.mjs → guide-status-Bhf9SJXc.mjs} +3 -3
  46. package/dist/{guide-CSmhMTf8.mjs → guide-tm6igAaa.mjs} +290 -53
  47. package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bv285t_t.mjs} +3 -3
  48. package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C-rMtppF.mjs} +2 -2
  49. package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-D5mNmtj4.mjs} +1 -1
  50. package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-DN8Iz4mJ.mjs} +9 -9
  51. package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-B-wEjlwG.mjs} +5 -5
  52. package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DeeOG8xZ.mjs} +6 -6
  53. package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-jjtxAn5C.mjs} +7 -8
  54. package/dist/{ios-DSfnPfse.mjs → ios-B3SbOWdw.mjs} +19 -7
  55. package/dist/{ios-Cr1h5gnO.mjs → ios-Bvbf0SGY.mjs} +1 -1
  56. package/dist/{ios-BJ4XUSe1.mjs → ios-CPdkoKaa.mjs} +181 -95
  57. package/dist/ios-DNpdygiv.mjs +7 -0
  58. package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-Bn7jWDB1.mjs} +1 -1
  59. package/dist/{ios-device-pAN4t54-.mjs → ios-device-vOaByMhw.mjs} +3 -3
  60. package/dist/{ios-state-8L3lgum6.mjs → ios-state-B2pES6Vs.mjs} +1 -1
  61. package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-hskNcWkZ.mjs} +5 -5
  62. package/dist/{logs-BAaS7gS2.mjs → logs-1Ylc1Ri6.mjs} +13 -13
  63. package/dist/macos-Ck7OBMNY.mjs +2 -0
  64. package/dist/{macos-BIRQS90f.mjs → macos-DF6C7wUU.mjs} +118 -34
  65. package/dist/macos-run.mjs +1 -1
  66. package/dist/maintenance-run.mjs +349 -47
  67. package/dist/{metro-g8NqiJp-.mjs → metro-Dh8T4Ytd.mjs} +5 -5
  68. package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-CEUw9RMH.mjs} +4 -4
  69. package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
  70. package/dist/{named-ports-C8m8EQs2.mjs → named-ports-BFIz1Shz.mjs} +61 -6
  71. package/dist/{native-run-D1Q56rAD.mjs → native-run-B06FkmZx.mjs} +4 -4
  72. package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-D_603JiC.mjs} +6 -6
  73. package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
  74. package/dist/offload-worker.d.mts +3 -17
  75. package/dist/offload-worker.mjs +10 -11
  76. package/dist/{ownership-DyRQru0q.mjs → ownership-D6Se7gg_.mjs} +3 -3
  77. package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
  78. package/dist/placement-log-BcPhRwR4.mjs +84 -0
  79. package/dist/{build-plan-BDsSi09V.mjs → plan-placement-CtxkCO54.mjs} +122 -48
  80. package/dist/{ports-4nYqxPWC.mjs → ports-BLTtfBq-.mjs} +3 -3
  81. package/dist/{prebuild-D7RUMkwN.mjs → prebuild-juCyreaR.mjs} +5 -5
  82. package/dist/preview-D5V07Nrl.mjs +987 -0
  83. package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
  84. package/dist/{project-D47Rh0ly.mjs → project-C3ChRLZy.mjs} +4 -68
  85. package/dist/projects-DD7dBTCj.mjs +92 -0
  86. package/dist/{pull-request-pxnDCQzn.mjs → pull-request-u4vp7zmK.mjs} +1 -1
  87. package/dist/pull-requests.mjs +1 -1
  88. package/dist/{recordings-BNgsD1Tr.mjs → recordings-BAWltsVt.mjs} +1 -1
  89. package/dist/{reload-DcRxj3qG.mjs → reload-DvyWzVjJ.mjs} +15 -15
  90. package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-BGg7aGIZ.mjs} +5 -5
  91. package/dist/{run-CkE9y0nc.mjs → run-vhtDgpHO.mjs} +5 -5
  92. package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-B9E7S1aR.mjs} +4 -5
  93. package/dist/server-expo-Db9HBUoa.mjs +2 -0
  94. package/dist/{server-expo-CHTyXD0G.mjs → server-expo-DoBHhuzK.mjs} +5 -6
  95. package/dist/{settings-SR9OmW9h.mjs → settings-Byp2AQ_E.mjs} +6 -5
  96. package/dist/{settings-Cfd-0r2d.mjs → settings-CQyMElEP.mjs} +24 -763
  97. package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
  98. package/dist/settings.schema.json +126 -3
  99. package/dist/{simslim-BWNrc3M3.mjs → simslim-EHBQ2R4G.mjs} +7 -7
  100. package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-C1nqh4mu.mjs} +6 -6
  101. package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
  102. package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
  103. package/dist/{stage-CzaiwFsI.mjs → stage-g_WqWeaE.mjs} +14 -3
  104. package/dist/{start-DUz3mYdb.mjs → start-D-IeOyoK.mjs} +19 -19
  105. package/dist/{start-AlfCPRVU.mjs → start-NTc1Ifqs.mjs} +1 -1
  106. package/dist/{state-PeQiJuIu.mjs → state-BG-aAk4k.mjs} +4 -4
  107. package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
  108. package/dist/{state-DyaNTgfR.mjs → state-xnqpx3AD.mjs} +2 -2
  109. package/dist/{stats-Bq4fJOdB.mjs → stats-DY6ekz8F.mjs} +5 -5
  110. package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
  111. package/dist/{status-BA2pehwf.mjs → status-DCjZeE-K.mjs} +33 -34
  112. package/dist/{status-CzS4bPO9.mjs → status-Dcr0Qexd.mjs} +5 -5
  113. package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-Behws_fi.mjs} +1 -1
  114. package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-aR_WsNOA.mjs} +1 -1
  115. package/dist/{stop-BIiM49EY.mjs → stop-BGhKMOuH.mjs} +5 -5
  116. package/dist/{stop-DQIasgKp.mjs → stop-BTjs3xbc.mjs} +17 -18
  117. package/dist/{stop-zF1y04f2.mjs → stop-DIJtD2GL.mjs} +2 -2
  118. package/dist/supervisor-run.d.mts +24 -22
  119. package/dist/supervisor-run.mjs +21 -22
  120. package/dist/{support-CsJNVfOc.mjs → support-BaayeYCf.mjs} +7 -7
  121. package/dist/{support-WvD__tSV.mjs → support-Bwvbrq5-.mjs} +5 -5
  122. package/dist/{toolchain-DNyR3NPq.mjs → toolchain-Bnyd_K3A.mjs} +471 -22
  123. package/dist/{trigger-Bemu8ytw.mjs → trigger-CJMhwXe8.mjs} +5 -5
  124. package/dist/trigger-DWAq9hkw.mjs +2 -0
  125. package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-CjB-MP6H.mjs} +7 -7
  126. package/dist/web-B6_bFDn7.mjs +2 -0
  127. package/dist/{web-Dl0KSRHf.mjs → web-DTU0uiWj.mjs} +22 -22
  128. package/dist/web-run.mjs +10 -10
  129. package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-C59dqG-Z.mjs} +3 -3
  130. package/dist/{ownership-BMLqyBgJ.mjs → workspaces-xXItD8Dj.mjs} +577 -23
  131. package/dist/{worktree-j3IcFAI5.mjs → worktree-BJfnU6r5.mjs} +1 -1
  132. package/dist/{worktree-Be_7NLKy.mjs → worktree-BSYlofkq.mjs} +234 -35
  133. package/dist/worktree-CsKYexJM.mjs +753 -0
  134. package/package.json +10 -5
  135. package/dist/build-progress-D0WkjCPd.mjs +0 -1036
  136. package/dist/build-slots-41v_d2x9.mjs +0 -142
  137. package/dist/cli-CYXb29oE.mjs +0 -51
  138. package/dist/deps-iKw0eD4P.mjs +0 -438
  139. package/dist/errors-B6W7FkxQ.mjs +0 -15
  140. package/dist/idle-BXG__1BA.mjs +0 -176
  141. package/dist/in-use-CvGOUn-x.mjs +0 -130
  142. package/dist/preview-B-g9d7kV.mjs +0 -318
  143. package/dist/process-identity-BmRm1qV0.mjs +0 -12
  144. package/dist/server-expo-CeakhI8P.mjs +0 -2
  145. package/dist/state-BKa8wNN5.mjs +0 -148
  146. package/dist/stop-cause-rhmGfwvt.mjs +0 -97
  147. package/dist/trigger-CXts6qt1.mjs +0 -2
  148. package/dist/watchman-APYjXSQa.mjs +0 -48
  149. package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
  150. package/dist/workspaces-Bcib97-6.mjs +0 -306
@@ -0,0 +1,111 @@
1
+ //#region src/engine/build-facts.d.ts
2
+ type CacheHitLevel = "local" | "remote" | false;
3
+ type LaunchStatus = boolean | "unverified" | "bundling";
4
+ interface LogsInfo {
5
+ dir?: string;
6
+ }
7
+ interface CompilationCacheActivity {
8
+ status: "reported" | "unavailable" | "not-run";
9
+ hits: number | null;
10
+ cacheableTasks: number | null;
11
+ hitRatePercent: number | null;
12
+ swiftTargetsWithoutExplicitModules?: number;
13
+ }
14
+ interface CcacheActivity {
15
+ status: "reported" | "unavailable" | "not-run";
16
+ hits: number | null;
17
+ misses: number | null;
18
+ hitRatePercent: number | null;
19
+ }
20
+ interface DevServerStart {
21
+ started: true;
22
+ reason: "not running" | "stopped (idle)";
23
+ }
24
+ interface RunLeaseFacts {
25
+ kind: string;
26
+ expiresAt: string;
27
+ }
28
+ interface IosFacts {
29
+ devicePlacement?: import("@stim-cli/core/state").DevicePlacement;
30
+ host?: import("@stim-cli/core/state").HostedIosStatus;
31
+ slot?: string;
32
+ platform: string;
33
+ udid: string;
34
+ deviceName: string | null;
35
+ deviceType: string | null;
36
+ runtime: string | null;
37
+ fingerprint?: string | null;
38
+ configuration: string | null;
39
+ scheme?: string;
40
+ cacheKey?: string | null;
41
+ cacheHit: CacheHitLevel;
42
+ cacheSkipped: boolean;
43
+ buildMachine?: string;
44
+ builtOn?: string;
45
+ /** The remote Mac that compiled the app when the build was offloaded; absent otherwise. */
46
+ offloadedTo?: string;
47
+ /** Why the app was built here after the run considered offloading it; absent otherwise. */
48
+ offloadFallback?: string;
49
+ compilationCache: CompilationCacheActivity;
50
+ waitedForBuild: {
51
+ pid: number | null;
52
+ ms: number;
53
+ } | null;
54
+ appPath?: string | null;
55
+ bundleId?: string | null;
56
+ installSkipped: boolean;
57
+ launched: LaunchStatus;
58
+ metroPort?: number | null;
59
+ logs: LogsInfo;
60
+ agentDevice?: {
61
+ stateDir: string;
62
+ };
63
+ durationMs?: number;
64
+ webPreviewUrl?: string | null;
65
+ lease?: RunLeaseFacts | null;
66
+ devServer?: DevServerStart;
67
+ }
68
+ interface AndroidFacts {
69
+ devicePlacement?: import("@stim-cli/core/state").DevicePlacement;
70
+ host?: import("@stim-cli/core/state").HostedAndroidStatus;
71
+ slot?: string;
72
+ platform: string;
73
+ serial: string | null;
74
+ avdName: string | null;
75
+ deviceName: string | null;
76
+ systemImage: string | null;
77
+ deviceProfile: string | null;
78
+ fingerprint: string | null;
79
+ cacheKey: string | null;
80
+ variant: string | null;
81
+ metroPort: number | null;
82
+ cacheHit: CacheHitLevel;
83
+ cacheSkipped: boolean;
84
+ buildMachine?: string;
85
+ builtOn?: string;
86
+ /** The remote Mac that compiled the APK when the build was offloaded; absent otherwise. */
87
+ offloadedTo?: string;
88
+ /** Why the APK was built here after the run considered offloading it; absent otherwise. */
89
+ offloadFallback?: string;
90
+ waitedForBuild: {
91
+ pid: number | null;
92
+ ms: number;
93
+ } | null;
94
+ appPath: string | null;
95
+ bundleId: string | null;
96
+ installSkipped: boolean;
97
+ launched: LaunchStatus;
98
+ ccache: CcacheActivity;
99
+ debugHttpHost: string | null;
100
+ debugHttpHostNote: string | null;
101
+ devClientUrl: string | null;
102
+ logs: string | null;
103
+ agentDevice?: {
104
+ stateDir: string;
105
+ };
106
+ durationMs: number | null;
107
+ lease?: RunLeaseFacts | null;
108
+ devServer?: DevServerStart;
109
+ }
110
+ //#endregion
111
+ export { IosFacts as i, CcacheActivity as n, CompilationCacheActivity as r, AndroidFacts as t };
@@ -1,8 +1,8 @@
1
- import { d as getConfigDir } from "./config-D0DbpZtM.mjs";
2
- import { existsSync } from "fs";
3
- import { homedir } from "os";
1
+ import { d as getConfigDir } from "./config-CgYMahz7.mjs";
4
2
  import { isAbsolute, join, resolve } from "path";
3
+ import { existsSync } from "fs";
5
4
  import { readCacheManifest, updateCacheManifest } from "@stim-cli/core";
5
+ import { homedir } from "os";
6
6
  //#region src/cache/cache-manifest.ts
7
7
  function manifestPath() {
8
8
  return join(getConfigDir(), "caches.json");
@@ -1,2 +1,2 @@
1
- import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-DnUHBJaU.mjs";
1
+ import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-BI7ozfmH.mjs";
2
2
  export { manifestPath, readManifest, register, registeredCaches, unregister };
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
1
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
2
  import { existsSync } from "node:fs";
3
3
  import { join } from "node:path";
4
4
  import { homedir } from "node:os";
@@ -0,0 +1,68 @@
1
+ import { n as debugLog } from "./exec-DWhCZDGm.mjs";
2
+ import { y as refuseRelativeStimPaths } from "./config-CgYMahz7.mjs";
3
+ import { readFileSync } from "node:fs";
4
+ import { runId } from "@stim-cli/core/state";
5
+ import { Command } from "commander";
6
+ //#region bin/cli.ts
7
+ const commands = /* @__PURE__ */ new Map([
8
+ ["doctor", () => import("./doctor-B9ckYUoU.mjs")],
9
+ ["worktree", () => import("./worktree-BJfnU6r5.mjs")],
10
+ ["start", () => import("./start-NTc1Ifqs.mjs")],
11
+ ["ports", () => import("./ports-BLTtfBq-.mjs")],
12
+ ["stop", () => import("./stop-DIJtD2GL.mjs")],
13
+ ["ios", () => import("./ios-DNpdygiv.mjs")],
14
+ ["android", () => import("./android-BKA16DTf.mjs")],
15
+ ["web", () => import("./web-B6_bFDn7.mjs")],
16
+ ["macos", () => import("./macos-Ck7OBMNY.mjs")],
17
+ ["reload", () => import("./reload-DvyWzVjJ.mjs")],
18
+ ["device", () => import("./device-D7oCHGWi.mjs")],
19
+ ["logs", () => import("./logs-1Ylc1Ri6.mjs")],
20
+ ["settings", () => import("./settings-Byp2AQ_E.mjs")],
21
+ ["status", () => import("./status-DCjZeE-K.mjs")],
22
+ ["stats", () => import("./stats-DY6ekz8F.mjs")],
23
+ ["gc", () => import("./gc-Dh6mXOKC.mjs")],
24
+ ["guide", () => import("./guide-tm6igAaa.mjs")]
25
+ ]);
26
+ const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
27
+ const program = new Command();
28
+ program.name("stim").description("Isolated React Native dev environments per project/worktree").version(pkg.version);
29
+ try {
30
+ refuseRelativeStimPaths();
31
+ process.env.STIM_RUN_ID = runId();
32
+ const first = process.argv[2];
33
+ const loadCommand = commands.get((first === "help" ? process.argv[3] : first) ?? "");
34
+ if (loadCommand) (await loadCommand()).default(program, pkg.version);
35
+ else if (first !== "--version" && first !== "-V") {
36
+ const modules = await Promise.all([...commands.values()].map((load) => load()));
37
+ for (const module of modules) module.default(program, pkg.version);
38
+ }
39
+ program.hook("preAction", async (_command, action) => {
40
+ if (debugLog.enabled()) {
41
+ const path = [];
42
+ for (let each = action; each?.parent; each = each.parent) path.unshift(each.name());
43
+ const started = Date.now();
44
+ debugLog.log("run_start", {
45
+ version: pkg.version,
46
+ command: path,
47
+ flags: process.argv.slice(2).filter((arg) => arg.startsWith("-")).map((arg) => arg.split("=")[0])
48
+ });
49
+ process.on("exit", (code) => debugLog.log("run_end", {
50
+ exit: code,
51
+ ms: Date.now() - started
52
+ }));
53
+ }
54
+ try {
55
+ const { triggerMaintenance } = await import("./trigger-DWAq9hkw.mjs");
56
+ triggerMaintenance(action.name());
57
+ } catch {}
58
+ });
59
+ await program.parseAsync();
60
+ } catch (err) {
61
+ const code = err?.code;
62
+ const message = err instanceof Error ? err.message : String(err);
63
+ if (typeof code === "string" && code.startsWith("STIM_")) console.error(`${code}: ${message}`);
64
+ else console.error(`Unexpected error: ${message.replace(/\.$/, "")}. Report it at ${pkg.bugs.url}`);
65
+ process.exit(1);
66
+ }
67
+ //#endregion
68
+ export {};
package/dist/cli.mjs CHANGED
@@ -4,6 +4,6 @@ const encode = (version) => version.split(".", 3).reduce((sum, part) => sum * 1e
4
4
  if (encode(process.versions.node) < encode("22.12.0")) {
5
5
  process.stderr.write(`STIM_NODE_UNSUPPORTED: Stim needs Node 22.12.0 or later; this is Node ${process.versions.node} at ${process.execPath}. To run Stim where a project pins an older Node, see https://stim.appandflow.com/docs/requirements#older-node-pins\n`);
6
6
  process.exitCode = 1;
7
- } else import("./cli-CYXb29oE.mjs");
7
+ } else import("./cli-DNJMwADx.mjs");
8
8
  //#endregion
9
9
  export {};
@@ -1,14 +1,14 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { _ as loadConfig$1, d as getConfigDir } from "./config-D0DbpZtM.mjs";
3
- import { w as withDirLock } from "./workspace-state-DqcCbpE7.mjs";
4
- import { T as CCACHE_UNAVAILABLE, a as toolchainMismatches, l as COMPILATION_CACHE_UNAVAILABLE, s as manifestDigest } from "./toolchain-DNyR3NPq.mjs";
5
- import { createHash } from "node:crypto";
1
+ import { n as debugLog, t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
+ import { _ as loadConfig$1, d as getConfigDir } from "./config-CgYMahz7.mjs";
3
+ import { w as withDirLock } from "./workspace-state-C59dqG-Z.mjs";
4
+ import { a as toolchainMismatches, d as readRubyVersion, h as COMPILATION_CACHE_UNAVAILABLE, j as CCACHE_UNAVAILABLE, s as manifestDigest } from "./toolchain-Bnyd_K3A.mjs";
6
5
  import { closeSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, rmSync, writeFileSync, writeSync } from "node:fs";
7
6
  import { basename, dirname, join, relative } from "node:path";
7
+ import { OFFLOAD_MODES, acceptsShape, buildMachinesFile, buildMachinesLock, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, endpoint, findPeer as findPeer$1, isJsonObject, parseMachine, parseMachine as parseMachine$1, pinnedEndpoint, readBuildMachines, readDeviceHostMachines, runId, saturation, settingDefinition } from "@stim-cli/core/state";
8
+ import { hostname } from "node:os";
8
9
  import { InvalidArgumentError } from "commander";
9
- import { OFFLOAD_MODES, acceptsShape, buildMachinesFile, buildMachinesLock, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, endpoint, findPeer as findPeer$1, isJsonObject, parseMachine, parseMachine as parseMachine$1, pinnedEndpoint, readBuildMachines, readDeviceHostMachines, saturation, settingDefinition } from "@stim-cli/core/state";
10
10
  import { releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
11
- import { hostname } from "node:os";
11
+ import { createHash } from "node:crypto";
12
12
  import { WebSocket } from "ws";
13
13
  //#region src/offload/access-ticket.ts
14
14
  function readAccessTicket() {
@@ -703,8 +703,26 @@ function requireConfiguredMachine(selected, machines) {
703
703
  if (!match) throw new OffloadRefusal(selected, `not listed in remote.machines (configured: ${entries.join(", ") || "none"})`);
704
704
  return match;
705
705
  }
706
+ const settingSource = (flag, env, setting) => flag !== void 0 ? "flag" : env?.trim() ? "env" : setting !== void 0 ? "setting" : "default";
707
+ let buildMachineFlag;
708
+ /** The settings that decide where a build runs, with the layer each value came from, for this run's `--remote-build`. */
709
+ function buildPlacementSettings(selected) {
710
+ const flag = buildMachineFlag;
711
+ const remote = loadConfig$1()?.remote;
712
+ const rawMode = process.env.STIM_REMOTE_BUILD_MODE || remote?.buildMode;
713
+ return [{
714
+ key: "remote.build",
715
+ value: selected,
716
+ from: settingSource(flag, process.env.STIM_REMOTE_BUILD, remote?.build)
717
+ }, {
718
+ key: "remote.buildMode",
719
+ value: selected === "local" ? "off" : OFFLOAD_MODES.includes(rawMode) ? rawMode : "auto",
720
+ from: settingSource(void 0, process.env.STIM_REMOTE_BUILD_MODE, remote?.buildMode)
721
+ }];
722
+ }
706
723
  function resolveBuildPlacement(flag) {
707
724
  const remote = loadConfig$1()?.remote;
725
+ buildMachineFlag = flag;
708
726
  let selected = "auto";
709
727
  try {
710
728
  selected = resolveBuildMachine(flag, process.env.STIM_REMOTE_BUILD, remote?.build);
@@ -723,6 +741,23 @@ function resolveBuildPlacement(flag) {
723
741
  }
724
742
  }
725
743
  //#endregion
744
+ //#region src/remote-log.ts
745
+ let sink = null;
746
+ /** Where this run's failed requests to another Mac are written: its workspace log, so `stim logs` shows them. */
747
+ function setRemoteLogSink(next) {
748
+ sink = next;
749
+ }
750
+ function reportRemoteFailure(event, fields) {
751
+ try {
752
+ sink?.({
753
+ src: "build",
754
+ level: "warn",
755
+ event,
756
+ ...fields
757
+ });
758
+ } catch {}
759
+ }
760
+ //#endregion
726
761
  //#region src/offload/client.ts
727
762
  const CONNECT_TIMEOUT_MS = 1e4;
728
763
  const OFFER_TIMEOUT_MS = 2e4;
@@ -784,35 +819,43 @@ function offloadPlacement({ mode, machines, here, unsupported, selected = "auto"
784
819
  if (machines === 0) throw new OffloadRefusal(selected, "no remote Mac is paired");
785
820
  return {
786
821
  offload: true,
822
+ code: "named",
787
823
  reason: `selected with --remote-build ${selected}`
788
824
  };
789
825
  }
790
826
  if (selected === "local") return {
791
827
  offload: false,
828
+ code: "local-selected",
792
829
  reason: "--remote-build local"
793
830
  };
794
831
  if (mode === "off") return {
795
832
  offload: false,
833
+ code: "mode-off",
796
834
  reason: "remote.buildMode is off"
797
835
  };
798
836
  if (machines === 0) return {
799
837
  offload: false,
838
+ code: "no-remote-mac",
800
839
  reason: "no remote Mac is paired"
801
840
  };
802
841
  if (unsupported) return {
803
842
  offload: false,
843
+ code: "unsupported",
804
844
  reason: unsupported
805
845
  };
806
846
  if (mode === "force") return {
807
847
  offload: true,
848
+ code: "forced",
808
849
  reason: "remote.buildMode is force"
809
850
  };
810
851
  const busy = saturation(here);
811
852
  return busy ? {
812
853
  offload: true,
854
+ code: "this-mac-busy",
813
855
  reason: `this Mac is busy: ${busy} (${capacityText(here)})`
814
856
  } : {
815
857
  offload: false,
858
+ code: "this-mac-free",
816
859
  reason: `${capacityText(here)} here`
817
860
  };
818
861
  }
@@ -851,25 +894,26 @@ function offerProblems(offer, target) {
851
894
  function pickOffer({ mode, here, offers, target, selected = "auto" }) {
852
895
  const slotsFull = here.maxBuilds > 0 && here.builds >= here.maxBuilds;
853
896
  const reasons = [];
897
+ const candidates = [];
898
+ const skip = (machine, code, msg, detail) => {
899
+ reasons.push(`${machine}: ${msg}`);
900
+ candidates.push({
901
+ machine,
902
+ code,
903
+ msg,
904
+ ...detail ? { detail } : {}
905
+ });
906
+ };
854
907
  const ranked = [];
855
908
  offers.forEach(({ machine, offer, failure }, index) => {
856
909
  if (namedBuildMachine(selected) && machine !== selected) return;
857
- if (!offer) return void reasons.push(`${machine}: ${failure ?? "no offer"}`);
910
+ if (!offer) return skip(machine, "unreachable", failure ?? "no offer");
858
911
  const problems = offerProblems(offer, target);
859
- if (problems.length) {
860
- reasons.push(`${machine}: ${problems.map((problem) => problem.reason).join("; ")}`);
861
- return;
862
- }
912
+ if (problems.length) return skip(machine, problemCode(problems[0]), problems.map((problem) => problem.reason).join("; "), problems.map((problem) => problem.code));
863
913
  const load = offer.capacity.loadPerCore;
864
914
  if (selected === "auto" && mode === "auto" && !slotsFull) {
865
- if (typeof load !== "number") {
866
- reasons.push(`${machine}: capacity unknown (older stim-server) while this Mac has a free slot`);
867
- return;
868
- }
869
- if (load >= here.loadPerCore) {
870
- reasons.push(`${machine}: no less loaded (load ${load}/core there, ${here.loadPerCore}/core here)`);
871
- return;
872
- }
915
+ if (typeof load !== "number") return skip(machine, "load", "capacity unknown (older stim-server) while this Mac has a free slot");
916
+ if (load >= here.loadPerCore) return skip(machine, "load", `no less loaded (load ${load}/core there, ${here.loadPerCore}/core here)`);
873
917
  }
874
918
  const score = Number(offer.warm.checkout) + Number(offer.warm.dependencies) + Number(offer.warm.build);
875
919
  ranked.push({
@@ -877,13 +921,22 @@ function pickOffer({ mode, here, offers, target, selected = "auto" }) {
877
921
  score,
878
922
  load: typeof load === "number" ? load : Number.POSITIVE_INFINITY
879
923
  });
924
+ candidates.push({
925
+ machine,
926
+ code: "accepted",
927
+ msg: typeof load === "number" ? `can take the build (load ${load}/core there)` : "can take the build"
928
+ });
880
929
  });
881
930
  ranked.sort((a, b) => b.score - a.score || a.load - b.load);
882
931
  return {
883
932
  order: ranked.map((each) => each.index),
884
- reasons
933
+ reasons,
934
+ candidates
885
935
  };
886
936
  }
937
+ function problemCode({ code }) {
938
+ return code === "disk" || code === "busy" || code === "unreachable" ? code : code === "runtime" ? "no-matching-device" : "version-mismatch";
939
+ }
887
940
  const openSockets = /* @__PURE__ */ new Set();
888
941
  let closingOnExit = false;
889
942
  /**
@@ -966,7 +1019,32 @@ var BuildConnection = class BuildConnection {
966
1019
  socket.on("error", () => {});
967
1020
  }
968
1021
  /** Resolves why it could not connect; `refused` when the machine answered and turned this Mac away. */
969
- static open(target, token, timeoutMs, capability = "build") {
1022
+ static async open(target, token, timeoutMs, capability = "build") {
1023
+ const started = performance.now();
1024
+ const result = await BuildConnection.connect(target, token, timeoutMs, capability);
1025
+ const ms = Math.round(performance.now() - started);
1026
+ debugLog.log("remote_connect", {
1027
+ host: target.host,
1028
+ capability,
1029
+ ms,
1030
+ timeoutMs,
1031
+ ...result instanceof BuildConnection ? { ok: true } : {
1032
+ ok: false,
1033
+ failure: result.failure,
1034
+ code: result.code
1035
+ }
1036
+ });
1037
+ if (!(result instanceof BuildConnection)) reportRemoteFailure("remote_connect_failed", {
1038
+ host: target.host,
1039
+ capability,
1040
+ ms,
1041
+ timeoutMs,
1042
+ msg: result.failure,
1043
+ code: result.code
1044
+ });
1045
+ return result;
1046
+ }
1047
+ static connect(target, token, timeoutMs, capability) {
970
1048
  return new Promise((resolve) => {
971
1049
  const options = {
972
1050
  handshakeTimeout: timeoutMs,
@@ -996,7 +1074,8 @@ var BuildConnection = class BuildConnection {
996
1074
  protocol: 1,
997
1075
  client: {
998
1076
  name: "stim",
999
- version: "1"
1077
+ version: "1",
1078
+ runId: runId()
1000
1079
  },
1001
1080
  auth: { deviceToken: token }
1002
1081
  }
@@ -1028,17 +1107,36 @@ var BuildConnection = class BuildConnection {
1028
1107
  message: this.closed
1029
1108
  } });
1030
1109
  const id = this.nextId++;
1110
+ const started = performance.now();
1111
+ const done = (reply) => {
1112
+ const ms = Math.round(performance.now() - started);
1113
+ debugLog.log("remote_request", {
1114
+ method,
1115
+ ms,
1116
+ ..."error" in reply ? {
1117
+ ok: false,
1118
+ code: reply.error.code
1119
+ } : { ok: true }
1120
+ });
1121
+ if ("error" in reply) reportRemoteFailure("remote_request_failed", {
1122
+ method,
1123
+ ms,
1124
+ code: reply.error.code,
1125
+ msg: reply.error.message
1126
+ });
1127
+ return reply;
1128
+ };
1031
1129
  return new Promise((resolve) => {
1032
1130
  const timer = setTimeout(() => {
1033
1131
  this.pending.delete(id);
1034
- resolve({ error: {
1132
+ resolve(done({ error: {
1035
1133
  code: "timeout",
1036
1134
  message: `${method} got no reply in ${timeoutMs / 1e3} s`
1037
- } });
1135
+ } }));
1038
1136
  }, timeoutMs);
1039
1137
  this.pending.set(id, (reply) => {
1040
1138
  clearTimeout(timer);
1041
- resolve(reply);
1139
+ resolve(done(reply));
1042
1140
  });
1043
1141
  this.socket.send(JSON.stringify({
1044
1142
  id,
@@ -1189,7 +1287,8 @@ async function probeMachine(credential, identity, { connectMs = CONNECT_TIMEOUT_
1189
1287
  };
1190
1288
  const reply = await connection.request("build.offer", {
1191
1289
  repo: identity.repo,
1192
- ...identity.lockfile ? { lockfile: identity.lockfile } : {}
1290
+ ...identity.lockfile ? { lockfile: identity.lockfile } : {},
1291
+ ...identity.rubyVersion ? { rubyVersion: identity.rubyVersion } : {}
1193
1292
  }, offerMs);
1194
1293
  const failure = replyError(reply);
1195
1294
  if (failure || !("result" in reply)) {
@@ -1209,7 +1308,7 @@ async function probeMachine(credential, identity, { connectMs = CONNECT_TIMEOUT_
1209
1308
  * Asks every paired machine for an offer in parallel and keeps the connection to the one `pickOffer` chooses, or
1210
1309
  * returns why none takes the build. A named selection probes only its credential and skips auto load gating.
1211
1310
  */
1212
- async function chooseBuildMachine({ projectRoot, target, mode, here, note, machines = pairedMachines(), selected = "auto" }) {
1311
+ async function chooseBuildMachine({ projectRoot, target, mode, here, note, machines = pairedMachines(), selected = "auto", onCandidates }) {
1213
1312
  const started = Date.now();
1214
1313
  let identity;
1215
1314
  try {
@@ -1218,8 +1317,12 @@ async function chooseBuildMachine({ projectRoot, target, mode, here, note, machi
1218
1317
  return `this app is not in a git checkout (${error.message.split("\n")[0]})`;
1219
1318
  }
1220
1319
  if (namedBuildMachine(selected)) machines = machines.filter((each) => each.machine === selected).slice(0, 1);
1221
- const asked = await Promise.all(machines.map((credential) => probeMachine(credential, identity)));
1222
- const { order, reasons } = pickOffer({
1320
+ const rubyVersion = readRubyVersion(projectRoot) ?? void 0;
1321
+ const asked = await Promise.all(machines.map((credential) => probeMachine(credential, {
1322
+ ...identity,
1323
+ rubyVersion
1324
+ })));
1325
+ const { order, reasons, candidates } = pickOffer({
1223
1326
  selected,
1224
1327
  mode,
1225
1328
  here,
@@ -1233,6 +1336,7 @@ async function chooseBuildMachine({ projectRoot, target, mode, here, note, machi
1233
1336
  asked.forEach((each, at) => {
1234
1337
  if (!order.includes(at) && "connection" in each) each.connection.close();
1235
1338
  });
1339
+ onCandidates?.(candidates);
1236
1340
  if (order.length === 0) return reasons.length ? reasons.join("; ") : "no remote Mac is paired";
1237
1341
  for (const reason of reasons) note(reason);
1238
1342
  const [first, ...rest] = order.map((at) => {
@@ -1634,7 +1738,10 @@ function offloadCheck(projectRoot, targets) {
1634
1738
  reason: `this app is not in a git checkout (${identity})`
1635
1739
  }]
1636
1740
  };
1637
- const probe = await probeMachine(credential, identity, {
1741
+ const probe = await probeMachine(credential, {
1742
+ ...identity,
1743
+ rubyVersion: readRubyVersion(projectRoot) ?? void 0
1744
+ }, {
1638
1745
  connectMs: DOCTOR_CONNECT_MS,
1639
1746
  offerMs: DOCTOR_OFFER_MS
1640
1747
  });
@@ -1662,4 +1769,4 @@ function offloadCheck(projectRoot, targets) {
1662
1769
  };
1663
1770
  }
1664
1771
  //#endregion
1665
- export { realIo as S, configuredMachines as _, offloadBuild as a, parseMachine$1 as b, placementLoad as c, OffloadRefusal as d, namedBuildMachine as f, inspectBuildMachines as g, resolveBuildPlacement as h, closeOffload as i, remotePhaseText as l, resolveBuildMachine as m, buildPlacementCandidates as n, offloadCheck as o, parseBuildMachineOption as p, chooseBuildMachine as r, offloadPlacement as s, BuildConnection as t, simulatorRuntime as u, hostingMachines as v, pinnedEndpoint$1 as x, inspectDeviceHostMachines as y };
1772
+ export { pinnedEndpoint$1 as C, parseMachine$1 as S, resolveBuildPlacement as _, offloadBuild as a, hostingMachines as b, placementLoad as c, setRemoteLogSink as d, OffloadRefusal as f, resolveBuildMachine as g, parseBuildMachineOption as h, closeOffload as i, remotePhaseText as l, namedBuildMachine as m, buildPlacementCandidates as n, offloadCheck as o, buildPlacementSettings as p, chooseBuildMachine as r, offloadPlacement as s, BuildConnection as t, simulatorRuntime as u, inspectBuildMachines as v, realIo as w, inspectDeviceHostMachines as x, configuredMachines as y };
@@ -1,16 +1,16 @@
1
- import { R as deviceSlotKey, W as validateDeviceSlot } from "./config-D0DbpZtM.mjs";
2
- import { t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
1
+ import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
3
2
  import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { x as workspaceLogsDir } from "./workspace-state-DqcCbpE7.mjs";
5
- import { r as createNdjsonWriter } from "./ndjson-PclOIwVY.mjs";
6
- import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-Ee7sDXfp.mjs";
7
- import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-Cr1h5gnO.mjs";
8
- import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-DyRQru0q.mjs";
9
- import { a as waitForAppPid, i as startAndroidLogcat, n as parseLogcatLine, o as watchAppPid, t as androidClockOffset } from "./android-DE4v59Mb.mjs";
3
+ import { R as deviceSlotKey, W as validateDeviceSlot } from "./config-CgYMahz7.mjs";
4
+ import { x as workspaceLogsDir } from "./workspace-state-C59dqG-Z.mjs";
5
+ import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
6
+ import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-Bn7jWDB1.mjs";
7
+ import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-D6Se7gg_.mjs";
8
+ import { a as waitForAppPid, i as startAndroidLogcat, n as parseLogcatLine, o as watchAppPid, t as androidClockOffset } from "./android-CBwCNicO.mjs";
9
+ import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-Bvbf0SGY.mjs";
10
10
  import { existsSync } from "node:fs";
11
11
  import { isAbsolute, join, resolve } from "node:path";
12
- import { LOG_ROTATE_BYTES } from "@stim-cli/core";
13
12
  import { fileURLToPath } from "node:url";
13
+ import { LOG_ROTATE_BYTES } from "@stim-cli/core";
14
14
  //#region src/collector/run.ts
15
15
  const PLATFORMS = ["ios", "android"];
16
16
  function parseArgs(argv) {
@@ -1,7 +1,7 @@
1
1
  import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
2
- import { t as NO_PROJECT_REFUSAL } from "./project-D47Rh0ly.mjs";
3
- import { quotedPath as quotedPath$1 } from "@stim-cli/core";
2
+ import { t as NO_PROJECT_REFUSAL } from "./project-C3ChRLZy.mjs";
4
3
  import chalk from "chalk";
4
+ import { quotedPath as quotedPath$1 } from "@stim-cli/core";
5
5
  //#region src/diagnostics/launch-error-preview.ts
6
6
  function framePriority(frame, root) {
7
7
  const normalized = frame.replaceAll("\\", "/");
@@ -1,11 +1,11 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
3
3
  import { join } from "node:path";
4
- import { existsSync, lstatSync, mkdirSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
5
4
  import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse as parse$1, sep as sep$1 } from "path";
6
- import { configDir } from "@stim-cli/core";
7
- import { InvalidArgumentError } from "commander";
8
5
  import { allMetroPorts, configCorruptRepair, findEnclosingWorktreeRoot, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getProject, getProjectSettings, getRepoSettings, isPathPrefix, loadConfig, loadConfig as loadConfig$1, withConfigLock, withConfigLock as withConfigLock$1 } from "@stim-cli/core/state";
6
+ import { existsSync, lstatSync, mkdirSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
7
+ import { InvalidArgumentError } from "commander";
8
+ import { configDir } from "@stim-cli/core";
9
9
  //#region src/devices/device-slots.ts
10
10
  const DEFAULT_DEVICE_SLOT = "default";
11
11
  const DEVICE_SLOT_RULE = "A device slot must be 1-64 letters, digits, underscores or hyphens, starting with a letter or digit.";
@@ -1,5 +1,5 @@
1
- import { d as getConfigDir } from "./config-D0DbpZtM.mjs";
2
- import { w as withDirLock } from "./workspace-state-DqcCbpE7.mjs";
1
+ import { d as getConfigDir } from "./config-CgYMahz7.mjs";
2
+ import { w as withDirLock } from "./workspace-state-C59dqG-Z.mjs";
3
3
  import { mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { createdDevicesFile, createdDevicesLock, readCreatedDevices, readCreatedDevices as readCreatedDevices$1 } from "@stim-cli/core/state";
5
5
  //#region src/devices/created-devices.ts
@@ -1,5 +1,5 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { gt as repoRoot } from "./settings-Cfd-0r2d.mjs";
1
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
+ import { y as repoRoot } from "./worktree-CsKYexJM.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { dirname, join, relative } from "node:path";
5
5
  //#region src/dependency-state.ts
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
1
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
2
  import { openSync } from "node:fs";
3
3
  //#region src/detached-entry.ts
4
4
  const LOG_FILE_FLAG = "--log-file";
@@ -1,5 +1,5 @@
1
- import { l as isPackageResolvable, m as resolvePackageJson } from "./project-D47Rh0ly.mjs";
2
- import { E as readBundleSchemes, T as pickDevClientScheme } from "./app-install-VPkI5WEg.mjs";
1
+ import { h as resolvePackageJson, l as isPackageResolvable } from "./project-C3ChRLZy.mjs";
2
+ import { E as readBundleSchemes, T as pickDevClientScheme } from "./app-install-D-PUENug.mjs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
5
5
  //#region src/commands/dev-client.ts
@@ -1,11 +1,11 @@
1
- import { H as projectDeviceSlots, R as deviceSlotKey, V as parseDeviceSlotOption, p as getProject } from "./config-D0DbpZtM.mjs";
2
- import { r as clockTime } from "./command-output-CDAIFD-8.mjs";
3
- import { s as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-D47Rh0ly.mjs";
4
- import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-DpoS36_u.mjs";
5
- import { E as getAvdNameForSerial, G as probeEmulatorSerial, N as memoizeEmulatorProbe, O as listAdbDevices, U as physicalDeviceModel, Y as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, s as androidPoolCandidates } from "./android-B_YNZy61.mjs";
6
- import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-B8YltIH_.mjs";
7
- import { t as selectFromPool } from "./device-pool-3o7s5lo4.mjs";
8
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-pAN4t54-.mjs";
1
+ import { r as clockTime } from "./command-output-CBtzyIgF.mjs";
2
+ import { H as projectDeviceSlots, R as deviceSlotKey, V as parseDeviceSlotOption, p as getProject } from "./config-CgYMahz7.mjs";
3
+ import { s as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-C3ChRLZy.mjs";
4
+ import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-Co-EwifR.mjs";
5
+ import { E as getAvdNameForSerial, G as probeEmulatorSerial, N as memoizeEmulatorProbe, O as listAdbDevices, U as physicalDeviceModel, Y as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, s as androidPoolCandidates } from "./android-DC3ZLuw0.mjs";
6
+ import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-w1xhCqIW.mjs";
7
+ import { t as selectFromPool } from "./device-pool-F5WvRPtD.mjs";
8
+ import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-vOaByMhw.mjs";
9
9
  import chalk from "chalk";
10
10
  //#region src/commands/device.ts
11
11
  const DEFAULT_FOR = "5m";