peachsim 0.1.1813 → 0.1.1814
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/README.md +2 -1
- package/cli/cloud-client.ts +5 -4
- package/cli/cloud-session.ts +14 -1
- package/cli/commands/compat.ts +12 -2
- package/cli/commands/control.ts +5 -0
- package/cli/commands/flow.ts +10 -5
- package/cli/commands/inspect/env.ts +3 -2
- package/cli/commands/inspect/wait-selector.ts +30 -9
- 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 +584 -449
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +112 -52
- package/dist-lib/expo-swift-metadata.cjs +1 -17
- package/dist-lib/expo-swift-metadata.mjs +1 -16
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1963 -1891
- package/dist-lib/host/fetch-proxy-handler.cjs +2 -4
- 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 +7 -10
- 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 +4 -6
- package/dist-lib/native-app-identity-project.cjs +3 -3
- package/dist-lib/native-app-identity-project.mjs +6 -6
- 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 +64 -67
- 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 +616 -467
- package/dist-lib/swift-compile.cjs +27 -26
- package/dist-lib/swift-compile.mjs +34 -33
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +5 -3
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +87 -41
- package/dist-lib/vite.cjs +2 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/react-native/host-services.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +14 -2
- package/install.mjs +21 -8
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h +17 -0
- package/sdk/ios/usr/lib/swift/Dispatch.swiftmodule/arm64-apple-ios-simulator.swiftinterface +5 -0
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +6 -0
- package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +10 -1
- package/sdk/ios/usr/lib/swift/SwiftUI.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
- package/sdk/ios/usr/lib/swift/SwiftUICore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +11 -0
- package/sdk/ios/usr/lib/swift/UIKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +13 -0
- package/sdk/ios/wasm/include/string.h +1 -0
- package/src/expo-kotlin-host.ts +69 -35
- package/src/expo-swift-host.ts +45 -9
- package/src/expoSwiftContract.ts +2 -20
- package/src/nitro-adapter.lock.json +235 -235
- package/src/nitro-bundle.ts +2 -8
- package/src/nitro-superset.lock.json +14 -14
- package/src/nitro-superset.ts +2 -3
- package/src/nitroContract.ts +0 -29
- package/src/react-native-bridge-modules.ts +2 -9
- package/src/swift-compile.ts +2 -0
- package/src/swift-distribution.lock.json +8 -8
- package/src/swift-distribution.ts +1 -0
- package/src/swift-icu.ts +21 -27
- package/src/swift-project-user.ts +5 -0
- package/src/swift-shared-sdk.ts +4 -0
- package/src/swift-standins.ts +6 -1
- package/src/swift-submit.ts +2 -1
- package/src/swift-toolchain.ts +5 -2
- package/src/swift-wasm-prune.ts +10 -2
- package/src/turbo-runtime.lock.json +15 -15
- package/src/turbo-source.ts +160 -37
package/src/expo-kotlin-host.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// Expo modules on an Android device: expo's own autolinker selects the
|
|
2
|
+
// Android modules, as its gradle plugin does, and their Kotlin compiles into
|
|
3
|
+
// one Kotlin/Wasm process with the expo-modules-core DSL port. an installed
|
|
4
|
+
// package with a native seam keeps it; one without compiles here.
|
|
4
5
|
import fs from 'node:fs'
|
|
5
6
|
import path from 'node:path'
|
|
7
|
+
import { PEACH_ANSWERED_NATIVE_PACKAGE_NAMES } from '../../peach-compat/src/generated/supported-native-packages'
|
|
6
8
|
import { resolveExpoAndroidAutolinking } from './android-autolinking'
|
|
7
9
|
import {
|
|
8
10
|
androidAppSources,
|
|
@@ -11,7 +13,6 @@ import {
|
|
|
11
13
|
type BridgeSelection,
|
|
12
14
|
} from './android-bridge-packages'
|
|
13
15
|
import { isLoopbackHost } from './backend-origin'
|
|
14
|
-
import { COMPILED_EXPO_NATIVE_PACKAGES } from './expoSwiftContract'
|
|
15
16
|
import { isRecord } from './is-record'
|
|
16
17
|
import { peachKotlinModuleRoot } from './kotlin-module'
|
|
17
18
|
import type { ExpoKotlinCompilationResult } from './expoKotlinContract'
|
|
@@ -19,6 +20,8 @@ import type { IncomingMessage, ServerResponse } from 'node:http'
|
|
|
19
20
|
|
|
20
21
|
export const EXPO_KOTLIN_ROUTE = '/__peach/expo-kotlin'
|
|
21
22
|
|
|
23
|
+
const answeredPackages: ReadonlySet<string> = new Set(PEACH_ANSWERED_NATIVE_PACKAGE_NAMES)
|
|
24
|
+
|
|
22
25
|
export interface ExpoKotlinModules {
|
|
23
26
|
// the registration names Android's ExpoModulesPackageList passes, in order
|
|
24
27
|
modules: { classifier: string; name: string | null }[]
|
|
@@ -27,11 +30,20 @@ export interface ExpoKotlinModules {
|
|
|
27
30
|
bridge: BridgeSelection | null
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
// one autolinked project. an installed package that cannot be hosted, or whose
|
|
34
|
+
// sources fail to compile, is unavailable alone; app-owned projects are not.
|
|
35
|
+
interface ExpoKotlinProject {
|
|
36
|
+
modules: ExpoKotlinModules['modules']
|
|
37
|
+
sources: string[]
|
|
38
|
+
installed: boolean
|
|
39
|
+
unsupported: string | null
|
|
40
|
+
}
|
|
41
|
+
|
|
30
42
|
export async function collectExpoKotlinModules(
|
|
31
43
|
appRoot: string,
|
|
32
|
-
): Promise<
|
|
44
|
+
): Promise<ExpoKotlinProject[] | null> {
|
|
33
45
|
const modules = await resolveExpoAndroidAutolinking(appRoot)
|
|
34
|
-
const result:
|
|
46
|
+
const result: ExpoKotlinProject[] = []
|
|
35
47
|
for (const entry of modules) {
|
|
36
48
|
// plugin-only dependencies have no local Kotlin module project.
|
|
37
49
|
if (entry.projects === undefined) continue
|
|
@@ -45,14 +57,19 @@ export async function collectExpoKotlinModules(
|
|
|
45
57
|
)
|
|
46
58
|
throw new Error('invalid Expo Android project')
|
|
47
59
|
const sourceDir = fs.realpathSync(project.sourceDir)
|
|
48
|
-
|
|
60
|
+
const installed = sourceDir.split(path.sep).includes('node_modules')
|
|
49
61
|
if (
|
|
50
|
-
|
|
51
|
-
(typeof entry.packageName !== 'string' ||
|
|
52
|
-
!COMPILED_EXPO_NATIVE_PACKAGES.android.includes(entry.packageName))
|
|
62
|
+
installed &&
|
|
63
|
+
(typeof entry.packageName !== 'string' || answeredPackages.has(entry.packageName))
|
|
53
64
|
)
|
|
54
65
|
continue
|
|
55
66
|
if (project.modules.length === 0) continue
|
|
67
|
+
const group: ExpoKotlinProject = {
|
|
68
|
+
modules: [],
|
|
69
|
+
sources: [],
|
|
70
|
+
installed,
|
|
71
|
+
unsupported: null,
|
|
72
|
+
}
|
|
56
73
|
for (const module of project.modules) {
|
|
57
74
|
if (
|
|
58
75
|
!isRecord(module) ||
|
|
@@ -63,7 +80,11 @@ export async function collectExpoKotlinModules(
|
|
|
63
80
|
(module.name !== null && typeof module.name !== 'string')
|
|
64
81
|
)
|
|
65
82
|
throw new Error(`${sourceDir}: invalid Expo Android module descriptor`)
|
|
66
|
-
|
|
83
|
+
group.modules.push({ classifier: module.classifier, name: module.name })
|
|
84
|
+
}
|
|
85
|
+
const reject = (reason: string) => {
|
|
86
|
+
if (!installed) throw new Error(reason)
|
|
87
|
+
group.unsupported ??= reason
|
|
67
88
|
}
|
|
68
89
|
const walk = (dir: string) => {
|
|
69
90
|
if (!fs.existsSync(dir)) return
|
|
@@ -71,20 +92,20 @@ export async function collectExpoKotlinModules(
|
|
|
71
92
|
.readdirSync(dir, { withFileTypes: true })
|
|
72
93
|
.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
73
94
|
const file = path.join(dir, child.name)
|
|
74
|
-
if (child.isSymbolicLink())
|
|
75
|
-
|
|
76
|
-
if (child.isDirectory()) walk(file)
|
|
95
|
+
if (child.isSymbolicLink()) reject(`Expo Kotlin source is a symlink: ${file}`)
|
|
96
|
+
else if (child.isDirectory()) walk(file)
|
|
77
97
|
else if (child.name.endsWith('.java'))
|
|
78
|
-
|
|
79
|
-
else if (child.name.endsWith('.kt'))
|
|
98
|
+
reject(`${file}: Java sources in Expo modules are not supported yet`)
|
|
99
|
+
else if (child.name.endsWith('.kt')) group.sources.push(file)
|
|
80
100
|
}
|
|
81
101
|
}
|
|
82
102
|
// the gradle android plugin's default main source sets
|
|
83
103
|
walk(path.join(sourceDir, 'src', 'main', 'java'))
|
|
84
104
|
walk(path.join(sourceDir, 'src', 'main', 'kotlin'))
|
|
105
|
+
result.push(group)
|
|
85
106
|
}
|
|
86
107
|
}
|
|
87
|
-
return result.
|
|
108
|
+
return result.length === 0 ? null : result
|
|
88
109
|
}
|
|
89
110
|
|
|
90
111
|
// the app module's ReactPackage classes the application registers
|
|
@@ -110,10 +131,9 @@ export async function compileExpoKotlinModules(
|
|
|
110
131
|
const expo = await collectExpoKotlinModules(root)
|
|
111
132
|
const selection = await collectBridgePackages(root)
|
|
112
133
|
if (!expo && !selection) return null
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
)
|
|
134
|
+
const namespacesOf = (project: ExpoKotlinProject) =>
|
|
135
|
+
project.modules.map((module) => module.name ?? module.classifier.split('.').pop()!)
|
|
136
|
+
const expoNamespaces = (expo ?? []).flatMap(namespacesOf)
|
|
117
137
|
const { expoKotlinArtifact } = await import('./kotlin-host')
|
|
118
138
|
// a package that cannot be hosted, or whose sources fail to compile, is
|
|
119
139
|
// unavailable alone: the rest of the app's modules still link
|
|
@@ -121,6 +141,7 @@ export async function compileExpoKotlinModules(
|
|
|
121
141
|
entry.modules.map((module) => module.name),
|
|
122
142
|
)
|
|
123
143
|
const failures: ExpoKotlinCompilationResult['failures'] = []
|
|
144
|
+
let projects = expo ?? []
|
|
124
145
|
let hosted = selection?.packages ?? []
|
|
125
146
|
const drop = (dropped: typeof hosted, diagnostic: (entry: BridgePackage) => string) => {
|
|
126
147
|
for (const entry of dropped)
|
|
@@ -128,10 +149,23 @@ export async function compileExpoKotlinModules(
|
|
|
128
149
|
failures.push({ namespace: module.name, diagnostic: diagnostic(entry) })
|
|
129
150
|
hosted = hosted.filter((entry) => !dropped.includes(entry))
|
|
130
151
|
}
|
|
152
|
+
const dropProjects = (
|
|
153
|
+
dropped: ExpoKotlinProject[],
|
|
154
|
+
diagnostic: (project: ExpoKotlinProject) => string,
|
|
155
|
+
) => {
|
|
156
|
+
for (const project of dropped)
|
|
157
|
+
for (const namespace of namespacesOf(project))
|
|
158
|
+
failures.push({ namespace, diagnostic: diagnostic(project) })
|
|
159
|
+
projects = projects.filter((project) => !dropped.includes(project))
|
|
160
|
+
}
|
|
131
161
|
drop(
|
|
132
162
|
hosted.filter((entry) => entry.unsupported !== null),
|
|
133
163
|
(entry) => entry.unsupported!,
|
|
134
164
|
)
|
|
165
|
+
dropProjects(
|
|
166
|
+
projects.filter((project) => project.unsupported !== null),
|
|
167
|
+
(project) => project.unsupported!,
|
|
168
|
+
)
|
|
135
169
|
const result = (module: ExpoKotlinCompilationResult['module']) => ({
|
|
136
170
|
namespaces: [...expoNamespaces, ...bridgeModules],
|
|
137
171
|
module,
|
|
@@ -139,8 +173,12 @@ export async function compileExpoKotlinModules(
|
|
|
139
173
|
bridgeModules,
|
|
140
174
|
})
|
|
141
175
|
for (;;) {
|
|
176
|
+
const modules = projects.flatMap((project) => project.modules)
|
|
142
177
|
const sources = [
|
|
143
|
-
...new Set([
|
|
178
|
+
...new Set([
|
|
179
|
+
...projects.flatMap((project) => project.sources),
|
|
180
|
+
...hosted.flatMap((entry) => entry.sources),
|
|
181
|
+
]),
|
|
144
182
|
]
|
|
145
183
|
if (modules.length === 0 && hosted.length === 0) return result(null)
|
|
146
184
|
try {
|
|
@@ -155,23 +193,19 @@ export async function compileExpoKotlinModules(
|
|
|
155
193
|
// kotlinc names each failing source line; anything else is the host's
|
|
156
194
|
const errors = message.match(/^.+\.kt:\d+:\d+: error:.*$/gm)
|
|
157
195
|
if (!errors) throw error
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
196
|
+
const linesFor = (sources: string[]) =>
|
|
197
|
+
errors.filter((line) => sources.some((source) => line.startsWith(`${source}:`)))
|
|
198
|
+
const broken = hosted.filter((entry) => linesFor(entry.sources).length > 0)
|
|
199
|
+
const brokenProjects = projects.filter(
|
|
200
|
+
(project) => project.installed && linesFor(project.sources).length > 0,
|
|
162
201
|
)
|
|
163
|
-
if (broken.length > 0) {
|
|
164
|
-
drop(broken, (entry) =>
|
|
165
|
-
|
|
166
|
-
.filter((line) =>
|
|
167
|
-
entry.sources.some((source) => line.startsWith(`${source}:`)),
|
|
168
|
-
)
|
|
169
|
-
.join('\n'),
|
|
170
|
-
)
|
|
202
|
+
if (broken.length > 0 || brokenProjects.length > 0) {
|
|
203
|
+
drop(broken, (entry) => linesFor(entry.sources).join('\n'))
|
|
204
|
+
dropProjects(brokenProjects, (project) => linesFor(project.sources).join('\n'))
|
|
171
205
|
continue
|
|
172
206
|
}
|
|
173
207
|
const diagnostic = errors.join('\n')
|
|
174
|
-
|
|
208
|
+
dropProjects(projects, () => diagnostic)
|
|
175
209
|
drop(hosted, () => diagnostic)
|
|
176
210
|
return result(null)
|
|
177
211
|
}
|
package/src/expo-swift-host.ts
CHANGED
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
nativeWorkspaceAvailable,
|
|
25
25
|
prepareExpoNativeWorkspace,
|
|
26
26
|
} from './expo-native-workspace'
|
|
27
|
-
import { COMPILED_EXPO_NATIVE_PACKAGES } from './expoSwiftContract'
|
|
28
27
|
import { PEACH_FORKED_SCRIPT_ENV } from './forked-script-contract'
|
|
29
28
|
import { cacheDir } from './home-paths'
|
|
30
29
|
import { isRecord } from './is-record'
|
|
@@ -1064,12 +1063,11 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1064
1063
|
if (typeof sourceRoot !== 'string')
|
|
1065
1064
|
throw new Error('Expo autolinking entry has no path')
|
|
1066
1065
|
const canonical = fs.realpathSync(sourceRoot)
|
|
1067
|
-
//
|
|
1068
|
-
//
|
|
1066
|
+
// an installed package with a native seam keeps it; one without compiles
|
|
1067
|
+
// through the same autolinker-selected route as app-local modules.
|
|
1069
1068
|
if (
|
|
1070
1069
|
canonical.split(path.sep).includes('node_modules') &&
|
|
1071
|
-
answeredPackages.has(packageName)
|
|
1072
|
-
!COMPILED_EXPO_NATIVE_PACKAGES.ios.includes(packageName)
|
|
1070
|
+
answeredPackages.has(packageName)
|
|
1073
1071
|
)
|
|
1074
1072
|
continue
|
|
1075
1073
|
// the autolinker read these in a child, so the parent can only stamp them
|
|
@@ -1332,6 +1330,35 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1332
1330
|
const podspec = fs.existsSync(ios)
|
|
1333
1331
|
? fs.readdirSync(ios).find((name) => name.endsWith('.podspec'))
|
|
1334
1332
|
: undefined
|
|
1333
|
+
const absentFrameworks: string[] = []
|
|
1334
|
+
if (podspec && !installed) {
|
|
1335
|
+
// the declared paths are read as written; podspec Ruby beyond literal
|
|
1336
|
+
// strings is not evaluated, as with the floor below.
|
|
1337
|
+
const declared = [
|
|
1338
|
+
...fs
|
|
1339
|
+
.readFileSync(path.join(ios, podspec), 'utf8')
|
|
1340
|
+
.matchAll(/\bvendored_frameworks\s*=\s*(\[[^\]]*\]|'[^'\n]*'|"[^"\n]*")/g),
|
|
1341
|
+
].flatMap(([, value]) =>
|
|
1342
|
+
[...value!.matchAll(/'([^'\n]*)'|"([^"\n#]*)"/g)].map(
|
|
1343
|
+
(match) => match[1] ?? match[2]!,
|
|
1344
|
+
),
|
|
1345
|
+
)
|
|
1346
|
+
for (const entry of declared) {
|
|
1347
|
+
const base = path.dirname(path.resolve(ios, entry))
|
|
1348
|
+
const name = new RegExp(
|
|
1349
|
+
`^${path
|
|
1350
|
+
.basename(entry)
|
|
1351
|
+
.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
|
1352
|
+
.replaceAll('*', '[^/]*')}$`,
|
|
1353
|
+
)
|
|
1354
|
+
const found = fs.existsSync(base)
|
|
1355
|
+
? fs.readdirSync(base).filter((child) => name.test(child))
|
|
1356
|
+
: []
|
|
1357
|
+
if (found.length === 0)
|
|
1358
|
+
absentFrameworks.push(path.relative(appRoot, path.resolve(ios, entry)))
|
|
1359
|
+
for (const child of found) frameworks.add(resolveSource(path.join(base, child)))
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1335
1362
|
const podspecFloor = podspec
|
|
1336
1363
|
? /\.platforms\s*=\s*\{\s*:ios\s*=>\s*['"](\d+(?:\.\d+){0,2})['"]/.exec(
|
|
1337
1364
|
fs.readFileSync(path.join(ios, podspec), 'utf8'),
|
|
@@ -1378,6 +1405,7 @@ async function collectExpoSwiftSourcesUncached(
|
|
|
1378
1405
|
reactDelegateHandlers: module.handler ? [module.handler] : [],
|
|
1379
1406
|
files: closure,
|
|
1380
1407
|
frameworks: [...frameworks],
|
|
1408
|
+
...(absentFrameworks.length > 0 ? { absentFrameworks } : {}),
|
|
1381
1409
|
...(podspecFloor
|
|
1382
1410
|
? { nativeTargets: [synthesizedNativeTarget(namespace, podspecFloor)] }
|
|
1383
1411
|
: {}),
|
|
@@ -1907,6 +1935,14 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1907
1935
|
const libraries = new Map<ExpoSwiftSourceUnit, Record<string, string>>()
|
|
1908
1936
|
for (const unit of units) {
|
|
1909
1937
|
signal.throwIfAborted()
|
|
1938
|
+
if (unit.absentFrameworks)
|
|
1939
|
+
gaps.set(
|
|
1940
|
+
unit,
|
|
1941
|
+
unit.absentFrameworks.map(
|
|
1942
|
+
(declared) =>
|
|
1943
|
+
`${unit.namespace}.podspec declares vendored framework ${declared}, which is absent`,
|
|
1944
|
+
),
|
|
1945
|
+
)
|
|
1910
1946
|
if (unit.frameworks.length > 0) {
|
|
1911
1947
|
const provided = new Set(swiftPeachModules(module.root))
|
|
1912
1948
|
const available = swiftAvailableModules(module.root, module.toolchainBin)
|
|
@@ -1995,10 +2031,10 @@ async function compileExpoSwiftModulesTraced(
|
|
|
1995
2031
|
),
|
|
1996
2032
|
)
|
|
1997
2033
|
generations.set(unit, generation)
|
|
1998
|
-
gaps.set(
|
|
1999
|
-
unit,
|
|
2000
|
-
[...built.gaps].map(([name, reason]) => `${name}: no stand-in: ${reason}`),
|
|
2001
|
-
)
|
|
2034
|
+
gaps.set(unit, [
|
|
2035
|
+
...(gaps.get(unit) ?? []),
|
|
2036
|
+
...[...built.gaps].map(([name, reason]) => `${name}: no stand-in: ${reason}`),
|
|
2037
|
+
])
|
|
2002
2038
|
unit.files['Package.swift'] = expoManifest(
|
|
2003
2039
|
unit.files,
|
|
2004
2040
|
generation,
|
package/src/expoSwiftContract.ts
CHANGED
|
@@ -8,26 +8,6 @@ import type {
|
|
|
8
8
|
SwiftResourceBundle,
|
|
9
9
|
} from './swiftContract'
|
|
10
10
|
|
|
11
|
-
// packages with verified compiled coverage; on iOS these also select compiled
|
|
12
|
-
// source over an existing native seam. uncovered installed iOS modules compile
|
|
13
|
-
// from autolinking metadata without an entry here.
|
|
14
|
-
export const COMPILED_EXPO_NATIVE_PACKAGES: Readonly<
|
|
15
|
-
Record<'ios' | 'android', readonly string[]>
|
|
16
|
-
> = {
|
|
17
|
-
ios: [
|
|
18
|
-
'@rnw-community/react-native-screen-chrome',
|
|
19
|
-
'expo-app-intents',
|
|
20
|
-
'expo-battery',
|
|
21
|
-
'expo-device',
|
|
22
|
-
'expo-hinge',
|
|
23
|
-
'expo-location',
|
|
24
|
-
'expo-store-review',
|
|
25
|
-
'expo-updates',
|
|
26
|
-
'expo-web-browser',
|
|
27
|
-
],
|
|
28
|
-
android: [],
|
|
29
|
-
}
|
|
30
|
-
|
|
31
11
|
export interface ExpoSwiftPreparationOptions {
|
|
32
12
|
signal?: AbortSignal
|
|
33
13
|
installedWorkspace?: string
|
|
@@ -46,6 +26,8 @@ export interface ExpoSwiftSourceUnit {
|
|
|
46
26
|
reactDelegateHandlers: string[]
|
|
47
27
|
files: Record<string, string>
|
|
48
28
|
frameworks: string[]
|
|
29
|
+
// vendored_frameworks the module's podspec declares that are not on disk
|
|
30
|
+
absentFrameworks?: string[]
|
|
49
31
|
nativeTargets?: SwiftNativeTarget[]
|
|
50
32
|
headerAliases?: SwiftHeaderAliases
|
|
51
33
|
nativeFiles?: Record<string, string>
|