stim 1.18.0 → 1.20.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 (178) hide show
  1. package/README.md +21 -4
  2. package/dist/{activity-BxnkDZDi.mjs → activity-BrGh9EAI.mjs} +3 -3
  3. package/dist/{agent-device-usage-output-CZ66YA4T.mjs → agent-device-usage-output-DVyv_hWj.mjs} +7 -7
  4. package/dist/android-0vv-OruW.mjs +6 -0
  5. package/dist/android-Brx6EKvJ.mjs +1258 -0
  6. package/dist/{android-DC3ZLuw0.mjs → android-BsYNR81W.mjs} +103 -45
  7. package/dist/{android-CBwCNicO.mjs → android-CK3fpEyZ.mjs} +2 -2
  8. package/dist/{android-cas-BBFyr9CA.mjs → android-cas-DCAuXryb.mjs} +9 -5
  9. package/dist/android-cas-compiler.mjs +1 -1
  10. package/dist/api-run.mjs +159 -8
  11. package/dist/{api-D0VtFhqk.mjs → api-zuX3ynYN.mjs} +9 -7
  12. package/dist/api.d.mts +104 -4
  13. package/dist/api.mjs +1 -1
  14. package/dist/{app-install-D-PUENug.mjs → app-install-0LgaQRT7.mjs} +39 -18
  15. package/dist/artifact-CnC0mfov.mjs +807 -0
  16. package/dist/artifact-DClXJNWx.mjs +772 -0
  17. package/dist/artifact-lifecycle-DzPpBYvK.mjs +30 -0
  18. package/dist/{web-DTU0uiWj.mjs → browser-web-CzBmhmgs.mjs} +136 -174
  19. package/dist/{budget-DIhL2BKx.mjs → budget-BONq9vXY.mjs} +3096 -3244
  20. package/dist/build-BixRI6sB.mjs +462 -0
  21. package/dist/build-plan-CP0tckNU.mjs +553 -0
  22. package/dist/{cache-manifest-BI7ozfmH.mjs → cache-manifest-qA3dT2x2.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/ccache-CjHQ5F8g.mjs +142 -0
  25. package/dist/{chrome-DJnmnS5q.mjs → chrome-Dp2lMLBe.mjs} +1 -1
  26. package/dist/{cli-DNJMwADx.mjs → cli-B2R8wH1F.mjs} +20 -20
  27. package/dist/cli.mjs +1 -1
  28. package/dist/{client-DzhapoMB.mjs → client-BLy1Pw2V.mjs} +172 -165
  29. package/dist/collector-run.d.mts +10 -0
  30. package/dist/collector-run.mjs +7 -7
  31. package/dist/{command-output-CBtzyIgF.mjs → command-output-BjPN99ZB.mjs} +2 -2
  32. package/dist/{config-CgYMahz7.mjs → config-D0LhTY3S.mjs} +13 -13
  33. package/dist/{created-devices-DKbeWsiK.mjs → created-devices-HU_DAb_Q.mjs} +7 -6
  34. package/dist/{dependency-state-xKoOypBm.mjs → dependency-state-B2m8eqsS.mjs} +2 -2
  35. package/dist/{detached-entry-BLfcgc4O.mjs → detached-entry-BXq4fIl-.mjs} +1 -1
  36. package/dist/{dev-client-CLnIH02x.mjs → dev-client-ClATaJoH.mjs} +2 -2
  37. package/dist/{device-D7oCHGWi.mjs → device-B7lsC0K1.mjs} +8 -8
  38. package/dist/device-DVCwAFlX.mjs +727 -0
  39. package/dist/{device-capacity-EUOOYr8T.mjs → device-capacity-Ca_ke1LE.mjs} +25 -15
  40. package/dist/device-host-worker.mjs +38 -18
  41. package/dist/{device-ios-6MewKKnc.mjs → device-ios-CRUqPxKw.mjs} +12 -11
  42. package/dist/{device-lease-Co-EwifR.mjs → device-lease-DHOBXGgS.mjs} +135 -22
  43. package/dist/{device-lease-run-w1xhCqIW.mjs → device-lease-run-CvDeHTkG.mjs} +4 -4
  44. package/dist/{device-pool-F5WvRPtD.mjs → device-pool-L2-5GxMy.mjs} +3 -3
  45. package/dist/{device-remote-tHbd1fKy.mjs → device-remote-Bmg42063.mjs} +17 -69
  46. package/dist/doctor-C2MSuMMg.mjs +515 -0
  47. package/dist/{doctor-B9ckYUoU.mjs → doctor-DPAqhVCK.mjs} +334 -721
  48. package/dist/doctor-watchman-CB4NnVZm.mjs +260 -0
  49. package/dist/{simslim-EHBQ2R4G.mjs → eas-build-Dw_ec2Km.mjs} +6 -152
  50. package/dist/{stim-installations-aR_WsNOA.mjs → eas-session-ledger-DZlC-Fq3.mjs} +57 -4
  51. package/dist/{error-diagnostics-BRXOqDzG.mjs → error-diagnostics-Du7I_GuY.mjs} +17 -12
  52. package/dist/errors-DzkMYh8Q.mjs +205 -0
  53. package/dist/{exec-DWhCZDGm.mjs → exec-B81Qodjn.mjs} +69 -15
  54. package/dist/{gc-Dh6mXOKC.mjs → gc-PWp34zGb.mjs} +23 -22
  55. package/dist/{gradle-C6GKnunQ.mjs → gradle-C2OEKCCI.mjs} +50 -125
  56. package/dist/{guide-tm6igAaa.mjs → guide-Dai9lphv.mjs} +862 -538
  57. package/dist/{hosted-android-Bv285t_t.mjs → hosted-android-DQ-Agsd8.mjs} +5 -5
  58. package/dist/{hosted-client-C-rMtppF.mjs → hosted-client-Io01s5By.mjs} +9 -3
  59. package/dist/{hosted-ios-D5mNmtj4.mjs → hosted-ios-DIxFnYp-.mjs} +3 -3
  60. package/dist/{hosted-logs-DN8Iz4mJ.mjs → hosted-logs-DP-ABU_M.mjs} +8 -8
  61. package/dist/{hosted-macos-B-wEjlwG.mjs → hosted-macos-Aziw9T_9.mjs} +7 -6
  62. package/dist/{hosted-native-DeeOG8xZ.mjs → hosted-native-BdAQi21M.mjs} +23 -16
  63. package/dist/{idle-shutdown-jjtxAn5C.mjs → idle-shutdown-DdMqoSUB.mjs} +7 -7
  64. package/dist/ios-BZ9dg2Fr.mjs +9 -0
  65. package/dist/{ios-B3SbOWdw.mjs → ios-CXLIUxXJ.mjs} +180 -24
  66. package/dist/ios-CZuv6gRv.mjs +1112 -0
  67. package/dist/{ios-Bvbf0SGY.mjs → ios-VGvNdsv2.mjs} +1 -1
  68. package/dist/{ios-device-Bn7jWDB1.mjs → ios-device-B1B14xND.mjs} +1 -1
  69. package/dist/{ios-device-vOaByMhw.mjs → ios-device-BreZOpM0.mjs} +3 -3
  70. package/dist/ios-project-B9drt_aY.mjs +197 -0
  71. package/dist/{ios-state-B2pES6Vs.mjs → ios-state-CjrL2qv-.mjs} +1 -1
  72. package/dist/js-swap-C8icNYIY.mjs +432 -0
  73. package/dist/launch-DxH0THLP.mjs +745 -0
  74. package/dist/launch-YrbqaIFj.mjs +1530 -0
  75. package/dist/{launch-verify-hskNcWkZ.mjs → launch-verify-BzRdbuO1.mjs} +26 -7
  76. package/dist/{logs-1Ylc1Ri6.mjs → logs-DHaRNfg7.mjs} +11 -11
  77. package/dist/macos-C0iljhsN.mjs +2 -0
  78. package/dist/{macos-DF6C7wUU.mjs → macos-V_3Ui7g4.mjs} +125 -155
  79. package/dist/macos-run.mjs +1 -1
  80. package/dist/maintenance-run.mjs +13 -10
  81. package/dist/{metro-Dh8T4Ytd.mjs → metro-D_j9sN-B.mjs} +209 -43
  82. package/dist/{metro-gateway-CEUw9RMH.mjs → metro-gateway-BBJldOdi.mjs} +2 -2
  83. package/dist/miss-reason-BPAzZS0r.mjs +238 -0
  84. package/dist/{named-ports-BFIz1Shz.mjs → named-ports-C2lvoPsb.mjs} +12 -5
  85. package/dist/native-android-lHzaew7r.mjs +226 -0
  86. package/dist/native-gradle-inputs-BQnIdAlL.mjs +356 -0
  87. package/dist/{native-runtime-D_603JiC.mjs → native-runtime-BRmWL7ru.mjs} +9 -8
  88. package/dist/native-xcode-inputs-eutS19jU.mjs +307 -0
  89. package/dist/native-xcode-ios-DP3cHLwu.mjs +434 -0
  90. package/dist/{ndjson-LGZAMsqa.mjs → ndjson-GOnbyvso.mjs} +6 -6
  91. package/dist/offload-worker.d.mts +12 -6
  92. package/dist/offload-worker.mjs +409 -73
  93. package/dist/{ownership-D6Se7gg_.mjs → ownership-DXzMMSx6.mjs} +2 -2
  94. package/dist/{placement-log-BcPhRwR4.mjs → placement-log-reFbjqEr.mjs} +7 -3
  95. package/dist/plan-BDk2AeY_.mjs +260 -0
  96. package/dist/plan-placement-D_YYlE6N.mjs +73 -0
  97. package/dist/{ports-BLTtfBq-.mjs → ports-jzvAJXXL.mjs} +3 -3
  98. package/dist/{prebuild-juCyreaR.mjs → prebuild-Bw44QxVh.mjs} +4 -4
  99. package/dist/{preview-D5V07Nrl.mjs → preview-BaBJ72Al.mjs} +51 -34
  100. package/dist/project-B8_duAzW.mjs +1067 -0
  101. package/dist/project-plan-BPwbLwQu.mjs +10 -0
  102. package/dist/{pull-request-u4vp7zmK.mjs → pull-request-vOhLNmIb.mjs} +1 -1
  103. package/dist/pull-requests.mjs +1 -1
  104. package/dist/react-native-android-chm1DMlA.mjs +921 -0
  105. package/dist/react-native-build-oAw6gQeW.mjs +239 -0
  106. package/dist/react-native-doctor-DYXoh-6I.mjs +78 -0
  107. package/dist/react-native-ios-SCTK_CT5.mjs +595 -0
  108. package/dist/{recordings-BAWltsVt.mjs → recordings-Bk-VivUV.mjs} +1 -1
  109. package/dist/{reload-DvyWzVjJ.mjs → reload-D34GkY78.mjs} +17 -14
  110. package/dist/remote-BU9UyhCJ.mjs +192 -0
  111. package/dist/{remote-cache-BGg7aGIZ.mjs → remote-cache-Bsts6f6Y.mjs} +5 -5
  112. package/dist/result-BDoRk1k3.mjs +186 -0
  113. package/dist/{run-vhtDgpHO.mjs → run-qvff78hv.mjs} +3 -3
  114. package/dist/{server-bare-B9E7S1aR.mjs → server-bare-dWjAarki.mjs} +6 -6
  115. package/dist/server-command-7XIKlWtO.mjs +69 -0
  116. package/dist/{server-expo-DoBHhuzK.mjs → server-expo-CsYu2aKL.mjs} +107 -82
  117. package/dist/server-expo-DV43vep4.mjs +2 -0
  118. package/dist/settings-Bbztm4oV.mjs +1503 -0
  119. package/dist/{settings-Byp2AQ_E.mjs → settings-CT3E71-i.mjs} +6 -7
  120. package/dist/{state-lKh8shBp.d.mts → settings-vk3mJGSm.d.mts} +4 -2
  121. package/dist/settings.schema.json +156 -6
  122. package/dist/simslim-ChMfe8rg.mjs +149 -0
  123. package/dist/{slot-launch-C1nqh4mu.mjs → slot-launch-B9hn96wd.mjs} +6 -6
  124. package/dist/{stage-g_WqWeaE.mjs → stage-BNKKdDNc.mjs} +6 -3
  125. package/dist/start-CbQCSnXQ.mjs +2 -0
  126. package/dist/{start-D-IeOyoK.mjs → start-CdvcTaXr.mjs} +113 -77
  127. package/dist/{state-xnqpx3AD.mjs → state-Boo0IMJq.mjs} +4 -2
  128. package/dist/{state-BG-aAk4k.mjs → state-DI84A-uu.mjs} +29 -10
  129. package/dist/{stats-DY6ekz8F.mjs → stats-BIIDrjA8.mjs} +6 -6
  130. package/dist/{status-BEeL6IKz.mjs → status-BDGHwkCs.mjs} +3 -1
  131. package/dist/{status-DCjZeE-K.mjs → status-DARMkc9q.mjs} +80 -294
  132. package/dist/status-watch-DvmI3SmN.mjs +296 -0
  133. package/dist/{stim-desktop-Behws_fi.mjs → stim-desktop-8GQX2OV8.mjs} +1 -1
  134. package/dist/{stop-DIJtD2GL.mjs → stop-CCZS-C9m.mjs} +2 -2
  135. package/dist/stop-WQPQHLuy.mjs +72 -0
  136. package/dist/{stop-BTjs3xbc.mjs → stop-iNemHsJC.mjs} +81 -33
  137. package/dist/supervisor-run.d.mts +7 -2
  138. package/dist/supervisor-run.mjs +32 -20
  139. package/dist/{support-Bwvbrq5-.mjs → support-CnE_SIjt.mjs} +17 -7
  140. package/dist/{support-BaayeYCf.mjs → support-DCco5fut.mjs} +61 -8
  141. package/dist/swiftpm-macos-afeNUExW.mjs +119 -0
  142. package/dist/{native-run-B06FkmZx.mjs → tailnet-CoJUb2tB.mjs} +113 -6
  143. package/dist/toolchain-BIupIro1.mjs +2 -0
  144. package/dist/{toolchain-Bnyd_K3A.mjs → toolchain-DqyDXs30.mjs} +225 -315
  145. package/dist/{trigger-CJMhwXe8.mjs → trigger-C0MWBi8O.mjs} +3 -3
  146. package/dist/trigger-SHLOWJ4O.mjs +2 -0
  147. package/dist/{warm-progress-CjB-MP6H.mjs → warm-progress-C3ASD6z5.mjs} +134 -37
  148. package/dist/{status-Dcr0Qexd.mjs → watchman-CQl51YZu.mjs} +75 -7
  149. package/dist/web-B3eldHFH.mjs +123 -0
  150. package/dist/web-BLXpOe6b.mjs +2 -0
  151. package/dist/web-run.mjs +10 -10
  152. package/dist/{workspace-state-C59dqG-Z.mjs → workspace-state-CSIFuuDa.mjs} +33 -33
  153. package/dist/{workspaces-xXItD8Dj.mjs → workspaces-D2xSHBDY.mjs} +1297 -1211
  154. package/dist/{worktree-BSYlofkq.mjs → worktree-BxDqaTev.mjs} +102 -63
  155. package/dist/worktree-q7_OZNY0.mjs +2 -0
  156. package/package.json +8 -6
  157. package/shim/bundle-response.cjs +2 -1
  158. package/shim/bundle-response.d.cts +1 -1
  159. package/shim/expo-metro-config.cjs +1 -1
  160. package/shim/native-android.gradle +101 -0
  161. package/dist/android-BKA16DTf.mjs +0 -4
  162. package/dist/android-BvwuMUJ9.mjs +0 -3572
  163. package/dist/guide-status-Bhf9SJXc.mjs +0 -125
  164. package/dist/ios-CPdkoKaa.mjs +0 -3953
  165. package/dist/ios-DNpdygiv.mjs +0 -7
  166. package/dist/macos-Ck7OBMNY.mjs +0 -2
  167. package/dist/metro-store-BAHFcJm6.mjs +0 -106
  168. package/dist/plan-placement-CtxkCO54.mjs +0 -1859
  169. package/dist/project-C3ChRLZy.mjs +0 -212
  170. package/dist/projects-DD7dBTCj.mjs +0 -92
  171. package/dist/server-expo-Db9HBUoa.mjs +0 -2
  172. package/dist/settings-CQyMElEP.mjs +0 -701
  173. package/dist/start-NTc1Ifqs.mjs +0 -2
  174. package/dist/stop-BGhKMOuH.mjs +0 -48
  175. package/dist/trigger-DWAq9hkw.mjs +0 -2
  176. package/dist/web-B6_bFDn7.mjs +0 -2
  177. package/dist/worktree-BJfnU6r5.mjs +0 -2
  178. package/dist/worktree-CsKYexJM.mjs +0 -753
@@ -1,20 +1,21 @@
1
1
  import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
- import { B as parseDeviceSlotKey, H as projectDeviceSlots, T as setSupervisor, o as clearSupervisor, p as getProject } from "./config-CgYMahz7.mjs";
3
- import { i as detectIsExpo } from "./project-C3ChRLZy.mjs";
4
- import { C as workspaceStateFile, a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
5
- import { E as workspaceBuildInProgress, Ft as MODE_BARE, It as MODE_EXPO, Lt as clearExpoMetroTunnel, Mt as parseTriggerCount, Nt as parseWatchRoots, Pt as runWatchman, Ut as readPidFile, Vt as clearWorkspaceSupervisor, f as describeDevServerStop, h as devServerStopRecord, jt as parseSubscriberNames, m as devServerStopLevel, qt as writePidFile, y as vanishedSupervisorMessage } from "./budget-DIhL2BKx.mjs";
6
- import { f as withIdleWorkspace } from "./workspaces-xXItD8Dj.mjs";
7
- import { m as workspaceDeviceLastUseAt, r as createActivityReader } from "./activity-BxnkDZDi.mjs";
8
- import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-Co-EwifR.mjs";
9
- import { z as ownedAvdSerialResolver } from "./android-DC3ZLuw0.mjs";
10
- import { a as withWorkspaceProcessLock } from "./named-ports-BFIz1Shz.mjs";
11
- import { s as describeError } from "./metro-store-BAHFcJm6.mjs";
12
- import { r as createNdjsonWriter } from "./ndjson-LGZAMsqa.mjs";
13
- import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-jjtxAn5C.mjs";
14
- import { l as probeHostedSession } from "./hosted-client-C-rMtppF.mjs";
15
- import { t as clearHostedMetro } from "./metro-gateway-CEUw9RMH.mjs";
16
- import { t as relaunchWithLogFile } from "./detached-entry-BLfcgc4O.mjs";
17
- import { n as nativeProjectIntegration } from "./projects-DD7dBTCj.mjs";
2
+ import { B as parseDeviceSlotKey, H as projectDeviceSlots, T as setSupervisor, o as clearSupervisor, p as getProject } from "./config-D0LhTY3S.mjs";
3
+ import { J as runnableMetroCommand, K as resolveProjectSettings } from "./settings-Bbztm4oV.mjs";
4
+ import { a as parseLease, r as leaseIsExpired, s as parseWorkspaceLeases, t as deviceLeasePath } from "./device-lease-DHOBXGgS.mjs";
5
+ import { E as workspaceStateFile, a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, w as workspaceLogsDir$1 } from "./workspace-state-CSIFuuDa.mjs";
6
+ import { A as clearWorkspaceSupervisor, C as MODE_BARE, E as clearExpoMetroTunnel, L as writePidFile, M as readPidFile, T as MODE_EXPO, _ as detectIsExpo, u as nativeProjectIntegration, w as MODE_COMMAND } from "./project-B8_duAzW.mjs";
7
+ import { z as ownedAvdSerialResolver } from "./android-BsYNR81W.mjs";
8
+ import { f as withIdleWorkspace } from "./workspaces-D2xSHBDY.mjs";
9
+ import { dt as devServerStopLevel, ft as devServerStopRecord, g as workspaceBuildInProgress, gt as vanishedSupervisorMessage, lt as describeDevServerStop } from "./budget-BONq9vXY.mjs";
10
+ import { a as withWorkspaceProcessLock } from "./named-ports-C2lvoPsb.mjs";
11
+ import { r as createNdjsonWriter } from "./ndjson-GOnbyvso.mjs";
12
+ import { t as describeError } from "./errors-DzkMYh8Q.mjs";
13
+ import { t as relaunchWithLogFile } from "./detached-entry-BXq4fIl-.mjs";
14
+ import { n as parseTriggerCount, o as runWatchman, r as parseWatchRoots, t as parseSubscriberNames } from "./watchman-CQl51YZu.mjs";
15
+ import { m as workspaceDeviceLastUseAt, r as createActivityReader } from "./activity-BrGh9EAI.mjs";
16
+ import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DdMqoSUB.mjs";
17
+ import { u as probeHostedSession } from "./hosted-client-Io01s5By.mjs";
18
+ import { t as clearHostedMetro } from "./metro-gateway-BBJldOdi.mjs";
18
19
  import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
19
20
  import { dirname, isAbsolute, join, resolve, sep } from "node:path";
20
21
  import { DEV_SERVER_STOP_REQUEST_KEY, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, IDLE_STOP_KEY, hostedAndroidPlacements, hostedIosPlacements, hostedMetroGateways, hostedMetroRequests, hostedNativeRecords, parseHostedNativePlacement, readDevServerStopRequest } from "@stim-cli/core/state";
@@ -157,7 +158,7 @@ function trackDevServerActivity(now) {
157
158
  if (typeof requestId === "string") open.add(requestId);
158
159
  } else if (event === "bundle_response_finished" || event === "bundle_response_failed") {
159
160
  if (typeof requestId === "string") open.delete(requestId);
160
- } else if (event !== "expo_stdout") return;
161
+ } else if (event !== "expo_stdout" && event !== "command_stdout") return;
161
162
  last = now();
162
163
  },
