peachsim 0.1.2180 → 0.1.2185
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/shell-url.ts +28 -22
- package/cli/outbound-endpoints.ts +11 -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 +457 -96
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +352 -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 +415 -85
- package/dist-lib/host/fetch-proxy-handler.cjs +7 -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 +7 -4
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +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 +7 -4
- package/dist-lib/native-app-identity-project.cjs +6 -3
- package/dist-lib/native-app-identity-project.mjs +6 -3
- 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 +25 -24
- package/dist-lib/public-origins-lib.json +63 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +447 -93
- package/dist-lib/swift-compile.cjs +13 -4
- package/dist-lib/swift-compile.mjs +13 -4
- package/dist-lib/swift-package.cjs +26 -1
- package/dist-lib/swift-package.mjs +25 -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 +298 -27
- package/dist-lib/vite.cjs +7 -4
- 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/map-command-channel.d.ts +14 -0
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/ActivityKit.framework/Headers/ActivityKit.h +1 -0
- package/sdk/ios/System/Library/Frameworks/ActivityKit.framework/Modules/module.modulemap +4 -0
- package/sdk/ios/usr/lib/swift/ActivityKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +14 -0
- package/sdk/ios/usr/lib/swift/CoreGraphics.swiftmodule/arm64-apple-ios-simulator.swiftinterface +14 -0
- package/sdk/ios/usr/lib/swift/Dispatch.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -0
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +147 -16
- package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +5 -0
- package/src/expo-native-workspace.ts +19 -21
- package/src/expo-swift-bundle.ts +6 -1
- package/src/expo-swift-host.ts +35 -6
- package/src/expoSwiftContract.ts +3 -0
- package/src/native-bundles.ts +30 -10
- package/src/one-sdk/source.ts +10 -4
- package/src/one-sdk-bundle.ts +56 -24
- package/src/swift-compile.ts +3 -1
- package/src/swift-interface-bodies.ts +165 -0
- package/src/swift-objc-standin.ts +73 -13
- package/src/swift-package.ts +26 -0
- package/src/swift-source-pods.ts +27 -4
- package/src/swift-standin-emit.ts +30 -3
- package/src/swift-standins.ts +75 -12
- package/src/swift-submit.ts +2 -1
- package/src/wasm-optimize.ts +11 -1
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2185 | (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;
|
|
@@ -39,7 +39,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
39
39
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
40
40
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
41
41
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
42
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1", "swift-coverage/source.ts": "c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "65a0698bf022ace2f4254f3f891828dedf403d61c102238e242084a2279e04eb", "home-paths.ts": "f5583b61f8bdd81823b3b29ff519a48daf9993719f194ddb7de22218472e90f9", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "5f41cd0bd86cb0cffbfb0047348b963f81d5e51cb0e8dd574c739b1a27aa56de", "xcode-target-members.ts": "ad7589132bffab265e8a10b64e24484fe88b4a2b1cc0ee19a97f151a002eca77", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -30850,7 +30850,7 @@ var init_swift_submit = __esm({
|
|
|
30850
30850
|
MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
30851
30851
|
MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
30852
30852
|
MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
30853
|
-
SWIFT_HOST_ABI =
|
|
30853
|
+
SWIFT_HOST_ABI = 70;
|
|
30854
30854
|
POLL_INTERVAL_MS = 1500;
|
|
30855
30855
|
}
|
|
30856
30856
|
});
|
|
@@ -36554,6 +36554,29 @@ function moduleMapName(text6) {
|
|
|
36554
36554
|
);
|
|
36555
36555
|
return index < 0 ? void 0 : tokens2[index + 1];
|
|
36556
36556
|
}
|
|
36557
|
+
function moduleMapModules(text6) {
|
|
36558
|
+
const modules = [];
|
|
36559
|
+
const token = /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|\{|\}|\bmodule\s+([\w.]+)/g;
|
|
36560
|
+
let depth = 0;
|
|
36561
|
+
let start = -1;
|
|
36562
|
+
let name3 = "";
|
|
36563
|
+
for (const match of text6.matchAll(token)) {
|
|
36564
|
+
if (match[0] === "{") depth++;
|
|
36565
|
+
else if (match[0] === "}") {
|
|
36566
|
+
depth--;
|
|
36567
|
+
if (depth === 0 && start >= 0) {
|
|
36568
|
+
modules.push({ name: name3, text: text6.slice(start, match.index + 1) });
|
|
36569
|
+
start = -1;
|
|
36570
|
+
}
|
|
36571
|
+
} else if (match[1] !== void 0 && depth === 0) {
|
|
36572
|
+
const before = text6.slice(0, match.index).trimEnd();
|
|
36573
|
+
if (/\bextern$/.test(before)) continue;
|
|
36574
|
+
start = match.index;
|
|
36575
|
+
name3 = match[1];
|
|
36576
|
+
}
|
|
36577
|
+
}
|
|
36578
|
+
return modules;
|
|
36579
|
+
}
|
|
36557
36580
|
function swiftTargetModuleName(name3) {
|
|
36558
36581
|
return name3.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
36559
36582
|
}
|
|
@@ -42932,6 +42955,143 @@ var init_swift_objc_runtime = __esm({
|
|
|
42932
42955
|
}
|
|
42933
42956
|
});
|
|
42934
42957
|
|
|
42958
|
+
// src/swift-interface-bodies.ts
|
|
42959
|
+
function declarationKind(head) {
|
|
42960
|
+
const words2 = head.replace(/@\w+(?:\((?:[^()]|\([^()]*\))*\))?/g, " ").match(/[A-Za-z_]\w*/g);
|
|
42961
|
+
for (const word of words2 ?? []) {
|
|
42962
|
+
if (word === "func" || word === "init" || word === "deinit") return "function";
|
|
42963
|
+
if (word === "var" || word === "let" || word === "subscript") return "property";
|
|
42964
|
+
if (word === "struct" || word === "class" || word === "enum" || word === "protocol" || word === "extension" || word === "actor" || word === "precedencegroup")
|
|
42965
|
+
return "container";
|
|
42966
|
+
}
|
|
42967
|
+
return "container";
|
|
42968
|
+
}
|
|
42969
|
+
function skipLiteral(text6, i) {
|
|
42970
|
+
if (text6.startsWith("//", i)) {
|
|
42971
|
+
const end = text6.indexOf("\n", i);
|
|
42972
|
+
return end < 0 ? text6.length : end;
|
|
42973
|
+
}
|
|
42974
|
+
if (text6.startsWith("/*", i)) {
|
|
42975
|
+
const end = text6.indexOf("*/", i + 2);
|
|
42976
|
+
return end < 0 ? text6.length : end + 2;
|
|
42977
|
+
}
|
|
42978
|
+
if (text6[i] !== '"' && text6[i] !== "#") return i;
|
|
42979
|
+
let hashes = 0;
|
|
42980
|
+
let j = i;
|
|
42981
|
+
while (text6[j] === "#") {
|
|
42982
|
+
hashes++;
|
|
42983
|
+
j++;
|
|
42984
|
+
}
|
|
42985
|
+
if (text6[j] !== '"') return i;
|
|
42986
|
+
const multiline = text6.startsWith('"""', j);
|
|
42987
|
+
const open = multiline ? '"""' : '"';
|
|
42988
|
+
j += open.length;
|
|
42989
|
+
const close = `${open}${"#".repeat(hashes)}`;
|
|
42990
|
+
const escape2 = `\\${"#".repeat(hashes)}`;
|
|
42991
|
+
while (j < text6.length) {
|
|
42992
|
+
if (text6.startsWith(escape2, j)) j += escape2.length + 1;
|
|
42993
|
+
else if (text6.startsWith(close, j)) return j + close.length;
|
|
42994
|
+
else j++;
|
|
42995
|
+
}
|
|
42996
|
+
return text6.length;
|
|
42997
|
+
}
|
|
42998
|
+
function skipBlock(text6, open) {
|
|
42999
|
+
let depth = 0;
|
|
43000
|
+
for (let i = open; i < text6.length; ) {
|
|
43001
|
+
const after = skipLiteral(text6, i);
|
|
43002
|
+
if (after !== i) {
|
|
43003
|
+
i = after;
|
|
43004
|
+
continue;
|
|
43005
|
+
}
|
|
43006
|
+
if (text6[i] === "{") depth++;
|
|
43007
|
+
else if (text6[i] === "}" && --depth === 0) return i + 1;
|
|
43008
|
+
i++;
|
|
43009
|
+
}
|
|
43010
|
+
return text6.length;
|
|
43011
|
+
}
|
|
43012
|
+
function skipExpression(text6, start) {
|
|
43013
|
+
let depth = 0;
|
|
43014
|
+
for (let i = start; i < text6.length; ) {
|
|
43015
|
+
const after = skipLiteral(text6, i);
|
|
43016
|
+
if (after !== i) {
|
|
43017
|
+
i = after;
|
|
43018
|
+
continue;
|
|
43019
|
+
}
|
|
43020
|
+
const char = text6[i];
|
|
43021
|
+
if (char === "(" || char === "[" || char === "{" || char === "<") depth++;
|
|
43022
|
+
else if (char === ">" && text6[i - 1] !== "-") depth--;
|
|
43023
|
+
else if (char === ")" || char === "]" || char === "}") {
|
|
43024
|
+
if (depth === 0) return i;
|
|
43025
|
+
depth--;
|
|
43026
|
+
} else if (char === "," && depth === 0) return i;
|
|
43027
|
+
i++;
|
|
43028
|
+
}
|
|
43029
|
+
return text6.length;
|
|
43030
|
+
}
|
|
43031
|
+
function swiftInterfaceWithoutBodies(text6, keepDefaults = false) {
|
|
43032
|
+
let out = "";
|
|
43033
|
+
const frames = [];
|
|
43034
|
+
let parens = 0;
|
|
43035
|
+
let lineStart = 0;
|
|
43036
|
+
for (let i = 0; i < text6.length; ) {
|
|
43037
|
+
const after = skipLiteral(text6, i);
|
|
43038
|
+
if (after !== i) {
|
|
43039
|
+
out += text6.slice(i, after);
|
|
43040
|
+
i = after;
|
|
43041
|
+
continue;
|
|
43042
|
+
}
|
|
43043
|
+
const char = text6[i];
|
|
43044
|
+
if (char === "=" && parens > 0 && text6[i - 1] === " " && text6[i + 1] === " ") {
|
|
43045
|
+
out = out.trimEnd();
|
|
43046
|
+
i = skipExpression(text6, i + 1);
|
|
43047
|
+
continue;
|
|
43048
|
+
}
|
|
43049
|
+
if (char === "\n") lineStart = out.length + 1;
|
|
43050
|
+
else if (char === "(") parens++;
|
|
43051
|
+
else if (char === ")") parens--;
|
|
43052
|
+
else if (char === "}") {
|
|
43053
|
+
frames.pop();
|
|
43054
|
+
} else if (char === "{") {
|
|
43055
|
+
const parent = frames.at(-1);
|
|
43056
|
+
const head = out.slice(lineStart);
|
|
43057
|
+
if (parens > 0 || parent === "expression") frames.push("expression");
|
|
43058
|
+
else if (parent === "accessors") {
|
|
43059
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
43060
|
+
i = skipBlock(text6, i);
|
|
43061
|
+
continue;
|
|
43062
|
+
} else {
|
|
43063
|
+
const kind = declarationKind(head);
|
|
43064
|
+
const body = text6.slice(i + 1, skipBlock(text6, i) - 1);
|
|
43065
|
+
if (kind === "function") {
|
|
43066
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
43067
|
+
i = skipBlock(text6, i);
|
|
43068
|
+
continue;
|
|
43069
|
+
}
|
|
43070
|
+
const bare = body.split(/\s+/).every((word) => word === "" || ACCESSOR.test(word));
|
|
43071
|
+
frames.push(kind === "property" && !bare ? "accessors" : "container");
|
|
43072
|
+
if (kind === "property" && bare) {
|
|
43073
|
+
out += `{${body}}`;
|
|
43074
|
+
i = skipBlock(text6, i);
|
|
43075
|
+
frames.pop();
|
|
43076
|
+
continue;
|
|
43077
|
+
}
|
|
43078
|
+
}
|
|
43079
|
+
}
|
|
43080
|
+
out += char;
|
|
43081
|
+
i++;
|
|
43082
|
+
}
|
|
43083
|
+
return out.replace(INLINE_ATTRIBUTE, "");
|
|
43084
|
+
}
|
|
43085
|
+
var INLINE_ATTRIBUTE, ACCESSOR;
|
|
43086
|
+
var init_swift_interface_bodies = __esm({
|
|
43087
|
+
"src/swift-interface-bodies.ts"() {
|
|
43088
|
+
"use strict";
|
|
43089
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
43090
|
+
INLINE_ATTRIBUTE = /@(?:inlinable|_alwaysEmitIntoClient|_transparent|inline\(__always\)|_effects\([^()]*\)|_specialize\((?:[^()]|\([^()]*\))*\))\s*/g;
|
|
43091
|
+
ACCESSOR = /^(?:mutating|nonmutating|async|throws|rethrows|get|set|_modify|_read)$/;
|
|
43092
|
+
}
|
|
43093
|
+
});
|
|
43094
|
+
|
|
42935
43095
|
// src/swift-objc-sdk.ts
|
|
42936
43096
|
var import_node_path31, IOS_SDK_TARGET, OVERLAY_PATH, tree, IOS_SDK_HEADERS, IOS_SDK_OVERLAYS;
|
|
42937
43097
|
var init_swift_objc_sdk = __esm({
|
|
@@ -42977,7 +43137,7 @@ function restoreSwiftInterfaceSPI(interfaceText, module2, graphs) {
|
|
|
42977
43137
|
let depth = 0;
|
|
42978
43138
|
for (const line of interfaceText.split("\n")) {
|
|
42979
43139
|
const enclosing = scopes.at(-1)?.path ?? [];
|
|
42980
|
-
const declaration = /^\s*(?:@[\w.]+(?:\([^)]*\))?\s+|\w+\s+)*?(class(?!\s+(?:func|var|subscript)\b)|struct|enum|protocol|actor|extension|func|var|let|init|subscript|typealias|case)\b\s*([\w.`]*)/.exec(
|
|
43140
|
+
const declaration = /^\s*(?:@[\w.]+(?:\([^)]*\))?\s+|\w+\s+)*?(class(?!\s+(?:func|var|subscript)\b)|struct|enum|protocol|actor|extension|func|var|let|init|subscript|typealias|case)\b\s*([/=\-+!*%<>&|^~?]+|[\w.`]*)/.exec(
|
|
42981
43141
|
line.replace(/::/g, ".")
|
|
42982
43142
|
);
|
|
42983
43143
|
if (declaration) {
|
|
@@ -43899,7 +44059,12 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
43899
44059
|
const list2 = [
|
|
43900
44060
|
...parent ? [parent] : [],
|
|
43901
44061
|
...(conforms.get(id) ?? []).filter(
|
|
43902
|
-
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
44062
|
+
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
44063
|
+
"Hashable",
|
|
44064
|
+
"Equatable",
|
|
44065
|
+
"CustomStringConvertible",
|
|
44066
|
+
"CustomDebugStringConvertible"
|
|
44067
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path133)?.has(name3)
|
|
43903
44068
|
)
|
|
43904
44069
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
43905
44070
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -44406,7 +44571,26 @@ var init_swift_standin_emit = __esm({
|
|
|
44406
44571
|
["s:SE", "Encodable"],
|
|
44407
44572
|
["s:Se", "Decodable"],
|
|
44408
44573
|
["s:s23CustomStringConvertibleP", "CustomStringConvertible"],
|
|
44409
|
-
["s:s9CodingKeyP", "CodingKey"]
|
|
44574
|
+
["s:s9CodingKeyP", "CodingKey"],
|
|
44575
|
+
["s:SL", "Comparable"],
|
|
44576
|
+
["s:ST", "Sequence"],
|
|
44577
|
+
["s:St", "IteratorProtocol"],
|
|
44578
|
+
["s:Sl", "Collection"],
|
|
44579
|
+
["s:SK", "BidirectionalCollection"],
|
|
44580
|
+
["s:Sk", "RandomAccessCollection"],
|
|
44581
|
+
["s:SM", "MutableCollection"],
|
|
44582
|
+
["s:Sm", "RangeReplaceableCollection"],
|
|
44583
|
+
["s:s28CustomDebugStringConvertibleP", "CustomDebugStringConvertible"],
|
|
44584
|
+
["s:s25LosslessStringConvertibleP", "LosslessStringConvertible"],
|
|
44585
|
+
["s:s20TextOutputStreamableP", "TextOutputStreamable"],
|
|
44586
|
+
["s:Sx", "Strideable"],
|
|
44587
|
+
["s:s18AdditiveArithmeticP", "AdditiveArithmetic"],
|
|
44588
|
+
["s:s25ExpressibleByArrayLiteralP", "ExpressibleByArrayLiteral"],
|
|
44589
|
+
["s:s30ExpressibleByDictionaryLiteralP", "ExpressibleByDictionaryLiteral"],
|
|
44590
|
+
["s:s26ExpressibleByStringLiteralP", "ExpressibleByStringLiteral"],
|
|
44591
|
+
["s:s27ExpressibleByIntegerLiteralP", "ExpressibleByIntegerLiteral"],
|
|
44592
|
+
["s:s25ExpressibleByFloatLiteralP", "ExpressibleByFloatLiteral"],
|
|
44593
|
+
["s:s27ExpressibleByBooleanLiteralP", "ExpressibleByBooleanLiteral"]
|
|
44410
44594
|
]);
|
|
44411
44595
|
LEADING_ATTRS = /^((?:@\w+(?:\([^)]*\))?\s*|nonisolated\s+)*)(.*)$/s;
|
|
44412
44596
|
OBJC_ONLY = /@(?:objcMembers|objc|IBOutlet|IBInspectable|IBAction|IBSegueAction|GKInspectable|nonobjc|NSCopying|NSManaged)(?:\([^)]*\))?\s*|\bdynamic\s+/g;
|
|
@@ -44720,6 +44904,43 @@ function sdkDeclaration(name3) {
|
|
|
44720
44904
|
}
|
|
44721
44905
|
return sdkDeclarations.get(name3) ?? null;
|
|
44722
44906
|
}
|
|
44907
|
+
function intakeInterface(text6, keepDefaults = false) {
|
|
44908
|
+
return swiftInterfaceWithoutBodies(text6, keepDefaults).replace(/^((?:@_exported[ \t]+)?import[ \t]+)(\w+)\.[\w.]+[ \t]*$/gm, "$1$2").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.").replace(/\bDarwin\.OSStatus\b/g, "Swift.Int32").replace(
|
|
44909
|
+
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
44910
|
+
"Foundation.NSData."
|
|
44911
|
+
);
|
|
44912
|
+
}
|
|
44913
|
+
function stageVendorFrameworks(dir, stage) {
|
|
44914
|
+
import_node_fs35.default.mkdirSync(stage, { recursive: true });
|
|
44915
|
+
for (const entry of import_node_fs35.default.readdirSync(dir)) {
|
|
44916
|
+
if (!entry.endsWith(".framework")) continue;
|
|
44917
|
+
const source = import_node_path32.default.join(dir, entry);
|
|
44918
|
+
const target = import_node_path32.default.join(stage, entry);
|
|
44919
|
+
import_node_fs35.default.mkdirSync(target, { recursive: true });
|
|
44920
|
+
for (const child of import_node_fs35.default.readdirSync(source)) {
|
|
44921
|
+
if (child !== "Modules") {
|
|
44922
|
+
import_node_fs35.default.symlinkSync(import_node_path32.default.join(source, child), import_node_path32.default.join(target, child));
|
|
44923
|
+
continue;
|
|
44924
|
+
}
|
|
44925
|
+
for (const file of import_node_fs35.default.readdirSync(import_node_path32.default.join(source, child), {
|
|
44926
|
+
recursive: true,
|
|
44927
|
+
encoding: "utf8"
|
|
44928
|
+
})) {
|
|
44929
|
+
const from = import_node_path32.default.join(source, child, file);
|
|
44930
|
+
const to = import_node_path32.default.join(target, child, file);
|
|
44931
|
+
if (import_node_fs35.default.statSync(from).isDirectory()) {
|
|
44932
|
+
import_node_fs35.default.mkdirSync(to, { recursive: true });
|
|
44933
|
+
continue;
|
|
44934
|
+
}
|
|
44935
|
+
import_node_fs35.default.mkdirSync(import_node_path32.default.dirname(to), { recursive: true });
|
|
44936
|
+
if (file.endsWith(".swiftinterface"))
|
|
44937
|
+
import_node_fs35.default.writeFileSync(to, intakeInterface(import_node_fs35.default.readFileSync(from, "utf8")));
|
|
44938
|
+
else import_node_fs35.default.copyFileSync(from, to);
|
|
44939
|
+
}
|
|
44940
|
+
}
|
|
44941
|
+
}
|
|
44942
|
+
return stage;
|
|
44943
|
+
}
|
|
44723
44944
|
function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vendorFrameworks = []) {
|
|
44724
44945
|
if (!import_node_fs35.default.existsSync(stdlib))
|
|
44725
44946
|
throw new Error(
|
|
@@ -44747,6 +44968,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44747
44968
|
import_node_fs35.default.writeFileSync(file, text6);
|
|
44748
44969
|
}
|
|
44749
44970
|
const interfaceCopies = [];
|
|
44971
|
+
let keepDefaults = true;
|
|
44750
44972
|
if (framework) {
|
|
44751
44973
|
import_node_fs35.default.mkdirSync(import_node_path32.default.join(frameworks, `${surface.module}.framework`, "Modules"), {
|
|
44752
44974
|
recursive: true
|
|
@@ -44773,10 +44995,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44773
44995
|
interfaceCopies.push(import_node_path32.default.join(to, name3));
|
|
44774
44996
|
import_node_fs35.default.writeFileSync(
|
|
44775
44997
|
import_node_path32.default.join(to, name3),
|
|
44776
|
-
import_node_fs35.default.readFileSync(import_node_path32.default.join(from, name3), "utf8")
|
|
44777
|
-
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
44778
|
-
"Foundation.NSData."
|
|
44779
|
-
)
|
|
44998
|
+
intakeInterface(import_node_fs35.default.readFileSync(import_node_path32.default.join(from, name3), "utf8"), true)
|
|
44780
44999
|
);
|
|
44781
45000
|
}
|
|
44782
45001
|
}
|
|
@@ -44838,7 +45057,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44838
45057
|
stubs,
|
|
44839
45058
|
"-I",
|
|
44840
45059
|
stubIncludes,
|
|
44841
|
-
...vendorFrameworks.flatMap((dir) => [
|
|
45060
|
+
...vendorFrameworks.flatMap((dir, index) => [
|
|
45061
|
+
"-F",
|
|
45062
|
+
stageVendorFrameworks(dir, import_node_path32.default.join(work, "vendor-frameworks", String(index)))
|
|
45063
|
+
])
|
|
44842
45064
|
];
|
|
44843
45065
|
const missing2 = /* @__PURE__ */ new Map();
|
|
44844
45066
|
const stubbed = /* @__PURE__ */ new Set();
|
|
@@ -45044,6 +45266,13 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
45044
45266
|
);
|
|
45045
45267
|
}
|
|
45046
45268
|
}
|
|
45269
|
+
if ((!progress || round === ROUNDS) && keepDefaults && interfaceCopies.length > 0) {
|
|
45270
|
+
keepDefaults = false;
|
|
45271
|
+
for (const file of interfaceCopies)
|
|
45272
|
+
import_node_fs35.default.writeFileSync(file, swiftInterfaceWithoutBodies(import_node_fs35.default.readFileSync(file, "utf8")));
|
|
45273
|
+
writeHeaders();
|
|
45274
|
+
continue;
|
|
45275
|
+
}
|
|
45047
45276
|
if (!progress || round === ROUNDS)
|
|
45048
45277
|
throw new Error(
|
|
45049
45278
|
`its headers do not import as Swift: ${errors.length > 0 ? [...new Set(errors.map((match) => match[4]))].slice(0, 10).join("; ") : `swift-symbolgraph-extract ${run12.signal ?? `exit ${run12.status}`}: ${(run12.stderr.trim() || run12.stdout.trim() || "no diagnostic").slice(0, 4e3)}`}`
|
|
@@ -45608,6 +45837,7 @@ var init_swift_objc_standin = __esm({
|
|
|
45608
45837
|
import_node_fs35 = __toESM(require("node:fs"), 1);
|
|
45609
45838
|
import_node_path32 = __toESM(require("node:path"), 1);
|
|
45610
45839
|
init_is_record();
|
|
45840
|
+
init_swift_interface_bodies();
|
|
45611
45841
|
init_swift_objc_platform();
|
|
45612
45842
|
init_swift_objc_sdk();
|
|
45613
45843
|
init_swift_package();
|
|
@@ -51918,6 +52148,13 @@ var init_swift_guest_source_inputs = __esm({
|
|
|
51918
52148
|
|
|
51919
52149
|
// src/wasm-optimize.ts
|
|
51920
52150
|
async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
52151
|
+
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
52152
|
+
const requestedCores = Number(process.env.BINARYEN_CORES);
|
|
52153
|
+
const environment = { ...process.env, WASM_OPT_PATH: binary2 };
|
|
52154
|
+
if (Number.isInteger(admittedCores) && admittedCores > 0)
|
|
52155
|
+
environment.BINARYEN_CORES = String(
|
|
52156
|
+
Number.isInteger(requestedCores) && requestedCores > 0 ? Math.min(admittedCores, requestedCores) : admittedCores
|
|
52157
|
+
);
|
|
51921
52158
|
const result = await (0, import_wasm_opt.wasmOpt)(
|
|
51922
52159
|
[
|
|
51923
52160
|
"-Oz",
|
|
@@ -51927,7 +52164,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
|
51927
52164
|
"-o",
|
|
51928
52165
|
output2
|
|
51929
52166
|
],
|
|
51930
|
-
{ env:
|
|
52167
|
+
{ env: environment }
|
|
51931
52168
|
);
|
|
51932
52169
|
if (result.status !== 0)
|
|
51933
52170
|
throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`);
|
|
@@ -51963,6 +52200,7 @@ var init_wasm_optimize = __esm({
|
|
|
51963
52200
|
import_node_path41 = require("node:path");
|
|
51964
52201
|
init_src();
|
|
51965
52202
|
import_wasm_opt = require("wasm-opt");
|
|
52203
|
+
init_admitted_mac_build();
|
|
51966
52204
|
init_home_paths();
|
|
51967
52205
|
FEATURES = [
|
|
51968
52206
|
"threads",
|
|
@@ -56705,7 +56943,7 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
56705
56943
|
return null;
|
|
56706
56944
|
const bytes = (0, import_node_fs53.readFileSync)(import_node_path50.default.join(directory2, "app.wasm"));
|
|
56707
56945
|
const gzip2 = (0, import_node_fs53.readFileSync)(import_node_path50.default.join(directory2, "icu.gz"));
|
|
56708
|
-
if ((0, import_node_crypto25.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto25.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length
|
|
56946
|
+
if ((0, import_node_crypto25.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto25.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
|
|
56709
56947
|
return null;
|
|
56710
56948
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 } };
|
|
56711
56949
|
} catch (error) {
|
|
@@ -57758,6 +57996,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
57758
57996
|
bytes: (0, import_node_fs53.readFileSync)(executable),
|
|
57759
57997
|
icu: await icu
|
|
57760
57998
|
};
|
|
57999
|
+
if (artifact.bytes.length <= 8)
|
|
58000
|
+
throw new Error("swift-compile: deferred linker produced no executable");
|
|
57761
58001
|
if (!options.project) saveCompiledArtifact(root, artifact);
|
|
57762
58002
|
saveSharedArtifact(sharedRoot, artifact);
|
|
57763
58003
|
report("compiled artifact verified");
|
|
@@ -57937,7 +58177,7 @@ var init_swift_compile = __esm({
|
|
|
57937
58177
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
57938
58178
|
MULTI_MANIFEST_VERSION = 68;
|
|
57939
58179
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
57940
|
-
compilerSourceDigest = true ? "
|
|
58180
|
+
compilerSourceDigest = true ? "e48d05f659c020e9d4ddc0f6a17da7924aae807faacd6bef7cbed911c43d08cc" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
57941
58181
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
57942
58182
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
57943
58183
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -63686,7 +63926,7 @@ function initializeWorkspaceGit(root, work) {
|
|
|
63686
63926
|
});
|
|
63687
63927
|
const tracked = trackedSourceFiles(root, work);
|
|
63688
63928
|
if (tracked.length > 0)
|
|
63689
|
-
(0, import_node_child_process36.execFileSync)("git", ["
|
|
63929
|
+
(0, import_node_child_process36.execFileSync)("git", ["update-index", "--add", "-z", "--stdin"], {
|
|
63690
63930
|
cwd: work,
|
|
63691
63931
|
env: { ...process.env, ...isolatedGitEnv },
|
|
63692
63932
|
input: tracked.join("\0"),
|
|
@@ -63786,6 +64026,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
63786
64026
|
const nodeVersion = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? manifest.engines.node : null;
|
|
63787
64027
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, "--"] : [];
|
|
63788
64028
|
const bunPrefix = import_node_path61.default.join(cacheDir(), "package-managers", manager);
|
|
64029
|
+
const bunExecutable = import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun");
|
|
63789
64030
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
63790
64031
|
"npx",
|
|
63791
64032
|
"--yes",
|
|
@@ -63794,11 +64035,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
63794
64035
|
"--frozen-lockfile",
|
|
63795
64036
|
// the copied node_modules link into the store pnpm chose on the app's volume
|
|
63796
64037
|
...pnpmStoreArgs(root)
|
|
63797
|
-
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [
|
|
63798
|
-
import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun"),
|
|
63799
|
-
"install",
|
|
63800
|
-
"--frozen-lockfile"
|
|
63801
|
-
] : (
|
|
64038
|
+
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [bunExecutable, "install", "--frozen-lockfile"] : (
|
|
63802
64039
|
// npm ci would delete the cloned tree before installing it again
|
|
63803
64040
|
["npm", "install", "--no-audit", "--no-fund"]
|
|
63804
64041
|
);
|
|
@@ -63807,22 +64044,22 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
63807
64044
|
const command = [...prefix, ...args];
|
|
63808
64045
|
await run12(command[0], command.slice(1), cwd, env);
|
|
63809
64046
|
};
|
|
64047
|
+
if (manager.startsWith("bun@") && (!projectReady || !import_node_fs63.default.existsSync(bunExecutable)))
|
|
64048
|
+
await execute(
|
|
64049
|
+
[
|
|
64050
|
+
"npm",
|
|
64051
|
+
"install",
|
|
64052
|
+
"--prefix",
|
|
64053
|
+
bunPrefix,
|
|
64054
|
+
// the bun package ships a placeholder binary its postinstall replaces
|
|
64055
|
+
"--ignore-scripts=false",
|
|
64056
|
+
"--no-audit",
|
|
64057
|
+
"--no-fund",
|
|
64058
|
+
manager
|
|
64059
|
+
],
|
|
64060
|
+
work
|
|
64061
|
+
);
|
|
63810
64062
|
if (!projectReady) {
|
|
63811
|
-
if (manager.startsWith("bun@"))
|
|
63812
|
-
await execute(
|
|
63813
|
-
[
|
|
63814
|
-
"npm",
|
|
63815
|
-
"install",
|
|
63816
|
-
"--prefix",
|
|
63817
|
-
bunPrefix,
|
|
63818
|
-
// the bun package ships a placeholder binary its postinstall replaces
|
|
63819
|
-
"--ignore-scripts=false",
|
|
63820
|
-
"--no-audit",
|
|
63821
|
-
"--no-fund",
|
|
63822
|
-
manager
|
|
63823
|
-
],
|
|
63824
|
-
work
|
|
63825
|
-
);
|
|
63826
64063
|
if (install[0] === "npm" && import_node_fs63.default.existsSync(import_node_path61.default.join(work, "package-lock.json"))) {
|
|
63827
64064
|
await execute(
|
|
63828
64065
|
["npm", "ci", "--dry-run", "--ignore-scripts", "--no-audit", "--no-fund"],
|
|
@@ -64506,7 +64743,7 @@ var init_swift_standin_digest = __esm({
|
|
|
64506
64743
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
64507
64744
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
64508
64745
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
64509
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
64746
|
+
STANDIN_SOURCE_DIGEST = true ? "0981767eef4ad46fe5cb602ee15f1de9ea06dac3a2edb4dab0f6d5279b018a3b" : standinSourceDigest();
|
|
64510
64747
|
}
|
|
64511
64748
|
});
|
|
64512
64749
|
|
|
@@ -64962,7 +65199,7 @@ var init_package_tree_digest = __esm({
|
|
|
64962
65199
|
|
|
64963
65200
|
// src/expo-native-prebuilt.ts
|
|
64964
65201
|
function expoNativeCompilerDigestValue() {
|
|
64965
|
-
return true ? "
|
|
65202
|
+
return true ? "5096ba1e78a0087b6e56f15c4b37fcbd9bcabb2acde17a257d8add357efd462c" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
64966
65203
|
}
|
|
64967
65204
|
function readSources(value) {
|
|
64968
65205
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -67250,6 +67487,19 @@ function cxxOnly(surface) {
|
|
|
67250
67487
|
return false;
|
|
67251
67488
|
});
|
|
67252
67489
|
}
|
|
67490
|
+
function mapSurfaces(modulemap) {
|
|
67491
|
+
const text6 = import_node_fs77.default.readFileSync(modulemap, "utf8");
|
|
67492
|
+
const headers = import_node_path74.default.dirname(modulemap);
|
|
67493
|
+
const modules = moduleMapModules(text6);
|
|
67494
|
+
if (modules.length <= 1) {
|
|
67495
|
+
const module2 = moduleMapName(text6);
|
|
67496
|
+
return module2 ? [headerSurface(module2, modulemap, headers)] : [];
|
|
67497
|
+
}
|
|
67498
|
+
return modules.map(
|
|
67499
|
+
(module2) => headerSurface(module2.name, generatedModuleMap(`${module2.text}
|
|
67500
|
+
`, false), headers)
|
|
67501
|
+
);
|
|
67502
|
+
}
|
|
67253
67503
|
function simulatorSlice(xcframeworkDir) {
|
|
67254
67504
|
const slice = import_node_fs77.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
|
|
67255
67505
|
return slice ? import_node_path74.default.join(xcframeworkDir, slice) : null;
|
|
@@ -67313,8 +67563,7 @@ function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)
|
|
|
67313
67563
|
const headers = import_node_path74.default.join(root, "Headers");
|
|
67314
67564
|
for (const map2 of files(headers, (name3) => name3 === "module.modulemap")) {
|
|
67315
67565
|
const modulemap = import_node_path74.default.join(headers, map2);
|
|
67316
|
-
|
|
67317
|
-
if (module2) found.push(headerSurface(module2, modulemap, import_node_path74.default.dirname(modulemap)));
|
|
67566
|
+
found.push(...mapSurfaces(modulemap));
|
|
67318
67567
|
}
|
|
67319
67568
|
if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
|
|
67320
67569
|
const module2 = swiftTargetModuleName(target);
|
|
@@ -67448,9 +67697,13 @@ function swiftInterfaceForWasm(text6, cFlags) {
|
|
|
67448
67697
|
]);
|
|
67449
67698
|
return `${interop} ${xcc.join(" ")}`;
|
|
67450
67699
|
});
|
|
67451
|
-
|
|
67452
|
-
|
|
67453
|
-
|
|
67700
|
+
const lines = retargeted.split("\n");
|
|
67701
|
+
const required = lines.filter((line) => OPTIONAL_REQUIREMENT.test(line)).join("\n");
|
|
67702
|
+
return lines.map((line) => {
|
|
67703
|
+
if (/\benum\s/.test(line) && TYPE_DECLARATION.test(line)) {
|
|
67704
|
+
const name3 = /\benum\s+(\w+)/.exec(line)?.[1];
|
|
67705
|
+
return name3 && new RegExp(`\\b${name3}\\b`).test(required) && !/\bSwift\.Error\b/.test(line) ? line : line.replace(/@objc(?:\s*\([^()]*\))?\s+/g, "");
|
|
67706
|
+
}
|
|
67454
67707
|
if (TYPE_DECLARATION.test(line)) return line.replace(/@objcMembers\b/g, "");
|
|
67455
67708
|
if (OPTIONAL_REQUIREMENT.test(line)) return line;
|
|
67456
67709
|
return line.replace(OBJC_ATTRIBUTE, "");
|
|
@@ -67868,6 +68121,14 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67868
68121
|
const plain = /* @__PURE__ */ new Set();
|
|
67869
68122
|
const unobjc = /* @__PURE__ */ new Set();
|
|
67870
68123
|
const trapped = /* @__PURE__ */ new Set();
|
|
68124
|
+
const unconformed = /* @__PURE__ */ new Map();
|
|
68125
|
+
const objcProtocols = new Set(
|
|
68126
|
+
graphs.flatMap(
|
|
68127
|
+
(graph) => graph.symbols.filter(
|
|
68128
|
+
(symbol2) => symbol2.kind.identifier === "swift.protocol" && symbol2.identifier.precise.startsWith("c:")
|
|
68129
|
+
).map((symbol2) => symbol2.pathComponents.join("."))
|
|
68130
|
+
)
|
|
68131
|
+
);
|
|
67871
68132
|
const file = import_node_path74.default.join(work, `${module2}.swift`);
|
|
67872
68133
|
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.assemblySources === void 0;
|
|
67873
68134
|
for (; ; ) {
|
|
@@ -67880,6 +68141,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67880
68141
|
omit,
|
|
67881
68142
|
plain,
|
|
67882
68143
|
unobjc,
|
|
68144
|
+
unconformed,
|
|
67883
68145
|
trapped,
|
|
67884
68146
|
inert,
|
|
67885
68147
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
@@ -67927,7 +68189,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67927
68189
|
files: { [`${module2}.swift`]: source },
|
|
67928
68190
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
67929
68191
|
};
|
|
67930
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size;
|
|
68192
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
67931
68193
|
const elsewhere = [];
|
|
67932
68194
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
67933
68195
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -67935,6 +68197,13 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67935
68197
|
unobjc.add(owner);
|
|
67936
68198
|
continue;
|
|
67937
68199
|
}
|
|
68200
|
+
const conformance = /^type '\w+' does not conform to protocol '(\w+)'$/.exec(
|
|
68201
|
+
match[3]
|
|
68202
|
+
)?.[1];
|
|
68203
|
+
if (owner && conformance && objcProtocols.has(conformance)) {
|
|
68204
|
+
unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], conformance]));
|
|
68205
|
+
continue;
|
|
68206
|
+
}
|
|
67938
68207
|
if (owner && swiftPaths.has(owner))
|
|
67939
68208
|
throw new Error(
|
|
67940
68209
|
`Swift declaration ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
@@ -67950,7 +68219,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67950
68219
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
67951
68220
|
else elsewhere.push(match[3]);
|
|
67952
68221
|
}
|
|
67953
|
-
if (omit.size + plain.size + unobjc.size + trapped.size === before)
|
|
68222
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
67954
68223
|
throw new Error(
|
|
67955
68224
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
67956
68225
|
);
|
|
@@ -68075,7 +68344,16 @@ function splitDeclarators(statement, names) {
|
|
|
68075
68344
|
);
|
|
68076
68345
|
}
|
|
68077
68346
|
function cStandin(surface, binary2, toolchain, work) {
|
|
68078
|
-
const
|
|
68347
|
+
const everyHeader = files(surface.headers, (name3) => name3.endsWith(".h"));
|
|
68348
|
+
const moduleRoots = moduleMapHeaders(surface.modulemap, everyHeader);
|
|
68349
|
+
const headers = [...moduleRoots];
|
|
68350
|
+
for (let at = 0; at < headers.length; at++)
|
|
68351
|
+
for (const [, local] of import_node_fs77.default.readFileSync(import_node_path74.default.join(surface.headers, headers[at]), "utf8").matchAll(/^\s*#\s*(?:include|import)\s*["<]([^">]+)[">]/gm)) {
|
|
68352
|
+
const file = import_node_path74.default.posix.normalize(
|
|
68353
|
+
import_node_path74.default.posix.join(import_node_path74.default.posix.dirname(headers[at]), local)
|
|
68354
|
+
);
|
|
68355
|
+
if (everyHeader.includes(file) && !headers.includes(file)) headers.push(file);
|
|
68356
|
+
}
|
|
68079
68357
|
const framework = import_node_path74.default.basename(import_node_path74.default.dirname(surface.modulemap)) === "Modules";
|
|
68080
68358
|
const headerDirectory = framework ? `${surface.module}.framework/Headers` : ".";
|
|
68081
68359
|
const texts = new Map(
|
|
@@ -68090,9 +68368,7 @@ function cStandin(surface, binary2, toolchain, work) {
|
|
|
68090
68368
|
import_node_fs77.default.mkdirSync(import_node_path74.default.dirname(import_node_path74.default.join(include, file)), { recursive: true });
|
|
68091
68369
|
import_node_fs77.default.writeFileSync(import_node_path74.default.join(include, file), text6);
|
|
68092
68370
|
}
|
|
68093
|
-
const roots =
|
|
68094
|
-
(file) => import_node_path74.default.posix.join(headerDirectory, file)
|
|
68095
|
-
);
|
|
68371
|
+
const roots = moduleRoots.map((file) => import_node_path74.default.posix.join(headerDirectory, file));
|
|
68096
68372
|
const frameworkMap = `${surface.module}.framework/Modules/module.modulemap`;
|
|
68097
68373
|
const modulemap = `module ${surface.module} {
|
|
68098
68374
|
${roots.map((file) => ` header "${file}"
|
|
@@ -68826,7 +69102,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
68826
69102
|
return error instanceof Error ? error.message : String(error);
|
|
68827
69103
|
}
|
|
68828
69104
|
const found = all.filter(
|
|
68829
|
-
(surface) => !provided.has(surface.module) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
|
|
69105
|
+
(surface) => !provided.has(surface.module) && (surface.kind === "swift" || surface.kind === "mixed" || surface.kind === "source" || files(surface.headers, (name3) => name3.endsWith(".h")).length > 0) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
|
|
68830
69106
|
);
|
|
68831
69107
|
if (found.length === 0) {
|
|
68832
69108
|
import_node_fs77.default.rmSync(work, { recursive: true, force: true });
|
|
@@ -82038,7 +82314,15 @@ function targetSettings2(units) {
|
|
|
82038
82314
|
}
|
|
82039
82315
|
return settings;
|
|
82040
82316
|
}
|
|
82041
|
-
function
|
|
82317
|
+
function oneSDKStamp(oneSDK) {
|
|
82318
|
+
if (!oneSDK) return "";
|
|
82319
|
+
const hash = (0, import_node_crypto49.createHash)("sha256");
|
|
82320
|
+
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
82321
|
+
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
82322
|
+
hash.update(`${name3}\0${source}\0`);
|
|
82323
|
+
return hash.digest("hex");
|
|
82324
|
+
}
|
|
82325
|
+
function expoEntry(units, oneSDK = false) {
|
|
82042
82326
|
const namespaces = [...new Set(units.map((unit2) => unit2.namespace))].filter((namespace) => namespace !== "PeachExpoApp").filter(
|
|
82043
82327
|
(namespace) => units.some(
|
|
82044
82328
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
@@ -82048,13 +82332,14 @@ function expoEntry(units) {
|
|
|
82048
82332
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
82049
82333
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
82050
82334
|
const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
|
|
82335
|
+
const view = oneSDK ? '@ViewBuilder func view(props: JSON) -> some View {\n if props["oneSDKHost"] != nil { OneSDKUIKitHost(props: props) } else { PeachExpoNativeView(props: props) }\n }' : "func view(props: JSON) -> PeachExpoNativeView { PeachExpoNativeView(props: props) }";
|
|
82051
82336
|
return `import SwiftUI
|
|
82052
82337
|
internal import ExpoModulesCore
|
|
82053
|
-
${bridgeModules.length ? "import React\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
82338
|
+
${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport OneSDKBindings\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
82054
82339
|
|
|
82055
82340
|
@main struct PeachExpoApp: PeachPackage {
|
|
82056
82341
|
init() { MainActor.assumeIsolated { PeachExpoRuntime.register([${units.flatMap((unit2) => unit2.classes).join(", ")}])${delegates}${bridgeModules.length ? `; RCTModuleHost.register([${bridgeModules.join(", ")}])` : ""} } }
|
|
82057
|
-
|
|
82342
|
+
${view}
|
|
82058
82343
|
}
|
|
82059
82344
|
|
|
82060
82345
|
@_expose(wasm, "peach_expo_call")
|
|
@@ -82146,7 +82431,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
82146
82431
|
installSwiftInputTrace();
|
|
82147
82432
|
let key2;
|
|
82148
82433
|
try {
|
|
82149
|
-
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}`;
|
|
82434
|
+
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}\0${oneSDKStamp(options.oneSDK)}`;
|
|
82150
82435
|
} catch {
|
|
82151
82436
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
82152
82437
|
}
|
|
@@ -82183,11 +82468,23 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
82183
82468
|
throw new Error(`conflicting Expo Swift binary source ${name3}`);
|
|
82184
82469
|
files2[name3] = source;
|
|
82185
82470
|
}
|
|
82186
|
-
|
|
82471
|
+
const settings = targetSettings2(linked2);
|
|
82472
|
+
if (options.oneSDK) {
|
|
82473
|
+
for (const [name3, source] of options.oneSDK.targets) files2[name3] = source;
|
|
82474
|
+
for (const [name3, source] of options.oneSDK.entry)
|
|
82475
|
+
files2[`Sources/PeachExpoApp/${name3}`] = source;
|
|
82476
|
+
settings.set("OneSDKBindings", {
|
|
82477
|
+
languageMode: 5,
|
|
82478
|
+
mainActorIsolation: false,
|
|
82479
|
+
swiftFlags: ["-suppress-warnings"],
|
|
82480
|
+
dependencies: [{ kind: "target", name: "One" }]
|
|
82481
|
+
});
|
|
82482
|
+
}
|
|
82483
|
+
files2[EXPO_SWIFT_ENTRY] = expoEntry(linked2, options.oneSDK !== void 0);
|
|
82187
82484
|
files2["Package.swift"] = expoManifest(
|
|
82188
82485
|
files2,
|
|
82189
82486
|
linked2.map((unit2) => generations.get(unit2) ?? "").join(","),
|
|
82190
|
-
|
|
82487
|
+
settings
|
|
82191
82488
|
);
|
|
82192
82489
|
const provider = linked2.some((unit2) => unit2.reactNativeProvider) ? reactProvider : void 0;
|
|
82193
82490
|
if (provider) {
|
|
@@ -82548,7 +82845,11 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
82548
82845
|
stamps.set(unit2, stamp);
|
|
82549
82846
|
candidates.push(unit2);
|
|
82550
82847
|
}
|
|
82551
|
-
const preparedKey = expoSwiftPreparedKey(
|
|
82848
|
+
const preparedKey = expoSwiftPreparedKey(
|
|
82849
|
+
base,
|
|
82850
|
+
units,
|
|
82851
|
+
reactProviderStamp + oneSDKStamp(options.oneSDK)
|
|
82852
|
+
);
|
|
82552
82853
|
if (!publishArtifact) {
|
|
82553
82854
|
const prepared = preparedExpoSwift.get(preparedKey);
|
|
82554
82855
|
if (prepared) {
|
|
@@ -83838,20 +84139,41 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
83838
84139
|
"specifications",
|
|
83839
84140
|
`${checksum}.json`
|
|
83840
84141
|
);
|
|
84142
|
+
const sha1 = (value) => (0, import_node_crypto52.createHash)("sha1").update(value).digest("hex");
|
|
83841
84143
|
let text6;
|
|
83842
84144
|
if (import_node_fs96.default.existsSync(file)) text6 = import_node_fs96.default.readFileSync(file, "utf8");
|
|
83843
84145
|
else {
|
|
83844
84146
|
const shard = (0, import_node_crypto52.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
83845
|
-
const
|
|
83846
|
-
|
|
83847
|
-
);
|
|
84147
|
+
const specPath = `Specs/${shard}/${root}/${version2}/${root}.podspec.json`;
|
|
84148
|
+
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
83848
84149
|
if (!response.ok)
|
|
83849
84150
|
throw new Error(
|
|
83850
84151
|
`CocoaPods specification ${root} ${version2}: HTTP ${response.status}`
|
|
83851
84152
|
);
|
|
83852
84153
|
text6 = await response.text();
|
|
84154
|
+
if (sha1(text6) !== checksum) {
|
|
84155
|
+
const history = await fetch(
|
|
84156
|
+
`https://api.github.com/repos/CocoaPods/Specs/commits?path=${specPath}&per_page=100`
|
|
84157
|
+
);
|
|
84158
|
+
if (!history.ok)
|
|
84159
|
+
throw new Error(`CocoaPods specification ${root} history: HTTP ${history.status}`);
|
|
84160
|
+
const commits = await history.json();
|
|
84161
|
+
for (const commit of Array.isArray(commits) ? commits : []) {
|
|
84162
|
+
const sha = record2(commit) ? commit.sha : void 0;
|
|
84163
|
+
if (typeof sha !== "string") continue;
|
|
84164
|
+
const revision = await fetch(
|
|
84165
|
+
`https://raw.githubusercontent.com/CocoaPods/Specs/${sha}/${specPath}`
|
|
84166
|
+
);
|
|
84167
|
+
if (!revision.ok) continue;
|
|
84168
|
+
const revisionText = await revision.text();
|
|
84169
|
+
if (sha1(revisionText) === checksum) {
|
|
84170
|
+
text6 = revisionText;
|
|
84171
|
+
break;
|
|
84172
|
+
}
|
|
84173
|
+
}
|
|
84174
|
+
}
|
|
83853
84175
|
}
|
|
83854
|
-
if (
|
|
84176
|
+
if (sha1(text6) !== checksum)
|
|
83855
84177
|
throw new Error(`${root} podspec checksum differs from ${lockFile}`);
|
|
83856
84178
|
const spec = JSON.parse(text6);
|
|
83857
84179
|
if (!record2(spec) || spec.name !== root || spec.version !== version2)
|
|
@@ -84647,7 +84969,7 @@ var init_nitro_superset = __esm({
|
|
|
84647
84969
|
init_nitroContract();
|
|
84648
84970
|
init_swift_standin_digest();
|
|
84649
84971
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
84650
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
84972
|
+
NITRO_COMPILER_DIGEST = true ? "f02c3ec3fd9a77d144224ecf36dbf177c3878f12158689dcd8dcd6347e72ca55" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
84651
84973
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
84652
84974
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
84653
84975
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -84888,7 +85210,7 @@ var init_expo_widgets_bundle = __esm({
|
|
|
84888
85210
|
});
|
|
84889
85211
|
|
|
84890
85212
|
// src/one-sdk/source.ts
|
|
84891
|
-
var oneSDKModule, oneSDKApp, oneSDKTransport;
|
|
85213
|
+
var oneSDKModule, oneSDKHost, oneSDKApp, oneSDKTransport;
|
|
84892
85214
|
var init_source = __esm({
|
|
84893
85215
|
"src/one-sdk/source.ts"() {
|
|
84894
85216
|
"use strict";
|
|
@@ -84924,12 +85246,11 @@ extension OneNativeComposable {
|
|
|
84924
85246
|
public func propagateActive(_ active: Bool) {}
|
|
84925
85247
|
}
|
|
84926
85248
|
`;
|
|
84927
|
-
|
|
85249
|
+
oneSDKHost = String.raw`import SwiftUI
|
|
84928
85250
|
@_spi(Peach) import UIKit
|
|
84929
85251
|
import One
|
|
84930
|
-
import OneSDKBindings
|
|
84931
85252
|
|
|
84932
|
-
|
|
85253
|
+
struct OneSDKUIKitHost: UIViewRepresentable {
|
|
84933
85254
|
let props: JSON
|
|
84934
85255
|
func makeUIView(context: Context) -> OneNativeUIKitHostView { OneNativeUIKitHostView() }
|
|
84935
85256
|
func updateUIView(_ view: OneNativeUIKitHostView, context: Context) {
|
|
@@ -84941,10 +85262,14 @@ private struct UIKitHost: UIViewRepresentable {
|
|
|
84941
85262
|
}
|
|
84942
85263
|
static func dismantleUIView(_ view: OneNativeUIKitHostView, coordinator: Coordinator) { view.reset() }
|
|
84943
85264
|
}
|
|
85265
|
+
`;
|
|
85266
|
+
oneSDKApp = String.raw`import SwiftUI
|
|
85267
|
+
import One
|
|
85268
|
+
import OneSDKBindings
|
|
84944
85269
|
|
|
84945
85270
|
@main
|
|
84946
85271
|
struct SDKGuest: PeachPackage {
|
|
84947
|
-
func view(props: JSON) -> some View {
|
|
85272
|
+
func view(props: JSON) -> some View { OneSDKUIKitHost(props: props) }
|
|
84948
85273
|
}
|
|
84949
85274
|
`;
|
|
84950
85275
|
oneSDKTransport = String.raw`import Foundation
|
|
@@ -85242,7 +85567,7 @@ async function compileOneSDKApp(appRoot, origin, moduleRootOverride) {
|
|
|
85242
85567
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
85243
85568
|
return compilePreparedOneSDKApp(appRoot, prepared.app, origin, moduleRootOverride);
|
|
85244
85569
|
}
|
|
85245
|
-
async function
|
|
85570
|
+
async function oneSDKLinkSources(appRoot, preparedRoot) {
|
|
85246
85571
|
const selected = await selectOneSDK(appRoot);
|
|
85247
85572
|
if (!selected) throw new Error("prepared app has no One SDK imports");
|
|
85248
85573
|
const { one, frameworks } = selected;
|
|
@@ -85257,6 +85582,35 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
85257
85582
|
throw new Error(
|
|
85258
85583
|
"prepared One SDK sources differ from the installed facades or app imports"
|
|
85259
85584
|
);
|
|
85585
|
+
const targets = /* @__PURE__ */ new Map();
|
|
85586
|
+
targets.set("Sources/One/One.swift", oneSDKModule);
|
|
85587
|
+
for (const source of [
|
|
85588
|
+
"SDK/OneSDKRuntime.swift",
|
|
85589
|
+
"OneNativeUIKitHostView.swift",
|
|
85590
|
+
"OneNativeContent.swift",
|
|
85591
|
+
"OneNativeAccessibility.swift",
|
|
85592
|
+
"SDKViews/OneNativeViewsTable.swift"
|
|
85593
|
+
])
|
|
85594
|
+
targets.set(
|
|
85595
|
+
`Sources/One/${import_node_path99.default.basename(source)}`,
|
|
85596
|
+
import_node_fs100.default.readFileSync(import_node_path99.default.join(one, "ios", source), "utf8")
|
|
85597
|
+
);
|
|
85598
|
+
for (const name3 of generated.files)
|
|
85599
|
+
targets.set(
|
|
85600
|
+
`Sources/OneSDKBindings/${name3}`,
|
|
85601
|
+
import_node_fs100.default.readFileSync(import_node_path99.default.join(sourceRoot, name3), "utf8")
|
|
85602
|
+
);
|
|
85603
|
+
return {
|
|
85604
|
+
targets,
|
|
85605
|
+
entry: /* @__PURE__ */ new Map([
|
|
85606
|
+
["OneSDKHost.swift", oneSDKHost],
|
|
85607
|
+
["OneSDKTransport.swift", oneSDKTransport]
|
|
85608
|
+
]),
|
|
85609
|
+
modules: frameworks.map((name3) => `${name3}_${generated.generation}`)
|
|
85610
|
+
};
|
|
85611
|
+
}
|
|
85612
|
+
async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRootOverride) {
|
|
85613
|
+
const sources = await oneSDKLinkSources(appRoot, preparedRoot);
|
|
85260
85614
|
const moduleRoot = moduleRootOverride ?? (await resolveSwiftModule()).root;
|
|
85261
85615
|
const packagePath = import_node_path99.default.join(
|
|
85262
85616
|
swiftCacheDir(),
|
|
@@ -85276,25 +85630,9 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
85276
85630
|
])
|
|
85277
85631
|
`
|
|
85278
85632
|
);
|
|
85279
|
-
files2.set(
|
|
85280
|
-
for (const source of
|
|
85281
|
-
"SDK/OneSDKRuntime.swift",
|
|
85282
|
-
"OneNativeUIKitHostView.swift",
|
|
85283
|
-
"OneNativeContent.swift",
|
|
85284
|
-
"OneNativeAccessibility.swift",
|
|
85285
|
-
"SDKViews/OneNativeViewsTable.swift"
|
|
85286
|
-
])
|
|
85287
|
-
files2.set(
|
|
85288
|
-
`Sources/One/${import_node_path99.default.basename(source)}`,
|
|
85289
|
-
import_node_fs100.default.readFileSync(import_node_path99.default.join(one, "ios", source), "utf8")
|
|
85290
|
-
);
|
|
85291
|
-
for (const name3 of generated.files)
|
|
85292
|
-
files2.set(
|
|
85293
|
-
`Sources/OneSDKBindings/${name3}`,
|
|
85294
|
-
import_node_fs100.default.readFileSync(import_node_path99.default.join(sourceRoot, name3), "utf8")
|
|
85295
|
-
);
|
|
85633
|
+
for (const [name3, source] of sources.targets) files2.set(name3, source);
|
|
85634
|
+
for (const [name3, source] of sources.entry) files2.set(`Sources/App/${name3}`, source);
|
|
85296
85635
|
files2.set("Sources/App/App.swift", oneSDKApp);
|
|
85297
|
-
files2.set("Sources/App/Transport.swift", oneSDKTransport);
|
|
85298
85636
|
import_node_fs100.default.mkdirSync(packagePath, { recursive: true });
|
|
85299
85637
|
syncSwiftTree(
|
|
85300
85638
|
packagePath,
|
|
@@ -85310,7 +85648,7 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
85310
85648
|
icuUrl: icuUrl(origin, artifact),
|
|
85311
85649
|
rootId: `one-sdk-${artifact.hash.slice(0, 16)}`,
|
|
85312
85650
|
bundleFiles: artifact.package.bundleFiles.files,
|
|
85313
|
-
modules:
|
|
85651
|
+
modules: sources.modules
|
|
85314
85652
|
};
|
|
85315
85653
|
return { metadata, artifact };
|
|
85316
85654
|
}
|
|
@@ -113271,6 +113609,17 @@ function bundleUrlOf(urlStr) {
|
|
|
113271
113609
|
}
|
|
113272
113610
|
async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opts = {}) {
|
|
113273
113611
|
const resolved = await resolveShellUrl(target, baseUrl, opts);
|
|
113612
|
+
const supplied = new URL(resolved);
|
|
113613
|
+
if (!opts.project && looksLikeSootsimUrl(target) && [
|
|
113614
|
+
LAUNCH_METADATA_QUERY_PARAM,
|
|
113615
|
+
"oneSDK",
|
|
113616
|
+
"expoSwift",
|
|
113617
|
+
"expoWidgets",
|
|
113618
|
+
"nitro",
|
|
113619
|
+
"turbo",
|
|
113620
|
+
"expoKotlin"
|
|
113621
|
+
].some((key2) => supplied.searchParams.has(key2)))
|
|
113622
|
+
return applyShellLaunchOptions(supplied, opts).toString();
|
|
113274
113623
|
const project2 = opts.offline ? opts.project : opts.project ?? await resolveAppProjectForBundleUrl(bundleUrlOf(resolved));
|
|
113275
113624
|
const expoRoot = project2?.appDir ?? null;
|
|
113276
113625
|
const world = resolveBridgeWorld();
|
|
@@ -113380,9 +113729,6 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
113380
113729
|
const manifest = "config" in expoConfigRead ? stageBuiltBundleManifest(stampedBundle, expoConfigRead.config) : null;
|
|
113381
113730
|
if (manifest) expoStamped.searchParams.set("appManifest", manifest);
|
|
113382
113731
|
}
|
|
113383
|
-
if (opts.bundleOriginOverride)
|
|
113384
|
-
expoStamped.searchParams.set("bundleOriginOverride", opts.bundleOriginOverride);
|
|
113385
|
-
if (opts.hostDriver) expoStamped.searchParams.set("peachHostDriver", opts.hostDriver);
|
|
113386
113732
|
if (expoRoot && !opts.offline) {
|
|
113387
113733
|
if (packageVersions?.["expo-widgets"])
|
|
113388
113734
|
expoStamped.searchParams.set(
|
|
@@ -113411,9 +113757,16 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
113411
113757
|
`${nativeAssetOrigin}/__peach/expo-kotlin?root=${encodeURIComponent(expoRoot)}`
|
|
113412
113758
|
);
|
|
113413
113759
|
}
|
|
113414
|
-
|
|
113415
|
-
|
|
113416
|
-
|
|
113760
|
+
const url = applyShellLaunchOptions(expoStamped, opts);
|
|
113761
|
+
return opts.offline ? url.toString() : stageHostLaunchMetadata(url, nativeAssetOrigin);
|
|
113762
|
+
}
|
|
113763
|
+
function applyShellLaunchOptions(url, opts) {
|
|
113764
|
+
const bundle = url.searchParams.get("bundle");
|
|
113765
|
+
if (bundle && opts.hot !== void 0)
|
|
113766
|
+
url.searchParams.set("bundle", applyHotMode(bundle, opts.hot));
|
|
113767
|
+
if (opts.bundleOriginOverride)
|
|
113768
|
+
url.searchParams.set("bundleOriginOverride", opts.bundleOriginOverride);
|
|
113769
|
+
if (opts.hostDriver) url.searchParams.set("peachHostDriver", opts.hostDriver);
|
|
113417
113770
|
if (opts.dotEnv) url.searchParams.set("dotEnv", JSON.stringify(opts.dotEnv));
|
|
113418
113771
|
if (opts.device) url.searchParams.set("device", opts.device);
|
|
113419
113772
|
if (opts.posture) url.searchParams.set("posture", opts.posture);
|
|
@@ -113433,7 +113786,7 @@ async function buildShellUrl(target, baseUrl = resolveDefaultShellBaseUrl(), opt
|
|
|
113433
113786
|
if (opts.ephemeral) url.searchParams.set("ephemeral", "1");
|
|
113434
113787
|
for (const entry of opts.env ?? []) url.searchParams.append("env", entry);
|
|
113435
113788
|
for (const entry of opts.args ?? []) url.searchParams.append("arg", entry);
|
|
113436
|
-
return
|
|
113789
|
+
return url;
|
|
113437
113790
|
}
|
|
113438
113791
|
var import_node_fs134, import_node_os24, import_node_path136, SHELL_APPS, DEV_BUNDLE_RESOLVE_ATTEMPTS, DEV_BUNDLE_RESOLVE_INTERVAL_MS, startedExpoConfigReads;
|
|
113439
113792
|
var init_shell_url = __esm({
|
|
@@ -113456,6 +113809,7 @@ var init_shell_url = __esm({
|
|
|
113456
113809
|
init_loopback_ports();
|
|
113457
113810
|
init_staged_host_files();
|
|
113458
113811
|
init_installed_package_versions();
|
|
113812
|
+
init_launchMetadataContract();
|
|
113459
113813
|
init_metro_project_root();
|
|
113460
113814
|
init_native_app_identity();
|
|
113461
113815
|
init_native_app_identity_project();
|