stim 1.33.0 → 1.34.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 (121) hide show
  1. package/dist/{acquire-artifact-DTh_LxrE.mjs → acquire-artifact-B0SWoVNt.mjs} +1 -1
  2. package/dist/{act-Cur4YKtK.mjs → act-7f7wIvCQ.mjs} +10 -10
  3. package/dist/{activity-C8kBq9w0.mjs → activity-DkS-Ir6V.mjs} +1 -1
  4. package/dist/{agent-device-usage-output-BTRaK_up.mjs → agent-device-usage-output-BVdgKbfz.mjs} +3 -3
  5. package/dist/{android-D5mCdVl2.mjs → android-BU4uBX8I.mjs} +5 -5
  6. package/dist/{android-BL-QqHjc.mjs → android-D7qjT2fq.mjs} +28 -28
  7. package/dist/{android-project-BDlPnfmL.d.mts → android-project-DhO6el8N.d.mts} +1 -1
  8. package/dist/api.d.mts +1 -1
  9. package/dist/api.mjs +21 -21
  10. package/dist/{artifact-BufzdGbT.mjs → artifact-CNnTZs3R.mjs} +10 -10
  11. package/dist/{artifact-BMjubIP2.mjs → artifact-DmRtKFXW.mjs} +10 -10
  12. package/dist/{auto-placement-D7P98glJ.mjs → auto-placement-DA65VQH7.mjs} +5 -5
  13. package/dist/{browser-web-C74et-Nv.mjs → browser-web-Dn_hgKZC.mjs} +5 -5
  14. package/dist/{build-DFBGWOTc.mjs → build-D7SuVoRX.mjs} +15 -15
  15. package/dist/build-artifact-cache-D7B6seMj.mjs +174 -0
  16. package/dist/build-artifact-cache.d.mts +25 -0
  17. package/dist/build-artifact-cache.mjs +2 -0
  18. package/dist/{build-plan-T3Hi24ax.mjs → build-plan-Ct1FiA3E.mjs} +4 -4
  19. package/dist/{ccache-BXtzEL6M.mjs → ccache-ChBMXlBq.mjs} +8 -50
  20. package/dist/{cli-B2YSjc9s.mjs → cli-DjdvQG5U.mjs} +17 -17
  21. package/dist/cli.mjs +1 -1
  22. package/dist/{client-0_Mnfz0a.mjs → client-kU37gURU.mjs} +45 -8
  23. package/dist/{command-output-DWI9tGPU.mjs → command-output-DjExb_tZ.mjs} +1 -1
  24. package/dist/{dependencies-CgvBZbXD.mjs → dependencies-CZ7c8XX_.mjs} +29 -29
  25. package/dist/{dev-client-ChsHwgrn.mjs → dev-client-D3wOllNd.mjs} +2 -2
  26. package/dist/{device-B0htCt2u.mjs → device-CWPFAqs0.mjs} +8 -8
  27. package/dist/{device-DOehZpyx.mjs → device-DH5yf6TU.mjs} +6 -6
  28. package/dist/{device-android-B8TQP5AX.mjs → device-android-ChfF5I9A.mjs} +3 -3
  29. package/dist/{device-capacity-BAkETfIl.mjs → device-capacity-CHC3dKWg.mjs} +3 -3
  30. package/dist/device-host-worker.mjs +7 -7
  31. package/dist/{device-ios-DFaYFdar.mjs → device-ios-B3-Ah--R.mjs} +3 -3
  32. package/dist/{device-lease-run-DpiCnRbZ.mjs → device-lease-run-i3FNX4OE.mjs} +3 -3
  33. package/dist/{device-pool-DP4sCeCC.mjs → device-pool-EZziQ0uS.mjs} +2 -2
  34. package/dist/{device-provision-CnNOIxCF.mjs → device-provision-CfpEy-Vm.mjs} +7 -7
  35. package/dist/{doctor-9GrW5YSP.mjs → doctor-B5uEZiKp.mjs} +11 -11
  36. package/dist/{doctor-C6Xn96RS.mjs → doctor-CGBsS_68.mjs} +1 -1
  37. package/dist/{doctor-nRLBoajo.mjs → doctor-dwRboaXx.mjs} +11 -11
  38. package/dist/{doctor-watchman-CDhpC3Oh.mjs → doctor-watchman-r7M9UPi0.mjs} +2 -2
  39. package/dist/{eas-build-CpJ4h9tG.mjs → eas-build-BpHIt_M3.mjs} +2 -2
  40. package/dist/{eas-fallback-B3z5nL1g.mjs → eas-fallback-CNPcjq3K.mjs} +2 -2
  41. package/dist/{eas-session-ledger-Bspy-VJQ.mjs → eas-session-ledger-CXwagcQ7.mjs} +1 -1
  42. package/dist/{error-diagnostics-DoLGklYX.mjs → error-diagnostics-Ym2mjmJ0.mjs} +3 -3
  43. package/dist/{gc-BWoOp9q7.mjs → gc-B464w_a5.mjs} +2 -2
  44. package/dist/{gc-DolXpMSB.mjs → gc-C7YxKNci.mjs} +10 -10
  45. package/dist/{guide-CmZB0GtP.mjs → guide-BFW-cB7R.mjs} +8 -6
  46. package/dist/{hosted-android-ByG-ICuh.mjs → hosted-android-B7yfqXEy.mjs} +2 -2
  47. package/dist/{hosted-client-D19Lv0tg.mjs → hosted-client-CQuzZwAu.mjs} +2 -2
  48. package/dist/{hosted-logs-D7anR6Dk.mjs → hosted-logs-DfYCqrrR.mjs} +2 -2
  49. package/dist/{hosted-logs-sync-D182b1eJ.mjs → hosted-logs-sync-Dlpa2mQF.mjs} +4 -4
  50. package/dist/{hosted-macos-D0DDQxvl.mjs → hosted-macos-JKefapEm.mjs} +4 -4
  51. package/dist/{hosted-native-BzXIy97W.mjs → hosted-native-B7OFt5gB.mjs} +4 -4
  52. package/dist/{idle-shutdown-6i8CHoNq.mjs → idle-shutdown-DPD8oV36.mjs} +3 -3
  53. package/dist/{ios-dbXzjTxx.mjs → ios-DSBs9c6d.mjs} +21 -21
  54. package/dist/{ios-device-DXbHZfFe.mjs → ios-device-Drplrgzo.mjs} +1 -1
  55. package/dist/{ios-project-BzfLigfh.mjs → ios-project-DoTQYghg.mjs} +5 -5
  56. package/dist/{ios-AdhPKXO3.mjs → ios-sUPbWqEh.mjs} +8 -8
  57. package/dist/ios-signing-R34vbrNU.mjs +202 -0
  58. package/dist/{js-swap-EDVOJmqx.mjs → js-swap-DrokhOfo.mjs} +3 -3
  59. package/dist/{launch-CKHpthsw.mjs → launch-Cy-MWEZc.mjs} +12 -12
  60. package/dist/{lightened-Cv4ToJRX.mjs → lightened-ALwQcQtV.mjs} +2 -2
  61. package/dist/{logs-DCQ3_tGS.mjs → logs-DWT7jGpF.mjs} +3 -3
  62. package/dist/{logs-IagR9dWI.mjs → logs-DuED-01Z.mjs} +5 -5
  63. package/dist/{macos-Ch7vuM-G.mjs → macos-CtBtA_hW.mjs} +14 -14
  64. package/dist/{macos-pc0aVVbN.mjs → macos-kWGcfLzx.mjs} +1 -1
  65. package/dist/maintenance-run.mjs +3 -3
  66. package/dist/{native-android-B3CEDq4R.mjs → native-android-tISP2EVp.mjs} +10 -10
  67. package/dist/{native-gradle-artifact-inputs-BLnO2hHR.mjs → native-gradle-artifact-inputs-DVoeZkrw.mjs} +1 -1
  68. package/dist/{native-runtime-e1OU8gEN.mjs → native-runtime-CNgxeOCG.mjs} +3 -3
  69. package/dist/{native-xcode-inputs-DL3ETb8s.mjs → native-xcode-inputs-DGzkhpu4.mjs} +1 -1
  70. package/dist/{native-xcode-ios-D4e8k2Jy.mjs → native-xcode-ios-B9nsfId2.mjs} +12 -12
  71. package/dist/offload-worker.d.mts +6 -1
  72. package/dist/offload-worker.mjs +38 -13
  73. package/dist/{phone-reverses-rvyxW1Fl.mjs → phone-reverses-Bo0EzJ-P.mjs} +1 -1
  74. package/dist/{placement-log-nnGnu8mo.mjs → placement-log-BsGvKLtU.mjs} +1 -1
  75. package/dist/{plan-placement-D3JD-T-K.mjs → plan-placement-Am0IjuxB.mjs} +4 -4
  76. package/dist/{ports-CZJJfJ8Q.mjs → ports-CNzg1LYD.mjs} +1 -1
  77. package/dist/{prebuild-Bhs7TTcz.mjs → prebuild-BfJII57G.mjs} +5 -5
  78. package/dist/{project-DWEXiBA9.mjs → project-DU3jjnBE.mjs} +11 -11
  79. package/dist/{react-native-android-C6Y270GS.mjs → react-native-android-3dZiJv-4.mjs} +17 -17
  80. package/dist/{react-native-build-DaPfzf_e.mjs → react-native-build-CuvNPt-q.mjs} +4 -4
  81. package/dist/{react-native-doctor-DGMPxkPS.mjs → react-native-doctor-a35BwMUO.mjs} +4 -4
  82. package/dist/{react-native-ios-dX48_92n.mjs → react-native-ios-CqnReM1t.mjs} +13 -12
  83. package/dist/{reload-DsOByDfy.mjs → reload-CC3sNo10.mjs} +6 -6
  84. package/dist/{reload-BGwblBJ9.mjs → reload-YPnvXGlB.mjs} +1 -1
  85. package/dist/{remote-D0uJZ76R.mjs → remote-BfaIHnhM.mjs} +6 -6
  86. package/dist/{result-DuimMZKJ.mjs → result-H-AxY7Ud.mjs} +10 -10
  87. package/dist/{selection-xS50Mt0V.mjs → selection-CH-MUVGD.mjs} +1 -1
  88. package/dist/{server-command-BC0EgMfY.mjs → server-command-Bn_gOObU.mjs} +2 -2
  89. package/dist/server-expo-B59N16uT.mjs +2 -0
  90. package/dist/{server-expo-15RjL0ir.mjs → server-expo-CUJ2fuv1.mjs} +1 -1
  91. package/dist/{settings-CuP55ieT.mjs → settings-DoWHJopy.mjs} +2 -2
  92. package/dist/{settings-payload-BIGGQ3or.mjs → settings-payload-Bxw3hid5.mjs} +1 -1
  93. package/dist/{settings-write-D85j8mej.mjs → settings-write-C6d7EC54.mjs} +2 -2
  94. package/dist/{slot-launch-D4oREwhx.mjs → slot-launch-kq0-7w9C.mjs} +2 -2
  95. package/dist/{stage-DKC6tDXu.mjs → stage-CBfMTUK3.mjs} +1 -1
  96. package/dist/{start-DfPSLc__.mjs → start-Diu8q6_U.mjs} +1 -1
  97. package/dist/{start-BsEV4S-s.mjs → start-WTMumMHi.mjs} +5 -5
  98. package/dist/{stats-ByEUblPr.mjs → stats-D4cW247z.mjs} +3 -3
  99. package/dist/{status-FP1MH9qn.mjs → status-B-oeWS0Z.mjs} +1 -1
  100. package/dist/{status-C6hLlDqW.mjs → status-CEwxo-PS.mjs} +12 -12
  101. package/dist/{status-watch-D8s823CZ.mjs → status-watch-D63R5nSI.mjs} +1 -1
  102. package/dist/status-worker.mjs +1 -1
  103. package/dist/{stop-5LKfVv-0.mjs → stop-Dm9ON6Os.mjs} +2 -2
  104. package/dist/{stop-CpTy6bod.mjs → stop-HL2RvhrE.mjs} +2 -2
  105. package/dist/{stop-BVI2-L7s.mjs → stop-vX4w3_8V.mjs} +9 -9
  106. package/dist/supervisor-run.mjs +8 -8
  107. package/dist/{support-CqyWfZZI.mjs → support-BNe1_Hg7.mjs} +3 -3
  108. package/dist/{support-D8OH0z98.mjs → support-ivsfDj0v.mjs} +6 -6
  109. package/dist/{swiftpm-macos-BuhqYB3n.mjs → swiftpm-macos-ClF203_2.mjs} +2 -2
  110. package/dist/{toolchain-D_jotUG7.mjs → toolchain-CECahBDa.mjs} +1 -1
  111. package/dist/{toolchain-s5ZmG42Z.mjs → toolchain-CYonNjd_.mjs} +406 -8
  112. package/dist/{web-DwYCTFdh.mjs → web-BdaMBr2O.mjs} +3 -3
  113. package/dist/web-CIpHpGp8.mjs +2 -0
  114. package/dist/web-run.mjs +1 -1
  115. package/dist/{workspaces-B3ahAHZc.mjs → workspaces-B9v5V7Es.mjs} +2 -2
  116. package/dist/{worktree-BhsML6GV.mjs → worktree-C3N86KpI.mjs} +10 -10
  117. package/dist/{worktree-CrjsPIs2.mjs → worktree-C4MBOMz7.mjs} +1 -1
  118. package/package.json +12 -7
  119. package/dist/ios-signing-D-tSX1iF.mjs +0 -489
  120. package/dist/server-expo-gYIypb0-.mjs +0 -2
  121. package/dist/web-cCfM8kwV.mjs +0 -2
