stim 1.21.0 → 1.22.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.
- package/README.md +60 -7
- package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-Co2k4f7O.mjs} +21 -3
- package/dist/{act-DHAw2A2S.mjs → act-DsuqEkiM.mjs} +298 -164
- package/dist/{activity-BzVfHSrY.mjs → activity-CMLmzp7o.mjs} +33 -12
- package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-DUFaTMdd.mjs} +7 -7
- package/dist/{android-BLgbNqox.mjs → android-ByRMUoiJ.mjs} +66 -52
- package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
- package/dist/{android-CV_GCELZ.mjs → android-DGkNqa_c.mjs} +5 -5
- package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
- package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
- package/dist/api.d.mts +132 -118
- package/dist/api.mjs +239 -42
- package/dist/{artifact-B8T3S5gi.mjs → artifact-8EY8SAPw.mjs} +40 -35
- package/dist/{artifact-DAuZ-FNU.mjs → artifact-DJPy518Y.mjs} +69 -40
- package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
- package/dist/{browser-web-QQzVjz3O.mjs → browser-web-Bcv99PBM.mjs} +187 -59
- package/dist/{budget-Bs6SxxzO.mjs → budget-Cvwn54qV.mjs} +830 -699
- package/dist/{build-CoPzQRNw.mjs → build-CabC3G23.mjs} +34 -27
- package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
- package/dist/{build-plan-CaFskB7_.mjs → build-plan-DUC8Ka9y.mjs} +74 -14
- package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{ccache-BJRZ9pG3.mjs → ccache-Btwc36-I.mjs} +6 -6
- package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
- package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
- package/dist/{cli-0DYf8QhQ.mjs → cli-CHZa9Lvk.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-UXD70ZbM.mjs → client-OyRoEuSr.mjs} +218 -47
- package/dist/collector-run.d.mts +1 -1
- package/dist/collector-run.mjs +6 -6
- package/dist/{command-output-B1UrjZHL.mjs → command-output-gwpm28fu.mjs} +1 -1
- package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
- package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
- package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
- package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
- package/dist/{dev-client-UOeESKm6.mjs → dev-client-BSDR5h3F.mjs} +2 -2
- package/dist/{device-ExJq8Ei7.mjs → device-B-L3Fbxy.mjs} +71 -14
- package/dist/{device-DCxH7_By.mjs → device-DklWZLqb.mjs} +16 -16
- package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-DK5_EwRS.mjs} +9 -10
- package/dist/device-host-worker.mjs +25 -32
- package/dist/{device-ios-DRUeKaFV.mjs → device-ios-DoB6KFCO.mjs} +39 -16
- package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-xJPQ_QQG.mjs} +5 -5
- package/dist/{device-pool-DMRpVX9a.mjs → device-pool-BMkdsefq.mjs} +3 -3
- package/dist/{doctor-DTvaDOda.mjs → doctor-Bo7BXLux.mjs} +24 -37
- package/dist/{doctor-Dhqebm0q.mjs → doctor-D5_EzwfA.mjs} +19 -16
- package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
- package/dist/doctor-fingerprint.mjs +1 -1
- package/dist/{doctor-BLHCYxzi.mjs → doctor-thjWAV0z.mjs} +1 -1
- package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-N2wDotwQ.mjs} +5 -5
- package/dist/{eas-build-BomfRnFT.mjs → eas-build-CwknaQYj.mjs} +4 -4
- package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-CSgAulr5.mjs} +27 -18
- package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-DlY_serQ.mjs} +8 -7
- package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-DBWO2rxE.mjs} +10 -10
- package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
- package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
- package/dist/{gc-_-dCXdyL.mjs → gc-CXxN-4SE.mjs} +587 -313
- package/dist/gc-DnNDQyaP.mjs +3 -0
- package/dist/{guide-Yqwt2bd6.mjs → guide-Br0LEfKy.mjs} +239 -43
- package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-B-9f-jkd.mjs} +6 -6
- package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-DZAPrcro.mjs} +4 -4
- package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
- package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-FIRx9X2f.mjs} +5 -5
- package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-_awYSpfv.mjs} +21 -12
- package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-BdzE668-.mjs} +27 -14
- package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
- package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DDg3SdvY.mjs} +7 -7
- package/dist/ios-CDvlmUs7.d.mts +24 -0
- package/dist/{ios-CQ68hG9s.mjs → ios-Ds1clbIt.mjs} +8 -8
- package/dist/{ios-device-CwFMehUS.mjs → ios-device--h_-8ENa.mjs} +3 -3
- package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
- package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
- package/dist/{ios-ubFsBzwq.mjs → ios-pm4nL6By.mjs} +59 -50
- package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CZhKODF3.mjs} +5 -5
- package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
- package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
- package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
- package/dist/{js-swap-Cc1dttps.mjs → js-swap-Bwhh4S7V.mjs} +7 -29
- package/dist/{launch-Zq2mOSDy.mjs → launch-BjxemNpK.mjs} +40 -39
- package/dist/{launch-CD1yVc7U.mjs → launch-CCzXlc8r.mjs} +16 -16
- package/dist/{logs-BS00Anxf.mjs → logs-BfwwadsZ.mjs} +151 -24
- package/dist/{logs-CMm05HxN.mjs → logs-jTS_lHSo.mjs} +10 -17
- package/dist/{macos-B65--pPd.mjs → macos-DVlSSyUg.mjs} +1 -1
- package/dist/{macos-C-0qJ6zq.mjs → macos-NfV2D7dO.mjs} +143 -46
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +8 -8
- package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
- package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
- package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
- package/dist/{native-android-JACyjTZs.mjs → native-android-CqgnOgsT.mjs} +43 -242
- package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
- package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
- package/dist/{native-run-DY_RLx3C.mjs → native-run-NwUuxbkg.mjs} +4 -5
- package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-B7KIafpM.mjs} +8 -7
- package/dist/native-source-Y0yLhFyQ.mjs +133 -0
- package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-D_VOfFL7.mjs} +2 -3
- package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-BYDOHWLN.mjs} +27 -32
- package/dist/offload-worker.d.mts +65 -2
- package/dist/offload-worker.mjs +305 -73
- package/dist/operation-exec-BW0em61G.mjs +171 -0
- package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
- package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
- package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
- package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-DIsMtN-d.mjs} +12 -8
- package/dist/{ports-D-MmCTdv.mjs → ports-Cy1RkmuQ.mjs} +3 -3
- package/dist/{prebuild-uD_ipCxF.mjs → prebuild-D4JoEAEs.mjs} +49 -14
- package/dist/{project-BZNjmW_8.mjs → project-wM_XFTvE.mjs} +16 -16
- package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
- package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
- package/dist/pull-requests.d.mts +2 -2
- package/dist/pull-requests.mjs +2 -2
- package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-6OZ7MSM7.mjs} +71 -48
- package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-Dvd8hC21.mjs} +8 -8
- package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-DsoSF1Y9.mjs} +7 -7
- package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-4u1Rn-GR.mjs} +40 -26
- package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
- package/dist/registration-BcRgF6Ox.mjs +51 -0
- package/dist/{reload-CmTRFJaX.mjs → reload-BzkYabB-.mjs} +16 -15
- package/dist/{reload-DzjSl5P_.mjs → reload-D7AVlb8N.mjs} +1 -1
- package/dist/{remote-ByYkXdGD.mjs → remote-DjGDmlTZ.mjs} +18 -15
- package/dist/{result-DNiS-tTP.mjs → result-D2Ykz_iD.mjs} +24 -23
- package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
- package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
- package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
- package/dist/{server-command-CtzloH3v.mjs → server-command-C6QjeupS.mjs} +5 -5
- package/dist/{server-expo-DT_F_uVI.mjs → server-expo-CrjB29pq.mjs} +7 -5
- package/dist/server-expo-D58c9L0M.mjs +2 -0
- package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
- package/dist/{settings-T1gtc3bf.mjs → settings-DpR-1Wnn.mjs} +1 -1
- package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-CzD60rOD.mjs} +7 -6
- package/dist/settings.schema.json +13 -0
- package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
- package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-CbfmNgM6.mjs} +6 -6
- package/dist/{stage-BIS0ydsV.mjs → stage-Bps5oius.mjs} +21 -4
- package/dist/{start-RChynRDp.mjs → start-Br-oxqMD.mjs} +1 -1
- package/dist/{start-7lpH7hmN.mjs → start-EojN4WFz.mjs} +622 -393
- package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
- package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
- package/dist/{stats-53T7OTb9.mjs → stats-D3GerlFW.mjs} +5 -5
- package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
- package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
- package/dist/{status-CSi6tlRq.mjs → status-EvrK72L2.mjs} +1 -1
- package/dist/{status-BL7jVyAB.mjs → status-WBDajew2.mjs} +43 -29
- package/dist/{status-watch-GDCfqpTE.mjs → status-watch-Bg_u-pwR.mjs} +48 -16
- package/dist/status-worker.mjs +1 -1
- package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
- package/dist/{stop-Bk_1qiV6.mjs → stop-DTZ9uTw3.mjs} +2 -2
- package/dist/{stop-D7h6jAXQ.mjs → stop-Dky10AEJ.mjs} +31 -22
- package/dist/{stop-CPzlM1L-.mjs → stop-Mv6W9FAk.mjs} +15 -16
- package/dist/supervisor-run.d.mts +3 -3
- package/dist/supervisor-run.mjs +28 -36
- package/dist/{support-Dlu37g6H.mjs → support-CNioewsd.mjs} +10 -10
- package/dist/{support-67vraa1Q.mjs → support-yUiOjnVY.mjs} +8 -8
- package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
- package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
- package/dist/toolchain-BY8X8HXx.mjs +2 -0
- package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-DpJMHq0n.mjs} +9 -6
- package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
- package/dist/trigger-yb_nFzPF.mjs +2 -0
- package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
- package/dist/web-CZ07gd77.mjs +2 -0
- package/dist/{web-CJmIj6AI.mjs → web-DKx6yoFA.mjs} +11 -10
- package/dist/web-run.mjs +11 -9
- package/dist/windows-report.mjs +1 -1
- package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
- package/dist/{workspaces-BccMFmGQ.mjs → workspaces-CpANmBlq.mjs} +594 -266
- package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-CHecZ4Oq.mjs} +850 -551
- package/dist/worktree-ZqZVjD9K.mjs +2 -0
- package/dist/{xcode-Zlx3qjEs.mjs → xcode-BXn9-xYx.mjs} +5 -5
- package/package.json +7 -7
- package/shim/android-audio/Main.java +24 -0
- package/shim/android-audio/README.md +17 -0
- package/shim/android-audio.jar +0 -0
- package/dist/gc-C-WwL0yi.mjs +0 -3
- package/dist/git-C3iTsJaZ.mjs +0 -73
- package/dist/server-expo-C-90EhcG.mjs +0 -2
- package/dist/settings-DkdmlelE.d.mts +0 -15
- package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
- package/dist/toolchain-DhKwp9iI.mjs +0 -2
- package/dist/trigger-Bf3uDcpv.mjs +0 -2
- package/dist/web-DknQETPs.mjs +0 -2
- package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
- package/dist/worktree-CK2MpJW5.mjs +0 -2
|
@@ -1,135 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as gitAsync } from "./operation-exec-BW0em61G.mjs";
|
|
2
2
|
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
3
|
+
import { a as sourceManifest, i as nativeTransferManifest, r as nativeFileDigest } from "./native-source-Y0yLhFyQ.mjs";
|
|
3
4
|
import { createHash } from "node:crypto";
|
|
4
|
-
import { createReadStream } from "node:fs";
|
|
5
5
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
6
6
|
import { access, lstat, readFile, readlink, realpath } from "node:fs/promises";
|
|
7
|
-
//#region src/offload/native-source.ts
|
|
8
|
-
function* repositoryInputs(snapshot) {
|
|
9
|
-
const links = snapshot.entries.filter((entry) => entry.kind === "link").map((entry) => `${entry.path}/@target`);
|
|
10
|
-
for (const entry of snapshot.entries) {
|
|
11
|
-
if (entry.path === "repository") continue;
|
|
12
|
-
if (!entry.path.startsWith("repository/")) throw new Error("Native offload requires every input to be inside the repository.");
|
|
13
|
-
if (links.some((link) => entry.path === link || entry.path.startsWith(`${link}/`))) continue;
|
|
14
|
-
yield {
|
|
15
|
-
entry,
|
|
16
|
-
path: entry.path.slice(11)
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const absentInput = (path) => /* @__PURE__ */ new Error(`Native input ${path} is ignored or absent from the source transfer; it was not uploaded.`);
|
|
21
|
-
/** Throws the same membership refusal as nativeTransferManifest, from the git-visible paths alone. */
|
|
22
|
-
function checkNativeTransferMembership(snapshot, visible) {
|
|
23
|
-
for (const { entry, path } of repositoryInputs(snapshot)) {
|
|
24
|
-
if (entry.kind === "directory" || visible.has(path)) continue;
|
|
25
|
-
for (let index = path.indexOf("/"); index !== -1; index = path.indexOf("/", index + 1)) if (visible.has(path.slice(0, index))) throw new Error(`Native input ${path} is inside the git submodule ${path.slice(0, index)}; submodules are not transferred.`);
|
|
26
|
-
throw absentInput(path);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
async function nativeTransferManifest(root, snapshot, visible, signal) {
|
|
30
|
-
const files = new Map(visible.map((file) => [file.path, file]));
|
|
31
|
-
signal?.throwIfAborted();
|
|
32
|
-
root = await realpath(root);
|
|
33
|
-
const selected = [];
|
|
34
|
-
const empty = createHash("sha256").update("").digest("hex");
|
|
35
|
-
for (const { entry, path } of repositoryInputs(snapshot)) {
|
|
36
|
-
signal?.throwIfAborted();
|
|
37
|
-
if (entry.kind === "directory") {
|
|
38
|
-
selected.push({
|
|
39
|
-
path,
|
|
40
|
-
kind: "directory",
|
|
41
|
-
size: 0,
|
|
42
|
-
sha256: empty
|
|
43
|
-
});
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
const file = files.get(path);
|
|
47
|
-
if (!file) throw absentInput(path);
|
|
48
|
-
const kind = entry.kind === "file:0" ? "file" : entry.kind === "file:73" ? "exec" : entry.kind;
|
|
49
|
-
if (kind !== file.kind || entry.sha256 !== file.sha256) throw new Error(`Native input ${path} changed or has an unsupported executable mode.`);
|
|
50
|
-
selected.push(file);
|
|
51
|
-
if (kind === "link") {
|
|
52
|
-
const link = join(root, path);
|
|
53
|
-
const target = await readlink(link);
|
|
54
|
-
const destination = relative(root, await realpath(resolve(dirname(link), target)));
|
|
55
|
-
if (isAbsolute(target) || isAbsolute(destination) || destination === ".." || destination.startsWith(`..${sep}`)) throw new Error(`Native input ${path} has a link that cannot be relocated inside the repository.`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return selected.toSorted((a, b) => a.path.localeCompare(b.path));
|
|
59
|
-
}
|
|
60
|
-
async function verifyNativeTransfer(root, files, digest, ignoredDirectoryMarkers = []) {
|
|
61
|
-
const snapshot = await fingerprintNativeInputs([{
|
|
62
|
-
name: "repository",
|
|
63
|
-
path: root
|
|
64
|
-
}], {
|
|
65
|
-
excluded: [join(root, ".git")],
|
|
66
|
-
ignoredDirectoryMarkers,
|
|
67
|
-
parameters: null
|
|
68
|
-
});
|
|
69
|
-
return manifestDigest(await nativeTransferManifest(root, snapshot, files)) === digest;
|
|
70
|
-
}
|
|
71
|
-
/** SHA-256 and byte count of one regular file, streamed without blocking the caller. */
|
|
72
|
-
async function nativeFileDigest(path, signal) {
|
|
73
|
-
const hash = createHash("sha256");
|
|
74
|
-
let size = 0;
|
|
75
|
-
try {
|
|
76
|
-
for await (const chunk of createReadStream(path, { signal })) {
|
|
77
|
-
hash.update(chunk);
|
|
78
|
-
size += chunk.length;
|
|
79
|
-
}
|
|
80
|
-
} finally {
|
|
81
|
-
signal?.throwIfAborted();
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
size,
|
|
85
|
-
sha256: hash.digest("hex")
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
/** The exact source a build needs: tracked and untracked, not ignored, as `git ls-files -co --exclude-standard`. */
|
|
89
|
-
async function sourceManifest(repoRoot, strict = false, signal) {
|
|
90
|
-
const files = [];
|
|
91
|
-
for (const path of await gitVisiblePaths(repoRoot, signal)) {
|
|
92
|
-
signal?.throwIfAborted();
|
|
93
|
-
const absolute = join(repoRoot, path);
|
|
94
|
-
let stat;
|
|
95
|
-
try {
|
|
96
|
-
stat = await lstat(absolute);
|
|
97
|
-
} catch (error) {
|
|
98
|
-
if (strict && error.code !== "ENOENT") throw error;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (stat.isSymbolicLink()) {
|
|
102
|
-
const target = Buffer.from(await readlink(absolute));
|
|
103
|
-
files.push({
|
|
104
|
-
path,
|
|
105
|
-
kind: "link",
|
|
106
|
-
size: target.length,
|
|
107
|
-
sha256: createHash("sha256").update(target).digest("hex")
|
|
108
|
-
});
|
|
109
|
-
} else if (stat.isFile()) files.push({
|
|
110
|
-
path,
|
|
111
|
-
kind: stat.mode & 73 ? "exec" : "file",
|
|
112
|
-
...await nativeFileDigest(absolute, signal)
|
|
113
|
-
});
|
|
114
|
-
else if (strict) throw new Error(`Native source ${path} is not a file or link; transfer submodule contents explicitly.`);
|
|
115
|
-
}
|
|
116
|
-
signal?.throwIfAborted();
|
|
117
|
-
return files;
|
|
118
|
-
}
|
|
119
|
-
async function gitVisiblePaths(repoRoot, signal) {
|
|
120
|
-
const listed = await gitAsync(repoRoot, [
|
|
121
|
-
"ls-files",
|
|
122
|
-
"-z",
|
|
123
|
-
"-co",
|
|
124
|
-
"--exclude-standard"
|
|
125
|
-
], {
|
|
126
|
-
untrimmed: true,
|
|
127
|
-
timeoutMs: 12e4,
|
|
128
|
-
signal
|
|
129
|
-
});
|
|
130
|
-
return new Set(listed.split("\0").filter(Boolean));
|
|
131
|
-
}
|
|
132
|
-
//#endregion
|
|
133
7
|
//#region src/integrations/native-gradle-inputs.ts
|
|
134
8
|
function containedPath(path) {
|
|
135
9
|
return typeof path === "string" && path.length > 0 && !path.includes("\\") && !path.includes(":") && !path.includes("\0") && !path.split("/").some((part) => !part || part === "." || part === ".." || part.toLowerCase() === ".git");
|
|
@@ -334,4 +208,4 @@ async function verifyGradleTransfer(repository, project, declaration, files, dig
|
|
|
334
208
|
return manifestDigest(await nativeTransferManifest(repository, snapshot, files, signal)) === digest;
|
|
335
209
|
}
|
|
336
210
|
//#endregion
|
|
337
|
-
export { nativeGradleTransfer as a,
|
|
211
|
+
export { nativeGradleTransfer as a, nativeGradleOutputs as i, gradleStateDirectories as n, validateGradleManifest as o, nativeGradleLocalSourceDigest as r, verifyGradleTransfer as s, gradleOffloadInputs as t };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as withWorkspaceProcessLock, l as refuseDeclaredSpawns, m as operationState, p as isTermination, s as allowDeclaredSpawns, u as signalDeclaredSpawns, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import { a as formatElapsed, l as phaseLine } from "./command-output-
|
|
4
|
-
import { o as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey } from "./workspace-state-
|
|
3
|
+
import { a as formatElapsed, l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
4
|
+
import { o as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey } from "./workspace-state-U08dEzhG.mjs";
|
|
5
5
|
import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
|
|
6
|
-
import { t as withWorkspaceProcessLock } from "./workspace-process-lock-1_1OoVW5.mjs";
|
|
7
6
|
import { existsSync, mkdirSync } from "node:fs";
|
|
8
7
|
import { basename, dirname, join } from "node:path";
|
|
9
8
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -192,7 +191,7 @@ function runCancellation(context) {
|
|
|
192
191
|
}
|
|
193
192
|
function cancelledFailure(context, platform, { code, message }) {
|
|
194
193
|
const cancelled = runCancellation(context);
|
|
195
|
-
if (cancelled === null) return null;
|
|
194
|
+
if (cancelled === null || code === "STIM_CLAIM_UNAVAILABLE") return null;
|
|
196
195
|
return {
|
|
197
196
|
code: "STIM_CANCELLED",
|
|
198
197
|
message: `The ${platform} run was ${cancelled} before it finished.`,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as ensureWorkspaceStorage } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import { l as phaseLine } from "./command-output-
|
|
3
|
-
import { r as readWorkspaceState$1 } from "./workspace-state-
|
|
4
|
-
import { j as metroPortSetting } from "./settings-
|
|
5
|
-
import {
|
|
6
|
-
import { Yt as LAUNCH_UNVERIFIED, qt as LAUNCH_BUNDLING } from "./budget-
|
|
7
|
-
import { c as startDevServer } from "./start-
|
|
2
|
+
import { l as phaseLine } from "./command-output-gwpm28fu.mjs";
|
|
3
|
+
import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
|
|
4
|
+
import { j as metroPortSetting } from "./settings-C7O8A6ZI.mjs";
|
|
5
|
+
import { d as resolveProjectMetro } from "./metro-DiXtA3Ty.mjs";
|
|
6
|
+
import { Yt as LAUNCH_UNVERIFIED, qt as LAUNCH_BUNDLING } from "./budget-Cvwn54qV.mjs";
|
|
7
|
+
import { c as startDevServer } from "./start-EojN4WFz.mjs";
|
|
8
8
|
import { readIdleStop } from "@stim-cli/core/state";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
//#region src/commands/native-runtime.ts
|
|
@@ -35,7 +35,8 @@ async function ensureDevServer({ root, port, settings, settingsContext, remote,
|
|
|
35
35
|
message: `Could not start this workspace's dev server: ${result.error.message}`,
|
|
36
36
|
remedy: result.error.remedy,
|
|
37
37
|
lines: result.lines,
|
|
38
|
-
reclaimed: result.reclaimed
|
|
38
|
+
reclaimed: result.reclaimed,
|
|
39
|
+
...result.retainedClaimRoots ? { retainedClaimRoots: result.retainedClaimRoots } : {}
|
|
39
40
|
};
|
|
40
41
|
const { facts } = result;
|
|
41
42
|
return {
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { s as gitAsync } from "./operation-exec-BW0em61G.mjs";
|
|
2
|
+
import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import { createReadStream } from "node:fs";
|
|
5
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
6
|
+
import { lstat, readlink, realpath } from "node:fs/promises";
|
|
7
|
+
//#region src/offload/native-source.ts
|
|
8
|
+
function* repositoryInputs(snapshot) {
|
|
9
|
+
const links = snapshot.entries.filter((entry) => entry.kind === "link").map((entry) => `${entry.path}/@target`);
|
|
10
|
+
for (const entry of snapshot.entries) {
|
|
11
|
+
if (entry.path === "repository") continue;
|
|
12
|
+
if (!entry.path.startsWith("repository/")) throw new Error("Native offload requires every input to be inside the repository.");
|
|
13
|
+
if (links.some((link) => entry.path === link || entry.path.startsWith(`${link}/`))) continue;
|
|
14
|
+
yield {
|
|
15
|
+
entry,
|
|
16
|
+
path: entry.path.slice(11)
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const absentInput = (path) => /* @__PURE__ */ new Error(`Native input ${path} is ignored or absent from the source transfer; it was not uploaded.`);
|
|
21
|
+
/** Throws the same membership refusal as nativeTransferManifest, from the git-visible paths alone. */
|
|
22
|
+
function checkNativeTransferMembership(snapshot, visible) {
|
|
23
|
+
for (const { entry, path } of repositoryInputs(snapshot)) {
|
|
24
|
+
if (entry.kind === "directory" || visible.has(path)) continue;
|
|
25
|
+
for (let index = path.indexOf("/"); index !== -1; index = path.indexOf("/", index + 1)) if (visible.has(path.slice(0, index))) throw new Error(`Native input ${path} is inside the git submodule ${path.slice(0, index)}; submodules are not transferred.`);
|
|
26
|
+
throw absentInput(path);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async function nativeTransferManifest(root, snapshot, visible, signal) {
|
|
30
|
+
const files = new Map(visible.map((file) => [file.path, file]));
|
|
31
|
+
signal?.throwIfAborted();
|
|
32
|
+
root = await realpath(root);
|
|
33
|
+
const selected = [];
|
|
34
|
+
const empty = createHash("sha256").update("").digest("hex");
|
|
35
|
+
for (const { entry, path } of repositoryInputs(snapshot)) {
|
|
36
|
+
signal?.throwIfAborted();
|
|
37
|
+
if (entry.kind === "directory") {
|
|
38
|
+
selected.push({
|
|
39
|
+
path,
|
|
40
|
+
kind: "directory",
|
|
41
|
+
size: 0,
|
|
42
|
+
sha256: empty
|
|
43
|
+
});
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const file = files.get(path);
|
|
47
|
+
if (!file) throw absentInput(path);
|
|
48
|
+
const kind = entry.kind === "file:0" ? "file" : entry.kind === "file:73" ? "exec" : entry.kind;
|
|
49
|
+
if (kind !== file.kind || entry.sha256 !== file.sha256) throw new Error(`Native input ${path} changed or has an unsupported executable mode.`);
|
|
50
|
+
selected.push(file);
|
|
51
|
+
if (kind === "link") {
|
|
52
|
+
const link = join(root, path);
|
|
53
|
+
const target = await readlink(link);
|
|
54
|
+
const destination = relative(root, await realpath(resolve(dirname(link), target)));
|
|
55
|
+
if (isAbsolute(target) || isAbsolute(destination) || destination === ".." || destination.startsWith(`..${sep}`)) throw new Error(`Native input ${path} has a link that cannot be relocated inside the repository.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return selected.toSorted((a, b) => a.path.localeCompare(b.path));
|
|
59
|
+
}
|
|
60
|
+
async function verifyNativeTransfer(root, files, digest, ignoredDirectoryMarkers = []) {
|
|
61
|
+
const snapshot = await fingerprintNativeInputs([{
|
|
62
|
+
name: "repository",
|
|
63
|
+
path: root
|
|
64
|
+
}], {
|
|
65
|
+
excluded: [join(root, ".git")],
|
|
66
|
+
ignoredDirectoryMarkers,
|
|
67
|
+
parameters: null
|
|
68
|
+
});
|
|
69
|
+
return manifestDigest(await nativeTransferManifest(root, snapshot, files)) === digest;
|
|
70
|
+
}
|
|
71
|
+
/** SHA-256 and byte count of one regular file, streamed without blocking the caller. */
|
|
72
|
+
async function nativeFileDigest(path, signal) {
|
|
73
|
+
const hash = createHash("sha256");
|
|
74
|
+
let size = 0;
|
|
75
|
+
try {
|
|
76
|
+
for await (const chunk of createReadStream(path, { signal })) {
|
|
77
|
+
hash.update(chunk);
|
|
78
|
+
size += chunk.length;
|
|
79
|
+
}
|
|
80
|
+
} finally {
|
|
81
|
+
signal?.throwIfAborted();
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
size,
|
|
85
|
+
sha256: hash.digest("hex")
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/** The exact source a build needs: tracked and untracked, not ignored, as `git ls-files -co --exclude-standard`. */
|
|
89
|
+
async function sourceManifest(repoRoot, strict = false, signal) {
|
|
90
|
+
const files = [];
|
|
91
|
+
for (const path of await gitVisiblePaths(repoRoot, signal)) {
|
|
92
|
+
signal?.throwIfAborted();
|
|
93
|
+
const absolute = join(repoRoot, path);
|
|
94
|
+
let stat;
|
|
95
|
+
try {
|
|
96
|
+
stat = await lstat(absolute);
|
|
97
|
+
} catch (error) {
|
|
98
|
+
if (strict && error.code !== "ENOENT") throw error;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (stat.isSymbolicLink()) {
|
|
102
|
+
const target = Buffer.from(await readlink(absolute));
|
|
103
|
+
files.push({
|
|
104
|
+
path,
|
|
105
|
+
kind: "link",
|
|
106
|
+
size: target.length,
|
|
107
|
+
sha256: createHash("sha256").update(target).digest("hex")
|
|
108
|
+
});
|
|
109
|
+
} else if (stat.isFile()) files.push({
|
|
110
|
+
path,
|
|
111
|
+
kind: stat.mode & 73 ? "exec" : "file",
|
|
112
|
+
...await nativeFileDigest(absolute, signal)
|
|
113
|
+
});
|
|
114
|
+
else if (strict) throw new Error(`Native source ${path} is not a file or link; transfer submodule contents explicitly.`);
|
|
115
|
+
}
|
|
116
|
+
signal?.throwIfAborted();
|
|
117
|
+
return files;
|
|
118
|
+
}
|
|
119
|
+
async function gitVisiblePaths(repoRoot, signal) {
|
|
120
|
+
const listed = await gitAsync(repoRoot, [
|
|
121
|
+
"ls-files",
|
|
122
|
+
"-z",
|
|
123
|
+
"-co",
|
|
124
|
+
"--exclude-standard"
|
|
125
|
+
], {
|
|
126
|
+
untrimmed: true,
|
|
127
|
+
timeoutMs: 12e4,
|
|
128
|
+
signal
|
|
129
|
+
});
|
|
130
|
+
return new Set(listed.split("\0").filter(Boolean));
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { sourceManifest as a, nativeTransferManifest as i, gitVisiblePaths as n, verifyNativeTransfer as o, nativeFileDigest as r, checkNativeTransferMembership as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { d as workspaceDir, u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { h as pbxString, m as pbxReferences } from "./project-BZNjmW_8.mjs";
|
|
2
|
+
import { a as killOnAbort, l as gitQuietAsync, r as childEnvironment } from "./operation-exec-BW0em61G.mjs";
|
|
3
|
+
import { h as pbxString, m as pbxReferences } from "./project-wM_XFTvE.mjs";
|
|
5
4
|
import { n as fingerprintNativeInputs, t as NativeInputError } from "./native-inputs-TRTTTRxt.mjs";
|
|
6
5
|
import { createHash } from "node:crypto";
|
|
7
6
|
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { t as getExecutor } from "./exec-
|
|
1
|
+
import { t as getExecutor } from "./exec-DEoAhcze.mjs";
|
|
2
2
|
import { o as sharedCompilationCache } from "./paths-DQtTgsBf.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-
|
|
5
|
-
import { r as register } from "./cache-manifest-
|
|
6
|
-
import { Y as statsProjectKey } from "./budget-
|
|
7
|
-
import { d as runCancellationSignal } from "./native-run-
|
|
8
|
-
import { n as buildCacheKey, s as filesystemBuildCapability } from "./build-cache-
|
|
3
|
+
import { G as resolveCacheProviderConfig, Nt as repoRootAsync, U as remoteIosSetting, et as settingShapeErrors } from "./settings-C7O8A6ZI.mjs";
|
|
4
|
+
import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-wM_XFTvE.mjs";
|
|
5
|
+
import { r as register } from "./cache-manifest-DSeQjt-Q.mjs";
|
|
6
|
+
import { Fn as processContext, Y as statsProjectKey } from "./budget-Cvwn54qV.mjs";
|
|
7
|
+
import { d as runCancellationSignal } from "./native-run-NwUuxbkg.mjs";
|
|
8
|
+
import { n as buildCacheKey, s as filesystemBuildCapability } from "./build-cache-Dv7RN200.mjs";
|
|
9
9
|
import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
|
|
10
|
-
import { a as buildXcode, l as parseSwiftVersion, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-
|
|
11
|
-
import { a as nativeTransferRefusal } from "./client-
|
|
12
|
-
import { _ as
|
|
13
|
-
import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-
|
|
14
|
-
import { r as gateProfileForDevice } from "./ios-signing-
|
|
15
|
-
import {
|
|
16
|
-
import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-
|
|
17
|
-
import { t as IosRecipeRefusal } from "./ios-project-
|
|
18
|
-
import { i as DEFAULT_DEPS, r as iosProcessRuntime } from "./launch-
|
|
19
|
-
import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-
|
|
10
|
+
import { a as buildXcode, l as parseSwiftVersion, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-BXn9-xYx.mjs";
|
|
11
|
+
import { a as nativeTransferRefusal } from "./client-OyRoEuSr.mjs";
|
|
12
|
+
import { _ as runCaptured, a as iosToolchainAsync, h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-DpJMHq0n.mjs";
|
|
13
|
+
import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-CNioewsd.mjs";
|
|
14
|
+
import { r as gateProfileForDevice } from "./ios-signing-BtAffm0A.mjs";
|
|
15
|
+
import { l as skippedMissReason, o as explainBuildMiss } from "./prebuild-D4JoEAEs.mjs";
|
|
16
|
+
import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-DUC8Ka9y.mjs";
|
|
17
|
+
import { t as IosRecipeRefusal } from "./ios-project-CZhKODF3.mjs";
|
|
18
|
+
import { i as DEFAULT_DEPS, r as iosProcessRuntime } from "./launch-BjxemNpK.mjs";
|
|
19
|
+
import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-D_VOfFL7.mjs";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { join } from "node:path";
|
|
22
22
|
//#region src/integrations/native-xcode-ios.ts
|
|
@@ -76,13 +76,6 @@ function refusal(error) {
|
|
|
76
76
|
remedy: "Check the native Xcode project and its selected toolchain, then retry."
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function settingsContext(root) {
|
|
80
|
-
return {
|
|
81
|
-
projectPath: root,
|
|
82
|
-
gitCommonDir: gitCommonDir(root),
|
|
83
|
-
repoRoot: repoRoot(root)
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
79
|
function nativeRecipe(root, context) {
|
|
87
80
|
const env = context.operation?.env ?? process.env;
|
|
88
81
|
const configuration = context.configuration ?? "Debug";
|
|
@@ -313,7 +306,7 @@ function nativeRecipe(root, context) {
|
|
|
313
306
|
};
|
|
314
307
|
},
|
|
315
308
|
untrackedLine: () => null,
|
|
316
|
-
|
|
309
|
+
expoCache: null,
|
|
317
310
|
offload: {
|
|
318
311
|
context: async () => {
|
|
319
312
|
const runtime = context.target.sdk === "iphonesimulator" ? context.target.offloadRuntime() : null;
|
|
@@ -359,16 +352,15 @@ function nativeRecipe(root, context) {
|
|
|
359
352
|
}
|
|
360
353
|
};
|
|
361
354
|
}
|
|
362
|
-
async function planNativeXcode(root, options, operation) {
|
|
355
|
+
async function planNativeXcode(root, options, resolved, operation = processContext(root)) {
|
|
363
356
|
if (options.easProfile !== void 0) return { refusal: planFlagRefusal("--eas-profile") };
|
|
364
357
|
try {
|
|
365
|
-
const context =
|
|
366
|
-
const settings = resolveSettings(context);
|
|
358
|
+
const { context, settings } = resolved;
|
|
367
359
|
const errors = settingShapeErrors(settings);
|
|
368
360
|
if (errors.length) throw new NativeXcodeError(errors.join("; "), "Correct the project settings and retry.");
|
|
369
361
|
if (remoteIosSetting(settings)) throw new NativeXcodeError("Native Xcode planning does not resolve hosted placement.", "Unset ios.remote to plan a local build, or run stim ios without --plan.");
|
|
370
362
|
const layers = DEFAULT_DEPS.settingsLayers(context);
|
|
371
|
-
const modelRefusal = deviceModelRefusal({
|
|
363
|
+
const modelRefusal = await deviceModelRefusal({
|
|
372
364
|
slot: options.slot ?? "default",
|
|
373
365
|
deviceTypeFlag: options.deviceType,
|
|
374
366
|
runtimeFlag: options.runtime,
|
|
@@ -378,7 +370,8 @@ async function planNativeXcode(root, options, operation) {
|
|
|
378
370
|
runtimeOrigin: DEFAULT_DEPS.settingOriginScope(layers, "ios.runtime"),
|
|
379
371
|
physical: false,
|
|
380
372
|
remoteBackend: null,
|
|
381
|
-
listRuntimes: DEFAULT_DEPS.listIosRuntimes
|
|
373
|
+
listRuntimes: DEFAULT_DEPS.listIosRuntimes,
|
|
374
|
+
signal: operation?.signal
|
|
382
375
|
});
|
|
383
376
|
if (modelRefusal) return { refusal: modelRefusal };
|
|
384
377
|
const configuration = resolveConfiguration(options.configuration, settings) ?? "Debug";
|
|
@@ -421,10 +414,12 @@ async function planNativeXcode(root, options, operation) {
|
|
|
421
414
|
expoRemote: null
|
|
422
415
|
}, {
|
|
423
416
|
...DEFAULT_DEPS,
|
|
417
|
+
operation,
|
|
424
418
|
planPrebuild: () => "none",
|
|
425
|
-
note: (line) =>
|
|
419
|
+
note: (line) => operation.output("stderr", `${line}\n`)
|
|
426
420
|
});
|
|
427
421
|
} catch (error) {
|
|
422
|
+
if (error instanceof Error && "reportCleanup" in error) throw error;
|
|
428
423
|
operation?.signal.throwIfAborted();
|
|
429
424
|
return { refusal: refusal(error) };
|
|
430
425
|
}
|
|
@@ -439,7 +434,7 @@ function nativeXcodeIosProject(root) {
|
|
|
439
434
|
],
|
|
440
435
|
eas: false,
|
|
441
436
|
runtimeKind: () => "process",
|
|
442
|
-
plan: (options,
|
|
437
|
+
plan: (options, resolved, operation) => planNativeXcode(root, options, resolved, operation),
|
|
443
438
|
bundleId: () => null,
|
|
444
439
|
schemeProblem(scheme, configuration) {
|
|
445
440
|
try {
|
|
@@ -1,5 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as IosToolchain, g as CompilationCacheActivity, h as CcacheActivity, i as AndroidBuildOptions, l as WorkerToolchain, p as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt } from "./android-project-DVWyCbWU.mjs";
|
|
2
|
+
import { StimContext } from "@stim-cli/core";
|
|
3
|
+
import { BuildReactNativeArtifactQuery, BuildStartParams, BuildSwiftpmArtifactQuery } from "@stim-cli/core/protocol";
|
|
4
|
+
//#region src/offload/react-native-artifact.d.ts
|
|
5
|
+
type ArtifactTools = (IosToolchain & {
|
|
6
|
+
os: string;
|
|
7
|
+
}) | Pick<WorkerToolchain, "stimBuild" | "os" | "arch" | "jdk" | "androidSdk">;
|
|
8
|
+
interface ArtifactReceipt {
|
|
9
|
+
identity: {
|
|
10
|
+
hash: string;
|
|
11
|
+
key: string;
|
|
12
|
+
};
|
|
13
|
+
receipt: {
|
|
14
|
+
query: BuildReactNativeArtifactQuery;
|
|
15
|
+
toolchain: ArtifactTools;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare function reactNativeArtifactReceipt(query: BuildReactNativeArtifactQuery, toolchain: ArtifactTools | null): ArtifactReceipt | null;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/offload/swiftpm-artifact.d.ts
|
|
21
|
+
interface SwiftpmWorkerToolchain extends SwiftpmArtifactToolchain {
|
|
22
|
+
selection: {
|
|
23
|
+
command: string;
|
|
24
|
+
compiler: string;
|
|
25
|
+
sdk: string;
|
|
26
|
+
xcrun: string;
|
|
27
|
+
xcodebuild: string;
|
|
28
|
+
overrides: Record<string, {
|
|
29
|
+
command: string;
|
|
30
|
+
version: string;
|
|
31
|
+
}>;
|
|
32
|
+
checkoutRequired: boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface SwiftpmArtifactReceipt {
|
|
36
|
+
query: BuildSwiftpmArtifactQuery;
|
|
37
|
+
identity: {
|
|
38
|
+
hash: string;
|
|
39
|
+
key: string;
|
|
40
|
+
};
|
|
41
|
+
privateHash: string;
|
|
42
|
+
privateLockfile: boolean;
|
|
43
|
+
checkoutRequired: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** Certifies actual worker inputs, not the client's transfer digest or cache identity. */
|
|
46
|
+
declare function swiftpmWorkerArtifactSnapshot(root: string, query: BuildSwiftpmArtifactQuery, toolchain: SwiftpmWorkerToolchain, env: NodeJS.ProcessEnv, signal?: AbortSignal): Promise<{
|
|
47
|
+
identity: {
|
|
48
|
+
hash: string;
|
|
49
|
+
key: string;
|
|
50
|
+
};
|
|
51
|
+
receipt: SwiftpmArtifactReceipt;
|
|
52
|
+
}>;
|
|
53
|
+
//#endregion
|
|
3
54
|
//#region src/offload/worker.d.ts
|
|
4
55
|
/** One entry of the source transfer: a visible file of the checkout, or a native build's file or directory input. */
|
|
5
56
|
interface ManifestEntry {
|
|
@@ -21,6 +72,7 @@ interface WorkerJob {
|
|
|
21
72
|
bundleId: string;
|
|
22
73
|
resources?: Record<string, string>;
|
|
23
74
|
assetCatalog?: string | null;
|
|
75
|
+
artifactInputs?: BuildSwiftpmArtifactQuery["inputs"];
|
|
24
76
|
} | null;
|
|
25
77
|
swiftpmCache: string;
|
|
26
78
|
project: string;
|
|
@@ -32,6 +84,8 @@ interface WorkerJob {
|
|
|
32
84
|
runtime: string | null;
|
|
33
85
|
android: AndroidBuildOptions | null;
|
|
34
86
|
expectedFingerprint: string | null;
|
|
87
|
+
cacheArtifact?: boolean;
|
|
88
|
+
stimBuild?: string;
|
|
35
89
|
native?: BuildStartParams["native"];
|
|
36
90
|
optimizations: Optimizations["ios"] | null;
|
|
37
91
|
/** How long the client's Gradle daemon stays warm after an Android build; 0 or absent stops it when the build ends. */
|
|
@@ -57,6 +111,15 @@ type WorkerResult = {
|
|
|
57
111
|
fingerprint: string | null;
|
|
58
112
|
androidPackage?: string;
|
|
59
113
|
sourceDigest?: string;
|
|
114
|
+
cacheArtifact?: {
|
|
115
|
+
identity: {
|
|
116
|
+
hash: string;
|
|
117
|
+
key: string;
|
|
118
|
+
};
|
|
119
|
+
receipt: NativeGradleArtifactReceipt;
|
|
120
|
+
};
|
|
121
|
+
reactNativeArtifact?: NonNullable<ReturnType<typeof reactNativeArtifactReceipt>>;
|
|
122
|
+
swiftpmArtifact?: Awaited<ReturnType<typeof swiftpmWorkerArtifactSnapshot>>;
|
|
60
123
|
compilationCache: CompilationCacheActivity | CcacheActivity | Record<string, never>;
|
|
61
124
|
timings: WorkerTimings;
|
|
62
125
|
} | {
|