stim 1.32.0 → 1.33.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 (169) hide show
  1. package/dist/{acquire-artifact-CI9fIokp.mjs → acquire-artifact-DTh_LxrE.mjs} +2 -2
  2. package/dist/{act-BfChMxcU.mjs → act-Cur4YKtK.mjs} +22 -22
  3. package/dist/{activity-yjH7Q3zn.mjs → activity-C8kBq9w0.mjs} +6 -6
  4. package/dist/{agent-device-usage-output-DO412bsG.mjs → agent-device-usage-output-BTRaK_up.mjs} +5 -5
  5. package/dist/{android-BeeC15Ve.mjs → android-B2DSKg-A.mjs} +2 -2
  6. package/dist/{android-BNm5A40S.mjs → android-BL-QqHjc.mjs} +87 -53
  7. package/dist/{android-D56S_GX3.mjs → android-D5mCdVl2.mjs} +5 -5
  8. package/dist/{android-DsEj2CCs.mjs → android-Iq0M2t2d.mjs} +27 -15
  9. package/dist/{android-cas-CbumHXIq.mjs → android-cas-Dhcjkys1.mjs} +4 -4
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/android-image-DFk26aY6.mjs +254 -0
  12. package/dist/{android-project-CCEQyYJK.d.mts → android-project-BDlPnfmL.d.mts} +1 -1
  13. package/dist/api.d.mts +2 -1
  14. package/dist/api.mjs +28 -28
  15. package/dist/{apk-signed-tail-B9Usseps.mjs → apk-signed-tail-CPpA-3vu.mjs} +2 -2
  16. package/dist/{artifact-C8Nvp07y.mjs → artifact-BMjubIP2.mjs} +13 -13
  17. package/dist/{artifact-k1x9Jrn0.mjs → artifact-BufzdGbT.mjs} +34 -21
  18. package/dist/{artifact-platform-BO2Uvk_A.mjs → artifact-platform-DqCWUieN.mjs} +1 -1
  19. package/dist/{auto-placement--nfdQ9rp.mjs → auto-placement-D7P98glJ.mjs} +11 -9
  20. package/dist/{browser-web-6RDAeH0z.mjs → browser-web-C74et-Nv.mjs} +15 -15
  21. package/dist/{build-VXX_dtl5.mjs → build-DFBGWOTc.mjs} +23 -23
  22. package/dist/{build-cache-BsKim4V7.mjs → build-cache-Cqj4FGnX.mjs} +20 -8
  23. package/dist/{build-plan-BK34X2iY.mjs → build-plan-T3Hi24ax.mjs} +7 -7
  24. package/dist/{cache-manifest-CfiEny4T.mjs → cache-manifest-8JX9S1QJ.mjs} +1 -1
  25. package/dist/cache-manifest.mjs +1 -1
  26. package/dist/{ccache-BrwGIxmV.mjs → ccache-BXtzEL6M.mjs} +34 -24
  27. package/dist/{cdp-C3svvXiE.mjs → cdp-C216kOAn.mjs} +1 -1
  28. package/dist/{chrome-DyDWurWG.mjs → chrome-C8sC5tdl.mjs} +1 -1
  29. package/dist/{cli-Jc7obreB.mjs → cli-B2YSjc9s.mjs} +20 -20
  30. package/dist/cli.mjs +1 -1
  31. package/dist/{client-lDmA-5jx.mjs → client-0_Mnfz0a.mjs} +29 -9
  32. package/dist/collector-run.mjs +7 -7
  33. package/dist/{command-output-CfPW1bKP.mjs → command-output-DWI9tGPU.mjs} +1 -1
  34. package/dist/{config-D5qNWJEP.mjs → config-BW0fAtoK.mjs} +256 -246
  35. package/dist/{dependencies-DkZ8681S.mjs → dependencies-CgvBZbXD.mjs} +39 -39
  36. package/dist/{dependency-state-DZVln1P9.mjs → dependency-state-mL5g4H6K.mjs} +2 -2
  37. package/dist/{detached-entry-BPlSaCwC.mjs → detached-entry-tfrgGVWb.mjs} +1 -1
  38. package/dist/{dev-client-eDZy6RoX.mjs → dev-client-ChsHwgrn.mjs} +2 -2
  39. package/dist/{device-CeIikWac.mjs → device-B0htCt2u.mjs} +13 -13
  40. package/dist/{device-CTozKhU0.mjs → device-DOehZpyx.mjs} +11 -11
  41. package/dist/{device-android-zgD9We85.mjs → device-android-B8TQP5AX.mjs} +10 -10
  42. package/dist/{device-capacity-Bki6B-7h.mjs → device-capacity-BAkETfIl.mjs} +9 -9
  43. package/dist/device-host-worker.mjs +58 -17
  44. package/dist/{device-ios-TE5ejeXx.mjs → device-ios-DFaYFdar.mjs} +9 -9
  45. package/dist/{device-lease-run-DeNGjJZM.mjs → device-lease-run-DpiCnRbZ.mjs} +5 -5
  46. package/dist/{device-pool-mjyUYaau.mjs → device-pool-DP4sCeCC.mjs} +3 -3
  47. package/dist/{device-provision-j_B7G0e6.mjs → device-provision-CnNOIxCF.mjs} +10 -10
  48. package/dist/{doctor-sSLtn-j1.mjs → doctor-9GrW5YSP.mjs} +30 -17
  49. package/dist/{doctor-CNZuvTSe.mjs → doctor-C6Xn96RS.mjs} +1 -1
  50. package/dist/{doctor-fingerprint-o7ZI9YLn.mjs → doctor-fingerprint-DqWvIhMb.mjs} +1 -1
  51. package/dist/doctor-fingerprint.mjs +1 -1
  52. package/dist/{doctor-BlrcoQ7B.mjs → doctor-nRLBoajo.mjs} +54 -25
  53. package/dist/{doctor-watchman-CCuboyj1.mjs → doctor-watchman-CDhpC3Oh.mjs} +5 -5
  54. package/dist/{eas-build-CaG-Sfs9.mjs → eas-build-CpJ4h9tG.mjs} +4 -4
  55. package/dist/{eas-fallback-BpX1lpco.mjs → eas-fallback-B3z5nL1g.mjs} +6 -6
  56. package/dist/{eas-session-ledger-B-nTfdfk.mjs → eas-session-ledger-Bspy-VJQ.mjs} +6 -6
  57. package/dist/{error-diagnostics-q56Im4D8.mjs → error-diagnostics-DoLGklYX.mjs} +10 -10
  58. package/dist/{exec-aULwtNly.mjs → exec-CGuDzt40.mjs} +103 -103
  59. package/dist/{gc-By2Kc-Ek.mjs → gc-BWoOp9q7.mjs} +2 -2
  60. package/dist/{gc-Dv6nb9nf.mjs → gc-DolXpMSB.mjs} +25 -54
  61. package/dist/{guide-CwpsGWTJ.mjs → guide-CmZB0GtP.mjs} +139 -44
  62. package/dist/{hosted-android-c5nPJA6S.mjs → hosted-android-ByG-ICuh.mjs} +4 -4
  63. package/dist/{hosted-client-Hs-fD4L3.mjs → hosted-client-D19Lv0tg.mjs} +6 -5
  64. package/dist/{hosted-logs-BteXG8rm.mjs → hosted-logs-D7anR6Dk.mjs} +7 -7
  65. package/dist/{hosted-logs-sync-B8bjLEMs.mjs → hosted-logs-sync-D182b1eJ.mjs} +5 -5
  66. package/dist/{hosted-macos-B4byscei.mjs → hosted-macos-D0DDQxvl.mjs} +6 -6
  67. package/dist/{hosted-native-Bh9IJ_t5.mjs → hosted-native-BzXIy97W.mjs} +14 -10
  68. package/dist/{idle-shutdown-BaeCo4ps.mjs → idle-shutdown-6i8CHoNq.mjs} +6 -6
  69. package/dist/{ios-D1XKSITX.mjs → ios-AdhPKXO3.mjs} +8 -8
  70. package/dist/{ios-CdAV4-1E.mjs → ios-BdZdNsAj.mjs} +6 -6
  71. package/dist/{ios-CsRVik64.mjs → ios-Qam0bT9n.mjs} +1 -1
  72. package/dist/{ios-D3oK9-O4.mjs → ios-dbXzjTxx.mjs} +28 -28
  73. package/dist/{ios-device-CiBA-er9.mjs → ios-device-DLdEDWJj.mjs} +1 -1
  74. package/dist/{ios-device-D7Gi3e1I.mjs → ios-device-DXbHZfFe.mjs} +3 -3
  75. package/dist/{ios-project-DDQlX_jX.mjs → ios-project-BzfLigfh.mjs} +7 -7
  76. package/dist/{ios-signing-BJzvDPfU.mjs → ios-signing-D-tSX1iF.mjs} +2 -2
  77. package/dist/{ios-state-BEIJRJ7P.mjs → ios-state-CWsBysyN.mjs} +1 -1
  78. package/dist/{js-swap-C8N5DXHl.mjs → js-swap-EDVOJmqx.mjs} +6 -6
  79. package/dist/{launch-DxpvL6il.mjs → launch-CKHpthsw.mjs} +20 -20
  80. package/dist/{lightened-Df6II_XI.mjs → lightened-Cv4ToJRX.mjs} +5 -5
  81. package/dist/{logs-zv3ge7c6.mjs → logs-DCQ3_tGS.mjs} +6 -6
  82. package/dist/{logs-CuWJWF88.mjs → logs-IagR9dWI.mjs} +7 -7
  83. package/dist/{macos-C6U-4Iip.mjs → macos-Ch7vuM-G.mjs} +22 -22
  84. package/dist/{macos-CbRZheLw.mjs → macos-pc0aVVbN.mjs} +1 -1
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +6 -6
  87. package/dist/{metro-mKHEMO-a.mjs → metro-B5PVz0Wv.mjs} +4 -4
  88. package/dist/{metro-request-DODHNXCN.mjs → metro-request-2LmFpC1z.mjs} +2 -2
  89. package/dist/{named-ports-B0hCk2v-.mjs → named-ports-CA0nB9Yw.mjs} +3 -3
  90. package/dist/{native-android-9dVFqvTT.mjs → native-android-B3CEDq4R.mjs} +29 -19
  91. package/dist/{native-gradle-artifact-inputs-BlY97pt8.mjs → native-gradle-artifact-inputs-BLnO2hHR.mjs} +5 -5
  92. package/dist/{native-runtime-DQfxW5Au.mjs → native-runtime-e1OU8gEN.mjs} +6 -6
  93. package/dist/{native-source-D1AzWiuP.mjs → native-source-ChAGj7R1.mjs} +1 -1
  94. package/dist/{native-xcode-inputs-tDuUvSU8.mjs → native-xcode-inputs-DL3ETb8s.mjs} +3 -3
  95. package/dist/{native-xcode-ios-CG-PD-7g.mjs → native-xcode-ios-D4e8k2Jy.mjs} +17 -17
  96. package/dist/offload-worker.d.mts +3 -1
  97. package/dist/offload-worker.mjs +37 -23
  98. package/dist/{operation-exec-Dp4FuIGR.mjs → operation-exec-DKlBcKAL.mjs} +1 -1
  99. package/dist/{ownership-CCfiBfOP.mjs → ownership-hC7xvvxF.mjs} +3 -3
  100. package/dist/{page-CQJlcj3x.mjs → page-Dj8IqvGM.mjs} +2 -2
  101. package/dist/{phone-reverses-CnNwdz9A.mjs → phone-reverses-rvyxW1Fl.mjs} +4 -4
  102. package/dist/{placement-log-CRL0IY-k.mjs → placement-log-nnGnu8mo.mjs} +1 -1
  103. package/dist/{plan-placement-2imvnlWP.mjs → plan-placement-D3JD-T-K.mjs} +6 -6
  104. package/dist/{ports-CKktj5lV.mjs → ports-CZJJfJ8Q.mjs} +3 -3
  105. package/dist/{prebuild-CyNrUWgV.mjs → prebuild-Bhs7TTcz.mjs} +12 -12
  106. package/dist/{project-Crtcbfl0.mjs → project-DWEXiBA9.mjs} +16 -16
  107. package/dist/{pull-request-BzLmzAIQ.mjs → pull-request-BpMTNkMB.mjs} +2 -2
  108. package/dist/pull-requests.mjs +1 -1
  109. package/dist/{react-native-android-Cabe2YER.mjs → react-native-android-C6Y270GS.mjs} +37 -33
  110. package/dist/{react-native-build-DhWBUV_H.mjs → react-native-build-DaPfzf_e.mjs} +10 -10
  111. package/dist/{react-native-doctor-D-twmBon.mjs → react-native-doctor-DGMPxkPS.mjs} +6 -6
  112. package/dist/{react-native-ios-u_ley41B.mjs → react-native-ios-dX48_92n.mjs} +21 -17
  113. package/dist/{recordings-BWnIlhZH.mjs → recordings-AKZfsW2W.mjs} +1 -1
  114. package/dist/{registration-BwCe64PH.mjs → registration-DKjJGQ6p.mjs} +1 -1
  115. package/dist/{reload-f9hvEHE9.mjs → reload-BGwblBJ9.mjs} +1 -1
  116. package/dist/{reload-D2TpUlns.mjs → reload-DsOByDfy.mjs} +17 -17
  117. package/dist/{remote-BsBAjlD2.mjs → remote-D0uJZ76R.mjs} +9 -9
  118. package/dist/{result-EOsWV6sp.mjs → result-DuimMZKJ.mjs} +24 -20
  119. package/dist/{run-2CHAJ9Oj.mjs → run-N-BbRxnC.mjs} +2 -2
  120. package/dist/{selection-C4ZQz_ER.mjs → selection-xS50Mt0V.mjs} +5 -4
  121. package/dist/{server-bare-CFyVFZXJ.mjs → server-bare-BTlICuaX.mjs} +2 -2
  122. package/dist/{server-command-BMyKtnjH.mjs → server-command-BC0EgMfY.mjs} +5 -5
  123. package/dist/{server-expo-BLxcN2x2.mjs → server-expo-15RjL0ir.mjs} +3 -3
  124. package/dist/server-expo-gYIypb0-.mjs +2 -0
  125. package/dist/{settings-C6UTYW2K.mjs → settings-B5IBDfTx.mjs} +4 -4
  126. package/dist/{settings-jeS0WmUF.mjs → settings-CuP55ieT.mjs} +2 -2
  127. package/dist/{settings-payload-CrX933Xi.mjs → settings-payload-BIGGQ3or.mjs} +5 -5
  128. package/dist/{settings-write-DMcT23Kl.mjs → settings-write-D85j8mej.mjs} +6 -6
  129. package/dist/settings.schema.json +38 -0
  130. package/dist/{simslim-93xmPh-d.mjs → simslim-DKdJx0LL.mjs} +2 -2
  131. package/dist/{slot-launch-CSpQcFZw.mjs → slot-launch-D4oREwhx.mjs} +6 -6
  132. package/dist/{stage-Cf9uSM1a.mjs → stage-DKC6tDXu.mjs} +2 -2
  133. package/dist/{start-CLN_r9EG.mjs → start-BsEV4S-s.mjs} +12 -12
  134. package/dist/{start-CquYgzVf.mjs → start-DfPSLc__.mjs} +1 -1
  135. package/dist/{state-CM_HvvkS.mjs → state-CtmYTRWm.mjs} +4 -4
  136. package/dist/{state-CiflgxTP.mjs → state-DSOUqO-o.mjs} +2 -2
  137. package/dist/{stats-BVEZuSlg.mjs → stats-ByEUblPr.mjs} +5 -5
  138. package/dist/{stats-report-B86Cv7Uc.mjs → stats-report-BVRCqwWA.mjs} +1 -1
  139. package/dist/{status-D0ruTmPl.mjs → status-C6hLlDqW.mjs} +37 -28
  140. package/dist/{status-GQ-JqvRi.mjs → status-DTFhDnd1.mjs} +1 -1
  141. package/dist/{status-Bhdy07v0.mjs → status-FP1MH9qn.mjs} +1 -1
  142. package/dist/{status-watch-DSu_hhg6.mjs → status-watch-D8s823CZ.mjs} +5 -5
  143. package/dist/status-worker.mjs +1 -1
  144. package/dist/{stim-desktop-1XxET4S8.mjs → stim-desktop-_WTria-r.mjs} +2 -2
  145. package/dist/{stop-RZqER_Ww.mjs → stop-5LKfVv-0.mjs} +2 -2
  146. package/dist/{stop-W4DK8qZq.mjs → stop-BVI2-L7s.mjs} +16 -16
  147. package/dist/{stop-B616ZyTv.mjs → stop-CpTy6bod.mjs} +5 -5
  148. package/dist/supervisor-run.mjs +16 -16
  149. package/dist/{support-S_5nkkzs.mjs → support-CqyWfZZI.mjs} +18 -8
  150. package/dist/{support-NxnD8QXd.mjs → support-D8OH0z98.mjs} +9 -9
  151. package/dist/{swiftpm-artifact-inputs-yp8D5LE4.mjs → swiftpm-artifact-inputs-uq5oV7xR.mjs} +4 -4
  152. package/dist/{swiftpm-macos-Gtq9bNQb.mjs → swiftpm-macos-BuhqYB3n.mjs} +11 -11
  153. package/dist/{toolchain-B2bN8jEo.mjs → toolchain-D_jotUG7.mjs} +1 -1
  154. package/dist/{toolchain-Bnm8vUCV.mjs → toolchain-s5ZmG42Z.mjs} +25 -14
  155. package/dist/{trigger-CfnOfpDd.mjs → trigger-BtB4kbe0.mjs} +2 -2
  156. package/dist/trigger-D8B7QR0q.mjs +2 -0
  157. package/dist/{warm-progress-_aTMvkIH.mjs → warm-progress-q11Vdvhh.mjs} +6 -6
  158. package/dist/{web-BdWG8b5_.mjs → web-DwYCTFdh.mjs} +9 -9
  159. package/dist/web-cCfM8kwV.mjs +2 -0
  160. package/dist/web-run.mjs +8 -8
  161. package/dist/windows-report.mjs +1 -1
  162. package/dist/{workspace-state-3bF4TB8P.mjs → workspace-state-BdZ-QgmB.mjs} +3 -3
  163. package/dist/{workspaces-C59v9bpD.mjs → workspaces-B3ahAHZc.mjs} +14 -14
  164. package/dist/{worktree-CinoSsGy.mjs → worktree-BhsML6GV.mjs} +77 -31
  165. package/dist/{worktree-K9F50fD_.mjs → worktree-CrjsPIs2.mjs} +1 -1
  166. package/package.json +7 -7
  167. package/dist/server-expo-DwR3eD-a.mjs +0 -2
  168. package/dist/trigger-DBZ-GBrl.mjs +0 -2
  169. package/dist/web-DwuluWJt.mjs +0 -2
