mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
Add backend and frontend support for NapCat auto-update
Introduces backend API and router for updating NapCat, including update logic and pending update application on startup. Adds frontend integration with update button and request handling. Refactors system info component to remove legacy new version tip. Updates types and runtime to track working environment for update selection. Implements lazy loading for pty in unixTerminal to avoid early initialization.
This commit is contained in:
@@ -12,7 +12,17 @@ import { ArgvOrCommandLine } from '@homebridge/node-pty-prebuilt-multiarch/src/t
|
||||
import { assign } from '@homebridge/node-pty-prebuilt-multiarch/src/utils';
|
||||
import { pty_loader } from './prebuild-loader';
|
||||
import { fileURLToPath } from 'url';
|
||||
export const pty = pty_loader();
|
||||
|
||||
// 懒加载pty,避免在模块导入时立即执行pty_loader()
|
||||
let _pty: any;
|
||||
export const pty: any = new Proxy({}, {
|
||||
get (_target, prop) {
|
||||
if (!_pty) {
|
||||
_pty = pty_loader();
|
||||
}
|
||||
return _pty[prop];
|
||||
}
|
||||
});
|
||||
|
||||
let helperPath: string;
|
||||
helperPath = '../build/Release/spawn-helper';
|
||||
|
||||
Reference in New Issue
Block a user