fix: enforce plugin config schemas (#1272) (thanks @thewilloftheshadow)

Co-authored-by: thewilloftheshadow <thewilloftheshadow@users.noreply.github.com>
This commit is contained in:
Shadowandthewilloftheshadow authored and Peter Steinberger committed 2026-01-20 11:03:17 +00:00
1 parent 48f733e4b3
commit 2f6d5805de
49 files changed
+1817 -377

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
import {
readConfigFileSnapshot,
validateConfigObject,
validateConfigObjectWithPlugins,
writeConfigFile,
} from "../../config/config.js";
import {
@@ -120,7 +120,7 @@ export const handleConfigCommand: CommandHandler = async (params, allowTextComma
reply: { text: `⚙️ No config value found for ${configCommand.path}.` },
};
}
const validated = validateConfigObject(parsedBase);
const validated = validateConfigObjectWithPlugins(parsedBase);
if (!validated.ok) {
const issue = validated.issues[0];
return {
@@ -146,7 +146,7 @@ export const handleConfigCommand: CommandHandler = async (params, allowTextComma
};
}
setConfigValueAtPath(parsedBase, parsedPath.path, configCommand.value);
const validated = validateConfigObject(parsedBase);
const validated = validateConfigObjectWithPlugins(parsedBase);
if (!validated.ok) {
const issue = validated.issues[0];
return {