stim 1.19.0 → 1.20.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 +20 -3
- package/dist/{activity-BSw0x84R.mjs → activity-BrGh9EAI.mjs} +3 -3
- package/dist/{agent-device-usage-output-Bjxu_VmX.mjs → agent-device-usage-output-DVyv_hWj.mjs} +7 -7
- package/dist/android-0vv-OruW.mjs +6 -0
- package/dist/android-Brx6EKvJ.mjs +1258 -0
- package/dist/{android-BdQC6zs1.mjs → android-BsYNR81W.mjs} +103 -45
- package/dist/{android-DE5g_5gv.mjs → android-CK3fpEyZ.mjs} +2 -2
- package/dist/{android-cas-C87geAg-.mjs → android-cas-DCAuXryb.mjs} +9 -5
- package/dist/android-cas-compiler.mjs +1 -1
- package/dist/api-run.mjs +159 -8
- package/dist/{api-DIf_s86s.mjs → api-zuX3ynYN.mjs} +5 -1
- package/dist/api.d.mts +98 -4
- package/dist/api.mjs +1 -1
- package/dist/{app-install-CFI4ptUL.mjs → app-install-0LgaQRT7.mjs} +9 -8
- package/dist/artifact-CnC0mfov.mjs +807 -0
- package/dist/artifact-DClXJNWx.mjs +772 -0
- package/dist/artifact-lifecycle-DzPpBYvK.mjs +30 -0
- package/dist/{browser-web-CDhqQxhv.mjs → browser-web-CzBmhmgs.mjs} +19 -19
- package/dist/{budget-Dz-kyXLv.mjs → budget-BONq9vXY.mjs} +3101 -3062
- package/dist/build-BixRI6sB.mjs +462 -0
- package/dist/{build-facts-B87vo-Im.d.mts → build-facts-DcLv2HSd.d.mts} +1 -32
- package/dist/build-plan-CP0tckNU.mjs +553 -0
- package/dist/{cache-manifest-DiwKSyv9.mjs → cache-manifest-qA3dT2x2.mjs} +1 -1
- package/dist/cache-manifest.mjs +1 -1
- package/dist/{manifest-CX0d1IkZ.mjs → ccache-CjHQ5F8g.mjs} +13 -19
- package/dist/{chrome-BTUOo8p2.mjs → chrome-Dp2lMLBe.mjs} +1 -1
- package/dist/{cli-C9Zvgbdc.mjs → cli-B2R8wH1F.mjs} +20 -20
- package/dist/cli.mjs +1 -1
- package/dist/{client-CuUo8Nvg.mjs → client-BLy1Pw2V.mjs} +89 -307
- package/dist/collector-run.d.mts +4 -0
- package/dist/collector-run.mjs +7 -7
- package/dist/{command-output-Bt8ygHE7.mjs → command-output-BjPN99ZB.mjs} +2 -2
- package/dist/{config-DC5jEtd1.mjs → config-D0LhTY3S.mjs} +8 -12
- package/dist/{created-devices-D0s26Hx5.mjs → created-devices-HU_DAb_Q.mjs} +7 -6
- package/dist/{dependency-state-DKaS1OM9.mjs → dependency-state-B2m8eqsS.mjs} +2 -2
- package/dist/{detached-entry-pB_IPfV4.mjs → detached-entry-BXq4fIl-.mjs} +1 -1
- package/dist/{dev-client-CDY_zAmD.mjs → dev-client-ClATaJoH.mjs} +2 -2
- package/dist/{device-BHw0WlHl.mjs → device-B7lsC0K1.mjs} +8 -8
- package/dist/device-DVCwAFlX.mjs +727 -0
- package/dist/{device-capacity-BoN1jQkO.mjs → device-capacity-Ca_ke1LE.mjs} +13 -14
- package/dist/device-host-worker.mjs +38 -18
- package/dist/device-ios-CRUqPxKw.mjs +413 -0
- package/dist/{device-lease-Cu7PtQpZ.mjs → device-lease-DHOBXGgS.mjs} +135 -22
- package/dist/{device-lease-run-D38SnZtt.mjs → device-lease-run-CvDeHTkG.mjs} +4 -4
- package/dist/{device-pool-CP4rAsHx.mjs → device-pool-L2-5GxMy.mjs} +3 -3
- package/dist/{device-remote-B5GiUifk.mjs → device-remote-Bmg42063.mjs} +17 -68
- package/dist/doctor-C2MSuMMg.mjs +515 -0
- package/dist/{doctor-PRJH94v6.mjs → doctor-DPAqhVCK.mjs} +333 -744
- package/dist/{doctor-watchman-wZhyTdp4.mjs → doctor-watchman-CB4NnVZm.mjs} +13 -12
- package/dist/{simslim-D9LkJxIO.mjs → eas-build-Dw_ec2Km.mjs} +6 -152
- package/dist/{stim-installations-DbmUjsLv.mjs → eas-session-ledger-DZlC-Fq3.mjs} +57 -4
- package/dist/{error-diagnostics--v5HGOU0.mjs → error-diagnostics-Du7I_GuY.mjs} +17 -12
- package/dist/errors-DzkMYh8Q.mjs +205 -0
- package/dist/{exec-i8GDPwq9.mjs → exec-B81Qodjn.mjs} +40 -10
- package/dist/{gc-CyHMcKcn.mjs → gc-PWp34zGb.mjs} +21 -20
- package/dist/{device-ios-B2ruohE-.mjs → gradle-C2OEKCCI.mjs} +21 -650
- package/dist/{guide-dRaQJJk9.mjs → guide-Dai9lphv.mjs} +504 -117
- package/dist/{hosted-android-Bs7fytj7.mjs → hosted-android-DQ-Agsd8.mjs} +5 -5
- package/dist/{hosted-client-C5G4h_OJ.mjs → hosted-client-Io01s5By.mjs} +9 -3
- package/dist/{hosted-ios-Bik035eL.mjs → hosted-ios-DIxFnYp-.mjs} +3 -3
- package/dist/{hosted-logs-CI9Az9a4.mjs → hosted-logs-DP-ABU_M.mjs} +8 -8
- package/dist/{hosted-macos-DABm3ScO.mjs → hosted-macos-Aziw9T_9.mjs} +7 -6
- package/dist/{hosted-native-DbV2aUVw.mjs → hosted-native-BdAQi21M.mjs} +17 -14
- package/dist/{idle-shutdown-DYiMBn34.mjs → idle-shutdown-DdMqoSUB.mjs} +7 -7
- package/dist/{ios-DYUr9LGc.mjs → ios-BZ9dg2Fr.mjs} +8 -7
- package/dist/{ios-BWbHFZVz.mjs → ios-CXLIUxXJ.mjs} +180 -24
- package/dist/ios-CZuv6gRv.mjs +1112 -0
- package/dist/{ios-DCrkgXEM.mjs → ios-VGvNdsv2.mjs} +1 -1
- package/dist/{ios-device-CrW8aMb5.mjs → ios-device-B1B14xND.mjs} +1 -1
- package/dist/{ios-device-CJ_ZOGky.mjs → ios-device-BreZOpM0.mjs} +3 -3
- package/dist/ios-project-B9drt_aY.mjs +197 -0
- package/dist/{ios-state-By0XuLTQ.mjs → ios-state-CjrL2qv-.mjs} +1 -1
- package/dist/js-swap-C8icNYIY.mjs +432 -0
- package/dist/launch-DxH0THLP.mjs +745 -0
- package/dist/{react-native-ios-CSpIxexZ.mjs → launch-YrbqaIFj.mjs} +59 -612
- package/dist/{launch-verify-DCveSE6d.mjs → launch-verify-BzRdbuO1.mjs} +26 -7
- package/dist/{logs-Bao1HOMy.mjs → logs-DHaRNfg7.mjs} +11 -11
- package/dist/macos-C0iljhsN.mjs +2 -0
- package/dist/{macos-ciyBdTY5.mjs → macos-V_3Ui7g4.mjs} +42 -50
- package/dist/macos-run.mjs +1 -1
- package/dist/maintenance-run.mjs +13 -10
- package/dist/{metro-DI2AjPF_.mjs → metro-D_j9sN-B.mjs} +18 -5
- package/dist/{metro-gateway-BxpJLIwh.mjs → metro-gateway-BBJldOdi.mjs} +2 -2
- package/dist/miss-reason-BPAzZS0r.mjs +238 -0
- package/dist/{named-ports-B4iWH4E-.mjs → named-ports-C2lvoPsb.mjs} +3 -3
- package/dist/native-android-lHzaew7r.mjs +226 -0
- package/dist/native-gradle-inputs-BQnIdAlL.mjs +356 -0
- package/dist/{native-runtime-BGxsbfny.mjs → native-runtime-BRmWL7ru.mjs} +9 -8
- package/dist/native-xcode-inputs-eutS19jU.mjs +307 -0
- package/dist/native-xcode-ios-DP3cHLwu.mjs +434 -0
- package/dist/{ndjson-LGZAMsqa.mjs → ndjson-GOnbyvso.mjs} +6 -6
- package/dist/offload-worker.d.mts +41 -7
- package/dist/offload-worker.mjs +409 -74
- package/dist/{ownership-EB0ySdGK.mjs → ownership-DXzMMSx6.mjs} +2 -2
- package/dist/{placement-log-Dxe34rJm.mjs → placement-log-reFbjqEr.mjs} +1 -1
- package/dist/plan-BDk2AeY_.mjs +260 -0
- package/dist/plan-placement-D_YYlE6N.mjs +73 -0
- package/dist/{ports-ByPc0_97.mjs → ports-jzvAJXXL.mjs} +3 -3
- package/dist/{prebuild-BKJ3wJI1.mjs → prebuild-Bw44QxVh.mjs} +4 -4
- package/dist/{preview-BbSottmO.mjs → preview-BaBJ72Al.mjs} +50 -32
- package/dist/project-B8_duAzW.mjs +1067 -0
- package/dist/project-plan-BPwbLwQu.mjs +10 -0
- package/dist/{pull-request-IHNdMnG8.mjs → pull-request-vOhLNmIb.mjs} +1 -1
- package/dist/pull-requests.mjs +1 -1
- package/dist/react-native-android-chm1DMlA.mjs +921 -0
- package/dist/react-native-build-oAw6gQeW.mjs +239 -0
- package/dist/react-native-doctor-DYXoh-6I.mjs +78 -0
- package/dist/react-native-ios-SCTK_CT5.mjs +595 -0
- package/dist/{recordings-Bv8McZN4.mjs → recordings-Bk-VivUV.mjs} +1 -1
- package/dist/{reload-rAPdqeRR.mjs → reload-D34GkY78.mjs} +17 -13
- package/dist/remote-BU9UyhCJ.mjs +192 -0
- package/dist/{remote-cache-N3hAEaAL.mjs → remote-cache-Bsts6f6Y.mjs} +5 -5
- package/dist/result-BDoRk1k3.mjs +186 -0
- package/dist/{run-lAkle1-c.mjs → run-qvff78hv.mjs} +3 -3
- package/dist/{server-bare-CkIjnegq.mjs → server-bare-dWjAarki.mjs} +5 -5
- package/dist/server-command-7XIKlWtO.mjs +69 -0
- package/dist/{server-expo-n3tUi3Em.mjs → server-expo-CsYu2aKL.mjs} +107 -82
- package/dist/server-expo-DV43vep4.mjs +2 -0
- package/dist/{settings-CxgngUZk.mjs → settings-Bbztm4oV.mjs} +179 -129
- package/dist/{settings-2am7TSxp.mjs → settings-CT3E71-i.mjs} +6 -6
- package/dist/{state-lKh8shBp.d.mts → settings-vk3mJGSm.d.mts} +4 -2
- package/dist/settings.schema.json +84 -0
- package/dist/simslim-ChMfe8rg.mjs +149 -0
- package/dist/{slot-launch-HV_KtPIw.mjs → slot-launch-B9hn96wd.mjs} +6 -6
- package/dist/{stage-BgaZJVZY.mjs → stage-BNKKdDNc.mjs} +6 -3
- package/dist/start-CbQCSnXQ.mjs +2 -0
- package/dist/{start-DtxthMfI.mjs → start-CdvcTaXr.mjs} +97 -68
- package/dist/{state-Tp4uImDS.mjs → state-Boo0IMJq.mjs} +1 -1
- package/dist/{state-D2KtnALG.mjs → state-DI84A-uu.mjs} +29 -10
- package/dist/{stats-8EJ5ivFT.mjs → stats-BIIDrjA8.mjs} +5 -5
- package/dist/{status-BEeL6IKz.mjs → status-BDGHwkCs.mjs} +3 -1
- package/dist/{status-BOyp0CUl.mjs → status-DARMkc9q.mjs} +81 -293
- package/dist/status-watch-DvmI3SmN.mjs +296 -0
- package/dist/{stim-desktop-C65jk_q2.mjs → stim-desktop-8GQX2OV8.mjs} +1 -1
- package/dist/{stop-DRipAg-e.mjs → stop-CCZS-C9m.mjs} +2 -2
- package/dist/{stop-D0UIpZuh.mjs → stop-WQPQHLuy.mjs} +5 -5
- package/dist/{stop-zDlknFoz.mjs → stop-iNemHsJC.mjs} +21 -20
- package/dist/supervisor-run.d.mts +7 -2
- package/dist/supervisor-run.mjs +32 -20
- package/dist/{support-DsNaFg6D.mjs → support-CnE_SIjt.mjs} +17 -7
- package/dist/{support-CNqYkV0y.mjs → support-DCco5fut.mjs} +61 -8
- package/dist/{swiftpm-macos-aJzPAj1t.mjs → swiftpm-macos-afeNUExW.mjs} +5 -5
- package/dist/tailnet-CoJUb2tB.mjs +265 -0
- package/dist/toolchain-BIupIro1.mjs +2 -0
- package/dist/{toolchain-C3xSoyUl.mjs → toolchain-DqyDXs30.mjs} +206 -53
- package/dist/{trigger-CAhmG-4s.mjs → trigger-C0MWBi8O.mjs} +2 -2
- package/dist/trigger-SHLOWJ4O.mjs +2 -0
- package/dist/{warm-progress-pFLB2e6P.mjs → warm-progress-C3ASD6z5.mjs} +6 -6
- package/dist/{watchman-BL1IdOtq.mjs → watchman-CQl51YZu.mjs} +6 -6
- package/dist/{web-DbbrPUn0.mjs → web-B3eldHFH.mjs} +9 -13
- package/dist/web-BLXpOe6b.mjs +2 -0
- package/dist/web-run.mjs +10 -10
- package/dist/{workspace-state-CR9X86xJ.mjs → workspace-state-CSIFuuDa.mjs} +33 -33
- package/dist/{workspaces-Djb2gfi9.mjs → workspaces-D2xSHBDY.mjs} +1260 -1258
- package/dist/{worktree-BL4M1rhB.mjs → worktree-BxDqaTev.mjs} +84 -48
- package/dist/worktree-q7_OZNY0.mjs +2 -0
- package/package.json +8 -6
- package/shim/native-android.gradle +101 -0
- package/dist/android-BXc6BmEi.mjs +0 -3732
- package/dist/android-BvV1gGdN.mjs +0 -4
- package/dist/ios-ITYno9rO.mjs +0 -2241
- package/dist/macos-nIOATJmR.mjs +0 -2
- package/dist/metro-store-BAHFcJm6.mjs +0 -106
- package/dist/miss-reason-CjQCOKqq.mjs +0 -1743
- package/dist/plan-placement-BVY59qa8.mjs +0 -290
- package/dist/project-B5eQ1USs.mjs +0 -612
- package/dist/react-native-ios-BMh2i25I.mjs +0 -2
- package/dist/server-expo-DGsdUGX2.mjs +0 -2
- package/dist/start-D8NbxNBb.mjs +0 -2
- package/dist/trigger-CoalsMTV.mjs +0 -2
- package/dist/web-DFpFeZu5.mjs +0 -2
- package/dist/worktree-DV-A0LNL.mjs +0 -2
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { t as getExecutor } from "./exec-B81Qodjn.mjs";
|
|
2
|
+
import { b as workspaceDerivedData, x as workspaceDir } from "./workspace-state-CSIFuuDa.mjs";
|
|
3
|
+
import { m as pbxString, p as pbxReferences } from "./project-B8_duAzW.mjs";
|
|
4
|
+
import { f as NativeInputError, p as fingerprintNativeInputs } from "./native-gradle-inputs-BQnIdAlL.mjs";
|
|
5
|
+
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
6
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
//#region src/integrations/native-xcode-inputs.ts
|
|
9
|
+
function nativeXcodePackages(root) {
|
|
10
|
+
return join(workspaceDir(root), "xcode-packages");
|
|
11
|
+
}
|
|
12
|
+
function nativeXcodeMetadataDirectories(selection) {
|
|
13
|
+
const workspaces = selection.projects.map((project) => join(project.path, "project.xcworkspace"));
|
|
14
|
+
if (selection.container.kind === "workspace") workspaces.push(selection.container.path);
|
|
15
|
+
return workspaces.flatMap((workspace) => [
|
|
16
|
+
join(workspace, "xcshareddata"),
|
|
17
|
+
join(workspace, "xcshareddata", "swiftpm"),
|
|
18
|
+
join(workspace, "xcshareddata", "swiftpm", "configuration")
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
function nativeXcodeHasPackages(selection) {
|
|
22
|
+
return selection.projects.some((project) => [...project.objects.values()].some((entry) => entry.isa === "XCRemoteSwiftPackageReference" || entry.isa === "XCLocalSwiftPackageReference" || entry.isa === "XCSwiftPackageProductDependency"));
|
|
23
|
+
}
|
|
24
|
+
function nativeXcodeSources(snapshot) {
|
|
25
|
+
return snapshot.entries.map((entry) => ({
|
|
26
|
+
type: "contents",
|
|
27
|
+
id: entry.path,
|
|
28
|
+
contents: "",
|
|
29
|
+
hash: createHash("sha256").update(`${entry.kind}\0${entry.sha256}`).digest("hex"),
|
|
30
|
+
reasons: ["native-xcode"]
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
const INPUT_SETTINGS = /* @__PURE__ */ new Set([
|
|
34
|
+
"INFOPLIST_FILE",
|
|
35
|
+
"INFOPLIST_PREFIX_HEADER",
|
|
36
|
+
"CODE_SIGN_ENTITLEMENTS",
|
|
37
|
+
"GCC_PREFIX_HEADER",
|
|
38
|
+
"SWIFT_OBJC_BRIDGING_HEADER",
|
|
39
|
+
"HEADER_SEARCH_PATHS",
|
|
40
|
+
"USER_HEADER_SEARCH_PATHS",
|
|
41
|
+
"MTL_HEADER_SEARCH_PATHS",
|
|
42
|
+
"FRAMEWORK_SEARCH_PATHS",
|
|
43
|
+
"LIBRARY_SEARCH_PATHS",
|
|
44
|
+
"SWIFT_INCLUDE_PATHS",
|
|
45
|
+
"PRODUCT_TYPE_SWIFT_INCLUDE_PATHS",
|
|
46
|
+
"SWIFT_SYSTEM_INCLUDE_PATHS",
|
|
47
|
+
"SYSTEM_FRAMEWORK_SEARCH_PATHS",
|
|
48
|
+
"ADDITIONAL_SDKS",
|
|
49
|
+
"MODULEMAP_FILE",
|
|
50
|
+
"MODULEMAP_PRIVATE_FILE",
|
|
51
|
+
"EXPORTED_SYMBOLS_FILE",
|
|
52
|
+
"UNEXPORTED_SYMBOLS_FILE",
|
|
53
|
+
"ORDER_FILE"
|
|
54
|
+
]);
|
|
55
|
+
const COMPILER_SETTINGS = /* @__PURE__ */ new Set([
|
|
56
|
+
"CC",
|
|
57
|
+
"CXX",
|
|
58
|
+
"LD",
|
|
59
|
+
"SWIFT_EXEC",
|
|
60
|
+
"SWIFT_DRIVER_SWIFT_FRONTEND_EXEC"
|
|
61
|
+
]);
|
|
62
|
+
function inside(root, path) {
|
|
63
|
+
const part = relative(root, path);
|
|
64
|
+
return part === "" || !part.startsWith(`..${sep}`) && part !== ".." && !isAbsolute(part);
|
|
65
|
+
}
|
|
66
|
+
function fold(path) {
|
|
67
|
+
return path.normalize("NFC").toLowerCase();
|
|
68
|
+
}
|
|
69
|
+
function gitVisibility(sourceRoot) {
|
|
70
|
+
if (!existsSync(join(sourceRoot, ".git"))) return null;
|
|
71
|
+
const listing = getExecutor().runFileQuiet("git", [
|
|
72
|
+
"-C",
|
|
73
|
+
sourceRoot,
|
|
74
|
+
"ls-files",
|
|
75
|
+
"-z",
|
|
76
|
+
"--cached",
|
|
77
|
+
"--others",
|
|
78
|
+
"--exclude-standard"
|
|
79
|
+
], {
|
|
80
|
+
untrimmed: true,
|
|
81
|
+
omitEnv: [
|
|
82
|
+
"GIT_DIR",
|
|
83
|
+
"GIT_WORK_TREE",
|
|
84
|
+
"GIT_INDEX_FILE",
|
|
85
|
+
"GIT_COMMON_DIR"
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
if (listing === null) return null;
|
|
89
|
+
const listed = /* @__PURE__ */ new Set();
|
|
90
|
+
const whole = /* @__PURE__ */ new Set();
|
|
91
|
+
const include = (raw) => {
|
|
92
|
+
const path = fold(raw);
|
|
93
|
+
whole.add(path);
|
|
94
|
+
listed.add(path);
|
|
95
|
+
for (let index = path.indexOf("/"); index !== -1; index = path.indexOf("/", index + 1)) listed.add(path.slice(0, index));
|
|
96
|
+
};
|
|
97
|
+
for (const entry of listing.split("\0")) if (entry && !entry.endsWith("/")) include(entry);
|
|
98
|
+
const admit = (raw) => {
|
|
99
|
+
const path = fold(raw);
|
|
100
|
+
if (listed.has(path)) return true;
|
|
101
|
+
for (let index = path.indexOf("/"); index !== -1; index = path.indexOf("/", index + 1)) if (whole.has(path.slice(0, index))) return true;
|
|
102
|
+
return false;
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
admit,
|
|
106
|
+
include
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function nativeXcodeInputSnapshot(root, selection, parameters, sourceRoot = root) {
|
|
110
|
+
if (selection.platform === "unknown") return { cacheIneligible: "The selected application platform cannot be resolved from its project configuration" };
|
|
111
|
+
const visibility = gitVisibility(sourceRoot);
|
|
112
|
+
const inputs = [{
|
|
113
|
+
name: "repository",
|
|
114
|
+
path: sourceRoot,
|
|
115
|
+
...visibility ? { admit: visibility.admit } : {}
|
|
116
|
+
}];
|
|
117
|
+
const excluded = [
|
|
118
|
+
join(sourceRoot, ".git"),
|
|
119
|
+
join(root, ".git"),
|
|
120
|
+
workspaceDerivedData(root)
|
|
121
|
+
];
|
|
122
|
+
const reasons = /* @__PURE__ */ new Set();
|
|
123
|
+
const environment = {};
|
|
124
|
+
for (const [name, value] of Object.entries(process.env).toSorted(([a], [b]) => a.localeCompare(b))) if (value !== void 0 && /^(?:DEVELOPER_DIR|TOOLCHAINS|SDKROOT|CFLAGS|CPPFLAGS|CXXFLAGS|OBJCFLAGS|LDFLAGS|ARCHS|ONLY_ACTIVE_ARCH|SOURCE_DATE_EPOCH|ZERO_AR_DATE|IPHONEOS_DEPLOYMENT_TARGET|MACOSX_DEPLOYMENT_TARGET|DEVELOPMENT_TEAM|XCODE_.*|SWIFT_.*|CLANG_.*|GCC_.*|OTHER_.*FLAGS|CODE_SIGN.*|PROVISIONING_.*)$/.test(name)) environment[name] = value;
|
|
125
|
+
const dependencyRoots = /* @__PURE__ */ new Map();
|
|
126
|
+
const synchronizedRoots = [];
|
|
127
|
+
const reveal = (path, complete = true) => {
|
|
128
|
+
const part = relative(sourceRoot, path).split(sep).join("/");
|
|
129
|
+
if (visibility && part && (complete || !visibility.admit(part))) visibility.include(part);
|
|
130
|
+
};
|
|
131
|
+
const include = (path, name, complete = true) => {
|
|
132
|
+
if (inside(sourceRoot, path)) reveal(path, complete);
|
|
133
|
+
else dependencyRoots.set(name, path);
|
|
134
|
+
};
|
|
135
|
+
const expand = (value, project) => {
|
|
136
|
+
const known = {
|
|
137
|
+
SRCROOT: project.directory,
|
|
138
|
+
PROJECT_DIR: project.directory,
|
|
139
|
+
SOURCE_ROOT: project.directory,
|
|
140
|
+
PROJECT_FILE_PATH: project.path,
|
|
141
|
+
CONFIGURATION: selection.configuration,
|
|
142
|
+
inherited: ""
|
|
143
|
+
};
|
|
144
|
+
let missing = false;
|
|
145
|
+
const result = value.replace(/\$\(([^)]+)\)|\$\{([^}]+)\}/g, (_match, parenthesized, braced) => {
|
|
146
|
+
const name = parenthesized ?? braced;
|
|
147
|
+
if (known[name] !== void 0) return known[name];
|
|
148
|
+
const env = process.env[name];
|
|
149
|
+
if (env !== void 0) {
|
|
150
|
+
environment[name] = env;
|
|
151
|
+
return env;
|
|
152
|
+
}
|
|
153
|
+
missing = true;
|
|
154
|
+
return "";
|
|
155
|
+
});
|
|
156
|
+
if (missing || result.includes("$")) return null;
|
|
157
|
+
return result;
|
|
158
|
+
};
|
|
159
|
+
const seenConfigs = /* @__PURE__ */ new Set();
|
|
160
|
+
const xcconfig = (path, project) => {
|
|
161
|
+
if (seenConfigs.has(path)) return;
|
|
162
|
+
seenConfigs.add(path);
|
|
163
|
+
include(path, `configuration:${relative(project.directory, path)}`);
|
|
164
|
+
const source = readFileSync(path, "utf8");
|
|
165
|
+
for (const raw of source.split(/\r\n?|\n|\u2028|\u2029/)) {
|
|
166
|
+
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
167
|
+
if (!line) continue;
|
|
168
|
+
const match = line.match(/^#include(\?)?\s+"([^"]+)"\s*$/);
|
|
169
|
+
if (match) {
|
|
170
|
+
const name = expand(match[2], project);
|
|
171
|
+
if (name === null) reasons.add(`Unresolved xcconfig include in ${path}`);
|
|
172
|
+
else {
|
|
173
|
+
const child = resolve(dirname(path), name);
|
|
174
|
+
if (match[1] && !existsSync(child)) inputs.push({
|
|
175
|
+
name: `optional-config:${relative(root, child)}`,
|
|
176
|
+
path: child,
|
|
177
|
+
optional: true
|
|
178
|
+
});
|
|
179
|
+
else xcconfig(child, project);
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
const key = line.match(/^([A-Za-z_][A-Za-z_0-9]*)\s*(?:\[[^\]]+\]\s*)*=/)?.[1];
|
|
183
|
+
if (!key || line.endsWith("\\") || /\/\*|\*\//.test(line) || /\$\(|\$\{|SEARCH_PATHS|OTHER_.*FLAGS|INFOPLIST_FILE|ENTITLEMENTS|BRIDGING_HEADER/.test(line) || INPUT_SETTINGS.has(key) || COMPILER_SETTINGS.has(key)) reasons.add(`xcconfig ${relative(root, path)} has build inputs that are not fully resolved`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
try {
|
|
188
|
+
if (selection.schemeBuildScripts) reasons.add("Xcode scheme execution actions can consume undeclared inputs");
|
|
189
|
+
for (const [projectIndex, project] of selection.projects.entries()) {
|
|
190
|
+
include(project.directory, `referenced-project:${projectIndex}`, false);
|
|
191
|
+
if (inside(sourceRoot, project.path)) reveal(project.path);
|
|
192
|
+
if (Array.isArray(project.project.projectReferences) && project.project.projectReferences.length) reasons.add("Referenced Xcode subprojects have no verified dependency input closure");
|
|
193
|
+
excluded.push(join(project.path, "xcuserdata"), join(project.path, "project.xcworkspace", "xcuserdata"));
|
|
194
|
+
const visited = /* @__PURE__ */ new Set();
|
|
195
|
+
const visit = (id, base) => {
|
|
196
|
+
if (visited.has(id)) return;
|
|
197
|
+
visited.add(id);
|
|
198
|
+
const entry = project.objects.get(id);
|
|
199
|
+
if (!entry) {
|
|
200
|
+
reasons.add(`Missing Xcode file reference ${id}`);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const tree = pbxString(entry.sourceTree) ?? "<group>";
|
|
204
|
+
const raw = pbxString(entry.path) ?? "";
|
|
205
|
+
if (/\.(?:c|cc|cpp|cxx|m|mm|h|hh|hpp|hxx|metal)$/i.test(raw)) reasons.add("C-family or Metal sources need a verified compiler include dependency graph");
|
|
206
|
+
const value = expand(raw, project);
|
|
207
|
+
if (value === null) {
|
|
208
|
+
reasons.add(`Unresolved source path ${raw}`);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
let path;
|
|
212
|
+
if (tree === "<group>") path = resolve(base, value);
|
|
213
|
+
else if (tree === "SOURCE_ROOT") path = resolve(project.directory, value);
|
|
214
|
+
else if (tree === "<absolute>" && isAbsolute(value)) path = value;
|
|
215
|
+
else if (tree === "SDKROOT" || tree === "DEVELOPER_DIR" || tree === "BUILT_PRODUCTS_DIR") return;
|
|
216
|
+
else {
|
|
217
|
+
reasons.add(`Unresolved source tree ${tree}`);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
include(path, `reference:${projectIndex}:${id}`, entry.isa !== "PBXGroup" && raw !== "");
|
|
221
|
+
if (entry.isa === "PBXFileSystemSynchronizedRootGroup") {
|
|
222
|
+
synchronizedRoots.push(inside(sourceRoot, path) ? ["repository", relative(sourceRoot, path).split(sep).join("/")].filter(Boolean).join("/") : `reference:${projectIndex}:${id}`);
|
|
223
|
+
if (Object.values(entry.explicitFileTypes ?? {}).some((type) => /^sourcecode\.(?:c|cpp|objective-c|metal)/.test(pbxString(type) ?? ""))) reasons.add("C-family or Metal sources need a verified compiler include dependency graph");
|
|
224
|
+
}
|
|
225
|
+
if (path.endsWith(".xcconfig")) xcconfig(path, project);
|
|
226
|
+
for (const child of pbxReferences(entry.children)) visit(child, path);
|
|
227
|
+
};
|
|
228
|
+
visit(pbxString(project.project.mainGroup) ?? "", project.directory);
|
|
229
|
+
for (const [id, entry] of project.objects) {
|
|
230
|
+
if (/^sourcecode\.(?:c|cpp|objective-c|metal)/.test(pbxString(entry.explicitFileType ?? entry.lastKnownFileType) ?? "")) reasons.add("C-family or Metal sources need a verified compiler include dependency graph");
|
|
231
|
+
if (entry.isa === "PBXShellScriptBuildPhase" || entry.isa === "PBXLegacyTarget" || entry.isa === "PBXBuildRule") reasons.add(`Xcode ${entry.isa} ${pbxString(entry.name) ?? id} can consume undeclared inputs`);
|
|
232
|
+
if (entry.isa === "XCLocalSwiftPackageReference") {
|
|
233
|
+
const name = pbxString(entry.relativePath);
|
|
234
|
+
if (!name) reasons.add("A local Swift package has no readable path");
|
|
235
|
+
else include(resolve(project.directory, name), `local-package:${projectIndex}:${id}`);
|
|
236
|
+
}
|
|
237
|
+
if (entry.isa === "XCBuildConfiguration") {
|
|
238
|
+
const base = pbxString(entry.baseConfigurationReference);
|
|
239
|
+
if (base) visit(base, project.directory);
|
|
240
|
+
const settings = entry.buildSettings;
|
|
241
|
+
for (const [rawKey, setting] of Object.entries(settings && typeof settings === "object" ? settings : {})) {
|
|
242
|
+
if (rawKey.endsWith("_comment")) continue;
|
|
243
|
+
const key = pbxString(rawKey);
|
|
244
|
+
const values = Array.isArray(setting) ? pbxReferences(setting) : [setting];
|
|
245
|
+
for (const [valueIndex, value] of values.entries()) {
|
|
246
|
+
const text = pbxString(value);
|
|
247
|
+
if (!text) continue;
|
|
248
|
+
expand(text, project);
|
|
249
|
+
if (COMPILER_SETTINGS.has(key.split("[")[0])) reasons.add(`Custom compiler setting ${key} needs its own tool identity`);
|
|
250
|
+
if (/^OTHER_.*FLAGS/.test(key) && /-I|-F|-L|\.\.|\//.test(text)) reasons.add(`Unresolved external compiler flags in ${key}`);
|
|
251
|
+
if (!INPUT_SETTINGS.has(key.split("[")[0])) continue;
|
|
252
|
+
const expanded = expand(text, project);
|
|
253
|
+
if (expanded === null || /["*]/.test(expanded) || key.endsWith("SEARCH_PATHS") && /\s/.test(expanded)) reasons.add(`Unresolved Xcode input setting ${key}`);
|
|
254
|
+
else include(resolve(project.directory, expanded), `setting:${projectIndex}:${id}:${key}:${valueIndex}`);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
excluded.push(join(selection.container.path, "xcuserdata"));
|
|
261
|
+
if (inside(sourceRoot, selection.container.path)) reveal(selection.container.path);
|
|
262
|
+
for (const name of [
|
|
263
|
+
"CPATH",
|
|
264
|
+
"C_INCLUDE_PATH",
|
|
265
|
+
"CPLUS_INCLUDE_PATH",
|
|
266
|
+
"OBJC_INCLUDE_PATH",
|
|
267
|
+
"OBJCPLUS_INCLUDE_PATH",
|
|
268
|
+
"LIBRARY_PATH",
|
|
269
|
+
"CC",
|
|
270
|
+
"CXX",
|
|
271
|
+
"LD",
|
|
272
|
+
"SWIFT_EXEC",
|
|
273
|
+
"SWIFT_DRIVER_SWIFT_FRONTEND_EXEC",
|
|
274
|
+
"CCC_OVERRIDE_OPTIONS",
|
|
275
|
+
"CLANG_CONFIG_FILE_USER_DIR",
|
|
276
|
+
"CLANG_CONFIG_FILE_SYSTEM_DIR"
|
|
277
|
+
]) if (process.env[name]) reasons.add(`Environment ${name} supplies native inputs outside the resolved project`);
|
|
278
|
+
if (process.env.XCODE_XCCONFIG_FILE) xcconfig(resolve(process.env.XCODE_XCCONFIG_FILE), selection.targetProject);
|
|
279
|
+
for (const [name, value] of Object.entries(environment)) if (/(?:FLAGS|OTHER_.*FLAGS)$/.test(name) && /(?:[/@]|(?:^|\s)-(?:I|F|L|include|isystem|iquote|iframework|ivfsoverlay|fmodule|fplugin|resource-dir|sdk))/.test(value)) reasons.add(`Environment ${name} supplies compiler inputs outside the resolved project`);
|
|
280
|
+
if (nativeXcodeHasPackages(selection)) reasons.add("Swift package manifests, plugins and transitive local dependencies have no verified input closure");
|
|
281
|
+
if (reasons.size) return { cacheIneligible: [...reasons].join("; ") };
|
|
282
|
+
for (const [name, path] of dependencyRoots) inputs.push({
|
|
283
|
+
name,
|
|
284
|
+
path: realpathSync(path)
|
|
285
|
+
});
|
|
286
|
+
const snapshot = fingerprintNativeInputs(inputs, {
|
|
287
|
+
excluded,
|
|
288
|
+
ignoredDirectoryMarkers: nativeXcodeMetadataDirectories(selection),
|
|
289
|
+
parameters: {
|
|
290
|
+
recipe: "native-xcode-v1",
|
|
291
|
+
application: relative(sourceRoot, root),
|
|
292
|
+
container: relative(root, selection.container.path),
|
|
293
|
+
scheme: selection.scheme,
|
|
294
|
+
target: selection.targetId,
|
|
295
|
+
configuration: selection.configuration,
|
|
296
|
+
...parameters,
|
|
297
|
+
environment
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
if (snapshot.entries.some((entry) => synchronizedRoots.some((prefix) => entry.path.startsWith(`${prefix}/`)) && /\.(?:c|cc|cpp|cxx|m|mm|h|hh|hpp|hxx|metal)$/i.test(entry.path))) return { cacheIneligible: "C-family or Metal sources need a verified compiler include dependency graph" };
|
|
301
|
+
return snapshot;
|
|
302
|
+
} catch (error) {
|
|
303
|
+
return { cacheIneligible: error instanceof NativeInputError ? error.message : `Native input closure is unavailable: ${error.message}` };
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
//#endregion
|
|
307
|
+
export { nativeXcodeSources as a, nativeXcodePackages as i, nativeXcodeInputSnapshot as n, nativeXcodeMetadataDirectories as r, nativeXcodeHasPackages as t };
|