@@ -1,15 +1,266 @@
1
- import { C as reportSignal, D as ownership_claim_exports, S as process_identity_exports, T as trackReportResource, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
1
+ import { D as ownership_claim_exports, T as process_identity_exports, a as trackReportResource, f as WorkspaceProcessCleanupError, r as reportSignal, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
+ import { t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
3
3
  import { join } from "node:path";
4
4
  import { ambientEnv, configDir, ensurePrivateDir } from "@stim-cli/core";
5
5
  import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
6
6
  import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
7
+ import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
8
+ import { InvalidArgumentError } from "commander";
7
9
  import { request } from "node:http";
8
10
  import { request as request$1 } from "node:https";
9
11
  import { WebSocket } from "ws";
10
12
  import { HandshakeRefusal, MAX_SERVER_MESSAGE_BYTES, TRANSPORT_OVERHEAD_BYTES, decodeSecret, initiateNoise, keyFingerprint, newSecret } from "@stim-cli/core/noise-session";
11
- import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
12
- import { InvalidArgumentError } from "commander";
13
+ //#region src/devices/device-slots.ts
14
+ const DEFAULT_DEVICE_SLOT = "default";
15
+ const DEVICE_SLOT_RULE = "A device slot must be 1-64 letters, digits, underscores or hyphens, starting with a letter or digit.";
16
+ function isDeviceSlot(slot) {
17
+ return /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(slot) && ![
18
+ "constructor",
19
+ "prototype",
20
+ "__proto__"
21
+ ].includes(slot);
22
+ }
23
+ function validateDeviceSlot(slot = "default") {
24
+ if (!isDeviceSlot(slot)) {
25
+ const error = /* @__PURE__ */ new Error(DEVICE_SLOT_RULE);
26
+ Object.assign(error, { code: "STIM_BAD_ARG" });
27
+ throw error;
28
+ }
29
+ return slot;
30
+ }
31
+ function parseDeviceSlotOption(slot) {
32
+ if (!isDeviceSlot(slot)) throw new InvalidArgumentError(DEVICE_SLOT_RULE);
33
+ if (slot === "web") throw new InvalidArgumentError(`web names this workspace's owned Chrome (stim stop --slot web); choose another device slot name.`);
34
+ return slot;
35
+ }
36
+ function deviceSlotPlatforms(project, slot = DEFAULT_DEVICE_SLOT) {
37
+ validateDeviceSlot(slot);
38
+ if (slot === DEFAULT_DEVICE_SLOT) return project?.platforms;
39
+ return project?.deviceSlots && Object.hasOwn(project.deviceSlots, slot) ? project.deviceSlots[slot] : void 0;
40
+ }
41
+ function projectDeviceSlots(project) {
42
+ const slots = [{
43
+ slot: DEFAULT_DEVICE_SLOT,
44
+ platforms: project?.platforms ?? {}
45
+ }];
46
+ for (const [slot, platforms] of Object.entries(project?.deviceSlots ?? {})) {
47
+ validateDeviceSlot(slot);
48
+ if (slot === DEFAULT_DEVICE_SLOT) throw new Error("The default device slot must use the existing platforms record.");
49
+ if (!platforms || typeof platforms !== "object" || Array.isArray(platforms)) throw new Error(`Invalid device slot record: ${slot}`);
50
+ slots.push({
51
+ slot,
52
+ platforms
53
+ });
54
+ }
55
+ return slots;
56
+ }
57
+ function assignSlotDevice(project, platform, device, slot = DEFAULT_DEVICE_SLOT) {
58
+ validateDeviceSlot(slot);
59
+ if (platform !== "ios" && platform !== "android") throw new Error(`Unknown device platform: ${platform}`);
60
+ if (slot === DEFAULT_DEVICE_SLOT) project.platforms = {
61
+ ...project.platforms,
62
+ [platform]: device
63
+ };
64
+ else project.deviceSlots = {
65
+ ...project.deviceSlots,
66
+ [slot]: {
67
+ ...deviceSlotPlatforms(project, slot),
68
+ [platform]: device
69
+ }
70
+ };
71
+ }
72
+ function removeSlotDevice(project, platform, slot = DEFAULT_DEVICE_SLOT) {
73
+ const platforms = deviceSlotPlatforms(project, slot);
74
+ if (!platforms) return;
75
+ delete platforms[platform];
76
+ if (slot !== DEFAULT_DEVICE_SLOT && Object.keys(platforms).length === 0) {
77
+ delete project.deviceSlots[slot];
78
+ if (Object.keys(project.deviceSlots).length === 0) delete project.deviceSlots;
79
+ }
80
+ }
81
+ function deviceSlotKey(platform, slot = "default") {
82
+ validateDeviceSlot(slot);
83
+ if (platform !== "ios" && platform !== "android") throw new Error(`Unknown device platform: ${platform}`);
84
+ return slot === "default" ? platform : `${platform}:${slot}`;
85
+ }
86
+ /**
87
+ * The slot key in a form that is legal as a file name. NTFS reads a colon in a file name as an
88
+ * alternate data stream: the write and the read of the exact path both succeed while `readdirSync`
89
+ * cannot see the file, so every non-default slot's logs would be invisible to `stim logs`. A slot
90
+ * name can contain neither a colon nor a dot, so the two forms stay one-to-one.
91
+ */
92
+ function deviceSlotFileKey(platform, slot = "default") {
93
+ return deviceSlotKey(platform, slot).replace(":", ".");
94
+ }
95
+ function parseDeviceSlotKey(key) {
96
+ const [platform, slot = "default", extra] = key.split(":");
97
+ if (platform !== "ios" && platform !== "android" || extra !== void 0) return null;
98
+ try {
99
+ validateDeviceSlot(slot);
100
+ } catch {
101
+ return null;
102
+ }
103
+ if (key !== deviceSlotKey(platform, slot)) return null;
104
+ return {
105
+ platform,
106
+ slot
107
+ };
108
+ }
109
+ //#endregion
110
+ //#region src/fs-util.ts
111
+ const WINDOWS = process.platform === "win32";
112
+ const DRIVE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
113
+ function volumeRootFor(path) {
114
+ const normalized = normalize(String(path));
115
+ if (WINDOWS) return parse(normalized).root.replace(/^[a-z]:/, (drive) => drive.toUpperCase());
116
+ const m = normalized.match(/^\/volumes\/([^/]+)/i);
117
+ return m ? `/Volumes/${m[1]}` : "/";
118
+ }
119
+ function resolveWorkspaceRealish(workspacePath) {
120
+ const raw = String(workspacePath);
121
+ if (!isAbsolute$1(raw)) return null;
122
+ let current = raw;
123
+ const MAX_HOPS = 40;
124
+ for (let hops = 0; hops < MAX_HOPS; hops++) {
125
+ const normalized = normalize(current);
126
+ const root = parse(normalized).root;
127
+ const segments = normalized.slice(root.length).split(sep$1).filter(Boolean);
128
+ let prefix = root.endsWith(sep$1) ? root.slice(0, -sep$1.length) : root;
129
+ let followedSymlink = false;
130
+ for (const segment of segments) {
131
+ prefix += `${sep$1}${segment}`;
132
+ let st;
133
+ try {
134
+ st = lstatSync(prefix);
135
+ } catch (err) {
136
+ if (err && err.code === "ENOENT") return normalized;
137
+ return null;
138
+ }
139
+ if (st.isSymbolicLink()) {
140
+ let target;
141
+ try {
142
+ target = readlinkSync(prefix);
143
+ } catch {
144
+ return null;
145
+ }
146
+ current = `${isAbsolute$1(target) ? target : normalize(join$1(dirname$1(prefix), target))}${normalized.slice(prefix.length)}`;
147
+ followedSymlink = true;
148
+ break;
149
+ }
150
+ }
151
+ if (!followedSymlink) return normalized;
152
+ }
153
+ return null;
154
+ }
155
+ function isRealMount(entryDev, rootDev) {
156
+ return entryDev != null && rootDev != null && entryDev !== rootDev;
157
+ }
158
+ function listWindowsVolumeRoots(statFn) {
159
+ const roots = [];
160
+ for (const letter of DRIVE_LETTERS) {
161
+ const root = `${letter}:${sep$1}`;
162
+ try {
163
+ statFn(root);
164
+ } catch {
165
+ continue;
166
+ }
167
+ roots.push(root);
168
+ }
169
+ return roots;
170
+ }
171
+ function listMountedVolumes({ statFn = statSync } = {}) {
172
+ if (WINDOWS) return listWindowsVolumeRoots(statFn);
173
+ const roots = ["/"];
174
+ let rootDev;
175
+ try {
176
+ rootDev = statFn("/").dev;
177
+ } catch {
178
+ return roots;
179
+ }
180
+ try {
181
+ for (const name of readdirSync("/Volumes")) {
182
+ const path = join$1("/Volumes", name);
183
+ let entryDev;
184
+ try {
185
+ entryDev = statFn(path).dev;
186
+ } catch {
187
+ continue;
188
+ }
189
+ if (isRealMount(entryDev, rootDev)) roots.push(path);
190
+ }
191
+ } catch {}
192
+ return roots;
193
+ }
194
+ function resolveVolumeRoot(path) {
195
+ const realish = resolveWorkspaceRealish(path);
196
+ return realish === null ? null : volumeRootFor(realish);
197
+ }
198
+ function uncShareIsReachable(volume, statFn) {
199
+ if (!WINDOWS || !volume.startsWith(`${sep$1}${sep$1}`)) return false;
200
+ try {
201
+ return statFn(volume).isDirectory();
202
+ } catch {
203
+ return false;
204
+ }
205
+ }
206
+ /** Whether `stat` proves `path` absent: ENOENT or ENOTDIR. Any other failure, such as EACCES, proves nothing. */
207
+ function isAbsentPath(path) {
208
+ try {
209
+ statSync(path);
210
+ return false;
211
+ } catch (error) {
212
+ const code = typeof error === "object" && error !== null && "code" in error ? error.code : null;
213
+ return code === "ENOENT" || code === "ENOTDIR";
214
+ }
215
+ }
216
+ function isOnMountedVolume(path, mountedVolumes, { statFn = statSync } = {}) {
217
+ const mounted = new Set(mountedVolumes || listMountedVolumes());
218
+ const volume = resolveVolumeRoot(path);
219
+ if (volume === null) return false;
220
+ return mounted.has(volume) || uncShareIsReachable(volume, statFn);
221
+ }
222
+ function directorySize(dir, { timeoutMs }) {
223
+ return measuredDirectorySize(dir, { timeoutMs }) ?? 0;
224
+ }
225
+ async function directorySizeAsync(dir, options) {
226
+ return await measuredDirectorySizeAsync(dir, options) ?? 0;
227
+ }
228
+ async function measuredDirectorySizeAsync(dir, { timeoutMs, signal, operation }) {
229
+ let out;
230
+ try {
231
+ out = await runOperationFile(operation, getExecutor(), "du", ["-sk", dir], {
232
+ timeoutMs,
233
+ killSignal: "SIGKILL",
234
+ signal,
235
+ cwd: operation?.cwd
236
+ });
237
+ } catch (error) {
238
+ if (error instanceof WorkspaceProcessCleanupError) throw error;
239
+ signal?.throwIfAborted();
240
+ operation?.signal.throwIfAborted();
241
+ return null;
242
+ }
243
+ if (!out) return 0;
244
+ const kb = parseInt(out.split(/\s+/)[0] ?? "", 10);
245
+ return isNaN(kb) ? 0 : kb * 1024;
246
+ }
247
+ function measuredDirectorySize(dir, { timeoutMs }) {
248
+ let out;
249
+ try {
250
+ out = getExecutor().runFile("du", ["-sk", dir], { timeoutMs });
251
+ } catch {
252
+ return null;
253
+ }
254
+ if (!out) return 0;
255
+ const kb = parseInt(out.split(/\s+/)[0] ?? "", 10);
256
+ return isNaN(kb) ? 0 : kb * 1024;
257
+ }
258
+ function formatBytes(bytes) {
259
+ if (bytes >= 1024 ** 3) return `${(bytes / 1024 ** 3).toFixed(1)}G`;
260
+ if (bytes >= 1024 ** 2) return `${Math.round(bytes / 1024 ** 2)}M`;
261
+ return `${Math.round(bytes / 1024)}K`;
262
+ }
263
+ //#endregion
13
264
  //#region src/offload/access-ticket.ts
14
265
  /** The setup ticket in `STIM_ACCESS_TICKET`, which Stim Desktop's Add Machine flow sets, or undefined. */
15
266
  function readAccessTicket() {
@@ -827,247 +1078,6 @@ async function reachMachine(input) {
827
1078
  return firstContact(credential);
828
1079
  }
829
1080
  //#endregion
830
- //#region src/devices/device-slots.ts
831
- const DEFAULT_DEVICE_SLOT = "default";
832
- const DEVICE_SLOT_RULE = "A device slot must be 1-64 letters, digits, underscores or hyphens, starting with a letter or digit.";
833
- function isDeviceSlot(slot) {
834
- return /^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/.test(slot) && ![
835
- "constructor",
836
- "prototype",
837
- "__proto__"
838
- ].includes(slot);
839
- }
840
- function validateDeviceSlot(slot = "default") {
841
- if (!isDeviceSlot(slot)) {
842
- const error = /* @__PURE__ */ new Error(DEVICE_SLOT_RULE);
843
- Object.assign(error, { code: "STIM_BAD_ARG" });
844
- throw error;
845
- }
846
- return slot;
847
- }
848
- function parseDeviceSlotOption(slot) {
849
- if (!isDeviceSlot(slot)) throw new InvalidArgumentError(DEVICE_SLOT_RULE);
850
- if (slot === "web") throw new InvalidArgumentError(`web names this workspace's owned Chrome (stim stop --slot web); choose another device slot name.`);
851
- return slot;
852
- }
853
- function deviceSlotPlatforms(project, slot = DEFAULT_DEVICE_SLOT) {
854
- validateDeviceSlot(slot);
855
- if (slot === DEFAULT_DEVICE_SLOT) return project?.platforms;
856
- return project?.deviceSlots && Object.hasOwn(project.deviceSlots, slot) ? project.deviceSlots[slot] : void 0;
857
- }
858
- function projectDeviceSlots(project) {
859
- const slots = [{
860
- slot: DEFAULT_DEVICE_SLOT,
861
- platforms: project?.platforms ?? {}
862
- }];
863
- for (const [slot, platforms] of Object.entries(project?.deviceSlots ?? {})) {
864
- validateDeviceSlot(slot);
865
- if (slot === DEFAULT_DEVICE_SLOT) throw new Error("The default device slot must use the existing platforms record.");
866
- if (!platforms || typeof platforms !== "object" || Array.isArray(platforms)) throw new Error(`Invalid device slot record: ${slot}`);
867
- slots.push({
868
- slot,
869
- platforms
870
- });
871
- }
872
- return slots;
873
- }
874
- function assignSlotDevice(project, platform, device, slot = DEFAULT_DEVICE_SLOT) {
875
- validateDeviceSlot(slot);
876
- if (platform !== "ios" && platform !== "android") throw new Error(`Unknown device platform: ${platform}`);
877
- if (slot === DEFAULT_DEVICE_SLOT) project.platforms = {
878
- ...project.platforms,
879
- [platform]: device
880
- };
881
- else project.deviceSlots = {
882
- ...project.deviceSlots,
883
- [slot]: {
884
- ...deviceSlotPlatforms(project, slot),
885
- [platform]: device
886
- }
887
- };
888
- }
889
- function removeSlotDevice(project, platform, slot = DEFAULT_DEVICE_SLOT) {
890
- const platforms = deviceSlotPlatforms(project, slot);
891
- if (!platforms) return;
892
- delete platforms[platform];
893
- if (slot !== DEFAULT_DEVICE_SLOT && Object.keys(platforms).length === 0) {
894
- delete project.deviceSlots[slot];
895
- if (Object.keys(project.deviceSlots).length === 0) delete project.deviceSlots;
896
- }
897
- }
898
- function deviceSlotKey(platform, slot = "default") {
899
- validateDeviceSlot(slot);
900
- if (platform !== "ios" && platform !== "android") throw new Error(`Unknown device platform: ${platform}`);
901
- return slot === "default" ? platform : `${platform}:${slot}`;
902
- }
903
- /**
904
- * The slot key in a form that is legal as a file name. NTFS reads a colon in a file name as an
905
- * alternate data stream: the write and the read of the exact path both succeed while `readdirSync`
906
- * cannot see the file, so every non-default slot's logs would be invisible to `stim logs`. A slot
907
- * name can contain neither a colon nor a dot, so the two forms stay one-to-one.
908
- */
909
- function deviceSlotFileKey(platform, slot = "default") {
910
- return deviceSlotKey(platform, slot).replace(":", ".");
911
- }
912
- function parseDeviceSlotKey(key) {
913
- const [platform, slot = "default", extra] = key.split(":");
914
- if (platform !== "ios" && platform !== "android" || extra !== void 0) return null;
915
- try {
916
- validateDeviceSlot(slot);
917
- } catch {
918
- return null;
919
- }
920
- if (key !== deviceSlotKey(platform, slot)) return null;
921
- return {
922
- platform,
923
- slot
924
- };
925
- }
926
- //#endregion
927
- //#region src/fs-util.ts
928
- const WINDOWS = process.platform === "win32";
929
- const DRIVE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
930
- function volumeRootFor(path) {
931
- const normalized = normalize(String(path));
932
- if (WINDOWS) return parse(normalized).root.replace(/^[a-z]:/, (drive) => drive.toUpperCase());
933
- const m = normalized.match(/^\/volumes\/([^/]+)/i);
934
- return m ? `/Volumes/${m[1]}` : "/";
935
- }
936
- function resolveWorkspaceRealish(workspacePath) {
937
- const raw = String(workspacePath);
938
- if (!isAbsolute$1(raw)) return null;
939
- let current = raw;
940
- const MAX_HOPS = 40;
941
- for (let hops = 0; hops < MAX_HOPS; hops++) {
942
- const normalized = normalize(current);
943
- const root = parse(normalized).root;
944
- const segments = normalized.slice(root.length).split(sep$1).filter(Boolean);
945
- let prefix = root.endsWith(sep$1) ? root.slice(0, -sep$1.length) : root;
946
- let followedSymlink = false;
947
- for (const segment of segments) {
948
- prefix += `${sep$1}${segment}`;
949
- let st;
950
- try {
951
- st = lstatSync(prefix);
952
- } catch (err) {
953
- if (err && err.code === "ENOENT") return normalized;
954
- return null;
955
- }
956
- if (st.isSymbolicLink()) {
957
- let target;
958
- try {
959
- target = readlinkSync(prefix);
960
- } catch {
961
- return null;
962
- }
963
- current = `${isAbsolute$1(target) ? target : normalize(join$1(dirname$1(prefix), target))}${normalized.slice(prefix.length)}`;
964
- followedSymlink = true;
965
- break;
966
- }
967
- }
968
- if (!followedSymlink) return normalized;
969
- }
970
- return null;
971
- }
972
- function isRealMount(entryDev, rootDev) {
973
- return entryDev != null && rootDev != null && entryDev !== rootDev;
974
- }
975
- function listWindowsVolumeRoots(statFn) {
976
- const roots = [];
977
- for (const letter of DRIVE_LETTERS) {
978
- const root = `${letter}:${sep$1}`;
979
- try {
980
- statFn(root);
981
- } catch {
982
- continue;
983
- }
984
- roots.push(root);
985
- }
986
- return roots;
987
- }
988
- function listMountedVolumes({ statFn = statSync } = {}) {
989
- if (WINDOWS) return listWindowsVolumeRoots(statFn);
990
- const roots = ["/"];
991
- let rootDev;
992
- try {
993
- rootDev = statFn("/").dev;
994
- } catch {
995
- return roots;
996
- }
997
- try {
998
- for (const name of readdirSync("/Volumes")) {
999
- const path = join$1("/Volumes", name);
1000
- let entryDev;
1001
- try {
1002
- entryDev = statFn(path).dev;
1003
- } catch {
1004
- continue;
1005
- }
1006
- if (isRealMount(entryDev, rootDev)) roots.push(path);
1007
- }
1008
- } catch {}
1009
- return roots;
1010
- }
1011
- function resolveVolumeRoot(path) {
1012
- const realish = resolveWorkspaceRealish(path);
1013
- return realish === null ? null : volumeRootFor(realish);
1014
- }
1015
- function uncShareIsReachable(volume, statFn) {
1016
- if (!WINDOWS || !volume.startsWith(`${sep$1}${sep$1}`)) return false;
1017
- try {
1018
- return statFn(volume).isDirectory();
1019
- } catch {
1020
- return false;
1021
- }
1022
- }
1023
- function isOnMountedVolume(path, mountedVolumes, { statFn = statSync } = {}) {
1024
- const mounted = new Set(mountedVolumes || listMountedVolumes());
1025
- const volume = resolveVolumeRoot(path);
1026
- if (volume === null) return false;
1027
- return mounted.has(volume) || uncShareIsReachable(volume, statFn);
1028
- }
1029
- function directorySize(dir, { timeoutMs }) {
1030
- return measuredDirectorySize(dir, { timeoutMs }) ?? 0;
1031
- }
1032
- async function directorySizeAsync(dir, options) {
1033
- return await measuredDirectorySizeAsync(dir, options) ?? 0;
1034
- }
1035
- async function measuredDirectorySizeAsync(dir, { timeoutMs, signal, operation }) {
1036
- let out;
1037
- try {
1038
- out = await runOperationFile(operation, getExecutor(), "du", ["-sk", dir], {
1039
- timeoutMs,
1040
- killSignal: "SIGKILL",
1041
- signal,
1042
- cwd: operation?.cwd
1043
- });
1044
- } catch (error) {
1045
- if (error instanceof WorkspaceProcessCleanupError) throw error;
1046
- signal?.throwIfAborted();
1047
- operation?.signal.throwIfAborted();
1048
- return null;
1049
- }
1050
- if (!out) return 0;
1051
- const kb = parseInt(out.split(/\s+/)[0] ?? "", 10);
1052
- return isNaN(kb) ? 0 : kb * 1024;
1053
- }
1054
- function measuredDirectorySize(dir, { timeoutMs }) {
1055
- let out;
1056
- try {
1057
- out = getExecutor().runFile("du", ["-sk", dir], { timeoutMs });
1058
- } catch {
1059
- return null;
1060
- }
1061
- if (!out) return 0;
1062
- const kb = parseInt(out.split(/\s+/)[0] ?? "", 10);
1063
- return isNaN(kb) ? 0 : kb * 1024;
1064
- }
1065
- function formatBytes(bytes) {
1066
- if (bytes >= 1024 ** 3) return `${(bytes / 1024 ** 3).toFixed(1)}G`;
1067
- if (bytes >= 1024 ** 2) return `${Math.round(bytes / 1024 ** 2)}M`;
1068
- return `${Math.round(bytes / 1024)}K`;
1069
- }
1070
- //#endregion
1071
1081
  //#region src/devices/avd-claim.ts
1072
1082
  function acquireAvdClaim(avdName) {
1073
1083
  const root = join(configDir(), "avd-locks", `${encodeURIComponent(avdName.toLowerCase())}.lock`);
@@ -1379,4 +1389,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
1379
1389
  return result;
1380
1390
  }
1381
1391
  //#endregion
1382
- export { doctorIo as $, writeConfigSetting as A, assignSlotDevice as B, removeProject as C, upsertProject as D, setSupervisor as E, formatBytes as F, parseDeviceSlotOption as G, deviceSlotKey as H, isOnMountedVolume as I, validateDeviceSlot as J, projectDeviceSlots as K, listMountedVolumes as L, acquireAvdClaim as M, directorySize as N, withConfigLock$1 as O, directorySizeAsync as P, diagnoseTailscale as Q, measuredDirectorySizeAsync as R, releaseMetroPort as S, setDevice as T, deviceSlotPlatforms as U, deviceSlotFileKey as V, parseDeviceSlotKey as W, diagnoseConnectFailure as X, SERVER_OUTDATED as Y, diagnoseOutcome as Z, isPathPrefix$1 as _, clearDevice as a, parseMachine$1 as at, refuseRelativeStimPaths as b, ensureConfig as c, resolveEndpoint as ct, getConfigDir as d, tailscaleStatusAsync as dt, endpoint$1 as et, getConfigPath$1 as f, diagnoseLocalUnreachable as ft, getRepoSettings as g, readHostPermissions as gt, getProjectSettings as h, unconfirmedKeyFinding as ht, clearAndroidBootPending as i, outdatedServer as it, writeConfigSettingAsync as j, withConfigLockAsync$1 as k, findEnclosingWorktreeRoot as l, sayHello as lt, getProject as m, notOnTailnetDiagnosis as mt, allMetroPorts as n, keyConfirmer as nt, clearSupervisor as o, reachMachine as ot, getPlatformDeviceLimits as p, diagnosisFinding as pt, removeSlotDevice as q, claimMetroPort as r, openAuthenticated as rt, configCorruptRepair as s, realIo as st, allConsolePortsAndSerials as t, findPeer$1 as tt, getConcurrencyLimits as u, setupRemedy as ut, loadConfig$1 as v, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, volumeRootFor as z };
1392
+ export { unconfirmedKeyFinding as $, writeConfigSetting as A, keyConfirmer as B, removeProject as C, upsertProject as D, setSupervisor as E, diagnoseOutcome as F, realIo as G, outdatedServer as H, diagnoseTailscale as I, setupRemedy as J, resolveEndpoint as K, doctorIo as L, acquireAvdClaim as M, SERVER_OUTDATED as N, withConfigLock$1 as O, diagnoseConnectFailure as P, notOnTailnetDiagnosis as Q, endpoint$1 as R, releaseMetroPort as S, setDevice as T, parseMachine$1 as U, openAuthenticated as V, reachMachine as W, diagnoseLocalUnreachable as X, tailscaleStatusAsync as Y, diagnosisFinding as Z, isPathPrefix$1 as _, validateDeviceSlot as _t, clearDevice as a, isOnMountedVolume as at, refuseRelativeStimPaths as b, ensureConfig as c, volumeRootFor as ct, getConfigDir as d, deviceSlotKey as dt, readHostPermissions as et, getConfigPath$1 as f, deviceSlotPlatforms as ft, getRepoSettings as g, removeSlotDevice as gt, getProjectSettings as h, projectDeviceSlots as ht, clearAndroidBootPending as i, isAbsentPath as it, writeConfigSettingAsync as j, withConfigLockAsync$1 as k, findEnclosingWorktreeRoot as l, assignSlotDevice as lt, getProject as m, parseDeviceSlotOption as mt, allMetroPorts as n, directorySizeAsync as nt, clearSupervisor as o, listMountedVolumes as ot, getPlatformDeviceLimits as p, parseDeviceSlotKey as pt, sayHello as q, claimMetroPort as r, formatBytes as rt, configCorruptRepair as s, measuredDirectorySizeAsync as st, allConsolePortsAndSerials as t, directorySize as tt, getConcurrencyLimits as u, deviceSlotFileKey as ut, loadConfig$1 as v, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, findPeer$1 as z };
@@ -1,44 +1,44 @@
1
- import { o as cancellableSleep, t as getExecutor, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-3bF4TB8P.mjs";
3
- import { D as upsertProject, H as deviceSlotKey, V as deviceSlotFileKey, k as withConfigLockAsync, m as getProject, u as getConcurrencyLimits, y as recordIosSchemeApprovals } from "./config-D5qNWJEP.mjs";
4
- import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-CfPW1bKP.mjs";
5
- import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-C6UTYW2K.mjs";
6
- import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-Crtcbfl0.mjs";
7
- import { o as workspaceLinks } from "./stim-desktop-1XxET4S8.mjs";
8
- import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-mKHEMO-a.mjs";
1
+ import { l as cancellableSleep, t as getExecutor, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
+ import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-BdZ-QgmB.mjs";
3
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DWI9tGPU.mjs";
4
+ import { D as upsertProject, dt as deviceSlotKey, k as withConfigLockAsync, m as getProject, u as getConcurrencyLimits, ut as deviceSlotFileKey, y as recordIosSchemeApprovals } from "./config-BW0fAtoK.mjs";
5
+ import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-B5IBDfTx.mjs";
6
+ import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-DWEXiBA9.mjs";
7
+ import { o as workspaceLinks } from "./stim-desktop-_WTria-r.mjs";
8
+ import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-B5PVz0Wv.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { An as checkEasAuth, At as ensureRemoteBootOwned, Bt as RELEASE_VERIFY_WAIT_MS, Cn as gateMetroOrigin, Dt as bundleEntryPoint, Gt as unattributedLaunchLines, Ht as isBundleProof, It as LAUNCH_BUNDLING, Jt as verifyLaunch, Kt as unverifiedLaunchLines, Ln as resolveEasCliBin, Lt as LAUNCH_FATAL, Nn as loadProjectProvider, Nt as remoteIosDeps, Pt as resolveRemoteContext, Rn as resolveRemote, Rt as LAUNCH_UNVERIFIED, Sn as readRemoteSimulatorArch, Ut as readCollectorRecords, Wt as readMetroRecords, Yt as verifyReleaseLaunch, an as devClientUrl, c as budgetGate, dn as installIosApp, en as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, fn as iosAppProcess, gn as restartedAppNote, hn as launchIosApp, in as clearOtherUserApps, kt as ensureMetroReachable, zn as uploadRemote } from "./ccache-BrwGIxmV.mjs";
11
- import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-C59v9bpD.mjs";
12
- import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-Bnm8vUCV.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-yjH7Q3zn.mjs";
14
- import { A as untrackedNativeFiles, C as resolveBuild, c as evictBuild, m as fingerprintProject, w as storeBuild } from "./build-cache-BsKim4V7.mjs";
15
- import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-CdAV4-1E.mjs";
16
- import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-BEIJRJ7P.mjs";
17
- import { n as hostedMetroPortProbe } from "./hosted-native-Bh9IJ_t5.mjs";
18
- import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-CnNwdz9A.mjs";
19
- import { n as verifyCollectorOwnership } from "./ownership-CCfiBfOP.mjs";
20
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-CSpQcFZw.mjs";
21
- import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-DhWBUV_H.mjs";
22
- import { c as startDevServer, g as detectBundleId } from "./start-CLN_r9EG.mjs";
10
+ import { An as checkEasAuth, At as ensureRemoteBootOwned, Bt as RELEASE_VERIFY_WAIT_MS, Cn as gateMetroOrigin, Dt as bundleEntryPoint, Gt as unattributedLaunchLines, Ht as isBundleProof, It as LAUNCH_BUNDLING, Jt as verifyLaunch, Kt as unverifiedLaunchLines, Ln as resolveEasCliBin, Lt as LAUNCH_FATAL, Nn as loadProjectProvider, Nt as remoteIosDeps, Pt as resolveRemoteContext, Rn as resolveRemote, Rt as LAUNCH_UNVERIFIED, Sn as readRemoteSimulatorArch, Ut as readCollectorRecords, Wt as readMetroRecords, Yt as verifyReleaseLaunch, an as devClientUrl, c as budgetGate, dn as installIosApp, en as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, fn as iosAppProcess, gn as restartedAppNote, hn as launchIosApp, in as clearOtherUserApps, kt as ensureMetroReachable, zn as uploadRemote } from "./ccache-BXtzEL6M.mjs";
11
+ import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-B3ahAHZc.mjs";
12
+ import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-s5ZmG42Z.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-C8kBq9w0.mjs";
14
+ import { T as storeBuild, h as fingerprintProject, j as untrackedNativeFiles, l as evictBuild, w as resolveBuild } from "./build-cache-Cqj4FGnX.mjs";
15
+ import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-BdZdNsAj.mjs";
16
+ import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-CWsBysyN.mjs";
17
+ import { n as hostedMetroPortProbe } from "./hosted-native-BzXIy97W.mjs";
18
+ import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-rvyxW1Fl.mjs";
19
+ import { n as verifyCollectorOwnership } from "./ownership-hC7xvvxF.mjs";
20
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-D4oREwhx.mjs";
21
+ import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-DaPfzf_e.mjs";
22
+ import { c as startDevServer, g as detectBundleId } from "./start-BsEV4S-s.mjs";
23
23
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
24
- import { a as acquireRunLease, c as lostRefusal, d as runLease, s as lostLine, t as DEBUG_VERIFY_STEP_MS, u as releaseLeaseOnAbort } from "./device-lease-run-DeNGjJZM.mjs";
25
- import { r as checkDeviceCapacity } from "./device-capacity-Bki6B-7h.mjs";
26
- import { n as clearIosAdoptionPending } from "./device-ios-TE5ejeXx.mjs";
27
- import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-NxnD8QXd.mjs";
28
- import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-BJzvDPfU.mjs";
29
- import { a as resolveEasDevelopmentBuild } from "./eas-build-CaG-Sfs9.mjs";
30
- import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-D7Gi3e1I.mjs";
31
- import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-q56Im4D8.mjs";
32
- import { t as followHostedLaunchLogs } from "./hosted-logs-sync-B8bjLEMs.mjs";
33
- import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-CyNrUWgV.mjs";
34
- import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-DQfxW5Au.mjs";
35
- import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-eDZy6RoX.mjs";
36
- import { t as automaticDevicePlacement } from "./auto-placement--nfdQ9rp.mjs";
37
- import { t as checkEasFallback } from "./eas-fallback-BpX1lpco.mjs";
38
- import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-CTozKhU0.mjs";
39
- import { t as selectFromPool } from "./device-pool-mjyUYaau.mjs";
40
- import { s as reportIosResult } from "./ios-project-DDQlX_jX.mjs";
41
- import { i as swapJsBundle } from "./js-swap-C8N5DXHl.mjs";
24
+ import { a as acquireRunLease, c as lostRefusal, d as runLease, s as lostLine, t as DEBUG_VERIFY_STEP_MS, u as releaseLeaseOnAbort } from "./device-lease-run-DpiCnRbZ.mjs";
25
+ import { r as checkDeviceCapacity } from "./device-capacity-BAkETfIl.mjs";
26
+ import { n as clearIosAdoptionPending } from "./device-ios-DFaYFdar.mjs";
27
+ import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-D8OH0z98.mjs";
28
+ import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-D-tSX1iF.mjs";
29
+ import { a as resolveEasDevelopmentBuild } from "./eas-build-CpJ4h9tG.mjs";
30
+ import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-DXbHZfFe.mjs";
31
+ import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-DoLGklYX.mjs";
32
+ import { t as followHostedLaunchLogs } from "./hosted-logs-sync-D182b1eJ.mjs";
33
+ import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-Bhs7TTcz.mjs";
34
+ import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-e1OU8gEN.mjs";
35
+ import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-ChsHwgrn.mjs";
36
+ import { t as automaticDevicePlacement } from "./auto-placement-D7P98glJ.mjs";
37
+ import { t as checkEasFallback } from "./eas-fallback-B3z5nL1g.mjs";
38
+ import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-DOehZpyx.mjs";
39
+ import { t as selectFromPool } from "./device-pool-DP4sCeCC.mjs";
40
+ import { s as reportIosResult } from "./ios-project-BzfLigfh.mjs";
41
+ import { i as swapJsBundle } from "./js-swap-EDVOJmqx.mjs";
42
42
  import { mkdirSync, openSync, writeFileSync } from "node:fs";
43
43
  import { networkInterfaces } from "node:os";
44
44
  import { basename, join } from "node:path";
@@ -1,5 +1,5 @@
1
- import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { Bt as repoRoot } from "./settings-C6UTYW2K.mjs";
1
+ import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
+ import { Bt as repoRoot } from "./settings-B5IBDfTx.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { existsSync } from "node:fs";
5
5
  import { dirname, join, relative } from "node:path";
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-aULwtNly.mjs";
1
+ import { t as getExecutor } from "./exec-CGuDzt40.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 { C as resolvePackageJson, b as isPackageResolvable } from "./project-Crtcbfl0.mjs";
2
- import { bn as readBundleSchemes, yn as pickDevClientScheme } from "./ccache-BrwGIxmV.mjs";
1
+ import { C as resolvePackageJson, b as isPackageResolvable } from "./project-DWEXiBA9.mjs";
2
+ import { bn as readBundleSchemes, yn as pickDevClientScheme } from "./ccache-BXtzEL6M.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