peachsim 0.1.2299 → 0.1.2301
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/control.ts +1 -0
- package/cli/commands/serve.ts +12 -3
- package/cli/commands/shell-url.ts +5 -0
- 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 +413 -100
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +3 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +385 -93
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2608 -102
- package/dist-lib/host/fetch-proxy-handler.cjs +6 -10
- 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 +68 -33
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +66 -32
- package/dist-lib/native-app-identity-project.cjs +49 -24
- package/dist-lib/native-app-identity-project.mjs +49 -24
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +56 -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 +2 -1
- package/dist-lib/sdk.mjs +2 -1
- package/dist-lib/skills.cjs +481 -125
- package/dist-lib/swift-compile.cjs +40 -8
- package/dist-lib/swift-compile.mjs +40 -8
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +94 -37
- package/dist-lib/vite.cjs +12 -11
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/activitykit-activityContract.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/gesture-arbitration-native.d.ts +124 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +3 -1
- package/dist-types/packages/peach-kit/src/transitions/screen-transition-math.d.ts +2 -2
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/bundle-channel.mjs +4 -3
- package/src/cli-runtime.ts +6 -0
- package/src/expo-discovery-cache.ts +6 -6
- package/src/expo-swift-host.ts +19 -4
- package/src/host/bridge-host.ts +9 -0
- package/src/launchMetadataContract.ts +1 -0
- package/src/native-firebase-config.ts +14 -0
- package/src/swift-compile.ts +28 -1
- package/src/swift-guest-compile.ts +19 -3
- package/src/swift-guest-source-plan.ts +7 -2
- package/src/swiftContract.ts +3 -0
- package/src/turbo-compile.ts +60 -4
- package/src/turbo-source.ts +239 -35
- package/src/vite-plugin-one.ts +3 -3
- package/src/widget-extension-bundle.ts +48 -0
- package/src/xcode-project.ts +67 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2301 | (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;
|
|
@@ -12144,7 +12144,7 @@ var swiftCoverageProvenance;
|
|
|
12144
12144
|
var init_provenance = __esm({
|
|
12145
12145
|
"src/swift-coverage/provenance.ts"() {
|
|
12146
12146
|
"use strict";
|
|
12147
|
-
swiftCoverageProvenance = true ? JSON.parse('{"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":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"
|
|
12147
|
+
swiftCoverageProvenance = true ? JSON.parse('{"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":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"f0e86caccf203fa58395cbac9fed64577bb98a061efdf24f85a289c4e5996db9","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
|
|
12148
12148
|
}
|
|
12149
12149
|
});
|
|
12150
12150
|
|
|
@@ -17678,8 +17678,8 @@ function developerDirs() {
|
|
|
17678
17678
|
}
|
|
17679
17679
|
return found;
|
|
17680
17680
|
}
|
|
17681
|
-
function readNativeSdk(
|
|
17682
|
-
const env = { ...process.env, DEVELOPER_DIR:
|
|
17681
|
+
function readNativeSdk(developerDir2) {
|
|
17682
|
+
const env = { ...process.env, DEVELOPER_DIR: developerDir2 };
|
|
17683
17683
|
const xcrun = (args) => (
|
|
17684
17684
|
// runner-toolchain-platform: darwin
|
|
17685
17685
|
(0, import_node_child_process11.execFileSync)("xcrun", args, {
|
|
@@ -17718,19 +17718,19 @@ function nativeGraphMismatches(read) {
|
|
|
17718
17718
|
function pinnedNativeSdk() {
|
|
17719
17719
|
if (resolvedPinnedSdk) return resolvedPinnedSdk;
|
|
17720
17720
|
let mismatches;
|
|
17721
|
-
for (const
|
|
17721
|
+
for (const developerDir2 of developerDirs()) {
|
|
17722
17722
|
let read;
|
|
17723
17723
|
try {
|
|
17724
|
-
read = readNativeSdk(
|
|
17724
|
+
read = readNativeSdk(developerDir2);
|
|
17725
17725
|
} catch {
|
|
17726
17726
|
continue;
|
|
17727
17727
|
}
|
|
17728
17728
|
if (read.sdk !== NATIVE_GRAPH_SDK_VERSION) continue;
|
|
17729
17729
|
const differ = nativeGraphMismatches(read);
|
|
17730
17730
|
if (differ.length === 0) {
|
|
17731
|
-
process.env.DEVELOPER_DIR =
|
|
17731
|
+
process.env.DEVELOPER_DIR = developerDir2;
|
|
17732
17732
|
resolvedPinnedSdk = {
|
|
17733
|
-
developerDir,
|
|
17733
|
+
developerDir: developerDir2,
|
|
17734
17734
|
sdkPath: read.sdkPath,
|
|
17735
17735
|
compiler: read.compiler
|
|
17736
17736
|
};
|
|
@@ -23492,8 +23492,8 @@ function swiftPackageLinkage(target) {
|
|
|
23492
23492
|
function guestSourceImages(graph) {
|
|
23493
23493
|
const targets = new Map(graph.targets.map((target) => [target.id, target]));
|
|
23494
23494
|
const entry = targets.get(graph.entry);
|
|
23495
|
-
if (!entry || entry.productType !== "com.apple.product-type.application")
|
|
23496
|
-
throw new Error("source graph has no application entry");
|
|
23495
|
+
if (!entry || entry.productType !== "com.apple.product-type.application" && entry.productType !== "com.apple.product-type.app-extension")
|
|
23496
|
+
throw new Error("source graph has no application or app extension entry");
|
|
23497
23497
|
const images = [
|
|
23498
23498
|
{ id: 0, owner: entry.id, members: [] }
|
|
23499
23499
|
];
|
|
@@ -26006,6 +26006,12 @@ async function compileGuestLink(options) {
|
|
|
26006
26006
|
(target) => target.productName.endsWith(".framework") ? [target.productName.slice(0, -10)] : []
|
|
26007
26007
|
)
|
|
26008
26008
|
);
|
|
26009
|
+
const sourceLibraries = new Set(
|
|
26010
|
+
options.graph.targets.flatMap((target) => {
|
|
26011
|
+
const library = /^lib(.+)\.(?:a|dylib)$/.exec(target.productName);
|
|
26012
|
+
return library ? [library[1]] : [];
|
|
26013
|
+
})
|
|
26014
|
+
);
|
|
26009
26015
|
const entry = targets.get(options.graph.entry);
|
|
26010
26016
|
if (!entry) throw new Error("guest source graph has no entry");
|
|
26011
26017
|
const imageBuildVersion = (value) => {
|
|
@@ -26175,10 +26181,12 @@ async function compileGuestLink(options) {
|
|
|
26175
26181
|
images: sourceImages.map((image) => ({
|
|
26176
26182
|
id: image.id,
|
|
26177
26183
|
objects: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => artifact.path),
|
|
26178
|
-
// a `-framework Name` for a
|
|
26179
|
-
// that
|
|
26184
|
+
// a `-framework Name` or `-lname` for a product the source graph
|
|
26185
|
+
// builds links that product's own target, which the plan already holds
|
|
26180
26186
|
linkerFlags: image.members.flatMap((id) => targets.get(id).linkerFlags).filter(
|
|
26181
|
-
(flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? ""))
|
|
26187
|
+
(flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? "")) && !sourceLibraries.has(
|
|
26188
|
+
flag.startsWith("-l") && flag.length > 2 ? flag.slice(2) : flags[index - 1] === "-l" ? flag : ""
|
|
26189
|
+
) && !(flag === "-l" && sourceLibraries.has(flags[index + 1] ?? ""))
|
|
26182
26190
|
),
|
|
26183
26191
|
clangLinkOptions: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => ({
|
|
26184
26192
|
object: import_node_path32.default.resolve(rewritten.get(artifact.path) ?? artifact.path),
|
|
@@ -31775,6 +31783,28 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
31775
31783
|
(0, import_node_fs41.rmSync)(linked, { force: true });
|
|
31776
31784
|
report("compiling and linking Swift modules");
|
|
31777
31785
|
const frameworkInterfaces = /* @__PURE__ */ new Map();
|
|
31786
|
+
const nativeDeclarations = /* @__PURE__ */ new Map();
|
|
31787
|
+
for (const [file, contents] of Object.entries(input.files)) {
|
|
31788
|
+
if (!file.endsWith(".modulemap")) continue;
|
|
31789
|
+
const name3 = moduleMapName(contents);
|
|
31790
|
+
const umbrella = /\bumbrella\s+header\s+"([^"]+)"/.exec(contents)?.[1];
|
|
31791
|
+
if (!name3 || !umbrella) continue;
|
|
31792
|
+
const header = input.files[import_node_path40.default.posix.join(import_node_path40.default.posix.dirname(file), umbrella)];
|
|
31793
|
+
if (header === void 0) continue;
|
|
31794
|
+
const included = new Set(
|
|
31795
|
+
[
|
|
31796
|
+
...header.matchAll(/^\s*#\s*(?:import|include)\s*[<"]([^">]+)[">]/gm)
|
|
31797
|
+
].map((match) => import_node_path40.default.posix.basename(match[1]))
|
|
31798
|
+
);
|
|
31799
|
+
const declarations = nativeDeclarations.get(name3) ?? /* @__PURE__ */ new Set();
|
|
31800
|
+
for (const declaration of swiftInterfaceDeclarations(header))
|
|
31801
|
+
declarations.add(declaration);
|
|
31802
|
+
for (const [candidate, source] of Object.entries(input.files))
|
|
31803
|
+
if (included.has(import_node_path40.default.posix.basename(candidate)))
|
|
31804
|
+
for (const declaration of swiftInterfaceDeclarations(source))
|
|
31805
|
+
declarations.add(declaration);
|
|
31806
|
+
nativeDeclarations.set(name3, declarations);
|
|
31807
|
+
}
|
|
31778
31808
|
const frameworkInterface = (name3) => {
|
|
31779
31809
|
if (frameworkInterfaces.has(name3)) return frameworkInterfaces.get(name3);
|
|
31780
31810
|
const source = distribution ? import_node_path40.default.join(frameworkRoot, "modules", `${name3}-Swift.h`) : import_node_path40.default.join(
|
|
@@ -31802,10 +31832,12 @@ function compileSwiftProjectOnce(input, options) {
|
|
|
31802
31832
|
))
|
|
31803
31833
|
declared.add(name4);
|
|
31804
31834
|
}
|
|
31835
|
+
for (const declaration of nativeDeclarations.get(name3) ?? [])
|
|
31836
|
+
declared.add(declaration);
|
|
31805
31837
|
const own = withoutSwiftDeclarations(
|
|
31806
31838
|
clangInterfaceHeader((0, import_node_fs41.readFileSync)(source, "utf8")),
|
|
31807
31839
|
declared,
|
|
31808
|
-
`#import <${name3}/${name3}.h>`
|
|
31840
|
+
nativeDeclarations.has(name3) ? `@import ${name3};` : `#import <${name3}/${name3}.h>`
|
|
31809
31841
|
);
|
|
31810
31842
|
const owners = sdkObjCDeclarationOwners(import_node_path40.default.dirname(import_node_path40.default.dirname(headers)));
|
|
31811
31843
|
const foreign = /* @__PURE__ */ new Map();
|
|
@@ -32253,7 +32285,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
|
|
|
32253
32285
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
32254
32286
|
MULTI_MANIFEST_VERSION = 68;
|
|
32255
32287
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
32256
|
-
compilerSourceDigest = true ? "
|
|
32288
|
+
compilerSourceDigest = true ? "ad311d7f868d4920f32f2ed00502f49f84fb83ae19817180a70ef5f799334169" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
32257
32289
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
32258
32290
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
32259
32291
|
cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
@@ -34636,6 +34668,16 @@ function loadProject(xcodeproj) {
|
|
|
34636
34668
|
loaded2.set(projectFile, { digest: digest4, project: result });
|
|
34637
34669
|
return result;
|
|
34638
34670
|
}
|
|
34671
|
+
function selectedDeveloperDir() {
|
|
34672
|
+
developerDir ??= process.platform === "darwin" ? (
|
|
34673
|
+
// runner-toolchain-platform: darwin
|
|
34674
|
+
(0, import_node_child_process26.execFileSync)("xcode-select", ["-p"], {
|
|
34675
|
+
encoding: "utf8",
|
|
34676
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
34677
|
+
}).trim()
|
|
34678
|
+
) : "";
|
|
34679
|
+
return developerDir;
|
|
34680
|
+
}
|
|
34639
34681
|
function defaultConfiguration(project2) {
|
|
34640
34682
|
const configList = project2.object(str(project2.project.buildConfigurationList));
|
|
34641
34683
|
const names = list(configList?.buildConfigurations).flatMap(
|
|
@@ -34702,15 +34744,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
34702
34744
|
resolving2.delete(marker);
|
|
34703
34745
|
return value;
|
|
34704
34746
|
};
|
|
34705
|
-
let developerDir;
|
|
34706
34747
|
const derivedSettings = {
|
|
34707
|
-
DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? (
|
|
34708
|
-
// runner-toolchain-platform: darwin
|
|
34709
|
-
(0, import_node_child_process26.execFileSync)("xcode-select", ["-p"], {
|
|
34710
|
-
encoding: "utf8",
|
|
34711
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
34712
|
-
}).trim()
|
|
34713
|
-
) : ""),
|
|
34748
|
+
DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? selectedDeveloperDir(),
|
|
34714
34749
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
34715
34750
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
34716
34751
|
EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
|
|
@@ -35492,7 +35527,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
35492
35527
|
options.installedPods
|
|
35493
35528
|
);
|
|
35494
35529
|
const allTargets = projects2.flatMap(projectTargets);
|
|
35495
|
-
const appTargets = allTargets.filter(
|
|
35530
|
+
const appTargets = allTargets.filter(
|
|
35531
|
+
(ref) => isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
|
|
35532
|
+
);
|
|
35496
35533
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
35497
35534
|
const container = import_node_path45.default.basename(xcodeprojOrWorkspace);
|
|
35498
35535
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
@@ -35556,7 +35593,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
35556
35593
|
const words2 = settingList(flags);
|
|
35557
35594
|
const linked = new Set(linkedTargets(ref).map((link) => link.target));
|
|
35558
35595
|
return words2.flatMap((word, index) => {
|
|
35559
|
-
const
|
|
35596
|
+
const library = word.startsWith("-l") && word.length > 2 ? word.slice(2) : words2[index - 1] === "-l" ? word : void 0;
|
|
35597
|
+
const target = words2[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : library ? byProduct.get(`lib${library}.a`) ?? byProduct.get(`lib${library}.dylib`) : void 0;
|
|
35560
35598
|
if (!target || target === ref || linked.has(target)) return [];
|
|
35561
35599
|
linked.add(target);
|
|
35562
35600
|
return [{ target, attributes: [] }];
|
|
@@ -35584,7 +35622,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
35584
35622
|
order.push(ref);
|
|
35585
35623
|
};
|
|
35586
35624
|
visit3(app);
|
|
35587
|
-
const
|
|
35625
|
+
const headerPhases = /* @__PURE__ */ new Map();
|
|
35626
|
+
const headerPhase = (ref) => {
|
|
35627
|
+
const key2 = `${ref.project.xcodeproj}\0${ref.id}`;
|
|
35628
|
+
const cached2 = headerPhases.get(key2);
|
|
35629
|
+
if (cached2) return cached2;
|
|
35630
|
+
const files2 = readHeaderPhase(ref);
|
|
35631
|
+
headerPhases.set(key2, files2);
|
|
35632
|
+
return files2;
|
|
35633
|
+
};
|
|
35634
|
+
const readHeaderPhase = (ref) => list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
35588
35635
|
const phase = ref.project.object(phaseId);
|
|
35589
35636
|
if (phase?.isa !== "PBXHeadersBuildPhase") return [];
|
|
35590
35637
|
return list(phase.files).flatMap((id) => {
|
|
@@ -35601,6 +35648,23 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
35601
35648
|
];
|
|
35602
35649
|
});
|
|
35603
35650
|
});
|
|
35651
|
+
const projectNonFrameworkHeaders = /* @__PURE__ */ new Map();
|
|
35652
|
+
const nonFrameworkHeadersOf = (project2) => {
|
|
35653
|
+
const cached2 = projectNonFrameworkHeaders.get(project2);
|
|
35654
|
+
if (cached2) return cached2;
|
|
35655
|
+
const headers = /* @__PURE__ */ new Map();
|
|
35656
|
+
for (const other of projectTargets(project2)) {
|
|
35657
|
+
if (FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? "")) continue;
|
|
35658
|
+
const otherProduct = productName(other);
|
|
35659
|
+
for (const { file, visibility } of headerPhase(other)) {
|
|
35660
|
+
if (visibility === "Project") continue;
|
|
35661
|
+
const key2 = `${otherProduct}/${import_node_path45.default.basename(file)}`;
|
|
35662
|
+
if (!headers.has(key2)) headers.set(key2, file);
|
|
35663
|
+
}
|
|
35664
|
+
}
|
|
35665
|
+
projectNonFrameworkHeaders.set(project2, headers);
|
|
35666
|
+
return headers;
|
|
35667
|
+
};
|
|
35604
35668
|
const productNames = /* @__PURE__ */ new Map();
|
|
35605
35669
|
const productName = (ref) => {
|
|
35606
35670
|
const key2 = `${ref.project.xcodeproj}\0${ref.id}`;
|
|
@@ -35833,16 +35897,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
35833
35897
|
const qualified3 = `${product}/${name4}`;
|
|
35834
35898
|
if (!ownHeaders.has(qualified3)) ownHeaders.set(qualified3, file);
|
|
35835
35899
|
}
|
|
35836
|
-
const nonFrameworkHeaders =
|
|
35837
|
-
for (const other of projectTargets(ref.project)) {
|
|
35838
|
-
if (FRAMEWORK_PRODUCTS.has(str(other.target.productType) ?? "")) continue;
|
|
35839
|
-
const otherProduct = productName(other);
|
|
35840
|
-
for (const { file, visibility } of headerPhase(other)) {
|
|
35841
|
-
if (visibility === "Project") continue;
|
|
35842
|
-
const key2 = `${otherProduct}/${import_node_path45.default.basename(file)}`;
|
|
35843
|
-
if (!nonFrameworkHeaders.has(key2)) nonFrameworkHeaders.set(key2, file);
|
|
35844
|
-
}
|
|
35845
|
-
}
|
|
35900
|
+
const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
|
|
35846
35901
|
const wrapper = import_node_path45.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
35847
35902
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
35848
35903
|
const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap ? import_node_path45.default.join(import_node_path45.default.dirname(moduleMap), `${moduleName2}-umbrella.h`) : null;
|
|
@@ -36541,7 +36596,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
36541
36596
|
cocoapods
|
|
36542
36597
|
};
|
|
36543
36598
|
}
|
|
36544
|
-
var import_node_child_process26, import_node_crypto22, import_node_fs45, import_node_path45, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded2, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
36599
|
+
var import_node_child_process26, import_node_crypto22, import_node_fs45, import_node_path45, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
36545
36600
|
var init_xcode_project = __esm({
|
|
36546
36601
|
"src/xcode-project.ts"() {
|
|
36547
36602
|
"use strict";
|
|
@@ -36580,6 +36635,7 @@ var init_xcode_project = __esm({
|
|
|
36580
36635
|
"compiler-default"
|
|
36581
36636
|
]);
|
|
36582
36637
|
APPLICATION = "com.apple.product-type.application";
|
|
36638
|
+
APP_EXTENSION = "com.apple.product-type.app-extension";
|
|
36583
36639
|
RESOURCE_BUNDLE = "com.apple.product-type.bundle";
|
|
36584
36640
|
PRODUCT_MACH_O_TYPES = {
|
|
36585
36641
|
"com.apple.product-type.application": "mh_execute",
|
|
@@ -36634,6 +36690,15 @@ var init_xcode_project = __esm({
|
|
|
36634
36690
|
|
|
36635
36691
|
// src/native-firebase-config.ts
|
|
36636
36692
|
function hasExpoConfig(projectRoot) {
|
|
36693
|
+
const packagePath = import_node_path46.default.join(projectRoot, "package.json");
|
|
36694
|
+
const manifest = import_node_fs46.default.existsSync(packagePath) ? JSON.parse(import_node_fs46.default.readFileSync(packagePath, "utf8")) : null;
|
|
36695
|
+
if (isRecord(manifest)) {
|
|
36696
|
+
const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
|
|
36697
|
+
isRecord
|
|
36698
|
+
);
|
|
36699
|
+
if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
|
|
36700
|
+
return false;
|
|
36701
|
+
}
|
|
36637
36702
|
const appJsonPath = import_node_path46.default.join(projectRoot, "app.json");
|
|
36638
36703
|
const appJson = import_node_fs46.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs46.default.readFileSync(appJsonPath, "utf8")) : null;
|
|
36639
36704
|
const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
@@ -44978,7 +45043,7 @@ var init_swift_standin_digest = __esm({
|
|
|
44978
45043
|
STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
|
|
44979
45044
|
SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
44980
45045
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
|
|
44981
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
45046
|
+
STANDIN_SOURCE_DIGEST = true ? "7dd2fef3ceef6be07d22cfa2f397bda7721d34bc2ef8764f78e05b9637849f09" : standinSourceDigest();
|
|
44982
45047
|
}
|
|
44983
45048
|
});
|
|
44984
45049
|
|
|
@@ -55250,7 +55315,8 @@ async function collectTurboSources(options) {
|
|
|
55250
55315
|
reactNative,
|
|
55251
55316
|
sources: [],
|
|
55252
55317
|
externalPodSources: [],
|
|
55253
|
-
rendererSwiftTargets: []
|
|
55318
|
+
rendererSwiftTargets: [],
|
|
55319
|
+
fabricComponents: []
|
|
55254
55320
|
};
|
|
55255
55321
|
const sharedLibrary = [...options.installedPods?.values() ?? []].find(
|
|
55256
55322
|
(pod) => pod.sharedLibrary
|
|
@@ -55697,6 +55763,9 @@ async function collectTurboSources(options) {
|
|
|
55697
55763
|
};
|
|
55698
55764
|
let objc = Boolean(options.reactNativeProvider);
|
|
55699
55765
|
let fabric = Boolean(options.reactNativeProvider);
|
|
55766
|
+
const fabricPackages = /* @__PURE__ */ new Set();
|
|
55767
|
+
const fabricViews = [];
|
|
55768
|
+
let fabricTarget = null;
|
|
55700
55769
|
let legacyBridge = false;
|
|
55701
55770
|
let hermesHeaders = null;
|
|
55702
55771
|
const objcClasses = /* @__PURE__ */ new Set();
|
|
@@ -55720,7 +55789,11 @@ async function collectTurboSources(options) {
|
|
|
55720
55789
|
{ tool: "cxx", flags: pod.installed.preprocessorFlags.cxx }
|
|
55721
55790
|
];
|
|
55722
55791
|
const root = pod.root;
|
|
55723
|
-
|
|
55792
|
+
if (fabricComponents(provider.root)) {
|
|
55793
|
+
fabric = true;
|
|
55794
|
+
fabricPackages.add(provider.name);
|
|
55795
|
+
fabricTarget ??= { targetName, label, root: provider.root };
|
|
55796
|
+
}
|
|
55724
55797
|
if (pod.installed?.library) {
|
|
55725
55798
|
result.libraries ??= {};
|
|
55726
55799
|
result.libraries[targetName] = import_node_fs86.default.readFileSync(pod.installed.library).toString("base64");
|
|
@@ -55993,6 +56066,17 @@ async function collectTurboSources(options) {
|
|
|
55993
56066
|
const owned = /* @__PURE__ */ new Set();
|
|
55994
56067
|
walkFiles2(generated, "", owned);
|
|
55995
56068
|
const spec = codegenConfig.name;
|
|
56069
|
+
let definedComponentNames;
|
|
56070
|
+
const getDefinedComponentNames = () => {
|
|
56071
|
+
if (definedComponentNames) return definedComponentNames;
|
|
56072
|
+
definedComponentNames = /* @__PURE__ */ new Set();
|
|
56073
|
+
const pattern = /\b(?:const\s+char|char\s+const)\s+(\w+ComponentName)\s*\[\s*\]\s*=/g;
|
|
56074
|
+
for (const sourceFile of sources) {
|
|
56075
|
+
const text6 = readPackageFile(root, import_node_path85.default.join(root, sourceFile), Infinity).toString("utf8").replace(/\/\/[^\n]*/g, "");
|
|
56076
|
+
for (const match of text6.matchAll(pattern)) definedComponentNames.add(match[1]);
|
|
56077
|
+
}
|
|
56078
|
+
return definedComponentNames;
|
|
56079
|
+
};
|
|
55996
56080
|
for (const file of [...owned].sort()) {
|
|
55997
56081
|
const base = import_node_path85.default.posix.basename(file);
|
|
55998
56082
|
const objcSpec = providerObjC && file.startsWith(`${spec}/`);
|
|
@@ -56014,7 +56098,32 @@ async function collectTurboSources(options) {
|
|
|
56014
56098
|
relative: file
|
|
56015
56099
|
}
|
|
56016
56100
|
);
|
|
56017
|
-
else
|
|
56101
|
+
else {
|
|
56102
|
+
if (component && base === "ShadowNodes.cpp") {
|
|
56103
|
+
const defined = getDefinedComponentNames();
|
|
56104
|
+
if (defined.size) {
|
|
56105
|
+
const source = readPackageFile(
|
|
56106
|
+
generated,
|
|
56107
|
+
import_node_path85.default.join(generated, file),
|
|
56108
|
+
Infinity
|
|
56109
|
+
).toString("utf8");
|
|
56110
|
+
const filtered = source.replace(
|
|
56111
|
+
/^[ \t]*(?:extern[ \t]+)?(?:const[ \t]+char|char[ \t]+const)[ \t]+(\w+ComponentName)[ \t]*\[[ \t]*\][ \t]*=[^;]*;[ \t]*\r?\n?/gm,
|
|
56112
|
+
(line, name3) => defined.has(name3) ? "" : line
|
|
56113
|
+
);
|
|
56114
|
+
if (filtered !== source) {
|
|
56115
|
+
if (!/\b(?:const\s+char|char\s+const)\s+\w+ComponentName\s*\[\s*\]\s*=/.test(
|
|
56116
|
+
filtered
|
|
56117
|
+
))
|
|
56118
|
+
continue;
|
|
56119
|
+
const key2 = original(targetName, "ReactCodegen", generated, file);
|
|
56120
|
+
result.files[key2] = filtered;
|
|
56121
|
+
continue;
|
|
56122
|
+
}
|
|
56123
|
+
}
|
|
56124
|
+
}
|
|
56125
|
+
original(targetName, "ReactCodegen", generated, file);
|
|
56126
|
+
}
|
|
56018
56127
|
}
|
|
56019
56128
|
}
|
|
56020
56129
|
for (const file of sources) original(targetName, label, root, file);
|
|
@@ -56075,7 +56184,7 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
56075
56184
|
add(`${core}/include/PeachJsiRuntime.hpp`, TURBO_RUNTIME_HEADER);
|
|
56076
56185
|
add(
|
|
56077
56186
|
`${core}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`,
|
|
56078
|
-
'#pragma once\nextern "C" void peachTurboInitialize();\n'
|
|
56187
|
+
'#pragma once\nextern "C" void peachTurboInitialize();\n// the +1 Fabric component view a root of the process shows, in an app with one\nextern "C" void *peach_fabric_view_content(int tag);\n'
|
|
56079
56188
|
);
|
|
56080
56189
|
add(
|
|
56081
56190
|
`${core}/${TURBO_CORE_PUBLIC_HEADERS}/module.modulemap`,
|
|
@@ -56201,6 +56310,21 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
|
|
|
56201
56310
|
original(TURBO_CORE_TARGET, "ReactCodegen", generated, "RCTModuleProviders.h")
|
|
56202
56311
|
);
|
|
56203
56312
|
}
|
|
56313
|
+
const thirdParty = import_node_path85.default.join(generated, "RCTThirdPartyComponentsProvider.mm");
|
|
56314
|
+
if (fabricPackages.size > 0 && import_node_fs86.default.existsSync(thirdParty)) {
|
|
56315
|
+
for (const [, name3, className2, owner] of import_node_fs86.default.readFileSync(thirdParty, "utf8").matchAll(/@"([^"]+)": NSClassFromString\(@"([^"]+)"\), \/\/ (\S+)/g))
|
|
56316
|
+
if (fabricPackages.has(owner))
|
|
56317
|
+
fabricViews.push({ name: name3, className: className2 });
|
|
56318
|
+
}
|
|
56319
|
+
if (fabricViews.length > 0 && fabricTarget) {
|
|
56320
|
+
result.fabricComponents = fabricViews.map(({ name: name3 }) => name3);
|
|
56321
|
+
const unit2 = `${targetPath(fabricTarget.targetName)}/PeachFabricHost.mm`;
|
|
56322
|
+
add(unit2, fabricHostSource(fabricViews));
|
|
56323
|
+
scanText(
|
|
56324
|
+
{ key: unit2, ...fabricTarget, relative: "PeachFabricHost.mm" },
|
|
56325
|
+
result.files[unit2]
|
|
56326
|
+
);
|
|
56327
|
+
}
|
|
56204
56328
|
}
|
|
56205
56329
|
if (fabric || legacyBridge) {
|
|
56206
56330
|
if (legacyBridge) {
|
|
@@ -56544,38 +56668,6 @@ void dispatchToJSThread(dispatch_block_t block) {
|
|
|
56544
56668
|
}
|
|
56545
56669
|
} // namespace
|
|
56546
56670
|
|
|
56547
|
-
static CGFloat peachScreenBrightness = 0.5;
|
|
56548
|
-
|
|
56549
|
-
@implementation UIScreen (PeachTurboRuntime)
|
|
56550
|
-
+ (UIScreen *)mainScreen {
|
|
56551
|
-
static UIScreen *screen = nil;
|
|
56552
|
-
if (!screen) screen = [[UIScreen alloc] init];
|
|
56553
|
-
return screen;
|
|
56554
|
-
}
|
|
56555
|
-
- (CGFloat)brightness {
|
|
56556
|
-
return peachScreenBrightness;
|
|
56557
|
-
}
|
|
56558
|
-
- (void)setBrightness:(CGFloat)value {
|
|
56559
|
-
peachScreenBrightness = value;
|
|
56560
|
-
}
|
|
56561
|
-
@end
|
|
56562
|
-
|
|
56563
|
-
static BOOL peachIdleTimerDisabled = NO;
|
|
56564
|
-
|
|
56565
|
-
@implementation UIApplication (PeachTurboRuntime)
|
|
56566
|
-
+ (UIApplication *)sharedApplication {
|
|
56567
|
-
static UIApplication *app = nil;
|
|
56568
|
-
if (!app) app = [[UIApplication alloc] init];
|
|
56569
|
-
return app;
|
|
56570
|
-
}
|
|
56571
|
-
- (BOOL)isIdleTimerDisabled {
|
|
56572
|
-
return peachIdleTimerDisabled;
|
|
56573
|
-
}
|
|
56574
|
-
- (void)setIdleTimerDisabled:(BOOL)disabled {
|
|
56575
|
-
peachIdleTimerDisabled = disabled;
|
|
56576
|
-
}
|
|
56577
|
-
@end
|
|
56578
|
-
|
|
56579
56671
|
// React Native's own modules register before any provider's, and RCTBridge.mm
|
|
56580
56672
|
// creates the registry's queue in the first RCTRegisterModule. the engine
|
|
56581
56673
|
// supplies those modules, so a process whose providers register none (codegen
|
|
@@ -56692,6 +56784,12 @@ ${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)na
|
|
|
56692
56784
|
|
|
56693
56785
|
@end
|
|
56694
56786
|
|
|
56787
|
+
// an app's Fabric component views, which its own Fabric host defines
|
|
56788
|
+
extern "C" void peachInstallFabricViews(facebook::jsi::Runtime &runtime) __attribute__((weak));
|
|
56789
|
+
|
|
56790
|
+
// UIKitCore: the key window and root view controller an app delegate makes at launch
|
|
56791
|
+
extern "C" void PeachLaunchReactNativeWindow(void);
|
|
56792
|
+
|
|
56695
56793
|
extern "C" void peachTurboInitialize() {
|
|
56696
56794
|
objc_create_block_classes_as_subclasses_of([NSObject class]);
|
|
56697
56795
|
if (Class blockClass = NSClassFromString(@"_NSBlock")) {
|
|
@@ -56705,6 +56803,7 @@ extern "C" void peachTurboInitialize() {
|
|
|
56705
56803
|
static_cast<uint32_t *>((__bridge void *)mainQueueClass)[4] &= ~2048u;
|
|
56706
56804
|
*reinterpret_cast<void **>(&_dispatch_main_q) = (__bridge void *)mainQueueClass;
|
|
56707
56805
|
}
|
|
56806
|
+
PeachLaunchReactNativeWindow();
|
|
56708
56807
|
auto& runtime = peach::jsi_runtime::create(
|
|
56709
56808
|
[] { invoker->drain(); },
|
|
56710
56809
|
[] {
|
|
@@ -56765,6 +56864,7 @@ ${bridgeProxy ? ` // as RCTInstance does: the proxy modules reach as their brid
|
|
|
56765
56864
|
}];
|
|
56766
56865
|
[decorator.moduleRegistry setTurboModuleRegistry:manager];
|
|
56767
56866
|
[manager installJSBindings:runtime];
|
|
56867
|
+
if (peachInstallFabricViews) peachInstallFabricViews(runtime);
|
|
56768
56868
|
}
|
|
56769
56869
|
|
|
56770
56870
|
// the screenshot the device took, as UIKit posts it to every observer in the
|
|
@@ -56810,7 +56910,129 @@ ${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProvi
|
|
|
56810
56910
|
}
|
|
56811
56911
|
`;
|
|
56812
56912
|
}
|
|
56813
|
-
|
|
56913
|
+
function fabricHostSource(views) {
|
|
56914
|
+
const entries = views.map(
|
|
56915
|
+
({ name: name3, className: className2 }) => `@${JSON.stringify(name3)}: NSClassFromString(@${JSON.stringify(className2)})`
|
|
56916
|
+
).join(", ");
|
|
56917
|
+
return `${FABRIC_HOST_INCLUDES}
|
|
56918
|
+
@interface PeachFabricComponents : NSObject <RCTComponentViewFactoryComponentProvider>
|
|
56919
|
+
@end
|
|
56920
|
+
|
|
56921
|
+
@implementation PeachFabricComponents
|
|
56922
|
+
- (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
56923
|
+
{
|
|
56924
|
+
return @{${entries}};
|
|
56925
|
+
}
|
|
56926
|
+
@end
|
|
56927
|
+
|
|
56928
|
+
namespace {
|
|
56929
|
+
struct PeachFabricView {
|
|
56930
|
+
react::ComponentHandle handle;
|
|
56931
|
+
const react::ComponentDescriptor *descriptor;
|
|
56932
|
+
react::Props::Shared props;
|
|
56933
|
+
react::LayoutMetrics layoutMetrics;
|
|
56934
|
+
};
|
|
56935
|
+
PeachFabricComponents *fabricComponents;
|
|
56936
|
+
RCTComponentViewRegistry *fabricRegistry;
|
|
56937
|
+
std::shared_ptr<const react::ContextContainer> fabricContext;
|
|
56938
|
+
react::ComponentDescriptorRegistry::Shared fabricDescriptors;
|
|
56939
|
+
std::unordered_map<int, PeachFabricView> fabricViews;
|
|
56940
|
+
int nextFabricView = 1;
|
|
56941
|
+
std::string fabricNames = ${JSON.stringify(views.map(({ name: name3 }) => name3).join("\n"))};
|
|
56942
|
+
|
|
56943
|
+
PeachFabricView &fabricView(int tag) {
|
|
56944
|
+
auto found = fabricViews.find(tag);
|
|
56945
|
+
if (found == fabricViews.end()) {
|
|
56946
|
+
std::fprintf(stderr, "no mounted Fabric view %d\\n", tag);
|
|
56947
|
+
std::abort();
|
|
56948
|
+
}
|
|
56949
|
+
return found->second;
|
|
56950
|
+
}
|
|
56951
|
+
|
|
56952
|
+
react::Props::Shared fabricCloneProps(jsi::Runtime &rt, const PeachFabricView &view, const jsi::Value &props) {
|
|
56953
|
+
react::PropsParserContext context{-1, *fabricContext};
|
|
56954
|
+
return view.descriptor->cloneProps(context, view.props, react::RawProps(rt, props));
|
|
56955
|
+
}
|
|
56956
|
+
|
|
56957
|
+
} // namespace
|
|
56958
|
+
|
|
56959
|
+
extern "C" void peachInstallFabricViews(jsi::Runtime &rt) {
|
|
56960
|
+
fabricComponents = [PeachFabricComponents new];
|
|
56961
|
+
RCTComponentViewFactory *factory = [RCTComponentViewFactory currentComponentViewFactory];
|
|
56962
|
+
factory.thirdPartyFabricComponentsProvider = fabricComponents;
|
|
56963
|
+
fabricRegistry = [RCTComponentViewRegistry new];
|
|
56964
|
+
fabricContext = std::make_shared<const react::ContextContainer>();
|
|
56965
|
+
react::ComponentDescriptorParameters parameters{{}, fabricContext, nullptr};
|
|
56966
|
+
fabricDescriptors = [factory createComponentDescriptorRegistryWithParameters:parameters];
|
|
56967
|
+
auto views = jsi::Object(rt);
|
|
56968
|
+
auto method = [&](const char *name, unsigned count, jsi::HostFunctionType body) {
|
|
56969
|
+
views.setProperty(rt, name, jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name), count, std::move(body)));
|
|
56970
|
+
};
|
|
56971
|
+
// Create then Insert: the first props, no event emitter or state, and the
|
|
56972
|
+
// layout the view has before the engine measures it
|
|
56973
|
+
method("create", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
56974
|
+
const auto &descriptor = fabricDescriptors->at(args[0].asString(rt).utf8(rt));
|
|
56975
|
+
int tag = nextFabricView++;
|
|
56976
|
+
auto &view = fabricViews.emplace(tag, PeachFabricView{descriptor.getComponentHandle(), &descriptor, nullptr, {}}).first->second;
|
|
56977
|
+
view.props = fabricCloneProps(rt, view, args[1]);
|
|
56978
|
+
UIView<RCTComponentViewProtocol> *componentView =
|
|
56979
|
+
[fabricRegistry dequeueComponentViewWithComponentHandle:view.handle tag:tag].view;
|
|
56980
|
+
[componentView updateProps:view.props oldProps:nullptr];
|
|
56981
|
+
[componentView updateEventEmitter:nullptr];
|
|
56982
|
+
[componentView updateState:nullptr oldState:nullptr];
|
|
56983
|
+
[componentView updateLayoutMetrics:view.layoutMetrics oldLayoutMetrics:react::EmptyLayoutMetrics];
|
|
56984
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskAll];
|
|
56985
|
+
return jsi::Value(tag);
|
|
56986
|
+
});
|
|
56987
|
+
// Update with the props React changed since the last commit
|
|
56988
|
+
method("update", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
56989
|
+
int tag = static_cast<int>(args[0].asNumber());
|
|
56990
|
+
auto &view = fabricView(tag);
|
|
56991
|
+
auto oldProps = view.props;
|
|
56992
|
+
view.props = fabricCloneProps(rt, view, args[1]);
|
|
56993
|
+
UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
56994
|
+
[componentView updateProps:view.props oldProps:oldProps];
|
|
56995
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskProps];
|
|
56996
|
+
return jsi::Value::undefined();
|
|
56997
|
+
});
|
|
56998
|
+
// Update with the size and scale the engine laid the view out at
|
|
56999
|
+
method("layout", 4, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
57000
|
+
int tag = static_cast<int>(args[0].asNumber());
|
|
57001
|
+
auto &view = fabricView(tag);
|
|
57002
|
+
auto metrics = view.layoutMetrics;
|
|
57003
|
+
metrics.frame = react::Rect{{0, 0}, {static_cast<react::Float>(args[1].asNumber()), static_cast<react::Float>(args[2].asNumber())}};
|
|
57004
|
+
metrics.pointScaleFactor = static_cast<react::Float>(args[3].asNumber());
|
|
57005
|
+
if (metrics == view.layoutMetrics) return jsi::Value::undefined();
|
|
57006
|
+
UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
57007
|
+
[componentView updateLayoutMetrics:metrics oldLayoutMetrics:view.layoutMetrics];
|
|
57008
|
+
view.layoutMetrics = metrics;
|
|
57009
|
+
[componentView finalizeUpdates:RNComponentViewUpdateMaskLayoutMetrics];
|
|
57010
|
+
return jsi::Value::undefined();
|
|
57011
|
+
});
|
|
57012
|
+
// Remove then Delete: the registry recycles the view
|
|
57013
|
+
method("drop", 1, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
|
|
57014
|
+
int tag = static_cast<int>(args[0].asNumber());
|
|
57015
|
+
auto &view = fabricView(tag);
|
|
57016
|
+
RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
|
|
57017
|
+
[descriptor.view removeFromSuperview];
|
|
57018
|
+
[fabricRegistry enqueueComponentViewWithComponentHandle:view.handle tag:tag componentViewDescriptor:descriptor];
|
|
57019
|
+
fabricViews.erase(tag);
|
|
57020
|
+
return jsi::Value::undefined();
|
|
57021
|
+
});
|
|
57022
|
+
rt.global().setProperty(rt, "peachFabricViews", std::move(views));
|
|
57023
|
+
}
|
|
57024
|
+
|
|
57025
|
+
extern "C" void *peach_fabric_view_content(int tag) {
|
|
57026
|
+
return (__bridge_retained void *)[fabricRegistry componentViewDescriptorWithTag:tag].view;
|
|
57027
|
+
}
|
|
57028
|
+
|
|
57029
|
+
// the component names the host registers as views, newline separated
|
|
57030
|
+
extern "C" __attribute__((export_name("peach_fabric_component_names"))) const char *peachFabricComponentNames() {
|
|
57031
|
+
return fabricNames.c_str();
|
|
57032
|
+
}
|
|
57033
|
+
`;
|
|
57034
|
+
}
|
|
57035
|
+
var import_node_child_process46, import_node_crypto44, import_node_fs86, import_node_path85, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES;
|
|
56814
57036
|
var init_turbo_source = __esm({
|
|
56815
57037
|
"src/turbo-source.ts"() {
|
|
56816
57038
|
"use strict";
|
|
@@ -56973,6 +57195,22 @@ class JsCallInvoker final : public react::CallInvoker {
|
|
|
56973
57195
|
std::deque<react::CallFunc> pending;
|
|
56974
57196
|
};
|
|
56975
57197
|
|
|
57198
|
+
`;
|
|
57199
|
+
FABRIC_HOST_INCLUDES = `#import <Foundation/Foundation.h>
|
|
57200
|
+
#import <React/RCTComponentViewFactory.h>
|
|
57201
|
+
#import <React/RCTComponentViewProtocol.h>
|
|
57202
|
+
#import <React/RCTComponentViewRegistry.h>
|
|
57203
|
+
#include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
|
|
57204
|
+
#include <react/renderer/core/LayoutMetrics.h>
|
|
57205
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
57206
|
+
#include <react/renderer/core/RawProps.h>
|
|
57207
|
+
#include <react/utils/ContextContainer.h>
|
|
57208
|
+
#include <cstdio>
|
|
57209
|
+
#include <cstdlib>
|
|
57210
|
+
#include <unordered_map>
|
|
57211
|
+
#include <jsi/jsi.h>
|
|
57212
|
+
|
|
57213
|
+
using namespace facebook;
|
|
56976
57214
|
`;
|
|
56977
57215
|
}
|
|
56978
57216
|
});
|
|
@@ -57302,7 +57540,7 @@ var init_react_native_core = __esm({
|
|
|
57302
57540
|
init_swift_distribution();
|
|
57303
57541
|
init_swift_package();
|
|
57304
57542
|
init_swiftContract();
|
|
57305
|
-
recipe = true ? "
|
|
57543
|
+
recipe = true ? "96416de7238919b274266f095ef4213211a2a26c133d0df7ab5e0459ded52ef1" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
|
|
57306
57544
|
strings3 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
57307
57545
|
building = /* @__PURE__ */ new Map();
|
|
57308
57546
|
}
|
|
@@ -57359,7 +57597,7 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
57359
57597
|
dependencyTargets = dependencyTargets.filter(
|
|
57360
57598
|
(_, index) => !providerNames.has(parsedTargets[index].name)
|
|
57361
57599
|
);
|
|
57362
|
-
const swift = Object.keys(files2).some((file) => file.endsWith(".swift"));
|
|
57600
|
+
const swift = collection.coreMode === "turbo" || Object.keys(files2).some((file) => file.endsWith(".swift"));
|
|
57363
57601
|
const entry = `Sources/PeachTurboApp/main.${swift ? "swift" : "cpp"}`;
|
|
57364
57602
|
const targetNames = targets.map(({ name: name3 }) => name3);
|
|
57365
57603
|
const loadTargetNames = new Set(collection.loads.map(({ target }) => target));
|
|
@@ -57368,10 +57606,56 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
|
|
|
57368
57606
|
(file) => file.startsWith(`${target.path}/`) && file.endsWith(".swift")
|
|
57369
57607
|
)
|
|
57370
57608
|
).map(({ name: name3 }) => name3);
|
|
57371
|
-
|
|
57372
|
-
|
|
57373
|
-
|
|
57374
|
-
|
|
57609
|
+
const initialize = [
|
|
57610
|
+
"_PeachReactNativeWindow.launch()",
|
|
57611
|
+
...collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()`),
|
|
57612
|
+
...runtime ? ["peachTurboInitialize()"] : []
|
|
57613
|
+
];
|
|
57614
|
+
const fabric = collection.fabricComponents.length > 0;
|
|
57615
|
+
files2[entry] = swift ? [
|
|
57616
|
+
"import SwiftUI",
|
|
57617
|
+
"import UIKit",
|
|
57618
|
+
"import PeachJSON",
|
|
57619
|
+
...swiftImportedTargetNames.map((target) => `import ${target}`),
|
|
57620
|
+
"",
|
|
57621
|
+
"@main struct PeachTurboApp: PeachPackage {",
|
|
57622
|
+
` init() { ${initialize.join("; ")} }`,
|
|
57623
|
+
...fabric ? [
|
|
57624
|
+
" func view(props: JSON) -> PeachTurboRoot { PeachTurboRoot(props: props) }",
|
|
57625
|
+
"}",
|
|
57626
|
+
"",
|
|
57627
|
+
"struct PeachTurboRoot: View {",
|
|
57628
|
+
" let fabric: Int32?",
|
|
57629
|
+
"",
|
|
57630
|
+
" init(props: JSON) {",
|
|
57631
|
+
' guard case .object(let fields) = props, let field = fields.first(where: { $0.0 == "fabric" }), case .number(let tag) = field.1 else {',
|
|
57632
|
+
" fabric = nil",
|
|
57633
|
+
" return",
|
|
57634
|
+
" }",
|
|
57635
|
+
" fabric = Int32(tag)",
|
|
57636
|
+
" }",
|
|
57637
|
+
"",
|
|
57638
|
+
" var body: some View {",
|
|
57639
|
+
" if let fabric { PeachFabricComponent(tag: fabric) } else { _PeachReactNativeWindow() }",
|
|
57640
|
+
" }",
|
|
57641
|
+
"}",
|
|
57642
|
+
"",
|
|
57643
|
+
"struct PeachFabricComponent: UIViewRepresentable {",
|
|
57644
|
+
" let tag: Int32",
|
|
57645
|
+
"",
|
|
57646
|
+
" func makeUIView(context: Context) -> UIView {",
|
|
57647
|
+
' guard let view = peach_fabric_view_content(tag) else { fatalError("Fabric view \\(tag) is not mounted") }',
|
|
57648
|
+
" return Unmanaged<UIView>.fromOpaque(view).takeRetainedValue()",
|
|
57649
|
+
" }",
|
|
57650
|
+
"",
|
|
57651
|
+
" func updateUIView(_ view: UIView, context: Context) {}",
|
|
57652
|
+
"}"
|
|
57653
|
+
] : [
|
|
57654
|
+
" func view(props: JSON) -> _PeachReactNativeWindow { _PeachReactNativeWindow() }",
|
|
57655
|
+
"}"
|
|
57656
|
+
],
|
|
57657
|
+
""
|
|
57658
|
+
].join("\n") : [
|
|
57375
57659
|
'extern "C" void peachTurboInitialize();',
|
|
57376
57660
|
...collection.loads.map(({ symbol: symbol2 }) => `extern "C" void ${symbol2}();`),
|
|
57377
57661
|
"int main(int argc, char **argv) {",
|
|
@@ -58345,7 +58629,7 @@ var init_nitro_superset = __esm({
|
|
|
58345
58629
|
init_nitroContract();
|
|
58346
58630
|
init_swift_standin_digest();
|
|
58347
58631
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
58348
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
58632
|
+
NITRO_COMPILER_DIGEST = true ? "3f4226b3727dae50227ba7f4fd8d517c59939e4f4d2f56ef11e1dafd09705f5c" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
58349
58633
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
58350
58634
|
nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
|
|
58351
58635
|
published = /* @__PURE__ */ new Map();
|
|
@@ -59137,7 +59421,7 @@ async function expoDiscoveryKey(options) {
|
|
|
59137
59421
|
const key2 = (0, import_node_crypto50.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable2(JSON.parse(options.searchText))}\0`).update(`${stable2(options.configuration)}\0`).update(stable2(JSON.parse(options.resolveText))).digest("hex");
|
|
59138
59422
|
return { key: key2, root };
|
|
59139
59423
|
}
|
|
59140
|
-
function
|
|
59424
|
+
function expoDiscoveryCacheDir() {
|
|
59141
59425
|
return import_node_path94.default.join(sharedCacheDir(import_node_path94.default.join(ambientHomeDir(), "cache")), "expo-discovery");
|
|
59142
59426
|
}
|
|
59143
59427
|
function vanished2(error) {
|
|
@@ -59174,7 +59458,7 @@ function isStoredUnit(value) {
|
|
|
59174
59458
|
}
|
|
59175
59459
|
function readExpoDiscovery(key2) {
|
|
59176
59460
|
let parsed;
|
|
59177
|
-
const record3 = import_node_path94.default.join(
|
|
59461
|
+
const record3 = import_node_path94.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
|
|
59178
59462
|
try {
|
|
59179
59463
|
parsed = JSON.parse(import_node_fs96.default.readFileSync(record3, "utf8"));
|
|
59180
59464
|
} catch {
|
|
@@ -59203,7 +59487,7 @@ function readExpoDiscovery(key2) {
|
|
|
59203
59487
|
const read = (digest4) => {
|
|
59204
59488
|
const known = blobs.get(digest4);
|
|
59205
59489
|
if (known !== void 0) return known;
|
|
59206
|
-
const blob = import_node_path94.default.join(
|
|
59490
|
+
const blob = import_node_path94.default.join(expoDiscoveryCacheDir(), "blobs", digest4);
|
|
59207
59491
|
const body = import_node_fs96.default.readFileSync(blob, "utf8");
|
|
59208
59492
|
if ((0, import_node_crypto50.createHash)("sha256").update(body).digest("hex") !== digest4)
|
|
59209
59493
|
throw new Error("discovery blob differs from its digest");
|
|
@@ -59247,7 +59531,7 @@ function readExpoDiscovery(key2) {
|
|
|
59247
59531
|
}
|
|
59248
59532
|
}
|
|
59249
59533
|
function fileHashesPath() {
|
|
59250
|
-
return import_node_path94.default.join(
|
|
59534
|
+
return import_node_path94.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
|
|
59251
59535
|
}
|
|
59252
59536
|
function stampedFileHash(file) {
|
|
59253
59537
|
if (!fileHashesLoaded) {
|
|
@@ -59425,7 +59709,7 @@ function rewritePreparedPaths(options) {
|
|
|
59425
59709
|
frameworkDependencies[sourceDir] = sourceDigest;
|
|
59426
59710
|
let portableDir = sourceDir;
|
|
59427
59711
|
if (preparedDigest !== sourceDigest) {
|
|
59428
|
-
const parent = import_node_path94.default.join(
|
|
59712
|
+
const parent = import_node_path94.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
|
|
59429
59713
|
portableDir = import_node_path94.default.join(parent, import_node_path94.default.basename(dir));
|
|
59430
59714
|
if (!import_node_fs96.default.existsSync(portableDir)) {
|
|
59431
59715
|
import_node_fs96.default.mkdirSync(parent, { recursive: true });
|
|
@@ -59456,7 +59740,7 @@ function rewritePreparedPaths(options) {
|
|
|
59456
59740
|
}
|
|
59457
59741
|
function writeExpoDiscovery(options) {
|
|
59458
59742
|
try {
|
|
59459
|
-
const dir =
|
|
59743
|
+
const dir = expoDiscoveryCacheDir();
|
|
59460
59744
|
import_node_fs96.default.mkdirSync(dir, { recursive: true });
|
|
59461
59745
|
const tmp = import_node_path94.default.join(dir, `.${options.key}.${process.pid}.${(0, import_node_crypto50.randomUUID)()}.tmp`);
|
|
59462
59746
|
if (options.units === null) {
|
|
@@ -59604,7 +59888,7 @@ var init_expo_native_compiler_digest = __esm({
|
|
|
59604
59888
|
|
|
59605
59889
|
// src/expo-native-prebuilt.ts
|
|
59606
59890
|
function expoNativeCompilerDigestValue() {
|
|
59607
|
-
return true ? "
|
|
59891
|
+
return true ? "064dc6aa590b7937e7499edee9ff07b0ef387a59a35ed48a2d820ab27209917a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
59608
59892
|
}
|
|
59609
59893
|
function readSources(value) {
|
|
59610
59894
|
const sources = isRecord(value) ? value.sources : null;
|
|
@@ -60529,7 +60813,9 @@ function installSwiftInputTrace() {
|
|
|
60529
60813
|
import_node_path97.default.join(swiftCacheDir(), "swift-builds"),
|
|
60530
60814
|
import_node_path97.default.join(swiftCacheDir(), "swift-sdk-views"),
|
|
60531
60815
|
swiftRootLocksDir(),
|
|
60532
|
-
import_node_path97.default.join(cacheDir(), "swift-tmp")
|
|
60816
|
+
import_node_path97.default.join(cacheDir(), "swift-tmp"),
|
|
60817
|
+
// content-addressed records whose reads renew their timestamps for expiry.
|
|
60818
|
+
expoDiscoveryCacheDir()
|
|
60533
60819
|
].filter((prefix, index, all) => all.indexOf(prefix) === index);
|
|
60534
60820
|
ignoredRoots = prefixes.flatMap((root) => {
|
|
60535
60821
|
try {
|
|
@@ -60635,11 +60921,13 @@ async function witnessMatches(witness) {
|
|
|
60635
60921
|
return true;
|
|
60636
60922
|
}
|
|
60637
60923
|
async function discoveryKey(root, installedWorkspace, prepareNative, iosTarget, moduleRoot) {
|
|
60638
|
-
const
|
|
60924
|
+
const preparesWorkspace = prepareNative && !installedWorkspace && nativeWorkspaceAvailable();
|
|
60925
|
+
const [config, expoConfig, workspace] = await Promise.all([
|
|
60639
60926
|
loadRNXAppConfig(resolveAppProject(root)),
|
|
60640
|
-
readExpoConfigAsync(root)
|
|
60927
|
+
readExpoConfigAsync(root),
|
|
60928
|
+
preparesWorkspace ? traceStore.exit(() => hashExpoWorkspace(root)) : null
|
|
60641
60929
|
]);
|
|
60642
|
-
return `${import_node_fs99.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
|
|
60930
|
+
return `${import_node_fs99.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}\0${workspace?.hash ?? ""}`;
|
|
60643
60931
|
}
|
|
60644
60932
|
function cloneNativeTarget(target) {
|
|
60645
60933
|
return {
|
|
@@ -61922,7 +62210,11 @@ function expoEntry(units, oneSDK = false) {
|
|
|
61922
62210
|
(unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
|
|
61923
62211
|
)
|
|
61924
62212
|
);
|
|
61925
|
-
const bridgeModules = units.flatMap(
|
|
62213
|
+
const bridgeModules = units.flatMap(
|
|
62214
|
+
(unit2) => unit2.bridgeModules.map(
|
|
62215
|
+
(registration) => registration === `${unit2.namespace}.__peachReactModule_${unit2.namespace}()` ? registration.slice(unit2.namespace.length + 1) : registration
|
|
62216
|
+
)
|
|
62217
|
+
);
|
|
61926
62218
|
const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
|
|
61927
62219
|
const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
|
|
61928
62220
|
const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
|
|
@@ -66366,7 +66658,7 @@ var import_node_path5 = require("node:path");
|
|
|
66366
66658
|
init_src();
|
|
66367
66659
|
|
|
66368
66660
|
// runtime-companion.json
|
|
66369
|
-
var runtime_companion_default = { abi: 1, sha256: "
|
|
66661
|
+
var runtime_companion_default = { abi: 1, sha256: "60900a3af6e6213c855e6682baa0ebdb6a6865510e4e3a51a24d4c584b3fdec2", file: "node/cli-60900a3af6e6213c855e6682baa0ebdb6a6865510e4e3a51a24d4c584b3fdec2.cjs" };
|
|
66370
66662
|
|
|
66371
66663
|
// src/cli-runtime.ts
|
|
66372
66664
|
init_answeredNativePackages();
|
|
@@ -66395,7 +66687,32 @@ function verifyCompanionFile(file) {
|
|
|
66395
66687
|
);
|
|
66396
66688
|
}
|
|
66397
66689
|
}
|
|
66690
|
+
async function ensureCliCompanion(root) {
|
|
66691
|
+
const file = (0, import_node_path5.join)(root, cliCompanionPath());
|
|
66692
|
+
try {
|
|
66693
|
+
verifyCompanionFile(file);
|
|
66694
|
+
return;
|
|
66695
|
+
} catch (error) {
|
|
66696
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT"))
|
|
66697
|
+
throw error;
|
|
66698
|
+
}
|
|
66699
|
+
const staged = `${file}.${process.pid}`;
|
|
66700
|
+
try {
|
|
66701
|
+
await downloadToFile(
|
|
66702
|
+
`https://r2.rnxsim.com/rnx-cli/companions/cli-${runtime_companion_default.sha256}.cjs`,
|
|
66703
|
+
staged
|
|
66704
|
+
);
|
|
66705
|
+
verifyCompanionFile(staged);
|
|
66706
|
+
(0, import_node_fs6.renameSync)(staged, file);
|
|
66707
|
+
} finally {
|
|
66708
|
+
(0, import_node_fs6.rmSync)(staged, { force: true });
|
|
66709
|
+
}
|
|
66710
|
+
}
|
|
66398
66711
|
var loaded;
|
|
66712
|
+
async function loadCliRuntime() {
|
|
66713
|
+
if (!loaded) await ensureCliCompanion(peachRuntimeRoot());
|
|
66714
|
+
return getCliRuntime();
|
|
66715
|
+
}
|
|
66399
66716
|
function getCliRuntime() {
|
|
66400
66717
|
if (loaded) return loaded.runtime;
|
|
66401
66718
|
const root = peachRuntimeRoot();
|
|
@@ -68204,7 +68521,6 @@ var NATIVE_RUNTIME_PACKAGE_NAMES = [
|
|
|
68204
68521
|
// ../peach-globals/src/guest-modules/lazy-stub-patterns.ts
|
|
68205
68522
|
init_version_range();
|
|
68206
68523
|
var LAZY_STUB_PATTERNS = [
|
|
68207
|
-
"@10play/tentap-editor",
|
|
68208
68524
|
"@adobe/react-native-aepcore",
|
|
68209
68525
|
"@azesmway/react-native-unity",
|
|
68210
68526
|
"@azzapp/react-native-skia-video",
|
|
@@ -68277,8 +68593,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
68277
68593
|
"react-native-agora",
|
|
68278
68594
|
"react-native-android-location-enabler",
|
|
68279
68595
|
"react-native-animateable-text",
|
|
68280
|
-
"react-native-app-clip",
|
|
68281
|
-
"react-native-avoid-softinput",
|
|
68282
68596
|
"react-native-azure-auth",
|
|
68283
68597
|
"react-native-bare-kit",
|
|
68284
68598
|
"react-native-bluetooth-classic",
|
|
@@ -68293,7 +68607,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
68293
68607
|
"react-native-extra-dimensions-android",
|
|
68294
68608
|
"react-native-fast-opencv",
|
|
68295
68609
|
"react-native-fast-shadow",
|
|
68296
|
-
"react-native-fast-squircle",
|
|
68297
68610
|
"react-native-fast-tflite",
|
|
68298
68611
|
"react-native-file-viewer-turbo",
|
|
68299
68612
|
"react-native-floating-label-input",
|
|
@@ -70161,7 +70474,7 @@ async function prepareChannel({
|
|
|
70161
70474
|
[...files2.keys()].map((path102) => path102.slice(0, path102.lastIndexOf("/")))
|
|
70162
70475
|
);
|
|
70163
70476
|
let locations = 0;
|
|
70164
|
-
const { stripRolldownBundleInventoryFooter, attachRolldownBundleInventory } =
|
|
70477
|
+
const { stripRolldownBundleInventoryFooter, attachRolldownBundleInventory } = (await loadCliRuntime()).rolldown_bundle_inventory;
|
|
70165
70478
|
const detached = detachPackageVersionsFooter(
|
|
70166
70479
|
stripRolldownBundleInventoryFooter(
|
|
70167
70480
|
new TextDecoder("utf-8", { fatal: true }).decode(bundle)
|