stim 1.15.0 → 1.17.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 (123) hide show
  1. package/dist/{activity-B2-kb7k0.mjs → activity-IRvJY_ru.mjs} +49 -16
  2. package/dist/agent-device-usage-output-BK41vnzN.mjs +411 -0
  3. package/dist/{android-Cu_L4RpL.mjs → android--GorydsK.mjs} +692 -321
  4. package/dist/{android-Db2eEMaf.mjs → android-B_YNZy61.mjs} +25 -60
  5. package/dist/{android-CYmq0jNi.mjs → android-DE4v59Mb.mjs} +12 -3
  6. package/dist/{android-cas-PnKfAdB2.mjs → android-cas-ZFpjJBL_.mjs} +6 -5
  7. package/dist/{app-install-CAAplXAt.mjs → app-install-VPkI5WEg.mjs} +52 -8
  8. package/dist/attempt-Bk2ouQVL.mjs +39 -0
  9. package/dist/{budget-CMiqghig.mjs → budget-DM984mnd.mjs} +372 -366
  10. package/dist/{build-plan-aeGMFX7e.mjs → build-plan-CmQCoyT-.mjs} +346 -88
  11. package/dist/{build-slots-Df1ApSuH.mjs → build-slots-41v_d2x9.mjs} +36 -21
  12. package/dist/{cli-0cX5s4NM.mjs → cli-Daxug5-K.mjs} +23 -17
  13. package/dist/cli.mjs +1 -1
  14. package/dist/collector-run.mjs +5 -192
  15. package/dist/{command-output-CliHHn7a.mjs → command-output-CDAIFD-8.mjs} +3 -3
  16. package/dist/{created-devices-BwVb3liH.mjs → created-devices-CpvzBL25.mjs} +1 -1
  17. package/dist/{dependency-state-BmsjKZ2H.mjs → dependency-state-CLcBHH2M.mjs} +1 -1
  18. package/dist/{deps-BFlKbOIp.mjs → deps-DNWaQs4V.mjs} +2 -2
  19. package/dist/{dev-client-CjzLoNs0.mjs → dev-client-B-XC4uRH.mjs} +3 -40
  20. package/dist/{device-BZ1IyS5A.mjs → device-C8IOoJPv.mjs} +7 -6
  21. package/dist/device-capacity-D0GWHnTM.mjs +580 -0
  22. package/dist/device-host-worker.mjs +587 -110
  23. package/dist/{device-ios-DMQBUPus.mjs → device-ios-Bc7vbGwl.mjs} +75 -44
  24. package/dist/{device-lease-W5Pi1q38.mjs → device-lease-DpoS36_u.mjs} +2 -2
  25. package/dist/{device-pool-B2r38YjS.mjs → device-lease-run-B8YltIH_.mjs} +5 -125
  26. package/dist/device-pool-3o7s5lo4.mjs +125 -0
  27. package/dist/{device-remote-9ulPsdhY.mjs → device-remote-hFSkpfQu.mjs} +13 -13
  28. package/dist/{doctor-BcE5xsBn.mjs → doctor-Cnk9d7Hm.mjs} +86 -59
  29. package/dist/{error-diagnostics-Cb0P1WLS.mjs → error-diagnostics-C-NMnhrk.mjs} +11 -15
  30. package/dist/{gc-BuL1Genr.mjs → gc-DxCL2A46.mjs} +478 -33
  31. package/dist/{gradle-CmdOBq1d.mjs → gradle-D7-L2Th3.mjs} +4 -4
  32. package/dist/{guide-cCSGRFd3.mjs → guide-DjrTQGik.mjs} +2198 -566
  33. package/dist/{guide-status-CIoWK6mG.mjs → guide-status-Du-ZQ3FD.mjs} +1 -1
  34. package/dist/hosted-android-DwLS4Mse.mjs +32 -0
  35. package/dist/hosted-client-wk1W_CNW.mjs +196 -0
  36. package/dist/hosted-ios-aMo7Cljf.mjs +15 -0
  37. package/dist/hosted-logs-DqYmWtXc.mjs +187 -0
  38. package/dist/hosted-macos-dlHXEeF5.mjs +135 -0
  39. package/dist/hosted-native-C9xJ9rpA.mjs +255 -0
  40. package/dist/{build-progress-C2Jv1AtA.mjs → idle-B2m-Ovod.mjs} +300 -9
  41. package/dist/{idle-shutdown-B5LPaNyY.mjs → idle-shutdown-_3oOV1V_.mjs} +25 -17
  42. package/dist/{in-use-CndPMilN.mjs → in-use-CvGOUn-x.mjs} +30 -10
  43. package/dist/ios-Cr1h5gnO.mjs +189 -0
  44. package/dist/{ios-Chob8ny7.mjs → ios-DE6duQoz.mjs} +819 -460
  45. package/dist/{ios-3CtCRhwr.mjs → ios-DSfnPfse.mjs} +4 -4
  46. package/dist/{ios-device-DERmMmk-.mjs → ios-device-pAN4t54-.mjs} +1 -1
  47. package/dist/ios-state-8L3lgum6.mjs +89 -0
  48. package/dist/{launch-verify-CLlofxRt.mjs → launch-verify-lTnWZikR.mjs} +3 -3
  49. package/dist/logs-DUoKlDoS.mjs +384 -0
  50. package/dist/{client-C2IS36Qf.mjs → machines-C2XiNwh9.mjs} +330 -37
  51. package/dist/{macos-BwtbUtTN.mjs → macos-32po3kUq.mjs} +23 -18
  52. package/dist/macos-run.mjs +1 -1
  53. package/dist/maintenance-run.d.mts +4 -0
  54. package/dist/maintenance-run.mjs +254 -0
  55. package/dist/{metro-Di8EN2Tb.mjs → metro-g8NqiJp-.mjs} +1 -1
  56. package/dist/metro-gateway-DmslUM30.mjs +103 -0
  57. package/dist/{named-ports-Dj_XBNaL.mjs → named-ports-C8m8EQs2.mjs} +2 -2
  58. package/dist/{native-run-DFDoIRbY.mjs → native-run-D1Q56rAD.mjs} +17 -6
  59. package/dist/{native-runtime-i6OkVg-w.mjs → native-runtime-DhJI3IVQ.mjs} +6 -6
  60. package/dist/{ndjson-CDY9IkVC.mjs → ndjson-PclOIwVY.mjs} +2 -2
  61. package/dist/offload-worker.d.mts +1 -0
  62. package/dist/offload-worker.mjs +13 -8
  63. package/dist/{teardown-BYuQafiA.mjs → ownership-BMLqyBgJ.mjs} +639 -53
  64. package/dist/{ownership-BkYxUtuj.mjs → ownership-DyRQru0q.mjs} +2 -2
  65. package/dist/{ports-DddwttKM.mjs → ports-4nYqxPWC.mjs} +2 -2
  66. package/dist/{prebuild-BvxDlD6C.mjs → prebuild-D7RUMkwN.mjs} +4 -4
  67. package/dist/preview-CxPRIEht.mjs +318 -0
  68. package/dist/{project-CV3tDFHl.mjs → project-D47Rh0ly.mjs} +72 -3
  69. package/dist/{recordings-GEXp4iBT.mjs → recordings-BNgsD1Tr.mjs} +1 -1
  70. package/dist/{reload-ChPiwvot.mjs → reload-qZei6iWn.mjs} +77 -13
  71. package/dist/{remote-cache-CO2elm_b.mjs → remote-cache-Ci4DQYYj.mjs} +4 -4
  72. package/dist/{run-B-xqRrsg.mjs → run-CkE9y0nc.mjs} +2 -2
  73. package/dist/{server-bare-X7PUgizL.mjs → server-bare-BkrSxSsZ.mjs} +1 -1
  74. package/dist/{server-expo-DhtX6bom.mjs → server-expo-CHTyXD0G.mjs} +4 -4
  75. package/dist/server-expo-CeakhI8P.mjs +2 -0
  76. package/dist/settings-BBpMcDbD.mjs +25 -0
  77. package/dist/settings-Cfd-0r2d.mjs +1440 -0
  78. package/dist/{settings-DbL6uhH8.mjs → settings-SR9OmW9h.mjs} +10 -4
  79. package/dist/settings.schema.json +472 -50
  80. package/dist/{simslim-Ciluxlq4.mjs → simslim-BWNrc3M3.mjs} +3 -3
  81. package/dist/{slot-launch-BY0BrOLh.mjs → slot-launch-DmjBmpQV.mjs} +10 -7
  82. package/dist/{spawn-entry-DncpJvWL.mjs → spawn-entry-jw19m8Nl.mjs} +1 -0
  83. package/dist/{start-CPO4wRg7.mjs → start-BopZcr4n.mjs} +1 -1
  84. package/dist/{start-CUD9nasA.mjs → start-uee1wWjY.mjs} +21 -17
  85. package/dist/{state-CaeaHbDA.mjs → state-BKa8wNN5.mjs} +1 -1
  86. package/dist/{state-BxCgeTQu.mjs → state-DyaNTgfR.mjs} +2 -2
  87. package/dist/{state-DFm77wRn.mjs → state-PeQiJuIu.mjs} +5 -5
  88. package/dist/{stats-DBLLFmKd.mjs → stats-Bq4fJOdB.mjs} +19 -5
  89. package/dist/{status-l84Gbvp2.mjs → status-CzS4bPO9.mjs} +5 -3
  90. package/dist/status-DlKvVJBE.mjs +49 -0
  91. package/dist/{status-DYXxNOT0.mjs → status-dXX2JX1C.mjs} +244 -50
  92. package/dist/{stop-CceYh1yG.mjs → stop-BCwvvs7F.mjs} +2 -2
  93. package/dist/{stop-Bad61z_2.mjs → stop-BjizrQwv.mjs} +83 -21
  94. package/dist/{stop-Bvf1MflS.mjs → stop-Cr1d8DSE.mjs} +4 -4
  95. package/dist/stop-cause-rhmGfwvt.mjs +97 -0
  96. package/dist/supervisor-run.d.mts +7 -4
  97. package/dist/supervisor-run.mjs +156 -27
  98. package/dist/{support-WLOzVKUv.mjs → support-BJPgYCu-.mjs} +61 -11
  99. package/dist/{support-CDQbDkL5.mjs → support-F9-sr0Oi.mjs} +6 -5
  100. package/dist/{toolchain-DmeYjXD9.mjs → toolchain-CNIBTIOv.mjs} +11 -11
  101. package/dist/trigger-Bemu8ytw.mjs +65 -0
  102. package/dist/trigger-CXts6qt1.mjs +2 -0
  103. package/dist/{warm-progress-DVHLN4uC.mjs → warm-progress-DF4JRvYI.mjs} +274 -5
  104. package/dist/watchman-APYjXSQa.mjs +48 -0
  105. package/dist/{web-k6w8-HnE.mjs → web-exQtGkoc.mjs} +14 -16
  106. package/dist/web-run.mjs +5 -5
  107. package/dist/{workspace-process-lock-BL7Q0HCO.mjs → workspace-process-lock-2mNzOlaB.mjs} +3 -2
  108. package/dist/{workspace-state-CL2V2Ons.mjs → workspace-state-DqcCbpE7.mjs} +34 -34
  109. package/dist/workspaces-Bcib97-6.mjs +306 -0
  110. package/dist/{worktree-BT_uULFx.mjs → worktree-Dc98cE6_.mjs} +1 -1
  111. package/dist/{worktree-qXKzADSC.mjs → worktree-ZpZR3S1k.mjs} +601 -33
  112. package/package.json +5 -5
  113. package/dist/device-capacity-DMuKC7nx.mjs +0 -136
  114. package/dist/hosted-macos-DwowNU7W.mjs +0 -447
  115. package/dist/logs-h9h6MUvE.mjs +0 -568
  116. package/dist/machine-usage-D_YYMzfR.mjs +0 -283
  117. package/dist/machines-CYtOCqcj.mjs +0 -259
  118. package/dist/merge-state-BnxLNQiM.mjs +0 -272
  119. package/dist/server-expo-KJeD109I.mjs +0 -2
  120. package/dist/settings-CduVcoxj.mjs +0 -680
  121. package/dist/stop-cause-CZ_Mr-v9.mjs +0 -665
  122. package/dist/watchman-Bx0wceoF.mjs +0 -238
  123. package/dist/worktree-C0c5Udwa.mjs +0 -753
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-0cX5s4NM.mjs");
7
+ } else import("./cli-Daxug5-K.mjs");
8
8
  //#endregion
