peachsim 0.1.2238 → 0.1.2241
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/commands/inspect/settling.ts +11 -2
- 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 +90 -72
- 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 +13 -4
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +76 -58
- 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 +94 -76
- 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 +15 -6
- 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 +12 -3
- package/dist-lib/sdk.mjs +12 -3
- package/dist-lib/skills.cjs +807 -699
- package/dist-lib/swift-compile.cjs +37 -26
- package/dist-lib/swift-compile.mjs +33 -22
- 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 +64 -47
- 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 +1 -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 +4 -4
- 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 +4 -0
- package/src/swift-standins.ts +5 -2
- package/src/swift-submit.ts +3 -1
- package/src/swift-wasm-prune.ts +18 -14
- package/src/turbo-runtime.lock.json +22 -22
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2241 | (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
|
|
|
@@ -4181,6 +4181,10 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4181
4181
|
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
4182
|
const key = JSON.stringify([
|
|
4183
4183
|
"v23",
|
|
4184
|
+
[...WEAKEN_FOUNDATION_SYMS],
|
|
4185
|
+
readULEB.toString(),
|
|
4186
|
+
weakenFoundationSymbolsInWasmObj.toString(),
|
|
4187
|
+
weakenFoundationOverridesInArchive.toString(),
|
|
4184
4188
|
toolchainBin,
|
|
4185
4189
|
sdk,
|
|
4186
4190
|
frameworks,
|
|
@@ -4826,7 +4830,6 @@ var import_node_path11 = __toESM(require("node:path"), 1);
|
|
|
4826
4830
|
var import_node_child_process8 = require("node:child_process");
|
|
4827
4831
|
var import_node_crypto5 = require("node:crypto");
|
|
4828
4832
|
var import_node_fs9 = __toESM(require("node:fs"), 1);
|
|
4829
|
-
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
4830
4833
|
var import_node_path10 = __toESM(require("node:path"), 1);
|
|
4831
4834
|
var v2 = __toESM(require("valibot"), 1);
|
|
4832
4835
|
|
|
@@ -5652,10 +5655,6 @@ function guestWasmSymbols(bytes) {
|
|
|
5652
5655
|
]
|
|
5653
5656
|
};
|
|
5654
5657
|
}
|
|
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
5658
|
function sdkObjectName(archive, member, ordinal) {
|
|
5660
5659
|
const base = archive.replace(/\.a$/, "");
|
|
5661
5660
|
const suffix = ordinal > 1 ? `_${ordinal}` : "";
|
|
@@ -5710,13 +5709,18 @@ function swiftPrunedSdkObjectOrigins(sdk, args, rewritten) {
|
|
|
5710
5709
|
);
|
|
5711
5710
|
}
|
|
5712
5711
|
function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
5713
|
-
const
|
|
5714
|
-
const
|
|
5712
|
+
const archives = import_node_fs9.default.readdirSync(sdkWasiDir).filter((file) => file.endsWith(".a")).sort();
|
|
5713
|
+
const hash = (0, import_node_crypto5.createHash)("sha256");
|
|
5714
|
+
for (const archive of archives) {
|
|
5715
|
+
hash.update(archive + "\0");
|
|
5716
|
+
hash.update(swiftFileChecksum(import_node_path10.default.join(sdkWasiDir, archive)));
|
|
5717
|
+
}
|
|
5718
|
+
const sdkKey = hash.digest("hex");
|
|
5719
|
+
const outDir = import_node_path10.default.join(swiftCacheDir(), "swift-builds", `sdk-objs-${sdkKey}`);
|
|
5715
5720
|
const stamp = import_node_path10.default.join(outDir, ".complete");
|
|
5716
5721
|
if (import_node_fs9.default.existsSync(stamp)) return outDir;
|
|
5717
5722
|
const tmpDir = `${outDir}.${process.pid}.${Date.now()}.tmp`;
|
|
5718
5723
|
import_node_fs9.default.mkdirSync(tmpDir, { recursive: true });
|
|
5719
|
-
const archives = import_node_fs9.default.readdirSync(sdkWasiDir).filter((f) => f.endsWith(".a")).sort();
|
|
5720
5724
|
for (const archive of archives) {
|
|
5721
5725
|
const members = readArMembers(
|
|
5722
5726
|
new Uint8Array(import_node_fs9.default.readFileSync(import_node_path10.default.join(sdkWasiDir, archive)))
|
|
@@ -5735,8 +5739,12 @@ function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
|
5735
5739
|
import_node_fs9.default.rmSync(tmpDir, { recursive: true, force: true });
|
|
5736
5740
|
return outDir;
|
|
5737
5741
|
}
|
|
5738
|
-
|
|
5739
|
-
|
|
5742
|
+
try {
|
|
5743
|
+
import_node_fs9.default.renameSync(tmpDir, outDir);
|
|
5744
|
+
} catch (error) {
|
|
5745
|
+
if (!import_node_fs9.default.existsSync(stamp)) throw error;
|
|
5746
|
+
import_node_fs9.default.rmSync(tmpDir, { recursive: true, force: true });
|
|
5747
|
+
}
|
|
5740
5748
|
return outDir;
|
|
5741
5749
|
}
|
|
5742
5750
|
function isPrunableSdkFile(file) {
|
|
@@ -10056,7 +10064,7 @@ var import_node_util = require("node:util");
|
|
|
10056
10064
|
var import_node_child_process12 = require("node:child_process");
|
|
10057
10065
|
var import_node_crypto10 = __toESM(require("node:crypto"), 1);
|
|
10058
10066
|
var import_node_fs15 = __toESM(require("node:fs"), 1);
|
|
10059
|
-
var
|
|
10067
|
+
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
10060
10068
|
var import_node_path16 = __toESM(require("node:path"), 1);
|
|
10061
10069
|
var import_node_stream2 = require("node:stream");
|
|
10062
10070
|
var import_promises3 = require("node:stream/promises");
|
|
@@ -10098,7 +10106,7 @@ function lockOwnerGone(lock) {
|
|
|
10098
10106
|
async function installVerifiedTarballLocked(tarball, presentAtStart) {
|
|
10099
10107
|
const { url, digest, destDir, installedMarker, label, signal } = tarball;
|
|
10100
10108
|
signal?.throwIfAborted();
|
|
10101
|
-
const downloadDir = import_node_fs15.default.mkdtempSync(import_node_path16.default.join(
|
|
10109
|
+
const downloadDir = import_node_fs15.default.mkdtempSync(import_node_path16.default.join(import_node_os5.default.tmpdir(), "runtime-delivery-download-"));
|
|
10102
10110
|
const archivePath = import_node_path16.default.join(downloadDir, "archive");
|
|
10103
10111
|
const tmpDir = import_node_fs15.default.mkdtempSync(
|
|
10104
10112
|
import_node_path16.default.join(import_node_path16.default.dirname(destDir), `.installing-${import_node_path16.default.basename(destDir)}-`)
|
|
@@ -10268,11 +10276,11 @@ async function runExtractor(command, args, signal, input) {
|
|
|
10268
10276
|
var import_wasm_opt = require("wasm-opt");
|
|
10269
10277
|
|
|
10270
10278
|
// src/home-paths.ts
|
|
10271
|
-
var
|
|
10279
|
+
var import_node_os6 = require("node:os");
|
|
10272
10280
|
var import_node_path17 = __toESM(require("node:path"), 1);
|
|
10273
10281
|
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
10274
10282
|
function ambientHomeDir() {
|
|
10275
|
-
return import_node_path17.default.join((0,
|
|
10283
|
+
return import_node_path17.default.join((0, import_node_os6.homedir)(), ".peach");
|
|
10276
10284
|
}
|
|
10277
10285
|
function rnxHomeDir() {
|
|
10278
10286
|
const override = process.env[PEACH_HOME_ENV];
|
|
@@ -10995,7 +11003,7 @@ var import_node_child_process15 = require("node:child_process");
|
|
|
10995
11003
|
var import_node_crypto11 = require("node:crypto");
|
|
10996
11004
|
var import_node_fs18 = require("node:fs");
|
|
10997
11005
|
var import_promises4 = require("node:fs/promises");
|
|
10998
|
-
var
|
|
11006
|
+
var import_node_os7 = __toESM(require("node:os"), 1);
|
|
10999
11007
|
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
11000
11008
|
var import_node_util2 = require("node:util");
|
|
11001
11009
|
var import_node_zlib2 = require("node:zlib");
|
|
@@ -11069,7 +11077,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
11069
11077
|
const cacheId = `${quality}:${key}`;
|
|
11070
11078
|
const cached = brotliMemoryCache.get(cacheId);
|
|
11071
11079
|
if (cached) return cached;
|
|
11072
|
-
const dir = import_node_path20.default.join(
|
|
11080
|
+
const dir = import_node_path20.default.join(import_node_os7.default.homedir(), ".peach", "cache", "swift-brotli");
|
|
11073
11081
|
const file = import_node_path20.default.join(dir, `${key}${quality === 11 ? "" : "-q4"}.br`);
|
|
11074
11082
|
let compressed;
|
|
11075
11083
|
try {
|
|
@@ -11207,7 +11215,7 @@ var packedFiles = /* @__PURE__ */ new Map();
|
|
|
11207
11215
|
function swiftIcuPacked(icu) {
|
|
11208
11216
|
return memo(packedFiles, icu.sha256, async () => {
|
|
11209
11217
|
const file = import_node_path20.default.join(
|
|
11210
|
-
|
|
11218
|
+
import_node_os7.default.homedir(),
|
|
11211
11219
|
".peach",
|
|
11212
11220
|
"cache",
|
|
11213
11221
|
"swift-brotli",
|
|
@@ -11451,9 +11459,9 @@ function removeProjectLinks(root) {
|
|
|
11451
11459
|
|
|
11452
11460
|
// src/swift-reproducible.ts
|
|
11453
11461
|
var import_node_fs21 = require("node:fs");
|
|
11454
|
-
var
|
|
11462
|
+
var import_node_os8 = __toESM(require("node:os"), 1);
|
|
11455
11463
|
function swiftReproducibleBuildFlags(roots) {
|
|
11456
|
-
return [[
|
|
11464
|
+
return [[import_node_os8.default.homedir(), "home"], ...roots].flatMap(
|
|
11457
11465
|
([root, name2]) => [.../* @__PURE__ */ new Set([root, (0, import_node_fs21.realpathSync)(root)])].map((from) => `${from}=/peach/${name2}`)
|
|
11458
11466
|
).flatMap((map) => [
|
|
11459
11467
|
"-Xswiftc",
|
|
@@ -11471,7 +11479,7 @@ function swiftReproducibleBuildFlags(roots) {
|
|
|
11471
11479
|
var import_node_child_process17 = require("node:child_process");
|
|
11472
11480
|
var import_node_crypto12 = require("node:crypto");
|
|
11473
11481
|
var import_node_fs22 = require("node:fs");
|
|
11474
|
-
var
|
|
11482
|
+
var import_node_os9 = require("node:os");
|
|
11475
11483
|
var import_node_path23 = __toESM(require("node:path"), 1);
|
|
11476
11484
|
var POLL_MS = 250;
|
|
11477
11485
|
var INSPECT_ATTEMPTS = 5;
|
|
@@ -11559,7 +11567,7 @@ function groupAlive(table, leader) {
|
|
|
11559
11567
|
return table.some((candidate) => candidate.pgid === leader.pid && !candidate.zombie);
|
|
11560
11568
|
}
|
|
11561
11569
|
function swiftRootLocksDir() {
|
|
11562
|
-
return import_node_path23.default.join((0,
|
|
11570
|
+
return import_node_path23.default.join((0, import_node_os9.homedir)(), ".peach", "cache", "swift-root-locks");
|
|
11563
11571
|
}
|
|
11564
11572
|
async function withSwiftRootLock(root, work, signal, wait = true) {
|
|
11565
11573
|
const directory = import_node_path23.default.join(
|
|
@@ -12054,7 +12062,7 @@ function swiftBuildJobs() {
|
|
|
12054
12062
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
12055
12063
|
return Math.min(
|
|
12056
12064
|
process.platform === "darwin" ? Infinity : 4,
|
|
12057
|
-
Math.max(1, Math.floor(
|
|
12065
|
+
Math.max(1, Math.floor(import_node_os10.default.availableParallelism() / 2)),
|
|
12058
12066
|
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
12059
12067
|
);
|
|
12060
12068
|
}
|
|
@@ -12104,6 +12112,8 @@ function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
|
12104
12112
|
);
|
|
12105
12113
|
return header.replace(/^@import (\w+);$/gm, (statement, name2) => {
|
|
12106
12114
|
const dependency = interfaceFor(name2);
|
|
12115
|
+
if (dependency && !dependency.module)
|
|
12116
|
+
return `#import ${JSON.stringify(dependency.file)}`;
|
|
12107
12117
|
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
12108
12118
|
(name3) => superclasses.has(name3)
|
|
12109
12119
|
))
|
|
@@ -12970,7 +12980,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
12970
12980
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12971
12981
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12972
12982
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12973
|
-
var compilerSourceDigest = true ? "
|
|
12983
|
+
var compilerSourceDigest = true ? "3bbc36e39985b08e87a73a633978d40d8856f485ad28dbc7caf18e13cba6bf81" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12974
12984
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12975
12985
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
12976
12986
|
hash.update(`swift-compile
|
|
@@ -17311,7 +17321,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17311
17321
|
);
|
|
17312
17322
|
const value = {
|
|
17313
17323
|
file: import_node_path27.default.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17314
|
-
header
|
|
17324
|
+
header,
|
|
17325
|
+
module: (0, import_node_fs25.existsSync)(headers)
|
|
17315
17326
|
};
|
|
17316
17327
|
frameworkInterfaces.set(name2, value);
|
|
17317
17328
|
writeBuildFile(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2241 | (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
|
|
|
@@ -4126,6 +4126,10 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk)
|
|
|
4126
4126
|
const overlayFiles = readdirSync4(overlay, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path8.join(entry.parentPath, entry.name)).sort();
|
|
4127
4127
|
const key = JSON.stringify([
|
|
4128
4128
|
"v23",
|
|
4129
|
+
[...WEAKEN_FOUNDATION_SYMS],
|
|
4130
|
+
readULEB.toString(),
|
|
4131
|
+
weakenFoundationSymbolsInWasmObj.toString(),
|
|
4132
|
+
weakenFoundationOverridesInArchive.toString(),
|
|
4129
4133
|
toolchainBin,
|
|
4130
4134
|
sdk,
|
|
4131
4135
|
frameworks,
|
|
@@ -4771,7 +4775,6 @@ import path11 from "node:path";
|
|
|
4771
4775
|
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
4772
4776
|
import { createHash as createHash5 } from "node:crypto";
|
|
4773
4777
|
import fs4 from "node:fs";
|
|
4774
|
-
import os2 from "node:os";
|
|
4775
4778
|
import path10 from "node:path";
|
|
4776
4779
|
import * as v2 from "valibot";
|
|
4777
4780
|
|
|
@@ -5597,10 +5600,6 @@ function guestWasmSymbols(bytes) {
|
|
|
5597
5600
|
]
|
|
5598
5601
|
};
|
|
5599
5602
|
}
|
|
5600
|
-
function peachHome2() {
|
|
5601
|
-
const override = process.env.PEACH_HOME;
|
|
5602
|
-
return override ? path10.resolve(override) : path10.join(os2.homedir(), ".peach");
|
|
5603
|
-
}
|
|
5604
5603
|
function sdkObjectName(archive, member, ordinal) {
|
|
5605
5604
|
const base = archive.replace(/\.a$/, "");
|
|
5606
5605
|
const suffix = ordinal > 1 ? `_${ordinal}` : "";
|
|
@@ -5655,13 +5654,18 @@ function swiftPrunedSdkObjectOrigins(sdk, args, rewritten) {
|
|
|
5655
5654
|
);
|
|
5656
5655
|
}
|
|
5657
5656
|
function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
5658
|
-
const
|
|
5659
|
-
const
|
|
5657
|
+
const archives = fs4.readdirSync(sdkWasiDir).filter((file) => file.endsWith(".a")).sort();
|
|
5658
|
+
const hash = createHash5("sha256");
|
|
5659
|
+
for (const archive of archives) {
|
|
5660
|
+
hash.update(archive + "\0");
|
|
5661
|
+
hash.update(swiftFileChecksum(path10.join(sdkWasiDir, archive)));
|
|
5662
|
+
}
|
|
5663
|
+
const sdkKey = hash.digest("hex");
|
|
5664
|
+
const outDir = path10.join(swiftCacheDir(), "swift-builds", `sdk-objs-${sdkKey}`);
|
|
5660
5665
|
const stamp = path10.join(outDir, ".complete");
|
|
5661
5666
|
if (fs4.existsSync(stamp)) return outDir;
|
|
5662
5667
|
const tmpDir = `${outDir}.${process.pid}.${Date.now()}.tmp`;
|
|
5663
5668
|
fs4.mkdirSync(tmpDir, { recursive: true });
|
|
5664
|
-
const archives = fs4.readdirSync(sdkWasiDir).filter((f) => f.endsWith(".a")).sort();
|
|
5665
5669
|
for (const archive of archives) {
|
|
5666
5670
|
const members = readArMembers(
|
|
5667
5671
|
new Uint8Array(fs4.readFileSync(path10.join(sdkWasiDir, archive)))
|
|
@@ -5680,8 +5684,12 @@ function ensureUnpackedSdkObjects(sdkWasiDir) {
|
|
|
5680
5684
|
fs4.rmSync(tmpDir, { recursive: true, force: true });
|
|
5681
5685
|
return outDir;
|
|
5682
5686
|
}
|
|
5683
|
-
|
|
5684
|
-
|
|
5687
|
+
try {
|
|
5688
|
+
fs4.renameSync(tmpDir, outDir);
|
|
5689
|
+
} catch (error) {
|
|
5690
|
+
if (!fs4.existsSync(stamp)) throw error;
|
|
5691
|
+
fs4.rmSync(tmpDir, { recursive: true, force: true });
|
|
5692
|
+
}
|
|
5685
5693
|
return outDir;
|
|
5686
5694
|
}
|
|
5687
5695
|
function isPrunableSdkFile(file) {
|
|
@@ -10002,7 +10010,7 @@ import { promisify as promisify2 } from "node:util";
|
|
|
10002
10010
|
import { spawn as spawn3 } from "node:child_process";
|
|
10003
10011
|
import crypto from "node:crypto";
|
|
10004
10012
|
import fs7 from "node:fs";
|
|
10005
|
-
import
|
|
10013
|
+
import os2 from "node:os";
|
|
10006
10014
|
import path17 from "node:path";
|
|
10007
10015
|
import { Readable } from "node:stream";
|
|
10008
10016
|
import { pipeline as pipeline2 } from "node:stream/promises";
|
|
@@ -10050,7 +10058,7 @@ function lockOwnerGone(lock) {
|
|
|
10050
10058
|
async function installVerifiedTarballLocked(tarball, presentAtStart) {
|
|
10051
10059
|
const { url, digest, destDir, installedMarker, label, signal } = tarball;
|
|
10052
10060
|
signal?.throwIfAborted();
|
|
10053
|
-
const downloadDir = fs7.mkdtempSync(path17.join(
|
|
10061
|
+
const downloadDir = fs7.mkdtempSync(path17.join(os2.tmpdir(), "runtime-delivery-download-"));
|
|
10054
10062
|
const archivePath = path17.join(downloadDir, "archive");
|
|
10055
10063
|
const tmpDir = fs7.mkdtempSync(
|
|
10056
10064
|
path17.join(path17.dirname(destDir), `.installing-${path17.basename(destDir)}-`)
|
|
@@ -10949,7 +10957,7 @@ import { execFile as execFile3 } from "node:child_process";
|
|
|
10949
10957
|
import { createHash as createHash11, randomUUID as randomUUID3 } from "node:crypto";
|
|
10950
10958
|
import { existsSync as existsSync2, readFileSync as readFileSync13 } from "node:fs";
|
|
10951
10959
|
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
10952
|
-
import
|
|
10960
|
+
import os3 from "node:os";
|
|
10953
10961
|
import path20 from "node:path";
|
|
10954
10962
|
import { promisify as promisify3 } from "node:util";
|
|
10955
10963
|
import {
|
|
@@ -11029,7 +11037,7 @@ async function cachedBrotli(bytes, quality, cacheKey) {
|
|
|
11029
11037
|
const cacheId = `${quality}:${key}`;
|
|
11030
11038
|
const cached = brotliMemoryCache.get(cacheId);
|
|
11031
11039
|
if (cached) return cached;
|
|
11032
|
-
const dir = path20.join(
|
|
11040
|
+
const dir = path20.join(os3.homedir(), ".peach", "cache", "swift-brotli");
|
|
11033
11041
|
const file = path20.join(dir, `${key}${quality === 11 ? "" : "-q4"}.br`);
|
|
11034
11042
|
let compressed;
|
|
11035
11043
|
try {
|
|
@@ -11167,7 +11175,7 @@ var packedFiles = /* @__PURE__ */ new Map();
|
|
|
11167
11175
|
function swiftIcuPacked(icu) {
|
|
11168
11176
|
return memo(packedFiles, icu.sha256, async () => {
|
|
11169
11177
|
const file = path20.join(
|
|
11170
|
-
|
|
11178
|
+
os3.homedir(),
|
|
11171
11179
|
".peach",
|
|
11172
11180
|
"cache",
|
|
11173
11181
|
"swift-brotli",
|
|
@@ -11420,9 +11428,9 @@ function removeProjectLinks(root) {
|
|
|
11420
11428
|
|
|
11421
11429
|
// src/swift-reproducible.ts
|
|
11422
11430
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
11423
|
-
import
|
|
11431
|
+
import os4 from "node:os";
|
|
11424
11432
|
function swiftReproducibleBuildFlags(roots) {
|
|
11425
|
-
return [[
|
|
11433
|
+
return [[os4.homedir(), "home"], ...roots].flatMap(
|
|
11426
11434
|
([root, name2]) => [.../* @__PURE__ */ new Set([root, realpathSync4(root)])].map((from) => `${from}=/peach/${name2}`)
|
|
11427
11435
|
).flatMap((map) => [
|
|
11428
11436
|
"-Xswiftc",
|
|
@@ -12032,7 +12040,7 @@ function swiftBuildJobs() {
|
|
|
12032
12040
|
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
12033
12041
|
return Math.min(
|
|
12034
12042
|
process.platform === "darwin" ? Infinity : 4,
|
|
12035
|
-
Math.max(1, Math.floor(
|
|
12043
|
+
Math.max(1, Math.floor(os5.availableParallelism() / 2)),
|
|
12036
12044
|
Number.isInteger(admittedCores) && admittedCores > 0 ? admittedCores : 4
|
|
12037
12045
|
);
|
|
12038
12046
|
}
|
|
@@ -12082,6 +12090,8 @@ function swiftHeaderWithSuperclassImports(header, interfaceFor) {
|
|
|
12082
12090
|
);
|
|
12083
12091
|
return header.replace(/^@import (\w+);$/gm, (statement, name2) => {
|
|
12084
12092
|
const dependency = interfaceFor(name2);
|
|
12093
|
+
if (dependency && !dependency.module)
|
|
12094
|
+
return `#import ${JSON.stringify(dependency.file)}`;
|
|
12085
12095
|
if (!dependency || ![...swiftInterfaceDeclarations(dependency.header)].some(
|
|
12086
12096
|
(name3) => superclasses.has(name3)
|
|
12087
12097
|
))
|
|
@@ -12948,7 +12958,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
12948
12958
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12949
12959
|
var MULTI_MANIFEST_VERSION = 68;
|
|
12950
12960
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12951
|
-
var compilerSourceDigest = true ? "
|
|
12961
|
+
var compilerSourceDigest = true ? "3bbc36e39985b08e87a73a633978d40d8856f485ad28dbc7caf18e13cba6bf81" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
12952
12962
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12953
12963
|
const hash = createHash13("sha256");
|
|
12954
12964
|
hash.update(`swift-compile
|
|
@@ -17289,7 +17299,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
17289
17299
|
);
|
|
17290
17300
|
const value = {
|
|
17291
17301
|
file: path27.join(root, ".build/peach-framework-objc", `${name2}-Swift.h`),
|
|
17292
|
-
header
|
|
17302
|
+
header,
|
|
17303
|
+
module: existsSync5(headers)
|
|
17293
17304
|
};
|
|
17294
17305
|
frameworkInterfaces.set(name2, value);
|
|
17295
17306
|
writeBuildFile(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2241 | (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.2241 | (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.2241 | (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.2241 | (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.2241 | (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;
|