peachsim 0.1.2190 → 0.1.2192
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/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +126 -181
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +115 -175
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -6
- package/dist-lib/host/bridge-host.cjs +126 -181
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +7 -5
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +7 -2
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +7 -5
- package/dist-lib/native-app-identity-project.cjs +6 -4
- package/dist-lib/native-app-identity-project.mjs +6 -4
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +126 -182
- package/dist-lib/swift-compile.cjs +20 -132
- package/dist-lib/swift-compile.mjs +20 -132
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +41 -23
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +97 -157
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/expo-native-workspace.ts +21 -20
- package/src/home-paths.ts +0 -5
- package/src/kotlin-host.ts +6 -1
- package/src/nitro-adapter.lock.json +265 -265
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +21 -114
- package/src/swift-distribution.lock.json +17 -11
- package/src/swift-distribution.ts +3 -3
- package/src/swift-host.ts +12 -8
- package/src/swift-interface-bodies.ts +7 -1
- package/src/swift-objc-standin.ts +46 -8
- package/src/swift-packages.ts +1 -0
- package/src/swift-toolchain.ts +40 -30
- package/src/swift-wasm-prune.ts +3 -2
- package/src/turbo-runtime.lock.json +21 -21
- package/src/xcode-project.ts +6 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2192 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -2671,18 +2671,7 @@ function sourceSwiftCheckout() {
|
|
|
2671
2671
|
return import_node_path4.default.resolve(peachsimPackageRoot(), "../sootsim-swift");
|
|
2672
2672
|
}
|
|
2673
2673
|
function swiftSdkOptions() {
|
|
2674
|
-
|
|
2675
|
-
if (directory) return ["--swift-sdks-path", import_node_path4.default.resolve(directory)];
|
|
2676
|
-
if (scratch && process.platform === "linux") {
|
|
2677
|
-
const config = process.env.XDG_CONFIG_HOME;
|
|
2678
|
-
if (config !== void 0 && !import_node_path4.default.isAbsolute(config))
|
|
2679
|
-
throw new Error("XDG_CONFIG_HOME must be an absolute path");
|
|
2680
|
-
return [
|
|
2681
|
-
"--swift-sdks-path",
|
|
2682
|
-
config === void 0 ? import_node_path4.default.join(import_node_os3.default.userInfo().homedir, ".swiftpm", "swift-sdks") : import_node_path4.default.join(config, "swiftpm", "swift-sdks")
|
|
2683
|
-
];
|
|
2684
|
-
}
|
|
2685
|
-
return [];
|
|
2674
|
+
return ["--swift-sdks-path", import_node_path4.default.resolve(peachSwiftSdksDir())];
|
|
2686
2675
|
}
|
|
2687
2676
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2688
2677
|
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
@@ -3001,6 +2990,9 @@ function peachHome() {
|
|
|
3001
2990
|
const override = process.env.PEACH_HOME;
|
|
3002
2991
|
return override ? import_node_path4.default.resolve(override) : import_node_path4.default.join(import_node_os3.default.homedir(), ".peach");
|
|
3003
2992
|
}
|
|
2993
|
+
function peachSwiftSdksDir() {
|
|
2994
|
+
return process.env.PEACH_SWIFT_SDKS_PATH ?? import_node_path4.default.join(peachHome(), "swift", "sdks");
|
|
2995
|
+
}
|
|
3004
2996
|
var BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
3005
2997
|
function buildersRootEnv() {
|
|
3006
2998
|
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
@@ -3228,8 +3220,7 @@ function swiftSdkInstallStep(release, wasmSdk) {
|
|
|
3228
3220
|
function swiftSdkInstallCommand(release, wasmSdk) {
|
|
3229
3221
|
const { wasmSdkId, wasmSdkUrl, wasmSdkChecksum } = wasmSdk;
|
|
3230
3222
|
const program = `import { installSwiftWasmSdk } from "peachsim/swift-toolchain"; installSwiftWasmSdk(${JSON.stringify(release)}, ${JSON.stringify({ wasmSdkId, wasmSdkUrl, wasmSdkChecksum })})`;
|
|
3231
|
-
const
|
|
3232
|
-
const environment = directory ? `PEACH_SWIFT_SDKS_PATH='${import_node_path4.default.resolve(directory).replaceAll("'", "'\\''")}' ` : "";
|
|
3223
|
+
const environment = `PEACH_SWIFT_SDKS_PATH='${import_node_path4.default.resolve(peachSwiftSdksDir()).replaceAll("'", "'\\''")}' `;
|
|
3233
3224
|
return `${environment}node --input-type=module -e '${program.replaceAll("'", "'\\''")}'`;
|
|
3234
3225
|
}
|
|
3235
3226
|
function swiftInstallSteps(release, wasmSdk) {
|
|
@@ -5759,7 +5750,7 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
5759
5750
|
throw new Error(`swift-wasm-prune: the build owns its sdk directory ${sdkWasiDir}`);
|
|
5760
5751
|
const sdkObjsDir = ensureUnpackedSdkObjects(sdkWasiDir);
|
|
5761
5752
|
const distDir = import_node_path10.default.join(moduleRoot, "lib");
|
|
5762
|
-
const dropsReflection = (obj, name2) => !!name2 && !/^(SwiftUI|Combine)-/.test(import_node_path10.default.basename(obj.file)) && (name2.startsWith("l__swift5_reflection_descriptor") || name2.startsWith("$s") && (name2.endsWith("CMF") || name2.endsWith("VMF")) && !(!obj.file.startsWith(distDir) && obj.file.endsWith(".swift.o")));
|
|
5753
|
+
const dropsReflection = (obj, name2) => !!name2 && !/^(SwiftUI|Combine|_[A-Za-z0-9]+_SwiftUI)-/.test(import_node_path10.default.basename(obj.file)) && (name2.startsWith("l__swift5_reflection_descriptor") || name2.startsWith("$s") && (name2.endsWith("CMF") || name2.endsWith("VMF")) && !(!obj.file.startsWith(distDir) && obj.file.endsWith(".swift.o")));
|
|
5763
5754
|
const prunedObjsDir = import_node_path10.default.join(directory, ".peach-pruned-objs");
|
|
5764
5755
|
import_node_fs9.default.rmSync(prunedObjsDir, { recursive: true, force: true });
|
|
5765
5756
|
import_node_fs9.default.mkdirSync(prunedObjsDir, { recursive: true });
|
|
@@ -12477,7 +12468,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12477
12468
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12478
12469
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12479
12470
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12480
|
-
var compilerSourceDigest = true ? "
|
|
12471
|
+
var compilerSourceDigest = true ? "e10a6af53455b2d2b6d58c2abd62834b0ca3a02445b4778b18f9fcbb90fa3747" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12481
12472
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12482
12473
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12483
12474
|
hash.update(`swift-compile
|
|
@@ -12886,6 +12877,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
12886
12877
|
' publicHeadersPath: "include",'
|
|
12887
12878
|
] : native?.flags ? [` sources: ${JSON.stringify(native.sources)},`] : target.sources !== void 0 ? [` sources: ${JSON.stringify(target.sources)},`] : [],
|
|
12888
12879
|
...!native?.clang && target.publicHeadersPath !== void 0 ? [` publicHeadersPath: ${JSON.stringify(target.publicHeadersPath)},`] : [],
|
|
12880
|
+
// swiftpm appends the root package's name after a target's own flags
|
|
12881
|
+
// unless the target opts out of package access
|
|
12882
|
+
...!clang && target.swiftFlags?.includes("-package-name") ? [" packageAccess: false,"] : [],
|
|
12889
12883
|
// the native backend supplies dependency module maps without their
|
|
12890
12884
|
// compiled modules. textual c++ includes keep those dependencies usable.
|
|
12891
12885
|
` ${clang ? nativeSettings : swiftSettings}${link}`,
|
|
@@ -13276,117 +13270,6 @@ var FOUNDATION_OVERLAY_GLOBALS = /* @__PURE__ */ new Set([
|
|
|
13276
13270
|
"NSFileErrorMinimum",
|
|
13277
13271
|
"NSFormattingErrorMaximum",
|
|
13278
13272
|
"NSFormattingErrorMinimum",
|
|
13279
|
-
"NSFoundationVersionNumber",
|
|
13280
|
-
"NSFoundationVersionNumber10_0",
|
|
13281
|
-
"NSFoundationVersionNumber10_1",
|
|
13282
|
-
"NSFoundationVersionNumber10_10",
|
|
13283
|
-
"NSFoundationVersionNumber10_10_1",
|
|
13284
|
-
"NSFoundationVersionNumber10_10_2",
|
|
13285
|
-
"NSFoundationVersionNumber10_10_3",
|
|
13286
|
-
"NSFoundationVersionNumber10_10_4",
|
|
13287
|
-
"NSFoundationVersionNumber10_10_5",
|
|
13288
|
-
"NSFoundationVersionNumber10_10_Max",
|
|
13289
|
-
"NSFoundationVersionNumber10_11",
|
|
13290
|
-
"NSFoundationVersionNumber10_11_1",
|
|
13291
|
-
"NSFoundationVersionNumber10_11_2",
|
|
13292
|
-
"NSFoundationVersionNumber10_11_3",
|
|
13293
|
-
"NSFoundationVersionNumber10_11_4",
|
|
13294
|
-
"NSFoundationVersionNumber10_11_Max",
|
|
13295
|
-
"NSFoundationVersionNumber10_1_1",
|
|
13296
|
-
"NSFoundationVersionNumber10_1_2",
|
|
13297
|
-
"NSFoundationVersionNumber10_1_3",
|
|
13298
|
-
"NSFoundationVersionNumber10_1_4",
|
|
13299
|
-
"NSFoundationVersionNumber10_2",
|
|
13300
|
-
"NSFoundationVersionNumber10_2_1",
|
|
13301
|
-
"NSFoundationVersionNumber10_2_2",
|
|
13302
|
-
"NSFoundationVersionNumber10_2_3",
|
|
13303
|
-
"NSFoundationVersionNumber10_2_4",
|
|
13304
|
-
"NSFoundationVersionNumber10_2_5",
|
|
13305
|
-
"NSFoundationVersionNumber10_2_6",
|
|
13306
|
-
"NSFoundationVersionNumber10_2_7",
|
|
13307
|
-
"NSFoundationVersionNumber10_2_8",
|
|
13308
|
-
"NSFoundationVersionNumber10_3",
|
|
13309
|
-
"NSFoundationVersionNumber10_3_1",
|
|
13310
|
-
"NSFoundationVersionNumber10_3_2",
|
|
13311
|
-
"NSFoundationVersionNumber10_3_3",
|
|
13312
|
-
"NSFoundationVersionNumber10_3_4",
|
|
13313
|
-
"NSFoundationVersionNumber10_3_5",
|
|
13314
|
-
"NSFoundationVersionNumber10_3_6",
|
|
13315
|
-
"NSFoundationVersionNumber10_3_7",
|
|
13316
|
-
"NSFoundationVersionNumber10_3_8",
|
|
13317
|
-
"NSFoundationVersionNumber10_3_9",
|
|
13318
|
-
"NSFoundationVersionNumber10_4",
|
|
13319
|
-
"NSFoundationVersionNumber10_4_1",
|
|
13320
|
-
"NSFoundationVersionNumber10_4_10",
|
|
13321
|
-
"NSFoundationVersionNumber10_4_11",
|
|
13322
|
-
"NSFoundationVersionNumber10_4_2",
|
|
13323
|
-
"NSFoundationVersionNumber10_4_3",
|
|
13324
|
-
"NSFoundationVersionNumber10_4_4_Intel",
|
|
13325
|
-
"NSFoundationVersionNumber10_4_4_PowerPC",
|
|
13326
|
-
"NSFoundationVersionNumber10_4_5",
|
|
13327
|
-
"NSFoundationVersionNumber10_4_6",
|
|
13328
|
-
"NSFoundationVersionNumber10_4_7",
|
|
13329
|
-
"NSFoundationVersionNumber10_4_8",
|
|
13330
|
-
"NSFoundationVersionNumber10_4_9",
|
|
13331
|
-
"NSFoundationVersionNumber10_5",
|
|
13332
|
-
"NSFoundationVersionNumber10_5_1",
|
|
13333
|
-
"NSFoundationVersionNumber10_5_2",
|
|
13334
|
-
"NSFoundationVersionNumber10_5_3",
|
|
13335
|
-
"NSFoundationVersionNumber10_5_4",
|
|
13336
|
-
"NSFoundationVersionNumber10_5_5",
|
|
13337
|
-
"NSFoundationVersionNumber10_5_6",
|
|
13338
|
-
"NSFoundationVersionNumber10_5_7",
|
|
13339
|
-
"NSFoundationVersionNumber10_5_8",
|
|
13340
|
-
"NSFoundationVersionNumber10_6",
|
|
13341
|
-
"NSFoundationVersionNumber10_6_1",
|
|
13342
|
-
"NSFoundationVersionNumber10_6_2",
|
|
13343
|
-
"NSFoundationVersionNumber10_6_3",
|
|
13344
|
-
"NSFoundationVersionNumber10_6_4",
|
|
13345
|
-
"NSFoundationVersionNumber10_6_5",
|
|
13346
|
-
"NSFoundationVersionNumber10_6_6",
|
|
13347
|
-
"NSFoundationVersionNumber10_6_7",
|
|
13348
|
-
"NSFoundationVersionNumber10_6_8",
|
|
13349
|
-
"NSFoundationVersionNumber10_7",
|
|
13350
|
-
"NSFoundationVersionNumber10_7_1",
|
|
13351
|
-
"NSFoundationVersionNumber10_7_2",
|
|
13352
|
-
"NSFoundationVersionNumber10_7_3",
|
|
13353
|
-
"NSFoundationVersionNumber10_7_4",
|
|
13354
|
-
"NSFoundationVersionNumber10_8",
|
|
13355
|
-
"NSFoundationVersionNumber10_8_1",
|
|
13356
|
-
"NSFoundationVersionNumber10_8_2",
|
|
13357
|
-
"NSFoundationVersionNumber10_8_3",
|
|
13358
|
-
"NSFoundationVersionNumber10_8_4",
|
|
13359
|
-
"NSFoundationVersionNumber10_9",
|
|
13360
|
-
"NSFoundationVersionNumber10_9_1",
|
|
13361
|
-
"NSFoundationVersionNumber10_9_2",
|
|
13362
|
-
"NSFoundationVersionNumber_iOS_4_0",
|
|
13363
|
-
"NSFoundationVersionNumber_iOS_4_1",
|
|
13364
|
-
"NSFoundationVersionNumber_iOS_4_2",
|
|
13365
|
-
"NSFoundationVersionNumber_iOS_4_3",
|
|
13366
|
-
"NSFoundationVersionNumber_iOS_5_0",
|
|
13367
|
-
"NSFoundationVersionNumber_iOS_5_1",
|
|
13368
|
-
"NSFoundationVersionNumber_iOS_6_0",
|
|
13369
|
-
"NSFoundationVersionNumber_iOS_6_1",
|
|
13370
|
-
"NSFoundationVersionNumber_iOS_7_0",
|
|
13371
|
-
"NSFoundationVersionNumber_iOS_7_1",
|
|
13372
|
-
"NSFoundationVersionNumber_iOS_8_0",
|
|
13373
|
-
"NSFoundationVersionNumber_iOS_8_1",
|
|
13374
|
-
"NSFoundationVersionNumber_iOS_8_2",
|
|
13375
|
-
"NSFoundationVersionNumber_iOS_8_3",
|
|
13376
|
-
"NSFoundationVersionNumber_iOS_8_4",
|
|
13377
|
-
"NSFoundationVersionNumber_iOS_8_x_Max",
|
|
13378
|
-
"NSFoundationVersionNumber_iOS_9_0",
|
|
13379
|
-
"NSFoundationVersionNumber_iOS_9_1",
|
|
13380
|
-
"NSFoundationVersionNumber_iOS_9_2",
|
|
13381
|
-
"NSFoundationVersionNumber_iOS_9_3",
|
|
13382
|
-
"NSFoundationVersionNumber_iOS_9_4",
|
|
13383
|
-
"NSFoundationVersionNumber_iOS_9_x_Max",
|
|
13384
|
-
"NSFoundationVersionNumber_iPhoneOS_2_0",
|
|
13385
|
-
"NSFoundationVersionNumber_iPhoneOS_2_1",
|
|
13386
|
-
"NSFoundationVersionNumber_iPhoneOS_2_2",
|
|
13387
|
-
"NSFoundationVersionNumber_iPhoneOS_3_0",
|
|
13388
|
-
"NSFoundationVersionNumber_iPhoneOS_3_1",
|
|
13389
|
-
"NSFoundationVersionNumber_iPhoneOS_3_2",
|
|
13390
13273
|
"NSFoundationVersionWithFileManagerResourceForkSupport",
|
|
13391
13274
|
"NSFreeHashTable",
|
|
13392
13275
|
"NSFreeMapTable",
|
|
@@ -14535,7 +14418,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14535
14418
|
for (const file of Object.keys(input.files)) {
|
|
14536
14419
|
if (!file.endsWith(".swift")) continue;
|
|
14537
14420
|
const target = bySourcePath.find(
|
|
14538
|
-
(candidate) => candidate.path === "." || file.startsWith(`${candidate.path}/`)
|
|
14421
|
+
(candidate) => (candidate.path === "." || file.startsWith(`${candidate.path}/`)) && (candidate.sources === void 0 || candidate.sources.some((source) => {
|
|
14422
|
+
const selected = import_node_path27.default.posix.join(candidate.path, source);
|
|
14423
|
+
return file === selected || file.startsWith(`${selected}/`);
|
|
14424
|
+
}))
|
|
14539
14425
|
);
|
|
14540
14426
|
const excluded = target?.exclude?.some(
|
|
14541
14427
|
(name2) => file === import_node_path27.default.posix.join(target.path, name2)
|
|
@@ -14588,7 +14474,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14588
14474
|
const targetEntries = (target) => {
|
|
14589
14475
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
14590
14476
|
return Object.entries(input.files).filter(
|
|
14591
|
-
([file]) => file.startsWith(prefix) && !target.
|
|
14477
|
+
([file]) => file.startsWith(prefix) && (target.sources === void 0 || !(file.endsWith(".swift") || isSwiftNativeTranslationUnit(file)) || target.sources.some((source) => {
|
|
14478
|
+
const selected = import_node_path27.default.posix.join(prefix, source);
|
|
14479
|
+
return file === selected || file.startsWith(`${selected}/`);
|
|
14480
|
+
})) && !target.exclude?.some(
|
|
14592
14481
|
(excluded) => file === `${prefix}${excluded}` || file.startsWith(`${prefix}${excluded}/`)
|
|
14593
14482
|
) && !targets.some(
|
|
14594
14483
|
(candidate) => candidate.name !== target.name && candidate.path !== "." && candidate.path.startsWith(prefix) && file.startsWith(`${candidate.path}/`)
|
|
@@ -14743,8 +14632,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14743
14632
|
)) {
|
|
14744
14633
|
const include2 = match[1];
|
|
14745
14634
|
const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
|
|
14746
|
-
if (producer &&
|
|
14747
|
-
producers2.add(producer);
|
|
14635
|
+
if (producer && swiftTargets.has(producer)) producers2.add(producer);
|
|
14748
14636
|
const local = [
|
|
14749
14637
|
import_node_path27.default.posix.join(import_node_path27.default.posix.dirname(file), include2),
|
|
14750
14638
|
`${includes}${include2}`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2192 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -2616,18 +2616,7 @@ function sourceSwiftCheckout() {
|
|
|
2616
2616
|
return path4.resolve(peachsimPackageRoot(), "../sootsim-swift");
|
|
2617
2617
|
}
|
|
2618
2618
|
function swiftSdkOptions() {
|
|
2619
|
-
|
|
2620
|
-
if (directory) return ["--swift-sdks-path", path4.resolve(directory)];
|
|
2621
|
-
if (scratch && process.platform === "linux") {
|
|
2622
|
-
const config = process.env.XDG_CONFIG_HOME;
|
|
2623
|
-
if (config !== void 0 && !path4.isAbsolute(config))
|
|
2624
|
-
throw new Error("XDG_CONFIG_HOME must be an absolute path");
|
|
2625
|
-
return [
|
|
2626
|
-
"--swift-sdks-path",
|
|
2627
|
-
config === void 0 ? path4.join(os.userInfo().homedir, ".swiftpm", "swift-sdks") : path4.join(config, "swiftpm", "swift-sdks")
|
|
2628
|
-
];
|
|
2629
|
-
}
|
|
2630
|
-
return [];
|
|
2619
|
+
return ["--swift-sdks-path", path4.resolve(peachSwiftSdksDir())];
|
|
2631
2620
|
}
|
|
2632
2621
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2633
2622
|
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
@@ -2946,6 +2935,9 @@ function peachHome() {
|
|
|
2946
2935
|
const override = process.env.PEACH_HOME;
|
|
2947
2936
|
return override ? path4.resolve(override) : path4.join(os.homedir(), ".peach");
|
|
2948
2937
|
}
|
|
2938
|
+
function peachSwiftSdksDir() {
|
|
2939
|
+
return process.env.PEACH_SWIFT_SDKS_PATH ?? path4.join(peachHome(), "swift", "sdks");
|
|
2940
|
+
}
|
|
2949
2941
|
var BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
2950
2942
|
function buildersRootEnv() {
|
|
2951
2943
|
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
@@ -3173,8 +3165,7 @@ function swiftSdkInstallStep(release, wasmSdk) {
|
|
|
3173
3165
|
function swiftSdkInstallCommand(release, wasmSdk) {
|
|
3174
3166
|
const { wasmSdkId, wasmSdkUrl, wasmSdkChecksum } = wasmSdk;
|
|
3175
3167
|
const program = `import { installSwiftWasmSdk } from "peachsim/swift-toolchain"; installSwiftWasmSdk(${JSON.stringify(release)}, ${JSON.stringify({ wasmSdkId, wasmSdkUrl, wasmSdkChecksum })})`;
|
|
3176
|
-
const
|
|
3177
|
-
const environment = directory ? `PEACH_SWIFT_SDKS_PATH='${path4.resolve(directory).replaceAll("'", "'\\''")}' ` : "";
|
|
3168
|
+
const environment = `PEACH_SWIFT_SDKS_PATH='${path4.resolve(peachSwiftSdksDir()).replaceAll("'", "'\\''")}' `;
|
|
3178
3169
|
return `${environment}node --input-type=module -e '${program.replaceAll("'", "'\\''")}'`;
|
|
3179
3170
|
}
|
|
3180
3171
|
function swiftInstallSteps(release, wasmSdk) {
|
|
@@ -5706,7 +5697,7 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
5706
5697
|
throw new Error(`swift-wasm-prune: the build owns its sdk directory ${sdkWasiDir}`);
|
|
5707
5698
|
const sdkObjsDir = ensureUnpackedSdkObjects(sdkWasiDir);
|
|
5708
5699
|
const distDir = path10.join(moduleRoot, "lib");
|
|
5709
|
-
const dropsReflection = (obj, name2) => !!name2 && !/^(SwiftUI|Combine)-/.test(path10.basename(obj.file)) && (name2.startsWith("l__swift5_reflection_descriptor") || name2.startsWith("$s") && (name2.endsWith("CMF") || name2.endsWith("VMF")) && !(!obj.file.startsWith(distDir) && obj.file.endsWith(".swift.o")));
|
|
5700
|
+
const dropsReflection = (obj, name2) => !!name2 && !/^(SwiftUI|Combine|_[A-Za-z0-9]+_SwiftUI)-/.test(path10.basename(obj.file)) && (name2.startsWith("l__swift5_reflection_descriptor") || name2.startsWith("$s") && (name2.endsWith("CMF") || name2.endsWith("VMF")) && !(!obj.file.startsWith(distDir) && obj.file.endsWith(".swift.o")));
|
|
5710
5701
|
const prunedObjsDir = path10.join(directory, ".peach-pruned-objs");
|
|
5711
5702
|
fs4.rmSync(prunedObjsDir, { recursive: true, force: true });
|
|
5712
5703
|
fs4.mkdirSync(prunedObjsDir, { recursive: true });
|
|
@@ -12457,7 +12448,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12457
12448
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12458
12449
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12459
12450
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12460
|
-
var compilerSourceDigest = true ? "
|
|
12451
|
+
var compilerSourceDigest = true ? "e10a6af53455b2d2b6d58c2abd62834b0ca3a02445b4778b18f9fcbb90fa3747" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12461
12452
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12462
12453
|
const hash = createHash13("sha256");
|
|
12463
12454
|
hash.update(`swift-compile
|
|
@@ -12866,6 +12857,9 @@ function emitSwiftPackageManifest(args) {
|
|
|
12866
12857
|
' publicHeadersPath: "include",'
|
|
12867
12858
|
] : native?.flags ? [` sources: ${JSON.stringify(native.sources)},`] : target.sources !== void 0 ? [` sources: ${JSON.stringify(target.sources)},`] : [],
|
|
12868
12859
|
...!native?.clang && target.publicHeadersPath !== void 0 ? [` publicHeadersPath: ${JSON.stringify(target.publicHeadersPath)},`] : [],
|
|
12860
|
+
// swiftpm appends the root package's name after a target's own flags
|
|
12861
|
+
// unless the target opts out of package access
|
|
12862
|
+
...!clang && target.swiftFlags?.includes("-package-name") ? [" packageAccess: false,"] : [],
|
|
12869
12863
|
// the native backend supplies dependency module maps without their
|
|
12870
12864
|
// compiled modules. textual c++ includes keep those dependencies usable.
|
|
12871
12865
|
` ${clang ? nativeSettings : swiftSettings}${link}`,
|
|
@@ -13256,117 +13250,6 @@ var FOUNDATION_OVERLAY_GLOBALS = /* @__PURE__ */ new Set([
|
|
|
13256
13250
|
"NSFileErrorMinimum",
|
|
13257
13251
|
"NSFormattingErrorMaximum",
|
|
13258
13252
|
"NSFormattingErrorMinimum",
|
|
13259
|
-
"NSFoundationVersionNumber",
|
|
13260
|
-
"NSFoundationVersionNumber10_0",
|
|
13261
|
-
"NSFoundationVersionNumber10_1",
|
|
13262
|
-
"NSFoundationVersionNumber10_10",
|
|
13263
|
-
"NSFoundationVersionNumber10_10_1",
|
|
13264
|
-
"NSFoundationVersionNumber10_10_2",
|
|
13265
|
-
"NSFoundationVersionNumber10_10_3",
|
|
13266
|
-
"NSFoundationVersionNumber10_10_4",
|
|
13267
|
-
"NSFoundationVersionNumber10_10_5",
|
|
13268
|
-
"NSFoundationVersionNumber10_10_Max",
|
|
13269
|
-
"NSFoundationVersionNumber10_11",
|
|
13270
|
-
"NSFoundationVersionNumber10_11_1",
|
|
13271
|
-
"NSFoundationVersionNumber10_11_2",
|
|
13272
|
-
"NSFoundationVersionNumber10_11_3",
|
|
13273
|
-
"NSFoundationVersionNumber10_11_4",
|
|
13274
|
-
"NSFoundationVersionNumber10_11_Max",
|
|
13275
|
-
"NSFoundationVersionNumber10_1_1",
|
|
13276
|
-
"NSFoundationVersionNumber10_1_2",
|
|
13277
|
-
"NSFoundationVersionNumber10_1_3",
|
|
13278
|
-
"NSFoundationVersionNumber10_1_4",
|
|
13279
|
-
"NSFoundationVersionNumber10_2",
|
|
13280
|
-
"NSFoundationVersionNumber10_2_1",
|
|
13281
|
-
"NSFoundationVersionNumber10_2_2",
|
|
13282
|
-
"NSFoundationVersionNumber10_2_3",
|
|
13283
|
-
"NSFoundationVersionNumber10_2_4",
|
|
13284
|
-
"NSFoundationVersionNumber10_2_5",
|
|
13285
|
-
"NSFoundationVersionNumber10_2_6",
|
|
13286
|
-
"NSFoundationVersionNumber10_2_7",
|
|
13287
|
-
"NSFoundationVersionNumber10_2_8",
|
|
13288
|
-
"NSFoundationVersionNumber10_3",
|
|
13289
|
-
"NSFoundationVersionNumber10_3_1",
|
|
13290
|
-
"NSFoundationVersionNumber10_3_2",
|
|
13291
|
-
"NSFoundationVersionNumber10_3_3",
|
|
13292
|
-
"NSFoundationVersionNumber10_3_4",
|
|
13293
|
-
"NSFoundationVersionNumber10_3_5",
|
|
13294
|
-
"NSFoundationVersionNumber10_3_6",
|
|
13295
|
-
"NSFoundationVersionNumber10_3_7",
|
|
13296
|
-
"NSFoundationVersionNumber10_3_8",
|
|
13297
|
-
"NSFoundationVersionNumber10_3_9",
|
|
13298
|
-
"NSFoundationVersionNumber10_4",
|
|
13299
|
-
"NSFoundationVersionNumber10_4_1",
|
|
13300
|
-
"NSFoundationVersionNumber10_4_10",
|
|
13301
|
-
"NSFoundationVersionNumber10_4_11",
|
|
13302
|
-
"NSFoundationVersionNumber10_4_2",
|
|
13303
|
-
"NSFoundationVersionNumber10_4_3",
|
|
13304
|
-
"NSFoundationVersionNumber10_4_4_Intel",
|
|
13305
|
-
"NSFoundationVersionNumber10_4_4_PowerPC",
|
|
13306
|
-
"NSFoundationVersionNumber10_4_5",
|
|
13307
|
-
"NSFoundationVersionNumber10_4_6",
|
|
13308
|
-
"NSFoundationVersionNumber10_4_7",
|
|
13309
|
-
"NSFoundationVersionNumber10_4_8",
|
|
13310
|
-
"NSFoundationVersionNumber10_4_9",
|
|
13311
|
-
"NSFoundationVersionNumber10_5",
|
|
13312
|
-
"NSFoundationVersionNumber10_5_1",
|
|
13313
|
-
"NSFoundationVersionNumber10_5_2",
|
|
13314
|
-
"NSFoundationVersionNumber10_5_3",
|
|
13315
|
-
"NSFoundationVersionNumber10_5_4",
|
|
13316
|
-
"NSFoundationVersionNumber10_5_5",
|
|
13317
|
-
"NSFoundationVersionNumber10_5_6",
|
|
13318
|
-
"NSFoundationVersionNumber10_5_7",
|
|
13319
|
-
"NSFoundationVersionNumber10_5_8",
|
|
13320
|
-
"NSFoundationVersionNumber10_6",
|
|
13321
|
-
"NSFoundationVersionNumber10_6_1",
|
|
13322
|
-
"NSFoundationVersionNumber10_6_2",
|
|
13323
|
-
"NSFoundationVersionNumber10_6_3",
|
|
13324
|
-
"NSFoundationVersionNumber10_6_4",
|
|
13325
|
-
"NSFoundationVersionNumber10_6_5",
|
|
13326
|
-
"NSFoundationVersionNumber10_6_6",
|
|
13327
|
-
"NSFoundationVersionNumber10_6_7",
|
|
13328
|
-
"NSFoundationVersionNumber10_6_8",
|
|
13329
|
-
"NSFoundationVersionNumber10_7",
|
|
13330
|
-
"NSFoundationVersionNumber10_7_1",
|
|
13331
|
-
"NSFoundationVersionNumber10_7_2",
|
|
13332
|
-
"NSFoundationVersionNumber10_7_3",
|
|
13333
|
-
"NSFoundationVersionNumber10_7_4",
|
|
13334
|
-
"NSFoundationVersionNumber10_8",
|
|
13335
|
-
"NSFoundationVersionNumber10_8_1",
|
|
13336
|
-
"NSFoundationVersionNumber10_8_2",
|
|
13337
|
-
"NSFoundationVersionNumber10_8_3",
|
|
13338
|
-
"NSFoundationVersionNumber10_8_4",
|
|
13339
|
-
"NSFoundationVersionNumber10_9",
|
|
13340
|
-
"NSFoundationVersionNumber10_9_1",
|
|
13341
|
-
"NSFoundationVersionNumber10_9_2",
|
|
13342
|
-
"NSFoundationVersionNumber_iOS_4_0",
|
|
13343
|
-
"NSFoundationVersionNumber_iOS_4_1",
|
|
13344
|
-
"NSFoundationVersionNumber_iOS_4_2",
|
|
13345
|
-
"NSFoundationVersionNumber_iOS_4_3",
|
|
13346
|
-
"NSFoundationVersionNumber_iOS_5_0",
|
|
13347
|
-
"NSFoundationVersionNumber_iOS_5_1",
|
|
13348
|
-
"NSFoundationVersionNumber_iOS_6_0",
|
|
13349
|
-
"NSFoundationVersionNumber_iOS_6_1",
|
|
13350
|
-
"NSFoundationVersionNumber_iOS_7_0",
|
|
13351
|
-
"NSFoundationVersionNumber_iOS_7_1",
|
|
13352
|
-
"NSFoundationVersionNumber_iOS_8_0",
|
|
13353
|
-
"NSFoundationVersionNumber_iOS_8_1",
|
|
13354
|
-
"NSFoundationVersionNumber_iOS_8_2",
|
|
13355
|
-
"NSFoundationVersionNumber_iOS_8_3",
|
|
13356
|
-
"NSFoundationVersionNumber_iOS_8_4",
|
|
13357
|
-
"NSFoundationVersionNumber_iOS_8_x_Max",
|
|
13358
|
-
"NSFoundationVersionNumber_iOS_9_0",
|
|
13359
|
-
"NSFoundationVersionNumber_iOS_9_1",
|
|
13360
|
-
"NSFoundationVersionNumber_iOS_9_2",
|
|
13361
|
-
"NSFoundationVersionNumber_iOS_9_3",
|
|
13362
|
-
"NSFoundationVersionNumber_iOS_9_4",
|
|
13363
|
-
"NSFoundationVersionNumber_iOS_9_x_Max",
|
|
13364
|
-
"NSFoundationVersionNumber_iPhoneOS_2_0",
|
|
13365
|
-
"NSFoundationVersionNumber_iPhoneOS_2_1",
|
|
13366
|
-
"NSFoundationVersionNumber_iPhoneOS_2_2",
|
|
13367
|
-
"NSFoundationVersionNumber_iPhoneOS_3_0",
|
|
13368
|
-
"NSFoundationVersionNumber_iPhoneOS_3_1",
|
|
13369
|
-
"NSFoundationVersionNumber_iPhoneOS_3_2",
|
|
13370
13253
|
"NSFoundationVersionWithFileManagerResourceForkSupport",
|
|
13371
13254
|
"NSFreeHashTable",
|
|
13372
13255
|
"NSFreeMapTable",
|
|
@@ -14515,7 +14398,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14515
14398
|
for (const file of Object.keys(input.files)) {
|
|
14516
14399
|
if (!file.endsWith(".swift")) continue;
|
|
14517
14400
|
const target = bySourcePath.find(
|
|
14518
|
-
(candidate) => candidate.path === "." || file.startsWith(`${candidate.path}/`)
|
|
14401
|
+
(candidate) => (candidate.path === "." || file.startsWith(`${candidate.path}/`)) && (candidate.sources === void 0 || candidate.sources.some((source) => {
|
|
14402
|
+
const selected = path27.posix.join(candidate.path, source);
|
|
14403
|
+
return file === selected || file.startsWith(`${selected}/`);
|
|
14404
|
+
}))
|
|
14519
14405
|
);
|
|
14520
14406
|
const excluded = target?.exclude?.some(
|
|
14521
14407
|
(name2) => file === path27.posix.join(target.path, name2)
|
|
@@ -14568,7 +14454,10 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14568
14454
|
const targetEntries = (target) => {
|
|
14569
14455
|
const prefix = target.path === "." ? "" : `${target.path}/`;
|
|
14570
14456
|
return Object.entries(input.files).filter(
|
|
14571
|
-
([file]) => file.startsWith(prefix) && !target.
|
|
14457
|
+
([file]) => file.startsWith(prefix) && (target.sources === void 0 || !(file.endsWith(".swift") || isSwiftNativeTranslationUnit(file)) || target.sources.some((source) => {
|
|
14458
|
+
const selected = path27.posix.join(prefix, source);
|
|
14459
|
+
return file === selected || file.startsWith(`${selected}/`);
|
|
14460
|
+
})) && !target.exclude?.some(
|
|
14572
14461
|
(excluded) => file === `${prefix}${excluded}` || file.startsWith(`${prefix}${excluded}/`)
|
|
14573
14462
|
) && !targets.some(
|
|
14574
14463
|
(candidate) => candidate.name !== target.name && candidate.path !== "." && candidate.path.startsWith(prefix) && file.startsWith(`${candidate.path}/`)
|
|
@@ -14723,8 +14612,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14723
14612
|
)) {
|
|
14724
14613
|
const include2 = match[1];
|
|
14725
14614
|
const producer = /(?:^|\/)([^/]+)-Swift\.h$/.exec(include2)?.[1];
|
|
14726
|
-
if (producer &&
|
|
14727
|
-
producers2.add(producer);
|
|
14615
|
+
if (producer && swiftTargets.has(producer)) producers2.add(producer);
|
|
14728
14616
|
const local = [
|
|
14729
14617
|
path27.posix.join(path27.posix.dirname(file), include2),
|
|
14730
14618
|
`${includes}${include2}`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2192 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2192 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2192 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -42,6 +42,7 @@ __export(swift_toolchain_exports, {
|
|
|
42
42
|
extractSwiftHostCompiler: () => extractSwiftHostCompiler,
|
|
43
43
|
installSwiftWasmSdk: () => installSwiftWasmSdk,
|
|
44
44
|
peachHome: () => peachHome,
|
|
45
|
+
peachSwiftSdksDir: () => peachSwiftSdksDir,
|
|
45
46
|
peachsimPackageRoot: () => peachsimPackageRoot,
|
|
46
47
|
privateSwiftCompilerRelease: () => privateSwiftCompilerRelease,
|
|
47
48
|
privateSwiftDistributionRoot: () => privateSwiftDistributionRoot,
|
|
@@ -95,18 +96,7 @@ function sourceSwiftCheckout() {
|
|
|
95
96
|
return import_node_path.default.resolve(peachsimPackageRoot(), "../sootsim-swift");
|
|
96
97
|
}
|
|
97
98
|
function swiftSdkOptions() {
|
|
98
|
-
|
|
99
|
-
if (directory) return ["--swift-sdks-path", import_node_path.default.resolve(directory)];
|
|
100
|
-
if (scratch && process.platform === "linux") {
|
|
101
|
-
const config = process.env.XDG_CONFIG_HOME;
|
|
102
|
-
if (config !== void 0 && !import_node_path.default.isAbsolute(config))
|
|
103
|
-
throw new Error("XDG_CONFIG_HOME must be an absolute path");
|
|
104
|
-
return [
|
|
105
|
-
"--swift-sdks-path",
|
|
106
|
-
config === void 0 ? import_node_path.default.join(import_node_os.default.userInfo().homedir, ".swiftpm", "swift-sdks") : import_node_path.default.join(config, "swiftpm", "swift-sdks")
|
|
107
|
-
];
|
|
108
|
-
}
|
|
109
|
-
return [];
|
|
99
|
+
return ["--swift-sdks-path", import_node_path.default.resolve(peachSwiftSdksDir())];
|
|
110
100
|
}
|
|
111
101
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
112
102
|
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
@@ -395,9 +385,22 @@ function ensureSwiftLinuxRuntime(release) {
|
|
|
395
385
|
`);
|
|
396
386
|
const download = `${plan.dest}.${process.pid}.tmp`;
|
|
397
387
|
try {
|
|
398
|
-
(0, import_node_child_process.execFileSync)(
|
|
399
|
-
|
|
400
|
-
|
|
388
|
+
(0, import_node_child_process.execFileSync)(
|
|
389
|
+
"curl",
|
|
390
|
+
[
|
|
391
|
+
"-fsSL",
|
|
392
|
+
"--show-error",
|
|
393
|
+
"--retry",
|
|
394
|
+
"3",
|
|
395
|
+
"--retry-all-errors",
|
|
396
|
+
plan.url,
|
|
397
|
+
"-o",
|
|
398
|
+
download
|
|
399
|
+
],
|
|
400
|
+
{
|
|
401
|
+
stdio: "inherit"
|
|
402
|
+
}
|
|
403
|
+
);
|
|
401
404
|
if (swiftFileChecksum(download) !== plan.checksum)
|
|
402
405
|
throw new Error("declared Linux runtime checksum mismatch");
|
|
403
406
|
import_node_fs.default.renameSync(download, plan.dest);
|
|
@@ -516,6 +519,9 @@ function peachHome() {
|
|
|
516
519
|
const override = process.env.PEACH_HOME;
|
|
517
520
|
return override ? import_node_path.default.resolve(override) : import_node_path.default.join(import_node_os.default.homedir(), ".peach");
|
|
518
521
|
}
|
|
522
|
+
function peachSwiftSdksDir() {
|
|
523
|
+
return process.env.PEACH_SWIFT_SDKS_PATH ?? import_node_path.default.join(peachHome(), "swift", "sdks");
|
|
524
|
+
}
|
|
519
525
|
var BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
520
526
|
var agentBuildersRoot;
|
|
521
527
|
function agentSharedCacheRoot() {
|
|
@@ -771,8 +777,7 @@ function installSwiftSdkArchive(swift, sdk, archive) {
|
|
|
771
777
|
store
|
|
772
778
|
]);
|
|
773
779
|
const expected = swiftSdkPayloadChecksum(stagedBundle);
|
|
774
|
-
const
|
|
775
|
-
const locks = directory ? import_node_path.default.join(import_node_path.default.resolve(directory), ".peach-locks") : import_node_path.default.join(import_node_os.default.homedir(), ".swiftpm", "builder-locks");
|
|
780
|
+
const locks = import_node_path.default.join(import_node_path.default.resolve(peachSwiftSdksDir()), ".peach-locks");
|
|
776
781
|
import_node_fs.default.mkdirSync(locks, { recursive: true });
|
|
777
782
|
(0, import_node_child_process.execFileSync)(
|
|
778
783
|
"perl",
|
|
@@ -834,9 +839,22 @@ function installSwiftWasmSdk(release, sdk) {
|
|
|
834
839
|
if (sdk.wasmSdkUrl.startsWith("file:"))
|
|
835
840
|
import_node_fs.default.copyFileSync((0, import_node_url.fileURLToPath)(sdk.wasmSdkUrl), archive);
|
|
836
841
|
else
|
|
837
|
-
(0, import_node_child_process.execFileSync)(
|
|
838
|
-
|
|
839
|
-
|
|
842
|
+
(0, import_node_child_process.execFileSync)(
|
|
843
|
+
"curl",
|
|
844
|
+
[
|
|
845
|
+
"-fsSL",
|
|
846
|
+
"--show-error",
|
|
847
|
+
"--retry",
|
|
848
|
+
"3",
|
|
849
|
+
"--retry-all-errors",
|
|
850
|
+
sdk.wasmSdkUrl,
|
|
851
|
+
"-o",
|
|
852
|
+
archive
|
|
853
|
+
],
|
|
854
|
+
{
|
|
855
|
+
stdio: "inherit"
|
|
856
|
+
}
|
|
857
|
+
);
|
|
840
858
|
installSwiftSdkArchive(swift, sdk, archive);
|
|
841
859
|
swiftToolchain(release, sdk);
|
|
842
860
|
} finally {
|
|
@@ -954,8 +972,7 @@ function swiftSdkInstallStep(release, wasmSdk) {
|
|
|
954
972
|
function swiftSdkInstallCommand(release, wasmSdk) {
|
|
955
973
|
const { wasmSdkId, wasmSdkUrl, wasmSdkChecksum } = wasmSdk;
|
|
956
974
|
const program = `import { installSwiftWasmSdk } from "peachsim/swift-toolchain"; installSwiftWasmSdk(${JSON.stringify(release)}, ${JSON.stringify({ wasmSdkId, wasmSdkUrl, wasmSdkChecksum })})`;
|
|
957
|
-
const
|
|
958
|
-
const environment = directory ? `PEACH_SWIFT_SDKS_PATH='${import_node_path.default.resolve(directory).replaceAll("'", "'\\''")}' ` : "";
|
|
975
|
+
const environment = `PEACH_SWIFT_SDKS_PATH='${import_node_path.default.resolve(peachSwiftSdksDir()).replaceAll("'", "'\\''")}' `;
|
|
959
976
|
return `${environment}node --input-type=module -e '${program.replaceAll("'", "'\\''")}'`;
|
|
960
977
|
}
|
|
961
978
|
function swiftInstallSteps(release, wasmSdk) {
|
|
@@ -1021,6 +1038,7 @@ function swiftCompilerInstall(release) {
|
|
|
1021
1038
|
extractSwiftHostCompiler,
|
|
1022
1039
|
installSwiftWasmSdk,
|
|
1023
1040
|
peachHome,
|
|
1041
|
+
peachSwiftSdksDir,
|
|
1024
1042
|
peachsimPackageRoot,
|
|
1025
1043
|
privateSwiftCompilerRelease,
|
|
1026
1044
|
privateSwiftDistributionRoot,
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2192 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|