stim 1.35.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 (146) hide show
  1. package/dist/{acquire-artifact-0E_iw7Rf.mjs → acquire-artifact-DGTHCd0Q.mjs} +19 -3
  2. package/dist/{act-CyxFP8Vj.mjs → act-CvN9xyV6.mjs} +18 -18
  3. package/dist/{activity-BQpJpAjA.mjs → activity-BpdDvA8Q.mjs} +4 -4
  4. package/dist/{agent-device-usage-output-BoOC3ZF9.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-CjcJE7uA.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-YRb1UzSy.mjs → android-e9WP10cE.mjs} +47 -39
  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-BG4h_WTC.mjs → artifact-C3srrGVU.mjs} +36 -14
  16. package/dist/{artifact-2NIRz6SC.mjs → artifact-ubNdxo_K.mjs} +43 -14
  17. package/dist/{auto-placement-CBdWa87P.mjs → auto-placement-CKFpFCuq.mjs} +7 -7
  18. package/dist/{browser-web-CNlRugJv.mjs → browser-web-B63vLrj6.mjs} +11 -11
  19. package/dist/{build-CNE3Wo5-.mjs → build-B_Dx9SKJ.mjs} +72 -24
  20. package/dist/{build-cache-_fkewiwH.mjs → build-cache-BW8T4oD2.mjs} +4 -4
  21. package/dist/{build-plan-BSgR9yKo.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-DK24VzHi.mjs → cli-COdXswmc.mjs} +19 -18
  25. package/dist/cli.mjs +1 -1
  26. package/dist/{client-Dy0eJJtz.mjs → client-KSWIeQLA.mjs} +4 -4
  27. package/dist/collector-run.mjs +4 -4
  28. package/dist/{command-output-CGxrQ3Bd.mjs → command-output-T3cDctRE.mjs} +1 -1
  29. package/dist/{config-BW0fAtoK.mjs → config-BA3TgoIP.mjs} +59 -10
  30. package/dist/{dependencies-IVl2Ga2D.mjs → dependencies-LH-7k1Vr.mjs} +35 -35
  31. package/dist/{dependency-state-mL5g4H6K.mjs → dependency-state-Blfp3AkG.mjs} +1 -1
  32. package/dist/{dev-client-DDApoVvd.mjs → dev-client-MO_DjTZr.mjs} +2 -2
  33. package/dist/{device-p_cp8IzW.mjs → device-BZWt_aPJ.mjs} +11 -11
  34. package/dist/{device-mOFYiHiw.mjs → device-DNTWFFB1.mjs} +12 -12
  35. package/dist/{device-android-C-biM49_.mjs → device-android-BB9Lugr8.mjs} +8 -8
  36. package/dist/{device-capacity-C0PiTyRb.mjs → device-capacity-CpAVcKgq.mjs} +15 -15
  37. package/dist/device-host-worker.mjs +13 -13
  38. package/dist/{device-pool-nsMvt2X2.mjs → device-pool-BJToGG-q.mjs} +3 -3
  39. package/dist/{device-provision-BYYJuRKZ.mjs → device-provision-CxQDCtrc.mjs} +9 -9
  40. package/dist/{doctor-BBAb8NLe.mjs → doctor-C-46SkBe.mjs} +1 -1
  41. package/dist/{doctor-RosbBfTV.mjs → doctor-CYZ45LnX.mjs} +20 -20
  42. package/dist/{doctor-BptE4PaK.mjs → doctor-DV639Iw_.mjs} +15 -15
  43. package/dist/doctor-fingerprint.mjs +1 -1
  44. package/dist/{doctor-watchman-CKOnCINh.mjs → doctor-watchman-TZxYt_98.mjs} +4 -4
  45. package/dist/{eas-build-BxJdzQnF.mjs → eas-build-Xf5Jd6LR.mjs} +2 -2
  46. package/dist/{eas-fallback-DU2WDF8r.mjs → eas-fallback-DNYPNinw.mjs} +4 -4
  47. package/dist/{eas-session-ledger-DCUfh6m7.mjs → eas-session-ledger-CXZ4aix0.mjs} +5 -5
  48. package/dist/{error-diagnostics-D6wlK-yX.mjs → error-diagnostics-CvB5bpPU.mjs} +8 -8
  49. package/dist/{gc-CvMEytXz.mjs → gc-8Qm_K1iy.mjs} +2 -2
  50. package/dist/{gc-BUkonUfz.mjs → gc-DiUhrVFo.mjs} +17 -17
  51. package/dist/{guide-BWozWG7D.mjs → guide-CuvHRP53.mjs} +113 -56
  52. package/dist/{hosted-android-y6K3DKQT.mjs → hosted-android-D__HGVIO.mjs} +3 -3
  53. package/dist/{hosted-client-Bb89P6an.mjs → hosted-client-DMOOu8vD.mjs} +6 -6
  54. package/dist/{hosted-logs-DYPsnWMF.mjs → hosted-logs-CClIktQM.mjs} +6 -6
  55. package/dist/{hosted-logs-sync-DfUJ2GpF.mjs → hosted-logs-sync-B7XCeqVm.mjs} +5 -5
  56. package/dist/{hosted-macos-DsEzYVY_.mjs → hosted-macos-D4sDJIbB.mjs} +5 -5
  57. package/dist/{hosted-native-C9xQYYFb.mjs → hosted-native-BiiUG_Q6.mjs} +7 -7
  58. package/dist/{ios-BCKxjpRp.mjs → ios-BZuhvLGr.mjs} +8 -8
  59. package/dist/{ios-BdZdNsAj.mjs → ios-BhfpRfNf.mjs} +4 -4
  60. package/dist/{ios-FhMkDfNC.mjs → ios-BhpUWyN7.mjs} +39 -30
  61. package/dist/{ios-device-DMOnaH5n.mjs → ios-device-vhYL1N--.mjs} +1 -1
  62. package/dist/{ios-project-PXBDoaii.mjs → ios-project-Cz0S1Sz-.mjs} +7 -7
  63. package/dist/{ios-signing-CCFNjjWU.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-07ikLRJJ.mjs → js-swap-Desu2iII.mjs} +4 -4
  66. package/dist/{launch-CTq5gBim.mjs → launch-6ckG9UrC.mjs} +19 -19
  67. package/dist/{lightened-DikgC3-S.mjs → lightened-B6TnpHMX.mjs} +4 -4
  68. package/dist/{logs-DwI3Rkpf.mjs → logs-B-DMy1K0.mjs} +7 -7
  69. package/dist/{logs-YDMfEohb.mjs → logs-CO0CJRiC.mjs} +5 -5
  70. package/dist/{macos-BoNM-l6f.mjs → macos-B1aCXhem.mjs} +19 -19
  71. package/dist/{macos-C_e9f5-5.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-Mv4YTrVN.mjs → native-android-28NOG2-y.mjs} +17 -17
  78. package/dist/{native-gradle-artifact-inputs-C_TU6wPq.mjs → native-gradle-artifact-inputs-DxVEtS6_.mjs} +3 -3
  79. package/dist/{native-runtime-oDqT4UES.mjs → native-runtime-C3_NkUlW.mjs} +6 -6
  80. package/dist/{native-xcode-inputs-DsozghTX.mjs → native-xcode-inputs-BWFTw5cJ.mjs} +2 -2
  81. package/dist/{native-xcode-ios-UXnH9NRY.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-B9WyCBKQ.mjs → phone-reverses-BhSxbqom.mjs} +4 -4
  86. package/dist/{placement-log-D0DZLcJk.mjs → placement-log-B8RCSzOm.mjs} +1 -1
  87. package/dist/{plan-placement-DqmLrWoX.mjs → plan-placement-BI4r55aP.mjs} +6 -6
  88. package/dist/{ports-C1_1Qgdy.mjs → ports-DhOSyWm9.mjs} +3 -3
  89. package/dist/{prebuild-BptrXmh_.mjs → prebuild-Di2IhUue.mjs} +9 -9
  90. package/dist/{project-Dqqj3IkW.mjs → project-Clk1JAWL.mjs} +15 -15
  91. package/dist/{react-native-android-Bsm_o4A8.mjs → react-native-android-bdHBMrnf.mjs} +23 -23
  92. package/dist/{react-native-build-BTUcE926.mjs → react-native-build-CJega_NM.mjs} +7 -7
  93. package/dist/{react-native-doctor-CfsCTKZt.mjs → react-native-doctor-CY7BGITE.mjs} +5 -5
  94. package/dist/{react-native-ios-_cK2pjZn.mjs → react-native-ios-Bo5EDVel.mjs} +14 -14
  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-DsTMtMDU.mjs → reload-A_axEbeS.mjs} +14 -14
  98. package/dist/{reload-CXgce4Yo.mjs → reload-BvDuvygc.mjs} +1 -1
  99. package/dist/remote-PD6CM0xp.mjs +158 -0
  100. package/dist/{remote-BsmYHUxH.mjs → remote-WK_swZEw.mjs} +8 -8
  101. package/dist/{result-DK6nTO-M.mjs → result-BkDpN5Mz.mjs} +23 -17
  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-Cu2w-UjB.mjs → server-command-S00-ddjK.mjs} +4 -4
  105. package/dist/server-expo-BWJDa7Qb.mjs +2 -0
  106. package/dist/{server-expo-CjQwxvIi.mjs → server-expo-cc-cmfsl.mjs} +2 -2
  107. package/dist/{settings-B5IBDfTx.mjs → settings-Bap-qjnp.mjs} +1 -1
  108. package/dist/{settings-DcmVICCn.mjs → settings-C_Xu4RNZ.mjs} +2 -2
  109. package/dist/{settings-payload-BoiFMiFq.mjs → settings-payload-D5jjhmrw.mjs} +4 -4
  110. package/dist/{settings-write-B3LzEVwf.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-DsQmPdlg.mjs → slot-launch-qEQVTth7.mjs} +6 -6
  114. package/dist/{stage-Dqk0qvaI.mjs → stage-CxVI_MlP.mjs} +1 -1
  115. package/dist/{start-GkRBR1e3.mjs → start-CVzivp35.mjs} +1 -1
  116. package/dist/{start-DIFiT2P5.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-Dz08IopP.mjs → stats-COoePEri.mjs} +4 -4
  120. package/dist/{status-DhKv_e8a.mjs → status-CIg0k7Qb.mjs} +21 -21
  121. package/dist/{status-Dost__Vn.mjs → status-CIvU5-TF.mjs} +1 -1
  122. package/dist/{status-DTFhDnd1.mjs → status-CQWmNl1f.mjs} +1 -1
  123. package/dist/{status-watch-UecLnPQD.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-CcZISot5.mjs → stop-BEBBruvD.mjs} +4 -4
  127. package/dist/{stop-QFOqgICJ.mjs → stop-BiI4_VFG.mjs} +2 -2
  128. package/dist/{stop-vRe6TQk5.mjs → stop-C3d5qG7C.mjs} +15 -15
  129. package/dist/supervisor-run.mjs +12 -12
  130. package/dist/{support-DW575Dnx.mjs → support-BJbXovoO.mjs} +73 -34
  131. package/dist/{support-CNqJDBrH.mjs → support-Vckdzrmk.mjs} +5 -5
  132. package/dist/{swiftpm-artifact-inputs-DQTJTczX.mjs → swiftpm-artifact-inputs-DbuF-Yrr.mjs} +1 -1
  133. package/dist/{swiftpm-macos-BKczZ0k9.mjs → swiftpm-macos-Bu8xeBfM.mjs} +8 -8
  134. package/dist/{toolchain-BDlugtoh.mjs → toolchain-CIRdNl-c.mjs} +1 -1
  135. package/dist/{toolchain-DRQyCvlp.mjs → toolchain-DCnWAxQL.mjs} +71 -7
  136. package/dist/{warm-progress-q11Vdvhh.mjs → warm-progress-DwsGBpph.mjs} +3 -3
  137. package/dist/{web-TDWjHUT3.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-CY3KSdC0.mjs → workspaces-Dh5N70qW.mjs} +11 -11
  142. package/dist/{worktree-D6myrQ2H.mjs → worktree-DLm4s2Ib.mjs} +1 -1
  143. package/dist/{worktree-fKKe8j5M.mjs → worktree-Yw3EW77B.mjs} +24 -24
  144. package/package.json +7 -7
  145. package/dist/server-expo-DbSypdNl.mjs +0 -2
  146. package/dist/web-D1m1LKEz.mjs +0 -2
