peachsim 0.1.1900 → 0.1.1902
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 +128 -58
- 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 +49 -33
- 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 +135 -66
- 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 +31 -30
- 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 +29 -28
- package/dist-lib/native-app-identity-project.cjs +21 -20
- package/dist-lib/native-app-identity-project.mjs +21 -20
- 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 +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +152 -82
- package/dist-lib/swift-compile.cjs +25 -9
- package/dist-lib/swift-compile.mjs +25 -9
- 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 +3 -3
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +35 -19
- 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/swift-compile.ts +20 -1
- package/src/swift-guest-compile.ts +7 -1
- package/src/swift-guest-link.ts +3 -2
- package/src/swift-toolchain.ts +2 -1
- package/src/turbo-codegen-intake.ts +3 -0
- package/src/turbo-compile.ts +1 -0
- package/src/turbo-source.ts +62 -2
package/src/turbo-source.ts
CHANGED
|
@@ -246,6 +246,7 @@ const REACT_NATIVE_HEADER_DIRS = [
|
|
|
246
246
|
{ from: 'Libraries/TypeSafety', to: 'RCTTypeSafety' },
|
|
247
247
|
{ from: 'Libraries/FBLazyVector/FBLazyVector', to: 'FBLazyVector' },
|
|
248
248
|
{ from: 'ReactApple/RCTSwiftUIWrapper', to: 'RCTSwiftUIWrapper' },
|
|
249
|
+
{ from: 'ReactCommon/hermes/executor', to: 'reacthermes' },
|
|
249
250
|
{
|
|
250
251
|
from: 'ReactApple/Libraries/RCTFoundation/RCTDeprecation/Exported',
|
|
251
252
|
to: 'RCTDeprecation',
|
|
@@ -1031,6 +1032,8 @@ export async function collectTurboSources(options: {
|
|
|
1031
1032
|
providers: TurboProvider[]
|
|
1032
1033
|
codegenDir: string
|
|
1033
1034
|
installedPods?: ReadonlyMap<string, TurboInstalledPod>
|
|
1035
|
+
/** the prepared workspace whose ios/Pods holds installed binary pods' headers */
|
|
1036
|
+
projectRoot: string
|
|
1034
1037
|
}): Promise<TurboSourceCollection> {
|
|
1035
1038
|
if (options.providers.length === 0)
|
|
1036
1039
|
throw new Error('TurboModule compilation needs at least one provider')
|
|
@@ -1403,6 +1406,17 @@ export async function collectTurboSources(options: {
|
|
|
1403
1406
|
)
|
|
1404
1407
|
return
|
|
1405
1408
|
}
|
|
1409
|
+
if (
|
|
1410
|
+
hermesHeaders &&
|
|
1411
|
+
include.startsWith('hermes/') &&
|
|
1412
|
+
fs.existsSync(path.join(hermesHeaders, include))
|
|
1413
|
+
) {
|
|
1414
|
+
alias(
|
|
1415
|
+
`${core}/include/${include}`,
|
|
1416
|
+
original(TURBO_CORE_TARGET, 'hermes-engine', hermesHeaders, include, false),
|
|
1417
|
+
)
|
|
1418
|
+
return
|
|
1419
|
+
}
|
|
1406
1420
|
// a React pod header by its header_dir name; a quoted bare name reaches
|
|
1407
1421
|
// React-Core's through the header map CocoaPods gives its own sources
|
|
1408
1422
|
const nativeReactMaps = pod?.reactHeaderMaps ?? []
|
|
@@ -1577,6 +1591,7 @@ export async function collectTurboSources(options: {
|
|
|
1577
1591
|
let objc = false
|
|
1578
1592
|
let fabric = false
|
|
1579
1593
|
let legacyBridge = false
|
|
1594
|
+
let hermesHeaders: string | null = null
|
|
1580
1595
|
const objcClasses = new Set<string>()
|
|
1581
1596
|
// module classes no macro registers: React Native finds them by name
|
|
1582
1597
|
const unregisteredObjcClasses = new Set<string>()
|
|
@@ -2136,8 +2151,53 @@ export async function collectTurboSources(options: {
|
|
|
2136
2151
|
}
|
|
2137
2152
|
}
|
|
2138
2153
|
if (fabric || legacyBridge) {
|
|
2139
|
-
// React-Core's own compiler_flags select the Hermes executor factory
|
|
2140
|
-
|
|
2154
|
+
// React-Core's own compiler_flags select the Hermes executor factory,
|
|
2155
|
+
// which React-hermes builds against the installed hermes-engine headers.
|
|
2156
|
+
// hermes-engine's binary owns the crash managers' out-of-line
|
|
2157
|
+
// destructors and the runtime factory. a bridgeless app never starts
|
|
2158
|
+
// RCTCxxBridge, so no Hermes runtime is made; an app that starts the
|
|
2159
|
+
// legacy bridge stops at this error.
|
|
2160
|
+
if (!fabric) {
|
|
2161
|
+
result.targets[0]!.cxxDefines = [...defines, 'USE_HERMES=1']
|
|
2162
|
+
hermesHeaders = path.join(
|
|
2163
|
+
options.projectRoot,
|
|
2164
|
+
'ios/Pods/hermes-engine/destroot/include',
|
|
2165
|
+
)
|
|
2166
|
+
if (!fs.existsSync(path.join(hermesHeaders, 'hermes/hermes.h')))
|
|
2167
|
+
throw new Error(
|
|
2168
|
+
`the legacy bridge needs the installed hermes-engine headers in ${hermesHeaders}`,
|
|
2169
|
+
)
|
|
2170
|
+
const runtimeUnit = `${core}/PeachHermesRuntime.cpp`
|
|
2171
|
+
add(
|
|
2172
|
+
runtimeUnit,
|
|
2173
|
+
[
|
|
2174
|
+
'#include <hermes/hermes.h>',
|
|
2175
|
+
'#include <stdexcept>',
|
|
2176
|
+
'',
|
|
2177
|
+
'namespace hermes::vm {',
|
|
2178
|
+
'CrashManager::~CrashManager() = default;',
|
|
2179
|
+
'NopCrashManager::~NopCrashManager() = default;',
|
|
2180
|
+
'} // namespace hermes::vm',
|
|
2181
|
+
'',
|
|
2182
|
+
'namespace facebook::hermes {',
|
|
2183
|
+
'std::unique_ptr<HermesRuntime> makeHermesRuntime(const ::hermes::vm::RuntimeConfig &) {',
|
|
2184
|
+
' throw std::logic_error("no native Hermes runtime in Peach: this app started the legacy bridge");',
|
|
2185
|
+
'}',
|
|
2186
|
+
'} // namespace facebook::hermes',
|
|
2187
|
+
'',
|
|
2188
|
+
].join('\n'),
|
|
2189
|
+
)
|
|
2190
|
+
scanText(
|
|
2191
|
+
{
|
|
2192
|
+
key: runtimeUnit,
|
|
2193
|
+
targetName: TURBO_CORE_TARGET,
|
|
2194
|
+
label: 'peach',
|
|
2195
|
+
root: reactNative.root,
|
|
2196
|
+
relative: 'PeachHermesRuntime.cpp',
|
|
2197
|
+
},
|
|
2198
|
+
result.files[runtimeUnit]!,
|
|
2199
|
+
)
|
|
2200
|
+
}
|
|
2141
2201
|
addPodSources(
|
|
2142
2202
|
installedFabricSources(reactNative.root, { legacyBridge, bridgeOnly: !fabric }),
|
|
2143
2203
|
)
|