replace String.random with randomstring

This commit is contained in:
undefined committed 2025-06-30 16:24:35 +08:00
1 parent b18cce3f66
commit 5d7f5fef38
22 files changed
+64 -48

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ import os from 'os';
import path from 'path';
import cac from 'cac';
import Schema from 'schemastery';
import { fs, yaml } from '@hydrooj/utils';
import { fs, randomstring, yaml } from '@hydrooj/utils';
const argv = cac().parse();
@@ -30,7 +30,7 @@ export const JudgeSettings = Schema.object({
rate: Schema.number().default(1),
env: Schema.string().default(defaultEnv),
host: Schema.any(),
secret: Schema.string().description('Judge Token Secret').default(String.random(32)),
secret: Schema.string().description('Judge Token Secret').default(randomstring(32)),
disable: Schema.boolean().description('Disable builtin judge').default(false),
detail: Schema.union([
Schema.const('full'),