upgrade to typescript@5.6 and cordis@3.18

This commit is contained in:
undefined committed 2024-10-02 08:33:52 +08:00
1 parent c3953a3ce7
commit 30e95b4511
22 files changed
+52 -46

No files matched your search

+1 -1
View File
@@ -506,7 +506,7 @@ export async function apply(ctx: Context) {
ctx.Route('user_lostpass', '/lostpass', UserLostPassHandler);
ctx.Route('user_lostpass_with_code', '/lostpass/:code', UserLostPassWithCodeHandler);
ctx.Route('user_delete', '/user/delete', UserDeleteHandler, PRIV.PRIV_USER_PROFILE);
ctx.Route('user_detail', '/user/:uid(-?\\d+)', UserDetailHandler);
ctx.Route('user_detail', '/user/:uid', UserDetailHandler);
if (system.get('server.contestmode')) {
ctx.Route('contest_mode', '/contestmode', ContestModeHandler, PRIV.PRIV_EDIT_SYSTEM);
}
+1
View File
@@ -28,6 +28,7 @@ export interface SystemKeys {
'server.url': string,
'server.xff': string,
'server.xhost': string,
'server.host': string,
'server.port': number,
'server.language': string,
'limit.problem_files_max': number,
+1 -1
View File
@@ -246,6 +246,7 @@ SystemSetting(
Setting('setting_server', 'server.upload', '256m', 'text', 'server.upload', 'Max upload file size'),
Setting('setting_server', 'server.cdn', '/', 'text', 'server.cdn', 'CDN Prefix'),
Setting('setting_server', 'server.ws', '/', 'text', 'server.ws', 'WebSocket Prefix'),
Setting('setting_server', 'server.host', '127.0.0.1', 'text', 'server.host', 'Listen host'),
Setting('setting_server', 'server.port', 8888, 'number', 'server.port', 'Server Port'),
Setting('setting_server', 'server.xff', null, 'text', 'server.xff', 'IP Header'),
Setting('setting_server', 'server.xhost', null, 'text', 'server.xhost', 'Hostname Header'),
@@ -312,7 +313,6 @@ export class SettingService extends Service {
SystemSetting = T(SystemSetting);
constructor(ctx: Context) {
super(ctx, 'setting', true);
ctx.mixin('setting', ['PreferenceSetting', 'AccountSetting', 'DomainSetting', 'DomainUserSetting', 'SystemSetting']);
}
get(key: string) {
+1
View File
@@ -138,6 +138,7 @@ export async function apply(ctx: Context) {
cors: system.get('server.cors') || '',
upload: system.get('server.upload') || '256m',
port: argv.options.port || system.get('server.port'),
host: argv.options.host || system.get('server.host'),
xff: system.get('server.xff'),
xhost: system.get('server.xhost'),
});
+3 -2
View File
@@ -49,8 +49,9 @@ export default class Watcher extends Service {
if (process.env.WATCH_ROOT) roots.push(process.env.WATCH_ROOT);
this.watcher = watch(roots, {
...this.config,
ignored: ['node_modules', '.git', 'logs', '.cache', '.yarn']
.map((i) => `**/${i}/**`).concat('**/tsconfig.tsbuildinfo'),
ignored: (file) => [
'node_modules', '.git', 'logs', '.cache', '.yarn', 'tsconfig.tsbuildinfo',
].some((rule) => file.startsWith(`${rule}/`) || file.endsWith(`/${rule}`) || file.includes(`/${rule}/`)),
});
logger.info(`Start watching changes in ${this.root}`);