perf: optimize monitor runner, fix SSE leak, deduplicate shared utils
This commit is contained in:
@@ -317,6 +317,10 @@ export function validateQuery(query: unknown, path = ""): ValidationError[] {
|
||||
if (typeof value !== "string") {
|
||||
errors.push({ path: keyPath, message: `${key} expects a string` });
|
||||
}
|
||||
} else if (key === "$consider") {
|
||||
if (value !== "up" && value !== "down") {
|
||||
errors.push({ path: keyPath, message: '$consider must be "up" or "down"' });
|
||||
}
|
||||
} else if (key.startsWith("$")) {
|
||||
// It's an operator inside a field condition — skip validation here
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user