补齐桌面壳网络与门禁自检
桌面网络 HostBridge 补成功与失败映射单测 桌面壳配置脚本纳入受控脚本与替身词扫描 原生壳文档改用唯一完整路径清单口径 项目记忆同步桌面壳验收边界
This commit is contained in:
@@ -181,6 +181,7 @@ const desktopShellNavigationSource = fs.readFileSync(
|
||||
);
|
||||
const productionSourceRoots = [
|
||||
new URL('../package.json', import.meta.url),
|
||||
new URL('../scripts/', import.meta.url),
|
||||
new URL('../src-tauri/Cargo.toml', import.meta.url),
|
||||
new URL('../src-tauri/Info.plist', import.meta.url),
|
||||
new URL('../src-tauri/build.rs', import.meta.url),
|
||||
@@ -301,6 +302,9 @@ const expectedDesktopShellRustFiles = [
|
||||
'webview.rs',
|
||||
'window_state.rs',
|
||||
];
|
||||
const expectedDesktopShellScripts = [
|
||||
'check-config.mjs',
|
||||
];
|
||||
|
||||
function extractCargoPackageString(source, key) {
|
||||
const match = source.match(new RegExp(`^${key}\\s*=\\s*"([^"]+)"`, 'm'));
|
||||
@@ -576,7 +580,7 @@ function collectProductionSourceFiles(entry) {
|
||||
if (!productionFileExtensions.has(extension)) {
|
||||
return [];
|
||||
}
|
||||
if (path.includes('.test.') || path.endsWith('/scripts/check-config.mjs')) {
|
||||
if (path.includes('.test.')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -1197,6 +1201,11 @@ function readDirectoryFileList(directory, label) {
|
||||
}
|
||||
|
||||
function assertDesktopSourceLayout() {
|
||||
assertSameList(
|
||||
readDirectoryFileList(new URL('../scripts/', import.meta.url), 'desktop shell scripts'),
|
||||
expectedDesktopShellScripts,
|
||||
'desktop shell scripts',
|
||||
);
|
||||
assertSameList(
|
||||
readDirectoryEntryList(rustSourceDir, 'desktop shell Rust root entries'),
|
||||
expectedDesktopRustRootEntries,
|
||||
@@ -2009,11 +2018,19 @@ if (
|
||||
}
|
||||
for (const snippet of [
|
||||
'resolve_desktop_host_bridge_network_status',
|
||||
'map_desktop_host_bridge_network_status_result',
|
||||
'resolve_desktop_host_bridge_network_status_payload',
|
||||
'resolve_desktop_host_bridge_network_status_payload_with',
|
||||
'network_status_unavailable_response',
|
||||
'spawn_blocking(resolve_desktop_network_status)',
|
||||
'spawn_blocking(resolver)',
|
||||
'resolve_desktop_host_bridge_network_status_payload_with(resolve_desktop_network_status)',
|
||||
'"isConnected": true',
|
||||
'"connectionType": "unknown"',
|
||||
'"network status unavailable"',
|
||||
'network_status_unavailable_response_is_stable',
|
||||
'network_status_success_response_reports_contract_shape',
|
||||
'network_status_failure_hides_native_error_detail',
|
||||
'private native resolver detail',
|
||||
]) {
|
||||
if (!desktopHostBridgeNetworkSource.includes(snippet)) {
|
||||
throw new Error(`desktop shell network module is missing ${snippet}`);
|
||||
|
||||
Reference in New Issue
Block a user