judge: fix config def

This commit is contained in:
undefined committed 2025-07-09 02:14:47 +08:00
1 parent 3b86fab35a
commit f53dd455e6
1 file changed
+6 -1
+6 -1
View File
@@ -36,7 +36,12 @@ export const JudgeSettings = Schema.object({
Schema.const('full'), Schema.const('full'),
Schema.const('case'), Schema.const('case'),
Schema.const('none'), Schema.const('none'),
Schema.transform(Schema.boolean(), (v) => (v ? 'full' : 'case')), Schema.transform(Schema.union([
Schema.boolean().deprecated(),
Schema.const('full'),
Schema.const('none'),
Schema.const('case'),
]), (v) => (typeof v === 'boolean' ? (v ? 'full' : 'case') : v)),
]).description('Show diff detail').default('full'), ]).description('Show diff detail').default('full'),
performance: Schema.boolean().description('Performance mode').default(false), performance: Schema.boolean().description('Performance mode').default(false),
}); });