收口原生壳未声明能力覆盖
移动壳测试从共享 HostBridge method 和 iOS capability profile 派生未声明 method 覆盖 原生壳门禁反查 H5 native request 能力统一 helper 门控和移动壳派生测试 架构文档补齐移动端和桌面端 file.importText 能力清单与未声明 method 规则
This commit is contained in:
@@ -987,10 +987,18 @@ function assertH5HostBridgeEventSubscriptionGates() {
|
||||
}
|
||||
|
||||
function assertH5HostBridgePayloadBoundaries() {
|
||||
const sharedContractSource = fs.readFileSync(
|
||||
'packages/shared/src/contracts/hostBridge.ts',
|
||||
'utf8',
|
||||
);
|
||||
const h5HostBridgeSource = fs.readFileSync(
|
||||
'src/services/host-bridge/hostBridge.ts',
|
||||
'utf8',
|
||||
);
|
||||
const nativeRequestCapabilities = extractTsStringArray(
|
||||
sharedContractSource,
|
||||
'HOST_BRIDGE_METHODS',
|
||||
).filter((method) => method !== 'host.getRuntime');
|
||||
|
||||
for (const sharedBoundary of [
|
||||
'HOST_BRIDGE_RUNTIME_REFRESH_TIMEOUT_MS',
|
||||
@@ -1149,11 +1157,7 @@ function assertH5HostBridgePayloadBoundaries() {
|
||||
'H5 HostBridge facade must normalize app.setTitle payloads with the shared title boundary',
|
||||
);
|
||||
}
|
||||
for (const nativeCapability of [
|
||||
'navigation.openNativePage',
|
||||
'auth.requestLogin',
|
||||
'payment.request',
|
||||
]) {
|
||||
for (const nativeCapability of nativeRequestCapabilities) {
|
||||
if (
|
||||
h5HostBridgeSource.includes(
|
||||
`runtime.hostCapabilities.includes('${nativeCapability}')`,
|
||||
|
||||
Reference in New Issue
Block a user