收口原生分享桥接边界
将 Expo 分享目标状态收口到 share 模块 将 Tauri 分享目标与剪贴板 fallback 响应收口到 share 模块 同步两端分享结构门禁和共享记忆
This commit is contained in:
@@ -1285,12 +1285,23 @@ for (const snippet of [
|
||||
'normalizeHostBridgeShareOpenPayload',
|
||||
'const explicitPayload = normalizeHostBridgeShareOpenPayload(payload);',
|
||||
'normalizeHostBridgeShareOpenPayload(currentShareTarget)',
|
||||
'setMobileHostBridgeShareTarget',
|
||||
'resetMobileHostBridgeShareTargetForTest',
|
||||
]) {
|
||||
if (!shareSource.includes(snippet)) {
|
||||
throw new Error(`mobile shell share URL policy missing ${snippet}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!dispatchSource.includes('setMobileHostBridgeShareTarget(request.payload)') ||
|
||||
!dispatchSource.includes('openShare(request.payload)') ||
|
||||
dispatchSource.includes('let currentShareTarget') ||
|
||||
dispatchSource.includes('normalizeHostBridgeShareOpenPayload(currentShareTarget)')
|
||||
) {
|
||||
throw new Error('mobile shell share HostBridge methods must delegate to share module');
|
||||
}
|
||||
|
||||
if (shareSource.includes("const WEB_APP_ORIGIN = 'https://app.genarrative.world'")) {
|
||||
throw new Error('mobile shell share URL policy must reuse the shared web origin');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user