add settings configuration parser #78

Merged
jakob.scheid merged 20 commits from feature/settings-config-parser into main 2026-05-29 14:03:15 +02:00
Showing only changes of commit 34a7cb3f2c - Show all commits
@@ -57,10 +57,7 @@ function validateEntry(entry, path) {
assertString(entry.name, `${path}.name`);
assertString(entry.i18n, `${path}.i18n`);
if (entry.default === undefined) {
throw new Error(`[settings] "${path}.default" is required`);
}
if (entry.default !== undefined) {
if (entry.type === 'bool' && typeof entry.default !== 'boolean') {
throw new Error(`[settings] "${path}.default" must be a boolean`);
}
@@ -76,6 +73,7 @@ function validateEntry(entry, path) {
throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`);
}
}
}
}
/**