peachsim 0.1.2249 → 0.1.2250
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 +4 -3
- package/cli/commands/flow.ts +4 -1
- 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 +60 -20
- 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 +3 -3
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +34 -16
- 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 +67 -21
- 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 -8
- 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 +15 -8
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +2 -2
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- 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 +103 -23
- package/dist-lib/swift-compile.cjs +31 -13
- package/dist-lib/swift-compile.mjs +31 -13
- 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 +32 -14
- package/dist-lib/vite.cjs +15 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/image-pixel-contract.d.ts +0 -4
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/assetCatalogContract.ts +1 -1
- package/src/nitro-compile.ts +23 -1
- package/src/process-group.ts +5 -2
- package/src/runtime-packs.ts +8 -0
- package/src/swift-compile.ts +20 -6
- package/src/swift-guest-source-inputs.ts +5 -1
- package/src/swift-installed-targets.ts +4 -1
- package/src/swift-wasm-prune.ts +4 -2
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2250 | (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;
|
|
@@ -3949,8 +3949,9 @@ function readProcessTable(timeoutMs = 1e4, pid) {
|
|
|
3949
3949
|
// src/process-group.ts
|
|
3950
3950
|
var GRACEFUL_TIMEOUT_MS = 3e3;
|
|
3951
3951
|
var FORCED_EXIT_TIMEOUT_MS = 1e3;
|
|
3952
|
+
var INSPECTION_TIMEOUT_MS = 1e4;
|
|
3952
3953
|
var FREEZE_GUARD_NAME = "process-freeze-guard";
|
|
3953
|
-
function listProcessChildren(parents, timeoutMs =
|
|
3954
|
+
function listProcessChildren(parents, timeoutMs = 1e4) {
|
|
3954
3955
|
if (parents.some((pid) => !Number.isInteger(pid) || pid <= 1))
|
|
3955
3956
|
throw new Error("process inspection requires valid parent pids");
|
|
3956
3957
|
if (parents.length === 0) return [];
|
|
@@ -4160,7 +4161,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
|
|
|
4160
4161
|
try {
|
|
4161
4162
|
signalProcessGroup(child, "SIGSTOP");
|
|
4162
4163
|
let parents = [child.pid];
|
|
4163
|
-
const inspectionDeadline = Date.now() +
|
|
4164
|
+
const inspectionDeadline = Date.now() + INSPECTION_TIMEOUT_MS;
|
|
4164
4165
|
while (parents.length > 0) {
|
|
4165
4166
|
const remaining = inspectionDeadline - Date.now();
|
|
4166
4167
|
if (remaining <= 0) {
|
|
@@ -10781,6 +10782,7 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
10781
10782
|
const eagerFiles = [];
|
|
10782
10783
|
const lazyBuildObjects = /* @__PURE__ */ new Map();
|
|
10783
10784
|
const extraArchiveObjs = [];
|
|
10785
|
+
const objectBytes = /* @__PURE__ */ new Map();
|
|
10784
10786
|
let inStartLib = false;
|
|
10785
10787
|
let swiftrtOrigPath = "";
|
|
10786
10788
|
for (const t of tokens2) {
|
|
@@ -10827,7 +10829,9 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
10827
10829
|
} else if (!inStartLib && t.endsWith(".a") && !t.endsWith("libclang_rt.builtins-wasm64.a") && import_node_fs10.default.existsSync(t)) {
|
|
10828
10830
|
const members2 = readArMembers(new Uint8Array(import_node_fs10.default.readFileSync(t)));
|
|
10829
10831
|
for (const m of members2) {
|
|
10830
|
-
|
|
10832
|
+
const object4 = parseWasmObjectBytes(`${t}(${m.name})`, m.bytes, false);
|
|
10833
|
+
extraArchiveObjs.push(object4);
|
|
10834
|
+
objectBytes.set(object4, Buffer.from(m.bytes));
|
|
10831
10835
|
}
|
|
10832
10836
|
}
|
|
10833
10837
|
}
|
|
@@ -11198,7 +11202,6 @@ function pruneSwiftWasmLink(directory, toolchainBin, moduleRoot, staticClangTarg
|
|
|
11198
11202
|
"$s10Foundation16NSSortDescriptorC7keyPath9ascendingACs03KeyE0Cyxq_G_SbtcSLR_r0_lufC",
|
|
11199
11203
|
"$s10Foundation16NSSortDescriptorC7keyPath9ascendingACs03KeyE0Cyxq_G_SbtcSLR_r0_lufc"
|
|
11200
11204
|
]);
|
|
11201
|
-
const objectBytes = /* @__PURE__ */ new Map();
|
|
11202
11205
|
const keepObjCClassesNamedInSegment = (obj, segIdx) => {
|
|
11203
11206
|
const range2 = obj.segPayloadRanges[segIdx];
|
|
11204
11207
|
if (!range2) return;
|
|
@@ -14861,9 +14864,10 @@ function sourceGuestClangLinkOptions(options) {
|
|
|
14861
14864
|
if (command.tool !== "clang" || compiler !== (0, import_node_fs15.realpathSync)(import_node_path15.default.join(options.toolchainBin, "clang")) && compiler !== (0, import_node_fs15.realpathSync)(import_node_path15.default.join(options.buildDirectory, CLANG_TARGET_MODULE_WRAPPER)))
|
|
14862
14865
|
throw new Error(`unsupported source object producer ${file}`);
|
|
14863
14866
|
const args = command.args.slice(1).filter((arg) => arg !== "-c");
|
|
14867
|
+
const targetBuild = import_node_path15.default.relative(options.buildDirectory, file).split(import_node_path15.default.sep).findLast((part) => part !== ".build" && part.endsWith(".build"));
|
|
14864
14868
|
const outputDirectory = import_node_path15.default.join(
|
|
14865
14869
|
options.directory,
|
|
14866
|
-
import_node_path15.default.basename(import_node_path15.default.dirname(file))
|
|
14870
|
+
targetBuild ?? import_node_path15.default.basename(import_node_path15.default.dirname(file))
|
|
14867
14871
|
);
|
|
14868
14872
|
(0, import_node_fs15.mkdirSync)(outputDirectory, { recursive: true });
|
|
14869
14873
|
const output2 = import_node_path15.default.join(outputDirectory, `clang-link-${index}.ll`);
|
|
@@ -17929,7 +17933,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
|
|
|
17929
17933
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
17930
17934
|
var MULTI_MANIFEST_VERSION = 68;
|
|
17931
17935
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
17932
|
-
var compilerSourceDigest = true ? "
|
|
17936
|
+
var compilerSourceDigest = true ? "4a1be1d1296381c7090b5b2b704a7d2bebba03ceaa580613acd0f2c39c31ed4c" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
17933
17937
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
17934
17938
|
const hash = (0, import_node_crypto13.createHash)("sha256");
|
|
17935
17939
|
hash.update(`swift-compile
|
|
@@ -21015,15 +21019,29 @@ module ${moduleName}.Swift {
|
|
|
21015
21019
|
[
|
|
21016
21020
|
"#!/bin/sh",
|
|
21017
21021
|
"name=",
|
|
21022
|
+
"explicit=",
|
|
21018
21023
|
"prev=",
|
|
21019
21024
|
'for arg in "$@"; do',
|
|
21020
|
-
|
|
21025
|
+
" case $arg in -fmodule-name=*) explicit=1 ;; esac",
|
|
21026
|
+
' if [ "$prev" = -o ]; then',
|
|
21027
|
+
" case $arg in */*) dir=${arg%/*} ;; *) dir= ;; esac",
|
|
21028
|
+
' while [ -n "$dir" ] && [ "$dir" != / ] && [ "$dir" != . ]; do',
|
|
21029
|
+
" base=${dir##*/}",
|
|
21030
|
+
" case $base in",
|
|
21031
|
+
" .build) break ;;",
|
|
21032
|
+
" *.build) name=${base%.build}; break ;;",
|
|
21033
|
+
" esac",
|
|
21034
|
+
" next=${dir%/*}",
|
|
21035
|
+
' [ "$next" = "$dir" ] && break',
|
|
21036
|
+
" dir=$next",
|
|
21037
|
+
" done",
|
|
21038
|
+
" fi",
|
|
21021
21039
|
" prev=$arg",
|
|
21022
21040
|
"done",
|
|
21023
|
-
"
|
|
21024
|
-
`
|
|
21025
|
-
|
|
21026
|
-
"
|
|
21041
|
+
'if [ -n "$name" ] && [ -z "$explicit" ]; then',
|
|
21042
|
+
` exec '${import_node_path27.default.join(nativeToolchain(), "clang")}' "-fmodule-name=$name" "$@"`,
|
|
21043
|
+
"fi",
|
|
21044
|
+
`exec '${import_node_path27.default.join(nativeToolchain(), "clang")}' "$@"`,
|
|
21027
21045
|
""
|
|
21028
21046
|
].join("\n")
|
|
21029
21047
|
);
|
|
@@ -21490,7 +21508,7 @@ function frameworkLinkClosure(scratch2, roots) {
|
|
|
21490
21508
|
const deps = /* @__PURE__ */ new Set();
|
|
21491
21509
|
for (const file of paths) {
|
|
21492
21510
|
const module2 = /\/Modules\/([^/]+)\.swiftmodule$/.exec(file);
|
|
21493
|
-
const object4 = /\/([^/]+)\.build
|
|
21511
|
+
const object4 = /\/release\/([^/]+)\.build\/.+\.o$/.exec(file);
|
|
21494
21512
|
if (module2) deps.add(module2[1]);
|
|
21495
21513
|
else if (object4 && object4[1] !== pending.name) deps.add(object4[1]);
|
|
21496
21514
|
}
|
|
@@ -31470,7 +31488,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
|
|
|
31470
31488
|
return hash.digest("hex");
|
|
31471
31489
|
}
|
|
31472
31490
|
var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
31473
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
31491
|
+
var STANDIN_SOURCE_DIGEST = true ? "977c30e838b3cb068d200b9a9a12851b01d2192d0d04e2b5a6abe8189c168d42" : standinSourceDigest();
|
|
31474
31492
|
|
|
31475
31493
|
// src/swift-standins.ts
|
|
31476
31494
|
var import_node_child_process31 = require("node:child_process");
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2250 | (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;
|
|
@@ -129,7 +129,7 @@ var init_process_table = __esm({
|
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
// src/process-group.ts
|
|
132
|
-
function listProcessChildren(parents, timeoutMs =
|
|
132
|
+
function listProcessChildren(parents, timeoutMs = 1e4) {
|
|
133
133
|
if (parents.some((pid) => !Number.isInteger(pid) || pid <= 1))
|
|
134
134
|
throw new Error("process inspection requires valid parent pids");
|
|
135
135
|
if (parents.length === 0) return [];
|
|
@@ -339,7 +339,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
|
|
|
339
339
|
try {
|
|
340
340
|
signalProcessGroup(child, "SIGSTOP");
|
|
341
341
|
let parents = [child.pid];
|
|
342
|
-
const inspectionDeadline = Date.now() +
|
|
342
|
+
const inspectionDeadline = Date.now() + INSPECTION_TIMEOUT_MS;
|
|
343
343
|
while (parents.length > 0) {
|
|
344
344
|
const remaining = inspectionDeadline - Date.now();
|
|
345
345
|
if (remaining <= 0) {
|
|
@@ -435,7 +435,7 @@ async function terminateProcessGroup(child, signal = "SIGTERM", gracefulTimeoutM
|
|
|
435
435
|
}
|
|
436
436
|
if (inspectionError) throw inspectionError;
|
|
437
437
|
}
|
|
438
|
-
var import_node_child_process2, import_node_fs2, import_node_os2, import_node_path, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, FREEZE_GUARD_NAME;
|
|
438
|
+
var import_node_child_process2, import_node_fs2, import_node_os2, import_node_path, import_node_stream, import_promises, GRACEFUL_TIMEOUT_MS, FORCED_EXIT_TIMEOUT_MS, INSPECTION_TIMEOUT_MS, FREEZE_GUARD_NAME;
|
|
439
439
|
var init_process_group = __esm({
|
|
440
440
|
"src/process-group.ts"() {
|
|
441
441
|
"use strict";
|
|
@@ -448,6 +448,7 @@ var init_process_group = __esm({
|
|
|
448
448
|
init_process_table();
|
|
449
449
|
GRACEFUL_TIMEOUT_MS = 3e3;
|
|
450
450
|
FORCED_EXIT_TIMEOUT_MS = 1e3;
|
|
451
|
+
INSPECTION_TIMEOUT_MS = 1e4;
|
|
451
452
|
FREEZE_GUARD_NAME = "process-freeze-guard";
|
|
452
453
|
}
|
|
453
454
|
});
|
|
@@ -1058,7 +1059,7 @@ var init_src = __esm({
|
|
|
1058
1059
|
var runtime_companion_default;
|
|
1059
1060
|
var init_runtime_companion = __esm({
|
|
1060
1061
|
"runtime-companion.json"() {
|
|
1061
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
1062
|
+
runtime_companion_default = { abi: 1, sha256: "15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e", file: "node/cli-15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e.cjs" };
|
|
1062
1063
|
}
|
|
1063
1064
|
});
|
|
1064
1065
|
|
|
@@ -2744,7 +2745,8 @@ var init_runtime_delivery = __esm({
|
|
|
2744
2745
|
// src/runtime-packs.ts
|
|
2745
2746
|
var runtime_packs_exports = {};
|
|
2746
2747
|
__export(runtime_packs_exports, {
|
|
2747
|
-
ensureRuntimePackFor: () => ensureRuntimePackFor
|
|
2748
|
+
ensureRuntimePackFor: () => ensureRuntimePackFor,
|
|
2749
|
+
installAllRuntimePacks: () => installAllRuntimePacks
|
|
2748
2750
|
});
|
|
2749
2751
|
function listedFiles(runtimeRoot) {
|
|
2750
2752
|
let listed = listedByRoot.get(runtimeRoot);
|
|
@@ -2807,6 +2809,11 @@ async function ensureRuntimePackFor(runtimeRoot, pathname) {
|
|
|
2807
2809
|
if (!/\.m?js$/.test(rel) || import_node_fs13.default.existsSync(import_node_path17.default.join(tenantDir, rel))) return;
|
|
2808
2810
|
await installNamedPack(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
2809
2811
|
}
|
|
2812
|
+
async function installAllRuntimePacks(runtimeRoot) {
|
|
2813
|
+
for (const name2 of Object.keys(readPacks(runtimeRoot) ?? {}))
|
|
2814
|
+
if (!await installNamedPack(runtimeRoot, name2))
|
|
2815
|
+
throw new Error(`runtime pack ${name2} did not install under ${runtimeRoot}`);
|
|
2816
|
+
}
|
|
2810
2817
|
function installNamedPack(runtimeRoot, name2) {
|
|
2811
2818
|
if (name2 === RUNTIME_MERGE_PACK_DIR) {
|
|
2812
2819
|
const tenantDir = import_node_path17.default.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR);
|
|
@@ -3160,7 +3167,7 @@ var import_plist5 = __toESM(require("plist"), 1);
|
|
|
3160
3167
|
init_answeredNativePackages();
|
|
3161
3168
|
|
|
3162
3169
|
// src/swift-standin-digest.ts
|
|
3163
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
3170
|
+
var STANDIN_SOURCE_DIGEST = true ? "977c30e838b3cb068d200b9a9a12851b01d2192d0d04e2b5a6abe8189c168d42" : standinSourceDigest();
|
|
3164
3171
|
|
|
3165
3172
|
// cli/commands/detect.ts
|
|
3166
3173
|
var import_json5 = __toESM(require_lib(), 1);
|
|
@@ -6292,7 +6299,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
|
|
|
6292
6299
|
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
6293
6300
|
(module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
|
|
6294
6301
|
).join("");
|
|
6295
|
-
var compilerSourceDigest = true ? "
|
|
6302
|
+
var compilerSourceDigest = true ? "4a1be1d1296381c7090b5b2b704a7d2bebba03ceaa580613acd0f2c39c31ed4c" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
6296
6303
|
var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
6297
6304
|
"CFAllocator",
|
|
6298
6305
|
"CFArray",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2250 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/kotlin/sdk.tar.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/runtime-companion.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"abi":1,"sha256":"
|
|
1
|
+
{"abi":1,"sha256":"15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e","file":"node/cli-15053b90437ccef5f18e3e8cde5732e85d2dc9feb3a3e76076cb671a640c465e.cjs"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export const SF_SYMBOL_METRICS_CATALOG_FILE = 'metrics-dict.bin.gz'
|
|
3
3
|
|
|
4
4
|
export function sfSymbolMetricsFilename(catalogVersion: string): string {
|
|
5
|
-
return `metrics-${catalogVersion}-
|
|
5
|
+
return `metrics-${catalogVersion}-rows.bin`
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export interface SwiftImageSource {
|
package/src/nitro-compile.ts
CHANGED
|
@@ -348,6 +348,7 @@ export async function compileNitroModule(
|
|
|
348
348
|
options.packageRoots,
|
|
349
349
|
options.answers,
|
|
350
350
|
).flatMap(({ config }) => (config.swiftModule ? [config.swiftModule] : []))
|
|
351
|
+
let installedTargets: ReturnType<typeof swiftManifestTargets> = []
|
|
351
352
|
// a Swift provider's mixed-target boundary comes from the installed pods when
|
|
352
353
|
// they exist; without them its sources compile as the source collector laid them out
|
|
353
354
|
if (swiftModules.length > 0 && workspace) {
|
|
@@ -375,6 +376,7 @@ export async function compileNitroModule(
|
|
|
375
376
|
},
|
|
376
377
|
async (root) => {
|
|
377
378
|
const snapshot = await installedWorkspaceInput(root, 'main.swift')
|
|
379
|
+
installedTargets = swiftManifestTargets(snapshot.input.files['Package.swift']!)
|
|
378
380
|
// react's registration and turbomodule implementations belong to its
|
|
379
381
|
// runtime, while this executable owns the selected Nitro providers.
|
|
380
382
|
const swiftFiles = Object.keys(snapshot.input.files).filter((file) =>
|
|
@@ -382,7 +384,7 @@ export async function compileNitroModule(
|
|
|
382
384
|
)
|
|
383
385
|
const mixedTargets = new Set([
|
|
384
386
|
...collection.targets.map(({ name }) => name),
|
|
385
|
-
...
|
|
387
|
+
...installedTargets
|
|
386
388
|
.filter((target) =>
|
|
387
389
|
swiftFiles.some((file) => file.startsWith(`${target.path}/`)),
|
|
388
390
|
)
|
|
@@ -427,6 +429,26 @@ export async function compileNitroModule(
|
|
|
427
429
|
options.moduleRoot,
|
|
428
430
|
installedProviders ? [] : unresolvedFrameworkIncludes(collection.files),
|
|
429
431
|
)
|
|
432
|
+
if (dependencies) {
|
|
433
|
+
const podTargets = new Set(
|
|
434
|
+
swiftManifestTargets(dependencies.files['Package.swift']!).map(
|
|
435
|
+
({ name }) => name,
|
|
436
|
+
),
|
|
437
|
+
)
|
|
438
|
+
for (const target of collection.targets) {
|
|
439
|
+
const declared = installedTargets.find(({ name }) => name === target.name)
|
|
440
|
+
const owned = new Set((target.dependencies ?? []).map(({ name }) => name))
|
|
441
|
+
target.dependencies = [
|
|
442
|
+
...(target.dependencies ?? []),
|
|
443
|
+
...(declared?.dependencies ?? []).filter(
|
|
444
|
+
(dependency) =>
|
|
445
|
+
dependency.kind === 'target' &&
|
|
446
|
+
podTargets.has(dependency.name) &&
|
|
447
|
+
!owned.has(dependency.name),
|
|
448
|
+
),
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
}
|
|
430
452
|
}
|
|
431
453
|
// the compiled sources target the app's own declared iOS minimum
|
|
432
454
|
const iosDeploymentTarget = readIosAppTarget(
|
package/src/process-group.ts
CHANGED
|
@@ -15,10 +15,13 @@ import { readProcessTable } from './process-table.ts'
|
|
|
15
15
|
|
|
16
16
|
const GRACEFUL_TIMEOUT_MS = 3_000
|
|
17
17
|
const FORCED_EXIT_TIMEOUT_MS = 1_000
|
|
18
|
+
// a thrashing mac takes seconds to spawn each pgrep, so the frozen walk gets
|
|
19
|
+
// the process table's own budget rather than the graceful one.
|
|
20
|
+
const INSPECTION_TIMEOUT_MS = 10_000
|
|
18
21
|
const FREEZE_GUARD_NAME = 'process-freeze-guard'
|
|
19
22
|
|
|
20
23
|
// keep this self-contained: the detached browser host embeds its source.
|
|
21
|
-
export function listProcessChildren(parents: number[], timeoutMs =
|
|
24
|
+
export function listProcessChildren(parents: number[], timeoutMs = 10_000): number[] {
|
|
22
25
|
if (parents.some((pid) => !Number.isInteger(pid) || pid <= 1))
|
|
23
26
|
throw new Error('process inspection requires valid parent pids')
|
|
24
27
|
if (parents.length === 0) return []
|
|
@@ -257,7 +260,7 @@ export async function terminateProcessGroup(
|
|
|
257
260
|
try {
|
|
258
261
|
signalProcessGroup(child, 'SIGSTOP')
|
|
259
262
|
let parents = [child.pid]
|
|
260
|
-
const inspectionDeadline = Date.now() +
|
|
263
|
+
const inspectionDeadline = Date.now() + INSPECTION_TIMEOUT_MS
|
|
261
264
|
while (parents.length > 0) {
|
|
262
265
|
const remaining = inspectionDeadline - Date.now()
|
|
263
266
|
if (remaining <= 0) {
|
package/src/runtime-packs.ts
CHANGED
|
@@ -98,6 +98,14 @@ export async function ensureRuntimePackFor(
|
|
|
98
98
|
await installNamedPack(runtimeRoot, RUNTIME_MERGE_PACK_DIR)
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
/** install every pack of a runtime so a machine that cannot reach the CDN later
|
|
102
|
+
* serves the whole tree. rejects on the first pack that fails. */
|
|
103
|
+
export async function installAllRuntimePacks(runtimeRoot: string): Promise<void> {
|
|
104
|
+
for (const name of Object.keys(readPacks(runtimeRoot) ?? {}))
|
|
105
|
+
if (!(await installNamedPack(runtimeRoot, name)))
|
|
106
|
+
throw new Error(`runtime pack ${name} did not install under ${runtimeRoot}`)
|
|
107
|
+
}
|
|
108
|
+
|
|
101
109
|
function installNamedPack(runtimeRoot: string, name: string): Promise<boolean> {
|
|
102
110
|
if (name === RUNTIME_MERGE_PACK_DIR) {
|
|
103
111
|
const tenantDir = path.join(runtimeRoot, RUNTIME_MERGE_PACK_DIR)
|
package/src/swift-compile.ts
CHANGED
|
@@ -6049,15 +6049,29 @@ export function writeSwiftProject(
|
|
|
6049
6049
|
[
|
|
6050
6050
|
'#!/bin/sh',
|
|
6051
6051
|
'name=',
|
|
6052
|
+
'explicit=',
|
|
6052
6053
|
'prev=',
|
|
6053
6054
|
'for arg in "$@"; do',
|
|
6054
|
-
'
|
|
6055
|
+
' case $arg in -fmodule-name=*) explicit=1 ;; esac',
|
|
6056
|
+
' if [ "$prev" = -o ]; then',
|
|
6057
|
+
' case $arg in */*) dir=${arg%/*} ;; *) dir= ;; esac',
|
|
6058
|
+
' while [ -n "$dir" ] && [ "$dir" != / ] && [ "$dir" != . ]; do',
|
|
6059
|
+
' base=${dir##*/}',
|
|
6060
|
+
' case $base in',
|
|
6061
|
+
' .build) break ;;',
|
|
6062
|
+
' *.build) name=${base%.build}; break ;;',
|
|
6063
|
+
' esac',
|
|
6064
|
+
' next=${dir%/*}',
|
|
6065
|
+
' [ "$next" = "$dir" ] && break',
|
|
6066
|
+
' dir=$next',
|
|
6067
|
+
' done',
|
|
6068
|
+
' fi',
|
|
6055
6069
|
' prev=$arg',
|
|
6056
6070
|
'done',
|
|
6057
|
-
'
|
|
6058
|
-
`
|
|
6059
|
-
|
|
6060
|
-
'
|
|
6071
|
+
'if [ -n "$name" ] && [ -z "$explicit" ]; then',
|
|
6072
|
+
` exec '${path.join(nativeToolchain(), 'clang')}' "-fmodule-name=$name" "$@"`,
|
|
6073
|
+
'fi',
|
|
6074
|
+
`exec '${path.join(nativeToolchain(), 'clang')}' "$@"`,
|
|
6061
6075
|
'',
|
|
6062
6076
|
].join('\n'),
|
|
6063
6077
|
)
|
|
@@ -6658,7 +6672,7 @@ export function frameworkLinkClosure(
|
|
|
6658
6672
|
const deps = new Set<string>()
|
|
6659
6673
|
for (const file of paths) {
|
|
6660
6674
|
const module = /\/Modules\/([^/]+)\.swiftmodule$/.exec(file)
|
|
6661
|
-
const object = /\/([^/]+)\.build
|
|
6675
|
+
const object = /\/release\/([^/]+)\.build\/.+\.o$/.exec(file)
|
|
6662
6676
|
if (module) deps.add(module[1]!)
|
|
6663
6677
|
else if (object && object[1] !== pending.name) deps.add(object[1]!)
|
|
6664
6678
|
}
|
|
@@ -111,9 +111,13 @@ export function sourceGuestClangLinkOptions(options: {
|
|
|
111
111
|
throw new Error(`unsupported source object producer ${file}`)
|
|
112
112
|
const args = command.args.slice(1).filter((arg) => arg !== '-c')
|
|
113
113
|
// the replay keeps the object's <target>.build directory name
|
|
114
|
+
const targetBuild = path
|
|
115
|
+
.relative(options.buildDirectory, file)
|
|
116
|
+
.split(path.sep)
|
|
117
|
+
.findLast((part) => part !== '.build' && part.endsWith('.build'))
|
|
114
118
|
const outputDirectory = path.join(
|
|
115
119
|
options.directory,
|
|
116
|
-
path.basename(path.dirname(file)),
|
|
120
|
+
targetBuild ?? path.basename(path.dirname(file)),
|
|
117
121
|
)
|
|
118
122
|
mkdirSync(outputDirectory, { recursive: true })
|
|
119
123
|
const output = path.join(outputDirectory, `clang-link-${index}.ll`)
|
|
@@ -46,10 +46,11 @@ export function applyInstalledSwiftTargets(
|
|
|
46
46
|
].map((bundle) => [bundle.target, bundle]),
|
|
47
47
|
).values(),
|
|
48
48
|
]
|
|
49
|
-
|
|
49
|
+
const headerAliases = {
|
|
50
50
|
...collection.headerAliases,
|
|
51
51
|
...snapshot.input.headerAliases,
|
|
52
52
|
}
|
|
53
|
+
collection.headerAliases = headerAliases
|
|
53
54
|
const canonical = new Map<string, string>()
|
|
54
55
|
for (const [key, source] of Object.entries(snapshot.sourcePaths)) {
|
|
55
56
|
const real = fs.realpathSync(source)
|
|
@@ -133,6 +134,8 @@ export function applyInstalledSwiftTargets(
|
|
|
133
134
|
?.find((candidate) => candidate.content === content)
|
|
134
135
|
if (!match) continue
|
|
135
136
|
roots.add(match.root)
|
|
137
|
+
aliases[file] = copy
|
|
138
|
+
headerAliases[file] = copy
|
|
136
139
|
delete collection.files[file]
|
|
137
140
|
}
|
|
138
141
|
return roots
|
package/src/swift-wasm-prune.ts
CHANGED
|
@@ -1230,6 +1230,7 @@ export function pruneSwiftWasmLink(
|
|
|
1230
1230
|
const eagerFiles: string[] = []
|
|
1231
1231
|
const lazyBuildObjects = new Map<string, ParsedObject>()
|
|
1232
1232
|
const extraArchiveObjs: ParsedObject[] = []
|
|
1233
|
+
const objectBytes = new Map<ParsedObject, Buffer>()
|
|
1233
1234
|
let inStartLib = false
|
|
1234
1235
|
let swiftrtOrigPath = ''
|
|
1235
1236
|
|
|
@@ -1295,7 +1296,9 @@ export function pruneSwiftWasmLink(
|
|
|
1295
1296
|
) {
|
|
1296
1297
|
const members = readArMembers(new Uint8Array(fs.readFileSync(t)))
|
|
1297
1298
|
for (const m of members) {
|
|
1298
|
-
|
|
1299
|
+
const object = parseWasmObjectBytes(`${t}(${m.name})`, m.bytes, false)
|
|
1300
|
+
extraArchiveObjs.push(object)
|
|
1301
|
+
objectBytes.set(object, Buffer.from(m.bytes))
|
|
1299
1302
|
}
|
|
1300
1303
|
}
|
|
1301
1304
|
}
|
|
@@ -1753,7 +1756,6 @@ export function pruneSwiftWasmLink(
|
|
|
1753
1756
|
// the runtime resolves a clang-imported class named in a mangled type name,
|
|
1754
1757
|
// such as the argument of Outcome<AVTimedMetadataGroup>, by objc_getClass
|
|
1755
1758
|
// alone: no relocation reaches the class, so a live name keeps its provider.
|
|
1756
|
-
const objectBytes = new Map<ParsedObject, Buffer>()
|
|
1757
1759
|
const keepObjCClassesNamedInSegment = (obj: ParsedObject, segIdx: number) => {
|
|
1758
1760
|
const range = obj.segPayloadRanges[segIdx]
|
|
1759
1761
|
if (!range) return
|