stim 1.33.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/{acquire-artifact-DTh_LxrE.mjs → acquire-artifact-B0SWoVNt.mjs} +1 -1
  2. package/dist/{act-Cur4YKtK.mjs → act-7f7wIvCQ.mjs} +10 -10
  3. package/dist/{activity-C8kBq9w0.mjs → activity-DkS-Ir6V.mjs} +1 -1
  4. package/dist/{agent-device-usage-output-BTRaK_up.mjs → agent-device-usage-output-BVdgKbfz.mjs} +3 -3
  5. package/dist/{android-D5mCdVl2.mjs → android-BU4uBX8I.mjs} +5 -5
  6. package/dist/{android-BL-QqHjc.mjs → android-D7qjT2fq.mjs} +28 -28
  7. package/dist/{android-project-BDlPnfmL.d.mts → android-project-DhO6el8N.d.mts} +1 -1
  8. package/dist/api.d.mts +1 -1
  9. package/dist/api.mjs +21 -21
  10. package/dist/{artifact-BufzdGbT.mjs → artifact-CNnTZs3R.mjs} +10 -10
  11. package/dist/{artifact-BMjubIP2.mjs → artifact-DmRtKFXW.mjs} +10 -10
  12. package/dist/{auto-placement-D7P98glJ.mjs → auto-placement-DA65VQH7.mjs} +5 -5
  13. package/dist/{browser-web-C74et-Nv.mjs → browser-web-Dn_hgKZC.mjs} +5 -5
  14. package/dist/{build-DFBGWOTc.mjs → build-D7SuVoRX.mjs} +15 -15
  15. package/dist/build-artifact-cache-D7B6seMj.mjs +174 -0
  16. package/dist/build-artifact-cache.d.mts +25 -0
  17. package/dist/build-artifact-cache.mjs +2 -0
  18. package/dist/{build-plan-T3Hi24ax.mjs → build-plan-Ct1FiA3E.mjs} +4 -4
  19. package/dist/{ccache-BXtzEL6M.mjs → ccache-ChBMXlBq.mjs} +8 -50
  20. package/dist/{cli-B2YSjc9s.mjs → cli-DjdvQG5U.mjs} +17 -17
  21. package/dist/cli.mjs +1 -1
  22. package/dist/{client-0_Mnfz0a.mjs → client-kU37gURU.mjs} +45 -8
  23. package/dist/{command-output-DWI9tGPU.mjs → command-output-DjExb_tZ.mjs} +1 -1
  24. package/dist/{dependencies-CgvBZbXD.mjs → dependencies-CZ7c8XX_.mjs} +29 -29
  25. package/dist/{dev-client-ChsHwgrn.mjs → dev-client-D3wOllNd.mjs} +2 -2
  26. package/dist/{device-B0htCt2u.mjs → device-CWPFAqs0.mjs} +8 -8
  27. package/dist/{device-DOehZpyx.mjs → device-DH5yf6TU.mjs} +6 -6
  28. package/dist/{device-android-B8TQP5AX.mjs → device-android-ChfF5I9A.mjs} +3 -3
  29. package/dist/{device-capacity-BAkETfIl.mjs → device-capacity-CHC3dKWg.mjs} +3 -3
  30. package/dist/device-host-worker.mjs +7 -7
  31. package/dist/{device-ios-DFaYFdar.mjs → device-ios-B3-Ah--R.mjs} +3 -3
  32. package/dist/{device-lease-run-DpiCnRbZ.mjs → device-lease-run-i3FNX4OE.mjs} +3 -3
  33. package/dist/{device-pool-DP4sCeCC.mjs → device-pool-EZziQ0uS.mjs} +2 -2
  34. package/dist/{device-provision-CnNOIxCF.mjs → device-provision-CfpEy-Vm.mjs} +7 -7
  35. package/dist/{doctor-9GrW5YSP.mjs → doctor-B5uEZiKp.mjs} +11 -11
  36. package/dist/{doctor-C6Xn96RS.mjs → doctor-CGBsS_68.mjs} +1 -1
  37. package/dist/{doctor-nRLBoajo.mjs → doctor-dwRboaXx.mjs} +11 -11
  38. package/dist/{doctor-watchman-CDhpC3Oh.mjs → doctor-watchman-r7M9UPi0.mjs} +2 -2
  39. package/dist/{eas-build-CpJ4h9tG.mjs → eas-build-BpHIt_M3.mjs} +2 -2
  40. package/dist/{eas-fallback-B3z5nL1g.mjs → eas-fallback-CNPcjq3K.mjs} +2 -2
  41. package/dist/{eas-session-ledger-Bspy-VJQ.mjs → eas-session-ledger-CXwagcQ7.mjs} +1 -1
  42. package/dist/{error-diagnostics-DoLGklYX.mjs → error-diagnostics-Ym2mjmJ0.mjs} +3 -3
  43. package/dist/{gc-BWoOp9q7.mjs → gc-B464w_a5.mjs} +2 -2
  44. package/dist/{gc-DolXpMSB.mjs → gc-C7YxKNci.mjs} +10 -10
  45. package/dist/{guide-CmZB0GtP.mjs → guide-BFW-cB7R.mjs} +8 -6
  46. package/dist/{hosted-android-ByG-ICuh.mjs → hosted-android-B7yfqXEy.mjs} +2 -2
  47. package/dist/{hosted-client-D19Lv0tg.mjs → hosted-client-CQuzZwAu.mjs} +2 -2
  48. package/dist/{hosted-logs-D7anR6Dk.mjs → hosted-logs-DfYCqrrR.mjs} +2 -2
  49. package/dist/{hosted-logs-sync-D182b1eJ.mjs → hosted-logs-sync-Dlpa2mQF.mjs} +4 -4
  50. package/dist/{hosted-macos-D0DDQxvl.mjs → hosted-macos-JKefapEm.mjs} +4 -4
  51. package/dist/{hosted-native-BzXIy97W.mjs → hosted-native-B7OFt5gB.mjs} +4 -4
  52. package/dist/{idle-shutdown-6i8CHoNq.mjs → idle-shutdown-DPD8oV36.mjs} +3 -3
  53. package/dist/{ios-dbXzjTxx.mjs → ios-DSBs9c6d.mjs} +21 -21
  54. package/dist/{ios-device-DXbHZfFe.mjs → ios-device-Drplrgzo.mjs} +1 -1
  55. package/dist/{ios-project-BzfLigfh.mjs → ios-project-DoTQYghg.mjs} +5 -5
  56. package/dist/{ios-AdhPKXO3.mjs → ios-sUPbWqEh.mjs} +8 -8
  57. package/dist/ios-signing-R34vbrNU.mjs +202 -0
  58. package/dist/{js-swap-EDVOJmqx.mjs → js-swap-DrokhOfo.mjs} +3 -3
  59. package/dist/{launch-CKHpthsw.mjs → launch-Cy-MWEZc.mjs} +12 -12
  60. package/dist/{lightened-Cv4ToJRX.mjs → lightened-ALwQcQtV.mjs} +2 -2
  61. package/dist/{logs-DCQ3_tGS.mjs → logs-DWT7jGpF.mjs} +3 -3
  62. package/dist/{logs-IagR9dWI.mjs → logs-DuED-01Z.mjs} +5 -5
  63. package/dist/{macos-Ch7vuM-G.mjs → macos-CtBtA_hW.mjs} +14 -14
  64. package/dist/{macos-pc0aVVbN.mjs → macos-kWGcfLzx.mjs} +1 -1
  65. package/dist/maintenance-run.mjs +3 -3
  66. package/dist/{native-android-B3CEDq4R.mjs → native-android-tISP2EVp.mjs} +10 -10
  67. package/dist/{native-gradle-artifact-inputs-BLnO2hHR.mjs → native-gradle-artifact-inputs-DVoeZkrw.mjs} +1 -1
  68. package/dist/{native-runtime-e1OU8gEN.mjs → native-runtime-CNgxeOCG.mjs} +3 -3
  69. package/dist/{native-xcode-inputs-DL3ETb8s.mjs → native-xcode-inputs-DGzkhpu4.mjs} +1 -1
  70. package/dist/{native-xcode-ios-D4e8k2Jy.mjs → native-xcode-ios-B9nsfId2.mjs} +12 -12
  71. package/dist/offload-worker.d.mts +6 -1
  72. package/dist/offload-worker.mjs +38 -13
  73. package/dist/{phone-reverses-rvyxW1Fl.mjs → phone-reverses-Bo0EzJ-P.mjs} +1 -1
  74. package/dist/{placement-log-nnGnu8mo.mjs → placement-log-BsGvKLtU.mjs} +1 -1
  75. package/dist/{plan-placement-D3JD-T-K.mjs → plan-placement-Am0IjuxB.mjs} +4 -4
  76. package/dist/{ports-CZJJfJ8Q.mjs → ports-CNzg1LYD.mjs} +1 -1
  77. package/dist/{prebuild-Bhs7TTcz.mjs → prebuild-BfJII57G.mjs} +5 -5
  78. package/dist/{project-DWEXiBA9.mjs → project-DU3jjnBE.mjs} +11 -11
  79. package/dist/{react-native-android-C6Y270GS.mjs → react-native-android-3dZiJv-4.mjs} +17 -17
  80. package/dist/{react-native-build-DaPfzf_e.mjs → react-native-build-CuvNPt-q.mjs} +4 -4
  81. package/dist/{react-native-doctor-DGMPxkPS.mjs → react-native-doctor-a35BwMUO.mjs} +4 -4
  82. package/dist/{react-native-ios-dX48_92n.mjs → react-native-ios-CqnReM1t.mjs} +13 -12
  83. package/dist/{reload-DsOByDfy.mjs → reload-CC3sNo10.mjs} +6 -6
  84. package/dist/{reload-BGwblBJ9.mjs → reload-YPnvXGlB.mjs} +1 -1
  85. package/dist/{remote-D0uJZ76R.mjs → remote-BfaIHnhM.mjs} +6 -6
  86. package/dist/{result-DuimMZKJ.mjs → result-H-AxY7Ud.mjs} +10 -10
  87. package/dist/{selection-xS50Mt0V.mjs → selection-CH-MUVGD.mjs} +1 -1
  88. package/dist/{server-command-BC0EgMfY.mjs → server-command-Bn_gOObU.mjs} +2 -2
  89. package/dist/server-expo-B59N16uT.mjs +2 -0
  90. package/dist/{server-expo-15RjL0ir.mjs → server-expo-CUJ2fuv1.mjs} +1 -1
  91. package/dist/{settings-CuP55ieT.mjs → settings-DoWHJopy.mjs} +2 -2
  92. package/dist/{settings-payload-BIGGQ3or.mjs → settings-payload-Bxw3hid5.mjs} +1 -1
  93. package/dist/{settings-write-D85j8mej.mjs → settings-write-C6d7EC54.mjs} +2 -2
  94. package/dist/{slot-launch-D4oREwhx.mjs → slot-launch-kq0-7w9C.mjs} +2 -2
  95. package/dist/{stage-DKC6tDXu.mjs → stage-CBfMTUK3.mjs} +1 -1
  96. package/dist/{start-DfPSLc__.mjs → start-Diu8q6_U.mjs} +1 -1
  97. package/dist/{start-BsEV4S-s.mjs → start-WTMumMHi.mjs} +5 -5
  98. package/dist/{stats-ByEUblPr.mjs → stats-D4cW247z.mjs} +3 -3
  99. package/dist/{status-FP1MH9qn.mjs → status-B-oeWS0Z.mjs} +1 -1
  100. package/dist/{status-C6hLlDqW.mjs → status-CEwxo-PS.mjs} +12 -12
  101. package/dist/{status-watch-D8s823CZ.mjs → status-watch-D63R5nSI.mjs} +1 -1
  102. package/dist/status-worker.mjs +1 -1
  103. package/dist/{stop-5LKfVv-0.mjs → stop-Dm9ON6Os.mjs} +2 -2
  104. package/dist/{stop-CpTy6bod.mjs → stop-HL2RvhrE.mjs} +2 -2
  105. package/dist/{stop-BVI2-L7s.mjs → stop-vX4w3_8V.mjs} +9 -9
  106. package/dist/supervisor-run.mjs +8 -8
  107. package/dist/{support-CqyWfZZI.mjs → support-BNe1_Hg7.mjs} +3 -3
  108. package/dist/{support-D8OH0z98.mjs → support-ivsfDj0v.mjs} +6 -6
  109. package/dist/{swiftpm-macos-BuhqYB3n.mjs → swiftpm-macos-ClF203_2.mjs} +2 -2
  110. package/dist/{toolchain-D_jotUG7.mjs → toolchain-CECahBDa.mjs} +1 -1
  111. package/dist/{toolchain-s5ZmG42Z.mjs → toolchain-CYonNjd_.mjs} +406 -8
  112. package/dist/{web-DwYCTFdh.mjs → web-BdaMBr2O.mjs} +3 -3
  113. package/dist/web-CIpHpGp8.mjs +2 -0
  114. package/dist/web-run.mjs +1 -1
  115. package/dist/{workspaces-B3ahAHZc.mjs → workspaces-B9v5V7Es.mjs} +2 -2
  116. package/dist/{worktree-BhsML6GV.mjs → worktree-C3N86KpI.mjs} +10 -10
  117. package/dist/{worktree-CrjsPIs2.mjs → worktree-C4MBOMz7.mjs} +1 -1
  118. package/package.json +12 -7
  119. package/dist/ios-signing-D-tSX1iF.mjs +0 -489
  120. package/dist/server-expo-gYIypb0-.mjs +0 -2
  121. package/dist/web-cCfM8kwV.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  import { f as WorkspaceProcessCleanupError } from "./exec-CGuDzt40.mjs";