@@ -1,15 +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-CGxrQ3Bd.mjs";
4
- import { Gn as RESOLVE_TIMEOUT_MS, Xn as isEasAuthFailureText, Yn as easAuthNote } from "./device-capacity-C0PiTyRb.mjs";
5
- import { A as COMPILATION_CACHE_NOT_RUN, F as compilationCacheActivityLine, _t as runCancellationSignal, lt as cancelledFailure } from "./toolchain-DRQyCvlp.mjs";
6
- import { C as providerUploadOutcome, D as storedAppId, S as providerDownloadPath, x as prepareProviderDownloadDir } from "./build-cache-_fkewiwH.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-Dy0eJJtz.mjs";
8
- import { A as fingerprintMismatchRemedy, D as OffloadRefusal, F as requireLocalBuild, M as namedBuildMachine, O as automaticBuild, P as podsFailedRemedy, S as xcodeFailureReport, et as predictedRefusal, j as missingPackageManagerRemedy, p as printDiagnostics, u as isReleaseConfiguration } from "./support-DW575Dnx.mjs";
9
- import { f as settleFingerprintCheck, u as skippedMissReason } from "./prebuild-BptrXmh_.mjs";
10
- import { t as buildPlacementRecord } from "./placement-log-D0DZLcJk.mjs";
11
- import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-0E_iw7Rf.mjs";
12
- import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-PXBDoaii.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";
13
13
  import { rmSync } from "node:fs";
