peachsim 0.1.1833 → 0.1.1835
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/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 +8362 -8263
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +183 -155
- 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 +8621 -8521
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +3 -3
- 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 +3 -3
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +3 -3
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +70 -66
- 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 +9404 -9305
- package/dist-lib/swift-compile.cjs +3 -8
- package/dist-lib/swift-compile.mjs +3 -8
- package/dist-lib/swift-package.cjs +1 -4
- package/dist-lib/swift-package.mjs +1 -3
- 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 +5 -11
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/package.json +1 -1
- package/src/expo-autolinking.ts +46 -0
- package/src/expo-swift-host.ts +6 -1
- package/src/native-seam-manifest.ts +0 -10
- package/src/swift-compile.ts +1 -6
- package/src/swift-objc-compile.ts +0 -4
- package/src/swift-package.ts +0 -9
- package/src/turbo-source.ts +103 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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;
|
|
@@ -3459,7 +3459,6 @@ ${declaration}
|
|
|
3459
3459
|
export *
|
|
3460
3460
|
}`;
|
|
3461
3461
|
}
|
|
3462
|
-
var fmtConstantInterpreterFlags = (flags) => flags.some((flag) => flag.includes("/fmt/")) ? ["-fexperimental-new-constant-interpreter"] : [];
|
|
3463
3462
|
var withoutGlogModuleMap = (flags) => flags.filter(
|
|
3464
3463
|
(flag) => !(flag.startsWith("-fmodule-map-file=") && flag.endsWith("/glog.modulemap"))
|
|
3465
3464
|
);
|
|
@@ -7857,7 +7856,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
7857
7856
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
7858
7857
|
var MULTI_MANIFEST_VERSION = 65;
|
|
7859
7858
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
7860
|
-
var compilerSourceDigest = true ? "
|
|
7859
|
+
var compilerSourceDigest = true ? "96782473c71232855f1ba299047583960204db64739ae5bb56652c57b6bcba63" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
7861
7860
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
7862
7861
|
const hash = (0, import_node_crypto8.createHash)("sha256");
|
|
7863
7862
|
hash.update(`swift-compile
|
|
@@ -7944,11 +7943,7 @@ ${target}
|
|
|
7944
7943
|
}
|
|
7945
7944
|
var nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
7946
7945
|
var cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
7947
|
-
var cxxFlagArray = (flags) => JSON.stringify([
|
|
7948
|
-
...nativeCxxCompilerFlags,
|
|
7949
|
-
...fmtConstantInterpreterFlags(flags),
|
|
7950
|
-
...withoutGlogModuleMap(flags)
|
|
7951
|
-
]);
|
|
7946
|
+
var cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
7952
7947
|
function swiftCrossImportFlags(moduleRoot, distribution) {
|
|
7953
7948
|
const overlayRoot = import_node_path19.default.join(
|
|
7954
7949
|
moduleRoot,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-compile.ts
|
|
4
4
|
import {
|
|
@@ -3409,7 +3409,6 @@ ${declaration}
|
|
|
3409
3409
|
export *
|
|
3410
3410
|
}`;
|
|
3411
3411
|
}
|
|
3412
|
-
var fmtConstantInterpreterFlags = (flags) => flags.some((flag) => flag.includes("/fmt/")) ? ["-fexperimental-new-constant-interpreter"] : [];
|
|
3413
3412
|
var withoutGlogModuleMap = (flags) => flags.filter(
|
|
3414
3413
|
(flag) => !(flag.startsWith("-fmodule-map-file=") && flag.endsWith("/glog.modulemap"))
|
|
3415
3414
|
);
|
|
@@ -7828,7 +7827,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
7828
7827
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
7829
7828
|
var MULTI_MANIFEST_VERSION = 65;
|
|
7830
7829
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
7831
|
-
var compilerSourceDigest = true ? "
|
|
7830
|
+
var compilerSourceDigest = true ? "96782473c71232855f1ba299047583960204db64739ae5bb56652c57b6bcba63" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
7832
7831
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
7833
7832
|
const hash = createHash8("sha256");
|
|
7834
7833
|
hash.update(`swift-compile
|
|
@@ -7915,11 +7914,7 @@ ${target}
|
|
|
7915
7914
|
}
|
|
7916
7915
|
var nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
7917
7916
|
var cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
7918
|
-
var cxxFlagArray = (flags) => JSON.stringify([
|
|
7919
|
-
...nativeCxxCompilerFlags,
|
|
7920
|
-
...fmtConstantInterpreterFlags(flags),
|
|
7921
|
-
...withoutGlogModuleMap(flags)
|
|
7922
|
-
]);
|
|
7917
|
+
var cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
7923
7918
|
function swiftCrossImportFlags(moduleRoot, distribution) {
|
|
7924
7919
|
const overlayRoot = path19.join(
|
|
7925
7920
|
moduleRoot,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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 __defProp = Object.defineProperty;
|
|
@@ -28,7 +28,6 @@ __export(swift_package_exports, {
|
|
|
28
28
|
clangImportNames: () => clangImportNames,
|
|
29
29
|
clangMacroSetting: () => clangMacroSetting,
|
|
30
30
|
clangSettingEntries: () => clangSettingEntries,
|
|
31
|
-
fmtConstantInterpreterFlags: () => fmtConstantInterpreterFlags,
|
|
32
31
|
isSwiftManifestFile: () => isSwiftManifestFile,
|
|
33
32
|
isSwiftNativeTranslationUnit: () => isSwiftNativeTranslationUnit,
|
|
34
33
|
manifestCalls: () => manifestCalls,
|
|
@@ -250,7 +249,6 @@ function swiftPackageIdentity(url) {
|
|
|
250
249
|
const path = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
251
250
|
return (path.split("/").pop() ?? path).replace(/\.git$/, "").toLowerCase();
|
|
252
251
|
}
|
|
253
|
-
var fmtConstantInterpreterFlags = (flags) => flags.some((flag) => flag.includes("/fmt/")) ? ["-fexperimental-new-constant-interpreter"] : [];
|
|
254
252
|
var withoutGlogModuleMap = (flags) => flags.filter(
|
|
255
253
|
(flag) => !(flag.startsWith("-fmodule-map-file=") && flag.endsWith("/glog.modulemap"))
|
|
256
254
|
);
|
|
@@ -641,7 +639,6 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
|
|
|
641
639
|
clangImportNames,
|
|
642
640
|
clangMacroSetting,
|
|
643
641
|
clangSettingEntries,
|
|
644
|
-
fmtConstantInterpreterFlags,
|
|
645
642
|
isSwiftManifestFile,
|
|
646
643
|
isSwiftNativeTranslationUnit,
|
|
647
644
|
manifestCalls,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/swift-package.ts
|
|
4
4
|
function swiftManifestSettings(target) {
|
|
@@ -197,7 +197,6 @@ function swiftPackageIdentity(url) {
|
|
|
197
197
|
const path = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
198
198
|
return (path.split("/").pop() ?? path).replace(/\.git$/, "").toLowerCase();
|
|
199
199
|
}
|
|
200
|
-
var fmtConstantInterpreterFlags = (flags) => flags.some((flag) => flag.includes("/fmt/")) ? ["-fexperimental-new-constant-interpreter"] : [];
|
|
201
200
|
var withoutGlogModuleMap = (flags) => flags.filter(
|
|
202
201
|
(flag) => !(flag.startsWith("-fmodule-map-file=") && flag.endsWith("/glog.modulemap"))
|
|
203
202
|
);
|
|
@@ -587,7 +586,6 @@ export {
|
|
|
587
586
|
clangImportNames,
|
|
588
587
|
clangMacroSetting,
|
|
589
588
|
clangSettingEntries,
|
|
590
|
-
fmtConstantInterpreterFlags,
|
|
591
589
|
isSwiftManifestFile,
|
|
592
590
|
isSwiftNativeTranslationUnit,
|
|
593
591
|
manifestCalls,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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 __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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 __defProp = Object.defineProperty;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "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": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "
|
|
42
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "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": "08583ee03b92e00f3f331e52fb480ef81c9fd7e668d796a5afcfa07978bcaf03", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "26f8d4a25d1af9917f0005153c73c9cefa4f6681c9d56c6333b8096190db0431", "swift-package.ts": "e224b5e20ed3a86df1c62d6429e88234ed65317ce32c61c1b6b02aaee173d64f", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "a90155695844684e625ab83687161104f028ef34030715a40042a4407b77fca0", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "76e78ea9974671ff3b7e7a5d65e508306d8eadeb6b6bf859bd2ccc03f4ef6e72", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -5379,7 +5379,6 @@ function swiftPackageIdentity(url) {
|
|
|
5379
5379
|
const path43 = url.endsWith("/") ? url.slice(0, -1) : url;
|
|
5380
5380
|
return (path43.split("/").pop() ?? path43).replace(/\.git$/, "").toLowerCase();
|
|
5381
5381
|
}
|
|
5382
|
-
var fmtConstantInterpreterFlags = (flags) => flags.some((flag) => flag.includes("/fmt/")) ? ["-fexperimental-new-constant-interpreter"] : [];
|
|
5383
5382
|
var withoutGlogModuleMap = (flags) => flags.filter(
|
|
5384
5383
|
(flag) => !(flag.startsWith("-fmodule-map-file=") && flag.endsWith("/glog.modulemap"))
|
|
5385
5384
|
);
|
|
@@ -12153,7 +12152,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
|
|
|
12153
12152
|
var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
12154
12153
|
var MULTI_MANIFEST_VERSION = 65;
|
|
12155
12154
|
var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
12156
|
-
var compilerSourceDigest = true ? "
|
|
12155
|
+
var compilerSourceDigest = true ? "96782473c71232855f1ba299047583960204db64739ae5bb56652c57b6bcba63" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
|
|
12157
12156
|
function swiftArtifactHash(input, release, moduleRoot) {
|
|
12158
12157
|
const hash = (0, import_node_crypto8.createHash)("sha256");
|
|
12159
12158
|
hash.update(`swift-compile
|
|
@@ -12240,11 +12239,7 @@ ${target}
|
|
|
12240
12239
|
}
|
|
12241
12240
|
var nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
12242
12241
|
var cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
12243
|
-
var cxxFlagArray = (flags) => JSON.stringify([
|
|
12244
|
-
...nativeCxxCompilerFlags,
|
|
12245
|
-
...fmtConstantInterpreterFlags(flags),
|
|
12246
|
-
...withoutGlogModuleMap(flags)
|
|
12247
|
-
]);
|
|
12242
|
+
var cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
|
|
12248
12243
|
function swiftCrossImportFlags(moduleRoot, distribution) {
|
|
12249
12244
|
const overlayRoot = import_node_path19.default.join(
|
|
12250
12245
|
moduleRoot,
|
|
@@ -24869,7 +24864,7 @@ function standinSourceDigest(srcDir = __sootsim_import_meta_dirname) {
|
|
|
24869
24864
|
}
|
|
24870
24865
|
return hash.digest("hex");
|
|
24871
24866
|
}
|
|
24872
|
-
var STANDIN_SOURCE_DIGEST = true ? "
|
|
24867
|
+
var STANDIN_SOURCE_DIGEST = true ? "c8920e83d2fb2b094c3317a9acc893f46346a4cce1cc4e0c11e5ace1015720a8" : standinSourceDigest();
|
|
24873
24868
|
|
|
24874
24869
|
// src/swift-standins.ts
|
|
24875
24870
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -28806,7 +28801,6 @@ async function prepareXcodeObjCImplementations(app, binaries, moduleRoot) {
|
|
|
28806
28801
|
...objc ? [...swiftObjCRuntimeFlags, "-fobjc-exceptions"] : [],
|
|
28807
28802
|
...objcSdkIntakeFlags(headers, toolchain.toolchainBin, minimum),
|
|
28808
28803
|
...headerSearch.flags[index],
|
|
28809
|
-
...cxx ? fmtConstantInterpreterFlags([...flags, ...headerSearch.flags[index]]) : [],
|
|
28810
28804
|
...target.includes.flatMap((include) => ["-I", staged(include)]),
|
|
28811
28805
|
...target.frameworks.flatMap((framework) => ["-F", staged(framework)]),
|
|
28812
28806
|
...moduleMaps[index],
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1835 | (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 __defProp = Object.defineProperty;
|
package/package.json
CHANGED
package/src/expo-autolinking.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process'
|
|
1
2
|
import fs from 'node:fs'
|
|
3
|
+
import { createRequire } from 'node:module'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import { promisify } from 'node:util'
|
|
6
|
+
import { PEACH_FORKED_SCRIPT_ENV } from './forked-script-contract'
|
|
2
7
|
|
|
3
8
|
// the autolinker's command line changed across Expo releases: before 1.8.0 it
|
|
4
9
|
// takes the project from its working directory, before 1.10.3 the Apple
|
|
@@ -22,3 +27,44 @@ export function autolinkerAppleFlags(autolinkerManifest: string, appRoot: string
|
|
|
22
27
|
if (atLeast(1, 8, 0)) return ['--platform', 'ios', '--project-root', appRoot]
|
|
23
28
|
return ['--platform', 'ios']
|
|
24
29
|
}
|
|
30
|
+
|
|
31
|
+
const run = promisify(execFile)
|
|
32
|
+
|
|
33
|
+
/** the Apple pods of every Expo module the app's autolinker selects, which the
|
|
34
|
+
* React Native autolinker leaves out; an app without the autolinker has none. */
|
|
35
|
+
export async function expoAutolinkedPods(
|
|
36
|
+
appRoot: string,
|
|
37
|
+
): Promise<{ name: string; root: string; podspecPath: string }[]> {
|
|
38
|
+
const appRequire = createRequire(path.join(appRoot, 'package.json'))
|
|
39
|
+
let manifest: string
|
|
40
|
+
try {
|
|
41
|
+
manifest = appRequire.resolve('expo-modules-autolinking/package.json')
|
|
42
|
+
} catch (error) {
|
|
43
|
+
if (Reflect.get(Object(error), 'code') === 'MODULE_NOT_FOUND') return []
|
|
44
|
+
throw error
|
|
45
|
+
}
|
|
46
|
+
const cli = path.join(path.dirname(manifest), 'bin/expo-modules-autolinking.js')
|
|
47
|
+
const flags = autolinkerAppleFlags(manifest, appRoot)
|
|
48
|
+
const [search, resolve] = await Promise.all(
|
|
49
|
+
['search', 'resolve'].map(async (command) =>
|
|
50
|
+
JSON.parse(
|
|
51
|
+
(
|
|
52
|
+
await run('node', [cli, command, ...flags, '--json'], {
|
|
53
|
+
cwd: appRoot,
|
|
54
|
+
timeout: 120_000,
|
|
55
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
56
|
+
env: { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: '1' },
|
|
57
|
+
})
|
|
58
|
+
).stdout,
|
|
59
|
+
),
|
|
60
|
+
),
|
|
61
|
+
)
|
|
62
|
+
return resolve.modules.flatMap(
|
|
63
|
+
(module: { packageName: string; pods: { podName: string; podspecDir: string }[] }) =>
|
|
64
|
+
module.pods.map((pod) => ({
|
|
65
|
+
name: module.packageName,
|
|
66
|
+
root: search[module.packageName].path,
|
|
67
|
+
podspecPath: path.join(pod.podspecDir, `${pod.podName}.podspec`),
|
|
68
|
+
})),
|
|
69
|
+
)
|
|
70
|
+
}
|
package/src/expo-swift-host.ts
CHANGED
|
@@ -84,6 +84,7 @@ import {
|
|
|
84
84
|
} from './swift-standins'
|
|
85
85
|
import { MAX_SWIFT_COMPILE_FILES, MAX_SWIFT_COMPILE_SOURCE_BYTES } from './swift-submit'
|
|
86
86
|
import { swiftCacheDir } from './swift-toolchain'
|
|
87
|
+
import { registersReactModule } from './turbo-source'
|
|
87
88
|
import type { PeachConfig } from './config'
|
|
88
89
|
import type {
|
|
89
90
|
ExpoSwiftSourceUnit,
|
|
@@ -703,7 +704,11 @@ function enrichInstalledUnits(
|
|
|
703
704
|
owner &&
|
|
704
705
|
included.has(owner.name) &&
|
|
705
706
|
(file.endsWith('.swift') || isSwiftNativeTranslationUnit(file)) &&
|
|
706
|
-
!(bridge && /RCT_EXTERN_(?:REMAP_)?MODULE\s*\(/.test(source))
|
|
707
|
+
!(bridge && /RCT_EXTERN_(?:REMAP_)?MODULE\s*\(/.test(source)) &&
|
|
708
|
+
// the turbo route compiles a pod's React-registering Objective-C
|
|
709
|
+
// against the one TurboCore; the Expo graph carries no React-Core
|
|
710
|
+
// originals to link it
|
|
711
|
+
!(!file.endsWith('.swift') && registersReactModule(source))
|
|
707
712
|
)
|
|
708
713
|
unit.files[map(file)] =
|
|
709
714
|
bridge && owner.name === unit.namespace && file.endsWith('.swift')
|
|
@@ -209,16 +209,6 @@ export const NATIVE_SEAM_MANIFEST: NativeSeamEntry[] = [
|
|
|
209
209
|
// `requireNativeModule` picks the right one per entry point. a file
|
|
210
210
|
// redirect can only match one layout, so it breaks the versions it was
|
|
211
211
|
// not written for.
|
|
212
|
-
{
|
|
213
|
-
pkg: 'expo-media-library',
|
|
214
|
-
// src/ExpoMediaLibrary.ts — `requireNativeModule('ExpoMediaLibrary')`.
|
|
215
|
-
// seam mirrors upstream's `ExpoMediaLibrary.web.ts` (refuse permissions
|
|
216
|
-
// + expose MediaType/SortBy constants).
|
|
217
|
-
seamBasenames: ['ExpoMediaLibrary'],
|
|
218
|
-
target: seamPath('expo-media-library'),
|
|
219
|
-
notes:
|
|
220
|
-
'expo-modules-core requireNativeModule(ExpoMediaLibrary) — refuses permissions + exposes MediaType/SortBy enums per upstream ExpoMediaLibrary.web.ts',
|
|
221
|
-
},
|
|
222
212
|
{
|
|
223
213
|
pkg: 'expo-image-picker',
|
|
224
214
|
// src/ExponentImagePicker.ts — `requireNativeModule('ExponentImagePicker')`.
|
package/src/swift-compile.ts
CHANGED
|
@@ -77,7 +77,6 @@ import {
|
|
|
77
77
|
clangImportNames,
|
|
78
78
|
clangMacroSetting,
|
|
79
79
|
clangSettingEntries,
|
|
80
|
-
fmtConstantInterpreterFlags,
|
|
81
80
|
withoutGlogModuleMap,
|
|
82
81
|
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
83
82
|
type SwiftPackageTarget,
|
|
@@ -1472,11 +1471,7 @@ const nativeCxxCompilerFlags = ['-fno-cxx-modules']
|
|
|
1472
1471
|
const cFlagArray = (flags: readonly string[]): string =>
|
|
1473
1472
|
JSON.stringify(withoutGlogModuleMap(flags))
|
|
1474
1473
|
const cxxFlagArray = (flags: readonly string[]): string =>
|
|
1475
|
-
JSON.stringify([
|
|
1476
|
-
...nativeCxxCompilerFlags,
|
|
1477
|
-
...fmtConstantInterpreterFlags(flags),
|
|
1478
|
-
...withoutGlogModuleMap(flags),
|
|
1479
|
-
])
|
|
1474
|
+
JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)])
|
|
1480
1475
|
|
|
1481
1476
|
interface SwiftNativeTargetPlan {
|
|
1482
1477
|
path: string
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
SWIFT_NATIVE_SOURCE_EXTENSIONS,
|
|
25
25
|
swiftTargetModuleName,
|
|
26
26
|
} from './swift-package'
|
|
27
|
-
import { fmtConstantInterpreterFlags } from './swift-package'
|
|
28
27
|
import { swiftPackageManifest, swiftTargetFiles } from './swift-package-manifest'
|
|
29
28
|
import { remoteSwiftCheckouts, type SwiftPackageBinary } from './swift-packages'
|
|
30
29
|
import { readPackageFile, relativeInside } from './swift-source-file'
|
|
@@ -1551,9 +1550,6 @@ export async function prepareXcodeObjCImplementations(
|
|
|
1551
1550
|
...(objc ? [...swiftObjCRuntimeFlags, '-fobjc-exceptions'] : []),
|
|
1552
1551
|
...objcSdkIntakeFlags(headers, toolchain.toolchainBin, minimum),
|
|
1553
1552
|
...headerSearch.flags[index]!,
|
|
1554
|
-
...(cxx
|
|
1555
|
-
? fmtConstantInterpreterFlags([...flags, ...headerSearch.flags[index]!])
|
|
1556
|
-
: []),
|
|
1557
1553
|
...target.includes.flatMap((include) => ['-I', staged(include)]),
|
|
1558
1554
|
...target.frameworks.flatMap((framework) => ['-F', staged(framework)]),
|
|
1559
1555
|
...moduleMaps[index]!,
|
package/src/swift-package.ts
CHANGED
|
@@ -355,15 +355,6 @@ export type SwiftClangSetting = { tool: 'c' | 'cxx' } & (
|
|
|
355
355
|
// -fno-cxx-modules and fails with "import of module appears within namespace".
|
|
356
356
|
// apple clang leaves the map inert there, and swiftpm hands c settings to c++
|
|
357
357
|
// units too, so no clang settings carry it.
|
|
358
|
-
// this clang's default constant evaluator rejects fmt 11's checked format
|
|
359
|
-
// strings at c++20 ("consteval ... not a constant expression"); the new
|
|
360
|
-
// interpreter accepts them as apple clang does, but it crashes clang on other
|
|
361
|
-
// sources (jsi.cpp), so only units that see fmt headers take it.
|
|
362
|
-
export const fmtConstantInterpreterFlags = (flags: readonly string[]): string[] =>
|
|
363
|
-
flags.some((flag) => flag.includes('/fmt/'))
|
|
364
|
-
? ['-fexperimental-new-constant-interpreter']
|
|
365
|
-
: []
|
|
366
|
-
|
|
367
358
|
export const withoutGlogModuleMap = (flags: readonly string[]): string[] =>
|
|
368
359
|
flags.filter(
|
|
369
360
|
(flag) =>
|
package/src/turbo-source.ts
CHANGED
|
@@ -25,6 +25,7 @@ function codegenSpecRoot(codegen: string): string {
|
|
|
25
25
|
return fs.existsSync(nested) ? nested : codegen
|
|
26
26
|
}
|
|
27
27
|
import { peachAnsweredNativePackages } from './answeredNativePackages'
|
|
28
|
+
import { expoAutolinkedPods } from './expo-autolinking'
|
|
28
29
|
import {
|
|
29
30
|
glogSources,
|
|
30
31
|
nitroDependencyIncludes,
|
|
@@ -59,6 +60,10 @@ export interface TurboProvider {
|
|
|
59
60
|
name: string
|
|
60
61
|
root: string
|
|
61
62
|
podspecPath: string
|
|
63
|
+
/** the pod depends on a Swift pod (an Expo module), whose Swift stays on the
|
|
64
|
+
* Expo route: only its Objective-C units that register with React Native
|
|
65
|
+
* compile here, against the one TurboCore. */
|
|
66
|
+
reactModulesOnly?: true
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export interface TurboInstalledSources {
|
|
@@ -122,6 +127,15 @@ const OBJC_BRIDGE = /\b(?:RCT_EXPORT_MODULE|RCT_EXPORT_MODULE_NO_LOAD)\s*\(/
|
|
|
122
127
|
// the macros whose +load registers the class with RCTRegisterModule
|
|
123
128
|
const OBJC_REGISTERED = /\bRCT_EXPORT_MODULE\s*\(|\bRCT_EXTERN(?:_REMAP)?_MODULE\s*\(/
|
|
124
129
|
|
|
130
|
+
/** an Objective-C unit that registers with React Native (`RCT_EXPORT_MODULE`)
|
|
131
|
+
* and takes nothing from its pod's generated Swift header. Of a pod that mixes
|
|
132
|
+
* an Expo Swift module with such classes, these units compile in TurboCore
|
|
133
|
+
* beside the one React-Core; the Expo route leaves them out. */
|
|
134
|
+
export function registersReactModule(source: string): boolean {
|
|
135
|
+
const stripped = stripComments(source)
|
|
136
|
+
return OBJC_BRIDGE.test(stripped) && !/-Swift\.h\b/.test(stripped)
|
|
137
|
+
}
|
|
138
|
+
|
|
125
139
|
function fabricComponents(root: string): boolean {
|
|
126
140
|
const manifest: unknown = JSON.parse(
|
|
127
141
|
fs.readFileSync(path.join(root, 'package.json'), 'utf8'),
|
|
@@ -599,6 +613,7 @@ async function resolveExternalTurboPod(
|
|
|
599
613
|
type Pod = {
|
|
600
614
|
appRoot: string
|
|
601
615
|
root: string
|
|
616
|
+
packageRoot: string
|
|
602
617
|
file: string
|
|
603
618
|
directory: string
|
|
604
619
|
text: string
|
|
@@ -612,12 +627,16 @@ function readPod(
|
|
|
612
627
|
installed?: TurboInstalledPod,
|
|
613
628
|
): Pod {
|
|
614
629
|
const originalRoot = fs.realpathSync(provider.root)
|
|
615
|
-
|
|
630
|
+
// an installed pod's root is its podspec's own directory
|
|
631
|
+
const relative = installed
|
|
632
|
+
? path.basename(provider.podspecPath)
|
|
633
|
+
: path.relative(originalRoot, fs.realpathSync(provider.podspecPath))
|
|
616
634
|
const root = installed?.root ?? originalRoot
|
|
617
635
|
const podspec = path.join(root, relative)
|
|
618
636
|
return {
|
|
619
637
|
appRoot,
|
|
620
638
|
root,
|
|
639
|
+
packageRoot: originalRoot,
|
|
621
640
|
file: podspec,
|
|
622
641
|
// CocoaPods resolves every glob against the podspec's own directory
|
|
623
642
|
directory: path.relative(root, path.dirname(podspec)).split(path.sep).join('/'),
|
|
@@ -898,7 +917,13 @@ export async function discoverTurboProviders(
|
|
|
898
917
|
): Promise<TurboProvider[]> {
|
|
899
918
|
const providers: TurboProvider[] = []
|
|
900
919
|
const candidates: { provider: TurboProvider; fabric: boolean }[] = []
|
|
901
|
-
|
|
920
|
+
const autolinked = await iosAutolinkedDependencies(appRoot)
|
|
921
|
+
// the React Native autolinker leaves out Expo modules, whose Objective-C
|
|
922
|
+
// can still register with React Native
|
|
923
|
+
const expoPods = (await expoAutolinkedPods(appRoot)).filter(
|
|
924
|
+
(pod) => !autolinked.some((linked) => linked.root === pod.root),
|
|
925
|
+
)
|
|
926
|
+
for (const { name, root, podspecPath } of [...autolinked, ...expoPods]) {
|
|
902
927
|
// a package peach-compat answers keeps its answer, Fabric views included.
|
|
903
928
|
if (peachAnsweredNativePackages().has(name)) continue
|
|
904
929
|
// a pod can register Nitro objects and Fabric components independently.
|
|
@@ -927,8 +952,24 @@ export async function discoverTurboProviders(
|
|
|
927
952
|
resolveExternalTurboPod(dep.name, dep.requirements, dep.subspecs),
|
|
928
953
|
),
|
|
929
954
|
)
|
|
930
|
-
|
|
955
|
+
// an Expo module's own Swift runs on the Expo route
|
|
956
|
+
const swiftPod =
|
|
957
|
+
expoPods.some((expo) => expo.name === provider.name) &&
|
|
958
|
+
files?.some((file) => file.endsWith('.swift'))
|
|
959
|
+
if (
|
|
960
|
+
!swiftPod &&
|
|
961
|
+
!dependencies.some((dep) => dep?.files.some((file) => file.endsWith('.swift')))
|
|
962
|
+
)
|
|
931
963
|
providers.push(provider)
|
|
964
|
+
else if (
|
|
965
|
+
!fabric &&
|
|
966
|
+
files?.some(
|
|
967
|
+
(file) =>
|
|
968
|
+
OBJC.test(file) &&
|
|
969
|
+
registersReactModule(fs.readFileSync(path.join(root, file), 'utf8')),
|
|
970
|
+
)
|
|
971
|
+
)
|
|
972
|
+
providers.push({ ...provider, reactModulesOnly: true })
|
|
932
973
|
}
|
|
933
974
|
}
|
|
934
975
|
return providers
|
|
@@ -1001,7 +1042,7 @@ export async function collectTurboSources(options: {
|
|
|
1001
1042
|
const installedCodegenNames = new Set(
|
|
1002
1043
|
installedHeaderPods.flatMap((pod) => {
|
|
1003
1044
|
const manifest: unknown = JSON.parse(
|
|
1004
|
-
fs.readFileSync(path.join(pod.
|
|
1045
|
+
fs.readFileSync(path.join(pod.packageRoot, 'package.json'), 'utf8'),
|
|
1005
1046
|
)
|
|
1006
1047
|
if (!object(manifest) || !object(manifest.codegenConfig)) return []
|
|
1007
1048
|
const config = manifest.codegenConfig
|
|
@@ -1536,14 +1577,20 @@ export async function collectTurboSources(options: {
|
|
|
1536
1577
|
{ tool: 'cxx', flags: pod.installed.preprocessorFlags.cxx },
|
|
1537
1578
|
]
|
|
1538
1579
|
const root = pod.root
|
|
1539
|
-
fabric ||= fabricComponents(root)
|
|
1580
|
+
fabric ||= fabricComponents(provider.root)
|
|
1540
1581
|
if (pod.installed?.library) {
|
|
1541
1582
|
result.libraries ??= {}
|
|
1542
1583
|
result.libraries[targetName] = fs
|
|
1543
1584
|
.readFileSync(pod.installed.library)
|
|
1544
1585
|
.toString('base64')
|
|
1545
1586
|
}
|
|
1546
|
-
const files = podFiles(pod)
|
|
1587
|
+
const files = podFiles(pod).filter(
|
|
1588
|
+
(file) =>
|
|
1589
|
+
!provider.reactModulesOnly ||
|
|
1590
|
+
HEADER.test(file) ||
|
|
1591
|
+
(OBJC.test(file) &&
|
|
1592
|
+
registersReactModule(fs.readFileSync(path.join(root, file), 'utf8'))),
|
|
1593
|
+
)
|
|
1547
1594
|
const managers = viewManagers(root, files)
|
|
1548
1595
|
const headers = new Map<string, { label: string; root: string; relative: string }>()
|
|
1549
1596
|
podHeaders.set(targetName, {
|
|
@@ -1586,7 +1633,7 @@ export async function collectTurboSources(options: {
|
|
|
1586
1633
|
for (const [name, relative] of pod.installed?.mappedHeaders ?? [])
|
|
1587
1634
|
header([name], { label, root, relative })
|
|
1588
1635
|
const manifest: unknown = JSON.parse(
|
|
1589
|
-
fs.readFileSync(path.join(root, 'package.json'), 'utf8'),
|
|
1636
|
+
fs.readFileSync(path.join(provider.root, 'package.json'), 'utf8'),
|
|
1590
1637
|
)
|
|
1591
1638
|
const codegenConfig =
|
|
1592
1639
|
object(manifest) && object(manifest.codegenConfig) ? manifest.codegenConfig : null
|
|
@@ -1681,6 +1728,8 @@ export async function collectTurboSources(options: {
|
|
|
1681
1728
|
}
|
|
1682
1729
|
: await resolveExternalTurboPod(dep.name, dep.requirements, dep.subspecs)
|
|
1683
1730
|
if (!resolved) continue
|
|
1731
|
+
if (provider.reactModulesOnly && resolved.files.some((f) => f.endsWith('.swift')))
|
|
1732
|
+
continue
|
|
1684
1733
|
externalDefines.push(...resolved.defines)
|
|
1685
1734
|
const mappings = installed ? podHeaderMappings(installed) : []
|
|
1686
1735
|
const swiftFilesForDep: string[] = []
|
|
@@ -1799,7 +1848,7 @@ export async function collectTurboSources(options: {
|
|
|
1799
1848
|
].join('\n'),
|
|
1800
1849
|
)
|
|
1801
1850
|
}
|
|
1802
|
-
if (loads.length === 0 && !registers(root, files) && !fabricComponents(root))
|
|
1851
|
+
if (loads.length === 0 && !registers(root, files) && !fabricComponents(provider.root))
|
|
1803
1852
|
throw new Error(`${label}: its pod sources register no TurboModule`)
|
|
1804
1853
|
objc ||= providerObjC
|
|
1805
1854
|
if (codegenConfig && codegenConfig.includesGeneratedCode !== true) {
|
|
@@ -2428,6 +2477,51 @@ static BOOL peachIdleTimerDisabled = NO;
|
|
|
2428
2477
|
RCT_EXPORT_MODULE()
|
|
2429
2478
|
@end
|
|
2430
2479
|
|
|
2480
|
+
// the host's image url loads, answered as RCTImageLoader answers them: the
|
|
2481
|
+
// first registered RCTImageURLLoader module that claims the url loads it, and
|
|
2482
|
+
// the image reaches the host encoded as PNG.
|
|
2483
|
+
@protocol PeachImageURLLoader <NSObject>
|
|
2484
|
+
- (BOOL)canLoadImageURL:(NSURL *)requestURL;
|
|
2485
|
+
- (dispatch_block_t)loadImageForURL:(NSURL *)imageURL
|
|
2486
|
+
size:(CGSize)size
|
|
2487
|
+
scale:(CGFloat)scale
|
|
2488
|
+
resizeMode:(NSInteger)resizeMode
|
|
2489
|
+
progressHandler:(void (^)(int64_t progress, int64_t total))progressHandler
|
|
2490
|
+
partialLoadHandler:(void (^)(UIImage *image))partialLoadHandler
|
|
2491
|
+
completionHandler:(void (^)(NSError *error, UIImage *image))completionHandler;
|
|
2492
|
+
@end
|
|
2493
|
+
|
|
2494
|
+
@interface PeachImageURLLoading : NSObject <RCTBridgeModule>
|
|
2495
|
+
@end
|
|
2496
|
+
|
|
2497
|
+
@implementation PeachImageURLLoading
|
|
2498
|
+
RCT_EXPORT_MODULE()
|
|
2499
|
+
RCT_EXPORT_METHOD(load:(NSString *)uri
|
|
2500
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
2501
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
2502
|
+
{
|
|
2503
|
+
NSURL *url = [NSURL URLWithString:uri];
|
|
2504
|
+
for (Class moduleClass in RCTGetModuleClasses()) {
|
|
2505
|
+
if (![moduleClass instancesRespondToSelector:@selector(canLoadImageURL:)]) continue;
|
|
2506
|
+
id<PeachImageURLLoader> loader = [moduleClass new];
|
|
2507
|
+
if (![loader canLoadImageURL:url]) continue;
|
|
2508
|
+
[loader loadImageForURL:url
|
|
2509
|
+
size:CGSizeZero
|
|
2510
|
+
scale:1
|
|
2511
|
+
resizeMode:0
|
|
2512
|
+
progressHandler:nil
|
|
2513
|
+
partialLoadHandler:nil
|
|
2514
|
+
completionHandler:^(NSError *error, UIImage *image) {
|
|
2515
|
+
NSData *png = image ? UIImagePNGRepresentation(image) : nil;
|
|
2516
|
+
if (png) resolve([png base64EncodedStringWithOptions:0]);
|
|
2517
|
+
else reject(@"E_IMAGE_LOAD", error.localizedDescription ?: @"image URL loader returned no image", error);
|
|
2518
|
+
}];
|
|
2519
|
+
return;
|
|
2520
|
+
}
|
|
2521
|
+
resolve(nil);
|
|
2522
|
+
}
|
|
2523
|
+
@end
|
|
2524
|
+
|
|
2431
2525
|
@interface RCTTurboModuleManager (PeachTurboLegacy)
|
|
2432
2526
|
- (std::shared_ptr<facebook::react::TurboModule>)provideLegacyModule:(const char *)moduleName;
|
|
2433
2527
|
@end
|
|
@@ -2563,6 +2657,7 @@ extern "C" __attribute__((export_name("peach_turbo_module_names"))) const char*
|
|
|
2563
2657
|
[found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];
|
|
2564
2658
|
for (Class moduleClass in RCTGetModuleClasses())
|
|
2565
2659
|
if (moduleClass != [PeachTurboRegistry class] &&
|
|
2660
|
+
moduleClass != [PeachImageURLLoading class] &&
|
|
2566
2661
|
([moduleClass conformsToProtocol:@protocol(RCTTurboModule)] ||
|
|
2567
2662
|
[moduleClass conformsToProtocol:@protocol(RCTBridgeModule)]))
|
|
2568
2663
|
[found addObject:RCTBridgeModuleNameForClass(moduleClass)];
|