@@ -0,0 +1,202 @@
1
+ import { d as throwIfCancelled, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
+ import { a as killOnAbort, r as childEnvironment } from "./operation-exec-DKlBcKAL.mjs";
3
+ import { at as profileGate, it as parseSigningIdentities, ot as signingGate, rt as parseProvisioningProfilePlist, tt as SIGNING_CODES } from "./toolchain-CYonNjd_.mjs";
4
+ import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
5
+ import { tmpdir } from "node:os";
6
+ import { join } from "node:path";
7
+ //#region src/engine/ios-signing.ts
8
+ const EMBEDDED_PROFILE = "embedded.mobileprovision";
9
+ const SIGNING_TIMEOUT_MS = 12e4;
10
+ function lastLines(text, count = 5) {
11
+ return String(text ?? "").split(/\r?\n/).map((line) => line.trimEnd()).filter((line) => line.trim() !== "").slice(-count);
12
+ }
13
+ function errorText(error) {
14
+ const withOutput = error;
15
+ const stderr = String(withOutput?.stderr ?? "").trim();
16
+ const stdout = String(withOutput?.stdout ?? "").trim();
17
+ return stderr || stdout || String(withOutput?.message ?? error);
18
+ }
19
+ async function signingCommand(file, args, { exec, env, signal }) {
20
+ throwIfCancelled(signal, "iOS signing");
21
+ try {
22
+ const output = await (exec || getExecutor()).runFileAsync(file, args, {
23
+ timeoutMs: SIGNING_TIMEOUT_MS,
24
+ ...env ? childEnvironment(env) : {},
25
+ onSpawn: killOnAbort(signal)
26
+ });
27
+ throwIfCancelled(signal, "iOS signing");
28
+ return output;
29
+ } catch (error) {
30
+ throwIfCancelled(signal, "iOS signing");
31
+ throw error;
32
+ }
33
+ }
34
+ async function readEmbeddedProfile(appPath, options = {}) {
35
+ throwIfCancelled(options.signal, "iOS signing");
36
+ const path = join(appPath, EMBEDDED_PROFILE);
37
+ if (!existsSync(path)) return {
38
+ present: false,
39
+ profile: null
40
+ };
41
+ const plist = await decodeProvisioningProfile(path, options);
42
+ return {
43
+ present: true,
44
+ profile: plist === null ? null : parseProvisioningProfilePlist(plist)
45
+ };
46
+ }
47
+ async function decodeProvisioningProfile(path, options = {}) {
48
+ try {
49
+ return await signingCommand("/usr/bin/openssl", [
50
+ "smime",
51
+ "-verify",
52
+ "-noverify",
53
+ "-inform",
54
+ "DER",
55
+ "-in",
56
+ path
57
+ ], options);
58
+ } catch {
59
+ throwIfCancelled(options.signal, "iOS signing");
60
+ return null;
61
+ }
62
+ }
63
+ async function findSigningIdentities(options = {}) {
64
+ return await probeSigningIdentities(options) ?? [];
65
+ }
66
+ /** The keychain's code signing identities, or null when `security find-identity` itself failed. */
67
+ async function probeSigningIdentities(options = {}) {
68
+ try {
69
+ return parseSigningIdentities(await signingCommand("security", [
70
+ "find-identity",
71
+ "-v",
72
+ "-p",
73
+ "codesigning"
74
+ ], options));
75
+ } catch {
76
+ throwIfCancelled(options.signal, "iOS signing");
77
+ return null;
78
+ }
79
+ }
80
+ async function gateProfileForDevice(options) {
81
+ const read = await readEmbeddedProfile(options.appPath, options);
82
+ return profileGate({
83
+ profilePresent: read.present,
84
+ profile: read.profile,
85
+ identities: [],
86
+ udid: options.udid,
87
+ configuration: options.configuration ?? null,
88
+ ...options.now === void 0 ? {} : { now: options.now }
89
+ });
90
+ }
91
+ async function gateAppForDevice(options) {
92
+ const read = await readEmbeddedProfile(options.appPath, options);
93
+ return signingGate({
94
+ profilePresent: read.present,
95
+ profile: read.profile,
96
+ identities: read.present ? await findSigningIdentities(options) : [],
97
+ udid: options.udid,
98
+ configuration: options.configuration ?? null,
99
+ pinnedName: options.pinnedName ?? null,
100
+ pinnedSha1: options.pinnedSha1 ?? null,
101
+ ...options.now === void 0 ? {} : { now: options.now }
102
+ });
103
+ }
104
+ async function extractEntitlements(appPath, options) {
105
+ try {
106
+ return String(await signingCommand("codesign", [
107
+ "-d",
108
+ "--entitlements",
109
+ "-",
110
+ "--xml",
111
+ appPath
112
+ ], options)).trim();
113
+ } catch {
114
+ throwIfCancelled(options.signal, "iOS signing");
115
+ return "";
116
+ }
117
+ }
118
+ async function resealBundle({ appPath, identity, ...options }) {
119
+ const signAs = identity.sha1 || identity.name;
120
+ let mode = "preserve-metadata";
121
+ let preserveError = null;
122
+ try {
123
+ await signingCommand("codesign", [
124
+ "--force",
125
+ "--sign",
126
+ signAs,
127
+ "--preserve-metadata=identifier,entitlements,flags,runtime",
128
+ appPath
129
+ ], options);
130
+ } catch (error) {
131
+ throwIfCancelled(options.signal, "iOS signing");
132
+ preserveError = error;
133
+ }
134
+ let tempDir = null;
135
+ if (preserveError) {
136
+ const entitlements = await extractEntitlements(appPath, options);
137
+ const args = [
138
+ "--force",
139
+ "--sign",
140
+ signAs
141
+ ];
142
+ if (entitlements !== "") {
143
+ tempDir = mkdtempSync(join(tmpdir(), "stim-entitlements-"));
144
+ const plist = join(tempDir, "entitlements.plist");
145
+ writeFileSync(plist, `${entitlements}\n`, "utf-8");
146
+ args.push("--entitlements", plist);
147
+ mode = "entitlements";
148
+ } else mode = "no-entitlements";
149
+ args.push(appPath);
150
+ try {
151
+ await signingCommand("codesign", args, options);
152
+ } catch (error) {
153
+ throwIfCancelled(options.signal, "iOS signing");
154
+ return {
155
+ ok: false,
156
+ code: SIGNING_CODES.codesignFailed,
157
+ reason: `codesign could not re-seal ${appPath} with "${identity.name}": ${errorText(error)}`,
158
+ remedy: `Unlock the login keychain (\`security unlock-keychain\`) and confirm exactly one identity matches "${identity.name}".`,
159
+ lastLines: [...lastLines(errorText(preserveError)), ...lastLines(errorText(error))]
160
+ };
161
+ } finally {
162
+ if (tempDir) rmSync(tempDir, {
163
+ recursive: true,
164
+ force: true
165
+ });
166
+ }
167
+ }
168
+ try {
169
+ await signingCommand("codesign", [
170
+ "--verify",
171
+ "--strict",
172
+ appPath
173
+ ], options);
174
+ } catch (error) {
175
+ throwIfCancelled(options.signal, "iOS signing");
176
+ return {
177
+ ok: false,
178
+ code: SIGNING_CODES.codesignFailed,
179
+ reason: `codesign --verify --strict rejected ${appPath} after re-sealing it with "${identity.name}": ${errorText(error)}`,
180
+ remedy: "The bundle signed but did not seal. Delete the cached artifact with `stim gc --delete` and build fresh, then retry.",
181
+ lastLines: lastLines(errorText(error))
182
+ };
183
+ }
184
+ return {
185
+ ok: true,
186
+ identity,
187
+ mode
188
+ };
189
+ }
190
+ async function sealAppForDevice(options) {
191
+ const gate = await gateAppForDevice(options);
192
+ if (!gate.ok) return {
193
+ ...gate,
194
+ lastLines: []
195
+ };
196
+ return resealBundle({
197
+ ...options,
198
+ identity: gate.identity
199
+ });
200
+ }
201
+ //#endregion
202
+ export { sealAppForDevice as a, probeSigningIdentities as i, findSigningIdentities as n, gateProfileForDevice as r, decodeProvisioningProfile as t };
@@ -2,9 +2,9 @@ import { C as operationState, b as spawnDeclared, d as throwIfCancelled, t as ge
2
2
  import { r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
3
3
  import { a as killOnAbort, t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
4
4
  import { an as makeTemporaryDirectory, on as removeTemporaryEntry } from "./settings-B5IBDfTx.mjs";
5
- import { Bn as bundleInvocation } from "./ccache-BXtzEL6M.mjs";
6
- import { K as tailLines, M as HEARTBEAT_INTERVAL_MS, W as startBuildHeartbeat } from "./toolchain-s5ZmG42Z.mjs";
7
- import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-15RjL0ir.mjs";
5
+ import { Ln as bundleInvocation } from "./ccache-ChBMXlBq.mjs";
6
+ import { K as tailLines, M as HEARTBEAT_INTERVAL_MS, W as startBuildHeartbeat } from "./toolchain-CYonNjd_.mjs";
7
+ import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-CUJ2fuv1.mjs";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { basename, join } from "node:path";
@@ -1,24 +1,24 @@
1
1
  import { w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
2
  import { k as workspaceLogsDir } 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";
3
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DjExb_tZ.mjs";
4
4
  import { D as upsertProject, T as setDevice, dt as deviceSlotKey, ft as deviceSlotPlatforms, k as withConfigLockAsync, rt as formatBytes, ut as deviceSlotFileKey, v as loadConfig, w as saveConfig } from "./config-BW0fAtoK.mjs";
5
- import { L as workspaceDevServerMode } from "./project-DWEXiBA9.mjs";
5
+ import { L as workspaceDevServerMode } from "./project-DU3jjnBE.mjs";
6
6
  import { o as workspaceLinks } from "./stim-desktop-_WTria-r.mjs";
7
7
  import { ct as trimAndroidCaches, i as androidDataFreeBytes, rt as resetAdoptedAvd, u as androidToolCwd } from "./android-Iq0M2t2d.mjs";
8
8
  import { c as pidExists, f as signalProcessTree } from "./metro-B5PVz0Wv.mjs";
9
- import { Bt as RELEASE_VERIFY_WAIT_MS, Gt as unattributedLaunchLines, It as LAUNCH_BUNDLING, Kt as unverifiedLaunchLines, Lt as LAUNCH_FATAL, Rt as LAUNCH_UNVERIFIED, Vt as VERIFY_TIMEOUT_MS, Zt as ADB_INSTALL_TIMEOUT_MS, gn as restartedAppNote, nn as androidDevClientUrl, tn as androidAppProcess, un as installConflictKind } from "./ccache-BXtzEL6M.mjs";
10
- import { pt as teardownOwnedAvd } from "./workspaces-B3ahAHZc.mjs";
9
+ import { Bt as RELEASE_VERIFY_WAIT_MS, Gt as unattributedLaunchLines, It as LAUNCH_BUNDLING, Kt as unverifiedLaunchLines, Lt as LAUNCH_FATAL, Rt as LAUNCH_UNVERIFIED, Vt as VERIFY_TIMEOUT_MS, Zt as ADB_INSTALL_TIMEOUT_MS, gn as restartedAppNote, nn as androidDevClientUrl, tn as androidAppProcess, un as installConflictKind } from "./ccache-ChBMXlBq.mjs";
10
+ import { pt as teardownOwnedAvd } from "./workspaces-B9v5V7Es.mjs";
11
11
  import { S as providerUploadOutcome } from "./build-cache-Cqj4FGnX.mjs";
12
- import { t as recordPhoneReverse } from "./phone-reverses-rvyxW1Fl.mjs";
12
+ import { t as recordPhoneReverse } from "./phone-reverses-Bo0EzJ-P.mjs";
13
13
  import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-hC7xvvxF.mjs";
14
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-D4oREwhx.mjs";
14
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-kq0-7w9C.mjs";
15
15
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
16
- import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-DpiCnRbZ.mjs";
17
- import { a as captureNativeCrashes, r as androidCrashClockOffset, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-DoLGklYX.mjs";
18
- import { f as settleFingerprintCheck } from "./prebuild-Bhs7TTcz.mjs";
19
- import { i as launchOutcomeRecord } from "./native-runtime-e1OU8gEN.mjs";
20
- import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-CqyWfZZI.mjs";
21
- import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-DuimMZKJ.mjs";
16
+ import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-i3FNX4OE.mjs";
17
+ import { a as captureNativeCrashes, r as androidCrashClockOffset, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-Ym2mjmJ0.mjs";
18
+ import { f as settleFingerprintCheck } from "./prebuild-BfJII57G.mjs";
19
+ import { i as launchOutcomeRecord } from "./native-runtime-CNgxeOCG.mjs";
20
+ import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-BNe1_Hg7.mjs";
21
+ import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-H-AxY7Ud.mjs";
22
22
  import { mkdirSync, openSync, statSync } from "node:fs";
23
23
  import { basename, join } from "node:path";
24
24
  import { ambientEnv } from "@stim-cli/core";
@@ -1,9 +1,9 @@
1
1
  import { f as WorkspaceProcessCleanupError } from "./exec-CGuDzt40.mjs";
2
2
  import { c as withWorkspaceStateLock } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
3
+ import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
4
  import { Jt as warmWorktreePaths, Lt as podsOutOfSync, Q as resolveSettings, Rt as readWorktreeExclude, kt as listCarryableIgnoredEntries, vt as depsOutOfSync } from "./settings-B5IBDfTx.mjs";
5
5
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
6
- import { m as warmWorktreeTarget } from "./worktree-BhsML6GV.mjs";
6
+ import { m as warmWorktreeTarget } from "./worktree-C3N86KpI.mjs";
7
7
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
8
8
  import { basename, dirname, join, relative } from "node:path";
9
9
  import { isJsonObject, readJsonObject, workspaceLightenedFile, workspaceMetadataFile } from "@stim-cli/core/state";
@@ -1,9 +1,9 @@
1
1
  import { T as process_identity_exports } from "./exec-CGuDzt40.mjs";
2
2
  import { k as workspaceLogsDir$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
3
  import { ht as projectDeviceSlots, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
4
- import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-C8kBq9w0.mjs";
5
- import { o as captureWorkspaceCrashes } from "./error-diagnostics-DoLGklYX.mjs";
6
- import { n as followHostedLogs, r as syncHostedLogs } from "./hosted-logs-sync-D182b1eJ.mjs";
4
+ import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-DkS-Ir6V.mjs";
5
+ import { o as captureWorkspaceCrashes } from "./error-diagnostics-Ym2mjmJ0.mjs";
6
+ import { n as followHostedLogs, r as syncHostedLogs } from "./hosted-logs-sync-Dlpa2mQF.mjs";
7
7
  import { readdirSync, statSync, watch } from "node:fs";
8
8
  import { homedir } from "node:os";
9
9
  import { dirname, join, relative, resolve, sep } from "node:path";
@@ -1,11 +1,11 @@
1
1
  import { i as recordWorkspaceUse, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
2
- import { f as refuseNoProject, v as launchErrorPreview } from "./command-output-DWI9tGPU.mjs";
2
+ import { f as refuseNoProject, v as launchErrorPreview } from "./command-output-DjExb_tZ.mjs";
3
3
  import { _ as isPathPrefix$1, mt as parseDeviceSlotOption, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
4
- import { n as findCommandWorkspace } from "./project-DWEXiBA9.mjs";
4
+ import { n as findCommandWorkspace } from "./project-DU3jjnBE.mjs";
5
5
  import { n as SOURCES$1, t as LEVELS$1 } from "./ndjson-CrjIsGzw.mjs";
6
- import { i as followAgentActions, n as openWorkspaceLogs } from "./logs-DCQ3_tGS.mjs";
7
- import { t as errorDiagnostics } from "./error-diagnostics-DoLGklYX.mjs";
8
- import { n as followHostedLogs } from "./hosted-logs-sync-D182b1eJ.mjs";
6
+ import { i as followAgentActions, n as openWorkspaceLogs } from "./logs-DWT7jGpF.mjs";
7
+ import { t as errorDiagnostics } from "./error-diagnostics-Ym2mjmJ0.mjs";
8
+ import { n as followHostedLogs } from "./hosted-logs-sync-Dlpa2mQF.mjs";
9
9
  import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
10
10
  import { realpathSync } from "node:fs";
11
11
  import { relative, sep } from "node:path";
@@ -1,24 +1,24 @@
1
1
  import { b as spawnDeclared, d as throwIfCancelled, p as withWorkspaceProcessLock, t as getExecutor, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
2
  import { E as workspaceDir, a as recordWorkspaceUseAsync, f as writeWorkspaceStateAsync, k as workspaceLogsDir$1, v as ensureWorkspaceStorageAsync, w as workspaceAgentDeviceDir } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
3
+ import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
4
  import { D as upsertProject, k as withConfigLockAsync$1, u as getConcurrencyLimits } from "./config-BW0fAtoK.mjs";
5
5
  import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, it as settingValueAt, rt as settingShapeErrors } from "./settings-B5IBDfTx.mjs";
6
- import { f as projectRegistry, i as findProjectRoot$1, s as ownedDeviceLabel } from "./project-DWEXiBA9.mjs";
6
+ import { f as projectRegistry, i as findProjectRoot$1, s as ownedDeviceLabel } from "./project-DU3jjnBE.mjs";
7
7
  import { i as macosProcess, n as macosDir, o as requiredMacosRecord, r as macosLogFile } from "./state-DSOUqO-o.mjs";
8
8
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
9
- import { En as runProcessOperation, Tn as processContext } from "./ccache-BXtzEL6M.mjs";
10
- import { $ as tapBuildLog, H as NO_BUILD_PROGRESS, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, Y as recordBuildPhase, tt as errorRemedy } from "./workspaces-B3ahAHZc.mjs";
11
- import { ct as withNativeBuildRun, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
9
+ import { Cn as runProcessOperation, Sn as processContext } from "./ccache-ChBMXlBq.mjs";
10
+ import { $ as tapBuildLog, H as NO_BUILD_PROGRESS, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, Y as recordBuildPhase, tt as errorRemedy } from "./workspaces-B9v5V7Es.mjs";
11
+ import { _t as runCancellationSignal, vt as withNativeBuildRun } from "./toolchain-CYonNjd_.mjs";
12
12
  import { O as sanitizeDeviceLabel } from "./ios-BdZdNsAj.mjs";
13
- import { S as setRemoteLogSink, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-0_Mnfz0a.mjs";
14
- import { d as resolveBuildPlacement, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, s as parseBuildMachineOption, t as OffloadRefusal } from "./selection-xS50Mt0V.mjs";
15
- import { u as connectHost } from "./hosted-client-D19Lv0tg.mjs";
16
- import { t as placeHostedMacos } from "./hosted-macos-D0DDQxvl.mjs";
17
- import { i as stopMacosAppHeld, t as stopBundleInstances } from "./stop-CpTy6bod.mjs";
13
+ import { C as setRemoteLogSink, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-kU37gURU.mjs";
14
+ import { d as resolveBuildPlacement, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, s as parseBuildMachineOption, t as OffloadRefusal } from "./selection-CH-MUVGD.mjs";
15
+ import { u as connectHost } from "./hosted-client-CQuzZwAu.mjs";
16
+ import { t as placeHostedMacos } from "./hosted-macos-JKefapEm.mjs";
17
+ import { i as stopMacosAppHeld, t as stopBundleInstances } from "./stop-HL2RvhrE.mjs";
18
18
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
19
- import { t as buildPlacementRecord } from "./placement-log-nnGnu8mo.mjs";
20
- import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-D7P98glJ.mjs";
21
- import { t as reidentifyBundle } from "./stage-DKC6tDXu.mjs";
19
+ import { t as buildPlacementRecord } from "./placement-log-BsGvKLtU.mjs";
20
+ import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-DA65VQH7.mjs";
21
+ import { t as reidentifyBundle } from "./stage-CBfMTUK3.mjs";
22
22
  import { t as validateMacosArtifactPlatform } from "./artifact-platform-DqCWUieN.mjs";
23
23
  import { t as waitForMacosRegistration } from "./registration-DKjJGQ6p.mjs";
24
24
  import { createHash, randomUUID } from "node:crypto";
@@ -344,7 +344,7 @@ async function planMacos(context, root, buildMachineFlag) {
344
344
  if (selected.failure) throw Object.assign(new Error(selected.failure.message), selected.failure);
345
345
  const macos = settings.macos;
346
346
  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" });
347
- const { swiftpmMacosProject } = await import("./swiftpm-macos-BuhqYB3n.mjs");
347
+ const { swiftpmMacosProject } = await import("./swiftpm-macos-ClF203_2.mjs");
348
348
  const recipe = await swiftpmMacosProject(root).prepare(context, settings);
349
349
  let identity = null;
350
350
  let cacheHit = false;
@@ -1,2 +1,2 @@
1
- import { n as runMacos, r as waitForLaunchServices, t as macosCommand } from "./macos-Ch7vuM-G.mjs";
1
+ import { n as runMacos, r as waitForLaunchServices, t as macosCommand } from "./macos-CtBtA_hW.mjs";
2
2
  export { macosCommand as default, runMacos, waitForLaunchServices };
@@ -1,10 +1,10 @@
1
1
  import { rt as formatBytes } from "./config-BW0fAtoK.mjs";
2
- import { A as diskPressureLevel, I as maintenanceItem, L as openGcLog, M as levelStillShort, N as lowestFree, R as maintenanceLogger, _ as resolveBudget, j as levelFloors, mt as deviceSweepIsScoped } from "./ccache-BXtzEL6M.mjs";
2
+ import { A as diskPressureLevel, I as maintenanceItem, L as openGcLog, M as levelStillShort, N as lowestFree, R as maintenanceLogger, _ as resolveBudget, j as levelFloors, mt as deviceSweepIsScoped } from "./ccache-ChBMXlBq.mjs";
3
3
  import { I as memoryCulpritsUnder, V as memoryCulpritAdvice } from "./ios-BdZdNsAj.mjs";
4
4
  import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
5
- import { C as sizeScanDeferred, S as measureSizes, b as measurePressure, v as measureDisk } from "./worktree-BhsML6GV.mjs";
5
+ import { C as sizeScanDeferred, S as measureSizes, b as measurePressure, v as measureDisk } from "./worktree-C3N86KpI.mjs";
6
6
  import { t as relaunchWithLogFile } from "./detached-entry-tfrgGVWb.mjs";
7
- import { i as plannedMaintenance, n as diskRecovered, o as triggeringRoot, r as executeAction, v as measureOwnedDevices } from "./act-Cur4YKtK.mjs";
7
+ import { i as plannedMaintenance, n as diskRecovered, o as triggeringRoot, r as executeAction, v as measureOwnedDevices } from "./act-7f7wIvCQ.mjs";
8
8
  import { r as due, t as capChildLog } from "./attempt-ClyJlZPT.mjs";
9
9
  import { releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
10
10
  import { randomBytes } from "node:crypto";
@@ -3,19 +3,19 @@ import { E as workspaceDir, y as sharedBuildCache } from "./workspace-state-BdZ-
3
3
  import { _t as validateDeviceSlot, ft as deviceSlotPlatforms, m as getProject } from "./config-BW0fAtoK.mjs";
4
4
  import { it as settingValueAt } from "./settings-B5IBDfTx.mjs";
5
5
  import { H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, O as findBuildTool, U as ownedAvdDirectory, l as androidSystemImageAbi, o as androidHome, z as listInstalledSystemImages } from "./android-Iq0M2t2d.mjs";
6
- import { s as resolveCcache } from "./ccache-BXtzEL6M.mjs";
6
+ import { s as resolveCcache } from "./ccache-ChBMXlBq.mjs";
7
7
  import { r as register } from "./cache-manifest-8JX9S1QJ.mjs";
8
- import { lt as statsProjectKey } from "./workspaces-B3ahAHZc.mjs";
9
- import { r as androidToolchainAsync, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
8
+ import { lt as statsProjectKey } from "./workspaces-B9v5V7Es.mjs";
9
+ import { _t as runCancellationSignal, r as androidToolchainAsync } from "./toolchain-CYonNjd_.mjs";
10
10
  import { c as entryDir, t as artifactIn, w as resolveBuild } from "./build-cache-Cqj4FGnX.mjs";
11
- import { h as gradleOffloadInputs, y as nativeGradleTransfer } from "./client-0_Mnfz0a.mjs";
12
- import { d as buildGradle, l as androidSdkRefusal } from "./react-native-build-DaPfzf_e.mjs";
11
+ import { b as nativeGradleTransfer, g as gradleOffloadInputs } from "./client-kU37gURU.mjs";
12
+ import { d as buildGradle, l as androidSdkRefusal } from "./react-native-build-CuvNPt-q.mjs";
13
13
  import { n as decideSystemImage, t as androidImageInstallPolicy } from "./android-image-DFk26aY6.mjs";
14
- import { s as explainBuildMiss, u as skippedMissReason } from "./prebuild-Bhs7TTcz.mjs";
15
- import { u as resolveAndroidRunPlan } from "./result-DuimMZKJ.mjs";
16
- import { n as androidProcessRuntime } from "./launch-CKHpthsw.mjs";
17
- import { n as planFlagRefusal, r as planPayload } from "./build-plan-T3Hi24ax.mjs";
18
- import { a as nativeGradleWorkerArtifactIdentity, n as gradleArtifactInputs, r as nativeGradleArtifactSnapshot, t as NATIVE_GRADLE_CACHE_LIMIT } from "./native-gradle-artifact-inputs-BLnO2hHR.mjs";
14
+ import { s as explainBuildMiss, u as skippedMissReason } from "./prebuild-BfJII57G.mjs";
15
+ import { u as resolveAndroidRunPlan } from "./result-H-AxY7Ud.mjs";
16
+ import { n as androidProcessRuntime } from "./launch-Cy-MWEZc.mjs";
17
+ import { n as planFlagRefusal, r as planPayload } from "./build-plan-Ct1FiA3E.mjs";
18
+ import { a as nativeGradleWorkerArtifactIdentity, n as gradleArtifactInputs, r as nativeGradleArtifactSnapshot, t as NATIVE_GRADLE_CACHE_LIMIT } from "./native-gradle-artifact-inputs-DVoeZkrw.mjs";
19
19
  import { createHash } from "node:crypto";
20
20
  import { createReadStream, createWriteStream, existsSync, readFileSync, statSync } from "node:fs";
21
21
  import { tmpdir } from "node:os";
@@ -2,7 +2,7 @@ import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
2
  import { r as childEnvironment } from "./operation-exec-DKlBcKAL.mjs";
3
3
  import { o as androidHome } from "./android-Iq0M2t2d.mjs";
4
4
  import { n as buildCacheKey } from "./build-cache-Cqj4FGnX.mjs";
5
- import { _ as nativeGradleLocalSourceDigest, h as gradleOffloadInputs } from "./client-0_Mnfz0a.mjs";
5
+ import { g as gradleOffloadInputs, v as nativeGradleLocalSourceDigest } from "./client-kU37gURU.mjs";
6
6
  import { n as fingerprintNativeInputs } from "./native-inputs-TRTTTRxt.mjs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { homedir } from "node:os";
@@ -1,9 +1,9 @@
1
1
  import { r as readWorkspaceState$1, v as ensureWorkspaceStorageAsync } from "./workspace-state-BdZ-QgmB.mjs";
2
- import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
2
+ import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
3
3
  import { N as metroPortSetting } from "./settings-B5IBDfTx.mjs";
4
4
  import { d as resolveProjectMetro } from "./metro-B5PVz0Wv.mjs";
5
- import { It as LAUNCH_BUNDLING, Rt as LAUNCH_UNVERIFIED } from "./ccache-BXtzEL6M.mjs";
6
- import { c as startDevServer } from "./start-BsEV4S-s.mjs";
5
+ import { It as LAUNCH_BUNDLING, Rt as LAUNCH_UNVERIFIED } from "./ccache-ChBMXlBq.mjs";
6
+ import { c as startDevServer } from "./start-WTMumMHi.mjs";
7
7
  import { readIdleStop } from "@stim-cli/core/state";
8
8
  import chalk from "chalk";
9
9
  //#region src/commands/native-runtime.ts
@@ -1,6 +1,6 @@
1
1
  import { E as workspaceDir, T as workspaceDerivedData } from "./workspace-state-BdZ-QgmB.mjs";
2
2
  import { a as killOnAbort, l as gitQuietAsync, r as childEnvironment } from "./operation-exec-DKlBcKAL.mjs";
3
- import { h as pbxString, m as pbxReferences } from "./project-DWEXiBA9.mjs";
3
+ import { h as pbxString, m as pbxReferences } from "./project-DU3jjnBE.mjs";
4
4
  import { n as fingerprintNativeInputs, t as NativeInputError } from "./native-inputs-TRTTTRxt.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { existsSync, readFileSync, realpathSync } from "node:fs";
@@ -1,21 +1,21 @@
1
1
  import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
2
  import { x as sharedCompilationCache } from "./workspace-state-BdZ-QgmB.mjs";
3
3
  import { G as remoteIosSetting, J as resolveCacheProviderConfig, Vt as repoRootAsync, rt as settingShapeErrors } from "./settings-B5IBDfTx.mjs";
4
- import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-DWEXiBA9.mjs";
5
- import { Tn as processContext } from "./ccache-BXtzEL6M.mjs";
4
+ import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-DU3jjnBE.mjs";
5
+ import { Sn as processContext } from "./ccache-ChBMXlBq.mjs";
6
6
  import { r as register } from "./cache-manifest-8JX9S1QJ.mjs";
7
- import { lt as statsProjectKey } from "./workspaces-B3ahAHZc.mjs";
8
- import { E as readPodState, H as readBundleId, I as compilationCacheSettings, M as HEARTBEAT_INTERVAL_MS, O as runCaptured, P as buildXcode, R as parseSwiftVersion, T as podsAreStale, c as iosToolchainAsync, k as runPodInstall, st as runCancellationSignal, z as parseXcodeMajor } from "./toolchain-s5ZmG42Z.mjs";
7
+ import { lt as statsProjectKey } from "./workspaces-B9v5V7Es.mjs";
8
+ import { E as readPodState, H as readBundleId, I as compilationCacheSettings, M as HEARTBEAT_INTERVAL_MS, O as runCaptured, P as buildXcode, R as parseSwiftVersion, T as podsAreStale, _t as runCancellationSignal, c as iosToolchainAsync, k as runPodInstall, z as parseXcodeMajor } from "./toolchain-CYonNjd_.mjs";
9
9
  import { f as filesystemBuildCapability, n as buildCacheKey } from "./build-cache-Cqj4FGnX.mjs";
10
10
  import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
11
- import { a as nativeTransferRefusal } from "./client-0_Mnfz0a.mjs";
12
- import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-D8OH0z98.mjs";
13
- import { r as gateProfileForDevice } from "./ios-signing-D-tSX1iF.mjs";
14
- import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-DL3ETb8s.mjs";
15
- import { s as explainBuildMiss, u as skippedMissReason } from "./prebuild-Bhs7TTcz.mjs";
16
- import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-T3Hi24ax.mjs";
17
- import { t as IosRecipeRefusal } from "./ios-project-BzfLigfh.mjs";
18
- import { c as iosProcessRuntime, t as DEFAULT_DEPS } from "./dependencies-CgvBZbXD.mjs";
11
+ import { a as nativeTransferRefusal } from "./client-kU37gURU.mjs";
12
+ import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-ivsfDj0v.mjs";
13
+ import { r as gateProfileForDevice } from "./ios-signing-R34vbrNU.mjs";
14
+ import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-DGzkhpu4.mjs";
15
+ import { s as explainBuildMiss, u as skippedMissReason } from "./prebuild-BfJII57G.mjs";
16
+ import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-Ct1FiA3E.mjs";
17
+ import { t as IosRecipeRefusal } from "./ios-project-DoTQYghg.mjs";
18
+ import { c as iosProcessRuntime, t as DEFAULT_DEPS } from "./dependencies-CZ7c8XX_.mjs";
19
19
  import { existsSync } from "node:fs";
20
20
  import { join } from "node:path";
21
21
  //#region src/integrations/native-xcode-ios.ts
@@ -1,4 +1,4 @@
1
- import { _ as CompilationCacheActivity, g as CcacheActivity, i as AndroidBuildOptions, l as IosToolchain, m as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt, u as WorkerToolchain } from "./android-project-BDlPnfmL.mjs";
1
+ import { _ as CompilationCacheActivity, g as CcacheActivity, i as AndroidBuildOptions, l as IosToolchain, m as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt, u as WorkerToolchain } from "./android-project-DhO6el8N.mjs";
2
2
  import { StimContext } from "@stim-cli/core";
3
3
  import { BuildFingerprintSource, BuildReactNativeArtifactQuery, BuildStartParams, BuildSwiftpmArtifactQuery } from "@stim-cli/core/protocol";
4
4
  //#region src/offload/react-native-artifact.d.ts
@@ -94,6 +94,10 @@ interface WorkerJob {
94
94
  cacheArtifact?: boolean;
95
95
  /** The client has no Xcode and left pod install to this machine, which may then rekey sources in the iOS project. */
96
96
  podsOnWorker?: boolean;
97
+ /** The client's cache reads allow the app stim-server retained under the fingerprint after this machine's pod install. */
98
+ reuseArtifact?: boolean;
99
+ /** The directory of stim-server's retained artifacts for this client's repository. */
100
+ artifactCache?: string;
97
101
  stimBuild?: string;
98
102
  compat?: number;
99
103
  /** The JDK major the client builds on; the build runs on an installed JDK of it when the default differs. */
@@ -121,6 +125,7 @@ type WorkerResult = {
121
125
  sha256: string;
122
126
  };
123
127
  fingerprint: string | null;
128
+ reused?: true;
124
129
  androidPackage?: string;
125
130
  sourceDigest?: string;
126
131
  cacheArtifact?: {
@@ -4,25 +4,25 @@ import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
4
4
  import { A as writeConfigSetting } from "./config-BW0fAtoK.mjs";
5
5
  import { o as git, s as gitAsync } from "./operation-exec-DKlBcKAL.mjs";
6
6
  import { b as iosProjectDirSetting, d as androidLayoutSetting } from "./settings-B5IBDfTx.mjs";
7
- import { f as projectRegistry, g as selectNativeXcodeProject } from "./project-DWEXiBA9.mjs";
7
+ import { f as projectRegistry, g as selectNativeXcodeProject } from "./project-DU3jjnBE.mjs";
8
8
  import { s as parseNdjsonText$1 } from "./ndjson-CrjIsGzw.mjs";
9
- import { Tn as processContext, n as CCACHE_UNAVAILABLE, s as resolveCcache } from "./ccache-BXtzEL6M.mjs";
10
- import { E as readPodState, S as workerToolchain, T as podsAreStale, i as availableIphone, k as runPodInstall, x as useJdkMajor } from "./toolchain-s5ZmG42Z.mjs";
9
+ import { Sn as processContext, n as CCACHE_UNAVAILABLE, s as resolveCcache } from "./ccache-ChBMXlBq.mjs";
10
+ import { E as readPodState, S as workerToolchain, T as podsAreStale, i as availableIphone, k as runPodInstall, x as useJdkMajor } from "./toolchain-CYonNjd_.mjs";
11
11
  import { C as refingerprintAfterMutation, a as compareSourceLists, h as fingerprintProject, i as changedOnlyInside } from "./build-cache-Cqj4FGnX.mjs";
12
- import { _ as unmetNodePin, g as projectNodeLine, h as pathNodeVersion, v as withProjectNode } from "./server-expo-15RjL0ir.mjs";
13
- import { C as COMPILATION_CACHE_CORRUPT, b as validateGradleManifest, f as reactNativeArtifactReceipt, g as gradleStateDirectories, h as gradleOffloadInputs, m as reactNativeBuildQuery, p as reactNativeArtifactToolchain, v as nativeGradleOutputs, w as clearCorruptCompilationCache, x as verifyGradleTransfer } from "./client-0_Mnfz0a.mjs";
12
+ import { _ as unmetNodePin, g as projectNodeLine, h as pathNodeVersion, v as withProjectNode } from "./server-expo-CUJ2fuv1.mjs";
13
+ import { S as verifyGradleTransfer, T as clearCorruptCompilationCache, _ as gradleStateDirectories, f as reactNativeArtifactReceipt, g as gradleOffloadInputs, h as reusedReactNativeArtifact, m as reactNativeBuildQuery, p as reactNativeArtifactToolchain, w as COMPILATION_CACHE_CORRUPT, x as validateGradleManifest, y as nativeGradleOutputs } from "./client-kU37gURU.mjs";
14
14
  import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
15
15
  import { a as sourceManifest, o as verifyNativeTransfer } from "./native-source-ChAGj7R1.mjs";
16
- import { n as buildAndroid, o as gradlewPath, r as buildIos, u as assembleTaskFor } from "./react-native-build-DaPfzf_e.mjs";
17
- import { f as podAction } from "./support-D8OH0z98.mjs";
18
- import { r as nativeXcodeMetadataDirectories } from "./native-xcode-inputs-DL3ETb8s.mjs";
19
- import { a as runPrebuild, r as recordPrebuild, t as planPrebuild } from "./prebuild-Bhs7TTcz.mjs";
20
- import { g as dumpApkManifest, p as apkPackage } from "./support-CqyWfZZI.mjs";
21
- import { n as buildAndroidOperation, t as buildIosOperation } from "./build-DFBGWOTc.mjs";
22
- import { i as stageBundle, n as resolveBundleExtras } from "./stage-DKC6tDXu.mjs";
16
+ import { n as buildAndroid, o as gradlewPath, r as buildIos, u as assembleTaskFor } from "./react-native-build-CuvNPt-q.mjs";
17
+ import { f as podAction } from "./support-ivsfDj0v.mjs";
18
+ import { r as nativeXcodeMetadataDirectories } from "./native-xcode-inputs-DGzkhpu4.mjs";
19
+ import { a as runPrebuild, r as recordPrebuild, t as planPrebuild } from "./prebuild-BfJII57G.mjs";
20
+ import { g as dumpApkManifest, p as apkPackage } from "./support-BNe1_Hg7.mjs";
21
+ import { n as buildAndroidOperation, t as buildIosOperation } from "./build-D7SuVoRX.mjs";
22
+ import { i as stageBundle, n as resolveBundleExtras } from "./stage-CBfMTUK3.mjs";
23
23
  import { t as logLines } from "./run-N-BbRxnC.mjs";
24
24
  import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-uq5oV7xR.mjs";
25
- import { a as nativeGradleWorkerArtifactIdentity, i as nativeGradleArtifactSnapshotFromReceipt, o as nativeGradleWorkerScope } from "./native-gradle-artifact-inputs-BLnO2hHR.mjs";
25
+ import { a as nativeGradleWorkerArtifactIdentity, i as nativeGradleArtifactSnapshotFromReceipt, o as nativeGradleWorkerScope } from "./native-gradle-artifact-inputs-DVoeZkrw.mjs";
26
26
  import { createHash } from "node:crypto";
27
27
  import { chmodSync, constants, copyFileSync, cpSync, createReadStream, createWriteStream, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
28
28
  import { isDeepStrictEqual } from "node:util";
@@ -779,6 +779,10 @@ async function build(job) {
779
779
  const pods = podAction(podState, podsAreStale(podState.lockText, podState.manifestText, podState.dir));
780
780
  if (pods.install) {
781
781
  note("pods", `${pods.reason ?? "Pods are stale"} -> pod install`);
782
+ rmSync(join(iosProject.dir, "Pods", "Local Podspecs"), {
783
+ recursive: true,
784
+ force: true
785
+ });
782
786
  const result = await time("podsMs", () => runPodInstall(realRoot, log, {
783
787
  directory: iosProject.dir,
784
788
  onHeartbeat: (line) => note("pods", line)
@@ -815,6 +819,15 @@ async function build(job) {
815
819
  const tools = job.cacheArtifact ? await reactNativeArtifactToolchain(platform, realRoot, iosProject.dir) : null;
816
820
  const query = tools ? reactNativeBuildQuery(job, fingerprint, job.project, tools) : null;
817
821
  const receipt = query ? reactNativeArtifactReceipt(query, tools) : null;
822
+ const reused = await reuseRetained(job, query, mutations, time);
823
+ if (reused) return {
824
+ ok: true,
825
+ artifact: reused,
826
+ fingerprint,
827
+ reused: true,
828
+ compilationCache: {},
829
+ timings
830
+ };
818
831
  compiled = platform === "android" ? await compileAndroid(job, realRoot, log, time, androidLayout) : await compileIos(job, realRoot, log, time);
819
832
  if (!compiled.ok) return failed(compiled.code, compiled.message);
820
833
  const builtFingerprint = fingerprint;
@@ -871,6 +884,18 @@ async function build(job) {
871
884
  });
872
885
  }
873
886
  }
887
+ /** The app stim-server retained under the fingerprint after `mutations`, in place of compiling; null builds. */
888
+ async function reuseRetained(job, query, mutations, time) {
889
+ if (!query) return null;
890
+ try {
891
+ const reused = await time("packageMs", () => reusedReactNativeArtifact(job, query, join(job.area, "out", job.job), AbortSignal.timeout(6e5)));
892
+ if (reused) note("cache", `hit ${query.fingerprint.slice(0, 12)} (post-${mutations.join(", ")} key)`);
893
+ return reused;
894
+ } catch (error) {
895
+ note("cache", `could not reuse the retained app: ${error instanceof Error ? error.message : String(error)}`);
896
+ return null;
897
+ }
898
+ }
874
899
  function differingParameters(here, there, path) {
875
900
  if (JSON.stringify(here) === JSON.stringify(there)) return [];
876
901
  if (!isJsonObject(here) || !isJsonObject(there)) return [path];
@@ -1,7 +1,7 @@
1
1
  import { r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-BdZ-QgmB.mjs";
2
2
  import { dt as deviceSlotKey, pt as parseDeviceSlotKey } from "./config-BW0fAtoK.mjs";
3
3
  import { tt as removeMetroReverses } from "./android-Iq0M2t2d.mjs";
4
- import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-BzXIy97W.mjs";
4
+ import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-B7OFt5gB.mjs";
5
5
  import { isJsonObject } from "@stim-cli/core/state";
6
6
  //#region src/device-host/hosted-ios.ts
7
7
  async function prepareHostedIos(machine, selectors, recorded, mode) {
@@ -1,4 +1,4 @@
1
- import { r as buildPlacementSettings } from "./selection-xS50Mt0V.mjs";
1
+ import { r as buildPlacementSettings } from "./selection-CH-MUVGD.mjs";
2
2
  //#region src/placement-log.ts
3
3
  /** `machine` is `local` when the run stays on this machine. */
4
4
  function placementRecord(input) {
@@ -1,9 +1,9 @@
1
1
  import { v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
2
- import { Tn as processContext } from "./ccache-BXtzEL6M.mjs";
3
- import { _ as hostingMachines } from "./selection-xS50Mt0V.mjs";
2
+ import { Sn as processContext } from "./ccache-ChBMXlBq.mjs";
3
+ import { _ as hostingMachines } from "./selection-CH-MUVGD.mjs";
4
4
  import { r as readHostedNative } from "./ios-state-CWsBysyN.mjs";
5
- import { n as buildPreferenceRefusal } from "./settings-payload-BIGGQ3or.mjs";
6
- import { r as probeHost, t as automaticDevicePlacement } from "./auto-placement-D7P98glJ.mjs";
5
+ import { n as buildPreferenceRefusal } from "./settings-payload-Bxw3hid5.mjs";
6
+ import { r as probeHost, t as automaticDevicePlacement } from "./auto-placement-DA65VQH7.mjs";
7
7
  import { automaticMachineEnabled } from "@stim-cli/core/state";
8
8
  //#region src/device-host/plan-placement.ts
9
9
  const DOCTOR_REMEDY = "Run `stim doctor` to check the hosts and settings placement uses.";