stim 1.34.0 → 1.36.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/dist/{acquire-artifact-B0SWoVNt.mjs → acquire-artifact-DGTHCd0Q.mjs} +19 -3
  2. package/dist/{act-7f7wIvCQ.mjs → act-CvN9xyV6.mjs} +18 -19
  3. package/dist/{activity-DkS-Ir6V.mjs → activity-BpdDvA8Q.mjs} +4 -4
  4. package/dist/{agent-device-usage-output-BVdgKbfz.mjs → agent-device-usage-output-pbhaW7_k.mjs} +4 -4
  5. package/dist/{android-B2DSKg-A.mjs → android-5wkcMFDG.mjs} +1 -1
  6. package/dist/{android-BU4uBX8I.mjs → android-B0qTdwnt.mjs} +5 -5
  7. package/dist/{android-Iq0M2t2d.mjs → android-SJx1V3R3.mjs} +5 -5
  8. package/dist/{android-cas-Dhcjkys1.mjs → android-cas-BS9_55U5.mjs} +4 -4
  9. package/dist/{android-D7qjT2fq.mjs → android-e9WP10cE.mjs} +47 -41
  10. package/dist/{android-image-DFk26aY6.mjs → android-image-BZ57YL6R.mjs} +2 -2
  11. package/dist/{android-project-DhO6el8N.d.mts → android-project-v_1nej_x.d.mts} +3 -1
  12. package/dist/api.d.mts +20 -6
  13. package/dist/api.mjs +31 -26
  14. package/dist/{apk-signed-tail-CPpA-3vu.mjs → apk-signed-tail-eZyXIrnc.mjs} +2 -2
  15. package/dist/{artifact-DmRtKFXW.mjs → artifact-C3srrGVU.mjs} +36 -14
  16. package/dist/{artifact-CNnTZs3R.mjs → artifact-ubNdxo_K.mjs} +52 -19
  17. package/dist/{auto-placement-DA65VQH7.mjs → auto-placement-CKFpFCuq.mjs} +7 -8
  18. package/dist/{browser-web-Dn_hgKZC.mjs → browser-web-B63vLrj6.mjs} +11 -11
  19. package/dist/{build-D7SuVoRX.mjs → build-B_Dx9SKJ.mjs} +72 -25
  20. package/dist/{build-cache-Cqj4FGnX.mjs → build-cache-BW8T4oD2.mjs} +10 -5
  21. package/dist/{build-plan-Ct1FiA3E.mjs → build-plan-CeIooJqn.mjs} +6 -6
  22. package/dist/{cache-manifest-8JX9S1QJ.mjs → cache-manifest-CxWkZmUr.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{cli-DjdvQG5U.mjs → cli-COdXswmc.mjs} +19 -18
  25. package/dist/cli.mjs +1 -1
  26. package/dist/{client-kU37gURU.mjs → client-KSWIeQLA.mjs} +9 -8
  27. package/dist/collector-run.mjs +4 -4
  28. package/dist/{command-output-DjExb_tZ.mjs → command-output-T3cDctRE.mjs} +1 -1
  29. package/dist/{config-BW0fAtoK.mjs → config-BA3TgoIP.mjs} +59 -10
  30. package/dist/{dependencies-CZ7c8XX_.mjs → dependencies-LH-7k1Vr.mjs} +35 -38
  31. package/dist/{dependency-state-mL5g4H6K.mjs → dependency-state-Blfp3AkG.mjs} +1 -1
  32. package/dist/{dev-client-D3wOllNd.mjs → dev-client-MO_DjTZr.mjs} +2 -2
  33. package/dist/{device-DH5yf6TU.mjs → device-BZWt_aPJ.mjs} +11 -11
  34. package/dist/{device-CWPFAqs0.mjs → device-DNTWFFB1.mjs} +12 -12
  35. package/dist/{device-android-ChfF5I9A.mjs → device-android-BB9Lugr8.mjs} +8 -8
  36. package/dist/{ccache-ChBMXlBq.mjs → device-capacity-CpAVcKgq.mjs} +1006 -23
  37. package/dist/device-host-worker.mjs +13 -14
  38. package/dist/{device-pool-EZziQ0uS.mjs → device-pool-BJToGG-q.mjs} +3 -3
  39. package/dist/{device-provision-CfpEy-Vm.mjs → device-provision-CxQDCtrc.mjs} +9 -9
  40. package/dist/{doctor-CGBsS_68.mjs → doctor-C-46SkBe.mjs} +1 -1
  41. package/dist/{doctor-dwRboaXx.mjs → doctor-CYZ45LnX.mjs} +20 -21
  42. package/dist/{doctor-B5uEZiKp.mjs → doctor-DV639Iw_.mjs} +15 -16
  43. package/dist/doctor-fingerprint.mjs +1 -1
  44. package/dist/{doctor-watchman-r7M9UPi0.mjs → doctor-watchman-TZxYt_98.mjs} +4 -4
  45. package/dist/{eas-build-BpHIt_M3.mjs → eas-build-Xf5Jd6LR.mjs} +2 -2
  46. package/dist/{eas-fallback-CNPcjq3K.mjs → eas-fallback-DNYPNinw.mjs} +4 -4
  47. package/dist/{eas-session-ledger-CXwagcQ7.mjs → eas-session-ledger-CXZ4aix0.mjs} +5 -5
  48. package/dist/{error-diagnostics-Ym2mjmJ0.mjs → error-diagnostics-CvB5bpPU.mjs} +8 -8
  49. package/dist/{gc-B464w_a5.mjs → gc-8Qm_K1iy.mjs} +2 -2
  50. package/dist/{gc-C7YxKNci.mjs → gc-DiUhrVFo.mjs} +17 -17
  51. package/dist/{guide-BFW-cB7R.mjs → guide-CuvHRP53.mjs} +130 -65
  52. package/dist/{hosted-android-B7yfqXEy.mjs → hosted-android-D__HGVIO.mjs} +3 -3
  53. package/dist/{hosted-client-CQuzZwAu.mjs → hosted-client-DMOOu8vD.mjs} +6 -6
  54. package/dist/{hosted-logs-DfYCqrrR.mjs → hosted-logs-CClIktQM.mjs} +6 -6
  55. package/dist/{hosted-logs-sync-Dlpa2mQF.mjs → hosted-logs-sync-B7XCeqVm.mjs} +5 -5
  56. package/dist/{hosted-macos-JKefapEm.mjs → hosted-macos-D4sDJIbB.mjs} +5 -5
  57. package/dist/{hosted-native-B7OFt5gB.mjs → hosted-native-BiiUG_Q6.mjs} +7 -7
  58. package/dist/{ios-sUPbWqEh.mjs → ios-BZuhvLGr.mjs} +8 -8
  59. package/dist/{ios-BdZdNsAj.mjs → ios-BhfpRfNf.mjs} +4 -4
  60. package/dist/{ios-DSBs9c6d.mjs → ios-BhpUWyN7.mjs} +39 -32
  61. package/dist/{ios-device-Drplrgzo.mjs → ios-device-vhYL1N--.mjs} +1 -1
  62. package/dist/{ios-project-DoTQYghg.mjs → ios-project-Cz0S1Sz-.mjs} +7 -7
  63. package/dist/{ios-signing-R34vbrNU.mjs → ios-signing-BcH88ecn.mjs} +1 -1
  64. package/dist/{ios-state-CWsBysyN.mjs → ios-state-Avwz2cbZ.mjs} +1 -1
  65. package/dist/{js-swap-DrokhOfo.mjs → js-swap-Desu2iII.mjs} +4 -4
  66. package/dist/{launch-Cy-MWEZc.mjs → launch-6ckG9UrC.mjs} +19 -19
  67. package/dist/{lightened-ALwQcQtV.mjs → lightened-B6TnpHMX.mjs} +4 -4
  68. package/dist/{logs-DuED-01Z.mjs → logs-B-DMy1K0.mjs} +7 -7
  69. package/dist/{logs-DWT7jGpF.mjs → logs-CO0CJRiC.mjs} +5 -5
  70. package/dist/{macos-CtBtA_hW.mjs → macos-B1aCXhem.mjs} +19 -19
  71. package/dist/{macos-kWGcfLzx.mjs → macos-CduEmWAK.mjs} +1 -1
  72. package/dist/macos-run.mjs +1 -1
  73. package/dist/maintenance-run.mjs +5 -5
  74. package/dist/{metro-B5PVz0Wv.mjs → metro-DM3yJL1M.mjs} +2 -2
  75. package/dist/{metro-request-2LmFpC1z.mjs → metro-request-O8Q-JvBg.mjs} +1 -1
  76. package/dist/{named-ports-CA0nB9Yw.mjs → named-ports-BvB_CO9B.mjs} +2 -2
  77. package/dist/{native-android-tISP2EVp.mjs → native-android-28NOG2-y.mjs} +17 -17
  78. package/dist/{native-gradle-artifact-inputs-DVoeZkrw.mjs → native-gradle-artifact-inputs-DxVEtS6_.mjs} +3 -3
  79. package/dist/{native-runtime-CNgxeOCG.mjs → native-runtime-C3_NkUlW.mjs} +6 -6
  80. package/dist/{native-xcode-inputs-DGzkhpu4.mjs → native-xcode-inputs-BWFTw5cJ.mjs} +2 -2
  81. package/dist/{native-xcode-ios-B9nsfId2.mjs → native-xcode-ios-B4Qoc7-U.mjs} +16 -16
  82. package/dist/offload-worker.d.mts +1 -1
  83. package/dist/offload-worker.mjs +19 -19
  84. package/dist/{ownership-hC7xvvxF.mjs → ownership-C3y8wLSl.mjs} +2 -2
  85. package/dist/{phone-reverses-Bo0EzJ-P.mjs → phone-reverses-BhSxbqom.mjs} +4 -4
  86. package/dist/{placement-log-BsGvKLtU.mjs → placement-log-B8RCSzOm.mjs} +1 -1
  87. package/dist/{plan-placement-Am0IjuxB.mjs → plan-placement-BI4r55aP.mjs} +6 -6
  88. package/dist/{ports-CNzg1LYD.mjs → ports-DhOSyWm9.mjs} +3 -3
  89. package/dist/{prebuild-BfJII57G.mjs → prebuild-Di2IhUue.mjs} +9 -9
  90. package/dist/{project-DU3jjnBE.mjs → project-Clk1JAWL.mjs} +15 -15
  91. package/dist/{react-native-android-3dZiJv-4.mjs → react-native-android-bdHBMrnf.mjs} +23 -23
  92. package/dist/{react-native-build-CuvNPt-q.mjs → react-native-build-CJega_NM.mjs} +7 -7
  93. package/dist/{react-native-doctor-a35BwMUO.mjs → react-native-doctor-CY7BGITE.mjs} +5 -5
  94. package/dist/{react-native-ios-CqnReM1t.mjs → react-native-ios-Bo5EDVel.mjs} +25 -20
  95. package/dist/recorded-build-BuGL_fnm.mjs +58 -0
  96. package/dist/{recordings-AKZfsW2W.mjs → recordings-6i2-x8LU.mjs} +1 -1
  97. package/dist/{reload-CC3sNo10.mjs → reload-A_axEbeS.mjs} +14 -14
  98. package/dist/{reload-YPnvXGlB.mjs → reload-BvDuvygc.mjs} +1 -1
  99. package/dist/remote-PD6CM0xp.mjs +158 -0
  100. package/dist/{remote-BfaIHnhM.mjs → remote-WK_swZEw.mjs} +8 -8
  101. package/dist/{result-H-AxY7Ud.mjs → result-BkDpN5Mz.mjs} +23 -18
  102. package/dist/{run-N-BbRxnC.mjs → run-CTFi4Nq2.mjs} +1 -1
  103. package/dist/{server-bare-BTlICuaX.mjs → server-bare-W0aPsRZE.mjs} +1 -1
  104. package/dist/{server-command-Bn_gOObU.mjs → server-command-S00-ddjK.mjs} +4 -4
  105. package/dist/server-expo-BWJDa7Qb.mjs +2 -0
  106. package/dist/{server-expo-CUJ2fuv1.mjs → server-expo-cc-cmfsl.mjs} +2 -2
  107. package/dist/{settings-B5IBDfTx.mjs → settings-Bap-qjnp.mjs} +1 -1
  108. package/dist/{settings-DoWHJopy.mjs → settings-C_Xu4RNZ.mjs} +2 -2
  109. package/dist/{settings-payload-Bxw3hid5.mjs → settings-payload-D5jjhmrw.mjs} +4 -4
  110. package/dist/{settings-write-C6d7EC54.mjs → settings-write-C5huI-iS.mjs} +5 -5
  111. package/dist/settings.schema.json +1 -1
  112. package/dist/{simslim-DKdJx0LL.mjs → simslim-DlBvwgeF.mjs} +1 -1
  113. package/dist/{slot-launch-kq0-7w9C.mjs → slot-launch-qEQVTth7.mjs} +6 -6
  114. package/dist/{stage-CBfMTUK3.mjs → stage-CxVI_MlP.mjs} +1 -1
  115. package/dist/{start-Diu8q6_U.mjs → start-CVzivp35.mjs} +1 -1
  116. package/dist/{start-WTMumMHi.mjs → start-YpT_JpQQ.mjs} +10 -10
  117. package/dist/{state-DSOUqO-o.mjs → state-B4B5P4LU.mjs} +1 -1
  118. package/dist/{state-CtmYTRWm.mjs → state-B9VFI6r0.mjs} +2 -2
  119. package/dist/{stats-D4cW247z.mjs → stats-COoePEri.mjs} +4 -4
  120. package/dist/{status-CEwxo-PS.mjs → status-CIg0k7Qb.mjs} +21 -22
  121. package/dist/{status-B-oeWS0Z.mjs → status-CIvU5-TF.mjs} +1 -1
  122. package/dist/{status-DTFhDnd1.mjs → status-CQWmNl1f.mjs} +1 -1
  123. package/dist/{status-watch-D63R5nSI.mjs → status-watch--rfZynD_.mjs} +4 -4
  124. package/dist/status-worker.mjs +1 -1
  125. package/dist/{stim-desktop-_WTria-r.mjs → stim-desktop-D0P_bzmd.mjs} +1 -1
  126. package/dist/{stop-HL2RvhrE.mjs → stop-BEBBruvD.mjs} +4 -4
  127. package/dist/{stop-Dm9ON6Os.mjs → stop-BiI4_VFG.mjs} +2 -2
  128. package/dist/{stop-vX4w3_8V.mjs → stop-C3d5qG7C.mjs} +15 -15
  129. package/dist/supervisor-run.mjs +12 -13
  130. package/dist/support-BJbXovoO.mjs +2089 -0
  131. package/dist/{support-BNe1_Hg7.mjs → support-Vckdzrmk.mjs} +5 -5
  132. package/dist/{swiftpm-artifact-inputs-uq5oV7xR.mjs → swiftpm-artifact-inputs-DbuF-Yrr.mjs} +1 -1
  133. package/dist/{swiftpm-macos-ClF203_2.mjs → swiftpm-macos-Bu8xeBfM.mjs} +8 -8
  134. package/dist/{toolchain-CECahBDa.mjs → toolchain-CIRdNl-c.mjs} +1 -1
  135. package/dist/{toolchain-CYonNjd_.mjs → toolchain-DCnWAxQL.mjs} +71 -7
  136. package/dist/{warm-progress-q11Vdvhh.mjs → warm-progress-DwsGBpph.mjs} +3 -3
  137. package/dist/{web-BdaMBr2O.mjs → web-D2En0Wa5.mjs} +8 -8
  138. package/dist/web-Dpj70t4p.mjs +2 -0
  139. package/dist/web-run.mjs +4 -4
  140. package/dist/{workspace-state-BdZ-QgmB.mjs → workspace-state-BhwAJBgA.mjs} +2 -2
  141. package/dist/{workspaces-B9v5V7Es.mjs → workspaces-Dh5N70qW.mjs} +11 -11
  142. package/dist/{worktree-C4MBOMz7.mjs → worktree-DLm4s2Ib.mjs} +1 -1
  143. package/dist/{worktree-C3N86KpI.mjs → worktree-Yw3EW77B.mjs} +24 -24
  144. package/package.json +7 -7
  145. package/dist/device-capacity-CHC3dKWg.mjs +0 -867
  146. package/dist/device-ios-B3-Ah--R.mjs +0 -716
  147. package/dist/device-lease-run-i3FNX4OE.mjs +0 -282
  148. package/dist/idle-shutdown-DPD8oV36.mjs +0 -142
  149. package/dist/selection-CH-MUVGD.mjs +0 -791
  150. package/dist/server-expo-B59N16uT.mjs +0 -2
  151. package/dist/support-ivsfDj0v.mjs +0 -287
  152. package/dist/web-CIpHpGp8.mjs +0 -2
@@ -1,16 +1,15 @@
1
1
  import { D as ownership_claim_exports, d as throwIfCancelled, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
- import { E as workspaceDir } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-DjExb_tZ.mjs";
4
- import { On as easAuthNote, kn as isEasAuthFailureText, wn as RESOLVE_TIMEOUT_MS } from "./ccache-ChBMXlBq.mjs";
5
- import { A as COMPILATION_CACHE_NOT_RUN, F as compilationCacheActivityLine, _t as runCancellationSignal, lt as cancelledFailure } from "./toolchain-CYonNjd_.mjs";
6
- import { E as storedAppId, S as providerUploadOutcome, b as prepareProviderDownloadDir, x as providerDownloadPath } from "./build-cache-Cqj4FGnX.mjs";
7
- import { T as clearCorruptCompilationCache, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, s as offloadCheck, u as remotePhaseText, w as COMPILATION_CACHE_CORRUPT } from "./client-kU37gURU.mjs";
8
- import { a as missingPackageManagerRemedy, c as podsFailedRemedy, h as predictedRefusal, i as fingerprintMismatchRemedy, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, t as OffloadRefusal } from "./selection-CH-MUVGD.mjs";
9
- import { S as xcodeFailureReport, p as printDiagnostics } from "./support-ivsfDj0v.mjs";
10
- import { f as settleFingerprintCheck, u as skippedMissReason } from "./prebuild-BfJII57G.mjs";
11
- import { t as buildPlacementRecord } from "./placement-log-BsGvKLtU.mjs";
12
- import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-B0SWoVNt.mjs";
13
- import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-DoTQYghg.mjs";
2
+ import { E as workspaceDir } from "./workspace-state-BhwAJBgA.mjs";
3
+ import { _ as stepTimer, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-T3cDctRE.mjs";
4
+ import { Gn as RESOLVE_TIMEOUT_MS, Xn as isEasAuthFailureText, Yn as easAuthNote } from "./device-capacity-CpAVcKgq.mjs";
5
+ import { A as COMPILATION_CACHE_NOT_RUN, F as compilationCacheActivityLine, _t as runCancellationSignal, lt as cancelledFailure } from "./toolchain-DCnWAxQL.mjs";
6
+ import { C as providerUploadOutcome, D as storedAppId, S as providerDownloadPath, x as prepareProviderDownloadDir } from "./build-cache-BW8T4oD2.mjs";
7
+ import { T as clearCorruptCompilationCache, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, s as offloadCheck, u as remotePhaseText, w as COMPILATION_CACHE_CORRUPT } from "./client-KSWIeQLA.mjs";
8
+ import { A as fingerprintMismatchRemedy, D as OffloadRefusal, F as requireLocalBuild, M as namedBuildMachine, O as automaticBuild, P as podsFailedRemedy, S as xcodeFailureReport, j as missingPackageManagerRemedy, p as printDiagnostics, tt as predictedRefusal, u as isReleaseConfiguration } from "./support-BJbXovoO.mjs";
9
+ import { f as settleFingerprintCheck, u as skippedMissReason } from "./prebuild-Di2IhUue.mjs";
10
+ import { n as settleArtifactUploads, r as retainFailedTranscript, t as acquireArtifact } from "./acquire-artifact-DGTHCd0Q.mjs";
11
+ import { t as buildPlacementRecord } from "./placement-log-B8RCSzOm.mjs";
12
+ import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-Cz0S1Sz-.mjs";
14
13
  import { rmSync } from "node:fs";
15
14
  import { join } from "node:path";
16
15
  import { machineCapacity } from "@stim-cli/core/state";
@@ -24,6 +23,8 @@ function fail(failure) {
24
23
  async function acquireIosArtifact({ context, root, logFile, recipe, physical, configuration, buildMachine = "auto", cache, easBuild, maxBuilds, progress }, d) {
25
24
  const { phase, note, logWriter, stats, step, miss, hit: lateHit, place, waitingOn, waitingFor } = progress;
26
25
  const cachePolicy = cache.policy;
26
+ const release = isReleaseConfiguration(configuration);
27
+ const embedsJs = (runtime) => release && !recipe.offload?.request(runtime).native;
27
28
  const signal = runCancellationSignal(context) ?? context.signal;
28
29
  const cacheTarget = (key) => ({
29
30
  projectRoot: root,
@@ -332,7 +333,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
332
333
  });
333
334
  if (!placement.offload) {
334
335
  hereReason = placement.reason;
335
- if (placement.code === "this-mac-free" && runtime && useBuildCache && cachePolicy.remote && recipe.offload !== void 0) return {
336
+ if (placement.code === "this-mac-free" && runtime && !embedsJs(runtime) && useBuildCache && cachePolicy.remote && recipe.offload !== void 0) return {
336
337
  cacheOnly: true,
337
338
  here,
338
339
  code: placement.code,
@@ -384,7 +385,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
384
385
  selected: buildMachine,
385
386
  onCandidates: (each) => asked = each,
386
387
  cacheOnly: candidate.cacheOnly,
387
- ...useBuildCache && cachePolicy.remote && storeHash && !offload.request(candidate.runtime).native ? { reactNativeArtifact: {
388
+ ...useBuildCache && cachePolicy.remote && storeHash && !offload.request(candidate.runtime).native && !release ? { reactNativeArtifact: {
388
389
  fingerprint: storeHash,
389
390
  request: offload.request(candidate.runtime)
390
391
  } } : {},
@@ -472,7 +473,7 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
472
473
  stored = await recipe.cache().store({
473
474
  ...cacheTarget(storeKey),
474
475
  sourcePath: outcome.artifactPath,
475
- overwrite: !useBuildCache
476
+ overwrite: !useBuildCache || embedsJs(runtime) && !outcome.cacheHit
476
477
  }) ?? null;
477
478
  } catch (e) {
478
479
  reason = `could not store the app: ${e?.message || e}`;
@@ -487,7 +488,10 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
487
488
  } catch {}
488
489
  throwIfCancelled(signal, "offloaded build cache copy");
489
490
  step("compile");
490
- const prepared = stored ? await installableCachedApp(stored) : null;
491
+ const prepared = !stored ? null : outcome.ok && outcome.cacheHit ? await installableCachedApp(stored) : await recipe.materialize(stored, {
492
+ fresh: true,
493
+ ownTemporary: (directory) => run.own(directory)
494
+ });
491
495
  if (!outcome.ok || !prepared) {
492
496
  const why = reason ?? "the stored app is not installable";
493
497
  if (candidate.cacheOnly) return false;
@@ -618,15 +622,16 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
618
622
  if (!result.ok) {
619
623
  phase("build", `FAILED after ${formatDuration(result.durationMs)}`);
620
624
  printDiagnostics(note, result);
625
+ const transcript = retainFailedTranscript(logFile);
621
626
  const report = result.compilationCacheCorruption ? await clearCorruptCompilationCache(result.compilationCacheCorruption, root) : {
622
627
  code: result.code,
623
- ...xcodeFailureReport(result, logFile)
628
+ ...xcodeFailureReport(result, transcript)
624
629
  };
625
630
  fail({
626
631
  code: report.code,
627
632
  message: report.message,
628
633
  remedy: report.remedy,
629
- logPath: logFile,
634
+ logPath: transcript,
630
635
  build: {
631
636
  ...buildFailure,
632
637
  diagnostics: result.diagnostics
@@ -854,5 +859,33 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
854
859
  }
855
860
  };
856
861
  }
862
+ async function acquireIosArtifactOrRecorded(recorded, request, d) {
863
+ return recorded ? recordedIosArtifact(recorded) : acquireIosArtifact(request, d);
864
+ }
865
+ function recordedIosArtifact(recorded) {
866
+ return {
867
+ ok: true,
868
+ artifact: {
869
+ path: recorded.appPath,
870
+ bundleId: recorded.bundleId,
871
+ cache: {
872
+ identity: null,
873
+ hit: false,
874
+ providerName: null,
875
+ buildMachine: "local",
876
+ offloadedTo: null,
877
+ offloadFallback: null,
878
+ readEnabled: false,
879
+ missReason: null,
880
+ waitedForBuild: null,
881
+ compilation: COMPILATION_CACHE_NOT_RUN
882
+ },
883
+ failureFields: {},
884
+ completeUploads: async () => false,
885
+ release: () => {},
886
+ cancelFingerprintCheck: () => {}
887
+ }
888
+ };
889
+ }
857
890
  //#endregion
858
- export { acquireIosArtifact as t };
891
+ export { acquireIosArtifactOrRecorded as n, acquireIosArtifact as t };
@@ -1,11 +1,10 @@
1
- import { m as getProject, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
2
- import { m as peekBudget } from "./ccache-ChBMXlBq.mjs";
3
- import { z as readHostMemoryPressureAsync } from "./ios-BdZdNsAj.mjs";
4
- import { _ as hostingMachines, o as namedBuildMachine, u as resolveBuildMachine } from "./selection-CH-MUVGD.mjs";
5
- import { h as requireHostedAppMode, l as call, u as connectHost } from "./hosted-client-CQuzZwAu.mjs";
6
- import { c as writeHostedNativeAsync, r as readHostedNative } from "./ios-state-CWsBysyN.mjs";
7
- import { i as prepareHostedNative } from "./hosted-native-B7OFt5gB.mjs";
8
- import { d as peekDeviceSlots, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-CHC3dKWg.mjs";
1
+ import { m as getProject, v as loadConfig$1 } from "./config-BA3TgoIP.mjs";
2
+ import { F as peekBudget, d as peekDeviceSlots, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-CpAVcKgq.mjs";
3
+ import { z as readHostMemoryPressureAsync } from "./ios-BhfpRfNf.mjs";
4
+ import { I as resolveBuildMachine, M as namedBuildMachine, it as hostingMachines } from "./support-BJbXovoO.mjs";
5
+ import { h as requireHostedAppMode, l as call, u as connectHost } from "./hosted-client-DMOOu8vD.mjs";
6
+ import { c as writeHostedNativeAsync, r as readHostedNative } from "./ios-state-Avwz2cbZ.mjs";
7
+ import { i as prepareHostedNative } from "./hosted-native-BiiUG_Q6.mjs";
9
8
  import { ambientEnv } from "@stim-cli/core";
10
9
  import { automaticMachineEnabled, isJsonObject, machineCapacity, mayRunHere, parseHostedChoice, parseHostedNativeOffer, prefersRemote } from "@stim-cli/core/state";
11
10
  import { setTimeout } from "node:timers/promises";
@@ -1,17 +1,17 @@
1
1
  import { D as ownership_claim_exports, T as process_identity_exports, d as throwIfCancelled, f as WorkspaceProcessCleanupError, p as withWorkspaceProcessLock, t as getExecutor, u as cancelledError } from "./exec-CGuDzt40.mjs";
2
- import { E as workspaceDir, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
- import { m as getProject } from "./config-BW0fAtoK.mjs";
5
- import { N as metroPortSetting, a as SETTING_SHAPE_REMEDY, ct as webSettings } from "./settings-B5IBDfTx.mjs";
6
- import { b as isPackageResolvable, v as detectIsExpo } from "./project-DU3jjnBE.mjs";
7
- import { d as resolveProjectMetro } from "./metro-B5PVz0Wv.mjs";
2
+ import { E as workspaceDir, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-BhwAJBgA.mjs";
3
+ import { l as phaseLine } from "./command-output-T3cDctRE.mjs";
4
+ import { m as getProject } from "./config-BA3TgoIP.mjs";
5
+ import { N as metroPortSetting, a as SETTING_SHAPE_REMEDY, ct as webSettings } from "./settings-Bap-qjnp.mjs";
6
+ import { b as isPackageResolvable, v as detectIsExpo } from "./project-Clk1JAWL.mjs";
7
+ import { d as resolveProjectMetro } from "./metro-DM3yJL1M.mjs";
8
8
  import { c as readNdjsonGenerations$1 } from "./ndjson-CrjIsGzw.mjs";
9
- import { Wt as readMetroRecords } from "./ccache-ChBMXlBq.mjs";
10
- import { f as webLogFile, m as webSupervisorLogFile, o as readWebRecord, s as updateWebRecord } from "./state-CtmYTRWm.mjs";
11
- import { ft as teardownBrowserHeld, x as resolveSupervisorTarget } from "./workspaces-B9v5V7Es.mjs";
12
- import { i as reserveBrowserPort, n as getNamedPort } from "./named-ports-CA0nB9Yw.mjs";
9
+ import { dn as readMetroRecords } from "./device-capacity-CpAVcKgq.mjs";
10
+ import { f as webLogFile, m as webSupervisorLogFile, o as readWebRecord, s as updateWebRecord } from "./state-B9VFI6r0.mjs";
11
+ import { ft as teardownBrowserHeld, x as resolveSupervisorTarget } from "./workspaces-Dh5N70qW.mjs";
12
+ import { i as reserveBrowserPort, n as getNamedPort } from "./named-ports-BvB_CO9B.mjs";
13
13
  import { n as sendToOwnedPage, t as liveWebRecord } from "./page-Dj8IqvGM.mjs";
14
- import { o as resolveWorkspaceMetroPort } from "./start-WTMumMHi.mjs";
14
+ import { o as resolveWorkspaceMetroPort } from "./start-YpT_JpQQ.mjs";
15
15
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
16
16
  import { n as windowsLauncherArgs } from "./detached-entry-tfrgGVWb.mjs";
17
17
  import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-C8sC5tdl.mjs";
@@ -1,28 +1,30 @@
1
1
  import { d as throwIfCancelled, u as cancelledError, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
- import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
- import { D as upsertProject, k as withConfigLockAsync, m as getProject, u as getConcurrencyLimits } from "./config-BW0fAtoK.mjs";
5
- import { J as resolveCacheProviderConfig, Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-B5IBDfTx.mjs";
6
- import { f as projectRegistry, v as detectIsExpo } from "./project-DU3jjnBE.mjs";
7
- import { s as workspaceShareURL } from "./stim-desktop-_WTria-r.mjs";
8
- import { j as hostSystemImageArch } from "./android-Iq0M2t2d.mjs";
2
+ import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir } from "./workspace-state-BhwAJBgA.mjs";
3
+ import { l as phaseLine } from "./command-output-T3cDctRE.mjs";
4
+ import { A as withConfigLockAsync, O as upsertProject, m as getProject, u as getConcurrencyLimits } from "./config-BA3TgoIP.mjs";
5
+ import { J as resolveCacheProviderConfig, Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY } from "./settings-Bap-qjnp.mjs";
6
+ import { f as projectRegistry, v as detectIsExpo } from "./project-Clk1JAWL.mjs";
7
+ import { s as workspaceShareURL } from "./stim-desktop-D0P_bzmd.mjs";
8
+ import { j as hostSystemImageArch } from "./android-SJx1V3R3.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { Dn as checkEasAuth, Fn as resolveRemote, In as uploadRemote } from "./ccache-ChBMXlBq.mjs";
11
- import { $ as tapBuildLog, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, ct as recordRunStats, it as readRunEstimates, lt as statsProjectKey, rt as createRunRecorder } from "./workspaces-B9v5V7Es.mjs";
12
- import { H as readBundleId, _t as runCancellationSignal, vt as withNativeBuildRun } from "./toolchain-CYonNjd_.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-DkS-Ir6V.mjs";
14
- import { E as storedAppId, S as providerUploadOutcome } from "./build-cache-Cqj4FGnX.mjs";
15
- import { m as listIosRuntimes } from "./ios-BdZdNsAj.mjs";
10
+ import { Jn as checkEasAuth, nr as resolveRemote, rr as uploadRemote } from "./device-capacity-CpAVcKgq.mjs";
11
+ import { $ as tapBuildLog, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, ct as recordRunStats, it as readRunEstimates, lt as statsProjectKey, rt as createRunRecorder } from "./workspaces-Dh5N70qW.mjs";
12
+ import { H as readBundleId, _t as runCancellationSignal, vt as withNativeBuildRun } from "./toolchain-DCnWAxQL.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BpdDvA8Q.mjs";
14
+ import { C as providerUploadOutcome, D as storedAppId } from "./build-cache-BW8T4oD2.mjs";
15
+ import { m as listIosRuntimes } from "./ios-BhfpRfNf.mjs";
16
16
  import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
17
- import { C as setRemoteLogSink } from "./client-kU37gURU.mjs";
18
- import { d as resolveBuildPlacement } from "./selection-CH-MUVGD.mjs";
19
- import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-ivsfDj0v.mjs";
20
- import { f as settleFingerprintCheck } from "./prebuild-BfJII57G.mjs";
21
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-CNgxeOCG.mjs";
22
- import { t as acquireAndroidArtifact } from "./artifact-DmRtKFXW.mjs";
23
- import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-H-AxY7Ud.mjs";
24
- import { o as lastBuildRecord } from "./ios-project-DoTQYghg.mjs";
25
- import { t as acquireIosArtifact } from "./artifact-CNnTZs3R.mjs";
17
+ import { C as setRemoteLogSink } from "./client-KSWIeQLA.mjs";
18
+ import { L as resolveBuildPlacement, c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-BJbXovoO.mjs";
19
+ import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-Xf5Jd6LR.mjs";
20
+ import { f as settleFingerprintCheck } from "./prebuild-Di2IhUue.mjs";
21
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-C3_NkUlW.mjs";
22
+ import { n as recordBuild, r as recordedBuildKey } from "./recorded-build-BuGL_fnm.mjs";
23
+ import { E as resolveVariant } from "./support-Vckdzrmk.mjs";
24
+ import { t as acquireAndroidArtifact } from "./artifact-C3srrGVU.mjs";
25
+ import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-BkDpN5Mz.mjs";
26
+ import { o as lastBuildRecord } from "./ios-project-Cz0S1Sz-.mjs";
27
+ import { t as acquireIosArtifact } from "./artifact-ubNdxo_K.mjs";
26
28
  import { constants, promises } from "node:fs";
27
29
  import { basename, join } from "node:path";
28
30
  import { hostSimulatorArch } from "@stim-cli/core";
@@ -49,6 +51,7 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
49
51
  settings,
50
52
  settingsContext,
51
53
  env: context.env,
54
+ easProfile: options.easProfile,
52
55
  variant: options.variant ?? null,
53
56
  buildCache: options.buildCache !== false
54
57
  }, {
@@ -112,6 +115,20 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
112
115
  buildMachine: placement.selected,
113
116
  configuration: plan.plan.build.variant
114
117
  };
118
+ const easBuild = await resolveEasDevelopmentBuild({
119
+ context,
120
+ root,
121
+ platform: "android",
122
+ profile: options.easProfile,
123
+ note,
124
+ isExpo: integration.isExpo,
125
+ physical: false,
126
+ selectors: [options.variant],
127
+ buildCache: options.buildCache,
128
+ env: context.env,
129
+ signal: runCancellationSignal(context) ?? context.signal
130
+ });
131
+ if (isEasBuildFailure(easBuild)) throw Object.assign(new Error(easBuild.message ?? easBuild.code), easBuild, { details: easBuild });
115
132
  let artifact;
116
133
  let directory;
117
134
  let built = null;
@@ -160,7 +177,7 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
160
177
  },
161
178
  cacheProviderConfig: plan.plan.cacheProviderConfig,
162
179
  requestedBuildCache: options.buildCache !== false,
163
- easBuild: null,
180
+ easBuild,
164
181
  androidPackage: (await integration.appIds()).androidPackage,
165
182
  record,
166
183
  maxBuilds: getConcurrencyLimits().maxBuilds,
@@ -245,6 +262,13 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
245
262
  });
246
263
  if (built && !failureAfterCleanup) {
247
264
  finishRecord("ok");
265
+ recordBuild(root, recordedBuildKey({
266
+ platform: "android",
267
+ configuration: resolveVariant(options.variant, settings)
268
+ }), {
269
+ appPath: built.apkPath,
270
+ bundleId: built.androidPackage
271
+ });
248
272
  stats.record({
249
273
  failed: false,
250
274
  cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
@@ -285,7 +309,7 @@ async function buildIosOperation(context, root, options) {
285
309
  throw Object.assign(new Error(failure.message ?? failure.code), failure, { details: failure });
286
310
  }
287
311
  const { buildMachine, optimizations } = setup;
288
- const configuration = resolveConfiguration(options.configuration, settings);
312
+ const configuration = options.easProfile !== void 0 ? null : resolveConfiguration(options.configuration, settings);
289
313
  const buildScheme = resolveSchemeSelection(options, settings);
290
314
  const problem = await integration.schemeProblem(buildScheme, configuration);
291
315
  if (problem) throw Object.assign(new Error(problem.message ?? problem.code), problem);
@@ -342,6 +366,20 @@ async function buildIosOperation(context, root, options) {
342
366
  });
343
367
  stats.setProject(projectKey);
344
368
  progress.estimate(projectKey);
369
+ const easBuild = await resolveEasDevelopmentBuild({
370
+ context,
371
+ root,
372
+ platform: "ios",
373
+ profile: options.easProfile,
374
+ note,
375
+ isExpo: integration.isExpo,
376
+ physical: false,
377
+ selectors: [options.scheme, options.configuration],
378
+ buildCache: options.buildCache,
379
+ env: context.env,
380
+ signal: runCancellationSignal(context) ?? context.signal
381
+ });
382
+ if (isEasBuildFailure(easBuild)) throw Object.assign(new Error(easBuild.message ?? easBuild.code), easBuild, { details: easBuild });
345
383
  let artifact;
346
384
  let directory;
347
385
  let built = null;
@@ -400,6 +438,7 @@ async function buildIosOperation(context, root, options) {
400
438
  },
401
439
  device: null,
402
440
  optimizations: optimizations.ios,
441
+ easProfile: options.easProfile,
403
442
  cache,
404
443
  phase,
405
444
  note,
@@ -416,7 +455,7 @@ async function buildIosOperation(context, root, options) {
416
455
  providerConfig: resolveCacheProviderConfig(settingsContext),
417
456
  disabledByFlag: options.buildCache === false
418
457
  },
419
- easBuild: null,
458
+ easBuild,
420
459
  maxBuilds: getConcurrencyLimits().maxBuilds,
421
460
  progress: {
422
461
  phase,
@@ -504,6 +543,14 @@ async function buildIosOperation(context, root, options) {
504
543
  });
505
544
  if (built && !failureAfterCleanup) {
506
545
  finish("ok", built.appPath);
546
+ recordBuild(root, recordedBuildKey({
547
+ platform: "ios",
548
+ scheme: resolveSchemeSelection({ scheme: options.scheme }, settings),
549
+ configuration: resolveConfiguration(options.configuration, settings)
550
+ }), {
551
+ appPath: built.appPath,
552
+ bundleId: built.bundleId
553
+ });
507
554
  stats.record({
508
555
  failed: false,
509
556
  durationMs: Date.now() - started,
@@ -1,9 +1,9 @@
1
1
  import { d as throwIfCancelled, t as getExecutor, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
- import { y as sharedBuildCache } from "./workspace-state-BdZ-QgmB.mjs";
2
+ import { y as sharedBuildCache } from "./workspace-state-BhwAJBgA.mjs";
3
3
  import { a as killOnAbort, c as gitQuiet, o as git, r as childEnvironment, s as gitAsync } from "./operation-exec-DKlBcKAL.mjs";
4
- import { m as defaultAndroidLayout } from "./settings-B5IBDfTx.mjs";
5
- import { r as register } from "./cache-manifest-8JX9S1QJ.mjs";
6
- import { r as writeSignedTail, t as computeSignedTail } from "./apk-signed-tail-CPpA-3vu.mjs";
4
+ import { m as defaultAndroidLayout } from "./settings-Bap-qjnp.mjs";
5
+ import { r as register } from "./cache-manifest-CxWkZmUr.mjs";
6
+ import { r as writeSignedTail, t as computeSignedTail } from "./apk-signed-tail-eZyXIrnc.mjs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
9
9
  import { join } from "node:path";
@@ -416,6 +416,11 @@ function expoEnvFiles(env = {}) {
416
416
  ".env"
417
417
  ];
418
418
  }
419
+ /** The env files only a production bundle of an Expo app reads, beside the ones `expoEnvFiles` lists. */
420
+ function expoProductionEnvFiles(env = {}) {
421
+ if (/^(1|true)$/i.test(env.EXPO_NO_DOTENV ?? "")) return [];
422
+ return [".env.production.local", ".env.production"];
423
+ }
419
424
  const inNodeModules = (path) => path.split("/").includes("node_modules");
420
425
  /**
421
426
  * Absolute paths of the files git ignores that a fingerprint with `sources` hashed or the Expo config loader read:
@@ -866,4 +871,4 @@ function fingerprintDiffRecord({ changed, previousHash, hash }) {
866
871
  };
867
872
  }
868
873
  //#endregion
869
- export { untrackedMissLine as A, refingerprintAfterMutation as C, storedAssetManifest as D, storedAppId as E, readAssetManifest as F, assetDiffReason as M, captureAssetManifest as N, storedSources as O, compareAssetManifests as P, providerUploadOutcome as S, storeBuild as T, ignoredFingerprintPaths as _, compareSourceLists as a, prepareProviderDownloadDir as b, entryDir as c, expoEnvFiles as d, filesystemBuildCapability as f, gitignoredFingerprintInputs as g, fingerprintProject as h, changedOnlyInside as i, untrackedNativeFiles as j, trackedFingerprintPaths as k, evictBuild as l, fingerprintOptions as m, buildCacheKey as n, configInputsChanged as o, fingerprintDiffRecord as p, changedDuringBuildLine as r, diffFingerprintSources as s, artifactIn as t, expoConfigContents as u, inputsChangedDuringBuild as v, resolveBuild as w, providerDownloadPath as x, packageIn as y };
874
+ export { trackedFingerprintPaths as A, providerUploadOutcome as C, storedAppId as D, storeBuild as E, compareAssetManifests as F, readAssetManifest as I, untrackedNativeFiles as M, assetDiffReason as N, storedAssetManifest as O, captureAssetManifest as P, providerDownloadPath as S, resolveBuild as T, gitignoredFingerprintInputs as _, compareSourceLists as a, packageIn as b, entryDir as c, expoEnvFiles as d, expoProductionEnvFiles as f, fingerprintProject as g, fingerprintOptions as h, changedOnlyInside as i, untrackedMissLine as j, storedSources as k, evictBuild as l, fingerprintDiffRecord as m, buildCacheKey as n, configInputsChanged as o, filesystemBuildCapability as p, changedDuringBuildLine as r, diffFingerprintSources as s, artifactIn as t, expoConfigContents as u, ignoredFingerprintPaths as v, refingerprintAfterMutation as w, prepareProviderDownloadDir as x, inputsChangedDuringBuild as y };
@@ -1,10 +1,10 @@
1
1
  import { a as trackReportResource } from "./exec-CGuDzt40.mjs";
2
- import { i as formatDuration, l as phaseLine, m as shortHash, u as plural } from "./command-output-DjExb_tZ.mjs";
3
- import { an as makeTemporaryDirectory, sn as removeTemporaryEntryAsync } from "./settings-B5IBDfTx.mjs";
4
- import { On as easAuthNote } from "./ccache-ChBMXlBq.mjs";
5
- import { at as readStats, q as estimateBuild } from "./workspaces-B9v5V7Es.mjs";
6
- import { c as entryDir, t as artifactIn } from "./build-cache-Cqj4FGnX.mjs";
7
- import { l as predictBuildMiss, o as staleNativeDirRefusal } from "./prebuild-BfJII57G.mjs";
2
+ import { i as formatDuration, l as phaseLine, m as shortHash, u as plural } from "./command-output-T3cDctRE.mjs";
3
+ import { an as makeTemporaryDirectory, sn as removeTemporaryEntryAsync } from "./settings-Bap-qjnp.mjs";
4
+ import { Yn as easAuthNote } from "./device-capacity-CpAVcKgq.mjs";
5
+ import { at as readStats, q as estimateBuild } from "./workspaces-Dh5N70qW.mjs";
6
+ import { c as entryDir, t as artifactIn } from "./build-cache-BW8T4oD2.mjs";
7
+ import { l as predictBuildMiss, o as staleNativeDirRefusal } from "./prebuild-Di2IhUue.mjs";
8
8
  import chalk from "chalk";
9
9
  import { PROVIDER_LOAD_TIMEOUT_ENV, PROVIDER_LOAD_TIMEOUT_MS, buildResolveTimeoutMs, resolveTieredBuild, timeoutFromEnv } from "@stim-cli/cache";
10
10
  //#region src/commands/build-plan.ts
@@ -1,4 +1,4 @@
1
- import { d as getConfigDir } from "./config-BW0fAtoK.mjs";
1
+ import { d as getConfigDir } from "./config-BA3TgoIP.mjs";
2
2
  import { cacheDirRefusal, readCacheManifest, updateCacheManifest } from "@stim-cli/core";
3
3
  import { join, resolve } from "path";
4
4
  import { existsSync } from "fs";
@@ -1,2 +1,2 @@
1
- import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-8JX9S1QJ.mjs";
1
+ import { a as unregister, i as registeredCaches, n as readManifest, r as register, t as manifestPath } from "./cache-manifest-CxWkZmUr.mjs";
2
2
  export { manifestPath, readManifest, register, registeredCaches, unregister };
@@ -1,27 +1,28 @@
1
1
  import { E as debugLog } from "./exec-CGuDzt40.mjs";
2
- import { b as refuseRelativeStimPaths } from "./config-BW0fAtoK.mjs";
2
+ import { b as refuseRelativeStimPaths } from "./config-BA3TgoIP.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { runId, trace } from "@stim-cli/core/state";
5
5
  import { Command } from "commander";
6
6
  //#region bin/cli.ts
7
7
  const commands = /* @__PURE__ */ new Map([
8
- ["doctor", () => import("./doctor-CGBsS_68.mjs")],
9
- ["worktree", () => import("./worktree-C4MBOMz7.mjs")],
10
- ["start", () => import("./start-Diu8q6_U.mjs")],
11
- ["ports", () => import("./ports-CNzg1LYD.mjs")],
12
- ["stop", () => import("./stop-Dm9ON6Os.mjs")],
13
- ["ios", () => import("./ios-sUPbWqEh.mjs")],
14
- ["android", () => import("./android-BU4uBX8I.mjs")],
15
- ["web", () => import("./web-CIpHpGp8.mjs")],
16
- ["macos", () => import("./macos-kWGcfLzx.mjs")],
17
- ["reload", () => import("./reload-YPnvXGlB.mjs")],
18
- ["device", () => import("./device-CWPFAqs0.mjs")],
19
- ["logs", () => import("./logs-DuED-01Z.mjs")],
20
- ["settings", () => import("./settings-DoWHJopy.mjs")],
21
- ["status", () => import("./status-B-oeWS0Z.mjs")],
22
- ["stats", () => import("./stats-D4cW247z.mjs")],
23
- ["gc", () => import("./gc-B464w_a5.mjs")],
24
- ["guide", () => import("./guide-BFW-cB7R.mjs")]
8
+ ["doctor", () => import("./doctor-C-46SkBe.mjs")],
9
+ ["worktree", () => import("./worktree-DLm4s2Ib.mjs")],
10
+ ["start", () => import("./start-CVzivp35.mjs")],
11
+ ["ports", () => import("./ports-DhOSyWm9.mjs")],
12
+ ["stop", () => import("./stop-BiI4_VFG.mjs")],
13
+ ["ios", () => import("./ios-BZuhvLGr.mjs")],
14
+ ["android", () => import("./android-B0qTdwnt.mjs")],
15
+ ["web", () => import("./web-Dpj70t4p.mjs")],
16
+ ["macos", () => import("./macos-CduEmWAK.mjs")],
17
+ ["reload", () => import("./reload-BvDuvygc.mjs")],
18
+ ["device", () => import("./device-DNTWFFB1.mjs")],
19
+ ["logs", () => import("./logs-B-DMy1K0.mjs")],
20
+ ["remote", () => import("./remote-PD6CM0xp.mjs")],
21
+ ["settings", () => import("./settings-C_Xu4RNZ.mjs")],
22
+ ["status", () => import("./status-CIvU5-TF.mjs")],
23
+ ["stats", () => import("./stats-COoePEri.mjs")],
24
+ ["gc", () => import("./gc-8Qm_K1iy.mjs")],
25
+ ["guide", () => import("./guide-CuvHRP53.mjs")]
25
26
  ]);
26
27
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
27
28
  const program = new Command();
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-DjdvQG5U.mjs");
7
+ } else import("./cli-COdXswmc.mjs");
8
8
  //#endregion
9
9
  export {};
@@ -1,11 +1,11 @@
1
1
  import { C as operationState, E as debugLog, d as throwIfCancelled, r as reportSignal, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { K as resolveEndpoint, V as openAuthenticated, q as sayHello, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
2
+ import { H as openAuthenticated, J as sayHello, q as resolveEndpoint, v as loadConfig$1 } from "./config-BA3TgoIP.mjs";
3
3
  import { o as git, s as gitAsync } from "./operation-exec-DKlBcKAL.mjs";
4
- import { G as planCacheEmptying, R as maintenanceLogger, n as CCACHE_UNAVAILABLE, sr as discoverCaches, t as CCACHE_NOT_RUN, z as emptyCaches } from "./ccache-ChBMXlBq.mjs";
4
+ import { C as CCACHE_UNAVAILABLE, Or as discoverCaches, S as CCACHE_NOT_RUN, at as maintenanceLogger, ft as planCacheEmptying, ot as emptyCaches } from "./device-capacity-CpAVcKgq.mjs";
5
5
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
6
- import { A as COMPILATION_CACHE_NOT_RUN, D as readRubyVersion, S as workerToolchain, _t as runCancellationSignal, a as buildsOnlyOnWorker, b as toolchainNotes, c as iosToolchainAsync, j as COMPILATION_CACHE_UNAVAILABLE, o as cocoapodsDifference, y as toolchainMismatches } from "./toolchain-CYonNjd_.mjs";
6
+ import { A as COMPILATION_CACHE_NOT_RUN, D as readRubyVersion, S as workerToolchain, _t as runCancellationSignal, a as buildsOnlyOnWorker, b as toolchainNotes, c as iosToolchainAsync, j as COMPILATION_CACHE_UNAVAILABLE, o as cocoapodsDifference, y as toolchainMismatches } from "./toolchain-DCnWAxQL.mjs";
7
7
  import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
8
- import { f as workerFailureReason, m as pairedMachines, o as namedBuildMachine, t as OffloadRefusal } from "./selection-CH-MUVGD.mjs";
8
+ import { D as OffloadRefusal, M as namedBuildMachine, R as workerFailureReason, et as pairedMachines, u as isReleaseConfiguration } from "./support-BJbXovoO.mjs";
9
9
  import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
10
10
  import { a as sourceManifest, i as nativeTransferManifest, n as gitVisiblePaths, r as nativeFileDigest, t as checkNativeTransferMembership } from "./native-source-ChAGj7R1.mjs";
11
11
  import { t as BuildArtifactCache } from "./build-artifact-cache-D7B6seMj.mjs";
@@ -450,6 +450,7 @@ function placementLoad(choice) {
450
450
  maxBuilds: maxBuilds ?? 0
451
451
  })} there`;
452
452
  }
453
+ const UNSUPPORTED_OFFLOAD_REMEDY = "This build cannot leave this machine. Build it here with --remote-build local or auto where this machine can build it; stim guide settings lists what keeps a build here.";
453
454
  /**
454
455
  * Whether a build may go to a remote machine at all, before any machine is asked. `auto` keeps the build here while
455
456
  * this machine has a free `concurrency.maxBuilds` slot and its load per core is under `server.maxLoadPerCore`.
@@ -459,7 +460,7 @@ function placementLoad(choice) {
459
460
  function offloadPlacement({ machines, here, unsupported, localEnabled = true, selected = "auto" }) {
460
461
  const word = placementWord(selected);
461
462
  if (word === null) {
462
- if (unsupported) throw new OffloadRefusal(selected, `${unsupported}, so a named remote machine cannot take it`);
463
+ if (unsupported) throw new OffloadRefusal(selected, `${unsupported}, so a named remote machine cannot take it`, UNSUPPORTED_OFFLOAD_REMEDY);
463
464
  if (machines === 0) throw new OffloadRefusal(selected, "no remote machine is paired");
464
465
  return {
465
466
  offload: true,
@@ -474,8 +475,8 @@ function offloadPlacement({ machines, here, unsupported, localEnabled = true, se
474
475
  };
475
476
  if (!localEnabled || !mayRunHere(word)) {
476
477
  const why = word === "remote-only" ? "remote-only never builds here" : "local is disabled in remote.buildPoolDisabled";
477
- const reason = unsupported ?? (machines === 0 ? "no enabled remote machine is paired" : null);
478
- if (reason) throw new OffloadRefusal(selected, `${reason}; ${why}`);
478
+ if (unsupported) throw new OffloadRefusal(selected, `${unsupported}; ${why}`, UNSUPPORTED_OFFLOAD_REMEDY);
479
+ if (machines === 0) throw new OffloadRefusal(selected, `no enabled remote machine is paired; ${why}`);
479
480
  return {
480
481
  offload: true,
481
482
  code: word === "remote-only" ? "remote-only" : "local-disabled",
@@ -1113,7 +1114,7 @@ function startPods(choice, request) {
1113
1114
  if (request.platform !== "ios" || !leavesPodsToWorker(choice, request)) return {};
1114
1115
  return {
1115
1116
  podsOnWorker: true,
1116
- ...request.reuseArtifact === true && choice.connection.supports("build-reuse-artifact") ? { reuseArtifact: true } : {}
1117
+ ...request.reuseArtifact === true && choice.connection.supports("build-reuse-artifact") && !isReleaseConfiguration(request.configuration) ? { reuseArtifact: true } : {}
1117
1118
  };
1118
1119
  }
1119
1120
  /**
@@ -1,11 +1,11 @@
1
1
  import { T as process_identity_exports } from "./exec-CGuDzt40.mjs";
2
- import { k as workspaceLogsDir } from "./workspace-state-BdZ-QgmB.mjs";
2
+ import { k as workspaceLogsDir } from "./workspace-state-BhwAJBgA.mjs";
3
3
  import { t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { _t as validateDeviceSlot, dt as deviceSlotKey } from "./config-BW0fAtoK.mjs";
5
- import { c as watchAppPid, i as parseLogcatLine, o as startAndroidLogcat, s as waitForAppPid, t as androidClockOffset } from "./android-B2DSKg-A.mjs";
4
+ import { ft as deviceSlotKey, vt as validateDeviceSlot } from "./config-BA3TgoIP.mjs";
5
+ import { c as watchAppPid, i as parseLogcatLine, o as startAndroidLogcat, s as waitForAppPid, t as androidClockOffset } from "./android-5wkcMFDG.mjs";
6
6
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
7
7
  import { a as startIosDeviceConsole, i as parseDeviceConsoleLine } from "./ios-device-DLdEDWJj.mjs";
8
- import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-hC7xvvxF.mjs";
8
+ import { a as unregisterCollector, i as registerCollector, r as readCollectors, t as collectorProcessTitle } from "./ownership-C3y8wLSl.mjs";
9
9
  import { n as parseLogStreamLine, r as startIosLogStream, t as appNameFromBundleId } from "./ios-Qam0bT9n.mjs";
10
10
  import { existsSync } from "node:fs";
11
11
  import { isAbsolute, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
2
- import { t as NO_PROJECT_REFUSAL } from "./project-DU3jjnBE.mjs";
2
+ import { t as NO_PROJECT_REFUSAL } from "./project-Clk1JAWL.mjs";
3
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