统一宿主壳目录边界
移动端壳拆分为 host-bridge 与 shell 目录 桌面端 Tauri 拆分为 host_bridge 与 shell Rust 模块 更新三端桥接层结构门禁与配置检查 同步宿主壳方案文档和项目共享决策
This commit is contained in:
@@ -17,25 +17,37 @@ const expectedWechatHostBridgeFiles = [
|
||||
'wechatHostBridgeWebView.js',
|
||||
'wechatHostBridgeWebView.test.js',
|
||||
];
|
||||
const expectedMobileShellFiles = [
|
||||
const expectedMobileHostBridgeFiles = [
|
||||
'mobileHostBridge.test.ts',
|
||||
'mobileHostBridge.ts',
|
||||
];
|
||||
const expectedMobileShellFiles = [
|
||||
'mobileShellDeepLink.test.ts',
|
||||
'mobileShellDeepLink.ts',
|
||||
'mobileShellLifecycle.test.ts',
|
||||
'mobileShellLifecycle.ts',
|
||||
'mobileShellNavigation.test.ts',
|
||||
'mobileShellNavigation.ts',
|
||||
'mobileShellNetwork.test.ts',
|
||||
'mobileShellNetwork.ts',
|
||||
'mobileShellRuntime.ts',
|
||||
'mobileShellSafeArea.test.ts',
|
||||
'mobileShellSafeArea.ts',
|
||||
'mobileShellUrl.test.ts',
|
||||
'mobileShellUrl.ts',
|
||||
'mobileShellWebViewPolicy.test.ts',
|
||||
'mobileShellWebViewPolicy.ts',
|
||||
];
|
||||
const expectedDesktopHostBridgeRustFiles = [
|
||||
'files.rs',
|
||||
'mod.rs',
|
||||
'protocol.rs',
|
||||
'share.rs',
|
||||
];
|
||||
const expectedDesktopShellRustFiles = [
|
||||
'desktop_host_bridge.rs',
|
||||
'desktop_host_bridge_files.rs',
|
||||
'desktop_host_bridge_protocol.rs',
|
||||
'desktop_host_bridge_share.rs',
|
||||
'desktop_shell_tray.rs',
|
||||
'desktop_shell_webview.rs',
|
||||
'main.rs',
|
||||
'mod.rs',
|
||||
'tray.rs',
|
||||
'webview.rs',
|
||||
];
|
||||
const productionShellExtensions = new Set([
|
||||
'.json',
|
||||
@@ -210,11 +222,21 @@ function assertHostBridgeLayerLayout() {
|
||||
}
|
||||
}
|
||||
|
||||
const mobileShellFiles = fs
|
||||
.readdirSync('apps/mobile-shell/src', { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile() && !entry.name.endsWith('.test.ts'))
|
||||
const mobileHostBridgeFiles = fs
|
||||
.readdirSync('apps/mobile-shell/src/host-bridge', { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile())
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
assertSameList(
|
||||
mobileHostBridgeFiles,
|
||||
expectedMobileHostBridgeFiles,
|
||||
'mobile host bridge files',
|
||||
);
|
||||
|
||||
const mobileShellFiles = fs
|
||||
.readdirSync('apps/mobile-shell/src/shell', { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile())
|
||||
.map((entry) => entry.name)
|
||||
.filter((name) => name.startsWith('mobileHostBridge') || name.startsWith('mobileShell'))
|
||||
.sort();
|
||||
assertSameList(
|
||||
mobileShellFiles,
|
||||
@@ -222,11 +244,33 @@ function assertHostBridgeLayerLayout() {
|
||||
'mobile shell bridge files',
|
||||
);
|
||||
|
||||
const desktopShellRustFiles = fs
|
||||
const desktopEntrypointRustFiles = fs
|
||||
.readdirSync('apps/desktop-shell/src-tauri/src', { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile() && entry.name.endsWith('.rs'))
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
assertSameList(
|
||||
desktopEntrypointRustFiles,
|
||||
['main.rs'],
|
||||
'desktop shell entrypoint Rust files',
|
||||
);
|
||||
|
||||
const desktopHostBridgeRustFiles = fs
|
||||
.readdirSync('apps/desktop-shell/src-tauri/src/host_bridge', { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile() && entry.name.endsWith('.rs'))
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
assertSameList(
|
||||
desktopHostBridgeRustFiles,
|
||||
expectedDesktopHostBridgeRustFiles,
|
||||
'desktop host bridge Rust files',
|
||||
);
|
||||
|
||||
const desktopShellRustFiles = fs
|
||||
.readdirSync('apps/desktop-shell/src-tauri/src/shell', { withFileTypes: true })
|
||||
.filter((entry) => entry.isFile() && entry.name.endsWith('.rs'))
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
assertSameList(
|
||||
desktopShellRustFiles,
|
||||
expectedDesktopShellRustFiles,
|
||||
|
||||
Reference in New Issue
Block a user