mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-13 00:10:27 +00:00
fix: zod boolean强制转换
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import { ConfigBase } from '@/common/config-base';
|
||||
import { NapCatCore } from '@/core';
|
||||
import { actionType } from '@/onebot/action/type';
|
||||
import { z } from 'zod';
|
||||
|
||||
export const NapcatConfigSchema = z.object({
|
||||
fileLog: z.coerce.boolean().default(false),
|
||||
consoleLog: z.coerce.boolean().default(true),
|
||||
fileLogLevel: z.coerce.string().default('debug'),
|
||||
consoleLogLevel: z.coerce.string().default('info'),
|
||||
packetBackend: z.coerce.string().default('auto'),
|
||||
packetServer: z.coerce.string().default(''),
|
||||
o3HookMode: z.coerce.number().default(0),
|
||||
fileLog: actionType.boolean().default(false),
|
||||
consoleLog: actionType.boolean().default(true),
|
||||
fileLogLevel: actionType.string().default('debug'),
|
||||
consoleLogLevel: actionType.string().default('info'),
|
||||
packetBackend: actionType.string().default('auto'),
|
||||
packetServer: actionType.string().default(''),
|
||||
o3HookMode: actionType.number().default(0),
|
||||
});
|
||||
|
||||
export type NapcatConfig = z.infer<typeof NapcatConfigSchema>;
|
||||
|
||||
Reference in New Issue
Block a user