收口移动导航响应边界

将 Expo 外链打开、WebView 刷新和受控导航成功响应包装收口到 navigation 模块

让移动 dispatch 只委托导航请求

同步移动壳配置门禁和共享记忆
This commit is contained in:
2026-06-20 01:43:35 +08:00
parent b57998d55e
commit 941e7d979a
4 changed files with 24 additions and 17 deletions
+10 -3
View File
@@ -1952,9 +1952,12 @@ for (const snippet of [
}
if (
!dispatchSource.includes('openMobileHostBridgeExternalUrl(request.payload)') ||
!dispatchSource.includes('openMobileHostBridgeNativePage(navigation, request.payload)') ||
!dispatchSource.includes('reloadMobileHostBridgeWebView(navigation)') ||
!dispatchSource.includes('openMobileHostBridgeExternalUrl(request)') ||
!dispatchSource.includes('openMobileHostBridgeNativePage(request, navigation)') ||
!dispatchSource.includes('reloadMobileHostBridgeWebView(request, navigation)') ||
dispatchSource.includes('ok(request, await openMobileHostBridgeExternalUrl') ||
dispatchSource.includes('ok(request, reloadMobileHostBridgeWebView') ||
dispatchSource.includes('ok(\\n request,\\n openMobileHostBridgeNativePage') ||
dispatchSource.includes("from 'expo-linking'") ||
dispatchSource.includes('Linking.') ||
dispatchSource.includes('openMobileShellExternalNavigation') ||
@@ -1966,13 +1969,17 @@ if (
}
for (const snippet of [
'openMobileHostBridgeExternalUrl',
'request: HostBridgeRequest',
"import * as Linking from 'expo-linking'",
'openMobileShellExternalNavigation(Linking, externalUrlPayload.url)',
'(request.payload as OpenExternalUrlPayload | undefined)?.url',
'normalizeHostBridgeExternalUrlPayload',
'openMobileHostBridgeNativePage',
'(request.payload as NavigateNativePagePayload | undefined)?.url',
'resolveMobileShellWebViewUrl',
'buildMobileShellUrl(webViewUrl, navigation.urlOptions)',
'reloadMobileHostBridgeWebView',
'ok(request, true)',
]) {
if (!hostBridgeNavigationSource.includes(snippet)) {
throw new Error(`mobile shell navigation module is missing ${snippet}`);