peachsim 0.1.2432 → 0.1.2433
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 +91 -75
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +54 -17
- 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 -1
- package/dist-lib/host/bridge-host.cjs +91 -75
- package/dist-lib/host/fetch-proxy-handler.cjs +5 -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 +5 -4
- 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 +36 -57
- 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 +5 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- 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 +91 -75
- package/dist-lib/swift-compile.cjs +16 -10
- package/dist-lib/swift-compile.mjs +16 -10
- 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 +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +52 -16
- package/dist-lib/vite.cjs +5 -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/image-loader-canvaskit.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +3 -2
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -1
- package/dist-types/packages/peach-globals/src/cameraInputBridgeContract.d.ts +26 -0
- package/dist-types/packages/peach-globals/src/globalsContract.d.ts +2 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -0
- package/kotlin/README.md +3 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/java-module-abi.ts +11 -28
- package/src/kotlin-host.ts +13 -32
- package/src/kotlin-toolchain.ts +25 -0
- package/src/swift-guest-source-plan.ts +25 -9
- package/src/swift-host.ts +28 -5
- package/src/swift-xcframework.ts +24 -0
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2433 | (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;
|
|
@@ -30811,6 +30811,24 @@ var init_config = __esm({
|
|
|
30811
30811
|
});
|
|
30812
30812
|
|
|
30813
30813
|
// src/kotlin-toolchain.ts
|
|
30814
|
+
async function runKotlinTool(toolchain, sdkRoot, tool, args, maxBuffer = 16 * 1024 * 1024) {
|
|
30815
|
+
const lib = import_node_path9.default.resolve(import_node_path9.default.dirname(toolchain.kotlinc), "../lib");
|
|
30816
|
+
const { stdout } = await run2(
|
|
30817
|
+
import_node_path9.default.join(toolchain.javaHome, "bin", "java"),
|
|
30818
|
+
[
|
|
30819
|
+
"-cp",
|
|
30820
|
+
[
|
|
30821
|
+
import_node_path9.default.join(sdkRoot, "tools.jar"),
|
|
30822
|
+
import_node_path9.default.join(lib, "kotlin-compiler.jar"),
|
|
30823
|
+
import_node_path9.default.join(lib, "kotlin-stdlib.jar")
|
|
30824
|
+
].join(import_node_path9.default.delimiter),
|
|
30825
|
+
tool,
|
|
30826
|
+
...args
|
|
30827
|
+
],
|
|
30828
|
+
{ maxBuffer }
|
|
30829
|
+
);
|
|
30830
|
+
return stdout;
|
|
30831
|
+
}
|
|
30814
30832
|
function readToolchain(moduleRoot) {
|
|
30815
30833
|
const parsed2 = JSON.parse(
|
|
30816
30834
|
import_node_fs13.default.readFileSync(import_node_path9.default.join(moduleRoot, "toolchain.json"), "utf8")
|
|
@@ -71955,6 +71973,17 @@ function swiftPackageLinkage(target) {
|
|
|
71955
71973
|
throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
|
|
71956
71974
|
return linkage;
|
|
71957
71975
|
}
|
|
71976
|
+
function linkEdges(targets, id) {
|
|
71977
|
+
const target = targets.get(id);
|
|
71978
|
+
if (!target) throw new Error(`unknown source target ${id}`);
|
|
71979
|
+
return target.dependencies.flatMap((edge) => {
|
|
71980
|
+
if (edge.attributes.length)
|
|
71981
|
+
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
71982
|
+
const dependency = targets.get(edge.target);
|
|
71983
|
+
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
71984
|
+
return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
|
|
71985
|
+
});
|
|
71986
|
+
}
|
|
71958
71987
|
function guestSourceImages(graph) {
|
|
71959
71988
|
const targets = new Map(graph.targets.map((target) => [target.id, target]));
|
|
71960
71989
|
const entry = targets.get(graph.entry);
|
|
@@ -71978,17 +72007,14 @@ function guestSourceImages(graph) {
|
|
|
71978
72007
|
ownership.set(id, image.id);
|
|
71979
72008
|
image.members.push(id);
|
|
71980
72009
|
active.add(id);
|
|
71981
|
-
for (const edge of
|
|
71982
|
-
if (edge.attributes.length)
|
|
71983
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
72010
|
+
for (const edge of linkEdges(targets, id)) {
|
|
71984
72011
|
const dependency = targets.get(edge.target);
|
|
71985
|
-
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
71986
72012
|
const type = dependency.productType;
|
|
71987
72013
|
let dynamic;
|
|
71988
72014
|
if (type.startsWith("swiftpm.target.")) {
|
|
71989
72015
|
if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
|
|
71990
72016
|
throw new Error(`unsupported SwiftPM target ${edge.target}`);
|
|
71991
|
-
dynamic =
|
|
72017
|
+
dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
|
|
71992
72018
|
} else if (type.startsWith("swiftpm.library.")) {
|
|
71993
72019
|
dynamic = swiftPackageLinkage(dependency) === "dynamic";
|
|
71994
72020
|
} else if (type === "com.apple.product-type.library.static") {
|
|
@@ -72123,9 +72149,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
|
|
|
72123
72149
|
(flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
|
|
72124
72150
|
))
|
|
72125
72151
|
throw new Error(`unsupported special link flag for ${id}`);
|
|
72126
|
-
for (const edge of
|
|
72127
|
-
if (edge.attributes.length)
|
|
72128
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
72152
|
+
for (const edge of linkEdges(targets, id)) {
|
|
72129
72153
|
const dependencyImage = ownerByTarget.get(edge.target);
|
|
72130
72154
|
if (dependencyImage === void 0)
|
|
72131
72155
|
throw new Error(`linked target ${edge.target} has no guest image`);
|
|
@@ -81643,7 +81667,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
81643
81667
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
81644
81668
|
MULTI_MANIFEST_VERSION = 72;
|
|
81645
81669
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
81646
|
-
compilerSourceDigest = true ? "
|
|
81670
|
+
compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
81647
81671
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
81648
81672
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
81649
81673
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -88385,7 +88409,7 @@ var init_swift_standin_digest = __esm({
|
|
|
88385
88409
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
88386
88410
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
88387
88411
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
88388
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
88412
|
+
STANDIN_SOURCE_DIGEST = true ? "edbd6d6714a42d5d22c4d8b74e605e5c897358beb450af3e5605c81299e68531" : standinSourceDigest();
|
|
88389
88413
|
}
|
|
88390
88414
|
});
|
|
88391
88415
|
|
|
@@ -88880,7 +88904,7 @@ __export(expo_native_prebuilt_exports, {
|
|
|
88880
88904
|
servedExpoSwift: () => servedExpoSwift
|
|
88881
88905
|
});
|
|
88882
88906
|
function expoNativeCompilerDigestValue() {
|
|
88883
|
-
return true ? "
|
|
88907
|
+
return true ? "92f2e3795e852982bdccd3a73ae36de137f0eb97ab0ada5e0624f164f9c024b8" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
88884
88908
|
}
|
|
88885
88909
|
function readSources(value) {
|
|
88886
88910
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -89191,6 +89215,28 @@ function simulatorNativeLibrary(dir) {
|
|
|
89191
89215
|
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
89192
89216
|
return matches[0];
|
|
89193
89217
|
}
|
|
89218
|
+
function isDynamicLibrary2(file) {
|
|
89219
|
+
const fd = import_node_fs88.default.openSync(file, "r");
|
|
89220
|
+
try {
|
|
89221
|
+
const read = (offset) => {
|
|
89222
|
+
const bytes = Buffer.alloc(16);
|
|
89223
|
+
import_node_fs88.default.readSync(fd, bytes, 0, 16, offset);
|
|
89224
|
+
return bytes;
|
|
89225
|
+
};
|
|
89226
|
+
let header = read(0);
|
|
89227
|
+
const universal = header.readUInt32BE(0);
|
|
89228
|
+
if (universal === 3405691582 || universal === 3405691583) {
|
|
89229
|
+
const arch = read(8);
|
|
89230
|
+
header = read(
|
|
89231
|
+
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
89232
|
+
);
|
|
89233
|
+
}
|
|
89234
|
+
const magic = header.readUInt32LE(0);
|
|
89235
|
+
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
89236
|
+
} finally {
|
|
89237
|
+
import_node_fs88.default.closeSync(fd);
|
|
89238
|
+
}
|
|
89239
|
+
}
|
|
89194
89240
|
var import_node_fs88, import_node_path87;
|
|
89195
89241
|
var init_swift_xcframework = __esm({
|
|
89196
89242
|
"src/swift-xcframework.ts"() {
|
|
@@ -99418,6 +99464,7 @@ async function swiftPackages(entry, app) {
|
|
|
99418
99464
|
packages,
|
|
99419
99465
|
binaries: packages.binaries,
|
|
99420
99466
|
standins: [],
|
|
99467
|
+
dynamicFrameworks: /* @__PURE__ */ new Map(),
|
|
99421
99468
|
projectGaps: /* @__PURE__ */ new Map()
|
|
99422
99469
|
};
|
|
99423
99470
|
entry.packages = cached4;
|
|
@@ -99497,6 +99544,14 @@ async function swiftPackages(entry, app) {
|
|
|
99497
99544
|
for (const target of new Set(built2.standins.map((standin) => standin.target)))
|
|
99498
99545
|
console.error(`Peach: target ${target} was replaced with a stand-in`);
|
|
99499
99546
|
cached4.standins = built2.standins;
|
|
99547
|
+
const stoodIn = new Set(built2.standins.map((standin) => standin.target));
|
|
99548
|
+
cached4.dynamicFrameworks = new Map(
|
|
99549
|
+
cxxArtifacts.flatMap((binary2) => {
|
|
99550
|
+
if (!stoodIn.has(binary2.target)) return [];
|
|
99551
|
+
const native = simulatorNativeLibrary(swiftBinaryFramework(binary2).dir);
|
|
99552
|
+
return native?.kind === "framework" && isDynamicLibrary2(native.file) ? [[binary2.target, native.name]] : [];
|
|
99553
|
+
})
|
|
99554
|
+
);
|
|
99500
99555
|
cached4.projectGaps = new Map(
|
|
99501
99556
|
vendored.flatMap(({ target }) => {
|
|
99502
99557
|
const gap = built2.gaps.get(target);
|
|
@@ -99556,10 +99611,7 @@ async function buildXcodeLayout(root) {
|
|
|
99556
99611
|
nativeModules: registered.nativeModules
|
|
99557
99612
|
}
|
|
99558
99613
|
);
|
|
99559
|
-
const { packages, standins, projectGaps, binaries } = await swiftPackages(
|
|
99560
|
-
registered,
|
|
99561
|
-
appTarget
|
|
99562
|
-
);
|
|
99614
|
+
const { packages, standins, dynamicFrameworks, projectGaps, binaries } = await swiftPackages(registered, appTarget);
|
|
99563
99615
|
const sourceFrameworks = new Map(
|
|
99564
99616
|
packages.sourceFrameworks.map(
|
|
99565
99617
|
({
|
|
@@ -100163,7 +100215,8 @@ async function buildXcodeLayout(root) {
|
|
|
100163
100215
|
(owner) => owner.module === original.moduleName
|
|
100164
100216
|
)?.products ?? [] : [];
|
|
100165
100217
|
const packageTarget = target.productType.startsWith("swiftpm.");
|
|
100166
|
-
const
|
|
100218
|
+
const binaryFramework = target.productType === "swiftpm.target.binary" ? dynamicFrameworks.get(target.productName) ?? null : null;
|
|
100219
|
+
const packageFramework = target.productType === "swiftpm.library.dynamic" ? target.productName : binaryFramework;
|
|
100167
100220
|
const buildVersion = {
|
|
100168
100221
|
platform: packageTarget ? applicationBuildVersion.platform : target.buildVersion.platform,
|
|
100169
100222
|
minimumOS: target.buildVersion.minimumOS ?? (packageTarget ? applicationBuildVersion.minimumOS : null),
|
|
@@ -100178,6 +100231,7 @@ async function buildXcodeLayout(root) {
|
|
|
100178
100231
|
id: relative6(target.id),
|
|
100179
100232
|
productName: packageFramework === null ? target.productName : `${packageFramework}.framework`,
|
|
100180
100233
|
installName: packageFramework === null ? target.installName : `@rpath/${packageFramework}.framework/${packageFramework}`,
|
|
100234
|
+
machOType: binaryFramework === null ? target.machOType : "mh_dylib",
|
|
100181
100235
|
sourceTarget: target.sourceTarget === null ? first ?? null : original ? frameworkNames.get(original) ?? original.moduleName : target.sourceTarget,
|
|
100182
100236
|
buildVersion,
|
|
100183
100237
|
dependencies: [
|
|
@@ -101720,6 +101774,7 @@ var init_swift_host = __esm({
|
|
|
101720
101774
|
init_swift_standins();
|
|
101721
101775
|
init_swift_submit();
|
|
101722
101776
|
init_swift_toolchain();
|
|
101777
|
+
init_swift_xcframework();
|
|
101723
101778
|
init_swiftContract();
|
|
101724
101779
|
init_swiftContract();
|
|
101725
101780
|
init_xcode_project();
|
|
@@ -112052,7 +112107,7 @@ var init_nitro_superset = __esm({
|
|
|
112052
112107
|
init_nitroContract();
|
|
112053
112108
|
init_swift_standin_digest();
|
|
112054
112109
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
112055
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
112110
|
+
NITRO_COMPILER_DIGEST = true ? "98a615e818fd7ecd108090fffd262f6b9726b3f0350a386bea66b62b3395a63d" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
112056
112111
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
112057
112112
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
112058
112113
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -112744,7 +112799,7 @@ var init_one_sdk_bundle = __esm({
|
|
|
112744
112799
|
var runtime_companion_default;
|
|
112745
112800
|
var init_runtime_companion = __esm({
|
|
112746
112801
|
"runtime-companion.json"() {
|
|
112747
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
112802
|
+
runtime_companion_default = { abi: 1, sha256: "2d42441f509451bf1c660a06ac087056d0cc7d96ca43aead02f6fd91f5e4e367", file: "node/cli-2d42441f509451bf1c660a06ac087056d0cc7d96ca43aead02f6fd91f5e4e367.cjs" };
|
|
112748
112803
|
}
|
|
112749
112804
|
});
|
|
112750
112805
|
|
|
@@ -122621,19 +122676,11 @@ async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
|
|
|
122621
122676
|
import_node_fs138.default.writeFileSync(target, bytes);
|
|
122622
122677
|
origins.set(target, file);
|
|
122623
122678
|
}
|
|
122624
|
-
const
|
|
122625
|
-
|
|
122626
|
-
|
|
122627
|
-
|
|
122628
|
-
|
|
122629
|
-
import_node_path142.default.join(sdkRoot, "tools.jar"),
|
|
122630
|
-
import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-compiler.jar"),
|
|
122631
|
-
import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-stdlib.jar")
|
|
122632
|
-
].join(import_node_path142.default.delimiter),
|
|
122633
|
-
"dev.peach.tools.javaabi.JavaModuleSpecsKt",
|
|
122634
|
-
...origins.keys()
|
|
122635
|
-
],
|
|
122636
|
-
{ maxBuffer: 16 * 1024 * 1024 }
|
|
122679
|
+
const stdout = await runKotlinTool(
|
|
122680
|
+
toolchain,
|
|
122681
|
+
sdkRoot,
|
|
122682
|
+
"dev.peach.tools.javaabi.JavaModuleSpecsKt",
|
|
122683
|
+
[...origins.keys()]
|
|
122637
122684
|
).catch((cause) => {
|
|
122638
122685
|
if (!isRecord(cause) || typeof cause.stderr !== "string") throw cause;
|
|
122639
122686
|
let diagnostic = cause.stderr;
|
|
@@ -122704,20 +122751,11 @@ async function compileJavaModuleAbi(input) {
|
|
|
122704
122751
|
{ maxBuffer: 16 * 1024 * 1024 }
|
|
122705
122752
|
);
|
|
122706
122753
|
const library = import_node_path142.default.join(directory2, "java-abi.klib");
|
|
122707
|
-
await
|
|
122708
|
-
|
|
122709
|
-
|
|
122710
|
-
|
|
122711
|
-
|
|
122712
|
-
import_node_path142.default.join(sdkRoot, "tools.jar"),
|
|
122713
|
-
import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-compiler.jar"),
|
|
122714
|
-
import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-stdlib.jar")
|
|
122715
|
-
].join(import_node_path142.default.delimiter),
|
|
122716
|
-
"dev.peach.tools.platform.JavaPlatformTypesKt",
|
|
122717
|
-
import_node_path142.default.join(directory2, `${name3}.klib`),
|
|
122718
|
-
library
|
|
122719
|
-
],
|
|
122720
|
-
{ maxBuffer: 16 * 1024 * 1024 }
|
|
122754
|
+
await runKotlinTool(
|
|
122755
|
+
toolchain,
|
|
122756
|
+
sdkRoot,
|
|
122757
|
+
"dev.peach.tools.platform.JavaPlatformTypesKt",
|
|
122758
|
+
[import_node_path142.default.join(directory2, `${name3}.klib`), library]
|
|
122721
122759
|
);
|
|
122722
122760
|
return library;
|
|
122723
122761
|
}
|
|
@@ -123457,23 +123495,7 @@ async function scanSources(tool, parse14, toolchain, moduleRoot, files2) {
|
|
|
123457
123495
|
const key2 = digest3.digest("hex");
|
|
123458
123496
|
let scan3 = toolScans.get(key2);
|
|
123459
123497
|
if (!scan3) {
|
|
123460
|
-
scan3 = (
|
|
123461
|
-
const { kotlinc } = await ensureToolchain(toolchain);
|
|
123462
|
-
const { stdout } = await run11(
|
|
123463
|
-
import_node_path146.default.join(import_node_path146.default.dirname(kotlinc), "kotlin"),
|
|
123464
|
-
[
|
|
123465
|
-
"-cp",
|
|
123466
|
-
[
|
|
123467
|
-
import_node_path146.default.resolve(import_node_path146.default.dirname(kotlinc), "../lib/kotlin-compiler.jar"),
|
|
123468
|
-
import_node_path146.default.join(sdk2.root, "tools.jar")
|
|
123469
|
-
].join(import_node_path146.default.delimiter),
|
|
123470
|
-
tool,
|
|
123471
|
-
...files2
|
|
123472
|
-
],
|
|
123473
|
-
{ maxBuffer: 16 * 1024 * 1024 }
|
|
123474
|
-
);
|
|
123475
|
-
return stdout;
|
|
123476
|
-
})().catch((error) => {
|
|
123498
|
+
scan3 = ensureToolchain(toolchain).then((ready) => runKotlinTool(ready, sdk2.root, tool, files2)).catch((error) => {
|
|
123477
123499
|
toolScans.delete(key2);
|
|
123478
123500
|
throw error;
|
|
123479
123501
|
});
|
|
@@ -124230,18 +124252,12 @@ async function compileKotlin(input, origin) {
|
|
|
124230
124252
|
({ file, bytes }) => sources.includes(file) && bytes.includes("ViewModel")
|
|
124231
124253
|
)) {
|
|
124232
124254
|
await compileKlib(import_node_path146.default.join(work, "abi"));
|
|
124233
|
-
const
|
|
124234
|
-
|
|
124235
|
-
|
|
124236
|
-
|
|
124237
|
-
|
|
124238
|
-
|
|
124239
|
-
import_node_path146.default.join(sdk2.root, "tools.jar")
|
|
124240
|
-
].join(import_node_path146.default.delimiter),
|
|
124241
|
-
viewModels.toolClass,
|
|
124242
|
-
import_node_path146.default.join(work, "abi")
|
|
124243
|
-
],
|
|
124244
|
-
{ maxBuffer: 64 * 1024 * 1024 }
|
|
124255
|
+
const stdout = await runKotlinTool(
|
|
124256
|
+
ready,
|
|
124257
|
+
sdk2.root,
|
|
124258
|
+
viewModels.toolClass,
|
|
124259
|
+
[import_node_path146.default.join(work, "abi")],
|
|
124260
|
+
64 * 1024 * 1024
|
|
124245
124261
|
);
|
|
124246
124262
|
import_node_fs142.default.writeFileSync(
|
|
124247
124263
|
import_node_path146.default.join(generatedDir, viewModels.file),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2433 | (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;
|
|
@@ -8466,6 +8466,17 @@ function swiftPackageLinkage(target) {
|
|
|
8466
8466
|
throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
|
|
8467
8467
|
return linkage;
|
|
8468
8468
|
}
|
|
8469
|
+
function linkEdges(targets, id) {
|
|
8470
|
+
const target = targets.get(id);
|
|
8471
|
+
if (!target) throw new Error(`unknown source target ${id}`);
|
|
8472
|
+
return target.dependencies.flatMap((edge) => {
|
|
8473
|
+
if (edge.attributes.length)
|
|
8474
|
+
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
8475
|
+
const dependency = targets.get(edge.target);
|
|
8476
|
+
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
8477
|
+
return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
|
|
8478
|
+
});
|
|
8479
|
+
}
|
|
8469
8480
|
function guestSourceImages(graph) {
|
|
8470
8481
|
const targets = new Map(graph.targets.map((target) => [target.id, target]));
|
|
8471
8482
|
const entry = targets.get(graph.entry);
|
|
@@ -8489,17 +8500,14 @@ function guestSourceImages(graph) {
|
|
|
8489
8500
|
ownership.set(id, image.id);
|
|
8490
8501
|
image.members.push(id);
|
|
8491
8502
|
active.add(id);
|
|
8492
|
-
for (const edge of
|
|
8493
|
-
if (edge.attributes.length)
|
|
8494
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
8503
|
+
for (const edge of linkEdges(targets, id)) {
|
|
8495
8504
|
const dependency = targets.get(edge.target);
|
|
8496
|
-
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
8497
8505
|
const type = dependency.productType;
|
|
8498
8506
|
let dynamic;
|
|
8499
8507
|
if (type.startsWith("swiftpm.target.")) {
|
|
8500
8508
|
if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
|
|
8501
8509
|
throw new Error(`unsupported SwiftPM target ${edge.target}`);
|
|
8502
|
-
dynamic =
|
|
8510
|
+
dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
|
|
8503
8511
|
} else if (type.startsWith("swiftpm.library.")) {
|
|
8504
8512
|
dynamic = swiftPackageLinkage(dependency) === "dynamic";
|
|
8505
8513
|
} else if (type === "com.apple.product-type.library.static") {
|
|
@@ -8634,9 +8642,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
|
|
|
8634
8642
|
(flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
|
|
8635
8643
|
))
|
|
8636
8644
|
throw new Error(`unsupported special link flag for ${id}`);
|
|
8637
|
-
for (const edge of
|
|
8638
|
-
if (edge.attributes.length)
|
|
8639
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
8645
|
+
for (const edge of linkEdges(targets, id)) {
|
|
8640
8646
|
const dependencyImage = ownerByTarget.get(edge.target);
|
|
8641
8647
|
if (dependencyImage === void 0)
|
|
8642
8648
|
throw new Error(`linked target ${edge.target} has no guest image`);
|
|
@@ -14058,7 +14064,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
14058
14064
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
14059
14065
|
var MULTI_MANIFEST_VERSION = 72;
|
|
14060
14066
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
14061
|
-
var compilerSourceDigest = true ? "
|
|
14067
|
+
var compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
14062
14068
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
14063
14069
|
const hash = (0, import_node_crypto15.createHash)("sha256");
|
|
14064
14070
|
hash.update(`swift-compile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2433 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -8420,6 +8420,17 @@ function swiftPackageLinkage(target) {
|
|
|
8420
8420
|
throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
|
|
8421
8421
|
return linkage;
|
|
8422
8422
|
}
|
|
8423
|
+
function linkEdges(targets, id) {
|
|
8424
|
+
const target = targets.get(id);
|
|
8425
|
+
if (!target) throw new Error(`unknown source target ${id}`);
|
|
8426
|
+
return target.dependencies.flatMap((edge) => {
|
|
8427
|
+
if (edge.attributes.length)
|
|
8428
|
+
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
8429
|
+
const dependency = targets.get(edge.target);
|
|
8430
|
+
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
8431
|
+
return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
|
|
8432
|
+
});
|
|
8433
|
+
}
|
|
8423
8434
|
function guestSourceImages(graph) {
|
|
8424
8435
|
const targets = new Map(graph.targets.map((target) => [target.id, target]));
|
|
8425
8436
|
const entry = targets.get(graph.entry);
|
|
@@ -8443,17 +8454,14 @@ function guestSourceImages(graph) {
|
|
|
8443
8454
|
ownership.set(id, image.id);
|
|
8444
8455
|
image.members.push(id);
|
|
8445
8456
|
active.add(id);
|
|
8446
|
-
for (const edge of
|
|
8447
|
-
if (edge.attributes.length)
|
|
8448
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
8457
|
+
for (const edge of linkEdges(targets, id)) {
|
|
8449
8458
|
const dependency = targets.get(edge.target);
|
|
8450
|
-
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
8451
8459
|
const type = dependency.productType;
|
|
8452
8460
|
let dynamic;
|
|
8453
8461
|
if (type.startsWith("swiftpm.target.")) {
|
|
8454
8462
|
if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
|
|
8455
8463
|
throw new Error(`unsupported SwiftPM target ${edge.target}`);
|
|
8456
|
-
dynamic =
|
|
8464
|
+
dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
|
|
8457
8465
|
} else if (type.startsWith("swiftpm.library.")) {
|
|
8458
8466
|
dynamic = swiftPackageLinkage(dependency) === "dynamic";
|
|
8459
8467
|
} else if (type === "com.apple.product-type.library.static") {
|
|
@@ -8588,9 +8596,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
|
|
|
8588
8596
|
(flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
|
|
8589
8597
|
))
|
|
8590
8598
|
throw new Error(`unsupported special link flag for ${id}`);
|
|
8591
|
-
for (const edge of
|
|
8592
|
-
if (edge.attributes.length)
|
|
8593
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
8599
|
+
for (const edge of linkEdges(targets, id)) {
|
|
8594
8600
|
const dependencyImage = ownerByTarget.get(edge.target);
|
|
8595
8601
|
if (dependencyImage === void 0)
|
|
8596
8602
|
throw new Error(`linked target ${edge.target} has no guest image`);
|
|
@@ -14057,7 +14063,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
14057
14063
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
14058
14064
|
var MULTI_MANIFEST_VERSION = 72;
|
|
14059
14065
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
14060
|
-
var compilerSourceDigest = true ? "
|
|
14066
|
+
var compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
14061
14067
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
14062
14068
|
const hash = createHash15("sha256");
|
|
14063
14069
|
hash.update(`swift-compile
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2433 | (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.2433 | (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.2433 | (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;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2433 | (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;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2433 | (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;
|
|
@@ -13558,6 +13558,17 @@ function swiftPackageLinkage(target) {
|
|
|
13558
13558
|
throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
|
|
13559
13559
|
return linkage;
|
|
13560
13560
|
}
|
|
13561
|
+
function linkEdges(targets, id) {
|
|
13562
|
+
const target = targets.get(id);
|
|
13563
|
+
if (!target) throw new Error(`unknown source target ${id}`);
|
|
13564
|
+
return target.dependencies.flatMap((edge) => {
|
|
13565
|
+
if (edge.attributes.length)
|
|
13566
|
+
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
13567
|
+
const dependency = targets.get(edge.target);
|
|
13568
|
+
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
13569
|
+
return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
|
|
13570
|
+
});
|
|
13571
|
+
}
|
|
13561
13572
|
function guestSourceImages(graph) {
|
|
13562
13573
|
const targets = new Map(graph.targets.map((target) => [target.id, target]));
|
|
13563
13574
|
const entry = targets.get(graph.entry);
|
|
@@ -13581,17 +13592,14 @@ function guestSourceImages(graph) {
|
|
|
13581
13592
|
ownership.set(id, image.id);
|
|
13582
13593
|
image.members.push(id);
|
|
13583
13594
|
active.add(id);
|
|
13584
|
-
for (const edge of
|
|
13585
|
-
if (edge.attributes.length)
|
|
13586
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
13595
|
+
for (const edge of linkEdges(targets, id)) {
|
|
13587
13596
|
const dependency = targets.get(edge.target);
|
|
13588
|
-
if (!dependency) throw new Error(`unknown source target ${edge.target}`);
|
|
13589
13597
|
const type = dependency.productType;
|
|
13590
13598
|
let dynamic;
|
|
13591
13599
|
if (type.startsWith("swiftpm.target.")) {
|
|
13592
13600
|
if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
|
|
13593
13601
|
throw new Error(`unsupported SwiftPM target ${edge.target}`);
|
|
13594
|
-
dynamic =
|
|
13602
|
+
dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
|
|
13595
13603
|
} else if (type.startsWith("swiftpm.library.")) {
|
|
13596
13604
|
dynamic = swiftPackageLinkage(dependency) === "dynamic";
|
|
13597
13605
|
} else if (type === "com.apple.product-type.library.static") {
|
|
@@ -13726,9 +13734,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
|
|
|
13726
13734
|
(flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
|
|
13727
13735
|
))
|
|
13728
13736
|
throw new Error(`unsupported special link flag for ${id}`);
|
|
13729
|
-
for (const edge of
|
|
13730
|
-
if (edge.attributes.length)
|
|
13731
|
-
throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
|
|
13737
|
+
for (const edge of linkEdges(targets, id)) {
|
|
13732
13738
|
const dependencyImage = ownerByTarget.get(edge.target);
|
|
13733
13739
|
if (dependencyImage === void 0)
|
|
13734
13740
|
throw new Error(`linked target ${edge.target} has no guest image`);
|
|
@@ -18996,7 +19002,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
18996
19002
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
18997
19003
|
var MULTI_MANIFEST_VERSION = 72;
|
|
18998
19004
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
18999
|
-
var compilerSourceDigest = true ? "
|
|
19005
|
+
var compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
19000
19006
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
19001
19007
|
const hash = (0, import_node_crypto15.createHash)("sha256");
|
|
19002
19008
|
hash.update(`swift-compile
|
|
@@ -34874,7 +34880,7 @@ function sourceClosureDigest(srcDir, entrypoints, excludedFiles) {
|
|
|
34874
34880
|
return hash.digest("hex");
|
|
34875
34881
|
}
|
|
34876
34882
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
34877
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
34883
|
+
var STANDIN_SOURCE_DIGEST = true ? "edbd6d6714a42d5d22c4d8b74e605e5c897358beb450af3e5605c81299e68531" : standinSourceDigest();
|
|
34878
34884
|
|
|
34879
34885
|
// src/swift-standins.ts
|
|
34880
34886
|
var import_node_child_process32 = require("node:child_process");
|
|
@@ -35049,6 +35055,28 @@ function simulatorNativeLibrary(dir) {
|
|
|
35049
35055
|
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
35050
35056
|
return matches[0];
|
|
35051
35057
|
}
|
|
35058
|
+
function isDynamicLibrary(file) {
|
|
35059
|
+
const fd = import_node_fs47.default.openSync(file, "r");
|
|
35060
|
+
try {
|
|
35061
|
+
const read = (offset) => {
|
|
35062
|
+
const bytes = Buffer.alloc(16);
|
|
35063
|
+
import_node_fs47.default.readSync(fd, bytes, 0, 16, offset);
|
|
35064
|
+
return bytes;
|
|
35065
|
+
};
|
|
35066
|
+
let header = read(0);
|
|
35067
|
+
const universal = header.readUInt32BE(0);
|
|
35068
|
+
if (universal === 3405691582 || universal === 3405691583) {
|
|
35069
|
+
const arch = read(8);
|
|
35070
|
+
header = read(
|
|
35071
|
+
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
35072
|
+
);
|
|
35073
|
+
}
|
|
35074
|
+
const magic = header.readUInt32LE(0);
|
|
35075
|
+
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
35076
|
+
} finally {
|
|
35077
|
+
import_node_fs47.default.closeSync(fd);
|
|
35078
|
+
}
|
|
35079
|
+
}
|
|
35052
35080
|
|
|
35053
35081
|
// src/native-static-libraries.ts
|
|
35054
35082
|
var NATIVE_STATIC_LIBRARY_RECIPES = [
|
|
@@ -40658,6 +40686,7 @@ async function swiftPackages(entry, app) {
|
|
|
40658
40686
|
packages,
|
|
40659
40687
|
binaries: packages.binaries,
|
|
40660
40688
|
standins: [],
|
|
40689
|
+
dynamicFrameworks: /* @__PURE__ */ new Map(),
|
|
40661
40690
|
projectGaps: /* @__PURE__ */ new Map()
|
|
40662
40691
|
};
|
|
40663
40692
|
entry.packages = cached;
|
|
@@ -40737,6 +40766,14 @@ async function swiftPackages(entry, app) {
|
|
|
40737
40766
|
for (const target of new Set(built2.standins.map((standin) => standin.target)))
|
|
40738
40767
|
console.error(`Peach: target ${target} was replaced with a stand-in`);
|
|
40739
40768
|
cached.standins = built2.standins;
|
|
40769
|
+
const stoodIn = new Set(built2.standins.map((standin) => standin.target));
|
|
40770
|
+
cached.dynamicFrameworks = new Map(
|
|
40771
|
+
cxxArtifacts.flatMap((binary) => {
|
|
40772
|
+
if (!stoodIn.has(binary.target)) return [];
|
|
40773
|
+
const native = simulatorNativeLibrary(swiftBinaryFramework(binary).dir);
|
|
40774
|
+
return native?.kind === "framework" && isDynamicLibrary(native.file) ? [[binary.target, native.name]] : [];
|
|
40775
|
+
})
|
|
40776
|
+
);
|
|
40740
40777
|
cached.projectGaps = new Map(
|
|
40741
40778
|
vendored.flatMap(({ target }) => {
|
|
40742
40779
|
const gap = built2.gaps.get(target);
|
|
@@ -40800,10 +40837,7 @@ async function buildXcodeLayout(root) {
|
|
|
40800
40837
|
nativeModules: registered.nativeModules
|
|
40801
40838
|
}
|
|
40802
40839
|
);
|
|
40803
|
-
const { packages, standins, projectGaps, binaries } = await swiftPackages(
|
|
40804
|
-
registered,
|
|
40805
|
-
appTarget
|
|
40806
|
-
);
|
|
40840
|
+
const { packages, standins, dynamicFrameworks, projectGaps, binaries } = await swiftPackages(registered, appTarget);
|
|
40807
40841
|
const sourceFrameworks = new Map(
|
|
40808
40842
|
packages.sourceFrameworks.map(
|
|
40809
40843
|
({
|
|
@@ -41407,7 +41441,8 @@ async function buildXcodeLayout(root) {
|
|
|
41407
41441
|
(owner) => owner.module === original.moduleName
|
|
41408
41442
|
)?.products ?? [] : [];
|
|
41409
41443
|
const packageTarget = target.productType.startsWith("swiftpm.");
|
|
41410
|
-
const
|
|
41444
|
+
const binaryFramework = target.productType === "swiftpm.target.binary" ? dynamicFrameworks.get(target.productName) ?? null : null;
|
|
41445
|
+
const packageFramework = target.productType === "swiftpm.library.dynamic" ? target.productName : binaryFramework;
|
|
41411
41446
|
const buildVersion = {
|
|
41412
41447
|
platform: packageTarget ? applicationBuildVersion.platform : target.buildVersion.platform,
|
|
41413
41448
|
minimumOS: target.buildVersion.minimumOS ?? (packageTarget ? applicationBuildVersion.minimumOS : null),
|
|
@@ -41422,6 +41457,7 @@ async function buildXcodeLayout(root) {
|
|
|
41422
41457
|
id: relative2(target.id),
|
|
41423
41458
|
productName: packageFramework === null ? target.productName : `${packageFramework}.framework`,
|
|
41424
41459
|
installName: packageFramework === null ? target.installName : `@rpath/${packageFramework}.framework/${packageFramework}`,
|
|
41460
|
+
machOType: binaryFramework === null ? target.machOType : "mh_dylib",
|
|
41425
41461
|
sourceTarget: target.sourceTarget === null ? first ?? null : original ? frameworkNames.get(original) ?? original.moduleName : target.sourceTarget,
|
|
41426
41462
|
buildVersion,
|
|
41427
41463
|
dependencies: [
|