stim 1.14.0 → 1.16.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 (152) hide show
  1. package/README.md +2 -0
  2. package/dist/activity-BxwdD81S.mjs +609 -0
  3. package/dist/agent-device-usage-output-Dpih1Tfa.mjs +411 -0
  4. package/dist/{android-d6rGq1pA.mjs → android-B_NumVyQ.mjs} +169 -81
  5. package/dist/{android-LbPFRWVL.mjs → android-Ift4kVvt.mjs} +517 -413
  6. package/dist/android-cas-8U4DPqeR.mjs +167 -0
  7. package/dist/android-cas-compiler.mjs +2 -2
  8. package/dist/{android-XpvCrV7q.mjs → android-r2rBL8kV.mjs} +2 -2
  9. package/dist/{app-install-BpgSgkJj.mjs → app-install-CKWdbXIX.mjs} +128 -151
  10. package/dist/attempt-Bk2ouQVL.mjs +39 -0
  11. package/dist/budget-DjrURfQn.mjs +2700 -0
  12. package/dist/{build-plan-Dcr-3ie0.mjs → build-plan-DjeSb2Xl.mjs} +192 -653
  13. package/dist/build-slots-rUk77xqh.mjs +132 -0
  14. package/dist/{cache-manifest-C68QQ0ua.mjs → cache-manifest-DnUHBJaU.mjs} +2 -2
  15. package/dist/cache-manifest.mjs +1 -1
  16. package/dist/{chrome-BPCiC3ZX.mjs → chrome-BrcVWQyD.mjs} +1 -1
  17. package/dist/cli-BkYZ_6hy.mjs +51 -0
  18. package/dist/cli.mjs +6 -42
  19. package/dist/client-BTY686R6.mjs +1368 -0
  20. package/dist/collector-run.mjs +9 -195
  21. package/dist/{command-output-DVcpw6eE.mjs → command-output-DnJMdEY-.mjs} +1 -1
  22. package/dist/{config-lvc7d3C2.mjs → config-D0DbpZtM.mjs} +28 -29
  23. package/dist/{created-devices-CllH_8eb.mjs → created-devices-D5owjN4C.mjs} +2 -2
  24. package/dist/{dependency-state-DsT7aKeo.mjs → dependency-state-B6cMXZab.mjs} +2 -2
  25. package/dist/{deps-D9IcKqXS.mjs → deps-urbmfXig.mjs} +3 -3
  26. package/dist/{detached-entry-DJHoca49.mjs → detached-entry-CiTEgMR1.mjs} +1 -1
  27. package/dist/dev-client-CroAIjjj.mjs +43 -0
  28. package/dist/{device-CjuuAJjQ.mjs → device-DZQjF7H5.mjs} +8 -7
  29. package/dist/device-capacity-BHwxNBlu.mjs +136 -0
  30. package/dist/device-host-worker.d.mts +1 -0
  31. package/dist/device-host-worker.mjs +964 -0
  32. package/dist/device-ios-BadmeL2V.mjs +381 -0
  33. package/dist/{device-lease-5c3WrVRm.mjs → device-lease-D-hLqx1b.mjs} +43 -36
  34. package/dist/{device-pool-BiyDyPP-.mjs → device-lease-run-CqjShqWW.mjs} +6 -126
  35. package/dist/device-pool-CUaEWMMm.mjs +125 -0
  36. package/dist/{device-remote-D87zEzaq.mjs → device-remote-D5WVWqOq.mjs} +69 -163
  37. package/dist/{doctor-x9pnU9fq.mjs → doctor-Cimf-gGB.mjs} +241 -103
  38. package/dist/{error-diagnostics-C5HzcwCW.mjs → error-diagnostics-B9L4Ae0x.mjs} +15 -18
  39. package/dist/{exec-DK8KaVHK.mjs → exec-CaErVv7t.mjs} +5 -1
  40. package/dist/{gc-ko6mUAYD.mjs → gc-Bqy4bjEu.mjs} +599 -108
  41. package/dist/{android-cas-iZK3DOCr.mjs → gradle-BsO1MdsH.mjs} +8 -294
  42. package/dist/{guide-6R0VNFqI.mjs → guide-B_uyKTxW.mjs} +2511 -239
  43. package/dist/{guide-status-BZrFPIA_.mjs → guide-status-CjEZMAD4.mjs} +3 -3
  44. package/dist/hosted-client-a-WmqE2L.mjs +197 -0
  45. package/dist/hosted-ios-CIWelIqf.mjs +220 -0
  46. package/dist/hosted-logs-D5g041Q3.mjs +187 -0
  47. package/dist/hosted-macos-BSZyIb3y.mjs +135 -0
  48. package/dist/idle-DYVymG92.mjs +1099 -0
  49. package/dist/idle-shutdown-CTsDnAde.mjs +122 -0
  50. package/dist/in-use-DvBw0Kxo.mjs +130 -0
  51. package/dist/{ios-BwDPrnYQ.mjs → ios-BaInn3sW.mjs} +201 -10
  52. package/dist/ios-Cr1h5gnO.mjs +189 -0
  53. package/dist/{ios-P1f5nm2n.mjs → ios-aq3QoGI3.mjs} +1159 -633
  54. package/dist/{ios-device-BiOsSVzd.mjs → ios-device-Ee7sDXfp.mjs} +1 -1
  55. package/dist/{ios-device-DGglU3E_.mjs → ios-device-FfCN_C8p.mjs} +12 -7
  56. package/dist/ios-state-DS5UpYTH.mjs +48 -0
  57. package/dist/{launch-verify-Deg4tB3Z.mjs → launch-verify-2DBRizjo.mjs} +5 -5
  58. package/dist/logs-CHEVK8zD.mjs +371 -0
  59. package/dist/machines-BIBUdhpj.mjs +265 -0
  60. package/dist/macos-CSYEAFmF.mjs +473 -0
  61. package/dist/macos-run.d.mts +5 -0
  62. package/dist/macos-run.mjs +2 -0
  63. package/dist/maintenance-run.d.mts +4 -0
  64. package/dist/maintenance-run.mjs +254 -0
  65. package/dist/{metro-CcEo8Fl8.mjs → metro-BeK1ZPz1.mjs} +20 -120
  66. package/dist/metro-gateway-BJ-rxQAB.mjs +84 -0
  67. package/dist/{named-ports-Blg8IxOh.mjs → named-ports-Bk_YXEmE.mjs} +6 -59
  68. package/dist/native-run-NaBrRFtQ.mjs +147 -0
  69. package/dist/{native-runtime-DjBHRg5m.mjs → native-runtime-DBzRnEKS.mjs} +9 -5
  70. package/dist/{ndjson-CDY9IkVC.mjs → ndjson-PclOIwVY.mjs} +2 -2
  71. package/dist/offload-worker.d.mts +122 -0
  72. package/dist/offload-worker.mjs +606 -0
  73. package/dist/{ownership-DyYDF5ww.mjs → ownership-DiA16AsN.mjs} +3 -2
  74. package/dist/ownership-hCkPzGmr.mjs +571 -0
  75. package/dist/{page-BHUzTDFt.mjs → page-QF_Ke10s.mjs} +7 -2
  76. package/dist/{ports-BguS83ex.mjs → ports-R2k4Knz3.mjs} +3 -3
  77. package/dist/prebuild-D2fsca_Z.mjs +213 -0
  78. package/dist/preview-DhVbvPAZ.mjs +318 -0
  79. package/dist/process-identity-BmRm1qV0.mjs +12 -0
  80. package/dist/{project-CWlvEaeN.mjs → project-Du91Ilvc.mjs} +74 -19
  81. package/dist/pull-request-pxnDCQzn.mjs +322 -0
  82. package/dist/pull-requests.d.mts +120 -0
  83. package/dist/pull-requests.mjs +2 -0
  84. package/dist/recordings-BIXOzVnr.mjs +37 -0
  85. package/dist/{reload-BiniwsSZ.mjs → reload-rM9jV1fz.mjs} +109 -24
  86. package/dist/{remote-cache-CcR6o6lI.mjs → remote-cache-C8-V13XN.mjs} +5 -5
  87. package/dist/run-f4vI6EnK.mjs +119 -0
  88. package/dist/{server-bare-DGfgyJ5J.mjs → server-bare-CpPGmnmO.mjs} +33 -15
  89. package/dist/server-expo-CVqO2c35.mjs +2 -0
  90. package/dist/{server-expo-BVuwQ65v.mjs → server-expo-MC0rHlOC.mjs} +8 -12
  91. package/dist/settings-BBpMcDbD.mjs +25 -0
  92. package/dist/{settings-B-fsC-Om.mjs → settings-ZkDzkzvB.mjs} +22 -10
  93. package/dist/settings-oTSkkNrM.mjs +1439 -0
  94. package/dist/settings.schema.json +845 -97
  95. package/dist/{simslim-DrDN4WuV.mjs → simslim-B8-7AoTI.mjs} +8 -132
  96. package/dist/{slot-launch-D5t8EiMf.mjs → slot-launch-B8VrHxn1.mjs} +11 -8
  97. package/dist/{spawn-claims-Drw_o-Fb.mjs → spawn-claims-D0XfSe8u.mjs} +1 -1
  98. package/dist/spawn-entry-jw19m8Nl.mjs +17 -0
  99. package/dist/stage-CzaiwFsI.mjs +143 -0
  100. package/dist/start-CX8Ig-U2.mjs +2 -0
  101. package/dist/{start-s4RXp1wy.mjs → start-ClDfwXa4.mjs} +116 -65
  102. package/dist/state-3DwSQIBK.mjs +41 -0
  103. package/dist/state-B4PQFXMW.d.mts +12 -0
  104. package/dist/{state-Dk9RVXI7.mjs → state-C1jB7Q8q.mjs} +70 -8
  105. package/dist/{state-DHqvsbqC.mjs → state-DcW6vOd_.mjs} +7 -4
  106. package/dist/stats-CEZ_i5je.mjs +77 -0
  107. package/dist/{status-BgAuxESg.mjs → status-BuvBFeII.mjs} +118 -20
  108. package/dist/{status-BsPAnfOI.mjs → status-Cs7VLg9D.mjs} +542 -283
  109. package/dist/status-DlKvVJBE.mjs +49 -0
  110. package/dist/stdout-reader-C8yjre1x.mjs +23 -0
  111. package/dist/stim-desktop-Cnz8CPnl.mjs +63 -0
  112. package/dist/stim-footprint.swift +32 -0
  113. package/dist/{stim-installations-CINXy_su.mjs → stim-installations-QMEI32v1.mjs} +1 -1
  114. package/dist/stop-B0Yxtmiy.mjs +48 -0
  115. package/dist/{stop-BzreOWJp.mjs → stop-Bffozsac.mjs} +83 -16
  116. package/dist/{stop-BWIF_6BK.mjs → stop-Dt_dM16A.mjs} +2 -2
  117. package/dist/stop-cause-CidxIqup.mjs +97 -0
  118. package/dist/supervisor-run.d.mts +43 -11
  119. package/dist/supervisor-run.mjs +363 -24
  120. package/dist/support-CAP8qDUF.mjs +316 -0
  121. package/dist/support-D4aYJniO.mjs +201 -0
  122. package/dist/teardown-CL6vDs2Y.mjs +727 -0
  123. package/dist/{xcode-Cp5KvK9x.mjs → toolchain-DkUflduf.mjs} +364 -14
  124. package/dist/trigger-Bemu8ytw.mjs +65 -0
  125. package/dist/trigger-CXts6qt1.mjs +2 -0
  126. package/dist/warm-progress-CpGv3Wb6.mjs +732 -0
  127. package/dist/{web-BsQs1WlO.mjs → web-DWUaMp8P.mjs} +37 -21
  128. package/dist/web-run.mjs +310 -13
  129. package/dist/workspace-process-lock-BL7Q0HCO.mjs +57 -0
  130. package/dist/workspace-state-B8-aJ1_5.mjs +371 -0
  131. package/dist/workspaces-BV4pdHFz.mjs +306 -0
  132. package/dist/{worktree-UrQWXSeb.mjs → worktree-K-xj9Db0.mjs} +625 -256
  133. package/dist/worktree-jnG8Iph5.mjs +2 -0
  134. package/package.json +10 -5
  135. package/shim/bundle-response.cjs +28 -12
  136. package/dist/activity-CYVDcrt3.mjs +0 -356
  137. package/dist/budget-CGDkhvv_.mjs +0 -1745
  138. package/dist/build-progress-DxKpwnaS.mjs +0 -247
  139. package/dist/idle-DXtx3RbX.mjs +0 -191
  140. package/dist/in-use-DlqBDKqY.mjs +0 -249
  141. package/dist/logs-Civ4gbBH.mjs +0 -486
  142. package/dist/merge-state-ytFQCeh4.mjs +0 -262
  143. package/dist/server-expo-DIHDhvGg.mjs +0 -2
  144. package/dist/settings-D61iNOsB.mjs +0 -629
  145. package/dist/start-Cetfvy8l.mjs +0 -2
  146. package/dist/stats-CFpFGlJV.mjs +0 -62
  147. package/dist/stats-CX1Z8Tca.mjs +0 -368
  148. package/dist/stim-desktop-CXt8-Z3J.mjs +0 -40
  149. package/dist/stop-cause-hjGBOZTG.mjs +0 -1231
  150. package/dist/worktree-BVrHsYZG.mjs +0 -752
  151. package/dist/worktree-CHWWvm5v.mjs +0 -2
  152. package/dist/{metro-store-DzeWkfqW.mjs → metro-store-CDDZHtPl.mjs} +1 -1