9
9
  export {};
@@ -1,203 +1,16 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
1
  import { R as deviceSlotKey, W as validateDeviceSlot } from "./config-D0DbpZtM.mjs";
3
2
  import { t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
4
- import { r as createNdjsonWriter } from "./ndjson-CDY9IkVC.mjs";
5
- import { C as workspaceLogsDir } from "./workspace-state-CL2V2Ons.mjs";
6
3
  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";
7
6
  import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-Ee7sDXfp.mjs";
8
- import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-BkYxUtuj.mjs";
9
- import { a as watchAppPid, i as waitForAppPid, n as parseLogcatLine, r as startAndroidLogcat, t as androidClockOffset } from "./android-CYmq0jNi.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";
10
10
  import { existsSync } from "node:fs";
11
11
  import { isAbsolute, join, resolve } from "node:path";
12
12
  import { LOG_ROTATE_BYTES } from "@stim-cli/core";
13
13
  import { fileURLToPath } from "node:url";
14
- //#region src/collector/ios.ts
15
- const MESSAGE_TYPE_LEVEL = {
16
- Debug: "debug",
17
- Info: "info",
18
- Default: "info",
19
- Error: "error",
20
- Fault: "fatal"
21
- };
22
- function levelFromMessageType(messageType) {
23
- return MESSAGE_TYPE_LEVEL[messageType] ?? "info";
24
- }
25
- const NOISE_RULES = [
26
- {
27
- id: "network",
28
- subsystem: "com.apple.network"
29
- },
30
- {
31
- id: "network-default-subsystem",
32
- messagePrefix: [
33
- "nw_socket",
34
- "nw_connection",
35
- "nw_protocol",
36
- "nw_endpoint",
37
- "nw_path",
38
- "nw_resolver",
39
- "nw_flow",
40
- "nw_read_request",
41
- "nw_write_request",
42
- "tcp_input"
43
- ]
44
- },
45
- {
46
- id: "sectrust",
47
- subsystem: "com.apple.securityd"
48
- },
49
- {
50
- id: "sectrust-default-subsystem",
51
- messagePrefix: [
52
- "SecTrust",
53
- "SecOSStatus",
54
- "TrustResultType"
55
- ]
56
- },
57
- {
58
- id: "webkit",
59
- subsystem: "com.apple.WebKit"
60
- },
61
- {
62
- id: "webkit-default-subsystem",
63
- messagePrefix: [
64
- "WebPrivacy",
65
- "GPUProcessProxy",
66
- "WebProcessProxy"
67
- ]
68
- },
69
- {
70
- id: "audio-factory",
71
- messageIncludes: ["AddInstanceForFactory"]
72
- },
73
- {
74
- id: "coreui",
75
- subsystem: "com.apple.coreui"
76
- },
77
- {
78
- id: "coreui-default-subsystem",
79
- messagePrefix: [
80
- "CUICatalog:",
81
- "CoreUI:",
82
- "CoreThemeDefinition"
83
- ]
84
- },
85
- {
86
- id: "uiscene-deprecation",
87
- messageIncludes: [
88
- "UIScene lifecycle will soon be required",
89
- "`UIScene` lifecycle will soon be required",
90
- "must migrate to UIScene",
91
- "migrate to UIScene lifecycle"
92
- ]
93
- },
94
- {
95
- id: "react-native-focus-cache",
96
- exactSubsystem: "com.apple.UIKit",
97
- category: "UIFocus",
98
- messageEquals: "RCTScrollViewComponentView implements focusItemsInRect: - caching for linear focus movement is limited as long as this view is on screen."
99
- },
100
- {
101
- id: "cfnetwork-performance-diagnostic",
102
- exactSubsystem: "com.apple.runtime-issues",
103
- category: "CFNetwork Performance Diagnostic",
104
- level: "warn"
105
- }
106
- ];
107
- function ruleMatches(rule, { subsystem, category, message }) {
108
- if (rule.subsystem && subsystem !== rule.subsystem && !subsystem.startsWith(`${rule.subsystem}.`)) return false;
109
- if (rule.exactSubsystem && subsystem !== rule.exactSubsystem) return false;
110
- if (rule.category && category !== rule.category) return false;
111
- if (rule.messageEquals && message !== rule.messageEquals) return false;
112
- if (rule.messagePrefix && !rule.messagePrefix.some((p) => message.startsWith(p))) return false;
113
- if (rule.messageIncludes && !rule.messageIncludes.some((p) => message.includes(p))) return false;
114
- return true;
115
- }
116
- function matchingNoiseRule(event) {
117
- const subsystem = typeof event?.subsystem === "string" ? event.subsystem : "";
118
- const category = typeof event?.category === "string" ? event.category : "";
119
- const message = typeof event?.eventMessage === "string" ? event.eventMessage : "";
120
- return NOISE_RULES.find((rule) => ruleMatches(rule, {
121
- subsystem,
122
- category,
123
- message
124
- }));
125
- }
126
- function levelForEvent(event) {
127
- const level = levelFromMessageType(event?.messageType);
128
- if (level !== "error" && level !== "fatal") return level;
129
- const rule = matchingNoiseRule(event);
130
- return rule ? rule.level ?? "info" : level;
131
- }
132
- function procFromImagePath(path) {
133
- if (typeof path !== "string" || !path) return null;
134
- const parts = path.split("/");
135
- return parts[parts.length - 1] || null;
136
- }
137
- function tsFromEvent(event, now = Date.now) {
138
- const parsed = Date.parse(event?.timestamp);
139
- return Number.isFinite(parsed) ? parsed : now();
140
- }
141
- function recordFromLogEvent(event, { now = Date.now } = {}) {
142
- if (!event || typeof event !== "object") return null;
143
- const eventType = event.eventType;
144
- if (eventType && eventType !== "logEvent") return null;
145
- const msg = typeof event.eventMessage === "string" ? event.eventMessage : "";
146
- if (!msg.trim()) return null;
147
- const record = {
148
- ts: tsFromEvent(event, now),
149
- src: "device",
150
- level: levelForEvent(event),
151
- msg
152
- };
153
- const proc = procFromImagePath(event.processImagePath);
154
- if (proc) record.proc = proc;
155
- if (typeof event.subsystem === "string") record.subsystem = event.subsystem;
156
- if (typeof event.category === "string") record.category = event.category;
157
- return record;
158
- }
159
- function parseLogStreamLine(line, { now = Date.now } = {}) {
160
- if (typeof line !== "string") return null;
161
- const trimmed = line.trim();
162
- if (!trimmed || trimmed[0] !== "{") return null;
163
- let event;
164
- try {
165
- event = JSON.parse(trimmed);
166
- } catch {
167
- return null;
168
- }
169
- return recordFromLogEvent(event, { now });
170
- }
171
- function logStreamArgs(udid, appName, executableName) {
172
- return [
173
- "simctl",
174
- "spawn",
175
- udid,
176
- "log",
177
- "stream",
178
- "--style",
179
- "ndjson",
180
- "--predicate",
181
- `processImagePath ENDSWITH "/${appName}.app/${executableName && executableName.trim() !== "" ? executableName.trim() : appName}"`,
182
- "--level",
183
- "info"
184
- ];
185
- }
186
- function appNameFromBundleId(bundleId) {
187
- const parts = String(bundleId || "").split(".");
188
- return parts[parts.length - 1] || String(bundleId || "");
189
- }
190
- function startIosLogStream({ udid, appName, executableName = null, spawnFn = null }) {
191
- return (spawnFn || ((cmd, args, opts) => getExecutor().spawn(cmd, args, opts)))("xcrun", logStreamArgs(udid, appName, executableName), {
192
- stdio: [
193
- "ignore",
194
- "pipe",
195
- "pipe"
196
- ],
197
- detached: false
198
- });
199
- }
200
- //#endregion
201
14
  //#region src/collector/run.ts
202
15
  const PLATFORMS = ["ios", "android"];
203
16
  function parseArgs(argv) {
@@ -1,6 +1,6 @@
1
- import { t as NO_PROJECT_REFUSAL } from "./project-CV3tDFHl.mjs";
2
1
  import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
3
- import { quotedPath } from "@stim-cli/core";
2
+ import { t as NO_PROJECT_REFUSAL } from "./project-D47Rh0ly.mjs";
3
+ import { quotedPath as quotedPath$1 } from "@stim-cli/core";
4
4
  import chalk from "chalk";
5
5
  //#region src/diagnostics/launch-error-preview.ts
6
6
  function framePriority(frame, root) {
@@ -292,4 +292,4 @@ function stepTimer(now = Date.now) {
292
292
  return () => `(${formatDuration(elapsed())})`;
293
293
  }
294
294
  //#endregion
295
- export { stepTimer as _, formatElapsed as a, launchErrorReport as c, quotedPath as d, refuseNoProject as f, stepClock as g, shortUdid as h, formatDuration as i, phaseLine as l, shortHash as m, appReadinessMessage as n, formatLongDuration as o, releasedLeaseFact as p, clockTime as r, isAppLaunchError as s, SLOW_STEP_MS as t, plural as u, launchErrorPreview as v };
295
+ export { stepTimer as _, formatElapsed as a, launchErrorReport as c, quotedPath$1 as d, refuseNoProject as f, stepClock as g, shortUdid as h, formatDuration as i, phaseLine as l, shortHash as m, appReadinessMessage as n, formatLongDuration as o, releasedLeaseFact as p, clockTime as r, isAppLaunchError as s, SLOW_STEP_MS as t, plural as u, launchErrorPreview as v };
@@ -1,5 +1,5 @@
1
1
  import { d as getConfigDir } from "./config-D0DbpZtM.mjs";
2
- import { E as withDirLock } from "./workspace-state-CL2V2Ons.mjs";
2
+ import { w as withDirLock } from "./workspace-state-DqcCbpE7.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
1
  import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { y as repoRoot } from "./worktree-C0c5Udwa.mjs";
2
+ import { gt as repoRoot } from "./settings-Cfd-0r2d.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,7 +1,7 @@
1
1
  import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { a as spawnDeclared } from "./spawn-claims-D0XfSe8u.mjs";
3
2
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { S as bundlerPin, u as HEARTBEAT_INTERVAL_MS, y as startBuildHeartbeat } from "./toolchain-DmeYjXD9.mjs";
3
+ import { a as spawnDeclared } from "./spawn-claims-D0XfSe8u.mjs";
4
+ import { S as bundlerPin, u as HEARTBEAT_INTERVAL_MS, y as startBuildHeartbeat } from "./toolchain-CNIBTIOv.mjs";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import { delimiter, dirname, join, relative, resolve, sep } from "node:path";
7
7
  import { homedir } from "node:os";
@@ -1,5 +1,5 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { f as resolvePackageJson, s as isPackageResolvable } from "./project-CV3tDFHl.mjs";
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";
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
@@ -14,43 +14,6 @@ function devClientScheme(root, appPath = null, { exec = null } = {}) {
14
14
  if (typeof scheme !== "string" || scheme.trim() === "") return void 0;
15
15
  return scheme.trim();
16
16
  }
17
- function schemesFromInfoPlist(plist) {
18
- const types = plist?.CFBundleURLTypes;
19
- if (!Array.isArray(types)) return [];
20
- const out = [];
21
- for (const type of types) {
22
- const schemes = type?.CFBundleURLSchemes;
23
- if (Array.isArray(schemes)) out.push(...schemes.filter((s) => typeof s === "string" && s.trim() !== ""));
24
- }
25
- return out;
26
- }
27
- function readBundleSchemes(appPath, { exec = null } = {}) {
28
- if (typeof appPath !== "string" || appPath.trim() === "") return [];
29
- const e = exec || getExecutor();
30
- let out;
31
- try {
32
- out = e.runFile("plutil", [
33
- "-convert",
34
- "json",
35
- "-o",
36
- "-",
37
- join(appPath, "Info.plist")
38
- ]);
39
- } catch {
40
- return [];
41
- }
42
- try {
43
- return schemesFromInfoPlist(JSON.parse(String(out)));
44
- } catch {
45
- return [];
46
- }
47
- }
48
- const THIRD_PARTY_SCHEME = /^(?:fb\d+|com\.googleusercontent\.apps\.|msauth\.|msauthv2|twitterkit-|db-[a-z0-9]+$|spotify|snapchat|com\.facebook)/i;
49
- function pickDevClientScheme(schemes) {
50
- const all = (Array.isArray(schemes) ? schemes : []).filter((s) => typeof s === "string" && s.trim() !== "").map((s) => s.trim()).filter((s) => !/^(?:https?|mailto|tel|sms|itms(?:-apps)?)$/i.test(s));
51
- const expo = all.filter((s) => s.startsWith("exp+"));
52
- return (expo.length ? expo : all.filter((s) => !THIRD_PARTY_SCHEME.test(s))).toSorted((a, b) => b.length - a.length)[0] ?? null;
53
- }
54
17
  function hasDevClient(root) {
55
18
  const pkg = readJsonObject(join(root, "package.json"));
56
19
  if ([pkg?.dependencies, pkg?.devDependencies].some((deps) => isJsonObject(deps) && "expo-dev-client" in deps)) return true;
@@ -77,4 +40,4 @@ function installedDevLauncherVersion(root) {
77
40
  return typeof version === "string" ? version : null;
78
41
  }
79
42
  //#endregion
80
- export { schemesFromInfoPlist as i, devClientTakesDevMenuParams as n, pickDevClientScheme as r, devClientScheme as t };
43
+ export { devClientTakesDevMenuParams as n, devClientScheme as t };
@@ -1,10 +1,11 @@
1
1
  import { H as projectDeviceSlots, R as deviceSlotKey, V as parseDeviceSlotOption, p as getProject } from "./config-D0DbpZtM.mjs";
2
- import { a as findProjectRoot, t as NO_PROJECT_REFUSAL } from "./project-CV3tDFHl.mjs";
3
- import { r as clockTime } from "./command-output-CliHHn7a.mjs";
4
- import { n as fileLeaseIo, o as parseLeaseDuration, p as takeLease, u as releaseWorkspaceLeases } from "./device-lease-W5Pi1q38.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-Db2eEMaf.mjs";
6
- import { d as waitForDevice, s as parseDeviceWait, t as selectFromPool } from "./device-pool-B2r38YjS.mjs";
7
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-DERmMmk-.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";
8
9
  import chalk from "chalk";
9
10
  //#region src/commands/device.ts
10
11
  const DEFAULT_FOR = "5m";