mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-19 21:20:07 +08:00
Moved various helper, event, and utility files from napcat-common to napcat-core/helper for better modularity and separation of concerns. Updated imports across packages to reflect new file locations. Removed unused dependencies from napcat-common and added them to napcat-core where needed. Also consolidated type definitions and cleaned up tsconfig settings for improved compatibility.
23 lines
843 B
TypeScript
23 lines
843 B
TypeScript
import { ConfigBase } from '@/napcat-core/helper/config-base';
|
|
import { NapCatCore } from '@/napcat-core/index';
|
|
import { Type, Static } from '@sinclair/typebox';
|
|
import { AnySchema } from 'ajv';
|
|
|
|
export const NapcatConfigSchema = Type.Object({
|
|
fileLog: Type.Boolean({ default: false }),
|
|
consoleLog: Type.Boolean({ default: true }),
|
|
fileLogLevel: Type.String({ default: 'debug' }),
|
|
consoleLogLevel: Type.String({ default: 'info' }),
|
|
packetBackend: Type.String({ default: 'auto' }),
|
|
packetServer: Type.String({ default: '' }),
|
|
o3HookMode: Type.Number({ default: 0 }),
|
|
});
|
|
|
|
export type NapcatConfig = Static<typeof NapcatConfigSchema>;
|
|
|
|
export class NapCatConfigLoader extends ConfigBase<NapcatConfig> {
|
|
constructor (core: NapCatCore, configPath: string, schema: AnySchema) {
|
|
super('napcat', core, configPath, schema);
|
|
}
|
|
}
|