14
14
  import { join } from "node:path";
15
15
  import { machineCapacity } from "@stim-cli/core/state";
@@ -622,15 +622,16 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
622
622
  if (!result.ok) {
623
623
  phase("build", `FAILED after ${formatDuration(result.durationMs)}`);
624
624
  printDiagnostics(note, result);
625
+ const transcript = retainFailedTranscript(logFile);
625
626
  const report = result.compilationCacheCorruption ? await clearCorruptCompilationCache(result.compilationCacheCorruption, root) : {
626
627
  code: result.code,
627
- ...xcodeFailureReport(result, logFile)
628
+ ...xcodeFailureReport(result, transcript)
628
629
  };
629
630
  fail({
630
631
  code: report.code,
631
632
  message: report.message,
632
633
  remedy: report.remedy,
633
- logPath: logFile,
634
+ logPath: transcript,
634
635
  build: {
635
636
  ...buildFailure,
636
637
  diagnostics: result.diagnostics
@@ -858,5 +859,33 @@ async function acquireIosArtifact({ context, root, logFile, recipe, physical, co
858
859
  }
859
860
  };
860
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
+ }
861
890
  //#endregion
862
- export { acquireIosArtifact as t };
891
+ export { acquireIosArtifactOrRecorded as n, acquireIosArtifact as t };
@@ -1,10 +1,10 @@
1
- import { m as getProject, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
2
- import { F as peekBudget, d as peekDeviceSlots, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-C0PiTyRb.mjs";
3
- import { z as readHostMemoryPressureAsync } from "./ios-BdZdNsAj.mjs";
4
- import { I as resolveBuildMachine, M as namedBuildMachine, nt as hostingMachines } from "./support-DW575Dnx.mjs";
5
- import { h as requireHostedAppMode, l as call, u as connectHost } from "./hosted-client-Bb89P6an.mjs";
6
- import { c as writeHostedNativeAsync, r as readHostedNative } from "./ios-state-CWsBysyN.mjs";
7
- import { i as prepareHostedNative } from "./hosted-native-C9xQYYFb.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";
8
8
  import { ambientEnv } from "@stim-cli/core";
9
9
  import { automaticMachineEnabled, isJsonObject, machineCapacity, mayRunHere, parseHostedChoice, parseHostedNativeOffer, prefersRemote } from "@stim-cli/core/state";
10
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-CGxrQ3Bd.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-Dqqj3IkW.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 { dn as readMetroRecords } from "./device-capacity-C0PiTyRb.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-CY3KSdC0.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-DIFiT2P5.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,27 +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-CGxrQ3Bd.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-Dqqj3IkW.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 { Jn as checkEasAuth, nr as resolveRemote, rr as uploadRemote } from "./device-capacity-C0PiTyRb.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-CY3KSdC0.mjs";
12
- import { H as readBundleId, _t as runCancellationSignal, vt as withNativeBuildRun } from "./toolchain-DRQyCvlp.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BQpJpAjA.mjs";
14
- import { C as providerUploadOutcome, D as storedAppId } from "./build-cache-_fkewiwH.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-Dy0eJJtz.mjs";
18
- import { L as resolveBuildPlacement, c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-DW575Dnx.mjs";
19
- import { f as settleFingerprintCheck } from "./prebuild-BptrXmh_.mjs";
20
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-oDqT4UES.mjs";
21
- import { t as acquireAndroidArtifact } from "./artifact-BG4h_WTC.mjs";
22
- import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-DK6nTO-M.mjs";
23
- import { o as lastBuildRecord } from "./ios-project-PXBDoaii.mjs";
24
- import { t as acquireIosArtifact } from "./artifact-2NIRz6SC.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";
25
28
  import { constants, promises } from "node:fs";
26
29
  import { basename, join } from "node:path";
27
30
  import { hostSimulatorArch } from "@stim-cli/core";
@@ -48,6 +51,7 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
48
51
  settings,
49
52
  settingsContext,
50
53
  env: context.env,
54
+ easProfile: options.easProfile,
51
55
  variant: options.variant ?? null,
52
56
  buildCache: options.buildCache !== false
53
57
  }, {
@@ -111,6 +115,20 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
111
115
  buildMachine: placement.selected,
112
116
  configuration: plan.plan.build.variant
113
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 });
114
132
  let artifact;
115
133
  let directory;
116
134
  let built = null;
@@ -159,7 +177,7 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
159
177
  },
160
178
  cacheProviderConfig: plan.plan.cacheProviderConfig,
161
179
  requestedBuildCache: options.buildCache !== false,
162
- easBuild: null,
180
+ easBuild,
163
181
  androidPackage: (await integration.appIds()).androidPackage,
164
182
  record,
165
183
  maxBuilds: getConcurrencyLimits().maxBuilds,
@@ -244,6 +262,13 @@ async function buildAndroidOperation(context, root, options, { artifactScope, ca
244
262
  });
245
263
  if (built && !failureAfterCleanup) {
246
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
+ });
247
272
  stats.record({
248
273
  failed: false,
249
274
  cacheHit: record.cacheHit === "local" || record.cacheHit === "remote" ? record.cacheHit : false,
@@ -284,7 +309,7 @@ async function buildIosOperation(context, root, options) {
284
309
  throw Object.assign(new Error(failure.message ?? failure.code), failure, { details: failure });
285
310
  }
286
311
  const { buildMachine, optimizations } = setup;
287
- const configuration = resolveConfiguration(options.configuration, settings);
312
+ const configuration = options.easProfile !== void 0 ? null : resolveConfiguration(options.configuration, settings);
288
313
  const buildScheme = resolveSchemeSelection(options, settings);
289
314
  const problem = await integration.schemeProblem(buildScheme, configuration);
290
315
  if (problem) throw Object.assign(new Error(problem.message ?? problem.code), problem);
@@ -341,6 +366,20 @@ async function buildIosOperation(context, root, options) {
341
366
  });
342
367
  stats.setProject(projectKey);
343
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 });
344
383
  let artifact;
345
384
  let directory;
346
385
  let built = null;
@@ -399,6 +438,7 @@ async function buildIosOperation(context, root, options) {
399
438
  },
400
439
  device: null,
401
440
  optimizations: optimizations.ios,
441
+ easProfile: options.easProfile,
402
442
  cache,
403
443
  phase,
404
444
  note,
@@ -415,7 +455,7 @@ async function buildIosOperation(context, root, options) {
415
455
  providerConfig: resolveCacheProviderConfig(settingsContext),
416
456
  disabledByFlag: options.buildCache === false
417
457
  },
418
- easBuild: null,
458
+ easBuild,
419
459
  maxBuilds: getConcurrencyLimits().maxBuilds,
420
460
  progress: {
421
461
  phase,
@@ -503,6 +543,14 @@ async function buildIosOperation(context, root, options) {
503
543
  });
504
544
  if (built && !failureAfterCleanup) {
505
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
+ });
506
554
  stats.record({
507
555
  failed: false,
508
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";
@@ -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-CGxrQ3Bd.mjs";
3
- import { an as makeTemporaryDirectory, sn as removeTemporaryEntryAsync } from "./settings-B5IBDfTx.mjs";
4
- import { Yn as easAuthNote } from "./device-capacity-C0PiTyRb.mjs";
5
- import { at as readStats, q as estimateBuild } from "./workspaces-CY3KSdC0.mjs";
6
- import { c as entryDir, t as artifactIn } from "./build-cache-_fkewiwH.mjs";
7
- import { l as predictBuildMiss, o as staleNativeDirRefusal } from "./prebuild-BptrXmh_.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-BBAb8NLe.mjs")],
9
- ["worktree", () => import("./worktree-D6myrQ2H.mjs")],
10
- ["start", () => import("./start-GkRBR1e3.mjs")],
11
- ["ports", () => import("./ports-C1_1Qgdy.mjs")],
12
- ["stop", () => import("./stop-QFOqgICJ.mjs")],
13
- ["ios", () => import("./ios-BCKxjpRp.mjs")],
14
- ["android", () => import("./android-CjcJE7uA.mjs")],
15
- ["web", () => import("./web-D1m1LKEz.mjs")],
16
- ["macos", () => import("./macos-C_e9f5-5.mjs")],
17
- ["reload", () => import("./reload-CXgce4Yo.mjs")],
18
- ["device", () => import("./device-mOFYiHiw.mjs")],
19
- ["logs", () => import("./logs-DwI3Rkpf.mjs")],
20
- ["settings", () => import("./settings-DcmVICCn.mjs")],
21
- ["status", () => import("./status-Dost__Vn.mjs")],
22
- ["stats", () => import("./stats-Dz08IopP.mjs")],
23
- ["gc", () => import("./gc-CvMEytXz.mjs")],
24
- ["guide", () => import("./guide-BWozWG7D.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-DK24VzHi.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 { C as CCACHE_UNAVAILABLE, Or as discoverCaches, S as CCACHE_NOT_RUN, at as maintenanceLogger, ft as planCacheEmptying, ot as emptyCaches } from "./device-capacity-C0PiTyRb.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-DRQyCvlp.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 { $ as pairedMachines, D as OffloadRefusal, M as namedBuildMachine, R as workerFailureReason, u as isReleaseConfiguration } from "./support-DW575Dnx.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";
@@ -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-Dqqj3IkW.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
@@ -2,7 +2,7 @@ import { D as ownership_claim_exports, T as process_identity_exports, a as track
2
2
  import { t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
3
3
  import { join } from "node:path";
4
4
  import { ambientEnv, configDir, ensurePrivateDir } from "@stim-cli/core";
5
- import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
5
+ import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1, wrongTailnet } from "@stim-cli/core/state";
6
6
  import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
7
7
  import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
8
8
  import { InvalidArgumentError } from "commander";
@@ -353,7 +353,20 @@ function tailscaleDiagnosis(code) {
353
353
  };
354
354
  }
355
355
  }
356
- function notOnTailnetDiagnosis(entry, ambiguous) {
356
+ const tailnetLabel = (tailnet) => tailnet.suffix ? `${tailnet.name} (${tailnet.suffix})` : tailnet.name;
357
+ /** A machine that is not on the tailnet this Mac is signed in to now, but was on the one it was signed in to at approval. */
358
+ function wrongTailnetDiagnosis(entry, wrong) {
359
+ const owner = wrong.owner ? `, or to ${wrong.owner}, the tailnet that owns ${entry}` : "";
360
+ return {
361
+ layer: "peer",
362
+ code: "peer-wrong-tailnet",
363
+ title: "Other Tailscale account",
364
+ message: `This Mac asked ${entry} for access while it was signed in to the Tailscale tailnet ${tailnetLabel(wrong.recorded)}. This Mac is signed in to ${tailnetLabel(wrong.current)} now, and no peer there is named ${entry}.`,
365
+ remedy: `Switch Tailscale on this Mac to ${tailnetLabel(wrong.recorded)}${owner}, then run \`stim doctor\` again.`
366
+ };
367
+ }
368
+ function notOnTailnetDiagnosis(entry, ambiguous, wrong) {
369
+ if (wrong && !ambiguous) return wrongTailnetDiagnosis(entry, wrong);
357
370
  return {
358
371
  layer: "peer",
359
372
  code: ambiguous ? "peer-ambiguous" : "peer-not-found",
@@ -498,7 +511,7 @@ function unconfirmedKeyFinding(code, entry, fingerprint) {
498
511
  level: "note",
499
512
  title: `Remote machine ${entry} needs its server key confirmed`,
500
513
  detail: `${entry} approved this machine and answered with the stim-server key fingerprint ${fingerprint}. On the local network nothing vouches for that key, so Stim pins it only after a person checks it against the fingerprint \`stim-server setup\` printed there. Until then this machine does not use ${entry}.`,
501
- fix: `Run \`stim doctor --fix\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
514
+ fix: `Run \`stim remote list\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
502
515
  };
503
516
  }
504
517
  function diagnosisFinding(code, entry, diagnosis) {
@@ -637,7 +650,7 @@ function outdatedServer(entry, version, command) {
637
650
  return {
638
651
  title: `Remote machine ${entry} runs an older stim-server`,
639
652
  detail: `The stim-server on ${entry} speaks an older protocol than this Stim, so it cannot authenticate this machine.`,
640
- fix: command ? `${update}, then run this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `${update}, then run \`stim doctor --fix\` here.`
653
+ fix: command ? `${update}, then run this there to approve this machine: ${command}\nAfter approving, run \`stim remote list\` on this machine to reconnect.` : `${update}, then run \`stim remote add ${entry}\` here.`
641
654
  };
642
655
  }
643
656
  /**
@@ -883,9 +896,19 @@ async function diagnoseTailscale(io) {
883
896
  const reading = readTailscale(io.rawStatus ? await io.rawStatus() : null);
884
897
  return tailscaleDiagnosis(reading.running ? "tailscale-unavailable" : reading.code);
885
898
  }
886
- /** Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. */
899
+ /**
900
+ * Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. A machine
901
+ * missing from the tailnet this Mac is signed in to says so when the credential recorded another tailnet.
902
+ */
887
903
  async function resolveEndpoint(credential, status = () => tailscaleStatusAsync(signal), signal) {
888
- return machineEndpoint(credential.machine, parseMachine(credential.machine)?.transport === "tailscale" ? await status() : null);
904
+ const parsed = parseMachine(credential.machine);
905
+ const current = parsed?.transport === "tailscale" ? await status() : null;
906
+ const found = machineEndpoint(credential.machine, current);
907
+ if (typeof found !== "string" || parsed?.transport !== "tailscale" || findPeer(current, parsed.name) !== "missing") return found;
908
+ const wrong = wrongTailnet(credential, current);
909
+ if (!wrong) return found;
910
+ const { message, remedy } = wrongTailnetDiagnosis(credential.machine, wrong);
911
+ return `${message} ${remedy}`.replace(/\.$/, "");
889
912
  }
890
913
  /**
891
914
  * Shows a local network machine's server key fingerprint and asks a person whether it matches the one
@@ -910,7 +933,7 @@ function keyConfirmer(ask) {
910
933
  }
911
934
  /** The remedy for a pending request: the printed setup command, or where the person finds it. */
912
935
  function setupRemedy(entry, command) {
913
- return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
936
+ return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim remote list\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
914
937
  }
915
938
  function setupCommand(machine, ticket, expiresAt, flags, version) {
916
939
  const parsed = parseMachine(machine);
@@ -928,10 +951,12 @@ function newPending(input, ticket, expiresAt, now) {
928
951
  state: "pending",
929
952
  requestedAt: new Date(now).toISOString(),
930
953
  ticket,
931
- ...expiresAt ? { expiresAt } : {}
954
+ ...expiresAt ? { expiresAt } : {},
955
+ ...input.tailnet ? { tailnet: input.tailnet } : {}
932
956
  };
933
957
  }
934
958
  function approved(input, reply, requestedAt) {
959
+ const tailnet = input.credential?.tailnet ?? input.tailnet;
935
960
  return {
936
961
  state: "approved",
937
962
  credential: {
@@ -941,7 +966,8 @@ function approved(input, reply, requestedAt) {
941
966
  state: "approved",
942
967
  requestedAt,
943
968
  serverKey: reply.serverKey,
944
- deviceId: reply.result.device.id
969
+ deviceId: reply.result.device.id,
970
+ ...tailnet ? { tailnet } : {}
945
971
  },
946
972
  result: reply.result
947
973
  };
@@ -1318,6 +1344,29 @@ async function writeConfigSettingAsync(target, dottedKey, value, signal) {
1318
1344
  const status = target.scope === "machine" && (dottedKey === "remote.machines" || localDevicePoolOff(dottedKey, value)) ? await tailscaleStatusAsync(signal) : null;
1319
1345
  return withConfigLockAsync(() => applyConfigSetting(target, dottedKey, value, status), signal);
1320
1346
  }
1347
+ /**
1348
+ * Replaces machine-scope `remote.machines` with `change` applied to the list read under the config lock, so a
1349
+ * concurrent writer's entries are kept. `status` is the `tailscale status` the automatic device pool check reads.
1350
+ * Returns the list before and after; null before when the setting is not a list of strings, in which case nothing is
1351
+ * written.
1352
+ */
1353
+ async function updateRemoteMachinesAsync(change, status, signal) {
1354
+ signal?.throwIfAborted();
1355
+ return withConfigLockAsync(() => {
1356
+ const remote = loadConfig()?.remote;
1357
+ const current = remote === void 0 ? [] : isJsonObject(remote) ? remote.machines === void 0 ? [] : remote.machines : null;
1358
+ if (!Array.isArray(current) || !current.every((each) => typeof each === "string")) return {
1359
+ before: null,
1360
+ after: []
1361
+ };
1362
+ const after = change(current);
1363
+ if (after.length !== current.length || after.some((each, at) => each !== current[at])) applyConfigSetting({ scope: "machine" }, "remote.machines", after, status);
1364
+ return {
1365
+ before: current,
1366
+ after
1367
+ };
1368
+ }, signal);
1369
+ }
1321
1370
  function applyConfigSetting(target, dottedKey, value, status) {
1322
1371
  const cfg = value === void 0 ? loadConfig() : ensureConfig();
1323
1372
  const settings = cfg ? targetSettings(cfg, target, value !== void 0) : null;
@@ -1389,4 +1438,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
1389
1438
  return result;
1390
1439
  }
1391
1440
  //#endregion
1392
- export { unconfirmedKeyFinding as $, writeConfigSetting as A, keyConfirmer as B, removeProject as C, upsertProject as D, setSupervisor as E, diagnoseOutcome as F, realIo as G, outdatedServer as H, diagnoseTailscale as I, setupRemedy as J, resolveEndpoint as K, doctorIo as L, acquireAvdClaim as M, SERVER_OUTDATED as N, withConfigLock$1 as O, diagnoseConnectFailure as P, notOnTailnetDiagnosis as Q, endpoint$1 as R, releaseMetroPort as S, setDevice as T, parseMachine$1 as U, openAuthenticated as V, reachMachine as W, diagnoseLocalUnreachable as X, tailscaleStatusAsync as Y, diagnosisFinding as Z, isPathPrefix$1 as _, validateDeviceSlot as _t, clearDevice as a, isOnMountedVolume as at, refuseRelativeStimPaths as b, ensureConfig as c, volumeRootFor as ct, getConfigDir as d, deviceSlotKey as dt, readHostPermissions as et, getConfigPath$1 as f, deviceSlotPlatforms as ft, getRepoSettings as g, removeSlotDevice as gt, getProjectSettings as h, projectDeviceSlots as ht, clearAndroidBootPending as i, isAbsentPath as it, writeConfigSettingAsync as j, withConfigLockAsync$1 as k, findEnclosingWorktreeRoot as l, assignSlotDevice as lt, getProject as m, parseDeviceSlotOption as mt, allMetroPorts as n, directorySizeAsync as nt, clearSupervisor as o, listMountedVolumes as ot, getPlatformDeviceLimits as p, parseDeviceSlotKey as pt, sayHello as q, claimMetroPort as r, formatBytes as rt, configCorruptRepair as s, measuredDirectorySizeAsync as st, allConsolePortsAndSerials as t, directorySize as tt, getConcurrencyLimits as u, deviceSlotFileKey as ut, loadConfig$1 as v, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, findPeer$1 as z };
1441
+ export { notOnTailnetDiagnosis as $, withConfigLockAsync$1 as A, findPeer$1 as B, removeProject as C, updateRemoteMachinesAsync as D, setSupervisor as E, diagnoseConnectFailure as F, reachMachine as G, openAuthenticated as H, diagnoseOutcome as I, sayHello as J, realIo as K, diagnoseTailscale as L, writeConfigSettingAsync as M, acquireAvdClaim as N, upsertProject as O, SERVER_OUTDATED as P, diagnosisFinding as Q, doctorIo as R, releaseMetroPort as S, setDevice as T, outdatedServer as U, keyConfirmer as V, parseMachine$1 as W, tailscaleStatusAsync as X, setupRemedy as Y, diagnoseLocalUnreachable as Z, isPathPrefix$1 as _, removeSlotDevice as _t, clearDevice as a, isAbsentPath as at, refuseRelativeStimPaths as b, ensureConfig as c, measuredDirectorySizeAsync as ct, getConfigDir as d, deviceSlotFileKey as dt, unconfirmedKeyFinding as et, getConfigPath$1 as f, deviceSlotKey as ft, getRepoSettings as g, projectDeviceSlots as gt, getProjectSettings as h, parseDeviceSlotOption as ht, clearAndroidBootPending as i, formatBytes as it, writeConfigSetting as j, withConfigLock$1 as k, findEnclosingWorktreeRoot as l, volumeRootFor as lt, getProject as m, parseDeviceSlotKey as mt, allMetroPorts as n, directorySize as nt, clearSupervisor as o, isOnMountedVolume as ot, getPlatformDeviceLimits as p, deviceSlotPlatforms as pt, resolveEndpoint as q, claimMetroPort as r, directorySizeAsync as rt, configCorruptRepair as s, listMountedVolumes as st, allConsolePortsAndSerials as t, readHostPermissions as tt, getConcurrencyLimits as u, assignSlotDevice as ut, loadConfig$1 as v, validateDeviceSlot as vt, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, endpoint$1 as z };