peachsim 0.1.1990 → 0.1.1992
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/cli/app-catalog.ts +24 -8
- package/cli/commands/package.ts +1 -20
- package/cli/commands/shell-url.ts +16 -18
- 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 +1265 -1264
- 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 +939 -938
- 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 +1392 -1391
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +7 -6
- 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 +56 -56
- 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 +1757 -1749
- package/dist-lib/swift-compile.cjs +242 -244
- package/dist-lib/swift-compile.mjs +58 -60
- 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 +734 -736
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +5 -0
- package/package.json +1 -1
- package/src/expo-native-workspace.ts +14 -7
- package/src/nitro-adapter.lock.json +242 -242
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-distribution.lock.json +23 -60
- package/src/turbo-runtime.lock.json +18 -18
- package/src/wasm-optimize.ts +17 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1992 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -9,7 +9,7 @@ import { createHash as createHash13, randomUUID as randomUUID5 } from "node:cryp
|
|
|
9
9
|
import {
|
|
10
10
|
copyFileSync,
|
|
11
11
|
cpSync,
|
|
12
|
-
existsSync as
|
|
12
|
+
existsSync as existsSync5,
|
|
13
13
|
lstatSync,
|
|
14
14
|
mkdirSync as mkdirSync6,
|
|
15
15
|
mkdtempSync as mkdtempSync3,
|
|
@@ -9839,6 +9839,7 @@ function logicalGuestLinkOptions(args, identities, roots) {
|
|
|
9839
9839
|
}
|
|
9840
9840
|
|
|
9841
9841
|
// src/wasm-optimize.ts
|
|
9842
|
+
import { existsSync } from "node:fs";
|
|
9842
9843
|
import { join as join2 } from "node:path";
|
|
9843
9844
|
|
|
9844
9845
|
// ../contrast-runtime-delivery/src/index.ts
|
|
@@ -10060,7 +10061,7 @@ async function runExtractor(command, args, signal, input) {
|
|
|
10060
10061
|
}
|
|
10061
10062
|
|
|
10062
10063
|
// src/wasm-optimize.ts
|
|
10063
|
-
import {
|
|
10064
|
+
import { BINARYEN_VERSION, wasmOpt } from "wasm-opt";
|
|
10064
10065
|
|
|
10065
10066
|
// src/home-paths.ts
|
|
10066
10067
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -10126,7 +10127,7 @@ async function runWasmOpt(file, output, skipPasses, binary) {
|
|
|
10126
10127
|
"-o",
|
|
10127
10128
|
output
|
|
10128
10129
|
],
|
|
10129
|
-
|
|
10130
|
+
{ env: { ...process.env, WASM_OPT_PATH: binary } }
|
|
10130
10131
|
);
|
|
10131
10132
|
if (result.status !== 0)
|
|
10132
10133
|
throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`);
|
|
@@ -10138,23 +10139,20 @@ async function installWasmOpt() {
|
|
|
10138
10139
|
const release = BINARYEN_RELEASES.get(platform);
|
|
10139
10140
|
if (!release) throw new Error(`no pinned Binaryen release for ${platform}`);
|
|
10140
10141
|
const destDir = join2(rnxHomeDir(), "tools", "binaryen", BINARYEN_VERSION, platform);
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10142
|
+
const binary = join2(destDir, "bin", "wasm-opt");
|
|
10143
|
+
if (!existsSync(binary))
|
|
10144
|
+
await installVerifiedTarball({
|
|
10145
|
+
url: `https://github.com/WebAssembly/binaryen/releases/download/version_${BINARYEN_VERSION}/binaryen-version_${BINARYEN_VERSION}-${release.asset}.tar.gz`,
|
|
10146
|
+
digest: { algorithm: "sha256", encoding: "hex", value: release.sha256 },
|
|
10147
|
+
destDir,
|
|
10148
|
+
installedMarker: "bin/wasm-opt",
|
|
10149
|
+
stripComponents: 1,
|
|
10150
|
+
label: `Binaryen ${BINARYEN_VERSION}`
|
|
10151
|
+
});
|
|
10152
|
+
return binary;
|
|
10150
10153
|
}
|
|
10151
10154
|
async function optimizeWasm(file, output, skipPasses = []) {
|
|
10152
|
-
|
|
10153
|
-
await runWasmOpt(file, output, skipPasses);
|
|
10154
|
-
} catch (error) {
|
|
10155
|
-
if (!(error instanceof BinaryNotFoundError)) throw error;
|
|
10156
|
-
await runWasmOpt(file, output, skipPasses, await installWasmOpt());
|
|
10157
|
-
}
|
|
10155
|
+
await runWasmOpt(file, output, skipPasses, await installWasmOpt());
|
|
10158
10156
|
}
|
|
10159
10157
|
|
|
10160
10158
|
// src/swift-guest-compile.ts
|
|
@@ -10515,7 +10513,7 @@ async function compileGuestLink(options) {
|
|
|
10515
10513
|
// src/swift-icu.ts
|
|
10516
10514
|
import { execFile as execFile2 } from "node:child_process";
|
|
10517
10515
|
import { createHash as createHash11, randomUUID as randomUUID3 } from "node:crypto";
|
|
10518
|
-
import { existsSync, readFileSync as readFileSync12 } from "node:fs";
|
|
10516
|
+
import { existsSync as existsSync2, readFileSync as readFileSync12 } from "node:fs";
|
|
10519
10517
|
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
10520
10518
|
import os4 from "node:os";
|
|
10521
10519
|
import path20 from "node:path";
|
|
@@ -10652,7 +10650,7 @@ function swiftIcuAsset(toolchainBin, sdk) {
|
|
|
10652
10650
|
}
|
|
10653
10651
|
async function load(toolchainBin, sdk) {
|
|
10654
10652
|
const swift = path20.join(toolchainBin, "swift");
|
|
10655
|
-
if (!
|
|
10653
|
+
if (!existsSync2(swift))
|
|
10656
10654
|
throw new Error(`swift-icu: no swift at ${swift} for the ${sdk} SDK's icu data`);
|
|
10657
10655
|
const { stdout: listed } = await run(swift, ["sdk", "list", ...swiftSdkOptions()], {
|
|
10658
10656
|
env: swiftEnvironment()
|
|
@@ -10741,7 +10739,7 @@ function swiftIcuPacked(icu) {
|
|
|
10741
10739
|
"swift-brotli",
|
|
10742
10740
|
swiftIcuAddress(icu)
|
|
10743
10741
|
);
|
|
10744
|
-
if (
|
|
10742
|
+
if (existsSync2(file)) return readFile(file);
|
|
10745
10743
|
const packed = Buffer.from(
|
|
10746
10744
|
swiftIcuPack(
|
|
10747
10745
|
await inflateGzip(icu.gzip),
|
|
@@ -10902,7 +10900,7 @@ function swiftObjCModuleMap(module, headers) {
|
|
|
10902
10900
|
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
10903
10901
|
import {
|
|
10904
10902
|
chmodSync,
|
|
10905
|
-
existsSync as
|
|
10903
|
+
existsSync as existsSync3,
|
|
10906
10904
|
mkdirSync as mkdirSync3,
|
|
10907
10905
|
readdirSync as readdirSync6,
|
|
10908
10906
|
readFileSync as readFileSync13,
|
|
@@ -11367,10 +11365,10 @@ function isSwiftResourceBundles(value) {
|
|
|
11367
11365
|
}
|
|
11368
11366
|
|
|
11369
11367
|
// src/write-build-file.ts
|
|
11370
|
-
import { existsSync as
|
|
11368
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync5, readFileSync as readFileSync15, writeFileSync as writeFileSync6 } from "node:fs";
|
|
11371
11369
|
import path25 from "node:path";
|
|
11372
11370
|
function writeBuildFile(file, contents) {
|
|
11373
|
-
if (
|
|
11371
|
+
if (existsSync4(file) && (typeof contents === "string" ? readFileSync15(file, "utf8") === contents : readFileSync15(file).equals(contents)))
|
|
11374
11372
|
return;
|
|
11375
11373
|
mkdirSync5(path25.dirname(file), { recursive: true });
|
|
11376
11374
|
writeFileSync6(file, contents);
|
|
@@ -11577,7 +11575,7 @@ function swiftBuilderHopTimeoutMs(compileTimeoutMs) {
|
|
|
11577
11575
|
}
|
|
11578
11576
|
function swiftDistributionAt(root) {
|
|
11579
11577
|
const file = path27.join(root, SWIFT_DISTRIBUTION_MANIFEST);
|
|
11580
|
-
if (!
|
|
11578
|
+
if (!existsSync5(file)) return null;
|
|
11581
11579
|
return parseSwiftDistributionManifest(JSON.parse(readFileSync16(file, "utf8")));
|
|
11582
11580
|
}
|
|
11583
11581
|
function swiftModuleInterface(moduleRoot, name2, interfaceRoot) {
|
|
@@ -11586,13 +11584,13 @@ function swiftModuleInterface(moduleRoot, name2, interfaceRoot) {
|
|
|
11586
11584
|
interfaceRoot ?? path27.join(moduleRoot, "modules"),
|
|
11587
11585
|
`${name2}-Swift.h`
|
|
11588
11586
|
);
|
|
11589
|
-
if (!
|
|
11587
|
+
if (!existsSync5(file)) return null;
|
|
11590
11588
|
const header = clangInterfaceHeader(readFileSync16(file, "utf8"));
|
|
11591
11589
|
return { declared: swiftInterfaceDeclarations(header), header };
|
|
11592
11590
|
}
|
|
11593
11591
|
const sources = path27.join(moduleRoot, "Sources", name2);
|
|
11594
11592
|
const built = path27.join(moduleRoot, ".build/host", `${name2}-Swift.h`);
|
|
11595
|
-
if (!
|
|
11593
|
+
if (!existsSync5(sources) || !existsSync5(built)) return null;
|
|
11596
11594
|
const declared = /* @__PURE__ */ new Set();
|
|
11597
11595
|
for (const file of readdirSync8(sources, { recursive: true, encoding: "utf8" }))
|
|
11598
11596
|
if (file.endsWith(".swift"))
|
|
@@ -11769,8 +11767,8 @@ function swiftMacroPlugins(moduleRoot, dir = path27.join(moduleRoot, ".build/hos
|
|
|
11769
11767
|
return {
|
|
11770
11768
|
libraries: plugins.map(({ library }) => library),
|
|
11771
11769
|
executables: [expoPlugin],
|
|
11772
|
-
stale: !
|
|
11773
|
-
({ library, sources }) => !
|
|
11770
|
+
stale: !existsSync5(compilerStamp) || !existsSync5(expoPlugin) || statSync2(pluginScript).mtimeMs > statSync2(expoPlugin).mtimeMs || readFileSync16(compilerStamp, "utf8").trim() !== release || plugins.some(
|
|
11771
|
+
({ library, sources }) => !existsSync5(library) || sources.some((source) => statSync2(source).mtimeMs > statSync2(library).mtimeMs)
|
|
11774
11772
|
)
|
|
11775
11773
|
};
|
|
11776
11774
|
}
|
|
@@ -11818,7 +11816,7 @@ function swiftModuleDigest(root) {
|
|
|
11818
11816
|
"swift-module-digests",
|
|
11819
11817
|
`${createHash13("sha256").update(root).digest("hex")}.json`
|
|
11820
11818
|
);
|
|
11821
|
-
if (
|
|
11819
|
+
if (existsSync5(record)) {
|
|
11822
11820
|
const saved = JSON.parse(readFileSync16(record, "utf8"));
|
|
11823
11821
|
if (saved && typeof saved === "object" && Reflect.get(saved, "stamp") === stamp && typeof Reflect.get(saved, "digest") === "string") {
|
|
11824
11822
|
const digest2 = Buffer.from(String(Reflect.get(saved, "digest")), "hex");
|
|
@@ -12149,13 +12147,13 @@ function swiftOverlayFrameworks(moduleRoot, toolchainBin) {
|
|
|
12149
12147
|
);
|
|
12150
12148
|
for (const entry of readdirSync8(resources)) {
|
|
12151
12149
|
const map = path27.join(resources, entry, "module.modulemap");
|
|
12152
|
-
if (
|
|
12150
|
+
if (existsSync5(map))
|
|
12153
12151
|
addSwiftOverlayFrameworks(readFileSync16(map, "utf8"), swiftModules, result);
|
|
12154
12152
|
}
|
|
12155
12153
|
for (const directory of frameworks)
|
|
12156
12154
|
for (const entry of readdirSync8(directory)) {
|
|
12157
12155
|
const map = path27.join(directory, entry, "Modules/module.modulemap");
|
|
12158
|
-
if (
|
|
12156
|
+
if (existsSync5(map))
|
|
12159
12157
|
addSwiftOverlayFrameworks(readFileSync16(map, "utf8"), swiftModules, result);
|
|
12160
12158
|
}
|
|
12161
12159
|
sdkOverlayFrameworks.set(key, result);
|
|
@@ -12179,7 +12177,7 @@ function swiftAvailableModules(moduleRoot, toolchainBin) {
|
|
|
12179
12177
|
})
|
|
12180
12178
|
]);
|
|
12181
12179
|
for (const map of maps) {
|
|
12182
|
-
if (!
|
|
12180
|
+
if (!existsSync5(map)) continue;
|
|
12183
12181
|
const contents = readFileSync16(map, "utf8");
|
|
12184
12182
|
for (const match of contents.matchAll(
|
|
12185
12183
|
/^(?:explicit\s+)?(?:framework\s+)?module\s+([A-Za-z_]\w*)/gm
|
|
@@ -12194,7 +12192,7 @@ function swiftAvailableModules(moduleRoot, toolchainBin) {
|
|
|
12194
12192
|
}
|
|
12195
12193
|
for (const entry of readdirSync8(resources)) {
|
|
12196
12194
|
const map = path27.join(resources, entry, "module.modulemap");
|
|
12197
|
-
if (!
|
|
12195
|
+
if (!existsSync5(map)) continue;
|
|
12198
12196
|
for (const match of readFileSync16(map, "utf8").matchAll(/^module\s+([A-Za-z_]\w*)/gm))
|
|
12199
12197
|
modules.add(match[1]);
|
|
12200
12198
|
}
|
|
@@ -12215,7 +12213,7 @@ function swiftAvailableModules(moduleRoot, toolchainBin) {
|
|
|
12215
12213
|
for (const directory of frameworks) {
|
|
12216
12214
|
for (const entry of readdirSync8(directory)) {
|
|
12217
12215
|
const map = path27.join(directory, entry, "Modules/module.modulemap");
|
|
12218
|
-
if (!
|
|
12216
|
+
if (!existsSync5(map)) continue;
|
|
12219
12217
|
for (const match of readFileSync16(map, "utf8").matchAll(
|
|
12220
12218
|
/^framework\s+module\s+([A-Za-z_]\w*)/gm
|
|
12221
12219
|
))
|
|
@@ -12272,7 +12270,7 @@ function providedModulesPath(root, modules, excluded) {
|
|
|
12272
12270
|
const key = createHash13("sha256").update(JSON.stringify([modules, entries])).update([...excluded].sort().join("\0")).digest("hex").slice(0, 16);
|
|
12273
12271
|
const directory = path27.join(root, `.peach-modules-${key}`);
|
|
12274
12272
|
const complete = path27.join(directory, ".complete");
|
|
12275
|
-
if (!
|
|
12273
|
+
if (!existsSync5(complete)) {
|
|
12276
12274
|
mkdirSync6(directory, { recursive: true });
|
|
12277
12275
|
for (const entry of readdirSync8(directory))
|
|
12278
12276
|
rmSync6(path27.join(directory, entry), { recursive: true, force: true });
|
|
@@ -14288,7 +14286,7 @@ function prepareSwiftDependency(source, destination, overlayFrameworks) {
|
|
|
14288
14286
|
};
|
|
14289
14287
|
gather(source);
|
|
14290
14288
|
const manifest = path27.join(source, "Package.swift");
|
|
14291
|
-
const targets =
|
|
14289
|
+
const targets = existsSync5(manifest) ? swiftManifestTargets(readFileSync16(manifest, "utf8")) : [];
|
|
14292
14290
|
let dependencyOverlays;
|
|
14293
14291
|
const compiled = compiledSwiftSources(origins, targets, () => {
|
|
14294
14292
|
if (dependencyOverlays) return dependencyOverlays;
|
|
@@ -14339,10 +14337,10 @@ function clangImportModuleMapFlags(settings, layoutRoot, written, generated) {
|
|
|
14339
14337
|
const directory = path27.join(layoutRoot, ".build", "peach-clang-modulemaps");
|
|
14340
14338
|
return (settings.moduleMaps ?? []).flatMap((map) => {
|
|
14341
14339
|
const headers = path27.join(layoutRoot, map.headers);
|
|
14342
|
-
if (!
|
|
14340
|
+
if (!existsSync5(headers)) return [];
|
|
14343
14341
|
const published = path27.join(headers, "module.modulemap");
|
|
14344
|
-
if (searched.has(map.headers) &&
|
|
14345
|
-
if (!searched.has(map.headers) &&
|
|
14342
|
+
if (searched.has(map.headers) && existsSync5(published)) return [];
|
|
14343
|
+
if (!searched.has(map.headers) && existsSync5(published))
|
|
14346
14344
|
return [`-fmodule-map-file=${published}`];
|
|
14347
14345
|
const cached = written.get(headers);
|
|
14348
14346
|
if (cached) return [cached];
|
|
@@ -14460,7 +14458,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
|
|
|
14460
14458
|
}
|
|
14461
14459
|
const headerDirectory = path27.join(layout2.root, ".build", "peach-cxx-headers");
|
|
14462
14460
|
const flattenedHeaders = /* @__PURE__ */ new Set();
|
|
14463
|
-
if (
|
|
14461
|
+
if (existsSync5(headerDirectory)) {
|
|
14464
14462
|
for (const entry of readdirSync8(headerDirectory, { withFileTypes: true }))
|
|
14465
14463
|
if (entry.isDirectory() && !targets.some((target) => target.name === entry.name))
|
|
14466
14464
|
rmSync6(path27.join(headerDirectory, entry.name), { recursive: true, force: true });
|
|
@@ -15445,7 +15443,7 @@ module ${moduleName}.Swift {
|
|
|
15445
15443
|
const reachesFrameworks = !distribution || swiftImportedModules.has("Foundation") || Object.entries(input.files).some(
|
|
15446
15444
|
([file, source]) => file.endsWith(".swift") && file !== input.entry && file !== "Package.swift" || /\.mm?$/.test(file) || source.includes("dispatch_")
|
|
15447
15445
|
) || [...importedModules].some(
|
|
15448
|
-
(name2) => distribution.modules.includes(name2) && !targets.some((target) => target.name === name2) && !(clangImportedModules.has(name2) && !swiftImportedModules.has(name2) &&
|
|
15446
|
+
(name2) => distribution.modules.includes(name2) && !targets.some((target) => target.name === name2) && !(clangImportedModules.has(name2) && !swiftImportedModules.has(name2) && existsSync5(
|
|
15449
15447
|
path27.join(swiftSharedSdkRoot(moduleRoot, true), "usr/include", name2)
|
|
15450
15448
|
))
|
|
15451
15449
|
);
|
|
@@ -15945,10 +15943,10 @@ ${dependencies}
|
|
|
15945
15943
|
const sourceDir = path27.join(linkRoot, "Sources", FRAMEWORK_LINK_TARGET);
|
|
15946
15944
|
mkdirSync6(sourceDir, { recursive: true });
|
|
15947
15945
|
const manifestPath = path27.join(linkRoot, "Package.swift");
|
|
15948
|
-
if (!
|
|
15946
|
+
if (!existsSync5(manifestPath) || readFileSync16(manifestPath, "utf8") !== manifest)
|
|
15949
15947
|
writeFileSync7(manifestPath, manifest);
|
|
15950
15948
|
const source = path27.join(sourceDir, "Link.swift");
|
|
15951
|
-
if (!
|
|
15949
|
+
if (!existsSync5(source)) writeFileSync7(source, "");
|
|
15952
15950
|
}
|
|
15953
15951
|
function frameworkLinkClosure(scratch2, roots) {
|
|
15954
15952
|
const suffix = `${WASM_TRIPLE}-release`;
|
|
@@ -16023,7 +16021,7 @@ function frameworkLinkClosure(scratch2, roots) {
|
|
|
16023
16021
|
owners.set(file, name2);
|
|
16024
16022
|
if (seen.has(file)) continue;
|
|
16025
16023
|
seen.add(file);
|
|
16026
|
-
if (!
|
|
16024
|
+
if (!existsSync5(file))
|
|
16027
16025
|
throw new Error(`swift-compile: framework object ${file} was not built`);
|
|
16028
16026
|
files.push(file);
|
|
16029
16027
|
}
|
|
@@ -16033,7 +16031,7 @@ function frameworkLinkClosure(scratch2, roots) {
|
|
|
16033
16031
|
return { objects: files, owners, modules, moduleMaps: [...maps].sort() };
|
|
16034
16032
|
}
|
|
16035
16033
|
function removeCaseCollidingModuleArtifacts(modulesDir, keep) {
|
|
16036
|
-
if (!
|
|
16034
|
+
if (!existsSync5(modulesDir)) return;
|
|
16037
16035
|
const folded = new Set([...keep].map((name2) => name2.toLowerCase()));
|
|
16038
16036
|
for (const name2 of readdirSync8(modulesDir)) {
|
|
16039
16037
|
const dot = name2.indexOf(".");
|
|
@@ -16105,7 +16103,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16105
16103
|
const objects = linked.objects;
|
|
16106
16104
|
if (linked.modules.has("UniformTypeIdentifiers")) {
|
|
16107
16105
|
const object3 = path27.join(scratch2, "UniformTypeIdentifiers-NativeConstants.o");
|
|
16108
|
-
if (!
|
|
16106
|
+
if (!existsSync5(object3)) {
|
|
16109
16107
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
16110
16108
|
compileUniformTypeConstants({
|
|
16111
16109
|
bin: args.toolchainBin,
|
|
@@ -16140,7 +16138,7 @@ async function buildFrameworkProducts(scratch2, args) {
|
|
|
16140
16138
|
}
|
|
16141
16139
|
const providerDir = path27.join(scratch2, "darwin-records");
|
|
16142
16140
|
const providerStamp = path27.join(providerDir, ".complete");
|
|
16143
|
-
if (!
|
|
16141
|
+
if (!existsSync5(providerStamp) || readFileSync16(providerStamp, "utf8") !== args.frameworkKey) {
|
|
16144
16142
|
rmSync6(providerDir, { recursive: true, force: true });
|
|
16145
16143
|
mkdirSync6(providerDir);
|
|
16146
16144
|
const sdkPaths2 = swiftSdkPaths(args.moduleRoot, args.toolchainBin);
|
|
@@ -16270,7 +16268,7 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
|
|
|
16270
16268
|
if (!file.startsWith("../")) continue;
|
|
16271
16269
|
const from = path27.resolve(moduleRoot, file);
|
|
16272
16270
|
const to = path27.resolve(stagedModule, file);
|
|
16273
|
-
if (
|
|
16271
|
+
if (existsSync5(to) && readFileSync16(from).equals(readFileSync16(to))) continue;
|
|
16274
16272
|
mkdirSync6(path27.dirname(to), { recursive: true });
|
|
16275
16273
|
copyFileSync(from, to);
|
|
16276
16274
|
}
|
|
@@ -16278,7 +16276,7 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
|
|
|
16278
16276
|
throw new Error("Swift staged framework source differs from the caller");
|
|
16279
16277
|
const modules = path27.join(staged, "node_modules");
|
|
16280
16278
|
const target = realpathSync5(path27.join(moduleRoot, "../../node_modules"));
|
|
16281
|
-
if (!
|
|
16279
|
+
if (!existsSync5(modules) || readlinkSync(modules) !== target) {
|
|
16282
16280
|
rmSync6(modules, { recursive: true, force: true });
|
|
16283
16281
|
symlinkSync2(target, modules);
|
|
16284
16282
|
}
|
|
@@ -16331,7 +16329,7 @@ function retireStaleSwiftLink(root, stamp) {
|
|
|
16331
16329
|
writeFileSync7(receipt, `${stamp}
|
|
16332
16330
|
`);
|
|
16333
16331
|
const retired = path27.join(root, ".build");
|
|
16334
|
-
if (previous === stamp || !
|
|
16332
|
+
if (previous === stamp || !existsSync5(retired)) return false;
|
|
16335
16333
|
rmSync6(retired, { recursive: true, force: true });
|
|
16336
16334
|
return true;
|
|
16337
16335
|
}
|
|
@@ -16444,7 +16442,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16444
16442
|
return retain(root, built);
|
|
16445
16443
|
}
|
|
16446
16444
|
const swift = path27.join(options.toolchainBin, "swift");
|
|
16447
|
-
if (!
|
|
16445
|
+
if (!existsSync5(swift)) {
|
|
16448
16446
|
throw new Error(
|
|
16449
16447
|
`swift-compile: no swift.org toolchain at ${options.toolchainBin}; install ${options.release} and its matching wasm sdk`
|
|
16450
16448
|
);
|
|
@@ -16519,7 +16517,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16519
16517
|
writeSwiftAutolinkLinker(
|
|
16520
16518
|
root,
|
|
16521
16519
|
options.toolchainBin,
|
|
16522
|
-
|
|
16520
|
+
existsSync5(productFile) ? [
|
|
16523
16521
|
v5.parse(
|
|
16524
16522
|
swiftFrameworkProductSchema,
|
|
16525
16523
|
JSON.parse(readFileSync16(productFile, "utf8"))
|
|
@@ -16593,7 +16591,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16593
16591
|
const linked = builtArtifact(layout2);
|
|
16594
16592
|
if (input.optimize) {
|
|
16595
16593
|
rmSync6(path27.join(root, ".peach-link.rsp"), { force: true });
|
|
16596
|
-
if (
|
|
16594
|
+
if (existsSync5(linked) && statSync2(linked).size <= 8)
|
|
16597
16595
|
rmSync6(linked, { force: true });
|
|
16598
16596
|
}
|
|
16599
16597
|
report("compiling and linking Swift modules");
|
|
@@ -16620,7 +16618,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16620
16618
|
`${producer}-Swift.h`
|
|
16621
16619
|
);
|
|
16622
16620
|
const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
|
|
16623
|
-
if (
|
|
16621
|
+
if (existsSync5(original))
|
|
16624
16622
|
writeBuildFile(
|
|
16625
16623
|
emitted,
|
|
16626
16624
|
withoutSwiftDeclarations(
|
|
@@ -16646,7 +16644,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16646
16644
|
checkpoints,
|
|
16647
16645
|
createHash13("sha256").update(target).digest("hex")
|
|
16648
16646
|
);
|
|
16649
|
-
if (
|
|
16647
|
+
if (existsSync5(checkpoint)) continue;
|
|
16650
16648
|
await runCompiler(
|
|
16651
16649
|
swift,
|
|
16652
16650
|
[...buildArgs, "--target", target],
|
|
@@ -16672,7 +16670,7 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16672
16670
|
"release",
|
|
16673
16671
|
"ModuleCache"
|
|
16674
16672
|
);
|
|
16675
|
-
if (output2.includes("was compiled with module cache path") &&
|
|
16673
|
+
if (output2.includes("was compiled with module cache path") && existsSync5(moduleCache)) {
|
|
16676
16674
|
rmSync6(moduleCache, { recursive: true, force: true });
|
|
16677
16675
|
try {
|
|
16678
16676
|
await runCompiler(
|
|
@@ -16703,9 +16701,9 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
16703
16701
|
if (options.project) endSwiftProjectProcesses(options.project);
|
|
16704
16702
|
}
|
|
16705
16703
|
if (unprepared.length) throw new Error(unprepared.join("\n"));
|
|
16706
|
-
if (!
|
|
16704
|
+
if (!existsSync5(linked)) {
|
|
16707
16705
|
const binDir = path27.dirname(linked);
|
|
16708
|
-
const found =
|
|
16706
|
+
const found = existsSync5(binDir) ? readdirSync8(binDir).filter((name2) => name2.endsWith(".wasm")).sort() : [];
|
|
16709
16707
|
throw new Error(
|
|
16710
16708
|
`swift-compile: the build produced no ${path27.basename(linked)} (found: ${found.join(", ") || "none"})`
|
|
16711
16709
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1992 | (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.1992 | (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.1992 | (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.1992 | (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;
|