收口宿主运行态回读超时
将原生宿主 runtime 回读短超时提升到共享 HostBridge 契约 让 H5 HostBridge facade 复用共享 runtime 回读超时 增加原生壳门禁拦截本地 runtime 回读超时重声明 补充 runtime 回读测试、壳方案和共享决策记录
This commit is contained in:
@@ -36,6 +36,11 @@ const nativeAppHostBridgePath = new URL(
|
||||
import.meta.url,
|
||||
);
|
||||
const nativeAppHostBridgeSource = fs.readFileSync(nativeAppHostBridgePath, 'utf8');
|
||||
const h5HostBridgePath = new URL(
|
||||
'../../../src/services/host-bridge/hostBridge.ts',
|
||||
import.meta.url,
|
||||
);
|
||||
const h5HostBridgeSource = fs.readFileSync(h5HostBridgePath, 'utf8');
|
||||
const appPath = new URL('../src-tauri/src/app.rs', import.meta.url);
|
||||
const app = fs.readFileSync(appPath, 'utf8');
|
||||
const mainPath = new URL('../src-tauri/src/main.rs', import.meta.url);
|
||||
@@ -1784,6 +1789,12 @@ assertSameList(
|
||||
if (nativeAppHostBridgeSource.includes("'host_bridge_request'")) {
|
||||
throw new Error('H5 native app HostBridge must use HOST_BRIDGE_TAURI_COMMAND');
|
||||
}
|
||||
if (!h5HostBridgeSource.includes('HOST_BRIDGE_RUNTIME_REFRESH_TIMEOUT_MS,')) {
|
||||
throw new Error('H5 HostBridge facade must import shared runtime refresh timeout');
|
||||
}
|
||||
if (h5HostBridgeSource.includes('HOST_RUNTIME_REFRESH_TIMEOUT_MS')) {
|
||||
throw new Error('H5 HostBridge facade must not redeclare runtime refresh timeout');
|
||||
}
|
||||
for (const snippet of [
|
||||
'HOST_BRIDGE_DEFAULT_REQUEST_TIMEOUT_MS',
|
||||
'HOST_BRIDGE_MAX_REQUEST_TIMEOUT_MS',
|
||||
|
||||
Reference in New Issue
Block a user