peachsim 0.1.2182 → 0.1.2186
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/cpu-profile.ts +6 -2
- package/cli/commands/shell-url.ts +3 -6
- 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 +371 -36
- 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 +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +325 -28
- package/dist-lib/expo-swift-metadata.cjs +2 -1
- package/dist-lib/expo-swift-metadata.mjs +2 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +364 -36
- package/dist-lib/host/fetch-proxy-handler.cjs +8 -5
- 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 +51 -7
- 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 +5 -3
- 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 +51 -7
- package/dist-lib/native-app-identity-project.cjs +49 -5
- package/dist-lib/native-app-identity-project.mjs +49 -5
- package/dist-lib/native-app-identity.cjs +40 -2
- package/dist-lib/native-app-identity.mjs +40 -2
- 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 +383 -39
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +2 -2
- package/dist-lib/swift-package.cjs +26 -1
- package/dist-lib/swift-package.mjs +25 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +286 -24
- package/dist-lib/vite.cjs +8 -5
- 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/compositor-backend.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.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/System/Library/Frameworks/UIKit.framework/Headers/UIImageAsset.h +1 -1
- 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 +9 -2
- package/src/kotlin-host.ts +4 -2
- package/src/native-app-identity-project.ts +10 -2
- package/src/native-app-identity.ts +15 -1
- package/src/nativeAppIconContract.ts +37 -0
- package/src/swift-installed-targets.ts +8 -0
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2186 | (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 ? "62c7fc880aa6efc985c4786587cb8441b81094e44c28f8d65e1d6dffda9c24f4" : 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 ? "657f6d25b5a8cead1b82960b638441e0fe6bc4380c409fbb9809a56d6f0102d6" : 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();
|
|
@@ -12383,7 +12383,7 @@ var init_nitro_superset = __esm({
|
|
|
12383
12383
|
var runtime_companion_default;
|
|
12384
12384
|
var init_runtime_companion = __esm({
|
|
12385
12385
|
"runtime-companion.json"() {
|
|
12386
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
12386
|
+
runtime_companion_default = { abi: 1, sha256: "c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91", file: "node/cli-c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91.cjs" };
|
|
12387
12387
|
}
|
|
12388
12388
|
});
|
|
12389
12389
|
|
|
@@ -13386,10 +13386,11 @@ function entrySource(ids) {
|
|
|
13386
13386
|
"",
|
|
13387
13387
|
"@OptIn(kotlin.js.ExperimentalJsExport::class)",
|
|
13388
13388
|
"@JsExport",
|
|
13389
|
-
"fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
|
|
13389
|
+
"fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String, settings: String) {",
|
|
13390
13390
|
" Build.setDevice(model, release, apiLevel)",
|
|
13391
13391
|
" java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
|
|
13392
13392
|
" java.util.TimeZone.setDevice(timeZone)",
|
|
13393
|
+
" dev.peach.android.ProcessSettings.configure(settings)",
|
|
13393
13394
|
"}",
|
|
13394
13395
|
"",
|
|
13395
13396
|
"@OptIn(kotlin.js.ExperimentalJsExport::class, kotlinx.coroutines.DelicateCoroutinesApi::class)",
|
|
@@ -13757,10 +13758,11 @@ async function expoKotlinArtifact(root, moduleRoot, origin, modules) {
|
|
|
13757
13758
|
" ))",
|
|
13758
13759
|
"}",
|
|
13759
13760
|
"",
|
|
13760
|
-
"@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
|
|
13761
|
+
"@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String, settings: String) {",
|
|
13761
13762
|
" android.os.Build.setDevice(model, release, apiLevel)",
|
|
13762
13763
|
" java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
|
|
13763
13764
|
" java.util.TimeZone.setDevice(timeZone)",
|
|
13765
|
+
" dev.peach.android.ProcessSettings.configure(settings)",
|
|
13764
13766
|
" PeachExpoRuntime.configureProcessLocale(locale)",
|
|
13765
13767
|
"}",
|
|
13766
13768
|
"",
|
|
@@ -21432,6 +21434,34 @@ init_is_record();
|
|
|
21432
21434
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
21433
21435
|
init_assetCatalogContract();
|
|
21434
21436
|
init_is_record();
|
|
21437
|
+
function resolveNativeBundleIcons(icons, catalogNames, resolveReference) {
|
|
21438
|
+
if (!isRecord(icons) && catalogNames.length === 0) return void 0;
|
|
21439
|
+
const resolve7 = (value) => {
|
|
21440
|
+
if (typeof value === "string") return resolveReference(value);
|
|
21441
|
+
if (Array.isArray(value)) return value.map(resolve7);
|
|
21442
|
+
if (isRecord(value))
|
|
21443
|
+
return Object.fromEntries(
|
|
21444
|
+
Object.entries(value).map(([key2, entry]) => [
|
|
21445
|
+
resolveReference(key2),
|
|
21446
|
+
resolve7(entry)
|
|
21447
|
+
])
|
|
21448
|
+
);
|
|
21449
|
+
return value;
|
|
21450
|
+
};
|
|
21451
|
+
const dictionary2 = isRecord(icons) ? Object.fromEntries(
|
|
21452
|
+
Object.entries(icons).map(([key2, value]) => [key2, resolve7(value)])
|
|
21453
|
+
) : {};
|
|
21454
|
+
if (catalogNames.length === 0) return dictionary2;
|
|
21455
|
+
return {
|
|
21456
|
+
...dictionary2,
|
|
21457
|
+
CFBundleAlternateIcons: {
|
|
21458
|
+
...Object.fromEntries(
|
|
21459
|
+
catalogNames.map((name3) => [name3, { CFBundleIconName: name3 }])
|
|
21460
|
+
),
|
|
21461
|
+
...isRecord(dictionary2.CFBundleAlternateIcons) ? dictionary2.CFBundleAlternateIcons : {}
|
|
21462
|
+
}
|
|
21463
|
+
};
|
|
21464
|
+
}
|
|
21435
21465
|
function isNativeAppIconArtwork(value) {
|
|
21436
21466
|
return isRecord(value) && (value.primary === void 0 || isSwiftImageVariants(value.primary)) && isRecord(value.alternates) && Object.values(value.alternates).every(isSwiftImageVariants);
|
|
21437
21467
|
}
|
|
@@ -21748,6 +21778,7 @@ function isNativeAppIdentity(value) {
|
|
|
21748
21778
|
if (value.androidPhotoLibraryAddOnly !== void 0 && value.androidPhotoLibraryAddOnly !== true)
|
|
21749
21779
|
return false;
|
|
21750
21780
|
if (value.googleSignIn !== void 0 && !isRecord(value.googleSignIn)) return false;
|
|
21781
|
+
if (value.bundleIcons !== void 0 && !isRecord(value.bundleIcons)) return false;
|
|
21751
21782
|
const descriptions = value.permissionUsageDescriptions;
|
|
21752
21783
|
if (value.reanimatedStaticFeatureFlags !== void 0 && (!isRecord(value.reanimatedStaticFeatureFlags) || !Object.values(value.reanimatedStaticFeatureFlags).every(
|
|
21753
21784
|
(flag) => typeof flag === "boolean"
|
|
@@ -22132,6 +22163,29 @@ function moduleMapName(text6) {
|
|
|
22132
22163
|
);
|
|
22133
22164
|
return index < 0 ? void 0 : tokens2[index + 1];
|
|
22134
22165
|
}
|
|
22166
|
+
function moduleMapModules(text6) {
|
|
22167
|
+
const modules = [];
|
|
22168
|
+
const token = /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|\{|\}|\bmodule\s+([\w.]+)/g;
|
|
22169
|
+
let depth = 0;
|
|
22170
|
+
let start = -1;
|
|
22171
|
+
let name3 = "";
|
|
22172
|
+
for (const match of text6.matchAll(token)) {
|
|
22173
|
+
if (match[0] === "{") depth++;
|
|
22174
|
+
else if (match[0] === "}") {
|
|
22175
|
+
depth--;
|
|
22176
|
+
if (depth === 0 && start >= 0) {
|
|
22177
|
+
modules.push({ name: name3, text: text6.slice(start, match.index + 1) });
|
|
22178
|
+
start = -1;
|
|
22179
|
+
}
|
|
22180
|
+
} else if (match[1] !== void 0 && depth === 0) {
|
|
22181
|
+
const before = text6.slice(0, match.index).trimEnd();
|
|
22182
|
+
if (/\bextern$/.test(before)) continue;
|
|
22183
|
+
start = match.index;
|
|
22184
|
+
name3 = match[1];
|
|
22185
|
+
}
|
|
22186
|
+
}
|
|
22187
|
+
return modules;
|
|
22188
|
+
}
|
|
22135
22189
|
function swiftTargetModuleName(name3) {
|
|
22136
22190
|
return name3.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
22137
22191
|
}
|
|
@@ -25460,6 +25514,137 @@ var import_node_fs34 = __toESM(require("node:fs"), 1);
|
|
|
25460
25514
|
var import_node_path32 = __toESM(require("node:path"), 1);
|
|
25461
25515
|
init_is_record();
|
|
25462
25516
|
|
|
25517
|
+
// src/swift-interface-bodies.ts
|
|
25518
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
25519
|
+
var INLINE_ATTRIBUTE = /@(?:inlinable|_alwaysEmitIntoClient|_transparent|inline\(__always\)|_effects\([^()]*\)|_specialize\((?:[^()]|\([^()]*\))*\))\s*/g;
|
|
25520
|
+
var ACCESSOR = /^(?:mutating|nonmutating|async|throws|rethrows|get|set|_modify|_read)$/;
|
|
25521
|
+
function declarationKind(head) {
|
|
25522
|
+
const words2 = head.replace(/@\w+(?:\((?:[^()]|\([^()]*\))*\))?/g, " ").match(/[A-Za-z_]\w*/g);
|
|
25523
|
+
for (const word of words2 ?? []) {
|
|
25524
|
+
if (word === "func" || word === "init" || word === "deinit") return "function";
|
|
25525
|
+
if (word === "var" || word === "let" || word === "subscript") return "property";
|
|
25526
|
+
if (word === "struct" || word === "class" || word === "enum" || word === "protocol" || word === "extension" || word === "actor" || word === "precedencegroup")
|
|
25527
|
+
return "container";
|
|
25528
|
+
}
|
|
25529
|
+
return "container";
|
|
25530
|
+
}
|
|
25531
|
+
function skipLiteral(text6, i) {
|
|
25532
|
+
if (text6.startsWith("//", i)) {
|
|
25533
|
+
const end = text6.indexOf("\n", i);
|
|
25534
|
+
return end < 0 ? text6.length : end;
|
|
25535
|
+
}
|
|
25536
|
+
if (text6.startsWith("/*", i)) {
|
|
25537
|
+
const end = text6.indexOf("*/", i + 2);
|
|
25538
|
+
return end < 0 ? text6.length : end + 2;
|
|
25539
|
+
}
|
|
25540
|
+
if (text6[i] !== '"' && text6[i] !== "#") return i;
|
|
25541
|
+
let hashes = 0;
|
|
25542
|
+
let j = i;
|
|
25543
|
+
while (text6[j] === "#") {
|
|
25544
|
+
hashes++;
|
|
25545
|
+
j++;
|
|
25546
|
+
}
|
|
25547
|
+
if (text6[j] !== '"') return i;
|
|
25548
|
+
const multiline = text6.startsWith('"""', j);
|
|
25549
|
+
const open = multiline ? '"""' : '"';
|
|
25550
|
+
j += open.length;
|
|
25551
|
+
const close = `${open}${"#".repeat(hashes)}`;
|
|
25552
|
+
const escape2 = `\\${"#".repeat(hashes)}`;
|
|
25553
|
+
while (j < text6.length) {
|
|
25554
|
+
if (text6.startsWith(escape2, j)) j += escape2.length + 1;
|
|
25555
|
+
else if (text6.startsWith(close, j)) return j + close.length;
|
|
25556
|
+
else j++;
|
|
25557
|
+
}
|
|
25558
|
+
return text6.length;
|
|
25559
|
+
}
|
|
25560
|
+
function skipBlock(text6, open) {
|
|
25561
|
+
let depth = 0;
|
|
25562
|
+
for (let i = open; i < text6.length; ) {
|
|
25563
|
+
const after = skipLiteral(text6, i);
|
|
25564
|
+
if (after !== i) {
|
|
25565
|
+
i = after;
|
|
25566
|
+
continue;
|
|
25567
|
+
}
|
|
25568
|
+
if (text6[i] === "{") depth++;
|
|
25569
|
+
else if (text6[i] === "}" && --depth === 0) return i + 1;
|
|
25570
|
+
i++;
|
|
25571
|
+
}
|
|
25572
|
+
return text6.length;
|
|
25573
|
+
}
|
|
25574
|
+
function skipExpression(text6, start) {
|
|
25575
|
+
let depth = 0;
|
|
25576
|
+
for (let i = start; i < text6.length; ) {
|
|
25577
|
+
const after = skipLiteral(text6, i);
|
|
25578
|
+
if (after !== i) {
|
|
25579
|
+
i = after;
|
|
25580
|
+
continue;
|
|
25581
|
+
}
|
|
25582
|
+
const char = text6[i];
|
|
25583
|
+
if (char === "(" || char === "[" || char === "{" || char === "<") depth++;
|
|
25584
|
+
else if (char === ">" && text6[i - 1] !== "-") depth--;
|
|
25585
|
+
else if (char === ")" || char === "]" || char === "}") {
|
|
25586
|
+
if (depth === 0) return i;
|
|
25587
|
+
depth--;
|
|
25588
|
+
} else if (char === "," && depth === 0) return i;
|
|
25589
|
+
i++;
|
|
25590
|
+
}
|
|
25591
|
+
return text6.length;
|
|
25592
|
+
}
|
|
25593
|
+
function swiftInterfaceWithoutBodies(text6, keepDefaults = false) {
|
|
25594
|
+
let out = "";
|
|
25595
|
+
const frames = [];
|
|
25596
|
+
let parens = 0;
|
|
25597
|
+
let lineStart = 0;
|
|
25598
|
+
for (let i = 0; i < text6.length; ) {
|
|
25599
|
+
const after = skipLiteral(text6, i);
|
|
25600
|
+
if (after !== i) {
|
|
25601
|
+
out += text6.slice(i, after);
|
|
25602
|
+
i = after;
|
|
25603
|
+
continue;
|
|
25604
|
+
}
|
|
25605
|
+
const char = text6[i];
|
|
25606
|
+
if (char === "=" && parens > 0 && text6[i - 1] === " " && text6[i + 1] === " ") {
|
|
25607
|
+
out = out.trimEnd();
|
|
25608
|
+
i = skipExpression(text6, i + 1);
|
|
25609
|
+
continue;
|
|
25610
|
+
}
|
|
25611
|
+
if (char === "\n") lineStart = out.length + 1;
|
|
25612
|
+
else if (char === "(") parens++;
|
|
25613
|
+
else if (char === ")") parens--;
|
|
25614
|
+
else if (char === "}") {
|
|
25615
|
+
frames.pop();
|
|
25616
|
+
} else if (char === "{") {
|
|
25617
|
+
const parent = frames.at(-1);
|
|
25618
|
+
const head = out.slice(lineStart);
|
|
25619
|
+
if (parens > 0 || parent === "expression") frames.push("expression");
|
|
25620
|
+
else if (parent === "accessors") {
|
|
25621
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
25622
|
+
i = skipBlock(text6, i);
|
|
25623
|
+
continue;
|
|
25624
|
+
} else {
|
|
25625
|
+
const kind = declarationKind(head);
|
|
25626
|
+
const body = text6.slice(i + 1, skipBlock(text6, i) - 1);
|
|
25627
|
+
if (kind === "function") {
|
|
25628
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
25629
|
+
i = skipBlock(text6, i);
|
|
25630
|
+
continue;
|
|
25631
|
+
}
|
|
25632
|
+
const bare = body.split(/\s+/).every((word) => word === "" || ACCESSOR.test(word));
|
|
25633
|
+
frames.push(kind === "property" && !bare ? "accessors" : "container");
|
|
25634
|
+
if (kind === "property" && bare) {
|
|
25635
|
+
out += `{${body}}`;
|
|
25636
|
+
i = skipBlock(text6, i);
|
|
25637
|
+
frames.pop();
|
|
25638
|
+
continue;
|
|
25639
|
+
}
|
|
25640
|
+
}
|
|
25641
|
+
}
|
|
25642
|
+
out += char;
|
|
25643
|
+
i++;
|
|
25644
|
+
}
|
|
25645
|
+
return out.replace(INLINE_ATTRIBUTE, "");
|
|
25646
|
+
}
|
|
25647
|
+
|
|
25463
25648
|
// src/swift-objc-sdk.ts
|
|
25464
25649
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
25465
25650
|
var import_node_path31 = __toESM(require("node:path"), 1);
|
|
@@ -25500,7 +25685,7 @@ function restoreSwiftInterfaceSPI(interfaceText, module2, graphs) {
|
|
|
25500
25685
|
let depth = 0;
|
|
25501
25686
|
for (const line of interfaceText.split("\n")) {
|
|
25502
25687
|
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(
|
|
25688
|
+
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
25689
|
line.replace(/::/g, ".")
|
|
25505
25690
|
);
|
|
25506
25691
|
if (declaration) {
|
|
@@ -25598,7 +25783,26 @@ var KEEP_EXTERNAL = /* @__PURE__ */ new Map([
|
|
|
25598
25783
|
["s:SE", "Encodable"],
|
|
25599
25784
|
["s:Se", "Decodable"],
|
|
25600
25785
|
["s:s23CustomStringConvertibleP", "CustomStringConvertible"],
|
|
25601
|
-
["s:s9CodingKeyP", "CodingKey"]
|
|
25786
|
+
["s:s9CodingKeyP", "CodingKey"],
|
|
25787
|
+
["s:SL", "Comparable"],
|
|
25788
|
+
["s:ST", "Sequence"],
|
|
25789
|
+
["s:St", "IteratorProtocol"],
|
|
25790
|
+
["s:Sl", "Collection"],
|
|
25791
|
+
["s:SK", "BidirectionalCollection"],
|
|
25792
|
+
["s:Sk", "RandomAccessCollection"],
|
|
25793
|
+
["s:SM", "MutableCollection"],
|
|
25794
|
+
["s:Sm", "RangeReplaceableCollection"],
|
|
25795
|
+
["s:s28CustomDebugStringConvertibleP", "CustomDebugStringConvertible"],
|
|
25796
|
+
["s:s25LosslessStringConvertibleP", "LosslessStringConvertible"],
|
|
25797
|
+
["s:s20TextOutputStreamableP", "TextOutputStreamable"],
|
|
25798
|
+
["s:Sx", "Strideable"],
|
|
25799
|
+
["s:s18AdditiveArithmeticP", "AdditiveArithmetic"],
|
|
25800
|
+
["s:s25ExpressibleByArrayLiteralP", "ExpressibleByArrayLiteral"],
|
|
25801
|
+
["s:s30ExpressibleByDictionaryLiteralP", "ExpressibleByDictionaryLiteral"],
|
|
25802
|
+
["s:s26ExpressibleByStringLiteralP", "ExpressibleByStringLiteral"],
|
|
25803
|
+
["s:s27ExpressibleByIntegerLiteralP", "ExpressibleByIntegerLiteral"],
|
|
25804
|
+
["s:s25ExpressibleByFloatLiteralP", "ExpressibleByFloatLiteral"],
|
|
25805
|
+
["s:s27ExpressibleByBooleanLiteralP", "ExpressibleByBooleanLiteral"]
|
|
25602
25806
|
]);
|
|
25603
25807
|
var LEADING_ATTRS = /^((?:@\w+(?:\([^)]*\))?\s*|nonisolated\s+)*)(.*)$/s;
|
|
25604
25808
|
var OBJC_ONLY = /@(?:objcMembers|objc|IBOutlet|IBInspectable|IBAction|IBSegueAction|GKInspectable|nonobjc|NSCopying|NSManaged)(?:\([^)]*\))?\s*|\bdynamic\s+/g;
|
|
@@ -26479,7 +26683,12 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
26479
26683
|
const list2 = [
|
|
26480
26684
|
...parent ? [parent] : [],
|
|
26481
26685
|
...(conforms.get(id) ?? []).filter(
|
|
26482
|
-
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
26686
|
+
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
26687
|
+
"Hashable",
|
|
26688
|
+
"Equatable",
|
|
26689
|
+
"CustomStringConvertible",
|
|
26690
|
+
"CustomDebugStringConvertible"
|
|
26691
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path106)?.has(name3)
|
|
26483
26692
|
)
|
|
26484
26693
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
26485
26694
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -27269,6 +27478,43 @@ function sdkDeclaration(name3) {
|
|
|
27269
27478
|
}
|
|
27270
27479
|
return sdkDeclarations.get(name3) ?? null;
|
|
27271
27480
|
}
|
|
27481
|
+
function intakeInterface(text6, keepDefaults = false) {
|
|
27482
|
+
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(
|
|
27483
|
+
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
27484
|
+
"Foundation.NSData."
|
|
27485
|
+
);
|
|
27486
|
+
}
|
|
27487
|
+
function stageVendorFrameworks(dir, stage) {
|
|
27488
|
+
import_node_fs34.default.mkdirSync(stage, { recursive: true });
|
|
27489
|
+
for (const entry of import_node_fs34.default.readdirSync(dir)) {
|
|
27490
|
+
if (!entry.endsWith(".framework")) continue;
|
|
27491
|
+
const source = import_node_path32.default.join(dir, entry);
|
|
27492
|
+
const target = import_node_path32.default.join(stage, entry);
|
|
27493
|
+
import_node_fs34.default.mkdirSync(target, { recursive: true });
|
|
27494
|
+
for (const child of import_node_fs34.default.readdirSync(source)) {
|
|
27495
|
+
if (child !== "Modules") {
|
|
27496
|
+
import_node_fs34.default.symlinkSync(import_node_path32.default.join(source, child), import_node_path32.default.join(target, child));
|
|
27497
|
+
continue;
|
|
27498
|
+
}
|
|
27499
|
+
for (const file of import_node_fs34.default.readdirSync(import_node_path32.default.join(source, child), {
|
|
27500
|
+
recursive: true,
|
|
27501
|
+
encoding: "utf8"
|
|
27502
|
+
})) {
|
|
27503
|
+
const from = import_node_path32.default.join(source, child, file);
|
|
27504
|
+
const to = import_node_path32.default.join(target, child, file);
|
|
27505
|
+
if (import_node_fs34.default.statSync(from).isDirectory()) {
|
|
27506
|
+
import_node_fs34.default.mkdirSync(to, { recursive: true });
|
|
27507
|
+
continue;
|
|
27508
|
+
}
|
|
27509
|
+
import_node_fs34.default.mkdirSync(import_node_path32.default.dirname(to), { recursive: true });
|
|
27510
|
+
if (file.endsWith(".swiftinterface"))
|
|
27511
|
+
import_node_fs34.default.writeFileSync(to, intakeInterface(import_node_fs34.default.readFileSync(from, "utf8")));
|
|
27512
|
+
else import_node_fs34.default.copyFileSync(from, to);
|
|
27513
|
+
}
|
|
27514
|
+
}
|
|
27515
|
+
}
|
|
27516
|
+
return stage;
|
|
27517
|
+
}
|
|
27272
27518
|
function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vendorFrameworks = []) {
|
|
27273
27519
|
if (!import_node_fs34.default.existsSync(stdlib))
|
|
27274
27520
|
throw new Error(
|
|
@@ -27296,6 +27542,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27296
27542
|
import_node_fs34.default.writeFileSync(file, text6);
|
|
27297
27543
|
}
|
|
27298
27544
|
const interfaceCopies = [];
|
|
27545
|
+
let keepDefaults = true;
|
|
27299
27546
|
if (framework) {
|
|
27300
27547
|
import_node_fs34.default.mkdirSync(import_node_path32.default.join(frameworks, `${surface.module}.framework`, "Modules"), {
|
|
27301
27548
|
recursive: true
|
|
@@ -27322,10 +27569,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27322
27569
|
interfaceCopies.push(import_node_path32.default.join(to, name3));
|
|
27323
27570
|
import_node_fs34.default.writeFileSync(
|
|
27324
27571
|
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
|
-
)
|
|
27572
|
+
intakeInterface(import_node_fs34.default.readFileSync(import_node_path32.default.join(from, name3), "utf8"), true)
|
|
27329
27573
|
);
|
|
27330
27574
|
}
|
|
27331
27575
|
}
|
|
@@ -27387,7 +27631,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27387
27631
|
stubs,
|
|
27388
27632
|
"-I",
|
|
27389
27633
|
stubIncludes,
|
|
27390
|
-
...vendorFrameworks.flatMap((dir) => [
|
|
27634
|
+
...vendorFrameworks.flatMap((dir, index) => [
|
|
27635
|
+
"-F",
|
|
27636
|
+
stageVendorFrameworks(dir, import_node_path32.default.join(work, "vendor-frameworks", String(index)))
|
|
27637
|
+
])
|
|
27391
27638
|
];
|
|
27392
27639
|
const missing2 = /* @__PURE__ */ new Map();
|
|
27393
27640
|
const stubbed = /* @__PURE__ */ new Set();
|
|
@@ -27593,6 +27840,13 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
27593
27840
|
);
|
|
27594
27841
|
}
|
|
27595
27842
|
}
|
|
27843
|
+
if ((!progress || round === ROUNDS) && keepDefaults && interfaceCopies.length > 0) {
|
|
27844
|
+
keepDefaults = false;
|
|
27845
|
+
for (const file of interfaceCopies)
|
|
27846
|
+
import_node_fs34.default.writeFileSync(file, swiftInterfaceWithoutBodies(import_node_fs34.default.readFileSync(file, "utf8")));
|
|
27847
|
+
writeHeaders();
|
|
27848
|
+
continue;
|
|
27849
|
+
}
|
|
27596
27850
|
if (!progress || round === ROUNDS)
|
|
27597
27851
|
throw new Error(
|
|
27598
27852
|
`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)}`}`
|
|
@@ -36342,7 +36596,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
36342
36596
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
36343
36597
|
var MULTI_MANIFEST_VERSION = 68;
|
|
36344
36598
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
36345
|
-
var compilerSourceDigest = true ? "
|
|
36599
|
+
var compilerSourceDigest = true ? "0d2e8d6fb4545fb31a692a87bd3215ef3a9a64a8c3e1b2fc1f2a3e79511325ec" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
36346
36600
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
36347
36601
|
const hash = (0, import_node_crypto23.createHash)("sha256");
|
|
36348
36602
|
hash.update(`swift-compile
|
|
@@ -44924,7 +45178,7 @@ function initializeWorkspaceGit(root, work) {
|
|
|
44924
45178
|
});
|
|
44925
45179
|
const tracked = trackedSourceFiles(root, work);
|
|
44926
45180
|
if (tracked.length > 0)
|
|
44927
|
-
(0, import_node_child_process33.execFileSync)("git", ["
|
|
45181
|
+
(0, import_node_child_process33.execFileSync)("git", ["update-index", "--add", "-z", "--stdin"], {
|
|
44928
45182
|
cwd: work,
|
|
44929
45183
|
env: { ...process.env, ...isolatedGitEnv },
|
|
44930
45184
|
input: tracked.join("\0"),
|
|
@@ -45042,7 +45296,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
45042
45296
|
const command = [...prefix, ...args];
|
|
45043
45297
|
await run11(command[0], command.slice(1), cwd, env);
|
|
45044
45298
|
};
|
|
45045
|
-
|
|
45299
|
+
const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process33.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
|
|
45300
|
+
if (manager.startsWith("bun@") && (installedBun?.status !== 0 || installedBun.stdout.trim() !== manager.slice(4)))
|
|
45046
45301
|
await execute(
|
|
45047
45302
|
[
|
|
45048
45303
|
"npm",
|
|
@@ -45726,9 +45981,13 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
45726
45981
|
}
|
|
45727
45982
|
}
|
|
45728
45983
|
const alternateSetting = settings?.("ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES") ?? "";
|
|
45984
|
+
const catalogAlternateNames = [];
|
|
45729
45985
|
for (const match of alternateSetting.replace(/\\"/g, '"').matchAll(/"([^"]*)"|([^\s(),]+)/g)) {
|
|
45730
45986
|
const val = match[1] ?? match[2];
|
|
45731
|
-
if (val)
|
|
45987
|
+
if (val) {
|
|
45988
|
+
alternateIconNames.add(val);
|
|
45989
|
+
catalogAlternateNames.push(val);
|
|
45990
|
+
}
|
|
45732
45991
|
}
|
|
45733
45992
|
const permissionUsageDescriptions = {};
|
|
45734
45993
|
for (const [key2, value] of Object.entries(dictionary2)) {
|
|
@@ -45791,6 +46050,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
45791
46050
|
ipadSupportedInterfaceOrientations,
|
|
45792
46051
|
...defaultScreenOrientationMask ? { defaultScreenOrientationMask } : {},
|
|
45793
46052
|
alternateIconNames: [...alternateIconNames],
|
|
46053
|
+
bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
|
|
45794
46054
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
45795
46055
|
app.resources,
|
|
45796
46056
|
(file) => import_node_fs65.default.readFileSync(file, "utf8"),
|
|
@@ -45833,7 +46093,7 @@ init_package_tree_digest();
|
|
|
45833
46093
|
init_swift_native_pin();
|
|
45834
46094
|
var EXPO_NATIVE_ENTRY_NAME = "ios";
|
|
45835
46095
|
function expoNativeCompilerDigestValue() {
|
|
45836
|
-
return true ? "
|
|
46096
|
+
return true ? "e50ab1d8ec731167f92f711da0833fa534d1aec4b5ce950a6ba947279df8c1e7" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
45837
46097
|
}
|
|
45838
46098
|
var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
|
|
45839
46099
|
function readSources(value) {
|
|
@@ -48053,6 +48313,19 @@ function cxxOnly(surface) {
|
|
|
48053
48313
|
return false;
|
|
48054
48314
|
});
|
|
48055
48315
|
}
|
|
48316
|
+
function mapSurfaces(modulemap) {
|
|
48317
|
+
const text6 = import_node_fs76.default.readFileSync(modulemap, "utf8");
|
|
48318
|
+
const headers = import_node_path74.default.dirname(modulemap);
|
|
48319
|
+
const modules = moduleMapModules(text6);
|
|
48320
|
+
if (modules.length <= 1) {
|
|
48321
|
+
const module2 = moduleMapName(text6);
|
|
48322
|
+
return module2 ? [headerSurface(module2, modulemap, headers)] : [];
|
|
48323
|
+
}
|
|
48324
|
+
return modules.map(
|
|
48325
|
+
(module2) => headerSurface(module2.name, generatedModuleMap(`${module2.text}
|
|
48326
|
+
`, false), headers)
|
|
48327
|
+
);
|
|
48328
|
+
}
|
|
48056
48329
|
function simulatorSlice(xcframeworkDir) {
|
|
48057
48330
|
const slice = import_node_fs76.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
|
|
48058
48331
|
return slice ? import_node_path74.default.join(xcframeworkDir, slice) : null;
|
|
@@ -48116,8 +48389,7 @@ function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)
|
|
|
48116
48389
|
const headers = import_node_path74.default.join(root, "Headers");
|
|
48117
48390
|
for (const map2 of files(headers, (name3) => name3 === "module.modulemap")) {
|
|
48118
48391
|
const modulemap = import_node_path74.default.join(headers, map2);
|
|
48119
|
-
|
|
48120
|
-
if (module2) found.push(headerSurface(module2, modulemap, import_node_path74.default.dirname(modulemap)));
|
|
48392
|
+
found.push(...mapSurfaces(modulemap));
|
|
48121
48393
|
}
|
|
48122
48394
|
if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
|
|
48123
48395
|
const module2 = swiftTargetModuleName(target);
|
|
@@ -48254,9 +48526,13 @@ function swiftInterfaceForWasm(text6, cFlags) {
|
|
|
48254
48526
|
]);
|
|
48255
48527
|
return `${interop} ${xcc.join(" ")}`;
|
|
48256
48528
|
});
|
|
48257
|
-
|
|
48258
|
-
|
|
48259
|
-
|
|
48529
|
+
const lines = retargeted.split("\n");
|
|
48530
|
+
const required = lines.filter((line) => OPTIONAL_REQUIREMENT.test(line)).join("\n");
|
|
48531
|
+
return lines.map((line) => {
|
|
48532
|
+
if (/\benum\s/.test(line) && TYPE_DECLARATION.test(line)) {
|
|
48533
|
+
const name3 = /\benum\s+(\w+)/.exec(line)?.[1];
|
|
48534
|
+
return name3 && new RegExp(`\\b${name3}\\b`).test(required) && !/\bSwift\.Error\b/.test(line) ? line : line.replace(/@objc(?:\s*\([^()]*\))?\s+/g, "");
|
|
48535
|
+
}
|
|
48260
48536
|
if (TYPE_DECLARATION.test(line)) return line.replace(/@objcMembers\b/g, "");
|
|
48261
48537
|
if (OPTIONAL_REQUIREMENT.test(line)) return line;
|
|
48262
48538
|
return line.replace(OBJC_ATTRIBUTE, "");
|
|
@@ -48677,6 +48953,14 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48677
48953
|
const plain = /* @__PURE__ */ new Set();
|
|
48678
48954
|
const unobjc = /* @__PURE__ */ new Set();
|
|
48679
48955
|
const trapped = /* @__PURE__ */ new Set();
|
|
48956
|
+
const unconformed = /* @__PURE__ */ new Map();
|
|
48957
|
+
const objcProtocols = new Set(
|
|
48958
|
+
graphs.flatMap(
|
|
48959
|
+
(graph) => graph.symbols.filter(
|
|
48960
|
+
(symbol2) => symbol2.kind.identifier === "swift.protocol" && symbol2.identifier.precise.startsWith("c:")
|
|
48961
|
+
).map((symbol2) => symbol2.pathComponents.join("."))
|
|
48962
|
+
)
|
|
48963
|
+
);
|
|
48680
48964
|
const file = import_node_path74.default.join(work, `${module2}.swift`);
|
|
48681
48965
|
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.assemblySources === void 0;
|
|
48682
48966
|
for (; ; ) {
|
|
@@ -48689,6 +48973,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48689
48973
|
omit,
|
|
48690
48974
|
plain,
|
|
48691
48975
|
unobjc,
|
|
48976
|
+
unconformed,
|
|
48692
48977
|
trapped,
|
|
48693
48978
|
inert,
|
|
48694
48979
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
@@ -48736,7 +49021,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48736
49021
|
files: { [`${module2}.swift`]: source },
|
|
48737
49022
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
48738
49023
|
};
|
|
48739
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size;
|
|
49024
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
48740
49025
|
const elsewhere = [];
|
|
48741
49026
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
48742
49027
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -48744,6 +49029,13 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48744
49029
|
unobjc.add(owner);
|
|
48745
49030
|
continue;
|
|
48746
49031
|
}
|
|
49032
|
+
const conformance = /^type '\w+' does not conform to protocol '(\w+)'$/.exec(
|
|
49033
|
+
match[3]
|
|
49034
|
+
)?.[1];
|
|
49035
|
+
if (owner && conformance && objcProtocols.has(conformance)) {
|
|
49036
|
+
unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], conformance]));
|
|
49037
|
+
continue;
|
|
49038
|
+
}
|
|
48747
49039
|
if (owner && swiftPaths.has(owner))
|
|
48748
49040
|
throw new Error(
|
|
48749
49041
|
`Swift declaration ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
@@ -48759,7 +49051,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
48759
49051
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
48760
49052
|
else elsewhere.push(match[3]);
|
|
48761
49053
|
}
|
|
48762
|
-
if (omit.size + plain.size + unobjc.size + trapped.size === before)
|
|
49054
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
48763
49055
|
throw new Error(
|
|
48764
49056
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
48765
49057
|
);
|
|
@@ -48885,7 +49177,16 @@ function splitDeclarators(statement, names) {
|
|
|
48885
49177
|
);
|
|
48886
49178
|
}
|
|
48887
49179
|
function cStandin(surface, binary2, toolchain, work) {
|
|
48888
|
-
const
|
|
49180
|
+
const everyHeader = files(surface.headers, (name3) => name3.endsWith(".h"));
|
|
49181
|
+
const moduleRoots = moduleMapHeaders(surface.modulemap, everyHeader);
|
|
49182
|
+
const headers = [...moduleRoots];
|
|
49183
|
+
for (let at = 0; at < headers.length; at++)
|
|
49184
|
+
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)) {
|
|
49185
|
+
const file = import_node_path74.default.posix.normalize(
|
|
49186
|
+
import_node_path74.default.posix.join(import_node_path74.default.posix.dirname(headers[at]), local)
|
|
49187
|
+
);
|
|
49188
|
+
if (everyHeader.includes(file) && !headers.includes(file)) headers.push(file);
|
|
49189
|
+
}
|
|
48889
49190
|
const framework = import_node_path74.default.basename(import_node_path74.default.dirname(surface.modulemap)) === "Modules";
|
|
48890
49191
|
const headerDirectory = framework ? `${surface.module}.framework/Headers` : ".";
|
|
48891
49192
|
const texts = new Map(
|
|
@@ -48900,9 +49201,7 @@ function cStandin(surface, binary2, toolchain, work) {
|
|
|
48900
49201
|
import_node_fs76.default.mkdirSync(import_node_path74.default.dirname(import_node_path74.default.join(include, file)), { recursive: true });
|
|
48901
49202
|
import_node_fs76.default.writeFileSync(import_node_path74.default.join(include, file), text6);
|
|
48902
49203
|
}
|
|
48903
|
-
const roots =
|
|
48904
|
-
(file) => import_node_path74.default.posix.join(headerDirectory, file)
|
|
48905
|
-
);
|
|
49204
|
+
const roots = moduleRoots.map((file) => import_node_path74.default.posix.join(headerDirectory, file));
|
|
48906
49205
|
const frameworkMap = `${surface.module}.framework/Modules/module.modulemap`;
|
|
48907
49206
|
const modulemap = `module ${surface.module} {
|
|
48908
49207
|
${roots.map((file) => ` header "${file}"
|
|
@@ -49647,7 +49946,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
49647
49946
|
return error instanceof Error ? error.message : String(error);
|
|
49648
49947
|
}
|
|
49649
49948
|
const found = all.filter(
|
|
49650
|
-
(surface) => !provided.has(surface.module) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
|
|
49949
|
+
(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))
|
|
49651
49950
|
);
|
|
49652
49951
|
if (found.length === 0) {
|
|
49653
49952
|
import_node_fs76.default.rmSync(work, { recursive: true, force: true });
|
|
@@ -63799,6 +64098,14 @@ function applyInstalledSwiftTargets(collection, snapshot, generatedTargets, root
|
|
|
63799
64098
|
return !collection.targets.some((target2) => target2.name === module2);
|
|
63800
64099
|
});
|
|
63801
64100
|
dropSuppliedHeaders(generated, native);
|
|
64101
|
+
if (native.flattensPublicHeaders && native.publicHeaders.length > 0)
|
|
64102
|
+
generated.swiftFlags = [
|
|
64103
|
+
...generated.swiftFlags ?? [],
|
|
64104
|
+
"-Xcc",
|
|
64105
|
+
"-I",
|
|
64106
|
+
"-Xcc",
|
|
64107
|
+
`$(PEACH_INPUT_ROOT)/.build/peach-cxx-headers/${native.name}`
|
|
64108
|
+
];
|
|
63802
64109
|
const flags = originalModuleFlags(native.flags);
|
|
63803
64110
|
generated.clangSettings = [
|
|
63804
64111
|
{ tool: "c", flags: [...flags, ...ndebug, ...search] },
|
|
@@ -63946,20 +64253,41 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
63946
64253
|
"specifications",
|
|
63947
64254
|
`${checksum}.json`
|
|
63948
64255
|
);
|
|
64256
|
+
const sha1 = (value) => (0, import_node_crypto50.createHash)("sha1").update(value).digest("hex");
|
|
63949
64257
|
let text6;
|
|
63950
64258
|
if (import_node_fs94.default.existsSync(file)) text6 = import_node_fs94.default.readFileSync(file, "utf8");
|
|
63951
64259
|
else {
|
|
63952
64260
|
const shard = (0, import_node_crypto50.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
63953
|
-
const
|
|
63954
|
-
|
|
63955
|
-
);
|
|
64261
|
+
const specPath = `Specs/${shard}/${root}/${version2}/${root}.podspec.json`;
|
|
64262
|
+
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
63956
64263
|
if (!response.ok)
|
|
63957
64264
|
throw new Error(
|
|
63958
64265
|
`CocoaPods specification ${root} ${version2}: HTTP ${response.status}`
|
|
63959
64266
|
);
|
|
63960
64267
|
text6 = await response.text();
|
|
64268
|
+
if (sha1(text6) !== checksum) {
|
|
64269
|
+
const history = await fetch(
|
|
64270
|
+
`https://api.github.com/repos/CocoaPods/Specs/commits?path=${specPath}&per_page=100`
|
|
64271
|
+
);
|
|
64272
|
+
if (!history.ok)
|
|
64273
|
+
throw new Error(`CocoaPods specification ${root} history: HTTP ${history.status}`);
|
|
64274
|
+
const commits = await history.json();
|
|
64275
|
+
for (const commit of Array.isArray(commits) ? commits : []) {
|
|
64276
|
+
const sha = record2(commit) ? commit.sha : void 0;
|
|
64277
|
+
if (typeof sha !== "string") continue;
|
|
64278
|
+
const revision = await fetch(
|
|
64279
|
+
`https://raw.githubusercontent.com/CocoaPods/Specs/${sha}/${specPath}`
|
|
64280
|
+
);
|
|
64281
|
+
if (!revision.ok) continue;
|
|
64282
|
+
const revisionText = await revision.text();
|
|
64283
|
+
if (sha1(revisionText) === checksum) {
|
|
64284
|
+
text6 = revisionText;
|
|
64285
|
+
break;
|
|
64286
|
+
}
|
|
64287
|
+
}
|
|
64288
|
+
}
|
|
63961
64289
|
}
|
|
63962
|
-
if (
|
|
64290
|
+
if (sha1(text6) !== checksum)
|
|
63963
64291
|
throw new Error(`${root} podspec checksum differs from ${lockFile}`);
|
|
63964
64292
|
const spec = JSON.parse(text6);
|
|
63965
64293
|
if (!record2(spec) || spec.name !== root || spec.version !== version2)
|