@@ -1,262 +0,0 @@
1
- import { t as getExecutor } from "./exec-DK8KaVHK.mjs";
2
- import { statSync } from "node:fs";
3
- //#region src/workspace/merge-state.ts
4
- const FETCH_TIMEOUT_MS = 3e4;
5
- const FETCH_FRESH_MS = 6e5;
6
- const GIT_TIMEOUT_MS = 6e4;
7
- const REMOTE_PREFIX = "refs/remotes/origin/";
8
- function failure(error) {
9
- const { stderr, message } = error;
10
- const text = String(stderr ?? "").trim() || String(message ?? error);
11
- return text.split("\n")[0] ?? text;
12
- }
13
- function fetchedRecently(repo, now) {
14
- const path = getExecutor().runFileQuiet("git", [
15
- "-C",
16
- repo,
17
- "rev-parse",
18
- "--path-format=absolute",
19
- "--git-path",
20
- "FETCH_HEAD"
21
- ])?.trim();
22
- try {
23
- return Boolean(path) && now - statSync(path).mtimeMs < FETCH_FRESH_MS;
24
- } catch {
25
- return false;
26
- }
27
- }
28
- /**
29
- * Fetches the default branch that `origin/HEAD` names into its remote-tracking ref, bounded by a timeout and never
30
- * prompting for credentials. It skips the fetch when the checkout fetched anything in the last 10 minutes.
31
- */
32
- function fetchDefaultBranch(repo, now = Date.now()) {
33
- const exec = getExecutor();
34
- const ref = exec.runFileQuiet("git", [
35
- "-C",
36
- repo,
37
- "symbolic-ref",
38
- "--quiet",
39
- "refs/remotes/origin/HEAD"
40
- ])?.trim();
41
- if (!ref?.startsWith(REMOTE_PREFIX)) return { error: `origin/HEAD is not set; run \`git -C ${repo} remote set-head origin --auto\`` };
42
- const branch = ref.slice(20);
43
- if (fetchedRecently(repo, now)) return {
44
- ref,
45
- name: `origin/${branch}`
46
- };
47
- try {
48
- exec.runFile("git", [
49
- "-C",
50
- repo,
51
- "fetch",
52
- "--quiet",
53
- "--no-tags",
54
- "--no-recurse-submodules",
55
- "origin",
56
- `+refs/heads/${branch}:${ref}`
57
- ], {
58
- timeoutMs: FETCH_TIMEOUT_MS,
59
- env: { GIT_TERMINAL_PROMPT: "0" }
60
- });
61
- } catch (error) {
62
- return { error: `git fetch origin ${branch} failed: ${failure(error)}` };
63
- }
64
- return {
65
- ref,
66
- name: `origin/${branch}`
67
- };
68
- }
69
- function notMerged(detail) {
70
- return {
71
- merged: false,
72
- unknown: false,
73
- detail
74
- };
75
- }
76
- function currentBranch(path) {
77
- const ref = getExecutor().runFileQuiet("git", [
78
- "-C",
79
- path,
80
- "symbolic-ref",
81
- "--quiet",
82
- "HEAD"
83
- ])?.trim();
84
- return ref?.startsWith("refs/heads/") ? ref : null;
85
- }
86
- function upstreamGone(path, branch) {
87
- if (!branch) return false;
88
- const [upstream, state] = (getExecutor().runFileQuiet("git", [
89
- "-C",
90
- path,
91
- "for-each-ref",
92
- "--format=%(upstream)%00%(upstream:track)",
93
- branch
94
- ]) ?? "").trim().split("\0");
95
- return Boolean(upstream) && state === "[gone]";
96
- }
97
- function committedOn(path, branch, head) {
98
- if (!branch) return false;
99
- const exec = getExecutor();
100
- return (exec.runFileQuiet("git", [
101
- "-C",
102
- path,
103
- "reflog",
104
- "show",
105
- "--format=%H %gs",
106
- branch
107
- ]) ?? "").split("\n").some((entry) => {
108
- const [sha = "", ...subject] = entry.split(" ");
109
- return /^(commit|cherry-pick|rebase|revert)\b/.test(subject.join(" ")) && exec.runFileQuiet("git", [
110
- "-C",
111
- path,
112
- "merge-base",
113
- "--is-ancestor",
114
- sha,
115
- head
116
- ]) !== null;
117
- });
118
- }
119
- /**
120
- * Whether the worktree's HEAD is merged into `target`, and when: `mergedAt` is the committer date, in epoch
121
- * milliseconds, of the commit on `target` that brought the work in, the latest one for a rebase merge.
122
- * The signals, all local git:
123
- * - HEAD is an ancestor of the default branch, off its first-parent line, and the branch's reflog shows a commit made
124
- * on it that HEAD contains, so a merge commit brought the branch's own work in. A branch with no commit of its own
125
- * is not merged.
126
- * - The branch changes the tree, has no merge commits, and every commit since the merge base has the same
127
- * `git patch-id --verbatim` as a commit on the default branch (a rebase merge).
128
- * - The branch changes the tree and its whole diff since the merge base has the same verbatim patch id as a commit on
129
- * the default branch, limited to the files the branch changes (a squash merge).
130
- * Anything git cannot answer is unknown, never merged. `coversUnpushed` is true for a patch-equivalent HEAD whose
131
- * upstream branch was deleted: its commits exist only locally, but their change is on the default branch.
132
- */
133
- function mergeState(path, { ref, name }, { timeoutMs = GIT_TIMEOUT_MS } = {}) {
134
- const git = (args, input) => getExecutor().runFile("git", [
135
- "--literal-pathspecs",
136
- "-C",
137
- path,
138
- ...args
139
- ], {
140
- timeoutMs,
141
- input
142
- });
143
- const patch = (args) => getExecutor().runFile("git", [
144
- "--literal-pathspecs",
145
- "-C",
146
- path,
147
- ...args
148
- ], {
149
- timeoutMs,
150
- untrimmed: true
151
- });
152
- const patchIdCommits = (text) => new Map(text ? git(["patch-id", "--verbatim"], text).split("\n").flatMap((line) => {
153
- const [id, commit] = line.split(" ");
154
- return id && commit ? [[id, commit]] : [];
155
- }) : []);
156
- const patchIds = (text) => [...patchIdCommits(text).keys()];
157
- const committedAt = (commits) => {
158
- const times = commits.length ? git([
159
- "show",
160
- "-s",
161
- "--format=%ct",
162
- ...commits
163
- ]).split("\n").map(Number) : [];
164
- if (!times.length || !times.every(Number.isFinite)) throw new Error(`no committer date for ${commits.join(" ")}`);
165
- return Math.max(...times) * 1e3;
166
- };
167
- const diffOptions = ["--no-color", "--no-ext-diff"];
168
- const noOwnCommits = notMerged(`no commits of its own beyond ${name}`);
169
- try {
170
- const head = git([
171
- "rev-parse",
172
- "--verify",
173
- "HEAD^{commit}"
174
- ]);
175
- const base = git([
176
- "merge-base",
177
- head,
178
- ref
179
- ]);
180
- const branch = currentBranch(path);
181
- if (base === head) {
182
- if (git(["rev-parse", ref]) === head || git([
183
- "rev-list",
184
- "--first-parent",
185
- "--parents",
186
- `${head}..${ref}`
187
- ]).split("\n").some((line) => line.split(" ")[1] === head) || !committedOn(path, branch, head)) return noOwnCommits;
188
- const descendants = new Set(git([
189
- "rev-list",
190
- "--ancestry-path",
191
- `${head}..${ref}`
192
- ]).split("\n"));
193
- const landed = git([
194
- "rev-list",
195
- "--first-parent",
196
- "--reverse",
197
- `${head}..${ref}`
198
- ]).split("\n").find((commit) => descendants.has(commit));
199
- if (!landed) throw new Error(`no commit on ${name} merges ${head}`);
200
- return {
201
- merged: true,
202
- into: name,
203
- head,
204
- coversUnpushed: false,
205
- mergedAt: committedAt([landed])
206
- };
207
- }
208
- const files = git([
209
- "diff",
210
- "--name-only",
211
- "--no-renames",
212
- "-z",
213
- base,
214
- head
215
- ]).split("\0").filter(Boolean);
216
- if (!files.length) return notMerged(`no net change beyond ${name}`);
217
- const log = (range, pathspec = []) => patch([
218
- "log",
219
- "-p",
220
- "--no-merges",
221
- ...diffOptions,
222
- "--format=commit %H",
223
- range,
224
- "--",
225
- ...pathspec
226
- ]);
227
- const upstream = patchIdCommits(log(`${base}..${ref}`, files));
228
- const patchEquivalent = (ids) => ({
229
- merged: true,
230
- into: name,
231
- head,
232
- coversUnpushed: upstreamGone(path, branch),
233
- mergedAt: committedAt(ids.map((id) => upstream.get(id)))
234
- });
235
- const squash = patchIds(patch([
236
- "diff",
237
- ...diffOptions,
238
- base,
239
- head
240
- ]));
241
- if (squash.length === 1 && upstream.has(squash[0])) return patchEquivalent(squash);
242
- if (!git([
243
- "rev-list",
244
- "--merges",
245
- `${base}..${head}`
246
- ])) {
247
- const own = patchIds(log(`${base}..${head}`));
248
- if (own.length && own.every((id) => upstream.has(id))) return patchEquivalent(own);
249
- }
250
- return notMerged(`not merged into ${name}`);
251
- } catch (error) {
252
- const timedOut = error?.code === "ETIMEDOUT" ? { timedOut: true } : {};
253
- return {
254
- merged: false,
255
- unknown: true,
256
- detail: `merge state unknown: ${failure(error)}`,
257
- ...timedOut
258
- };
259
- }
260
- }
261
- //#endregion
262
- export { mergeState as n, fetchDefaultBranch as t };
@@ -1,2 +0,0 @@
1
- import { p as startExpoServer } from "./server-expo-BVuwQ65v.mjs";
2
- export { startExpoServer };