peachsim 0.1.2238 → 0.1.2242
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/bridge-flow-runner.ts +10 -9
- package/cli/commands/inspect/settling.ts +491 -506
- package/cli/commands/platform.ts +2 -0
- package/cli/drivers/playwright-provisioning.ts +160 -37
- package/cli/internal-child.ts +5 -79
- 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 +115 -89
- 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 +494 -510
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +101 -75
- 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 +119 -93
- 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 +492 -508
- 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 +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +7 -8
- 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 +487 -503
- package/dist-lib/sdk.mjs +487 -503
- package/dist-lib/skills.cjs +1327 -1235
- package/dist-lib/swift-compile.cjs +46 -27
- package/dist-lib/swift-compile.mjs +42 -23
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +89 -64
- 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 +1 -0
- package/dist-types/packages/peach-engine/src/engine/secureItemHostContract.d.ts +5 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +14 -0
- package/dist-types/packages/peach-globals/src/nativeSurfaceContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/secure-item-store.d.ts +2 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/native-static-libraries.ts +20 -20
- package/src/native-swift-slices.ts +1 -0
- package/src/nitro-adapter.lock.json +253 -253
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +10 -3
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-host.ts +2 -1
- package/src/swift-shared-sdk.ts +10 -1
- package/src/swift-standins.ts +5 -2
- package/src/swift-submit.ts +3 -1
- package/src/swift-wasm-prune.ts +23 -14
- package/src/turbo-runtime.lock.json +22 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (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;
|
|
@@ -98,7 +98,7 @@ module.exports = __toCommonJS(swift_compile_exports);
|
|
|
98
98
|
var import_node_child_process19 = require("node:child_process");
|
|
99
99
|
var import_node_crypto13 = require("node:crypto");
|
|
100
100
|
var import_node_fs25 = require("node:fs");
|
|
101
|
-
var
|
|
101
|
+
var import_node_os10 = __toESM(require("node:os"), 1);
|
|
102
102
|
var import_node_path27 = __toESM(require("node:path"), 1);
|
|
103
103
|
var v5 = __toESM(require("valibot"), 1);
|
|
104
104
|
|
|
@@ -4025,6 +4025,9 @@ function readULEB(b, o) {
|
|
|
4025
4025
|
return [res, p];
|
|
4026
4026
|
}
|
|
4027
4027
|
var WEAKEN_FOUNDATION_SYMS = /* @__PURE__ */ new Set([
|
|
4028
|
+
"$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZ",
|
|
4029
|
+
"$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZ",
|
|
4030
|
+
"$s10Foundation6BundleC22preferredLocalizationsSaySSGvg",
|
|
4028
4031
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_SbtcfC",
|
|
4029
4032
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_Sbtcfc",
|
|
4030
4033
|
"$s10Foundation16NSSortDescriptorC3keySSSgvg",
|
|
@@ -4127,7 +4130,7 @@ function weakenFoundationOverridesInArchive(arBuf) {
|
|
|
4127
4130
|
} else if (name2.endsWith("/")) {
|
|
4128
4131
|
name2 = name2.slice(0, -1);
|
|
4129
4132
|
}
|
|
4130
|
-
if (name2.endsWith("NSSortDescriptor.o")) {
|
|
4133
|
+
if (name2.endsWith("Bundle.o") || name2.endsWith("NSSortDescriptor.o")) {
|
|
4131
4134
|
weakenFoundationSymbolsInWasmObj(arBuf.subarray(bodyStart, bodyEnd));
|
|
4132
4135
|
}
|
|
4133
4136
|
pos = bodyEnd + (size & 1);
|
|
@@ -4181,6 +4184,10 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4181
4184
|
const overlayFiles = (0, import_node_fs7.readdirSync)(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path8.default.join(entry.parentPath, entry.name)).sort();
|
|
4182
4185
|
const key = JSON.stringify([
|
|
4183
4186
|
"v23",
|
|
4187
|
+
[...WEAKEN_FOUNDATION_SYMS],
|
|
4188
|
+
readULEB.toString(),
|
|
4189
|
+
weakenFoundationSymbolsInWasmObj.toString(),
|
|
4190
|
+
weakenFoundationOverridesInArchive.toString(),
|
|
4184
4191
|
toolchainBin,
|
|
4185
4192
|
sdk,
|
|
4186
4193
|
frameworks,
|
|
@@ -4826,7 +4833,6 @@ var import_node_path11 = __toESM(require("node:path"), 1);
|
|
|
4826
4833
|
var import_node_child_process8 = require("node:child_process");
|
|
4827
4834
|
var import_node_crypto5 = require("node:crypto");
|
|
4828
4835
|
var import_node_fs9 = __toESM(require("node:fs"), 1);
|
|
4829
|
-
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
4830
4836
|
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
4831
4837
|
var v2 = __toESM(require("valibot"), 1);
|
|
4832
4838
|
|
|
@@ -5652,10 +5658,6 @@ function guestWasmSymbols(bytes) {
|
|
|
5652
5658
|
]
|
|
5653
5659
|
};
|
|
5654
5660
|
}
|
|
5655
|
-
function peachHome2() {
|
|
5656
|
-
const override = process.env.PEACH_HOME;
|
|
5657
|
-
return override ? import_node_path10.default.resolve(override) : import_node_path10.default.join(import_node_os5.default.homedir(), ".peach");
|
|
5658
|
-
}
|
|
5659
5661
|
function sdkObjectName(archive, member, ordinal) {
|
|
5660
5662
|
const base = archive.replace(/\.a$/, "");
|
|
5661
5663
|
const suffix = ordinal > 1 ? `_${ordinal}` : "";
|
|
@@ -5710,13 +5712,18 @@ function swiftPrunedSdkObjectOrigins(sdk, args, rewritten) {
|
|
|
5710
5712
|
);
|
|
5711
5713
|
}
|
|
5712
5714
|
function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
5713
|
-
const
|
|
5714
|
-
const
|
|
5715
|
+
const archives = import_node_fs9.default.readdirSync(sdkWasiDir).filter((file) => file.endsWith(".a")).sort();
|
|
5716
|
+
const hash = (0, import_node_crypto5.createHash)("sha256");
|
|
5717
|
+
for (const archive of archives) {
|
|
5718
|
+
hash.update(archive + "\0");
|
|
5719
|
+
hash.update(swiftFileChecksum(import_node_path10.default.join(sdkWasiDir, archive)));
|
|
5720
|
+
}
|
|
5721
|
+
const sdkKey = hash.digest("hex");
|
|
5722
|
+
const outDir = import_node_path10.default.join(swiftCacheDir(), "swift-builds", `sdk-objs-${sdkKey}`);
|
|
5715
5723
|
const stamp = import_node_path10.default.join(outDir, ".complete");
|
|
5716
5724
|
if (import_node_fs9.default.existsSync(stamp)) return outDir;
|
|
5717
5725
|
const tmpDir = `${outDir}.${process.pid}.${Date.now()}.tmp`;
|
|
5718
5726
|
import_node_fs9.default.mkdirSync(tmpDir, { recursive: true });
|
|
5719
|
-
const archives = import_node_fs9.default.readdirSync(sdkWasiDir).filter((f) => f.endsWith(".a")).sort();
|
|
5720
5727
|
for (const archive of archives) {
|
|
5721
5728
|
const members = readArMembers(
|
|
5722
5729
|
new Uint8Array(import_node_fs9.default.readFileSync(import_node_path10.default.join(sdkWasiDir, archive)))
|
|
@@ -5735,8 +5742,12 @@ function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
|
5735
5742
|
import_node_fs9.default.rmSync(tmpDir, { recursive: true, force: true });
|
|
5736
5743
|
return outDir;
|
|
5737
5744
|
}
|
|
5738
|
-
|
|
5739
|
-
|
|
5745
|
+
try {
|
|
5746
|
+
import_node_fs9.default.renameSync(tmpDir, outDir);
|
|
5747
|
+
} catch (error) {
|
|
5748
|
+
if (!import_node_fs9.default.existsSync(stamp)) throw error;
|
|
5749
|
+
import_node_fs9.default.rmSync(tmpDir, { recursive: true, force: true });
|
|
5750
|
+
}
|
|
5740
5751
|
return outDir;
|
|
5741
5752
|
}
|
|
5742
5753
|
function isPrunableSdkFile(file) {
|
|
@@ -6240,6 +6251,11 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
6240
6251
|
if (def) activateSymbolInObj(def.obj, def.symIdx);
|
|
6241
6252
|
}
|
|
6242
6253
|
const WEAKEN_SDK_FOUNDATION_SYMS = /* @__PURE__ */ new Set([
|
|
6254
|
+
"$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZ",
|
|
6255
|
+
"$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZ",
|
|
6256
|
+
"$s10Foundation6BundleC22preferredLocalizationsSaySSGvg",
|
|
6257
|
+
"$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZTf4nnd_n",
|
|
6258
|
+
"$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZTf4nd_n",
|
|
6243
6259
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_SbtcfC",
|
|
6244
6260
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_Sbtcfc",
|
|
6245
6261
|
"$s10Foundation16NSSortDescriptorC3keySSSgvg",
|
|
@@ -10056,7 +10072,7 @@ var import_node_util = require("node:util");
|
|
|
10056
10072
|
var import_node_child_process12 = require("node:child_process");
|
|
10057
10073
|
var import_node_crypto10 = __toESM(require("node:crypto"), 1);
|
|
10058
10074
|
var import_node_fs15 = __toESM(require("node:fs"), 1);
|
|
10059
|
-
var
|
|
10075
|
+
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
10060
10076
|
var import_node_path16 = __toESM(require("node:path"), 1);
|
|
10061
10077
|
var import_node_stream2 = require("node:stream");
|
|
10062
10078
|
var import_promises3 = require("node:stream/promises");
|
|
@@ -10098,7 +10114,7 @@ function lockOwnerGone(lock) {
|
|
|
10098
10114
|
async function installVerifiedTarballLocked(tarball, presentAtStart) {
|
|
10099
10115
|
const { url, digest, destDir, installedMarker, label, signal } = tarball;
|
|
10100
10116
|
signal?.throwIfAborted();
|
|
10101
|
-
const downloadDir = import_node_fs15.default.mkdtempSync(import_node_path16.default.join(
|
|
10117
|
+
const downloadDir = import_node_fs15.default.mkdtempSync(import_node_path16.default.join(import_node_os5.default.tmpdir(), "runtime-delivery-download-"));
|
|
10102
10118
|
const archivePath = import_node_path16.default.join(downloadDir, "archive");
|
|
10103
10119
|
const tmpDir = import_node_fs15.default.mkdtempSync(
|
|
10104
10120
|
import_node_path16.default.join(import_node_path16.default.dirname(destDir), `.installing-${import_node_path16.default.basename(destDir)}-`)
|
|
@@ -10268,11 +10284,11 @@ async function runExtractor(command, args, signal, input) {
|
|
|
10268
10284
|
var import_wasm_opt = require("wasm-opt");
|
|
10269
10285
|
|
|
10270
10286
|
// src/home-paths.ts
|
|
10271
|
-
var
|
|
10287
|
+
var import_node_os6 = require("node:os");
|
|
10272
10288
|
var import_node_path17 = __toESM(require("node:path"), 1);
|
|
10273
10289
|
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
10274
10290
|
function ambientHomeDir() {
|
|
10275
|
-
return import_node_path17.default.join((0,
|
|
10291
|
+
return import_node_path17.default.join((0, import_node_os6.homedir)(), ".peach");
|
|
10276
10292
|
}
|
|
10277
10293
|
function rnxHomeDir() {
|
|
10278
10294
|
const override = process.env[PEACH_HOME_ENV];
|
|
@@ -10995,7 +11011,7 @@ var import_node_child_process15 = require("node:child_process");
|
|
|
10995
11011
|
var import_node_crypto11 = require("node:crypto");
|
|
10996
11012
|
var import_node_fs18 = require("node:fs");
|
|
10997
11013
|
var import_promises4 = require("node:fs/promises");
|
|
10998
|
-
var
|
|
11014
|
+
var import_node_os7 = __toESM(require("node:os"), 1);
|
|
10999
11015
|
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
11000
11016
|
var import_node_util2 = require("node:util");
|
|
11001
11017
|
var import_node_zlib2 = require("node:zlib");
|
|
@@ -11069,7 +11085,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
11069
11085
|
const cacheId = `${quality}:${key}`;
|
|
11070
11086
|
const cached = brotliMemoryCache.get(cacheId);
|
|
11071
11087
|
if (cached) return cached;
|
|
11072
|
-
const dir = import_node_path20.default.join(
|
|
11088
|
+
const dir = import_node_path20.default.join(import_node_os7.default.homedir(), ".peach", "cache", "swift-brotli");
|
|
11073
11089
|
const file = import_node_path20.default.join(dir, `${key}${quality === 11 ? "" : "-q4"}.br`);
|
|
11074
11090
|
let compressed;
|
|
11075
11091
|
try {
|
|
@@ -11207,7 +11223,7 @@ var packedFiles = /* @__PURE__ */ new Map();
|
|
|
11207
11223
|
function swiftIcuPacked(icu) {
|
|
11208
11224
|
return memo(packedFiles, icu.sha256, async () => {
|
|
11209
11225
|
const file = import_node_path20.default.join(
|
|
11210
|
-
|
|
11226
|
+
import_node_os7.default.homedir(),
|
|
11211
11227
|
".peach",
|
|
11212
11228
|
"cache",
|
|
11213
11229
|
"swift-brotli",
|
|
@@ -11451,9 +11467,9 @@ function removeProjectLinks(root) {
|
|
|
11451
11467
|
|
|
11452
11468
|
// src/swift-reproducible.ts
|
|
11453
11469
|
var import_node_fs21 = require("node:fs");
|
|
11454
|
-
var
|
|
11470
|
+
var import_node_os8 = __toESM(require("node:os"), 1);
|
|
11455
11471
|
function swiftReproducibleBuildFlags(roots) {
|
|
11456
|
-
return [[
|
|
11472
|
+
return [[import_node_os8.default.homedir(), "home"], ...roots].flatMap(
|
|
11457
11473
|
([root, name2]) => [.../* @__PURE__ */ new Set([root, (0, import_node_fs21.realpathSync)(root)])].map((from) => `${from}=/peach/${name2}`)
|
|
11458
11474
|
).flatMap((map) => [
|
|
11459
11475
|
"-Xswiftc",
|
|
@@ -11471,7 +11487,7 @@ function swiftReproducibleBuildFlags(roots) {
|
|
|
11471
11487
|
var import_node_child_process17 = require("node:child_process");
|
|
11472
11488
|
var import_node_crypto12 = require("node:crypto");
|
|
11473
11489
|
var import_node_fs22 = require("node:fs");
|
|
11474
|
-
var
|
|
11490
|
+
var import_node_os9 = require("node:os");
|
|
11475
11491
|
var import_node_path23 = __toESM(require("node:path"), 1);
|
|
11476
11492
|
var POLL_MS = 250;
|
|
11477
11493
|
var INSPECT_ATTEMPTS = 5;
|
|
@@ -11559,7 +11575,7 @@ function groupAlive(table, leader) {
|
|
|
11559
11575
|
return table.some((candidate) => candidate.pgid === leader.pid && !candidate.zombie);
|
|
11560
11576
|
}
|
|
11561
11577
|
function swiftRootLocksDir() {
|
|
11562
|
-
return import_node_path23.default.join((0,
|
|
11578
|
+
return import_node_path23.default.join((0, import_node_os9.homedir)(), ".peach", "cache", "swift-root-locks");
|
|
11563
11579
|
}
|
|
11564
11580
|
async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
11565
11581
|
const directory = import_node_path23.default.join(
|
|
@@ -12054,7 +12070,7 @@ function swiftBuildJobs() {
|
|
|
12054
12070
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
12055
12071
|
return Math.min(
|
|
12056
12072
|
process.platform === "darwin" ? Infinity : 4,
|
|
12057
|
-
Math.max(1, Math.floor(
|
|
12073
|
+
Math.max(1, Math.floor(import_node_os10.default.availableParallelism() / 2)),
|
|
12058
12074
|
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
12059
12075
|
);
|
|
12060
12076
|
}
|
|
@@ -12104,6 +12120,8 @@ function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
|
12104
12120
|
);
|
|
12105
12121
|
return header.replace(/^@import (\w+);$/gm, (statement, name2) => {
|
|
12106
12122
|
const dependency = interfaceFor(name2);
|
|
12123
|
+
if (dependency && !dependency.module)
|
|
12124
|
+
return `#import ${JSON.stringify(dependency.file)}`;
|
|
12107
12125
|
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
12108
12126
|
(name3) => superclasses.has(name3)
|
|
12109
12127
|
))
|
|
@@ -12970,7 +12988,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
12970
12988
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12971
12989
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12972
12990
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12973
|
-
var compilerSourceDigest = true ? "
|
|
12991
|
+
var compilerSourceDigest = true ? "6ff3c88ff95ee93cffc6e832c96753820df284d9d2d9a99d405e2cb6be86ed65" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12974
12992
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12975
12993
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12976
12994
|
hash.update(`swift-compile
|
|
@@ -17311,7 +17329,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17311
17329
|
);
|
|
17312
17330
|
const value = {
|
|
17313
17331
|
file: import_node_path27.default.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17314
|
-
header
|
|
17332
|
+
header,
|
|
17333
|
+
module: (0, import_node_fs25.existsSync)(headers)
|
|
17315
17334
|
};
|
|
17316
17335
|
frameworkInterfaces.set(name2, value);
|
|
17317
17336
|
writeBuildFile(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
utimesSync,
|
|
26
26
|
writeFileSync as writeFileSync8
|
|
27
27
|
} from "node:fs";
|
|
28
|
-
import
|
|
28
|
+
import os5 from "node:os";
|
|
29
29
|
import path27 from "node:path";
|
|
30
30
|
import * as v5 from "valibot";
|
|
31
31
|
|
|
@@ -3970,6 +3970,9 @@ function readULEB(b, o) {
|
|
|
3970
3970
|
return [res, p];
|
|
3971
3971
|
}
|
|
3972
3972
|
var WEAKEN_FOUNDATION_SYMS = /* @__PURE__ */ new Set([
|
|
3973
|
+
"$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZ",
|
|
3974
|
+
"$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZ",
|
|
3975
|
+
"$s10Foundation6BundleC22preferredLocalizationsSaySSGvg",
|
|
3973
3976
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_SbtcfC",
|
|
3974
3977
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_Sbtcfc",
|
|
3975
3978
|
"$s10Foundation16NSSortDescriptorC3keySSSgvg",
|
|
@@ -4072,7 +4075,7 @@ function weakenFoundationOverridesInArchive(arBuf) {
|
|
|
4072
4075
|
} else if (name2.endsWith("/")) {
|
|
4073
4076
|
name2 = name2.slice(0, -1);
|
|
4074
4077
|
}
|
|
4075
|
-
if (name2.endsWith("NSSortDescriptor.o")) {
|
|
4078
|
+
if (name2.endsWith("Bundle.o") || name2.endsWith("NSSortDescriptor.o")) {
|
|
4076
4079
|
weakenFoundationSymbolsInWasmObj(arBuf.subarray(bodyStart, bodyEnd));
|
|
4077
4080
|
}
|
|
4078
4081
|
pos = bodyEnd + (size & 1);
|
|
@@ -4126,6 +4129,10 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4126
4129
|
const overlayFiles = readdirSync4(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path8.join(entry.parentPath, entry.name)).sort();
|
|
4127
4130
|
const key = JSON.stringify([
|
|
4128
4131
|
"v23",
|
|
4132
|
+
[...WEAKEN_FOUNDATION_SYMS],
|
|
4133
|
+
readULEB.toString(),
|
|
4134
|
+
weakenFoundationSymbolsInWasmObj.toString(),
|
|
4135
|
+
weakenFoundationOverridesInArchive.toString(),
|
|
4129
4136
|
toolchainBin,
|
|
4130
4137
|
sdk,
|
|
4131
4138
|
frameworks,
|
|
@@ -4771,7 +4778,6 @@ import path11 from "node:path";
|
|
|
4771
4778
|
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
4772
4779
|
import { createHash as createHash5 } from "node:crypto";
|
|
4773
4780
|
import fs4 from "node:fs";
|
|
4774
|
-
import os2 from "node:os";
|
|
4775
4781
|
import path10 from "node:path";
|
|
4776
4782
|
import * as v2 from "valibot";
|
|
4777
4783
|
|
|
@@ -5597,10 +5603,6 @@ function guestWasmSymbols(bytes) {
|
|
|
5597
5603
|
]
|
|
5598
5604
|
};
|
|
5599
5605
|
}
|
|
5600
|
-
function peachHome2() {
|
|
5601
|
-
const override = process.env.PEACH_HOME;
|
|
5602
|
-
return override ? path10.resolve(override) : path10.join(os2.homedir(), ".peach");
|
|
5603
|
-
}
|
|
5604
5606
|
function sdkObjectName(archive, member, ordinal) {
|
|
5605
5607
|
const base = archive.replace(/\.a$/, "");
|
|
5606
5608
|
const suffix = ordinal > 1 ? `_${ordinal}` : "";
|
|
@@ -5655,13 +5657,18 @@ function swiftPrunedSdkObjectOrigins(sdk, args, rewritten) {
|
|
|
5655
5657
|
);
|
|
5656
5658
|
}
|
|
5657
5659
|
function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
5658
|
-
const
|
|
5659
|
-
const
|
|
5660
|
+
const archives = fs4.readdirSync(sdkWasiDir).filter((file) => file.endsWith(".a")).sort();
|
|
5661
|
+
const hash = createHash5("sha256");
|
|
5662
|
+
for (const archive of archives) {
|
|
5663
|
+
hash.update(archive + "\0");
|
|
5664
|
+
hash.update(swiftFileChecksum(path10.join(sdkWasiDir, archive)));
|
|
5665
|
+
}
|
|
5666
|
+
const sdkKey = hash.digest("hex");
|
|
5667
|
+
const outDir = path10.join(swiftCacheDir(), "swift-builds", `sdk-objs-${sdkKey}`);
|
|
5660
5668
|
const stamp = path10.join(outDir, ".complete");
|
|
5661
5669
|
if (fs4.existsSync(stamp)) return outDir;
|
|
5662
5670
|
const tmpDir = `${outDir}.${process.pid}.${Date.now()}.tmp`;
|
|
5663
5671
|
fs4.mkdirSync(tmpDir, { recursive: true });
|
|
5664
|
-
const archives = fs4.readdirSync(sdkWasiDir).filter((f) => f.endsWith(".a")).sort();
|
|
5665
5672
|
for (const archive of archives) {
|
|
5666
5673
|
const members = readArMembers(
|
|
5667
5674
|
new Uint8Array(fs4.readFileSync(path10.join(sdkWasiDir, archive)))
|
|
@@ -5680,8 +5687,12 @@ function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
|
5680
5687
|
fs4.rmSync(tmpDir, { recursive: true, force: true });
|
|
5681
5688
|
return outDir;
|
|
5682
5689
|
}
|
|
5683
|
-
|
|
5684
|
-
|
|
5690
|
+
try {
|
|
5691
|
+
fs4.renameSync(tmpDir, outDir);
|
|
5692
|
+
} catch (error) {
|
|
5693
|
+
if (!fs4.existsSync(stamp)) throw error;
|
|
5694
|
+
fs4.rmSync(tmpDir, { recursive: true, force: true });
|
|
5695
|
+
}
|
|
5685
5696
|
return outDir;
|
|
5686
5697
|
}
|
|
5687
5698
|
function isPrunableSdkFile(file) {
|
|
@@ -6185,6 +6196,11 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
6185
6196
|
if (def) activateSymbolInObj(def.obj, def.symIdx);
|
|
6186
6197
|
}
|
|
6187
6198
|
const WEAKEN_SDK_FOUNDATION_SYMS = /* @__PURE__ */ new Set([
|
|
6199
|
+
"$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZ",
|
|
6200
|
+
"$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZ",
|
|
6201
|
+
"$s10Foundation6BundleC22preferredLocalizationsSaySSGvg",
|
|
6202
|
+
"$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZTf4nnd_n",
|
|
6203
|
+
"$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZTf4nd_n",
|
|
6188
6204
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_SbtcfC",
|
|
6189
6205
|
"$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_Sbtcfc",
|
|
6190
6206
|
"$s10Foundation16NSSortDescriptorC3keySSSgvg",
|
|
@@ -10002,7 +10018,7 @@ import { promisify as promisify2 } from "node:util";
|
|
|
10002
10018
|
import { spawn as spawn3 } from "node:child_process";
|
|
10003
10019
|
import crypto from "node:crypto";
|
|
10004
10020
|
import fs7 from "node:fs";
|
|
10005
|
-
import
|
|
10021
|
+
import os2 from "node:os";
|
|
10006
10022
|
import path17 from "node:path";
|
|
10007
10023
|
import { Readable } from "node:stream";
|
|
10008
10024
|
import { pipeline as pipeline2 } from "node:stream/promises";
|
|
@@ -10050,7 +10066,7 @@ function lockOwnerGone(lock) {
|
|
|
10050
10066
|
async function installVerifiedTarballLocked(tarball, presentAtStart) {
|
|
10051
10067
|
const { url, digest, destDir, installedMarker, label, signal } = tarball;
|
|
10052
10068
|
signal?.throwIfAborted();
|
|
10053
|
-
const downloadDir = fs7.mkdtempSync(path17.join(
|
|
10069
|
+
const downloadDir = fs7.mkdtempSync(path17.join(os2.tmpdir(), "runtime-delivery-download-"));
|
|
10054
10070
|
const archivePath = path17.join(downloadDir, "archive");
|
|
10055
10071
|
const tmpDir = fs7.mkdtempSync(
|
|
10056
10072
|
path17.join(path17.dirname(destDir), `.installing-${path17.basename(destDir)}-`)
|
|
@@ -10949,7 +10965,7 @@ import { execFile as execFile3 } from "node:child_process";
|
|
|
10949
10965
|
import { createHash as createHash11, randomUUID as randomUUID3 } from "node:crypto";
|
|
10950
10966
|
import { existsSync as existsSync2, readFileSync as readFileSync13 } from "node:fs";
|
|
10951
10967
|
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
10952
|
-
import
|
|
10968
|
+
import os3 from "node:os";
|
|
10953
10969
|
import path20 from "node:path";
|
|
10954
10970
|
import { promisify as promisify3 } from "node:util";
|
|
10955
10971
|
import {
|
|
@@ -11029,7 +11045,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
11029
11045
|
const cacheId = `${quality}:${key}`;
|
|
11030
11046
|
const cached = brotliMemoryCache.get(cacheId);
|
|
11031
11047
|
if (cached) return cached;
|
|
11032
|
-
const dir = path20.join(
|
|
11048
|
+
const dir = path20.join(os3.homedir(), ".peach", "cache", "swift-brotli");
|
|
11033
11049
|
const file = path20.join(dir, `${key}${quality === 11 ? "" : "-q4"}.br`);
|
|
11034
11050
|
let compressed;
|
|
11035
11051
|
try {
|
|
@@ -11167,7 +11183,7 @@ var packedFiles = /* @__PURE__ */ new Map();
|
|
|
11167
11183
|
function swiftIcuPacked(icu) {
|
|
11168
11184
|
return memo(packedFiles, icu.sha256, async () => {
|
|
11169
11185
|
const file = path20.join(
|
|
11170
|
-
|
|
11186
|
+
os3.homedir(),
|
|
11171
11187
|
".peach",
|
|
11172
11188
|
"cache",
|
|
11173
11189
|
"swift-brotli",
|
|
@@ -11420,9 +11436,9 @@ function removeProjectLinks(root) {
|
|
|
11420
11436
|
|
|
11421
11437
|
// src/swift-reproducible.ts
|
|
11422
11438
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
11423
|
-
import
|
|
11439
|
+
import os4 from "node:os";
|
|
11424
11440
|
function swiftReproducibleBuildFlags(roots) {
|
|
11425
|
-
return [[
|
|
11441
|
+
return [[os4.homedir(), "home"], ...roots].flatMap(
|
|
11426
11442
|
([root, name2]) => [.../* @__PURE__ */ new Set([root, realpathSync4(root)])].map((from) => `${from}=/peach/${name2}`)
|
|
11427
11443
|
).flatMap((map) => [
|
|
11428
11444
|
"-Xswiftc",
|
|
@@ -12032,7 +12048,7 @@ function swiftBuildJobs() {
|
|
|
12032
12048
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
12033
12049
|
return Math.min(
|
|
12034
12050
|
process.platform === "darwin" ? Infinity : 4,
|
|
12035
|
-
Math.max(1, Math.floor(
|
|
12051
|
+
Math.max(1, Math.floor(os5.availableParallelism() / 2)),
|
|
12036
12052
|
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
12037
12053
|
);
|
|
12038
12054
|
}
|
|
@@ -12082,6 +12098,8 @@ function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
|
12082
12098
|
);
|
|
12083
12099
|
return header.replace(/^@import (\w+);$/gm, (statement, name2) => {
|
|
12084
12100
|
const dependency = interfaceFor(name2);
|
|
12101
|
+
if (dependency && !dependency.module)
|
|
12102
|
+
return `#import ${JSON.stringify(dependency.file)}`;
|
|
12085
12103
|
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
12086
12104
|
(name3) => superclasses.has(name3)
|
|
12087
12105
|
))
|
|
@@ -12948,7 +12966,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
12948
12966
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12949
12967
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12950
12968
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12951
|
-
var compilerSourceDigest = true ? "
|
|
12969
|
+
var compilerSourceDigest = true ? "6ff3c88ff95ee93cffc6e832c96753820df284d9d2d9a99d405e2cb6be86ed65" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12952
12970
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12953
12971
|
const hash = createHash13("sha256");
|
|
12954
12972
|
hash.update(`swift-compile
|
|
@@ -17289,7 +17307,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17289
17307
|
);
|
|
17290
17308
|
const value = {
|
|
17291
17309
|
file: path27.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17292
|
-
header
|
|
17310
|
+
header,
|
|
17311
|
+
module: existsSync5(headers)
|
|
17293
17312
|
};
|
|
17294
17313
|
frameworkInterfaces.set(name2, value);
|
|
17295
17314
|
writeBuildFile(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (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.2242 | (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;
|
|
@@ -86,7 +86,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
86
86
|
var MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
87
87
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
88
88
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
89
|
-
var SWIFT_HOST_ABI =
|
|
89
|
+
var SWIFT_HOST_ABI = 71;
|
|
90
90
|
var POLL_INTERVAL_MS = 1500;
|
|
91
91
|
function swiftNativeEntry(native, file) {
|
|
92
92
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/is-record.ts
|
|
4
4
|
function isRecord(value) {
|
|
@@ -40,7 +40,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
40
40
|
var MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
41
41
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
42
42
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
43
|
-
var SWIFT_HOST_ABI =
|
|
43
|
+
var SWIFT_HOST_ABI = 71;
|
|
44
44
|
var POLL_INTERVAL_MS = 1500;
|
|
45
45
|
function swiftNativeEntry(native, file) {
|
|
46
46
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2242 | (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.2242 | (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;
|