163
164
  lastActivityAt: () => open.size > 0 ? now() : last
@@ -463,12 +464,14 @@ const DEVICE_IDLE_OPS = {
463
464
  due: dueIdleDevices,
464
465
  shutDown: shutDownIdleDevices
465
466
  };
466
- async function runSupervisor({ root, port, tunnel = false, resetCache = false, idleStopMinutes = 0, idleProbe, deviceIdleMinutes = 0, deviceIdle = DEVICE_IDLE_OPS, isExpo = detectIsExpo, startBare = null, startExpo = null, now = Date.now, onExit = (code) => process.exit(code), attachSignals = true, stderr = (line) => console.error(line), watchman = runWatchman }) {
467
+ async function runSupervisor({ root, port, tunnel = false, resetCache = false, idleStopMinutes = 0, idleProbe, deviceIdleMinutes = 0, deviceIdle = DEVICE_IDLE_OPS, isExpo = detectIsExpo, startBare = null, startExpo = null, startCommand = null, settings: settingsOverride = null, now = Date.now, onExit = (code) => process.exit(code), attachSignals = true, stderr = (line) => console.error(line), watchman = runWatchman }) {
467
468
  root = realpathSync(root);
468
469
  const logsDir = workspaceLogsDir$1(root);
469
470
  const writer = createNdjsonWriter(join(logsDir, "metro.ndjson"), { maxBytes: LOG_ROTATE_BYTES });
470
471
  const integration = nativeProjectIntegration(root, isExpo);
471
- const mode = integration.mode;
472
+ const settings = settingsOverride ?? resolveProjectSettings(root).settings;
473
+ const command = runnableMetroCommand(settings);
474
+ const mode = command ? MODE_COMMAND : integration.mode;
472
475
  const startedAt = new Date(now()).toISOString();
473
476
  const processToken = (0, process_identity_exports.captureProcessToken)(process.pid);
474
477
  if (!processToken) {
@@ -597,13 +600,22 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
597
600
  return writer.write(entry);
598
601
  } });
