功能(桌面端):增加在线辅助本地缓存
This commit is contained in:
@@ -31,6 +31,9 @@ for (const path of await walk(sourceDir)) {
|
||||
if (/from\s+["'][^"']*\/runtime\/[^"']+["']/.test(source)) {
|
||||
violations.push(`${file}: import platform behavior through src/runtime/index.ts`);
|
||||
}
|
||||
if (/\bindexedDB\b|\bcaches\.open\s*\(|\bCacheStorage\b|\bsqlite\b/i.test(source)) {
|
||||
violations.push(`${file}: local data cache storage must be routed through src/runtime`);
|
||||
}
|
||||
}
|
||||
|
||||
if (violations.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user