功能(桌面端):增加在线辅助本地缓存
Client Quality Gates / Shared client and Web (push) Has been cancelled
Client Quality Gates / macOS Desktop (push) Has been cancelled

This commit is contained in:
Cheng Zhou
2026-07-08 20:45:08 +08:00
parent b73f23c1eb
commit 76f2d9f22a
20 changed files with 926 additions and 50 deletions
@@ -206,6 +206,7 @@ const verifySourceSafety = async () => {
for (const path of files) {
const source = await readFile(path, "utf8");
const file = relative(rootDir, path);
const isRuntimeFile = file.startsWith("frontend/src/runtime/");
assert(!/[?&](?:token|access_token)=/i.test(source), `${file}: token must not be passed through query parameters.`);
assert(
!/console\.(log|debug|info|warn|error)\s*\([^)]*(?:token|access_token|authorization|bearer)/i.test(source),
@@ -221,6 +222,12 @@ const verifySourceSafety = async () => {
if (source.includes("sendNotification") && file !== "frontend/src/runtime/notifications.ts") {
fail(`${file}: system notifications must be routed through frontend/src/runtime/notifications.ts.`);
}
if (!isRuntimeFile) {
assert(
!/\bindexedDB\b|\bcaches\.open\s*\(|\bCacheStorage\b|\bsqlite\b/i.test(source),
`${file}: local data cache storage must be routed through frontend/src/runtime.`,
);
}
}
};