599
602
  try {
600
- server = await ((mode === "expo-child" ? startExpo : startBare) ?? await integration.loadDevServer())({
603
+ let start;
604
+ if (command) {
605
+ const startServer = startCommand ?? (await import("./server-command-7XIKlWtO.mjs")).startCommandServer;
606
+ start = (opts) => startServer({
607
+ ...opts,
608
+ command
609
+ });
610
+ } else start = (mode === "expo-child" ? startExpo : startBare) ?? await integration.loadDevServer();
611
+ server = await start({
601
612
  root,
602
613
  port,
603
614
  logsDir,
604
615
  writer: serverWriter,
605
616
  tunnel,
606
617
  resetCache,
618
+ settings,
607
619
  onTunnelUrl: (url) => {
608
620
  try {
609
621
  withWorkspaceStateLock(root, () => {
@@ -1,8 +1,8 @@
1
- import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
- import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-DC3ZLuw0.mjs";
3
- import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-EUOOYr8T.mjs";
4
- import { T as pickDevClientScheme } from "./app-install-D-PUENug.mjs";
5
- import { t as devClientScheme } from "./dev-client-CLnIH02x.mjs";
1
+ import { t as getExecutor } from "./exec-B81Qodjn.mjs";
2
+ import { C as emulatorFailureRemedy, D as hostSystemImageArch, K as profileNeedsFoldFeature, N as memoizeEmulatorProbe, S as emulatorDiskSpaceRemedy, T as findBuildTool, W as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as extractEmulatorFailure } from "./android-BsYNR81W.mjs";
3
+ import { T as pickDevClientScheme } from "./app-install-0LgaQRT7.mjs";
4
+ import { l as unknownAndroidDeviceProfileRefusal, o as layerNote, u as unknownAndroidSystemImageRefusal } from "./device-capacity-Ca_ke1LE.mjs";
5
+ import { t as devClientScheme } from "./dev-client-ClATaJoH.mjs";
6
6
  import { existsSync, readFileSync, readdirSync } from "node:fs";
7
7
  import { relative } from "node:path";
8
8
  //#region src/commands/android/support.ts
@@ -297,12 +297,22 @@ async function pooledAndroidDevice({ root, selectPool, listDevices, isEmulatorDe
297
297
  owned: false
298
298
  } };
299
299
  }
300
- function androidBuildOptions({ release, physical, device, variant, deviceAbi, compiler, buildProfile, targetAbiOnly = true, hostedAbi = null }) {
300
+ function androidGradleProject(layout) {
301
+ return layout.custom ? `${layout.gradleRootRelative} ${layout.module}` : null;
302
+ }
303
+ function androidJobLayout(layout) {
304
+ return layout.custom ? {
305
+ gradleRoot: layout.gradleRootRelative,
306
+ module: layout.module
307
+ } : {};
308
+ }
309
+ function androidBuildOptions({ release, physical, device, variant, deviceAbi, compiler, buildProfile, targetAbiOnly = true, hostedAbi = null, gradleProject = null }) {
301
310
  let abi = targetAbiOnly ? hostedAbi : null;
302
311
  if (targetAbiOnly && !release && physical && device.serial) abi = deviceAbi(device.serial);
303
312
  if (targetAbiOnly && !release && !physical) abi = androidSystemImageAbi(device.systemImage);
304
313
  const runOptions = {};
305
314
  if (variant) runOptions.variant = variant;
315
+ if (gradleProject) runOptions.gradleProject = gradleProject;
306
316
  if (abi) runOptions.abi = abi;
307
317
  if (compiler) runOptions.compiler = compiler;
308
318
  if (buildProfile) runOptions.buildProfile = buildProfile;
@@ -313,4 +323,4 @@ function androidBuildOptions({ release, physical, device, variant, deviceAbi, co
313
323
  };
314
324
  }
315
325
  //#endregion
316
- export { resolveSystemImage as C, resolveDeviceProfile as S, systemImageRefusal as T, isReleaseVariant as _, PLATFORM as a, pooledAndroidDevice as b, androidSystemImageSetting as c, apkPackage as d, deviceProfileRefusal as f, foldableImageRefusal as g, findAapt as h, NO_FINGERPRINT as i, androidVariantSetting as l, dumpApkManifest as m, LAUNCH_FAILED as n, androidBuildOptions as o, displayPath as p, NO_DEVICE as r, androidDevClientScheme as s, INSTALL_FAILED as t, apkDevClientFacts as u, noDeviceDiagnostic as v, resolveVariant as w, remoteAvdFlagRefusal as x, parseXmltree as y };
326
+ export { remoteAvdFlagRefusal as C, systemImageRefusal as D, resolveVariant as E, pooledAndroidDevice as S, resolveSystemImage as T, findAapt as _, PLATFORM as a, noDeviceDiagnostic as b, androidGradleProject as c, androidVariantSetting as d, apkDevClientFacts as f, dumpApkManifest as g, displayPath as h, NO_FINGERPRINT as i, androidJobLayout as l, deviceProfileRefusal as m, LAUNCH_FAILED as n, androidBuildOptions as o, apkPackage as p, NO_DEVICE as r, androidDevClientScheme as s, INSTALL_FAILED as t, androidSystemImageSetting as u, foldableImageRefusal as v, resolveDeviceProfile as w, parseXmltree as x, isReleaseVariant as y };
@@ -1,15 +1,64 @@
1
- import { h as shortUdid, l as phaseLine } from "./command-output-CBtzyIgF.mjs";
2
- import { x as workspaceLogsDir } from "./workspace-state-C59dqG-Z.mjs";
3
- import { A as parseIosSimulatorApp } from "./ios-B3SbOWdw.mjs";
4
- import { d as unknownIosDeviceTypeRefusal, f as unknownIosRuntimeRefusal, o as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-EUOOYr8T.mjs";
5
- import { D as describeDiagnostic } from "./toolchain-Bnyd_K3A.mjs";
6
- import { l as parseDeviceWait } from "./device-lease-run-w1xhCqIW.mjs";
7
- import { t as IosDeviceMismatchError } from "./device-ios-6MewKKnc.mjs";
1
+ import { Q as settingShapeErrors, a as SETTING_SHAPE_REMEDY, b as iosProjectDirSettingError, nt as unknownSettingKeys, p as cacheProviderSettingError, y as iosProjectDirSetting } from "./settings-Bbztm4oV.mjs";
2
+ import { w as workspaceLogsDir } from "./workspace-state-CSIFuuDa.mjs";
3
+ import { h as shortUdid, l as phaseLine } from "./command-output-BjPN99ZB.mjs";
4
+ import { p as resolveOptimizations } from "./errors-DzkMYh8Q.mjs";
5
+ import { y as resolveBuildPlacement } from "./client-BLy1Pw2V.mjs";
6
+ import { j as parseIosSimulatorApp } from "./ios-CXLIUxXJ.mjs";
7
+ import { F as describeDiagnostic } from "./toolchain-DqyDXs30.mjs";
8
+ import { d as unknownIosDeviceTypeRefusal, f as unknownIosRuntimeRefusal, o as layerNote, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-Ca_ke1LE.mjs";
9
+ import { l as parseDeviceWait } from "./device-lease-run-CvDeHTkG.mjs";
10
+ import { t as IosDeviceMismatchError } from "./device-ios-CRUqPxKw.mjs";
8
11
  import { basename, join } from "node:path";
9
12
  import chalk from "chalk";
10
13
  function buildLogFile(root) {
11
14
  return join(workspaceLogsDir(root), `build-ios.ndjson`);
12
15
  }
16
+ function iosProjectPathError(settings, root, isExpo) {
17
+ const error = iosProjectDirSettingError(settings, root);
18
+ if (error || !iosProjectDirSetting(settings, root).custom || !isExpo()) return error;
19
+ return "ios.projectPath applies to bare React Native apps only: expo prebuild generates and builds ios/. Remove it for this Expo app.";
20
+ }
21
+ function resolveIosBuildSetup(remoteBuild, settings, warn) {
22
+ const [shapeError, ...lines] = settingShapeErrors(settings);
23
+ if (shapeError) return {
24
+ ok: false,
25
+ failure: {
26
+ code: "STIM_BAD_ARG",
27
+ message: shapeError,
28
+ lines,
29
+ remedy: SETTING_SHAPE_REMEDY
30
+ }
31
+ };
32
+ const placement = resolveBuildPlacement(remoteBuild);
33
+ if (placement.failure) return {
34
+ ok: false,
35
+ failure: {
36
+ ...placement.failure,
37
+ setup: true
38
+ }
39
+ };
40
+ let optimizations;
41
+ try {
42
+ optimizations = resolveOptimizations(settings);
43
+ } catch (error) {
44
+ return {
45
+ ok: false,
46
+ failure: {
47
+ code: "STIM_BAD_ARG",
48
+ message: error.message,
49
+ remedy: SETTING_SHAPE_REMEDY
50
+ }
51
+ };
52
+ }
53
+ for (const key of unknownSettingKeys(settings)) warn("setting", `Warning: setting "${key}" is not read by Stim and will be ignored.`);
54
+ const cacheProviderError = cacheProviderSettingError(settings);
55
+ if (cacheProviderError) warn("cache", `${cacheProviderError} Using the local cache.`);
56
+ return {
57
+ ok: true,
58
+ buildMachine: placement.selected,
59
+ optimizations
60
+ };
61
+ }
13
62
  const MAX_PRINTED_DIAGNOSTICS = 6;
14
63
  function deviceLabel(device, udid) {
15
64
  const name = device?.deviceName || device?.name || null;
@@ -32,6 +81,10 @@ function iosConfigurationSetting(settings) {
32
81
  function resolveConfiguration(flag, settings) {
33
82
  return (typeof flag === "string" && flag.trim() !== "" ? flag.trim() : null) || iosConfigurationSetting(settings);
34
83
  }
84
+ function resolveSchemeSelection({ scheme, easProfile }, settings) {
85
+ if (typeof scheme === "string" || easProfile !== void 0) return scheme ?? void 0;
86
+ return iosStringSetting(settings, "scheme") ?? void 0;
87
+ }
35
88
  function iosStringSetting(settings, key) {
36
89
  const ios = settings?.["ios"];
37
90
  if (!ios || typeof ios !== "object" || Array.isArray(ios)) return null;
@@ -223,4 +276,4 @@ function createIosDeviceWaitRun(stats, progress, signal) {
223
276
  };
224
277
  }
225
278
  //#endregion
226
- export { resolveSimulatorAppFlag as _, deviceModelRefusal as a, iosProviderRunOptions as c, podAction as d, printDiagnostics as f, resolveRuntime as g, resolveIosWait as h, deviceLabel as i, isReleaseConfiguration as l, resolveDeviceType as m, buildLogFile as n, deviceShortName as o, resolveConfiguration as p, createIosDeviceWaitRun as r, iosConfigurationSetting as s, appNameFromPath as t, ownedSimFailure as u, simulatorBuildArch as v, xcodeFailureReport as y };
279
+ export { xcodeFailureReport as S, resolveIosWait as _, deviceModelRefusal as a, resolveSimulatorAppFlag as b, iosProjectPathError as c, ownedSimFailure as d, podAction as f, resolveIosBuildSetup as g, resolveDeviceType as h, deviceLabel as i, iosProviderRunOptions as l, resolveConfiguration as m, buildLogFile as n, deviceShortName as o, printDiagnostics as p, createIosDeviceWaitRun as r, iosConfigurationSetting as s, appNameFromPath as t, isReleaseConfiguration as u, resolveRuntime as v, simulatorBuildArch as x, resolveSchemeSelection as y };
@@ -0,0 +1,119 @@
1
+ import { t as getExecutor } from "./exec-B81Qodjn.mjs";
2
+ import { Et as repoRoot } from "./settings-Bbztm4oV.mjs";
3
+ import { a as spawnDeclared } from "./spawn-claims-Kqiifsk2.mjs";
4
+ import { s as macosToolchain } from "./toolchain-DqyDXs30.mjs";
5
+ import { i as validateInfoPlist, n as setBundleName, r as stageBundle, t as resolveBundleExtras } from "./stage-BNKKdDNc.mjs";
6
+ import { t as logLines } from "./run-qvff78hv.mjs";
7
+ import { existsSync, realpathSync } from "node:fs";
8
+ import { join, relative, resolve } from "node:path";
9
+ //#region src/integrations/swiftpm-macos.ts
10
+ function swiftpmMacosProject(root) {
11
+ return { prepare(settings) {
12
+ const macos = settings.macos;
13
+ if (!macos?.product || !macos.infoPlist) throw Object.assign(/* @__PURE__ */ new Error("Set macos.product and macos.infoPlist explicitly in .stim.json. See stim guide macos."), { code: "STIM_BAD_ARG" });
14
+ const { product, infoPlist } = macos;
15
+ const { bundleId } = validateInfoPlist(root, product, infoPlist);
16
+ const repository = realpathSync(repoRoot(root) ?? root);
17
+ const extras = resolveBundleExtras(root, repository, macos.resources, macos.assetCatalog);
18
+ return {
19
+ product,
20
+ arguments: macos.arguments ?? [],
21
+ bundleId,
22
+ async compile({ scratch, writer, note }) {
23
+ await tool(root, [
24
+ "build",
25
+ "-c",
26
+ "debug",
27
+ "--product",
28
+ product,
29
+ "--scratch-path",
30
+ scratch,
31
+ "--jobs",
32
+ "2"
33
+ ], writer, note);
34
+ return tool(root, [
35
+ "build",
36
+ "-c",
37
+ "debug",
38
+ "--scratch-path",
39
+ scratch,
40
+ "--show-bin-path"
41
+ ], writer, () => {}, true);
42
+ },
43
+ stage: (bin, bundle, id, displayName) => stageBundle(root, product, infoPlist, bin, bundle, id, extras, displayName),
44
+ validateFetched(bundle, id, displayName) {
45
+ const executable = join(bundle, "Contents", "MacOS", product);
46
+ const plist = JSON.parse(getExecutor().runFile("plutil", [
47
+ "-convert",
48
+ "json",
49
+ "-o",
50
+ "-",
51
+ join(bundle, "Contents", "Info.plist")
52
+ ]));
53
+ if (plist.CFBundleIdentifier !== id || plist.CFBundleExecutable !== product || !existsSync(executable)) throw new Error("The fetched macOS bundle does not match the requested identity and executable.");
54
+ for (const destination of [...Object.keys(extras.resources), ...extras.assetCatalog ? ["Assets.car"] : []]) if (!existsSync(join(bundle, "Contents", "Resources", destination))) throw new Error(`The fetched macOS bundle lacks declared resource ${destination}.`);
55
+ if (displayName !== void 0) {
56
+ setBundleName(join(bundle, "Contents", "Info.plist"), displayName);
57
+ getExecutor().runFile("codesign", [
58
+ "--force",
59
+ "--sign",
60
+ "-",
61
+ bundle
62
+ ]);
63
+ }
64
+ getExecutor().runFile("codesign", [
65
+ "--verify",
66
+ "--strict",
67
+ bundle
68
+ ]);
69
+ },
70
+ offload: {
71
+ target: () => ({
72
+ platform: "macos",
73
+ local: macosToolchain()
74
+ }),
75
+ request: (id) => ({
76
+ platform: "macos",
77
+ product,
78
+ infoPlist: relative(root, resolve(root, infoPlist)),
79
+ bundleId: id,
80
+ resources: Object.fromEntries(Object.entries(extras.resources).map(([destination, source]) => [destination, relative(repository, source)])),
81
+ assetCatalog: extras.assetCatalog ? relative(repository, extras.assetCatalog) : null
82
+ })
83
+ }
84
+ };
85
+ } };
86
+ }
87
+ async function tool(root, args, writer, note, capture = false) {
88
+ const child = spawnDeclared(() => getExecutor().spawn("swift", args, {
89
+ cwd: root,
90
+ detached: true,
91
+ stdio: [
92
+ "ignore",
93
+ "pipe",
94
+ "pipe"
95
+ ]
96
+ }));
97
+ let stdout = "";
98
+ child.stdout?.on("data", (chunk) => {
99
+ if (capture) stdout += chunk.toString("utf8");
100
+ });
101
+ const write = (msg) => {
102
+ writer.write({
103
+ src: "build",
104
+ platform: "macos",
105
+ level: "debug",
106
+ msg
107
+ });
108
+ note(msg);
109
+ };
110
+ if (child.stdout) logLines(child.stdout, write);
111
+ if (child.stderr) logLines(child.stderr, write);
112
+ await new Promise((done, reject) => {
113
+ child.once("error", reject);
114
+ child.once("close", (code) => code === 0 ? done() : reject(/* @__PURE__ */ new Error(`swift ${args[0]} failed (${code}). See stim logs --source build.`)));
115
+ });
116
+ return stdout.trim();
117
+ }
118
+ //#endregion
119
+ export { swiftpmMacosProject };
@@ -1,7 +1,10 @@
1
- import { a as formatElapsed } from "./command-output-CBtzyIgF.mjs";
2
- import { a as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey, v as workspaceDir } from "./workspace-state-C59dqG-Z.mjs";
1
+ import { t as getExecutor } from "./exec-B81Qodjn.mjs";
2
+ import { a as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, x as workspaceDir } from "./workspace-state-CSIFuuDa.mjs";
3
+ import { a as formatElapsed } from "./command-output-BjPN99ZB.mjs";
3
4
  import { i as signalDeclaredSpawns, r as refuseDeclaredSpawns, t as allowDeclaredSpawns } from "./spawn-claims-Kqiifsk2.mjs";
4
- import { a as withWorkspaceProcessLock } from "./named-ports-BFIz1Shz.mjs";
5
+ import { a as withWorkspaceProcessLock } from "./named-ports-C2lvoPsb.mjs";
6
+ import { endpoint, findPeer as findPeer$1, isJsonObject, parseMachine, parseMachine as parseMachine$1, pinnedEndpoint } from "@stim-cli/core/state";
7
+ import { WebSocket } from "ws";
5
8
  //#region src/engine/native-run.ts
6
9
  const NATIVE_RUN_LOCK = "native-run";
7
10
  const NATIVE_RUN_WAIT_MS = 18e5;
@@ -21,6 +24,7 @@ function describeNativeRunHolder(holder, now) {
21
24
  const facts = [`pid ${holder.owner.pid}`];
22
25
  if (Number.isFinite(started)) facts.push(`running for ${formatElapsed(now - started)}`);
23
26
  if (command === null) return `another Stim run (${facts.join(", ")})`;
27
+ if (command === "build") return `an artifact build (${facts.join(", ")})`;
24
28
  return `\`stim ${command}${slot === "default" ? "" : ` --slot ${slot}`}\` (${facts.join(", ")})`;
25
29
  }
26
30
  /**
@@ -50,7 +54,7 @@ function nativeRunWaitNotice({ write, now = Date.now, describe = describeNativeR
50
54
  * the stop proceeds without the lock. Only an owner whose identity is proven live is signalled.
51
55
  */
52
56
  function decideStopAction({ stopSlot, holder, ownerIdentity, deviceSlots }) {
53
- if (holder.command === "macos") {
57
+ if (holder.command === "macos" || holder.command === "build") {
54
58
  if (stopSlot !== void 0) return { action: "proceed" };
55
59
  return ownerIdentity === "same" ? { action: "interrupt" } : { action: "refuse" };
56
60
  }
@@ -69,7 +73,7 @@ function requestNativeRunCancel(root, claimId, pid = process.pid) {
69
73
  }));
70
74
  }
71
75
  function cancelRequestFor(root, claimId) {
72
- const request = readWorkspaceState(root)?.[CANCEL_REQUEST_KEY];
76
+ const request = readWorkspaceState$1(root)?.[CANCEL_REQUEST_KEY];
73
77
  if (request?.claimId !== claimId || typeof request.pid !== "number") return null;
74
78
  return { pid: request.pid };
75
79
  }
@@ -155,4 +159,107 @@ function withNativeBuildRun(root, details, fn, { write, exit = (code) => process
155
159
  });
156
160
  }
157
161
  //#endregion
158
- export { decideStopAction as a, nativeRunWaitNotice as c, runCancellationSignal as d, withNativeBuildRun as f, clearNativeRunCancel as i, requestNativeRunCancel as l, NATIVE_RUN_WAIT_MS as n, describeNativeRunHolder as o, cancelledFailure as r, nativeRunHolder as s, NATIVE_RUN_LOCK as t, runCancellation as u };
162
+ //#region src/offload/tailnet.ts
163
+ const MAC_APP_TAILSCALE = "/Applications/Tailscale.app/Contents/MacOS/Tailscale";
164
+ const HELLO_TIMEOUT_MS = 1e4;
165
+ function isLapsed(credential) {
166
+ return credential.state === "pending" && !!credential.expiresAt && Date.parse(credential.expiresAt) <= Date.now();
167
+ }
168
+ function markApproved(credential) {
169
+ const { expiresAt: _expiresAt, ...rest } = credential;
170
+ return {
171
+ ...rest,
172
+ state: "approved"
173
+ };
174
+ }
175
+ function pendingReport(credential) {
176
+ return {
177
+ state: "pending",
178
+ ...credential.expiresAt ? { expiresAt: credential.expiresAt } : {}
179
+ };
180
+ }
181
+ function lapsedLine(machine, credential) {
182
+ return `${machine} did not approve this Mac before the request lapsed at ${credential.expiresAt}.`;
183
+ }
184
+ function requestedLine(credential) {
185
+ return `Requested at ${credential.requestedAt}${credential.expiresAt ? `; the request lapses at ${credential.expiresAt}` : ""}.`;
186
+ }
187
+ function parseTailscaleStatus(output) {
188
+ try {
189
+ const status = JSON.parse(output);
190
+ return isJsonObject(status) && status.BackendState === "Running" ? status : null;
191
+ } catch {
192
+ return null;
193
+ }
194
+ }
195
+ function tailscaleStatus() {
196
+ for (const binary of ["tailscale", MAC_APP_TAILSCALE]) {
197
+ const output = getExecutor().runFileQuiet(binary, ["status", "--json"], { timeoutMs: 5e3 });
198
+ if (output !== null) return parseTailscaleStatus(output);
199
+ }
200
+ return null;
201
+ }
202
+ async function tailscaleStatusAsync() {
203
+ for (const binary of ["tailscale", MAC_APP_TAILSCALE]) {
204
+ let output;
205
+ try {
206
+ output = await getExecutor().runFileAsync(binary, ["status", "--json"], { timeoutMs: 5e3 });
207
+ } catch {
208
+ continue;
209
+ }
210
+ return parseTailscaleStatus(output);
211
+ }
212
+ return null;
213
+ }
214
+ function hello({ url, servername, host }, auth) {
215
+ return new Promise((resolve) => {
216
+ const socket = new WebSocket(url, {
217
+ handshakeTimeout: HELLO_TIMEOUT_MS,
218
+ servername,
219
+ headers: { Host: host }
220
+ });
221
+ const done = (reply) => {
222
+ clearTimeout(timer);
223
+ socket.removeAllListeners();
224
+ socket.on("error", () => {});
225
+ socket.close();
226
+ resolve(reply);
227
+ };
228
+ const timer = setTimeout(() => done({ failed: "no reply in time" }), HELLO_TIMEOUT_MS);
229
+ socket.on("open", () => {
230
+ socket.send(JSON.stringify({
231
+ id: 1,
232
+ method: "hello",
233
+ params: {
234
+ protocol: 1,
235
+ client: {
236
+ name: "stim",
237
+ version: "1"
238
+ },
239
+ auth
240
+ }
241
+ }));
242
+ });
243
+ socket.on("message", (data) => {
244
+ let message;
245
+ try {
246
+ message = JSON.parse(String(data));
247
+ } catch {
248
+ message = null;
249
+ }
250
+ if (isJsonObject(message) && ("result" in message || "error" in message)) return done(message);
251
+ done({ failed: "the reply was not a hello result" });
252
+ });
253
+ socket.on("error", (error) => done({ failed: error.message }));
254
+ socket.on("close", () => done({ failed: "the connection closed before a reply" }));
255
+ });
256
+ }
257
+ const realIo = {
258
+ status: tailscaleStatus,
259
+ hello
260
+ };
261
+ async function pinnedEndpoint$1(credential, status = tailscaleStatusAsync) {
262
+ return pinnedEndpoint(credential, parseMachine(credential.machine) ? await status() : null);
263
+ }
264
+ //#endregion
265
+ export { withNativeBuildRun as S, nativeRunHolder as _, markApproved as a, runCancellation as b, pinnedEndpoint$1 as c, NATIVE_RUN_LOCK as d, NATIVE_RUN_WAIT_MS as f, describeNativeRunHolder as g, decideStopAction as h, lapsedLine as i, realIo as l, clearNativeRunCancel as m, findPeer$1 as n, parseMachine$1 as o, cancelledFailure as p, isLapsed as r, pendingReport as s, endpoint as t, requestedLine as u, nativeRunWaitNotice as v, runCancellationSignal as x, requestNativeRunCancel as y };
@@ -0,0 +1,2 @@
1
+ import { s as macosToolchain } from "./toolchain-DqyDXs30.mjs";
2
+ export { macosToolchain };