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
package/dist-lib/skills.cjs
CHANGED
|
@@ -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
|
|
|
@@ -11308,7 +11308,7 @@ var init_registry = __esm({
|
|
|
11308
11308
|
{
|
|
11309
11309
|
range: ">=4.6.0",
|
|
11310
11310
|
coverage: 0,
|
|
11311
|
-
note: "the reference iOS simulator performs this package's behavior. Peach currently provides only this unsupported shape: native-seam only: the real customerio-reactnative runs from the bundle (CustomerIO object, CioRegion/CioLogLevel/CioPushPermissionStatus enums, in-app/push/notification-inbox wrappers : all upstream JS, no fabricated values). 4.6.0 is the first TurboModule release (4.0.0-4.5.2 use the old bridge module names, which this seam does not provide). we stub the six codegen modules (NativeCustomerIO/Logging/Location/MessagingPush/MessagingInApp/LiveActivities), mirroring src/specs/modules/*@7.
|
|
11311
|
+
note: "the reference iOS simulator performs this package's behavior. Peach currently provides only this unsupported shape: native-seam only: the real customerio-reactnative runs from the bundle (CustomerIO object, CioRegion/CioLogLevel/CioPushPermissionStatus enums, in-app/push/notification-inbox wrappers : all upstream JS, no fabricated values). 4.6.0 is the first TurboModule release (4.0.0-4.5.2 use the old bridge module names, which this seam does not provide). we stub the six codegen modules (NativeCustomerIO/Logging/Location/MessagingPush/MessagingInApp/LiveActivities), mirroring src/specs/modules/*@7.3.0 exactly (7.3.0 adds registerBackgroundPushHandler, unregisterBackgroundPushHandler, acknowledgeBackgroundPush and the onBackgroundPushReceived emitter, answered as inert no-ops); its emitter properties also answer the earlier 4.6.0-6.x emitter calls, so every TurboModule line from 4.6.0 runs: calls accepted, getMessages/token empty, push permission reports NOTDETERMINED (fresh-sim), event-emitter properties return removable no-op subscriptions, live activities reject with live_activity_module_unavailable the way the real iOS wrapper does without its optional pod, and the nullable geofence module stays absent. the package's full JS surface imports and stays inert on Peach at 7.3.0. per docs/peach/conformance/compat-scoring.md analytics rule, delivery is intentionally absent. imports and API shape receive no behavior credit",
|
|
11312
11312
|
working: "full upstream JS surface (CustomerIO object + correct enums + in-app/push/inbox wrappers); initialize/identify/track/screen, profile+device attributes, device-token register/delete, trackMetric, deep-link routing ready + handler registration (no URL is ever delivered), push receipt/permission APIs, in-app dismiss + color scheme + inbox getMessages/mark/track, inbox event listener registration, all event-emitter subscriptions (no-op removable), live activities handleWidgetUrl pass-through with start/update/end reporting the native unavailable code",
|
|
11313
11313
|
missing: "no events sent, no profile sync, no in-app messages displayed, push token not registered, no deep link delivered, no live activity started, no geofence refresh"
|
|
11314
11314
|
}
|
|
@@ -35301,6 +35301,34 @@ var init_android_app_identity = __esm({
|
|
|
35301
35301
|
});
|
|
35302
35302
|
|
|
35303
35303
|
// src/nativeAppIconContract.ts
|
|
35304
|
+
function resolveNativeBundleIcons(icons, catalogNames, resolveReference) {
|
|
35305
|
+
if (!isRecord(icons) && catalogNames.length === 0) return void 0;
|
|
35306
|
+
const resolve13 = (value) => {
|
|
35307
|
+
if (typeof value === "string") return resolveReference(value);
|
|
35308
|
+
if (Array.isArray(value)) return value.map(resolve13);
|
|
35309
|
+
if (isRecord(value))
|
|
35310
|
+
return Object.fromEntries(
|
|
35311
|
+
Object.entries(value).map(([key2, entry]) => [
|
|
35312
|
+
resolveReference(key2),
|
|
35313
|
+
resolve13(entry)
|
|
35314
|
+
])
|
|
35315
|
+
);
|
|
35316
|
+
return value;
|
|
35317
|
+
};
|
|
35318
|
+
const dictionary2 = isRecord(icons) ? Object.fromEntries(
|
|
35319
|
+
Object.entries(icons).map(([key2, value]) => [key2, resolve13(value)])
|
|
35320
|
+
) : {};
|
|
35321
|
+
if (catalogNames.length === 0) return dictionary2;
|
|
35322
|
+
return {
|
|
35323
|
+
...dictionary2,
|
|
35324
|
+
CFBundleAlternateIcons: {
|
|
35325
|
+
...Object.fromEntries(
|
|
35326
|
+
catalogNames.map((name3) => [name3, { CFBundleIconName: name3 }])
|
|
35327
|
+
),
|
|
35328
|
+
...isRecord(dictionary2.CFBundleAlternateIcons) ? dictionary2.CFBundleAlternateIcons : {}
|
|
35329
|
+
}
|
|
35330
|
+
};
|
|
35331
|
+
}
|
|
35304
35332
|
function isNativeAppIconArtwork(value) {
|
|
35305
35333
|
return isRecord(value) && (value.primary === void 0 || isSwiftImageVariants(value.primary)) && isRecord(value.alternates) && Object.values(value.alternates).every(isSwiftImageVariants);
|
|
35306
35334
|
}
|
|
@@ -35652,6 +35680,7 @@ function isNativeAppIdentity(value) {
|
|
|
35652
35680
|
if (value.androidPhotoLibraryAddOnly !== void 0 && value.androidPhotoLibraryAddOnly !== true)
|
|
35653
35681
|
return false;
|
|
35654
35682
|
if (value.googleSignIn !== void 0 && !isRecord(value.googleSignIn)) return false;
|
|
35683
|
+
if (value.bundleIcons !== void 0 && !isRecord(value.bundleIcons)) return false;
|
|
35655
35684
|
const descriptions = value.permissionUsageDescriptions;
|
|
35656
35685
|
if (value.reanimatedStaticFeatureFlags !== void 0 && (!isRecord(value.reanimatedStaticFeatureFlags) || !Object.values(value.reanimatedStaticFeatureFlags).every(
|
|
35657
35686
|
(flag) => typeof flag === "boolean"
|
|
@@ -35742,6 +35771,7 @@ function readNativeAppIdentity(value) {
|
|
|
35742
35771
|
...value.reanimatedStaticFeatureFlags === void 0 ? {} : { reanimatedStaticFeatureFlags: { ...value.reanimatedStaticFeatureFlags } },
|
|
35743
35772
|
...value.appIconArtwork === void 0 ? {} : { appIconArtwork: readNativeAppIconArtwork(value.appIconArtwork) },
|
|
35744
35773
|
...value.alternateIconNames === void 0 ? {} : { alternateIconNames: [...value.alternateIconNames] },
|
|
35774
|
+
...value.bundleIcons === void 0 ? {} : { bundleIcons: structuredClone(value.bundleIcons) },
|
|
35745
35775
|
...value.androidManifestPermissions === void 0 ? {} : {
|
|
35746
35776
|
androidManifestPermissions: value.androidManifestPermissions.map(
|
|
35747
35777
|
(permission) => ({ ...permission })
|
|
@@ -36083,8 +36113,11 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
|
|
|
36083
36113
|
);
|
|
36084
36114
|
if (alternateSetting === null)
|
|
36085
36115
|
throw new Error("native alternate icon setting is unresolved");
|
|
36116
|
+
const catalogAlternateNames = [];
|
|
36086
36117
|
for (const match of alternateSetting.replace(/\\"/g, '"').matchAll(/"([^"]*)"|([^\s(),]+)/g)) {
|
|
36087
|
-
|
|
36118
|
+
const name3 = match[1] ?? match[2];
|
|
36119
|
+
alternateIconNames.add(name3);
|
|
36120
|
+
catalogAlternateNames.push(name3);
|
|
36088
36121
|
}
|
|
36089
36122
|
const intentIds = dictionary2.OneAppIntentIdentifiers;
|
|
36090
36123
|
const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((value) => typeof value === "string") ? intentIds.map((value) => resolveBuildSetting(value, settings)) : [];
|
|
@@ -36232,6 +36265,11 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
|
|
|
36232
36265
|
ipadSupportedInterfaceOrientations,
|
|
36233
36266
|
...defaultScreenOrientationMask === void 0 ? {} : { defaultScreenOrientationMask },
|
|
36234
36267
|
alternateIconNames: [...alternateIconNames],
|
|
36268
|
+
bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => {
|
|
36269
|
+
const resolved = resolveBuildSetting(value, settings);
|
|
36270
|
+
if (resolved === null) throw new Error("native bundle icon reference is unresolved");
|
|
36271
|
+
return resolved;
|
|
36272
|
+
}),
|
|
36235
36273
|
...resourceUri ? {
|
|
36236
36274
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
36237
36275
|
[...resources],
|
|
@@ -36554,6 +36592,29 @@ function moduleMapName(text6) {
|
|
|
36554
36592
|
);
|
|
36555
36593
|
return index < 0 ? void 0 : tokens2[index + 1];
|
|
36556
36594
|
}
|
|
36595
|
+
function moduleMapModules(text6) {
|
|
36596
|
+
const modules = [];
|
|
36597
|
+
const token = /\/\*[\s\S]*?\*\/|\/\/[^\n]*|"[^"]*"|\{|\}|\bmodule\s+([\w.]+)/g;
|
|
36598
|
+
let depth = 0;
|
|
36599
|
+
let start = -1;
|
|
36600
|
+
let name3 = "";
|
|
36601
|
+
for (const match of text6.matchAll(token)) {
|
|
36602
|
+
if (match[0] === "{") depth++;
|
|
36603
|
+
else if (match[0] === "}") {
|
|
36604
|
+
depth--;
|
|
36605
|
+
if (depth === 0 && start >= 0) {
|
|
36606
|
+
modules.push({ name: name3, text: text6.slice(start, match.index + 1) });
|
|
36607
|
+
start = -1;
|
|
36608
|
+
}
|
|
36609
|
+
} else if (match[1] !== void 0 && depth === 0) {
|
|
36610
|
+
const before = text6.slice(0, match.index).trimEnd();
|
|
36611
|
+
if (/\bextern$/.test(before)) continue;
|
|
36612
|
+
start = match.index;
|
|
36613
|
+
name3 = match[1];
|
|
36614
|
+
}
|
|
36615
|
+
}
|
|
36616
|
+
return modules;
|
|
36617
|
+
}
|
|
36557
36618
|
function swiftTargetModuleName(name3) {
|
|
36558
36619
|
return name3.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
36559
36620
|
}
|
|
@@ -42932,6 +42993,143 @@ var init_swift_objc_runtime = __esm({
|
|
|
42932
42993
|
}
|
|
42933
42994
|
});
|
|
42934
42995
|
|
|
42996
|
+
// src/swift-interface-bodies.ts
|
|
42997
|
+
function declarationKind(head) {
|
|
42998
|
+
const words2 = head.replace(/@\w+(?:\((?:[^()]|\([^()]*\))*\))?/g, " ").match(/[A-Za-z_]\w*/g);
|
|
42999
|
+
for (const word of words2 ?? []) {
|
|
43000
|
+
if (word === "func" || word === "init" || word === "deinit") return "function";
|
|
43001
|
+
if (word === "var" || word === "let" || word === "subscript") return "property";
|
|
43002
|
+
if (word === "struct" || word === "class" || word === "enum" || word === "protocol" || word === "extension" || word === "actor" || word === "precedencegroup")
|
|
43003
|
+
return "container";
|
|
43004
|
+
}
|
|
43005
|
+
return "container";
|
|
43006
|
+
}
|
|
43007
|
+
function skipLiteral(text6, i) {
|
|
43008
|
+
if (text6.startsWith("//", i)) {
|
|
43009
|
+
const end = text6.indexOf("\n", i);
|
|
43010
|
+
return end < 0 ? text6.length : end;
|
|
43011
|
+
}
|
|
43012
|
+
if (text6.startsWith("/*", i)) {
|
|
43013
|
+
const end = text6.indexOf("*/", i + 2);
|
|
43014
|
+
return end < 0 ? text6.length : end + 2;
|
|
43015
|
+
}
|
|
43016
|
+
if (text6[i] !== '"' && text6[i] !== "#") return i;
|
|
43017
|
+
let hashes = 0;
|
|
43018
|
+
let j = i;
|
|
43019
|
+
while (text6[j] === "#") {
|
|
43020
|
+
hashes++;
|
|
43021
|
+
j++;
|
|
43022
|
+
}
|
|
43023
|
+
if (text6[j] !== '"') return i;
|
|
43024
|
+
const multiline = text6.startsWith('"""', j);
|
|
43025
|
+
const open = multiline ? '"""' : '"';
|
|
43026
|
+
j += open.length;
|
|
43027
|
+
const close = `${open}${"#".repeat(hashes)}`;
|
|
43028
|
+
const escape2 = `\\${"#".repeat(hashes)}`;
|
|
43029
|
+
while (j < text6.length) {
|
|
43030
|
+
if (text6.startsWith(escape2, j)) j += escape2.length + 1;
|
|
43031
|
+
else if (text6.startsWith(close, j)) return j + close.length;
|
|
43032
|
+
else j++;
|
|
43033
|
+
}
|
|
43034
|
+
return text6.length;
|
|
43035
|
+
}
|
|
43036
|
+
function skipBlock(text6, open) {
|
|
43037
|
+
let depth = 0;
|
|
43038
|
+
for (let i = open; i < text6.length; ) {
|
|
43039
|
+
const after = skipLiteral(text6, i);
|
|
43040
|
+
if (after !== i) {
|
|
43041
|
+
i = after;
|
|
43042
|
+
continue;
|
|
43043
|
+
}
|
|
43044
|
+
if (text6[i] === "{") depth++;
|
|
43045
|
+
else if (text6[i] === "}" && --depth === 0) return i + 1;
|
|
43046
|
+
i++;
|
|
43047
|
+
}
|
|
43048
|
+
return text6.length;
|
|
43049
|
+
}
|
|
43050
|
+
function skipExpression(text6, start) {
|
|
43051
|
+
let depth = 0;
|
|
43052
|
+
for (let i = start; i < text6.length; ) {
|
|
43053
|
+
const after = skipLiteral(text6, i);
|
|
43054
|
+
if (after !== i) {
|
|
43055
|
+
i = after;
|
|
43056
|
+
continue;
|
|
43057
|
+
}
|
|
43058
|
+
const char = text6[i];
|
|
43059
|
+
if (char === "(" || char === "[" || char === "{" || char === "<") depth++;
|
|
43060
|
+
else if (char === ">" && text6[i - 1] !== "-") depth--;
|
|
43061
|
+
else if (char === ")" || char === "]" || char === "}") {
|
|
43062
|
+
if (depth === 0) return i;
|
|
43063
|
+
depth--;
|
|
43064
|
+
} else if (char === "," && depth === 0) return i;
|
|
43065
|
+
i++;
|
|
43066
|
+
}
|
|
43067
|
+
return text6.length;
|
|
43068
|
+
}
|
|
43069
|
+
function swiftInterfaceWithoutBodies(text6, keepDefaults = false) {
|
|
43070
|
+
let out = "";
|
|
43071
|
+
const frames = [];
|
|
43072
|
+
let parens = 0;
|
|
43073
|
+
let lineStart = 0;
|
|
43074
|
+
for (let i = 0; i < text6.length; ) {
|
|
43075
|
+
const after = skipLiteral(text6, i);
|
|
43076
|
+
if (after !== i) {
|
|
43077
|
+
out += text6.slice(i, after);
|
|
43078
|
+
i = after;
|
|
43079
|
+
continue;
|
|
43080
|
+
}
|
|
43081
|
+
const char = text6[i];
|
|
43082
|
+
if (char === "=" && parens > 0 && text6[i - 1] === " " && text6[i + 1] === " ") {
|
|
43083
|
+
out = out.trimEnd();
|
|
43084
|
+
i = skipExpression(text6, i + 1);
|
|
43085
|
+
continue;
|
|
43086
|
+
}
|
|
43087
|
+
if (char === "\n") lineStart = out.length + 1;
|
|
43088
|
+
else if (char === "(") parens++;
|
|
43089
|
+
else if (char === ")") parens--;
|
|
43090
|
+
else if (char === "}") {
|
|
43091
|
+
frames.pop();
|
|
43092
|
+
} else if (char === "{") {
|
|
43093
|
+
const parent = frames.at(-1);
|
|
43094
|
+
const head = out.slice(lineStart);
|
|
43095
|
+
if (parens > 0 || parent === "expression") frames.push("expression");
|
|
43096
|
+
else if (parent === "accessors") {
|
|
43097
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
43098
|
+
i = skipBlock(text6, i);
|
|
43099
|
+
continue;
|
|
43100
|
+
} else {
|
|
43101
|
+
const kind = declarationKind(head);
|
|
43102
|
+
const body = text6.slice(i + 1, skipBlock(text6, i) - 1);
|
|
43103
|
+
if (kind === "function") {
|
|
43104
|
+
out = `${out.slice(0, lineStart)}${head.replace(INLINE_ATTRIBUTE, "")}`.trimEnd();
|
|
43105
|
+
i = skipBlock(text6, i);
|
|
43106
|
+
continue;
|
|
43107
|
+
}
|
|
43108
|
+
const bare = body.split(/\s+/).every((word) => word === "" || ACCESSOR.test(word));
|
|
43109
|
+
frames.push(kind === "property" && !bare ? "accessors" : "container");
|
|
43110
|
+
if (kind === "property" && bare) {
|
|
43111
|
+
out += `{${body}}`;
|
|
43112
|
+
i = skipBlock(text6, i);
|
|
43113
|
+
frames.pop();
|
|
43114
|
+
continue;
|
|
43115
|
+
}
|
|
43116
|
+
}
|
|
43117
|
+
}
|
|
43118
|
+
out += char;
|
|
43119
|
+
i++;
|
|
43120
|
+
}
|
|
43121
|
+
return out.replace(INLINE_ATTRIBUTE, "");
|
|
43122
|
+
}
|
|
43123
|
+
var INLINE_ATTRIBUTE, ACCESSOR;
|
|
43124
|
+
var init_swift_interface_bodies = __esm({
|
|
43125
|
+
"src/swift-interface-bodies.ts"() {
|
|
43126
|
+
"use strict";
|
|
43127
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
43128
|
+
INLINE_ATTRIBUTE = /@(?:inlinable|_alwaysEmitIntoClient|_transparent|inline\(__always\)|_effects\([^()]*\)|_specialize\((?:[^()]|\([^()]*\))*\))\s*/g;
|
|
43129
|
+
ACCESSOR = /^(?:mutating|nonmutating|async|throws|rethrows|get|set|_modify|_read)$/;
|
|
43130
|
+
}
|
|
43131
|
+
});
|
|
43132
|
+
|
|
42935
43133
|
// src/swift-objc-sdk.ts
|
|
42936
43134
|
var import_node_path31, IOS_SDK_TARGET, OVERLAY_PATH, tree, IOS_SDK_HEADERS, IOS_SDK_OVERLAYS;
|
|
42937
43135
|
var init_swift_objc_sdk = __esm({
|
|
@@ -42977,7 +43175,7 @@ function restoreSwiftInterfaceSPI(interfaceText, module2, graphs) {
|
|
|
42977
43175
|
let depth = 0;
|
|
42978
43176
|
for (const line of interfaceText.split("\n")) {
|
|
42979
43177
|
const enclosing = scopes.at(-1)?.path ?? [];
|
|
42980
|
-
const declaration = /^\s*(?:@[\w.]+(?:\([^)]*\))?\s+|\w+\s+)*?(class(?!\s+(?:func|var|subscript)\b)|struct|enum|protocol|actor|extension|func|var|let|init|subscript|typealias|case)\b\s*([\w.`]*)/.exec(
|
|
43178
|
+
const declaration = /^\s*(?:@[\w.]+(?:\([^)]*\))?\s+|\w+\s+)*?(class(?!\s+(?:func|var|subscript)\b)|struct|enum|protocol|actor|extension|func|var|let|init|subscript|typealias|case)\b\s*([/=\-+!*%<>&|^~?]+|[\w.`]*)/.exec(
|
|
42981
43179
|
line.replace(/::/g, ".")
|
|
42982
43180
|
);
|
|
42983
43181
|
if (declaration) {
|
|
@@ -43899,7 +44097,12 @@ function emitSwiftStandin(sourceGraphs, options) {
|
|
|
43899
44097
|
const list2 = [
|
|
43900
44098
|
...parent ? [parent] : [],
|
|
43901
44099
|
...(conforms.get(id) ?? []).filter(
|
|
43902
|
-
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
44100
|
+
(name3) => !ancestors.has(name3) && !inherited.has(conformanceTargets.get(id).get(name3)) && !(parent && objectConformers.has(id) && [
|
|
44101
|
+
"Hashable",
|
|
44102
|
+
"Equatable",
|
|
44103
|
+
"CustomStringConvertible",
|
|
44104
|
+
"CustomDebugStringConvertible"
|
|
44105
|
+
].includes(name3)) && !(name3 === nsObjectProtocol && externalRoot(id) === nsObject) && !options.unconformed?.get(path133)?.has(name3)
|
|
43903
44106
|
)
|
|
43904
44107
|
].filter((name3, at, all2) => all2.indexOf(name3) === at);
|
|
43905
44108
|
const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
|
|
@@ -44406,7 +44609,26 @@ var init_swift_standin_emit = __esm({
|
|
|
44406
44609
|
["s:SE", "Encodable"],
|
|
44407
44610
|
["s:Se", "Decodable"],
|
|
44408
44611
|
["s:s23CustomStringConvertibleP", "CustomStringConvertible"],
|
|
44409
|
-
["s:s9CodingKeyP", "CodingKey"]
|
|
44612
|
+
["s:s9CodingKeyP", "CodingKey"],
|
|
44613
|
+
["s:SL", "Comparable"],
|
|
44614
|
+
["s:ST", "Sequence"],
|
|
44615
|
+
["s:St", "IteratorProtocol"],
|
|
44616
|
+
["s:Sl", "Collection"],
|
|
44617
|
+
["s:SK", "BidirectionalCollection"],
|
|
44618
|
+
["s:Sk", "RandomAccessCollection"],
|
|
44619
|
+
["s:SM", "MutableCollection"],
|
|
44620
|
+
["s:Sm", "RangeReplaceableCollection"],
|
|
44621
|
+
["s:s28CustomDebugStringConvertibleP", "CustomDebugStringConvertible"],
|
|
44622
|
+
["s:s25LosslessStringConvertibleP", "LosslessStringConvertible"],
|
|
44623
|
+
["s:s20TextOutputStreamableP", "TextOutputStreamable"],
|
|
44624
|
+
["s:Sx", "Strideable"],
|
|
44625
|
+
["s:s18AdditiveArithmeticP", "AdditiveArithmetic"],
|
|
44626
|
+
["s:s25ExpressibleByArrayLiteralP", "ExpressibleByArrayLiteral"],
|
|
44627
|
+
["s:s30ExpressibleByDictionaryLiteralP", "ExpressibleByDictionaryLiteral"],
|
|
44628
|
+
["s:s26ExpressibleByStringLiteralP", "ExpressibleByStringLiteral"],
|
|
44629
|
+
["s:s27ExpressibleByIntegerLiteralP", "ExpressibleByIntegerLiteral"],
|
|
44630
|
+
["s:s25ExpressibleByFloatLiteralP", "ExpressibleByFloatLiteral"],
|
|
44631
|
+
["s:s27ExpressibleByBooleanLiteralP", "ExpressibleByBooleanLiteral"]
|
|
44410
44632
|
]);
|
|
44411
44633
|
LEADING_ATTRS = /^((?:@\w+(?:\([^)]*\))?\s*|nonisolated\s+)*)(.*)$/s;
|
|
44412
44634
|
OBJC_ONLY = /@(?:objcMembers|objc|IBOutlet|IBInspectable|IBAction|IBSegueAction|GKInspectable|nonobjc|NSCopying|NSManaged)(?:\([^)]*\))?\s*|\bdynamic\s+/g;
|
|
@@ -44720,6 +44942,43 @@ function sdkDeclaration(name3) {
|
|
|
44720
44942
|
}
|
|
44721
44943
|
return sdkDeclarations.get(name3) ?? null;
|
|
44722
44944
|
}
|
|
44945
|
+
function intakeInterface(text6, keepDefaults = false) {
|
|
44946
|
+
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(
|
|
44947
|
+
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
44948
|
+
"Foundation.NSData."
|
|
44949
|
+
);
|
|
44950
|
+
}
|
|
44951
|
+
function stageVendorFrameworks(dir, stage) {
|
|
44952
|
+
import_node_fs35.default.mkdirSync(stage, { recursive: true });
|
|
44953
|
+
for (const entry of import_node_fs35.default.readdirSync(dir)) {
|
|
44954
|
+
if (!entry.endsWith(".framework")) continue;
|
|
44955
|
+
const source = import_node_path32.default.join(dir, entry);
|
|
44956
|
+
const target = import_node_path32.default.join(stage, entry);
|
|
44957
|
+
import_node_fs35.default.mkdirSync(target, { recursive: true });
|
|
44958
|
+
for (const child of import_node_fs35.default.readdirSync(source)) {
|
|
44959
|
+
if (child !== "Modules") {
|
|
44960
|
+
import_node_fs35.default.symlinkSync(import_node_path32.default.join(source, child), import_node_path32.default.join(target, child));
|
|
44961
|
+
continue;
|
|
44962
|
+
}
|
|
44963
|
+
for (const file of import_node_fs35.default.readdirSync(import_node_path32.default.join(source, child), {
|
|
44964
|
+
recursive: true,
|
|
44965
|
+
encoding: "utf8"
|
|
44966
|
+
})) {
|
|
44967
|
+
const from = import_node_path32.default.join(source, child, file);
|
|
44968
|
+
const to = import_node_path32.default.join(target, child, file);
|
|
44969
|
+
if (import_node_fs35.default.statSync(from).isDirectory()) {
|
|
44970
|
+
import_node_fs35.default.mkdirSync(to, { recursive: true });
|
|
44971
|
+
continue;
|
|
44972
|
+
}
|
|
44973
|
+
import_node_fs35.default.mkdirSync(import_node_path32.default.dirname(to), { recursive: true });
|
|
44974
|
+
if (file.endsWith(".swiftinterface"))
|
|
44975
|
+
import_node_fs35.default.writeFileSync(to, intakeInterface(import_node_fs35.default.readFileSync(from, "utf8")));
|
|
44976
|
+
else import_node_fs35.default.copyFileSync(from, to);
|
|
44977
|
+
}
|
|
44978
|
+
}
|
|
44979
|
+
}
|
|
44980
|
+
return stage;
|
|
44981
|
+
}
|
|
44723
44982
|
function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vendorFrameworks = []) {
|
|
44724
44983
|
if (!import_node_fs35.default.existsSync(stdlib))
|
|
44725
44984
|
throw new Error(
|
|
@@ -44747,6 +45006,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44747
45006
|
import_node_fs35.default.writeFileSync(file, text6);
|
|
44748
45007
|
}
|
|
44749
45008
|
const interfaceCopies = [];
|
|
45009
|
+
let keepDefaults = true;
|
|
44750
45010
|
if (framework) {
|
|
44751
45011
|
import_node_fs35.default.mkdirSync(import_node_path32.default.join(frameworks, `${surface.module}.framework`, "Modules"), {
|
|
44752
45012
|
recursive: true
|
|
@@ -44773,10 +45033,7 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44773
45033
|
interfaceCopies.push(import_node_path32.default.join(to, name3));
|
|
44774
45034
|
import_node_fs35.default.writeFileSync(
|
|
44775
45035
|
import_node_path32.default.join(to, name3),
|
|
44776
|
-
import_node_fs35.default.readFileSync(import_node_path32.default.join(from, name3), "utf8")
|
|
44777
|
-
/\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
|
|
44778
|
-
"Foundation.NSData."
|
|
44779
|
-
)
|
|
45036
|
+
intakeInterface(import_node_fs35.default.readFileSync(import_node_path32.default.join(from, name3), "utf8"), true)
|
|
44780
45037
|
);
|
|
44781
45038
|
}
|
|
44782
45039
|
}
|
|
@@ -44838,7 +45095,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
44838
45095
|
stubs,
|
|
44839
45096
|
"-I",
|
|
44840
45097
|
stubIncludes,
|
|
44841
|
-
...vendorFrameworks.flatMap((dir) => [
|
|
45098
|
+
...vendorFrameworks.flatMap((dir, index) => [
|
|
45099
|
+
"-F",
|
|
45100
|
+
stageVendorFrameworks(dir, import_node_path32.default.join(work, "vendor-frameworks", String(index)))
|
|
45101
|
+
])
|
|
44842
45102
|
];
|
|
44843
45103
|
const missing2 = /* @__PURE__ */ new Map();
|
|
44844
45104
|
const stubbed = /* @__PURE__ */ new Set();
|
|
@@ -45044,6 +45304,13 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
|
|
|
45044
45304
|
);
|
|
45045
45305
|
}
|
|
45046
45306
|
}
|
|
45307
|
+
if ((!progress || round === ROUNDS) && keepDefaults && interfaceCopies.length > 0) {
|
|
45308
|
+
keepDefaults = false;
|
|
45309
|
+
for (const file of interfaceCopies)
|
|
45310
|
+
import_node_fs35.default.writeFileSync(file, swiftInterfaceWithoutBodies(import_node_fs35.default.readFileSync(file, "utf8")));
|
|
45311
|
+
writeHeaders();
|
|
45312
|
+
continue;
|
|
45313
|
+
}
|
|
45047
45314
|
if (!progress || round === ROUNDS)
|
|
45048
45315
|
throw new Error(
|
|
45049
45316
|
`its headers do not import as Swift: ${errors.length > 0 ? [...new Set(errors.map((match) => match[4]))].slice(0, 10).join("; ") : `swift-symbolgraph-extract ${run12.signal ?? `exit ${run12.status}`}: ${(run12.stderr.trim() || run12.stdout.trim() || "no diagnostic").slice(0, 4e3)}`}`
|
|
@@ -45608,6 +45875,7 @@ var init_swift_objc_standin = __esm({
|
|
|
45608
45875
|
import_node_fs35 = __toESM(require("node:fs"), 1);
|
|
45609
45876
|
import_node_path32 = __toESM(require("node:path"), 1);
|
|
45610
45877
|
init_is_record();
|
|
45878
|
+
init_swift_interface_bodies();
|
|
45611
45879
|
init_swift_objc_platform();
|
|
45612
45880
|
init_swift_objc_sdk();
|
|
45613
45881
|
init_swift_package();
|
|
@@ -57947,7 +58215,7 @@ var init_swift_compile = __esm({
|
|
|
57947
58215
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
57948
58216
|
MULTI_MANIFEST_VERSION = 68;
|
|
57949
58217
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
57950
|
-
compilerSourceDigest = true ? "
|
|
58218
|
+
compilerSourceDigest = true ? "0d2e8d6fb4545fb31a692a87bd3215ef3a9a64a8c3e1b2fc1f2a3e79511325ec" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
57951
58219
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
57952
58220
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
57953
58221
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -63696,7 +63964,7 @@ function initializeWorkspaceGit(root, work) {
|
|
|
63696
63964
|
});
|
|
63697
63965
|
const tracked = trackedSourceFiles(root, work);
|
|
63698
63966
|
if (tracked.length > 0)
|
|
63699
|
-
(0, import_node_child_process36.execFileSync)("git", ["
|
|
63967
|
+
(0, import_node_child_process36.execFileSync)("git", ["update-index", "--add", "-z", "--stdin"], {
|
|
63700
63968
|
cwd: work,
|
|
63701
63969
|
env: { ...process.env, ...isolatedGitEnv },
|
|
63702
63970
|
input: tracked.join("\0"),
|
|
@@ -63814,7 +64082,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
63814
64082
|
const command = [...prefix, ...args];
|
|
63815
64083
|
await run12(command[0], command.slice(1), cwd, env);
|
|
63816
64084
|
};
|
|
63817
|
-
|
|
64085
|
+
const installedBun = manager.startsWith("bun@") ? (0, import_node_child_process36.spawnSync)(bunExecutable, ["--version"], { encoding: "utf8" }) : null;
|
|
64086
|
+
if (manager.startsWith("bun@") && (installedBun?.status !== 0 || installedBun.stdout.trim() !== manager.slice(4)))
|
|
63818
64087
|
await execute(
|
|
63819
64088
|
[
|
|
63820
64089
|
"npm",
|
|
@@ -64513,7 +64782,7 @@ var init_swift_standin_digest = __esm({
|
|
|
64513
64782
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
64514
64783
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
64515
64784
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
64516
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
64785
|
+
STANDIN_SOURCE_DIGEST = true ? "62c7fc880aa6efc985c4786587cb8441b81094e44c28f8d65e1d6dffda9c24f4" : standinSourceDigest();
|
|
64517
64786
|
}
|
|
64518
64787
|
});
|
|
64519
64788
|
|
|
@@ -64611,9 +64880,13 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
64611
64880
|
}
|
|
64612
64881
|
}
|
|
64613
64882
|
const alternateSetting = settings?.("ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES") ?? "";
|
|
64883
|
+
const catalogAlternateNames = [];
|
|
64614
64884
|
for (const match of alternateSetting.replace(/\\"/g, '"').matchAll(/"([^"]*)"|([^\s(),]+)/g)) {
|
|
64615
64885
|
const val = match[1] ?? match[2];
|
|
64616
|
-
if (val)
|
|
64886
|
+
if (val) {
|
|
64887
|
+
alternateIconNames.add(val);
|
|
64888
|
+
catalogAlternateNames.push(val);
|
|
64889
|
+
}
|
|
64617
64890
|
}
|
|
64618
64891
|
const permissionUsageDescriptions = {};
|
|
64619
64892
|
for (const [key2, value] of Object.entries(dictionary2)) {
|
|
@@ -64676,6 +64949,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
64676
64949
|
ipadSupportedInterfaceOrientations,
|
|
64677
64950
|
...defaultScreenOrientationMask ? { defaultScreenOrientationMask } : {},
|
|
64678
64951
|
alternateIconNames: [...alternateIconNames],
|
|
64952
|
+
bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
|
|
64679
64953
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
64680
64954
|
app.resources,
|
|
64681
64955
|
(file) => import_node_fs66.default.readFileSync(file, "utf8"),
|
|
@@ -64969,7 +65243,7 @@ var init_package_tree_digest = __esm({
|
|
|
64969
65243
|
|
|
64970
65244
|
// src/expo-native-prebuilt.ts
|
|
64971
65245
|
function expoNativeCompilerDigestValue() {
|
|
64972
|
-
return true ? "
|
|
65246
|
+
return true ? "e50ab1d8ec731167f92f711da0833fa534d1aec4b5ce950a6ba947279df8c1e7" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
64973
65247
|
}
|
|
64974
65248
|
function readSources(value) {
|
|
64975
65249
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -67257,6 +67531,19 @@ function cxxOnly(surface) {
|
|
|
67257
67531
|
return false;
|
|
67258
67532
|
});
|
|
67259
67533
|
}
|
|
67534
|
+
function mapSurfaces(modulemap) {
|
|
67535
|
+
const text6 = import_node_fs77.default.readFileSync(modulemap, "utf8");
|
|
67536
|
+
const headers = import_node_path74.default.dirname(modulemap);
|
|
67537
|
+
const modules = moduleMapModules(text6);
|
|
67538
|
+
if (modules.length <= 1) {
|
|
67539
|
+
const module2 = moduleMapName(text6);
|
|
67540
|
+
return module2 ? [headerSurface(module2, modulemap, headers)] : [];
|
|
67541
|
+
}
|
|
67542
|
+
return modules.map(
|
|
67543
|
+
(module2) => headerSurface(module2.name, generatedModuleMap(`${module2.text}
|
|
67544
|
+
`, false), headers)
|
|
67545
|
+
);
|
|
67546
|
+
}
|
|
67260
67547
|
function simulatorSlice(xcframeworkDir) {
|
|
67261
67548
|
const slice = import_node_fs77.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
|
|
67262
67549
|
return slice ? import_node_path74.default.join(xcframeworkDir, slice) : null;
|
|
@@ -67320,8 +67607,7 @@ function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)
|
|
|
67320
67607
|
const headers = import_node_path74.default.join(root, "Headers");
|
|
67321
67608
|
for (const map2 of files(headers, (name3) => name3 === "module.modulemap")) {
|
|
67322
67609
|
const modulemap = import_node_path74.default.join(headers, map2);
|
|
67323
|
-
|
|
67324
|
-
if (module2) found.push(headerSurface(module2, modulemap, import_node_path74.default.dirname(modulemap)));
|
|
67610
|
+
found.push(...mapSurfaces(modulemap));
|
|
67325
67611
|
}
|
|
67326
67612
|
if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
|
|
67327
67613
|
const module2 = swiftTargetModuleName(target);
|
|
@@ -67455,9 +67741,13 @@ function swiftInterfaceForWasm(text6, cFlags) {
|
|
|
67455
67741
|
]);
|
|
67456
67742
|
return `${interop} ${xcc.join(" ")}`;
|
|
67457
67743
|
});
|
|
67458
|
-
|
|
67459
|
-
|
|
67460
|
-
|
|
67744
|
+
const lines = retargeted.split("\n");
|
|
67745
|
+
const required = lines.filter((line) => OPTIONAL_REQUIREMENT.test(line)).join("\n");
|
|
67746
|
+
return lines.map((line) => {
|
|
67747
|
+
if (/\benum\s/.test(line) && TYPE_DECLARATION.test(line)) {
|
|
67748
|
+
const name3 = /\benum\s+(\w+)/.exec(line)?.[1];
|
|
67749
|
+
return name3 && new RegExp(`\\b${name3}\\b`).test(required) && !/\bSwift\.Error\b/.test(line) ? line : line.replace(/@objc(?:\s*\([^()]*\))?\s+/g, "");
|
|
67750
|
+
}
|
|
67461
67751
|
if (TYPE_DECLARATION.test(line)) return line.replace(/@objcMembers\b/g, "");
|
|
67462
67752
|
if (OPTIONAL_REQUIREMENT.test(line)) return line;
|
|
67463
67753
|
return line.replace(OBJC_ATTRIBUTE, "");
|
|
@@ -67875,6 +68165,14 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67875
68165
|
const plain = /* @__PURE__ */ new Set();
|
|
67876
68166
|
const unobjc = /* @__PURE__ */ new Set();
|
|
67877
68167
|
const trapped = /* @__PURE__ */ new Set();
|
|
68168
|
+
const unconformed = /* @__PURE__ */ new Map();
|
|
68169
|
+
const objcProtocols = new Set(
|
|
68170
|
+
graphs.flatMap(
|
|
68171
|
+
(graph) => graph.symbols.filter(
|
|
68172
|
+
(symbol2) => symbol2.kind.identifier === "swift.protocol" && symbol2.identifier.precise.startsWith("c:")
|
|
68173
|
+
).map((symbol2) => symbol2.pathComponents.join("."))
|
|
68174
|
+
)
|
|
68175
|
+
);
|
|
67878
68176
|
const file = import_node_path74.default.join(work, `${module2}.swift`);
|
|
67879
68177
|
const inert = binary2.placeholder !== void 0 || binary2.publicHeaders !== void 0 && binary2.assemblySources === void 0;
|
|
67880
68178
|
for (; ; ) {
|
|
@@ -67887,6 +68185,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67887
68185
|
omit,
|
|
67888
68186
|
plain,
|
|
67889
68187
|
unobjc,
|
|
68188
|
+
unconformed,
|
|
67890
68189
|
trapped,
|
|
67891
68190
|
inert,
|
|
67892
68191
|
imports: [...placeholder?.peachImports ?? [], ...imports2],
|
|
@@ -67934,7 +68233,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67934
68233
|
files: { [`${module2}.swift`]: source },
|
|
67935
68234
|
...imports2.length ? { dependencies: imports2 } : {}
|
|
67936
68235
|
};
|
|
67937
|
-
const before = omit.size + plain.size + unobjc.size + trapped.size;
|
|
68236
|
+
const before = omit.size + plain.size + unobjc.size + trapped.size + unconformed.size;
|
|
67938
68237
|
const elsewhere = [];
|
|
67939
68238
|
for (const match of check2.stderr.matchAll(/^(\S+?):(\d+):\d+: error: (.*)$/gm)) {
|
|
67940
68239
|
const owner = match[1] === file ? owners[Number(match[2]) - 1] : void 0;
|
|
@@ -67942,6 +68241,13 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67942
68241
|
unobjc.add(owner);
|
|
67943
68242
|
continue;
|
|
67944
68243
|
}
|
|
68244
|
+
const conformance = /^type '\w+' does not conform to protocol '(\w+)'$/.exec(
|
|
68245
|
+
match[3]
|
|
68246
|
+
)?.[1];
|
|
68247
|
+
if (owner && conformance && objcProtocols.has(conformance)) {
|
|
68248
|
+
unconformed.set(owner, /* @__PURE__ */ new Set([...unconformed.get(owner) ?? [], conformance]));
|
|
68249
|
+
continue;
|
|
68250
|
+
}
|
|
67945
68251
|
if (owner && swiftPaths.has(owner))
|
|
67946
68252
|
throw new Error(
|
|
67947
68253
|
`Swift declaration ${module2}.${owner} does not typecheck: ${match[3]}`
|
|
@@ -67957,7 +68263,7 @@ function graphStandin(module2, graphs, values, wasm, binary2, toolchain, work, r
|
|
|
67957
68263
|
else if (owner) omit.set(owner, `rejected by swiftc: ${match[3]}`);
|
|
67958
68264
|
else elsewhere.push(match[3]);
|
|
67959
68265
|
}
|
|
67960
|
-
if (omit.size + plain.size + unobjc.size + trapped.size === before)
|
|
68266
|
+
if (omit.size + plain.size + unobjc.size + trapped.size + unconformed.size === before)
|
|
67961
68267
|
throw new Error(
|
|
67962
68268
|
`its generated source does not typecheck: ${elsewhere.slice(0, 3).join("; ") || check2.stderr.trim().slice(0, 400)}`
|
|
67963
68269
|
);
|
|
@@ -68082,7 +68388,16 @@ function splitDeclarators(statement, names) {
|
|
|
68082
68388
|
);
|
|
68083
68389
|
}
|
|
68084
68390
|
function cStandin(surface, binary2, toolchain, work) {
|
|
68085
|
-
const
|
|
68391
|
+
const everyHeader = files(surface.headers, (name3) => name3.endsWith(".h"));
|
|
68392
|
+
const moduleRoots = moduleMapHeaders(surface.modulemap, everyHeader);
|
|
68393
|
+
const headers = [...moduleRoots];
|
|
68394
|
+
for (let at = 0; at < headers.length; at++)
|
|
68395
|
+
for (const [, local] of import_node_fs77.default.readFileSync(import_node_path74.default.join(surface.headers, headers[at]), "utf8").matchAll(/^\s*#\s*(?:include|import)\s*["<]([^">]+)[">]/gm)) {
|
|
68396
|
+
const file = import_node_path74.default.posix.normalize(
|
|
68397
|
+
import_node_path74.default.posix.join(import_node_path74.default.posix.dirname(headers[at]), local)
|
|
68398
|
+
);
|
|
68399
|
+
if (everyHeader.includes(file) && !headers.includes(file)) headers.push(file);
|
|
68400
|
+
}
|
|
68086
68401
|
const framework = import_node_path74.default.basename(import_node_path74.default.dirname(surface.modulemap)) === "Modules";
|
|
68087
68402
|
const headerDirectory = framework ? `${surface.module}.framework/Headers` : ".";
|
|
68088
68403
|
const texts = new Map(
|
|
@@ -68097,9 +68412,7 @@ function cStandin(surface, binary2, toolchain, work) {
|
|
|
68097
68412
|
import_node_fs77.default.mkdirSync(import_node_path74.default.dirname(import_node_path74.default.join(include, file)), { recursive: true });
|
|
68098
68413
|
import_node_fs77.default.writeFileSync(import_node_path74.default.join(include, file), text6);
|
|
68099
68414
|
}
|
|
68100
|
-
const roots =
|
|
68101
|
-
(file) => import_node_path74.default.posix.join(headerDirectory, file)
|
|
68102
|
-
);
|
|
68415
|
+
const roots = moduleRoots.map((file) => import_node_path74.default.posix.join(headerDirectory, file));
|
|
68103
68416
|
const frameworkMap = `${surface.module}.framework/Modules/module.modulemap`;
|
|
68104
68417
|
const modulemap = `module ${surface.module} {
|
|
68105
68418
|
${roots.map((file) => ` header "${file}"
|
|
@@ -68833,7 +69146,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
|
|
|
68833
69146
|
return error instanceof Error ? error.message : String(error);
|
|
68834
69147
|
}
|
|
68835
69148
|
const found = all.filter(
|
|
68836
|
-
(surface) => !provided.has(surface.module) && !(binary2.cxxHeaders === void 0 && cxxOnly(surface))
|
|
69149
|
+
(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))
|
|
68837
69150
|
);
|
|
68838
69151
|
if (found.length === 0) {
|
|
68839
69152
|
import_node_fs77.default.rmSync(work, { recursive: true, force: true });
|
|
@@ -83744,6 +84057,14 @@ function applyInstalledSwiftTargets(collection, snapshot, generatedTargets, root
|
|
|
83744
84057
|
return !collection.targets.some((target2) => target2.name === module2);
|
|
83745
84058
|
});
|
|
83746
84059
|
dropSuppliedHeaders(generated, native);
|
|
84060
|
+
if (native.flattensPublicHeaders && native.publicHeaders.length > 0)
|
|
84061
|
+
generated.swiftFlags = [
|
|
84062
|
+
...generated.swiftFlags ?? [],
|
|
84063
|
+
"-Xcc",
|
|
84064
|
+
"-I",
|
|
84065
|
+
"-Xcc",
|
|
84066
|
+
`$(PEACH_INPUT_ROOT)/.build/peach-cxx-headers/${native.name}`
|
|
84067
|
+
];
|
|
83747
84068
|
const flags = originalModuleFlags(native.flags);
|
|
83748
84069
|
generated.clangSettings = [
|
|
83749
84070
|
{ tool: "c", flags: [...flags, ...ndebug, ...search] },
|
|
@@ -83870,20 +84191,41 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
|
|
|
83870
84191
|
"specifications",
|
|
83871
84192
|
`${checksum}.json`
|
|
83872
84193
|
);
|
|
84194
|
+
const sha1 = (value) => (0, import_node_crypto52.createHash)("sha1").update(value).digest("hex");
|
|
83873
84195
|
let text6;
|
|
83874
84196
|
if (import_node_fs96.default.existsSync(file)) text6 = import_node_fs96.default.readFileSync(file, "utf8");
|
|
83875
84197
|
else {
|
|
83876
84198
|
const shard = (0, import_node_crypto52.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
|
|
83877
|
-
const
|
|
83878
|
-
|
|
83879
|
-
);
|
|
84199
|
+
const specPath = `Specs/${shard}/${root}/${version2}/${root}.podspec.json`;
|
|
84200
|
+
const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
|
|
83880
84201
|
if (!response.ok)
|
|
83881
84202
|
throw new Error(
|
|
83882
84203
|
`CocoaPods specification ${root} ${version2}: HTTP ${response.status}`
|
|
83883
84204
|
);
|
|
83884
84205
|
text6 = await response.text();
|
|
84206
|
+
if (sha1(text6) !== checksum) {
|
|
84207
|
+
const history = await fetch(
|
|
84208
|
+
`https://api.github.com/repos/CocoaPods/Specs/commits?path=${specPath}&per_page=100`
|
|
84209
|
+
);
|
|
84210
|
+
if (!history.ok)
|
|
84211
|
+
throw new Error(`CocoaPods specification ${root} history: HTTP ${history.status}`);
|
|
84212
|
+
const commits = await history.json();
|
|
84213
|
+
for (const commit of Array.isArray(commits) ? commits : []) {
|
|
84214
|
+
const sha = record2(commit) ? commit.sha : void 0;
|
|
84215
|
+
if (typeof sha !== "string") continue;
|
|
84216
|
+
const revision = await fetch(
|
|
84217
|
+
`https://raw.githubusercontent.com/CocoaPods/Specs/${sha}/${specPath}`
|
|
84218
|
+
);
|
|
84219
|
+
if (!revision.ok) continue;
|
|
84220
|
+
const revisionText = await revision.text();
|
|
84221
|
+
if (sha1(revisionText) === checksum) {
|
|
84222
|
+
text6 = revisionText;
|
|
84223
|
+
break;
|
|
84224
|
+
}
|
|
84225
|
+
}
|
|
84226
|
+
}
|
|
83885
84227
|
}
|
|
83886
|
-
if (
|
|
84228
|
+
if (sha1(text6) !== checksum)
|
|
83887
84229
|
throw new Error(`${root} podspec checksum differs from ${lockFile}`);
|
|
83888
84230
|
const spec = JSON.parse(text6);
|
|
83889
84231
|
if (!record2(spec) || spec.name !== root || spec.version !== version2)
|
|
@@ -84679,7 +85021,7 @@ var init_nitro_superset = __esm({
|
|
|
84679
85021
|
init_nitroContract();
|
|
84680
85022
|
init_swift_standin_digest();
|
|
84681
85023
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
84682
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
85024
|
+
NITRO_COMPILER_DIGEST = true ? "657f6d25b5a8cead1b82960b638441e0fe6bc4380c409fbb9809a56d6f0102d6" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
84683
85025
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
84684
85026
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
84685
85027
|
published2 = /* @__PURE__ */ new Map();
|
|
@@ -85391,7 +85733,7 @@ var init_one_sdk_bundle = __esm({
|
|
|
85391
85733
|
var runtime_companion_default;
|
|
85392
85734
|
var init_runtime_companion = __esm({
|
|
85393
85735
|
"runtime-companion.json"() {
|
|
85394
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
85736
|
+
runtime_companion_default = { abi: 1, sha256: "c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91", file: "node/cli-c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91.cjs" };
|
|
85395
85737
|
}
|
|
85396
85738
|
});
|
|
85397
85739
|
|
|
@@ -95370,10 +95712,11 @@ function entrySource(ids) {
|
|
|
95370
95712
|
"",
|
|
95371
95713
|
"@OptIn(kotlin.js.ExperimentalJsExport::class)",
|
|
95372
95714
|
"@JsExport",
|
|
95373
|
-
"fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
|
|
95715
|
+
"fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String, settings: String) {",
|
|
95374
95716
|
" Build.setDevice(model, release, apiLevel)",
|
|
95375
95717
|
" java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
|
|
95376
95718
|
" java.util.TimeZone.setDevice(timeZone)",
|
|
95719
|
+
" dev.peach.android.ProcessSettings.configure(settings)",
|
|
95377
95720
|
"}",
|
|
95378
95721
|
"",
|
|
95379
95722
|
"@OptIn(kotlin.js.ExperimentalJsExport::class, kotlinx.coroutines.DelicateCoroutinesApi::class)",
|
|
@@ -95741,10 +96084,11 @@ async function expoKotlinArtifact(root, moduleRoot, origin, modules) {
|
|
|
95741
96084
|
" ))",
|
|
95742
96085
|
"}",
|
|
95743
96086
|
"",
|
|
95744
|
-
"@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String) {",
|
|
96087
|
+
"@JsExport fun peachSetAndroidDeviceInfo(model: String, release: String, apiLevel: Int, locale: String, timeZone: String, settings: String) {",
|
|
95745
96088
|
" android.os.Build.setDevice(model, release, apiLevel)",
|
|
95746
96089
|
" java.util.Locale.setDefault(java.util.Locale.forLanguageTag(locale))",
|
|
95747
96090
|
" java.util.TimeZone.setDevice(timeZone)",
|
|
96091
|
+
" dev.peach.android.ProcessSettings.configure(settings)",
|
|
95748
96092
|
" PeachExpoRuntime.configureProcessLocale(locale)",
|
|
95749
96093
|
"}",
|
|
95750
96094
|
"",
|
|
@@ -113298,7 +113642,7 @@ function readProjectNativeAppIdentityWire(project2, platform2, iosTarget, enviro
|
|
|
113298
113642
|
void 0,
|
|
113299
113643
|
environment
|
|
113300
113644
|
) ?? readOneConfigNativeAppIdentity(project2.appDir, platform2);
|
|
113301
|
-
return identity2 && createNativeAppIdentityHeader(
|
|
113645
|
+
return identity2 && createNativeAppIdentityHeader(identity2);
|
|
113302
113646
|
} catch (error) {
|
|
113303
113647
|
if (error instanceof NativeAppTargetSelectionError) return null;
|
|
113304
113648
|
throw error;
|