2
- import { I as waitForSharedBuild } from "./activity-C8kBq9w0.mjs";
2
+ import { I as waitForSharedBuild } from "./activity-DkS-Ir6V.mjs";
3
3
  import { rmSync } from "node:fs";
4
4
  //#region src/engine/artifact-lifecycle.ts
5
5
  async function runArtifactLifecycle(phases) {
@@ -1,28 +1,28 @@
1
1
  import { T as process_identity_exports, f as WorkspaceProcessCleanupError, m as workspaceProcessLockError, n as isTimeoutError, p as withWorkspaceProcessLock, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
2
  import { E as workspaceDir, j as workspaceStateFile$1, k as workspaceLogsDir$1, r as readWorkspaceState$1, u as workspaceLastUsed, w as workspaceAgentDeviceDir } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { o as formatLongDuration, u as plural } from "./command-output-DWI9tGPU.mjs";
3
+ import { o as formatLongDuration, u as plural } from "./command-output-DjExb_tZ.mjs";
4
4
  import { at as isOnMountedVolume, ht as projectDeviceSlots, m as getProject, nt as directorySizeAsync, ot as listMountedVolumes, rt as formatBytes, st as measuredDirectorySizeAsync, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
5
5
  import { c as gitQuiet, l as gitQuietAsync, n as runOperationFileQuiet, r as childEnvironment } from "./operation-exec-DKlBcKAL.mjs";
6
6
  import { At as listWorktrees, Et as hasUncommittedWorkAsync, Ft as matchWorktreeEntry, Kt as sourceCheckoutOf, O as maintenanceKeepSetting, Pt as lockReason, Ut as resolveFullRefAsync, Wt as resolveSourceCheckoutAsync, X as resolveProjectSettings, Xt as worktreeLockAsync, Z as resolveProjectSettingsAsync, bt as dirtyPathsAsync, h as deviceIdleShutdownMinutesSetting, it as settingValueAt, jt as listWorktreesAsync, mt as LOCKED_REASON, qt as unpushedCommitsAsync, sn as removeTemporaryEntryAsync, wt as hasPopulatedSubmodulesAsync } from "./settings-B5IBDfTx.mjs";
7
- import { P as readRemoteSession, i as findProjectRoot$1 } from "./project-DWEXiBA9.mjs";
7
+ import { P as readRemoteSession, i as findProjectRoot$1 } from "./project-DU3jjnBE.mjs";
8
8
  import { A as getAvdNameForSerialAsync, L as listAvds, N as listAdbDevices, P as listAdbDevicesAsync, R as listAvdsAsync, U as ownedAvdDirectory, k as getAvdNameForSerial, q as ownedAvdSerialResolverAsync, xt as readParked } from "./android-Iq0M2t2d.mjs";
9
9
  import { c as pidExists } from "./metro-B5PVz0Wv.mjs";
10
- import { A as diskPressureLevel, G as planCacheEmptying, N as lowestFree, P as protectWindowMs, X as collectGradleVersions, Z as deleteGradleVersion, Zn as collectMemoryReport, _ as resolveBudget, at as DEVICE_LIST_TIMEOUT_MS, ct as collectParkedSims, d as enforceBudget, dr as pruneCache, dt as deleteProjectDevices, j as levelFloors, lt as deleteParkedAvds, mt as deviceSweepIsScoped, nr as memorySweepIsScoped, nt as waitForGradleExit, or as stopIdleGradleDaemons, p as machineNumber, sr as phase, st as collectParkedAvds, u as cacheLabel, ur as discoverCaches, ut as deleteParkedSims, v as trimmableCaches, vt as findStaleProjectDevices, y as stopOwnedMetro, z as emptyCaches } from "./ccache-BXtzEL6M.mjs";
10
+ import { $n as memorySweepIsScoped, A as diskPressureLevel, G as planCacheEmptying, Jn as collectMemoryReport, N as lowestFree, P as protectWindowMs, X as collectGradleVersions, Z as deleteGradleVersion, _ as resolveBudget, at as DEVICE_LIST_TIMEOUT_MS, cr as pruneCache, ct as collectParkedSims, d as enforceBudget, dt as deleteProjectDevices, ir as phase, j as levelFloors, lt as deleteParkedAvds, mt as deviceSweepIsScoped, nt as waitForGradleExit, p as machineNumber, rr as stopIdleGradleDaemons, sr as discoverCaches, st as collectParkedAvds, u as cacheLabel, ut as deleteParkedSims, v as trimmableCaches, vt as findStaleProjectDevices, y as stopOwnedMetro, z as emptyCaches } from "./ccache-ChBMXlBq.mjs";
11
11
  import { o as readWebRecord, u as webFacts } from "./state-CtmYTRWm.mjs";
12
12
  import { a as unregister, n as readManifest } from "./cache-manifest-8JX9S1QJ.mjs";
13
- import { B as workspaceBuildInProgress, Et as GC_OUTPUT, F as collectOwnedDeviceActivityAsync, Ot as takeGcResults, P as collectOwnedDeviceActivity, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, d as recentNativeUseReason, g as ARTIFACT_DIRS, h as workspaceDirRemoved, i as clearWorkspaceOutputs, jt as readConcurrency, kt as eachLimited, l as keptByLock, m as workspaceBuildReasons, o as collectWorkspaceOutputs, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, x as resolveSupervisorTarget, y as workspaceInUse } from "./workspaces-B3ahAHZc.mjs";
13
+ import { B as workspaceBuildInProgress, Et as GC_OUTPUT, F as collectOwnedDeviceActivityAsync, Ot as takeGcResults, P as collectOwnedDeviceActivity, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, d as recentNativeUseReason, g as ARTIFACT_DIRS, h as workspaceDirRemoved, i as clearWorkspaceOutputs, jt as readConcurrency, kt as eachLimited, l as keptByLock, m as workspaceBuildReasons, o as collectWorkspaceOutputs, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, x as resolveSupervisorTarget, y as workspaceInUse } from "./workspaces-B9v5V7Es.mjs";
14
14
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
15
- import { N as listBuildLocks, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, g as workspaceActivity, x as listLeaseFiles } from "./activity-C8kBq9w0.mjs";
15
+ import { N as listBuildLocks, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, g as workspaceActivity, x as listLeaseFiles } from "./activity-DkS-Ir6V.mjs";
16
16
  import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-BdZdNsAj.mjs";
17
17
  import { s as metroStoreRoot } from "./errors-DHm_U5gv.mjs";
18
18
  import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
19
- import { m as probeHostedSession } from "./hosted-client-D19Lv0tg.mjs";
20
- import { o as runStop } from "./stop-BVI2-L7s.mjs";
21
- import { D as stimCliUseOf, E as stimCliEntries, M as worktreeArchiveLimits, T as serviceRunningFrom, _ as cacheBlocked, a as nestedWorktrees, b as measurePressure, i as excludeWatchmanCookies, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, v as measureDisk, w as uncommittedActivityOf, x as measurePressureAsync, y as measureDiskAsync } from "./worktree-BhsML6GV.mjs";
19
+ import { m as probeHostedSession } from "./hosted-client-CQuzZwAu.mjs";
20
+ import { o as runStop } from "./stop-vX4w3_8V.mjs";
21
+ import { D as stimCliUseOf, E as stimCliEntries, M as worktreeArchiveLimits, T as serviceRunningFrom, _ as cacheBlocked, a as nestedWorktrees, b as measurePressure, i as excludeWatchmanCookies, o as porcelainPath, p as removeWorktreeTarget, r as excludePodChurn, s as reclaimKeys, v as measureDisk, w as uncommittedActivityOf, x as measurePressureAsync, y as measureDiskAsync } from "./worktree-C3N86KpI.mjs";
22
22
  import { n as describePullRequest, r as endedPullRequest, s as pullRequestLookups } from "./pull-request-BpMTNkMB.mjs";
23
23
  import { a as lastFetchedAtAsync, c as mergeStateAsync, f as recordPullRequestLookup, i as fetchDefaultBranchAsync, o as localDefaultBranchAsync, r as FETCH_FRESH_MS } from "./warm-progress-q11Vdvhh.mjs";
24
- import { a as restoreProblem, r as recordLightened, t as finishLightened } from "./lightened-Cv4ToJRX.mjs";
25
- import { i as writeIdleShutdownEvent, n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-6i8CHoNq.mjs";
24
+ import { a as restoreProblem, r as recordLightened, t as finishLightened } from "./lightened-ALwQcQtV.mjs";
25
+ import { i as writeIdleShutdownEvent, n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DPD8oV36.mjs";
26
26
  import { readClaimSet } from "@stim-cli/core/ownership-claim";
27
27
  import { existsSync, lstatSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync } from "node:fs";
28
28
  import { tmpdir } from "node:os";
@@ -1,6 +1,6 @@
1
1
  import { D as ownership_claim_exports, T as process_identity_exports, _ as declareSpawnsOn, t as getExecutor, x as stopDeclaringSpawnsOn } from "./exec-CGuDzt40.mjs";
2
2
  import { M as withDirLock$1, N as withDirLockAsync$1, c as withWorkspaceStateLock, d as writeWorkspaceState, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-DWI9tGPU.mjs";
3
+ import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-DjExb_tZ.mjs";
4
4
  import { _t as validateDeviceSlot, d as getConfigDir, dt as deviceSlotKey, pt as parseDeviceSlotKey } from "./config-BW0fAtoK.mjs";
5
5
  import { n as runOperationFileQuiet } from "./operation-exec-DKlBcKAL.mjs";
6
6
  import { w as resolveBuild } from "./build-cache-Cqj4FGnX.mjs";
@@ -1,8 +1,8 @@
1
1
  import { T as process_identity_exports } from "./exec-CGuDzt40.mjs";
2
- import { o as formatLongDuration } from "./command-output-DWI9tGPU.mjs";
2
+ import { o as formatLongDuration } from "./command-output-DjExb_tZ.mjs";
3
3
  import { rt as formatBytes } from "./config-BW0fAtoK.mjs";
4
- import { bt as measureDu, u as listWorkspaceDirs, xt as writeUsageCache, yt as canonical } from "./workspaces-B3ahAHZc.mjs";
5
- import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-C8kBq9w0.mjs";
4
+ import { bt as measureDu, u as listWorkspaceDirs, xt as writeUsageCache, yt as canonical } from "./workspaces-B9v5V7Es.mjs";
5
+ import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-DkS-Ir6V.mjs";
6
6
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
7
7
  import { homedir } from "node:os";
8
8
  import { isAbsolute, join, relative, sep } from "node:path";
@@ -1,6 +1,6 @@
1
- import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-DWI9tGPU.mjs";
2
- import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-CqyWfZZI.mjs";
3
- import { r as lastBuildRecord, t as androidFacts } from "./result-DuimMZKJ.mjs";
4
- import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-BL-QqHjc.mjs";
5
- import { a as collectorLogFile, o as killPreviousCollector, s as startCollector } from "./launch-CKHpthsw.mjs";
1
+ import { i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-DjExb_tZ.mjs";
2
+ import { E as resolveVariant, T as resolveSystemImage, _ as findAapt, b as noDeviceDiagnostic, d as androidVariantSetting, f as apkDevClientFacts, g as dumpApkManifest, h as displayPath, i as NO_FINGERPRINT, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme, u as androidSystemImageSetting, x as parseXmltree, y as isReleaseVariant } from "./support-BNe1_Hg7.mjs";
3
+ import { r as lastBuildRecord, t as androidFacts } from "./result-H-AxY7Ud.mjs";
4
+ import { i as runAndroidOperation, n as registerAndroid, r as runAndroid, t as androidCommand } from "./android-D7qjT2fq.mjs";
5
+ import { a as collectorLogFile, o as killPreviousCollector, s as startCollector } from "./launch-Cy-MWEZc.mjs";
6
6
  export { NO_DEVICE, NO_FINGERPRINT, androidDevClientScheme, androidFacts, androidSystemImageSetting, androidVariantSetting, apkDevClientFacts, apkPackage, collectorLogFile, androidCommand as default, displayPath, dumpApkManifest, findAapt, formatDuration, isReleaseVariant, killPreviousCollector, lastBuildRecord, noDeviceDiagnostic, parseXmltree, phaseLine, registerAndroid, resolveSystemImage, resolveVariant, runAndroid, runAndroidOperation, shortHash, startCollector };
@@ -1,44 +1,44 @@
1
1
  import { D as ownership_claim_exports, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
2
  import { a as recordWorkspaceUseAsync, f as writeWorkspaceStateAsync, g as emulatorLogFile, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-DWI9tGPU.mjs";
3
+ import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
4
  import { D as upsertProject, _t as validateDeviceSlot, ft as deviceSlotPlatforms, k as withConfigLockAsync$1, m as getProject, mt as parseDeviceSlotOption, u as getConcurrencyLimits, ut as deviceSlotFileKey } from "./config-BW0fAtoK.mjs";
5
5
  import { B as publicUrlSetting, F as metroWarmupUrlSetting, J as resolveCacheProviderConfig, N as metroPortSetting, Q as resolveSettings, W as remoteEasFallbackSetting, Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, dt as detectProviders, g as deviceReclaimIdleMinutesSetting, ot as tunnelModeSetting, z as projectSettingsContextAsync } from "./settings-B5IBDfTx.mjs";
6
- import { f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunchAsync } from "./project-DWEXiBA9.mjs";
6
+ import { f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunchAsync } from "./project-DU3jjnBE.mjs";
7
7
  import { $ as probeEmulatorSerial, At as configuredAndroidEmulatorApp, E as emulatorProbeSession, M as isEmulatorToolAbsent, P as listAdbDevicesAsync, U as ownedAvdDirectory, Z as physicalDeviceModel, a as androidDeviceAbi, at as resolvePhysicalDevice, it as resolveOwnedAvdSerialAsync, ut as waitForBoot, v as avdStorageExists, z as listInstalledSystemImages } from "./android-Iq0M2t2d.mjs";
8
8
  import { c as pidExists, d as resolveProjectMetro } from "./metro-B5PVz0Wv.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { An as checkEasAuth, At as ensureRemoteBootOwned, En as runProcessOperation, Et as binOnPath, Jt as verifyLaunch, Ln as resolveEasCliBin, Mt as remoteAndroidDeps, Pt as resolveRemoteContext, Qt as DEFAULT_METRO_PORT, Rn as resolveRemote, Zt as ADB_INSTALL_TIMEOUT_MS, c as budgetGate, kt as ensureMetroReachable, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, qn as ownedSessionName, qt as verifyAndroidReleaseLaunch, t as CCACHE_NOT_RUN, wn as exitAfterFlush, zn as uploadRemote } from "./ccache-BXtzEL6M.mjs";
11
- import { $ as tapBuildLog, H as NO_BUILD_PROGRESS, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, Z as runFailureRecord, ct as recordRunStats, et as thrownRunFailureRecord, it as readRunEstimates, lt as statsProjectKey$1, ot as recordCapacityRefusal, rt as createRunRecorder } from "./workspaces-B3ahAHZc.mjs";
12
- import { $ as cancelledFailure, ct as withNativeBuildRun, ot as runCancellation, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-C8kBq9w0.mjs";
10
+ import { At as ensureRemoteBootOwned, Cn as runProcessOperation, Dn as checkEasAuth, Et as binOnPath, Fn as resolveRemote, In as uploadRemote, Jt as verifyLaunch, Mt as remoteAndroidDeps, Pn as resolveEasCliBin, Pt as resolveRemoteContext, Qt as DEFAULT_METRO_PORT, Wn as ownedSessionName, Zt as ADB_INSTALL_TIMEOUT_MS, c as budgetGate, kt as ensureMetroReachable, ln as installAndroidApp, mn as launchAndroidReleaseApp, pn as launchAndroidApp, qt as verifyAndroidReleaseLaunch, t as CCACHE_NOT_RUN, xn as exitAfterFlush } from "./ccache-ChBMXlBq.mjs";
11
+ import { $ as tapBuildLog, H as NO_BUILD_PROGRESS, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, Z as runFailureRecord, ct as recordRunStats, et as thrownRunFailureRecord, it as readRunEstimates, lt as statsProjectKey$1, ot as recordCapacityRefusal, rt as createRunRecorder } from "./workspaces-B9v5V7Es.mjs";
12
+ import { _t as runCancellationSignal, gt as runCancellation, lt as cancelledFailure, vt as withNativeBuildRun } from "./toolchain-CYonNjd_.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-DkS-Ir6V.mjs";
14
14
  import { E as storedAppId } from "./build-cache-Cqj4FGnX.mjs";
15
- import { S as setRemoteLogSink } from "./client-0_Mnfz0a.mjs";
16
- import { d as resolveBuildPlacement, s as parseBuildMachineOption } from "./selection-xS50Mt0V.mjs";
15
+ import { C as setRemoteLogSink } from "./client-kU37gURU.mjs";
16
+ import { d as resolveBuildPlacement, s as parseBuildMachineOption } from "./selection-CH-MUVGD.mjs";
17
17
  import { i as hostedMetroSettings } from "./metro-request-2LmFpC1z.mjs";
18
18
  import { a as writeHostedAndroidAsync, i as writeDevicePlacementAsync, t as readHostedAndroid } from "./ios-state-CWsBysyN.mjs";
19
- import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-ByG-ICuh.mjs";
19
+ import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-B7yfqXEy.mjs";
20
20
  import { n as verifyCollectorOwnership } from "./ownership-hC7xvvxF.mjs";
21
- import { i as restoreLightenedDependencies, n as printLightenedFailure } from "./lightened-Cv4ToJRX.mjs";
22
- import { c as startDevServer } from "./start-BsEV4S-s.mjs";
23
- import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-DpiCnRbZ.mjs";
24
- import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-BAkETfIl.mjs";
21
+ import { i as restoreLightenedDependencies, n as printLightenedFailure } from "./lightened-ALwQcQtV.mjs";
22
+ import { c as startDevServer } from "./start-WTMumMHi.mjs";
23
+ import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-i3FNX4OE.mjs";
24
+ import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-CHC3dKWg.mjs";
25
25
  import { r as ensureSystemImage, t as androidImageInstallPolicy } from "./android-image-DFk26aY6.mjs";
26
- import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-CpJ4h9tG.mjs";
27
- import { t as followHostedLaunchLogs } from "./hosted-logs-sync-D182b1eJ.mjs";
28
- import { f as settleFingerprintCheck } from "./prebuild-Bhs7TTcz.mjs";
29
- import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-e1OU8gEN.mjs";
30
- import { n as devicePlacementRecord } from "./placement-log-nnGnu8mo.mjs";
31
- import { S as pooledAndroidDevice, a as PLATFORM, b as noDeviceDiagnostic, g as dumpApkManifest, h as displayPath, o as androidBuildOptions, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme } from "./support-CqyWfZZI.mjs";
32
- import { t as acquireAndroidArtifact } from "./artifact-BMjubIP2.mjs";
33
- import { a as persistLastBuild, c as androidDeviceSelectorRefusal, i as logPostBuildFailure, n as finishAndroidUpload, o as persistThrownBuild, s as reportAndroidResult, u as resolveAndroidRunPlan } from "./result-DuimMZKJ.mjs";
34
- import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-D7P98glJ.mjs";
35
- import { i as verifyAndroidMetroRun, r as finishAndroidRun } from "./launch-CKHpthsw.mjs";
36
- import { t as checkEasFallback } from "./eas-fallback-B3z5nL1g.mjs";
37
- import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-DOehZpyx.mjs";
38
- import { a as AvdBootError, o as AvdRecoveryError } from "./device-android-B8TQP5AX.mjs";
39
- import { t as selectFromPool } from "./device-pool-DP4sCeCC.mjs";
26
+ import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-BpHIt_M3.mjs";
27
+ import { t as followHostedLaunchLogs } from "./hosted-logs-sync-Dlpa2mQF.mjs";
28
+ import { f as settleFingerprintCheck } from "./prebuild-BfJII57G.mjs";
29
+ import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-CNgxeOCG.mjs";
30
+ import { n as devicePlacementRecord } from "./placement-log-BsGvKLtU.mjs";
31
+ import { S as pooledAndroidDevice, a as PLATFORM, b as noDeviceDiagnostic, g as dumpApkManifest, h as displayPath, o as androidBuildOptions, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme } from "./support-BNe1_Hg7.mjs";
32
+ import { t as acquireAndroidArtifact } from "./artifact-DmRtKFXW.mjs";
33
+ import { a as persistLastBuild, c as androidDeviceSelectorRefusal, i as logPostBuildFailure, n as finishAndroidUpload, o as persistThrownBuild, s as reportAndroidResult, u as resolveAndroidRunPlan } from "./result-H-AxY7Ud.mjs";
34
+ import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-DA65VQH7.mjs";
35
+ import { i as verifyAndroidMetroRun, r as finishAndroidRun } from "./launch-Cy-MWEZc.mjs";
36
+ import { t as checkEasFallback } from "./eas-fallback-CNPcjq3K.mjs";
37
+ import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-DH5yf6TU.mjs";
38
+ import { a as AvdBootError, o as AvdRecoveryError } from "./device-android-ChfF5I9A.mjs";
39
+ import { t as selectFromPool } from "./device-pool-EZziQ0uS.mjs";
40
40
  import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
41
- import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-T3Hi24ax.mjs";
41
+ import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-Ct1FiA3E.mjs";
42
42
  import { join } from "node:path";
43
43
  import { workspaceId } from "@stim-cli/core";
44
44
  import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
@@ -8,7 +8,7 @@ import { Command } from "commander";
8
8
  import "@stim-cli/core/noise-session";
9
9
  import "@expo/fingerprint";
10
10
  import { CacheProviderConfig, loadCacheProvider } from "@stim-cli/cache";
11
- import { BuildReactNativeArtifactQuery, BuildSwiftpmArtifactQuery, GradleOffloadInputs, HelloResult, RemoteDiagnosis } from "@stim-cli/core/protocol";
11
+ import { BuildArtifactIdentity, BuildGradleArtifactQuery, BuildReactNativeArtifactQuery, BuildSwiftpmArtifactQuery, CachedBuildArtifact, GradleOffloadInputs, HelloResult, RemoteDiagnosis } from "@stim-cli/core/protocol";
12
12
  import { ChildProcess } from "node:child_process";
13
13
  //#region src/engine/build-facts.d.ts
14
14
  type CacheHitLevel = "local" | "remote" | false;
package/dist/api.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as CompilationCacheActivity, a as BuildMachinesInspection, c as TailnetMachineIo, d as BudgetReport, f as DoctorPlatform, g as CcacheActivity, h as AndroidFacts, n as WebLaunched, o as GeneratedTickets, p as Finding, s as KeyConfirmer, v as IosFacts } from "./android-project-BDlPnfmL.mjs";
1
+ import { _ as CompilationCacheActivity, a as BuildMachinesInspection, c as TailnetMachineIo, d as BudgetReport, f as DoctorPlatform, g as CcacheActivity, h as AndroidFacts, n as WebLaunched, o as GeneratedTickets, p as Finding, s as KeyConfirmer, v as IosFacts } from "./android-project-DhO6el8N.mjs";
2
2
  import { a as WorkspaceLaunchPlatform } from "./ios-CDvlmUs7.mjs";
3
3
  import "./exec-DnYc4HGH.mjs";
4
4
  import "./pull-request-eODyIqZF.mjs";
package/dist/api.mjs CHANGED
@@ -1,32 +1,32 @@
1
1
  import { C as operationState, D as ownership_claim_exports, a as trackReportResource, d as throwIfCancelled, f as WorkspaceProcessCleanupError, i as runReport, u as cancelledError } from "./exec-CGuDzt40.mjs";
2
2
  import { E as workspaceDir, a as recordWorkspaceUseAsync, k as workspaceLogsDir$1, v as ensureWorkspaceStorageAsync } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { l as phaseLine } from "./command-output-DWI9tGPU.mjs";
3
+ import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
4
  import { D as upsertProject, _t as validateDeviceSlot, b as refuseRelativeStimPaths, k as withConfigLockAsync$1, m as getProject } from "./config-BW0fAtoK.mjs";
5
5
  import { Vt as repoRootAsync, Z as resolveProjectSettingsAsync, _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, p as cacheProviderSettingError, rt as settingShapeErrors, st as unknownSettingKeys } from "./settings-B5IBDfTx.mjs";
6
- import { c as projectProblem, f as projectRegistry, i as findProjectRoot$1, r as findCommandWorkspaceAsync, t as NO_PROJECT_REFUSAL } from "./project-DWEXiBA9.mjs";
6
+ import { c as projectProblem, f as projectRegistry, i as findProjectRoot$1, r as findCommandWorkspaceAsync, t as NO_PROJECT_REFUSAL } from "./project-DU3jjnBE.mjs";
7
7
  import { n as macosDir } from "./state-DSOUqO-o.mjs";
8
8
  import { c as ensureHomeIdentity, s as workspaceShareURL } from "./stim-desktop-_WTria-r.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { $ as tapBuildLog, Q as startBuildProgress, X as recordFinishedBuild, tt as errorRemedy } from "./workspaces-B3ahAHZc.mjs";
11
- import { ct as withNativeBuildRun, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
12
- import { d as resolveBuildPlacement } from "./selection-xS50Mt0V.mjs";
13
- import { c as stopWorkspaceNow } from "./stop-BVI2-L7s.mjs";
14
- import { r as runReload } from "./reload-DsOByDfy.mjs";
15
- import { m as warmWorktreeTarget, p as removeWorktreeTarget } from "./worktree-BhsML6GV.mjs";
16
- import { i as restoreLightenedDependencies } from "./lightened-Cv4ToJRX.mjs";
17
- import { c as startDevServer } from "./start-BsEV4S-s.mjs";
18
- import { s as recordDoctorCheck } from "./doctor-watchman-CDhpC3Oh.mjs";
19
- import { c as readSettingsPayload, s as readSettingsContext, t as SettingsRefusal } from "./settings-payload-BIGGQ3or.mjs";
20
- import { a as readDoctorReport } from "./doctor-9GrW5YSP.mjs";
21
- import { i as readGcReport, n as executeGc, o as withGcMaintenanceClaim } from "./gc-DolXpMSB.mjs";
22
- import { r as readWorkspaceLogs, t as followWorkspaceLogs } from "./logs-DCQ3_tGS.mjs";
10
+ import { $ as tapBuildLog, Q as startBuildProgress, X as recordFinishedBuild, tt as errorRemedy } from "./workspaces-B9v5V7Es.mjs";
11
+ import { _t as runCancellationSignal, vt as withNativeBuildRun } from "./toolchain-CYonNjd_.mjs";
12
+ import { d as resolveBuildPlacement } from "./selection-CH-MUVGD.mjs";
13
+ import { c as stopWorkspaceNow } from "./stop-vX4w3_8V.mjs";
14
+ import { r as runReload } from "./reload-CC3sNo10.mjs";
15
+ import { m as warmWorktreeTarget, p as removeWorktreeTarget } from "./worktree-C3N86KpI.mjs";
16
+ import { i as restoreLightenedDependencies } from "./lightened-ALwQcQtV.mjs";
17
+ import { c as startDevServer } from "./start-WTMumMHi.mjs";
18
+ import { s as recordDoctorCheck } from "./doctor-watchman-r7M9UPi0.mjs";
19
+ import { c as readSettingsPayload, s as readSettingsContext, t as SettingsRefusal } from "./settings-payload-Bxw3hid5.mjs";
20
+ import { a as readDoctorReport } from "./doctor-B5uEZiKp.mjs";
21
+ import { i as readGcReport, n as executeGc, o as withGcMaintenanceClaim } from "./gc-C7YxKNci.mjs";
22
+ import { r as readWorkspaceLogs, t as followWorkspaceLogs } from "./logs-DWT7jGpF.mjs";
23
23
  import { t as readProjectStats } from "./stats-report-BVRCqwWA.mjs";
24
- import { n as buildAndroidOperation, t as buildIosOperation } from "./build-DFBGWOTc.mjs";
25
- import { a as readAndroidBuildPlan, i as runAndroidOperation } from "./android-BL-QqHjc.mjs";
26
- import { i as readIosBuildPlan, r as runIosOperation } from "./ios-dbXzjTxx.mjs";
27
- import { a as buildMacosBundle, i as planMacos, n as runMacos } from "./macos-Ch7vuM-G.mjs";
28
- import { t as runWeb } from "./web-DwYCTFdh.mjs";
29
- import { t as mutateSetting } from "./settings-write-D85j8mej.mjs";
24
+ import { n as buildAndroidOperation, t as buildIosOperation } from "./build-D7SuVoRX.mjs";
25
+ import { a as readAndroidBuildPlan, i as runAndroidOperation } from "./android-D7qjT2fq.mjs";
26
+ import { i as readIosBuildPlan, r as runIosOperation } from "./ios-DSBs9c6d.mjs";
27
+ import { a as buildMacosBundle, i as planMacos, n as runMacos } from "./macos-CtBtA_hW.mjs";
28
+ import { t as runWeb } from "./web-BdaMBr2O.mjs";
29
+ import { t as mutateSetting } from "./settings-write-C6d7EC54.mjs";
30
30
  import { randomBytes } from "node:crypto";
31
31
  import { mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync } from "node:fs";
32
32
  import { stripVTControlCharacters } from "node:util";
@@ -1,16 +1,16 @@
1
1
  import { D as ownership_claim_exports, d as throwIfCancelled, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
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-DWI9tGPU.mjs";
4
- import { Dn as RESOLVE_TIMEOUT_MS, Mn as isEasAuthFailureText, jn as easAuthNote } from "./ccache-BXtzEL6M.mjs";
5
- import { $ as cancelledFailure, A as COMPILATION_CACHE_NOT_RUN, F as compilationCacheActivityLine, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.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
6
  import { E as storedAppId, S as providerUploadOutcome, b as prepareProviderDownloadDir, x as providerDownloadPath } from "./build-cache-Cqj4FGnX.mjs";
7
- import { C as COMPILATION_CACHE_CORRUPT, 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 clearCorruptCompilationCache } from "./client-0_Mnfz0a.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-xS50Mt0V.mjs";
9
- import { S as xcodeFailureReport, p as printDiagnostics } from "./support-D8OH0z98.mjs";
10
- import { f as settleFingerprintCheck, u as skippedMissReason } from "./prebuild-Bhs7TTcz.mjs";
11
- import { t as buildPlacementRecord } from "./placement-log-nnGnu8mo.mjs";
12
- import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-DTh_LxrE.mjs";
13
- import { r as finishIosUpload, t as IosRecipeRefusal } from "./ios-project-BzfLigfh.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";
14
14
  import { rmSync } from "node:fs";
15
15
  import { join } from "node:path";
16
16
  import { machineCapacity } from "@stim-cli/core/state";
@@ -1,16 +1,16 @@
1
1
  import { D as ownership_claim_exports, d as throwIfCancelled, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
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-DWI9tGPU.mjs";
4
- import { Dn as RESOLVE_TIMEOUT_MS, Mn as isEasAuthFailureText, jn as easAuthNote, n as CCACHE_UNAVAILABLE, r as ccacheActivityLine, t as CCACHE_NOT_RUN } from "./ccache-BXtzEL6M.mjs";
5
- import { $ as cancelledFailure, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.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, n as CCACHE_UNAVAILABLE, r as ccacheActivityLine, t as CCACHE_NOT_RUN, wn as RESOLVE_TIMEOUT_MS } from "./ccache-ChBMXlBq.mjs";
5
+ import { _t as runCancellationSignal, lt as cancelledFailure } from "./toolchain-CYonNjd_.mjs";
6
6
  import { b as prepareProviderDownloadDir, x as providerDownloadPath } from "./build-cache-Cqj4FGnX.mjs";
7
- import { c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-0_Mnfz0a.mjs";
8
- import { a as missingPackageManagerRemedy, i as fingerprintMismatchRemedy, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, t as OffloadRefusal } from "./selection-xS50Mt0V.mjs";
9
- import { f as formatDiagnostic } from "./react-native-build-DaPfzf_e.mjs";
10
- import { u as skippedMissReason } from "./prebuild-Bhs7TTcz.mjs";
11
- import { t as buildPlacementRecord } from "./placement-log-nnGnu8mo.mjs";
12
- import { n as settleArtifactUploads, t as acquireArtifact } from "./acquire-artifact-DTh_LxrE.mjs";
13
- import { a as PLATFORM, h as displayPath } from "./support-CqyWfZZI.mjs";
7
+ import { c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-kU37gURU.mjs";
8
+ import { a as missingPackageManagerRemedy, i as fingerprintMismatchRemedy, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, t as OffloadRefusal } from "./selection-CH-MUVGD.mjs";
9
+ import { f as formatDiagnostic } from "./react-native-build-CuvNPt-q.mjs";
10
+ import { 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 { a as PLATFORM, h as displayPath } from "./support-BNe1_Hg7.mjs";
14
14
  import { t as AndroidRecipeRefusal } from "./android-project-BCAAmMwz.mjs";
15
15
  import { rmSync } from "node:fs";
16
16
  import { join } from "node:path";
@@ -1,11 +1,11 @@
1
1
  import { m as getProject, v as loadConfig$1 } from "./config-BW0fAtoK.mjs";
2
- import { m as peekBudget } from "./ccache-BXtzEL6M.mjs";
2
+ import { m as peekBudget } from "./ccache-ChBMXlBq.mjs";
3
3
  import { z as readHostMemoryPressureAsync } from "./ios-BdZdNsAj.mjs";
4
- import { _ as hostingMachines, o as namedBuildMachine, u as resolveBuildMachine } from "./selection-xS50Mt0V.mjs";
5
- import { h as requireHostedAppMode, l as call, u as connectHost } from "./hosted-client-D19Lv0tg.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
6
  import { c as writeHostedNativeAsync, r as readHostedNative } from "./ios-state-CWsBysyN.mjs";
7
- import { i as prepareHostedNative } from "./hosted-native-BzXIy97W.mjs";
8
- import { d as peekDeviceSlots, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-BAkETfIl.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";
9
9
  import { ambientEnv } from "@stim-cli/core";
10
10
  import { automaticMachineEnabled, isJsonObject, machineCapacity, mayRunHere, parseHostedChoice, parseHostedNativeOffer, prefersRemote } from "@stim-cli/core/state";
11
11
  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
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-DWI9tGPU.mjs";
3
+ import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
4
  import { m as getProject } from "./config-BW0fAtoK.mjs";
5
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-DWEXiBA9.mjs";
6
+ import { b as isPackageResolvable, v as detectIsExpo } from "./project-DU3jjnBE.mjs";
7
7
  import { d as resolveProjectMetro } from "./metro-B5PVz0Wv.mjs";
8
8
  import { c as readNdjsonGenerations$1 } from "./ndjson-CrjIsGzw.mjs";
9
- import { Wt as readMetroRecords } from "./ccache-BXtzEL6M.mjs";
9
+ import { Wt as readMetroRecords } from "./ccache-ChBMXlBq.mjs";
10
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-B3ahAHZc.mjs";
11
+ import { ft as teardownBrowserHeld, x as resolveSupervisorTarget } from "./workspaces-B9v5V7Es.mjs";
12
12
  import { i as reserveBrowserPort, n as getNamedPort } from "./named-ports-CA0nB9Yw.mjs";
13
13
  import { n as sendToOwnedPage, t as liveWebRecord } from "./page-Dj8IqvGM.mjs";
14
- import { o as resolveWorkspaceMetroPort } from "./start-BsEV4S-s.mjs";
14
+ import { o as resolveWorkspaceMetroPort } from "./start-WTMumMHi.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,28 @@
1
1
  import { d as throwIfCancelled, u as cancelledError, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
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-DWI9tGPU.mjs";
3
+ import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
4
4
  import { D as upsertProject, k as withConfigLockAsync, m as getProject, u as getConcurrencyLimits } from "./config-BW0fAtoK.mjs";
5
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-DWEXiBA9.mjs";
6
+ import { f as projectRegistry, v as detectIsExpo } from "./project-DU3jjnBE.mjs";
7
7
  import { s as workspaceShareURL } from "./stim-desktop-_WTria-r.mjs";
8
8
  import { j as hostSystemImageArch } from "./android-Iq0M2t2d.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { An as checkEasAuth, Rn as resolveRemote, zn as uploadRemote } from "./ccache-BXtzEL6M.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-B3ahAHZc.mjs";
12
- import { H as readBundleId, ct as withNativeBuildRun, st as runCancellationSignal } from "./toolchain-s5ZmG42Z.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-C8kBq9w0.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
14
  import { E as storedAppId, S as providerUploadOutcome } from "./build-cache-Cqj4FGnX.mjs";
15
15
  import { m as listIosRuntimes } from "./ios-BdZdNsAj.mjs";
16
16
  import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
17
- import { S as setRemoteLogSink } from "./client-0_Mnfz0a.mjs";
18
- import { d as resolveBuildPlacement } from "./selection-xS50Mt0V.mjs";
19
- import { c as iosProjectPathError, g as resolveIosBuildSetup, m as resolveConfiguration, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-D8OH0z98.mjs";
20
- import { f as settleFingerprintCheck } from "./prebuild-Bhs7TTcz.mjs";
21
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-e1OU8gEN.mjs";
22
- import { t as acquireAndroidArtifact } from "./artifact-BMjubIP2.mjs";
23
- import { a as persistLastBuild, l as resolveAndroidBuildPlan, n as finishAndroidUpload } from "./result-DuimMZKJ.mjs";
24
- import { o as lastBuildRecord } from "./ios-project-BzfLigfh.mjs";
25
- import { t as acquireIosArtifact } from "./artifact-BufzdGbT.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";
26
26
  import { constants, promises } from "node:fs";
27
27
  import { basename, join } from "node:path";
28
28
  import { hostSimulatorArch } from "@stim-cli/core";
@@ -0,0 +1,174 @@
1
+ import { createHash, randomUUID } from "node:crypto";
2
+ import { createReadStream } from "node:fs";
3
+ import { isDeepStrictEqual } from "node:util";
4
+ import { basename, join } from "node:path";
5
+ import { reactNativeArtifactIdentity } from "@stim-cli/core";
6
+ import { isJsonObject } from "@stim-cli/core/state";
7
+ import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
8
+ import { createFilesystemFileCache } from "@stim-cli/cache";
9
+ //#region src/offload/build-artifact-cache.ts
10
+ const androidPackage = (value) => typeof value === "string" && /^[A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)+$/.test(value);
11
+ function gradleQueryKey(query) {
12
+ const { android, inputs } = query;
13
+ return createHash("sha256").update(JSON.stringify([
14
+ query.project,
15
+ query.sourceDigest,
16
+ inputs.ignored,
17
+ inputs.outputs,
18
+ android.variant,
19
+ android.abi === "all" ? null : android.abi,
20
+ android.compilerCache,
21
+ android.gradleBuildCache,
22
+ android.pch,
23
+ android.gradleRoot ?? null,
24
+ android.module ?? null
25
+ ])).digest("hex");
26
+ }
27
+ const completedKind = (query) => "build" in query ? "swiftpm" : "sourceDigest" in query ? "gradle" : "react-native";
28
+ const completedKey = (query) => "sourceDigest" in query && !("build" in query) ? gradleQueryKey(query) : createHash("sha256").update(JSON.stringify(query)).digest("hex");
29
+ function validArtifactIdentity(value) {
30
+ return isJsonObject(value) && typeof value.fingerprint === "string" && value.fingerprint.length > 0 && value.fingerprint.length <= 256 && typeof value.cacheKey === "string" && value.cacheKey.length > 0 && value.cacheKey.length <= 1024;
31
+ }
32
+ async function verified(path, artifact, signal) {
33
+ const digest = createHash("sha256");
34
+ let size = 0;
35
+ for await (const chunk of createReadStream(path, { signal })) {
36
+ size += chunk.length;
37
+ digest.update(chunk);
38
+ }
39
+ return size === artifact.size && digest.digest("hex") === artifact.sha256;
40
+ }
41
+ /** Completed immutable archives within one authenticated client's repository area. */
42
+ var BuildArtifactCache = class {
43
+ files;
44
+ directory;
45
+ constructor(directory) {
46
+ this.directory = directory;
47
+ this.files = createFilesystemFileCache(join(directory, "files"));
48
+ }
49
+ record(identity) {
50
+ const key = createHash("sha256").update(JSON.stringify([identity.fingerprint, identity.cacheKey])).digest("hex");
51
+ return join(this.directory, `${key}.json`);
52
+ }
53
+ async lookup(identity, signal) {
54
+ signal.throwIfAborted();
55
+ try {
56
+ const record = JSON.parse(await readFile(this.record(identity), {
57
+ encoding: "utf8",
58
+ signal
59
+ }));
60
+ if (!isJsonObject(record) || record.fingerprint !== identity.fingerprint || record.cacheKey !== identity.cacheKey || typeof record.name !== "string" || basename(record.name) !== record.name || !(record.name.endsWith(".app") || record.name.endsWith(".apk") && androidPackage(record.androidPackage)) || typeof record.size !== "number" || !Number.isSafeInteger(record.size) || record.size <= 0 || typeof record.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(record.sha256)) return null;
61
+ if ((await this.files.stat({
62
+ key: record.sha256,
63
+ signal
64
+ }))?.size !== record.size) return null;
65
+ return {
66
+ ...identity,
67
+ name: record.name,
68
+ size: record.size,
69
+ sha256: record.sha256,
70
+ ...record.name.endsWith(".apk") && androidPackage(record.androidPackage) ? { androidPackage: record.androidPackage } : {}
71
+ };
72
+ } catch {
73
+ signal.throwIfAborted();
74
+ return null;
75
+ }
76
+ }
77
+ async store(identity, parameters, archive, artifact, signal) {
78
+ if (!validArtifactIdentity(identity) || !await verified(archive, artifact, signal)) return false;
79
+ await this.files.store({
80
+ key: artifact.sha256,
81
+ sourcePath: archive,
82
+ overwrite: true,
83
+ signal
84
+ });
85
+ await mkdir(this.directory, {
86
+ recursive: true,
87
+ mode: 448
88
+ });
89
+ const temporary = join(this.directory, `${randomUUID()}.partial`);
90
+ try {
91
+ await writeFile(temporary, JSON.stringify({
92
+ ...identity,
93
+ ...artifact,
94
+ parameters
95
+ }), {
96
+ mode: 384,
97
+ signal
98
+ });
99
+ signal.throwIfAborted();
100
+ await rename(temporary, this.record(identity));
101
+ return true;
102
+ } finally {
103
+ await rm(temporary, { force: true });
104
+ }
105
+ }
106
+ async storeCompleted(query, identity, receipt, archive, artifact, signal) {
107
+ if (!("build" in query) && ("sourceDigest" in query || query.platform === "android")) {
108
+ if (!artifact.name.endsWith(".apk") || !androidPackage(artifact.androidPackage)) return;
109
+ } else if (!artifact.name.endsWith(".app")) return;
110
+ if (!await this.store(identity, { ...query }, archive, artifact, signal)) return;
111
+ const key = completedKey(query);
112
+ const temporary = join(this.directory, `${randomUUID()}.partial`);
113
+ try {
114
+ await writeFile(temporary, JSON.stringify({
115
+ query: key,
116
+ receipt
117
+ }), {
118
+ mode: 384,
119
+ signal
120
+ });
121
+ signal.throwIfAborted();
122
+ await rename(temporary, join(this.directory, `${key}.${completedKind(query)}.json`));
123
+ } finally {
124
+ await rm(temporary, { force: true });
125
+ }
126
+ }
127
+ async completedRecord(query, signal) {
128
+ signal.throwIfAborted();
129
+ try {
130
+ const key = completedKey(query);
131
+ const record = JSON.parse(await readFile(join(this.directory, `${key}.${completedKind(query)}.json`), {
132
+ encoding: "utf8",
133
+ signal
134
+ }));
135
+ return isJsonObject(record) && record.query === key && isJsonObject(record.receipt) ? record : null;
136
+ } catch {
137
+ signal.throwIfAborted();
138
+ return null;
139
+ }
140
+ }
141
+ async receipt(query, signal) {
142
+ return (await this.completedRecord(query, signal))?.receipt ?? null;
143
+ }
144
+ async lookupReactNative(query, signal) {
145
+ const record = await this.completedRecord(query, signal);
146
+ if (!record || !isJsonObject(record.receipt) || !isJsonObject(record.receipt.toolchain) || !isDeepStrictEqual(record.receipt.query, query)) return null;
147
+ return this.lookup(reactNativeArtifactIdentity({
148
+ query,
149
+ toolchain: record.receipt.toolchain
150
+ }), signal);
151
+ }
152
+ async fetch(identity, destinationDir, signal) {
153
+ const artifact = await this.lookup(identity, signal);
154
+ if (!artifact) return null;
155
+ const path = await this.files.resolve({
156
+ key: artifact.sha256,
157
+ destinationDir,
158
+ signal
159
+ });
160
+ if (!path) return null;
161
+ let complete = false;
162
+ try {
163
+ complete = await verified(path, artifact, signal);
164
+ return complete ? {
165
+ path,
166
+ artifact
167
+ } : null;
168
+ } finally {
169
+ if (!complete) await rm(path, { force: true });
170
+ }
171
+ }
172
+ };
173
+ //#endregion
174
+ export { validArtifactIdentity as n, BuildArtifactCache as t };
@@ -0,0 +1,25 @@
1
+ import { BuildArtifactIdentity, BuildArtifactResult, BuildGradleArtifactQuery, BuildReactNativeArtifactQuery, BuildSwiftpmArtifactQuery, CachedBuildArtifact } from "@stim-cli/core/protocol";
2
+ //#region src/offload/build-artifact-cache.d.ts
3
+ type CompletedQuery = BuildGradleArtifactQuery | BuildReactNativeArtifactQuery | BuildSwiftpmArtifactQuery;
4
+ declare function validArtifactIdentity(value: unknown): value is BuildArtifactIdentity;
5
+ /** Completed immutable archives within one authenticated client's repository area. */
6
+ declare class BuildArtifactCache {
7
+ private readonly files;
8
+ private readonly directory;
9
+ constructor(directory: string);
10
+ private record;
11
+ lookup(identity: BuildArtifactIdentity, signal: AbortSignal): Promise<CachedBuildArtifact | null>;
12
+ store(identity: BuildArtifactIdentity, parameters: Record<string, unknown>, archive: string, artifact: BuildArtifactResult, signal: AbortSignal): Promise<boolean>;
13
+ storeCompleted(query: CompletedQuery, identity: BuildArtifactIdentity, receipt: unknown, archive: string, artifact: BuildArtifactResult & {
14
+ androidPackage?: string;
15
+ }, signal: AbortSignal): Promise<void>;
16
+ private completedRecord;
17
+ receipt(query: CompletedQuery, signal: AbortSignal): Promise<unknown | null>;
18
+ lookupReactNative(query: BuildReactNativeArtifactQuery, signal: AbortSignal): Promise<CachedBuildArtifact | null>;
19
+ fetch(identity: BuildArtifactIdentity, destinationDir: string, signal: AbortSignal): Promise<{
20
+ path: string;
21
+ artifact: CachedBuildArtifact;
22
+ } | null>;
23
+ }
24
+ //#endregion
25
+ export { BuildArtifactCache, validArtifactIdentity };