mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
fix: exclude test support from raw fetch guard
This commit is contained in:
@@ -18,8 +18,6 @@ const allowedRawFetchCallsites = new Set([
|
||||
bundledPluginCallsite("bluebubbles", "src/types.ts", 204),
|
||||
bundledPluginCallsite("browser", "src/browser/cdp.helpers.ts", 268),
|
||||
bundledPluginCallsite("browser", "src/browser/client-fetch.ts", 192),
|
||||
bundledPluginCallsite("browser", "src/browser/test-fetch.ts", 24),
|
||||
bundledPluginCallsite("browser", "src/browser/test-fetch.ts", 27),
|
||||
bundledPluginCallsite("chutes", "models.ts", 535),
|
||||
bundledPluginCallsite("chutes", "models.ts", 542),
|
||||
bundledPluginCallsite("discord", "src/monitor/gateway-plugin.ts", 417),
|
||||
@@ -96,6 +94,7 @@ export async function main() {
|
||||
sourceRoots,
|
||||
extraTestSuffixes: [".browser.test.ts", ".node.test.ts"],
|
||||
findCallLines: findRawFetchCallLines,
|
||||
skipRelativePath: (relPath) => relPath.includes("/test-support/"),
|
||||
allowCallsite: (callsite) => allowedRawFetchCallsites.has(callsite),
|
||||
header: "Found raw fetch() usage in channel/plugin runtime sources outside allowlist:",
|
||||
footer: "Use fetchWithSsrFGuard() or existing channel/plugin SDK wrappers for network calls.",
|
||||
|
||||
Reference in New Issue
Block a user