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
|
@@ -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
|
|
|
@@ -12080,7 +12080,7 @@ var init_swift_standin_digest = __esm({
|
|
|
12080
12080
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
12081
12081
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
12082
12082
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
12083
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
12083
|
+
STANDIN_SOURCE_DIGEST = true ? "0981767eef4ad46fe5cb602ee15f1de9ea06dac3a2edb4dab0f6d5279b018a3b" : standinSourceDigest();
|
|
12084
12084
|
}
|
|
12085
12085
|
});
|
|
12086
12086
|
|
|
@@ -12362,7 +12362,7 @@ var init_nitro_superset = __esm({
|
|
|
12362
12362
|
init_nitroContract();
|
|
12363
12363
|
init_swift_standin_digest();
|
|
12364
12364
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
12365
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
12365
|
+
NITRO_COMPILER_DIGEST = true ? "f02c3ec3fd9a77d144224ecf36dbf177c3878f12158689dcd8dcd6347e72ca55" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
12366
12366
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
12367
12367
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
12368
12368
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -18874,7 +18874,7 @@ var MAX_SWIFT_COMPILE_METAL_TOTAL_BYTES = 8 * 1024 * 1024;
|
|
|
18874
18874
|
var MAX_SWIFT_COMPILE_IMAGES = 256;
|
|
18875
18875
|
var MAX_SWIFT_COMPILE_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
18876
18876
|
var MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024;
|
|
18877
|
-
var SWIFT_HOST_ABI =
|
|
18877
|
+
var SWIFT_HOST_ABI = 70;
|
|
18878
18878
|
var POLL_INTERVAL_MS = 1500;
|
|
18879
18879
|
function httpSwiftCompileSubmit(context) {
|
|
18880
18880
|
const { assetReadToken, authorization, endpoint } = context;
|
|
@@ -22132,6 +22132,29 @@ function moduleMapName(text6) {
|
|
|
22132
22132
|
);
|
|
22133
22133
|
return index < 0 ? void 0 : tokens2[index + 1];
|
|
22134
22134
|
}
|
|
22135
|
+
function moduleMapModules(text6) {
|
|
22136
|
+
const modules = [];
|
|
22137
|
+
const token = /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|\{|\}|\bmodule\s+([\w.]+)/g;
|
|
22138
|
+
let depth = 0;
|
|
22139
|
+
let start = -1;
|
|
22140
|
+
let name3 = "";
|
|
22141
|
+
for (const match of text6.matchAll(token)) {
|
|
22142
|
+
if (match[0] === "{") depth++;
|
|
22143
|
+
else if (match[0] === "}") {
|
|
22144
|
+
depth--;
|
|
22145
|
+
if (depth === 0 && start >= 0) {
|
|
22146
|
+
modules.push({ name: name3, text: text6.slice(start, match.index + 1) });
|
|
22147
|
+
start = -1;
|
|
22148
|
+
}
|
|
22149
|
+
} else if (match[1] !== void 0 && depth === 0) {
|
|
22150
|
+
const before = text6.slice(0, match.index).trimEnd();
|
|
22151
|
+
if (/\bextern$/.test(before)) continue;
|
|
22152
|
+
start = match.index;
|
|
22153
|
+
name3 = match[1];
|
|
22154
|
+
}
|
|
22155
|
+
}
|
|
22156
|
+
return modules;
|
|
22157
|
+
}
|
|
22135
22158
|
function swiftTargetModuleName(name3) {
|
|
22136
22159
|
return name3.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
22137
22160
|
}
|
|
@@ -25460,6 +25483,137 @@ var import_node_fs34 = __toESM(require("node:fs"), 1);
|
|
|
25460
25483
|
var import_node_path32 = __toESM(require("node:path"), 1);
|
|
25461
25484
|
init_is_record();
|
|
25462
25485
|
|
|
25486
|
+
// src/swift-interface-bodies.ts
|
|
25487
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
25488
|
+
var INLINE_ATTRIBUTE = /@(?:inlinable|_alwaysEmitIntoClient|_transparent|inline\(__always\)|_effects\([^()]*\)|_specialize\((?:[^()]|\([^()]*\))*\))\s*/g;
|
|
25489
|
+
var ACCESSOR = /^(?:mutating|nonmutating|async|throws|rethrows|get|set|_modify|_read)$/;
|
|
25490
|
+
function declarationKind(head) {
|
|
25491
|
+
const words2 = head.replace(/@\w+(?:\((?:[^()]|\([^()]*\))*\))?/g, " ").match(/[A-Za-z_]\w*/g);
|
|
25492
|
+
for (const word of words2 ?? []) {
|
|
25493
|
+
if (word === "func" || word === "init" || word === "deinit") return "function";
|
|
25494
|
+
if (word === "var" || word === "let" || word === "subscript") return "property";
|
|
25495
|
+
if (word === "struct" || word === "class" || word === "enum" || word === "protocol" || word === "extension" || word === "actor" || word === "precedencegroup")
|
|
25496
|
+
return "container";
|
|
25497
|
+
}
|
|
25498
|
+
return "container";
|
|
25499
|
+
}
|
|
25500
|
+
function skipLiteral(text6, i) {
|
|
25501
|
+
if (text6.startsWith("//", i)) {
|
|
25502
|
+
const end = text6.indexOf("\n", i);
|
|
25503
|
+
return end < 0 ? text6.length : end;
|
|
25504
|
+
}
|
|
25505
|
+
if (text6.startsWith("/*", i)) {
|
|
25506
|
+
const end = text6.indexOf("*/", i + 2);
|
|
25507
|
+
return end < 0 ? text6.length : end + 2;
|
|
25508
|
+
}
|
|
25509
|
+
if (text6[i] !== '"' && text6[i] !== "#") return i;
|
|
25510
|
+
let hashes = 0;
|
|
25511
|
+
let j = i;
|
|
25512
|
+
while (text6[j] === "#") {
|
|
25513
|
+
hashes++;
|
|
25514
|
+
j++;
|
|
25515
|
+
}
|
|
25516
|
+
if (text6[j] !== '"') return i;
|
|
25517
|
+
const multiline = text6.startsWith('"""', j);
|
|
25518
|
+
const open = multiline ? '"""' : '"';
|
|
25519
|
+
j += open.length;
|
|
25520
|
+
const close = `${open}${"#".repeat(hashes)}`;
|
|
25521
|
+
const escape2 = `\\${"#".repeat(hashes)}`;
|
|
25522
|
+
while (j < text6.length) {
|
|
25523
|
+
if (text6.startsWith(escape2, j)) j += escape2.length + 1;
|
|
25524
|
+
else if (text6.startsWith(close, j)) return j + close.length;
|
|
25525
|
+
else j++;
|
|
25526
|
+
}
|
|
25527
|
+
return text6.length;
|
|
25528
|
+
}
|
|
25529
|
+
function skipBlock(text6, open) {
|
|
25530
|
+
let depth = 0;
|
|
25531
|
+
for (let i = open; i < text6.length; ) {
|
|
25532
|
+
const after = skipLiteral(text6, i);
|
|
25533
|
+
if (after !== i) {
|
|
25534
|
+
i = after;
|
|
25535
|
+
continue;
|
|
25536
|
+
}
|
|
25537
|
+
if (text6[i] === "{") depth++;
|
|
25538
|
+
else if (text6[i] === "}" && --depth === 0) return i + 1;
|
|
25539
|
+
i++;
|
|
25540
|
+
}
|
|
25541
|
+
return text6.length;
|
|
25542
|
+
}
|
|
25543
|
+
function skipExpression(text6, start) {
|
|
25544
|
+
let depth = 0;
|
|
25545
|
+
for (let i = start; i < text6.length; ) {
|
|
25546
|
+
const after = skipLiteral(text6, i);
|
|
25547
|
+
if (after !== i) {
|
|
25548
|
+
i = after;
|
|
25549
|
+
continue;
|
|
25550
|
+
}
|
|
25551
|
+
const char = text6[i];
|
|
25552
|
+
if (char === "(" || char === "[" || char === "{" || char === "<") depth++;
|
|
25553
|
+
else if (char === ">" && text6[i - 1] !== "-") depth--;
|
|
25554
|
+
else if (char === ")" || char === "]" || char === "}") {
|
|
25555
|
+
if (depth === 0) return i;
|
|
25556
|
+
depth--;
|
|
25557
|
+
} else if (char === "," && depth === 0) return i;
|
|
25558
|
+
i++;
|
|
25559
|
+
}
|
|
25560
|
+
return text6.length;
|
|
25561
|
+
}
|
|
25562
|
+
function swiftInterfaceWithoutBodies(text6, keepDefaults = false) {
|
|
25563
|
+
let out = "";
|
|
25564
|
+
const frames = [];
|
|
25565
|
+
let parens = 0;
|
|
25566
|
+
let lineStart = 0;
|
|
25567
|
+
for (let i = 0; i < text6.length; ) {
|
|
25568
|
+
const after = skipLiteral(text6, i);
|
|
25569
|
+
if (after !== i) {
|
|
25570
|
+
out += text6.slice(i, after);
|
|
25571
|
+
i = after;
|
|
25572
|
+
continue;
|
|
25573
|
+
}
|
|
25574
|
+
const char = text6[i];
|
|
25575
|
+
if (char === "=" && parens > 0 && text6[i - 1] === " " && text6[i + 1] === " ") {
|
|
25576
|
+
out = out.trimEnd();
|
|
25577
|
+
i = skipExpression(text6, i + 1);
|
|
25578
|
+
continue;
|
|
25579
|
+
}
|
|
25580
|
+
if (char === "\n") lineStart = out.length + 1;
|
|
25581
|
+
else if (char === "(") parens++;
|
|
25582
|
+
else if (char === ")") parens--;
|
|
25583
|
+
else if (char === "}") {
|
|
25584
|
+
frames.pop();
|
|
25585
|
+
} else if (char === "{") {
|
|
25586
|
+
const parent = frames.at(-1);
|
|
25587
|
+
const head = out.slice(lineStart);
|
|
25588
|
+
if (parens > 0 || parent === "expression") frames.push("expression");
|
|
25589
|
+
else if (parent === "accessors") {
|
|
25590
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
25591
|
+
i = skipBlock(text6, i);
|
|
25592
|
+
continue;
|
|
25593
|
+
} else {
|
|
25594
|
+
const kind = declarationKind(head);
|
|
25595
|
+
const body = text6.slice(i + 1, skipBlock(text6, i) - 1);
|
|
25596
|
+
if (kind === "function") {
|
|
25597
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
25598
|
+
i = skipBlock(text6, i);
|
|
25599
|
+
continue;
|
|
25600
|
+
}
|
|
25601
|
+
const bare = body.split(/\s+/).every((word) => word === "" || ACCESSOR.test(word));
|
|
25602
|
+
frames.push(kind === "property" && !bare ? "accessors" : "container");
|
|
25603
|
+
if (kind === "property" && bare) {
|
|
25604
|
+
out += `{${body}}`;
|
|
25605
|
+
i = skipBlock(text6, i);
|
|
25606
|
+
frames.pop();
|
|
25607
|
+
continue;
|
|
25608
|
+
}
|
|
25609
|
+
}
|
|
25610
|
+
}
|
|
25611
|
+
out += char;
|
|
25612
|
+
i++;
|
|
25613
|
+
}
|
|
25614
|
+
return out.replace(INLINE_ATTRIBUTE, "");
|
|
25615
|
+
}
|
|
25616
|
+
|
|
25463
25617
|
// src/swift-objc-sdk.ts
|
|
25464
25618
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
25465
25619
|
var import_node_path31 = __toESM(require("node:path"), 1);
|
|
@@ -25500,7 +25654,7 @@ function restoreSwiftInterfaceSPI(interfaceText, module2, graphs) {
|
|
|
25500
25654
|
let depth = 0;
|
|
25501
25655
|
for (const line of interfaceText.split("\n")) {
|
|
25502
25656
|
const enclosing = scopes.at(-1)?.path ?? [];
|
|
25503
|
-
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(
|
|
25657
|
+
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(
|
|
25504
25658
|
line.replace(/::/g, ".")
|
|
25505
25659
|
);
|
|
25506
25660
|
if (declaration) {
|
|
@@ -25598,7 +25752,26 @@ var KEEP_EXTERNAL = /* @__PURE__ */ new Map([
|
|
|
25598
25752
|
["s:SE", "Encodable"],
|
|
25599
25753
|
["s:Se", "Decodable"],
|
|
25600
25754
|
["s:s23CustomStringConvertibleP", "CustomStringConvertible"],
|
|
25601
|
-
["s:s9CodingKeyP", "CodingKey"]
|
|
25755
|
+
["s:s9CodingKeyP", "CodingKey"],
|
|
25756
|
+
["s:SL", "Comparable"],
|
|
25757
|
+
["s:ST", "Sequence"],
|
|
25758
|
+
["s:St", "IteratorProtocol"],
|
|
25759
|
+
["s:Sl", "Collection"],
|
|
25760
|
+
["s:SK", "BidirectionalCollection"],
|
|
25761
|
+
["s:Sk", "RandomAccessCollection"],
|
|
25762
|
+
["s:SM", "MutableCollection"],
|
|
25763
|
+
["s:Sm", "RangeReplaceableCollection"],
|
|
25764
|
+
["s:s28CustomDebugStringConvertibleP", "CustomDebugStringConvertible"],
|
|
25765
|
+
["s:s25LosslessStringConvertibleP", "LosslessStringConvertible"],
|
|
25766
|
+
["s:s20TextOutputStreamableP", "TextOutputStreamable"],
|
|
25767
|
+
["s:Sx", "Strideable"],
|
|
25768
|
+
["s:s18AdditiveArithmeticP", "AdditiveArithmetic"],
|
|
25769
|
+
["s:s25ExpressibleByArrayLiteralP", "ExpressibleByArrayLiteral"],
|
|
25770
|
+
["s:s30ExpressibleByDictionaryLiteralP", "ExpressibleByDictionaryLiteral"],
|
|
25771
|
+
["s:s26ExpressibleByStringLiteralP", "ExpressibleByStringLiteral"],
|
|
25772
|
+
["s:s27ExpressibleByIntegerLiteralP", "ExpressibleByIntegerLiteral"],
|
|
25773
|
+
["s:s25ExpressibleByFloatLiteralP", "ExpressibleByFloatLiteral"],
|
|
25774
|
+
["s:s27ExpressibleByBooleanLiteralP", "ExpressibleByBooleanLiteral"]
|
|
25602
25775
|
]);
|
|
25603
25776
|
var LEADING_ATTRS = /^((?:@\w+(?:\([^)]*\))?\s*|nonisolated\s+)*)(.*)$/s;
|
|
25604
25777
|
var OBJC_ONLY = /@(?:objcMembers|objc|IBOutlet|IBInspectable|IBAction|IBSegueAction|GKInspectable|nonobjc|NSCopying|NSManaged)(?:\([^)]*\))?\s*|\bdynamic\s+/g;
|
|
@@ -26479,7 +26652,12 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
26479
26652
|
const list2 = [
|
|
26480
26653
|
...parent ? [parent] : [],
|
|
26481
26654
|
...(conforms.get(id) ?? []).filter(
|
|
26482
|
-
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
26655
|
+
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
26656
|
+
"Hashable",
|
|
26657
|
+
"Equatable",
|
|
26658
|
+
"CustomStringConvertible",
|
|
26659
|
+
"CustomDebugStringConvertible"
|
|
26660
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path106)?.has(name3)
|
|
26483
26661
|
)
|
|
26484
26662
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
26485
26663
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -27269,6 +27447,43 @@ function sdkDeclaration(name3) {
|
|
|
27269
27447
|
}
|
|
27270
27448
|
return sdkDeclarations.get(name3) ?? null;
|
|
27271
27449
|
}
|
|
27450
|
+
function intakeInterface(text6, keepDefaults = false) {
|
|
27451
|
+
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(
|
|
27452
|
+
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
27453
|
+
"Foundation.NSData."
|
|
27454
|
+
);
|
|
27455
|
+
}
|
|
27456
|
+
function stageVendorFrameworks(dir, stage) {
|
|
27457
|
+
import_node_fs34.default.mkdirSync(stage, { recursive: true });
|
|
27458
|
+
for (const entry of import_node_fs34.default.readdirSync(dir)) {
|
|
27459
|
+
if (!entry.endsWith(".framework")) continue;
|
|
27460
|
+
const source = import_node_path32.default.join(dir, entry);
|
|
27461
|
+
const target = import_node_path32.default.join(stage, entry);
|
|
27462
|
+
import_node_fs34.default.mkdirSync(target, { recursive: true });
|
|
27463
|
+
for (const child of import_node_fs34.default.readdirSync(source)) {
|
|
27464
|
+
if (child !== "Modules") {
|
|
27465
|
+
import_node_fs34.default.symlinkSync(import_node_path32.default.join(source, child), import_node_path32.default.join(target, child));
|
|
27466
|
+
continue;
|
|
27467
|
+
}
|
|
27468
|
+
for (const file of import_node_fs34.default.readdirSync(import_node_path32.default.join(source, child), {
|
|
27469
|
+
recursive: true,
|
|
27470
|
+
encoding: "utf8"
|
|
27471
|
+
})) {
|
|
27472
|
+
const from = import_node_path32.default.join(source, child, file);
|
|
27473
|
+
const to = import_node_path32.default.join(target, child, file);
|
|
27474
|
+
if (import_node_fs34.default.statSync(from).isDirectory()) {
|
|
27475
|
+
import_node_fs34.default.mkdirSync(to, { recursive: true });
|
|
27476
|
+
continue;
|
|
27477
|
+
}
|
|
27478
|
+
import_node_fs34.default.mkdirSync(import_node_path32.default.dirname(to), { recursive: true });
|
|
27479
|
+
if (file.endsWith(".swiftinterface"))
|
|
27480
|
+
import_node_fs34.default.writeFileSync(to, intakeInterface(import_node_fs34.default.readFileSync(from, "utf8")));
|
|
27481
|
+
else import_node_fs34.default.copyFileSync(from, to);
|
|
27482
|
+
}
|
|
27483
|
+
}
|
|
27484
|
+
}
|
|
27485
|
+
return stage;
|
|
27486
|
+
}
|
|
27272
27487
|
function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vendorFrameworks = []) {
|
|
27273
27488
|
if (!import_node_fs34.default.existsSync(stdlib))
|
|
27274
27489
|
throw new Error(
|
|
@@ -27296,6 +27511,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27296
27511
|
import_node_fs34.default.writeFileSync(file, text6);
|
|
27297
27512
|
}
|
|
27298
27513
|
const interfaceCopies = [];
|
|
27514
|
+
let keepDefaults = true;
|
|
27299
27515
|
if (framework) {
|
|
27300
27516
|
import_node_fs34.default.mkdirSync(import_node_path32.default.join(frameworks, `${surface.module}.framework`, "Modules"), {
|
|
27301
27517
|
recursive: true
|
|
@@ -27322,10 +27538,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27322
27538
|
interfaceCopies.push(import_node_path32.default.join(to, name3));
|
|
27323
27539
|
import_node_fs34.default.writeFileSync(
|
|
27324
27540
|
import_node_path32.default.join(to, name3),
|
|
27325
|
-
import_node_fs34.default.readFileSync(import_node_path32.default.join(from, name3), "utf8")
|
|
27326
|
-
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
27327
|
-
"Foundation.NSData."
|
|
27328
|
-
)
|
|
27541
|
+
intakeInterface(import_node_fs34.default.readFileSync(import_node_path32.default.join(from, name3), "utf8"), true)
|
|
27329
27542
|
);
|
|
27330
27543
|
}
|
|
27331
27544
|
}
|
|
@@ -27387,7 +27600,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27387
27600
|
stubs,
|
|
27388
27601
|
"-I",
|
|
27389
27602
|
stubIncludes,
|
|
27390
|
-
...vendorFrameworks.flatMap((dir) => [
|
|
27603
|
+
...vendorFrameworks.flatMap((dir, index) => [
|
|
27604
|
+
"-F",
|
|
27605
|
+
stageVendorFrameworks(dir, import_node_path32.default.join(work, "vendor-frameworks", String(index)))
|
|
27606
|
+
])
|
|
27391
27607
|
];
|
|
27392
27608
|
const missing2 = /* @__PURE__ */ new Map();
|
|
27393
27609
|
const stubbed = /* @__PURE__ */ new Set();
|
|
@@ -27593,6 +27809,13 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27593
27809
|
);
|
|
27594
27810
|
}
|
|
27595
27811
|
}
|
|
27812
|
+
if ((!progress || round === ROUNDS) && keepDefaults && interfaceCopies.length > 0) {
|
|
27813
|
+
keepDefaults = false;
|
|
27814
|
+
for (const file of interfaceCopies)
|
|
27815
|
+
import_node_fs34.default.writeFileSync(file, swiftInterfaceWithoutBodies(import_node_fs34.default.readFileSync(file, "utf8")));
|
|
27816
|
+
writeHeaders();
|
|
27817
|
+
continue;
|
|
27818
|
+
}
|
|
27596
27819
|
if (!progress || round === ROUNDS)
|
|
27597
27820
|
throw new Error(
|
|
27598
27821
|
`its headers do not import as Swift: ${errors.length > 0 ? [...new Set(errors.map((match) => match[4]))].slice(0, 10).join("; ") : `swift-symbolgraph-extract ${run11.signal ?? `exit ${run11.status}`}: ${(run11.stderr.trim() || run11.stdout.trim() || "no diagnostic").slice(0, 4e3)}`}`
|
|
@@ -34258,6 +34481,13 @@ var BINARYEN_RELEASES = /* @__PURE__ */ new Map([
|
|
|
34258
34481
|
]
|
|
34259
34482
|
]);
|
|
34260
34483
|
async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
34484
|
+
const admittedCores = windowAdmission()?.cores ?? Number(process.env.TM_EXEC_CPU_CORES);
|
|
34485
|
+
const requestedCores = Number(process.env.BINARYEN_CORES);
|
|
34486
|
+
const environment = { ...process.env, WASM_OPT_PATH: binary2 };
|
|
34487
|
+
if (Number.isInteger(admittedCores) && admittedCores > 0)
|
|
34488
|
+
environment.BINARYEN_CORES = String(
|
|
34489
|
+
Number.isInteger(requestedCores) && requestedCores > 0 ? Math.min(admittedCores, requestedCores) : admittedCores
|
|
34490
|
+
);
|
|
34261
34491
|
const result = await (0, import_wasm_opt.wasmOpt)(
|
|
34262
34492
|
[
|
|
34263
34493
|
"-Oz",
|
|
@@ -34267,7 +34497,7 @@ async function runWasmOpt(file, output2, skipPasses, binary2) {
|
|
|
34267
34497
|
"-o",
|
|
34268
34498
|
output2
|
|
34269
34499
|
],
|
|
34270
|
-
{ env:
|
|
34500
|
+
{ env: environment }
|
|
34271
34501
|
);
|
|
34272
34502
|
if (result.status !== 0)
|
|
34273
34503
|
throw new Error(`wasm-opt exited ${result.status}: ${result.stderr}`);
|
|
@@ -36335,7 +36565,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
36335
36565
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
36336
36566
|
var MULTI_MANIFEST_VERSION = 68;
|
|
36337
36567
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
36338
|
-
var compilerSourceDigest = true ? "
|
|
36568
|
+
var compilerSourceDigest = true ? "e48d05f659c020e9d4ddc0f6a17da7924aae807faacd6bef7cbed911c43d08cc" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
36339
36569
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
36340
36570
|
const hash = (0, import_node_crypto23.createHash)("sha256");
|
|
36341
36571
|
hash.update(`swift-compile
|
|
@@ -39662,7 +39892,7 @@ function readCompiledArtifact(directory2, hash) {
|
|
|
39662
39892
|
return null;
|
|
39663
39893
|
const bytes = (0, import_node_fs52.readFileSync)(import_node_path50.default.join(directory2, "app.wasm"));
|
|
39664
39894
|
const gzip2 = (0, import_node_fs52.readFileSync)(import_node_path50.default.join(directory2, "icu.gz"));
|
|
39665
|
-
if ((0, import_node_crypto23.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto23.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length
|
|
39895
|
+
if ((0, import_node_crypto23.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto23.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
|
|
39666
39896
|
return null;
|
|
39667
39897
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip: gzip2 } };
|
|
39668
39898
|
} catch (error) {
|
|
@@ -40724,6 +40954,8 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
40724
40954
|
bytes: (0, import_node_fs52.readFileSync)(executable),
|
|
40725
40955
|
icu: await icu
|
|
40726
40956
|
};
|
|
40957
|
+
if (artifact.bytes.length <= 8)
|
|
40958
|
+
throw new Error("swift-compile: deferred linker produced no executable");
|
|
40727
40959
|
if (!options.project) saveCompiledArtifact(root, artifact);
|
|
40728
40960
|
saveSharedArtifact(sharedRoot, artifact);
|
|
40729
40961
|
report("compiled artifact verified");
|
|
@@ -44915,7 +45147,7 @@ function initializeWorkspaceGit(root, work) {
|
|
|
44915
45147
|
});
|
|
44916
45148
|
const tracked = trackedSourceFiles(root, work);
|
|
44917
45149
|
if (tracked.length > 0)
|
|
44918
|
-
(0, import_node_child_process33.execFileSync)("git", ["
|
|
45150
|
+
(0, import_node_child_process33.execFileSync)("git", ["update-index", "--add", "-z", "--stdin"], {
|
|
44919
45151
|
cwd: work,
|
|
44920
45152
|
env: { ...process.env, ...isolatedGitEnv },
|
|
44921
45153
|
input: tracked.join("\0"),
|
|
@@ -45015,6 +45247,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45015
45247
|
const nodeVersion = typeof manifest.engines?.node === "string" && /^\d+(\.\d+){0,2}$/.test(manifest.engines.node) ? manifest.engines.node : null;
|
|
45016
45248
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, "--"] : [];
|
|
45017
45249
|
const bunPrefix = import_node_path61.default.join(cacheDir(), "package-managers", manager);
|
|
45250
|
+
const bunExecutable = import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun");
|
|
45018
45251
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
45019
45252
|
"npx",
|
|
45020
45253
|
"--yes",
|
|
@@ -45023,11 +45256,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45023
45256
|
"--frozen-lockfile",
|
|
45024
45257
|
// the copied node_modules link into the store pnpm chose on the app's volume
|
|
45025
45258
|
...pnpmStoreArgs(root)
|
|
45026
|
-
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [
|
|
45027
|
-
import_node_path61.default.join(bunPrefix, "node_modules/.bin/bun"),
|
|
45028
|
-
"install",
|
|
45029
|
-
"--frozen-lockfile"
|
|
45030
|
-
] : (
|
|
45259
|
+
] : manager === "yarn" || manager.startsWith("yarn@") ? ["corepack", "yarn", "install", "--immutable"] : manager === "bun" || manager.startsWith("bun@") ? manager === "bun" ? ["bun", "install", "--frozen-lockfile"] : [bunExecutable, "install", "--frozen-lockfile"] : (
|
|
45031
45260
|
// npm ci would delete the cloned tree before installing it again
|
|
45032
45261
|
["npm", "install", "--no-audit", "--no-fund"]
|
|
45033
45262
|
);
|
|
@@ -45036,22 +45265,22 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45036
45265
|
const command = [...prefix, ...args];
|
|
45037
45266
|
await run11(command[0], command.slice(1), cwd, env);
|
|
45038
45267
|
};
|
|
45268
|
+
if (manager.startsWith("bun@") && (!projectReady || !import_node_fs62.default.existsSync(bunExecutable)))
|
|
45269
|
+
await execute(
|
|
45270
|
+
[
|
|
45271
|
+
"npm",
|
|
45272
|
+
"install",
|
|
45273
|
+
"--prefix",
|
|
45274
|
+
bunPrefix,
|
|
45275
|
+
// the bun package ships a placeholder binary its postinstall replaces
|
|
45276
|
+
"--ignore-scripts=false",
|
|
45277
|
+
"--no-audit",
|
|
45278
|
+
"--no-fund",
|
|
45279
|
+
manager
|
|
45280
|
+
],
|
|
45281
|
+
work
|
|
45282
|
+
);
|
|
45039
45283
|
if (!projectReady) {
|
|
45040
|
-
if (manager.startsWith("bun@"))
|
|
45041
|
-
await execute(
|
|
45042
|
-
[
|
|
45043
|
-
"npm",
|
|
45044
|
-
"install",
|
|
45045
|
-
"--prefix",
|
|
45046
|
-
bunPrefix,
|
|
45047
|
-
// the bun package ships a placeholder binary its postinstall replaces
|
|
45048
|
-
"--ignore-scripts=false",
|
|
45049
|
-
"--no-audit",
|
|
45050
|
-
"--no-fund",
|
|
45051
|
-
manager
|
|
45052
|
-
],
|
|
45053
|
-
work
|
|
45054
|
-
);
|
|
45055
45284
|
if (install[0] === "npm" && import_node_fs62.default.existsSync(import_node_path61.default.join(work, "package-lock.json"))) {
|
|
45056
45285
|
await execute(
|
|
45057
45286
|
["npm", "ci", "--dry-run", "--ignore-scripts", "--no-audit", "--no-fund"],
|
|
@@ -45827,7 +46056,7 @@ init_package_tree_digest();
|
|
|
45827
46056
|
init_swift_native_pin();
|
|
45828
46057
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
45829
46058
|
function expoNativeCompilerDigestValue() {
|
|
45830
|
-
return true ? "
|
|
46059
|
+
return true ? "5096ba1e78a0087b6e56f15c4b37fcbd9bcabb2acde17a257d8add357efd462c" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
45831
46060
|
}
|
|
45832
46061
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
45833
46062
|
function readSources(value) {
|
|
@@ -48047,6 +48276,19 @@ function cxxOnly(surface) {
|
|
|
48047
48276
|
return false;
|
|
48048
48277
|
});
|
|
48049
48278
|
}
|
|
48279
|
+
function mapSurfaces(modulemap) {
|
|
48280
|
+
const text6 = import_node_fs76.default.readFileSync(modulemap, "utf8");
|
|
48281
|
+
const headers = import_node_path74.default.dirname(modulemap);
|
|
48282
|
+
const modules = moduleMapModules(text6);
|
|
48283
|
+
if (modules.length <= 1) {
|
|
48284
|
+
const module2 = moduleMapName(text6);
|
|
48285
|
+
return module2 ? [headerSurface(module2, modulemap, headers)] : [];
|
|
48286
|
+
}
|
|
48287
|
+
return modules.map(
|
|
48288
|
+
(module2) => headerSurface(module2.name, generatedModuleMap(`${module2.text}
|
|
48289
|
+
`, false), headers)
|
|
48290
|
+
);
|
|
48291
|
+
}
|
|
48050
48292
|
function simulatorSlice(xcframeworkDir) {
|
|
48051
48293
|
const slice = import_node_fs76.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
|
|
48052
48294
|
return slice ? import_node_path74.default.join(xcframeworkDir, slice) : null;
|
|
@@ -48110,8 +48352,7 @@ function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)
|
|
|
48110
48352
|
const headers = import_node_path74.default.join(root, "Headers");
|
|
48111
48353
|
for (const map2 of files(headers, (name3) => name3 === "module.modulemap")) {
|
|
48112
48354
|
const modulemap = import_node_path74.default.join(headers, map2);
|
|
48113
|
-
|
|
48114
|
-
if (module2) found.push(headerSurface(module2, modulemap, import_node_path74.default.dirname(modulemap)));
|
|
48355
|
+
found.push(...mapSurfaces(modulemap));
|
|
48115
48356
|
}
|
|
48116
48357
|
if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
|
|
48117
48358
|
const module2 = swiftTargetModuleName(target);
|
|
@@ -48248,9 +48489,13 @@ function swiftInterfaceForWasm(text6, cFlags) {
|
|
|
48248
48489
|
]);
|
|
48249
48490
|
return `${interop} ${xcc.join(" ")}`;
|
|
48250
48491
|
});
|
|
48251
|
-
|
|
48252
|
-
|
|
48253
|
-
|
|
48492
|
+
const lines = retargeted.split("\n");
|
|
48493
|
+
const required = lines.filter((line) => OPTIONAL_REQUIREMENT.test(line)).join("\n");
|
|
48494
|
+
return lines.map((line) => {
|
|
48495
|
+
if (/\benum\s/.test(line) && TYPE_DECLARATION.test(line)) {
|
|
48496
|
+
const name3 = /\benum\s+(\w+)/.exec(line)?.[1];
|
|
48497
|
+
return name3 && new RegExp(`\\b${name3}\\b`).test(required) && !/\bSwift\.Error\b/.test(line) ? line : line.replace(/@objc(?:\s*\([^()]*\))?\s+/g, "");
|
|
48498
|
+
}
|
|
48254
48499
|
if (TYPE_DECLARATION.test(line)) return line.replace(/@objcMembers\b/g, "");
|
|
48255
48500
|
if (OPTIONAL_REQUIREMENT.test(line)) return line;
|
|
48256
48501
|
return line.replace(OBJC_ATTRIBUTE, "");
|
|
@@ -48671,6 +48916,14 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48671
48916
|
const plain = /* @__PURE__ */ new Set();
|
|
48672
48917
|
const unobjc = /* @__PURE__ */ new Set();
|
|
48673
48918
|
const trapped = /* @__PURE__ */ new Set();
|
|
48919
|
+
const unconformed = /* @__PURE__ */ new Map();
|
|
48920
|
+
const objcProtocols = new Set(
|
|
48921
|
+
graphs.flatMap(
|
|
48922
|
+
(graph) => graph.symbols.filter(
|
|
48923
|
+
(symbol2) => symbol2.kind.identifier === "swift.protocol" && symbol2.identifier.precise.startsWith("c:")
|
|
48924
|
+
).map((symbol2) => symbol2.pathComponents.join("."))
|
|
48925
|
+
)
|
|
48926
|
+
);
|
|
48674
48927
|
const file = import_node_path74.default.join(work, `${module2}.swift`);
|
|
48675
48928
|
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.assemblySources === void 0;
|
|
48676
48929
|
for (; ; ) {
|
|
@@ -48683,6 +48936,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48683
48936
|
omit,
|
|
48684
48937
|
plain,
|
|
48685
48938
|
unobjc,
|
|
48939
|
+
unconformed,
|
|
48686
48940
|
trapped,
|
|
48687
48941
|
inert,
|
|
48688
48942
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
@@ -48730,7 +48984,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48730
48984
|
files: { [`${module2}.swift`]: source },
|
|
48731
48985
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
48732
48986
|
};
|
|
48733
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size;
|
|
48987
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
48734
48988
|
const elsewhere = [];
|
|
48735
48989
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
48736
48990
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -48738,6 +48992,13 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48738
48992
|
unobjc.add(owner);
|
|
48739
48993
|
continue;
|
|
48740
48994
|
}
|
|
48995
|
+
const conformance = /^type '\w+' does not conform to protocol '(\w+)'$/.exec(
|
|
48996
|
+
match[3]
|
|
48997
|
+
)?.[1];
|
|
48998
|
+
if (owner && conformance && objcProtocols.has(conformance)) {
|
|
48999
|
+
unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], conformance]));
|
|
49000
|
+
continue;
|
|
49001
|
+
}
|
|
48741
49002
|
if (owner && swiftPaths.has(owner))
|
|
48742
49003
|
throw new Error(
|
|
48743
49004
|
`Swift declaration ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
@@ -48753,7 +49014,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48753
49014
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
48754
49015
|
else elsewhere.push(match[3]);
|
|
48755
49016
|
}
|
|
48756
|
-
if (omit.size + plain.size + unobjc.size + trapped.size === before)
|
|
49017
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
48757
49018
|
throw new Error(
|
|
48758
49019
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
48759
49020
|
);
|
|
@@ -48879,7 +49140,16 @@ function splitDeclarators(statement, names) {
|
|
|
48879
49140
|
);
|
|
48880
49141
|
}
|
|
48881
49142
|
function cStandin(surface, binary2, toolchain, work) {
|
|
48882
|
-
const
|
|
49143
|
+
const everyHeader = files(surface.headers, (name3) => name3.endsWith(".h"));
|
|
49144
|
+
const moduleRoots = moduleMapHeaders(surface.modulemap, everyHeader);
|
|
49145
|
+
const headers = [...moduleRoots];
|
|
49146
|
+
for (let at = 0; at < headers.length; at++)
|
|
49147
|
+
for (const [, local] of import_node_fs76.default.readFileSync(import_node_path74.default.join(surface.headers, headers[at]), "utf8").matchAll(/^\s*#\s*(?:include|import)\s*["<]([^">]+)[">]/gm)) {
|
|
49148
|
+
const file = import_node_path74.default.posix.normalize(
|
|
49149
|
+
import_node_path74.default.posix.join(import_node_path74.default.posix.dirname(headers[at]), local)
|
|
49150
|
+
);
|
|
49151
|
+
if (everyHeader.includes(file) && !headers.includes(file)) headers.push(file);
|
|
49152
|
+
}
|
|
48883
49153
|
const framework = import_node_path74.default.basename(import_node_path74.default.dirname(surface.modulemap)) === "Modules";
|
|
48884
49154
|
const headerDirectory = framework ? `${surface.module}.framework/Headers` : ".";
|
|
48885
49155
|
const texts = new Map(
|
|
@@ -48894,9 +49164,7 @@ function cStandin(surface, binary2, toolchain, work) {
|
|
|
48894
49164
|
import_node_fs76.default.mkdirSync(import_node_path74.default.dirname(import_node_path74.default.join(include, file)), { recursive: true });
|
|
48895
49165
|
import_node_fs76.default.writeFileSync(import_node_path74.default.join(include, file), text6);
|
|
48896
49166
|
}
|
|
48897
|
-
const roots =
|
|
48898
|
-
(file) => import_node_path74.default.posix.join(headerDirectory, file)
|
|
48899
|
-
);
|
|
49167
|
+
const roots = moduleRoots.map((file) => import_node_path74.default.posix.join(headerDirectory, file));
|
|
48900
49168
|
const frameworkMap = `${surface.module}.framework/Modules/module.modulemap`;
|
|
48901
49169
|
const modulemap = `module ${surface.module} {
|
|
48902
49170
|
${roots.map((file) => ` header "${file}"
|
|
@@ -49641,7 +49909,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
49641
49909
|
return error instanceof Error ? error.message : String(error);
|
|
49642
49910
|
}
|
|
49643
49911
|
const found = all.filter(
|
|
49644
|
-
(surface) => !provided.has(surface.module) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
|
|
49912
|
+
(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))
|
|
49645
49913
|
);
|
|
49646
49914
|
if (found.length === 0) {
|
|
49647
49915
|
import_node_fs76.default.rmSync(work, { recursive: true, force: true });
|
|
@@ -62365,7 +62633,15 @@ function targetSettings2(units) {
|
|
|
62365
62633
|
}
|
|
62366
62634
|
return settings;
|
|
62367
62635
|
}
|
|
62368
|
-
function
|
|
62636
|
+
function oneSDKStamp(oneSDK) {
|
|
62637
|
+
if (!oneSDK) return "";
|
|
62638
|
+
const hash = (0, import_node_crypto47.createHash)("sha256");
|
|
62639
|
+
for (const files2 of [oneSDK.targets, oneSDK.entry])
|
|
62640
|
+
for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
|
|
62641
|
+
hash.update(`${name3}\0${source}\0`);
|
|
62642
|
+
return hash.digest("hex");
|
|
62643
|
+
}
|
|
62644
|
+
function expoEntry(units, oneSDK = false) {
|
|
62369
62645
|
const namespaces = [...new Set(units.map((unit2) => unit2.namespace))].filter((namespace) => namespace !== "PeachExpoApp").filter(
|
|
62370
62646
|
(namespace) => units.some(
|
|
62371
62647
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
@@ -62375,13 +62651,14 @@ function expoEntry(units) {
|
|
|
62375
62651
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
62376
62652
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
62377
62653
|
const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
|
|
62654
|
+
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) }";
|
|
62378
62655
|
return `import SwiftUI
|
|
62379
62656
|
internal import ExpoModulesCore
|
|
62380
|
-
${bridgeModules.length ? "import React\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
62657
|
+
${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport OneSDKBindings\n" : ""}${namespaces.map((namespace) => `import ${namespace}`).join("\n")}
|
|
62381
62658
|
|
|
62382
62659
|
@main struct PeachExpoApp: PeachPackage {
|
|
62383
62660
|
init() { MainActor.assumeIsolated { PeachExpoRuntime.register([${units.flatMap((unit2) => unit2.classes).join(", ")}])${delegates}${bridgeModules.length ? `; RCTModuleHost.register([${bridgeModules.join(", ")}])` : ""} } }
|
|
62384
|
-
|
|
62661
|
+
${view}
|
|
62385
62662
|
}
|
|
62386
62663
|
|
|
62387
62664
|
@_expose(wasm, "peach_expo_call")
|
|
@@ -62478,7 +62755,7 @@ async function compileExpoSwiftModules(root, base, publishArtifact, options = {}
|
|
|
62478
62755
|
installSwiftInputTrace();
|
|
62479
62756
|
let key2;
|
|
62480
62757
|
try {
|
|
62481
|
-
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}`;
|
|
62758
|
+
key2 = `${await discoveryKey(root, options.installedWorkspace, true, options.iosTarget, options.moduleRoot)}\0${options.only?.join(",") ?? ""}\0${oneSDKStamp(options.oneSDK)}`;
|
|
62482
62759
|
} catch {
|
|
62483
62760
|
return compileExpoSwiftModulesTraced(root, base, publishArtifact, options);
|
|
62484
62761
|
}
|
|
@@ -62515,11 +62792,23 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
62515
62792
|
throw new Error(`conflicting Expo Swift binary source ${name3}`);
|
|
62516
62793
|
files2[name3] = source;
|
|
62517
62794
|
}
|
|
62518
|
-
|
|
62795
|
+
const settings = targetSettings2(linked2);
|
|
62796
|
+
if (options.oneSDK) {
|
|
62797
|
+
for (const [name3, source] of options.oneSDK.targets) files2[name3] = source;
|
|
62798
|
+
for (const [name3, source] of options.oneSDK.entry)
|
|
62799
|
+
files2[`Sources/PeachExpoApp/${name3}`] = source;
|
|
62800
|
+
settings.set("OneSDKBindings", {
|
|
62801
|
+
languageMode: 5,
|
|
62802
|
+
mainActorIsolation: false,
|
|
62803
|
+
swiftFlags: ["-suppress-warnings"],
|
|
62804
|
+
dependencies: [{ kind: "target", name: "One" }]
|
|
62805
|
+
});
|
|
62806
|
+
}
|
|
62807
|
+
files2[EXPO_SWIFT_ENTRY] = expoEntry(linked2, options.oneSDK !== void 0);
|
|
62519
62808
|
files2["Package.swift"] = expoManifest(
|
|
62520
62809
|
files2,
|
|
62521
62810
|
linked2.map((unit2) => generations.get(unit2) ?? "").join(","),
|
|
62522
|
-
|
|
62811
|
+
settings
|
|
62523
62812
|
);
|
|
62524
62813
|
const provider = linked2.some((unit2) => unit2.reactNativeProvider) ? reactProvider : void 0;
|
|
62525
62814
|
if (provider) {
|
|
@@ -62880,7 +63169,11 @@ async function compileExpoSwiftModulesTraced(root, base, publishArtifact, option
|
|
|
62880
63169
|
stamps.set(unit2, stamp);
|
|
62881
63170
|
candidates.push(unit2);
|
|
62882
63171
|
}
|
|
62883
|
-
const preparedKey = expoSwiftPreparedKey(
|
|
63172
|
+
const preparedKey = expoSwiftPreparedKey(
|
|
63173
|
+
base,
|
|
63174
|
+
units,
|
|
63175
|
+
reactProviderStamp + oneSDKStamp(options.oneSDK)
|
|
63176
|
+
);
|
|
62884
63177
|
if (!publishArtifact) {
|
|
62885
63178
|
const prepared = preparedExpoSwift.get(preparedKey);
|
|
62886
63179
|
if (prepared) {
|
|
@@ -63915,20 +64208,41 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
63915
64208
|
"specifications",
|
|
63916
64209
|
`${checksum}.json`
|
|
63917
64210
|
);
|
|
64211
|
+
const sha1 = (value) => (0, import_node_crypto50.createHash)("sha1").update(value).digest("hex");
|
|
63918
64212
|
let text6;
|
|
63919
64213
|
if (import_node_fs94.default.existsSync(file)) text6 = import_node_fs94.default.readFileSync(file, "utf8");
|
|
63920
64214
|
else {
|
|
63921
64215
|
const shard = (0, import_node_crypto50.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
63922
|
-
const
|
|
63923
|
-
|
|
63924
|
-
);
|
|
64216
|
+
const specPath = `Specs/${shard}/${root}/${version2}/${root}.podspec.json`;
|
|
64217
|
+
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
63925
64218
|
if (!response.ok)
|
|
63926
64219
|
throw new Error(
|
|
63927
64220
|
`CocoaPods specification ${root} ${version2}: HTTP ${response.status}`
|
|
63928
64221
|
);
|
|
63929
64222
|
text6 = await response.text();
|
|
64223
|
+
if (sha1(text6) !== checksum) {
|
|
64224
|
+
const history = await fetch(
|
|
64225
|
+
`https://api.github.com/repos/CocoaPods/Specs/commits?path=${specPath}&per_page=100`
|
|
64226
|
+
);
|
|
64227
|
+
if (!history.ok)
|
|
64228
|
+
throw new Error(`CocoaPods specification ${root} history: HTTP ${history.status}`);
|
|
64229
|
+
const commits = await history.json();
|
|
64230
|
+
for (const commit of Array.isArray(commits) ? commits : []) {
|
|
64231
|
+
const sha = record2(commit) ? commit.sha : void 0;
|
|
64232
|
+
if (typeof sha !== "string") continue;
|
|
64233
|
+
const revision = await fetch(
|
|
64234
|
+
`https://raw.githubusercontent.com/CocoaPods/Specs/${sha}/${specPath}`
|
|
64235
|
+
);
|
|
64236
|
+
if (!revision.ok) continue;
|
|
64237
|
+
const revisionText = await revision.text();
|
|
64238
|
+
if (sha1(revisionText) === checksum) {
|
|
64239
|
+
text6 = revisionText;
|
|
64240
|
+
break;
|
|
64241
|
+
}
|
|
64242
|
+
}
|
|
64243
|
+
}
|
|
63930
64244
|
}
|
|
63931
|
-
if (
|
|
64245
|
+
if (sha1(text6) !== checksum)
|
|
63932
64246
|
throw new Error(`${root} podspec checksum differs from ${lockFile}`);
|
|
63933
64247
|
const spec = JSON.parse(text6);
|
|
63934
64248
|
if (!record2(spec) || spec.name !== root || spec.version !== version2)
|
|
@@ -64745,12 +65059,11 @@ extension OneNativeComposable {
|
|
|
64745
65059
|
public func propagateActive(_ active: Bool) {}
|
|
64746
65060
|
}
|
|
64747
65061
|
`;
|
|
64748
|
-
var
|
|
65062
|
+
var oneSDKHost = String.raw`import SwiftUI
|
|
64749
65063
|
@_spi(Peach) import UIKit
|
|
64750
65064
|
import One
|
|
64751
|
-
import OneSDKBindings
|
|
64752
65065
|
|
|
64753
|
-
|
|
65066
|
+
struct OneSDKUIKitHost: UIViewRepresentable {
|
|
64754
65067
|
let props: JSON
|
|
64755
65068
|
func makeUIView(context: Context) -> OneNativeUIKitHostView { OneNativeUIKitHostView() }
|
|
64756
65069
|
func updateUIView(_ view: OneNativeUIKitHostView, context: Context) {
|
|
@@ -64762,10 +65075,14 @@ private struct UIKitHost: UIViewRepresentable {
|
|
|
64762
65075
|
}
|
|
64763
65076
|
static func dismantleUIView(_ view: OneNativeUIKitHostView, coordinator: Coordinator) { view.reset() }
|
|
64764
65077
|
}
|
|
65078
|
+
`;
|
|
65079
|
+
var oneSDKApp = String.raw`import SwiftUI
|
|
65080
|
+
import One
|
|
65081
|
+
import OneSDKBindings
|
|
64765
65082
|
|
|
64766
65083
|
@main
|
|
64767
65084
|
struct SDKGuest: PeachPackage {
|
|
64768
|
-
func view(props: JSON) -> some View {
|
|
65085
|
+
func view(props: JSON) -> some View { OneSDKUIKitHost(props: props) }
|
|
64769
65086
|
}
|
|
64770
65087
|
`;
|
|
64771
65088
|
var oneSDKTransport = String.raw`import Foundation
|
|
@@ -65063,7 +65380,7 @@ async function compileOneSDKApp(appRoot, origin, moduleRootOverride) {
|
|
|
65063
65380
|
const prepared = await prepareExpoNativeProject(appRoot);
|
|
65064
65381
|
return compilePreparedOneSDKApp(appRoot, prepared.app, origin, moduleRootOverride);
|
|
65065
65382
|
}
|
|
65066
|
-
async function
|
|
65383
|
+
async function oneSDKLinkSources(appRoot, preparedRoot) {
|
|
65067
65384
|
const selected = await selectOneSDK(appRoot);
|
|
65068
65385
|
if (!selected) throw new Error("prepared app has no One SDK imports");
|
|
65069
65386
|
const { one, frameworks } = selected;
|
|
@@ -65078,6 +65395,35 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
|
|
|
65078
65395
|
throw new Error(
|
|
65079
65396
|
"prepared One SDK sources differ from the installed facades or app imports"
|
|
65080
65397
|
);
|
|
65398
|
+
const targets = /* @__PURE__ */ new Map();
|
|
65399
|
+
targets.set("Sources/One/One.swift", oneSDKModule);
|
|
65400
|
+
for (const source of [
|
|
65401
|
+
"SDK/OneSDKRuntime.swift",
|
|
65402
|
+
"OneNativeUIKitHostView.swift",
|
|
65403
|
+
"OneNativeContent.swift",
|
|
65404
|
+
"OneNativeAccessibility.swift",
|
|
65405
|
+
"SDKViews/OneNativeViewsTable.swift"
|
|
65406
|
+
])
|
|
65407
|
+
targets.set(
|
|
65408
|
+
`Sources/One/${import_node_path97.default.basename(source)}`,
|
|
65409
|
+
import_node_fs98.default.readFileSync(import_node_path97.default.join(one, "ios", source), "utf8")
|
|
65410
|
+
);
|
|
65411
|
+
for (const name3 of generated.files)
|
|
65412
|
+
targets.set(
|
|
65413
|
+
`Sources/OneSDKBindings/${name3}`,
|
|
65414
|
+
import_node_fs98.default.readFileSync(import_node_path97.default.join(sourceRoot, name3), "utf8")
|
|
65415
|
+
);
|
|
65416
|
+
return {
|
|
65417
|
+
targets,
|
|
65418
|
+
entry: /* @__PURE__ */ new Map([
|
|
65419
|
+
["OneSDKHost.swift", oneSDKHost],
|
|
65420
|
+
["OneSDKTransport.swift", oneSDKTransport]
|
|
65421
|
+
]),
|
|
65422
|
+
modules: frameworks.map((name3) => `${name3}_${generated.generation}`)
|
|
65423
|
+
};
|
|
65424
|
+
}
|
|
65425
|
+
async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRootOverride) {
|
|
65426
|
+
const sources = await oneSDKLinkSources(appRoot, preparedRoot);
|
|
65081
65427
|
const moduleRoot = moduleRootOverride ?? (await resolveSwiftModule()).root;
|
|
65082
65428
|
const packagePath = import_node_path97.default.join(
|
|
65083
65429
|
swiftCacheDir(),
|
|
@@ -65097,25 +65443,9 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65097
65443
|
])
|
|
65098
65444
|
`
|
|
65099
65445
|
);
|
|
65100
|
-
files2.set(
|
|
65101
|
-
for (const source of
|
|
65102
|
-
"SDK/OneSDKRuntime.swift",
|
|
65103
|
-
"OneNativeUIKitHostView.swift",
|
|
65104
|
-
"OneNativeContent.swift",
|
|
65105
|
-
"OneNativeAccessibility.swift",
|
|
65106
|
-
"SDKViews/OneNativeViewsTable.swift"
|
|
65107
|
-
])
|
|
65108
|
-
files2.set(
|
|
65109
|
-
`Sources/One/${import_node_path97.default.basename(source)}`,
|
|
65110
|
-
import_node_fs98.default.readFileSync(import_node_path97.default.join(one, "ios", source), "utf8")
|
|
65111
|
-
);
|
|
65112
|
-
for (const name3 of generated.files)
|
|
65113
|
-
files2.set(
|
|
65114
|
-
`Sources/OneSDKBindings/${name3}`,
|
|
65115
|
-
import_node_fs98.default.readFileSync(import_node_path97.default.join(sourceRoot, name3), "utf8")
|
|
65116
|
-
);
|
|
65446
|
+
for (const [name3, source] of sources.targets) files2.set(name3, source);
|
|
65447
|
+
for (const [name3, source] of sources.entry) files2.set(`Sources/App/${name3}`, source);
|
|
65117
65448
|
files2.set("Sources/App/App.swift", oneSDKApp);
|
|
65118
|
-
files2.set("Sources/App/Transport.swift", oneSDKTransport);
|
|
65119
65449
|
import_node_fs98.default.mkdirSync(packagePath, { recursive: true });
|
|
65120
65450
|
syncSwiftTree(
|
|
65121
65451
|
packagePath,
|
|
@@ -65131,7 +65461,7 @@ let package = Package(name: "OneSDKGuest", targets: [
|
|
|
65131
65461
|
icuUrl: icuUrl(origin, artifact),
|
|
65132
65462
|
rootId: `one-sdk-${artifact.hash.slice(0, 16)}`,
|
|
65133
65463
|
bundleFiles: artifact.package.bundleFiles.files,
|
|
65134
|
-
modules:
|
|
65464
|
+
modules: sources.modules
|
|
65135
65465
|
};
|
|
65136
65466
|
return { metadata, artifact };
|
|
65137
65467
|
}
|