feat: support node test

This commit is contained in:
手瓜一十雪 committed 2025-11-06 10:57:54 +08:00
1 parent eeeaddbb60
commit b1417f9b56
2 files changed
+12

No files matched your search

+6
View File
@@ -43,6 +43,12 @@ export enum NapCatCoreWorkingEnv {
}
export function loadQQWrapper (QQVersion: string): WrapperNodeApi {
if (process.env['NAPCAT_WRAPPER_PATH']) {
const wrapperPath = process.env['NAPCAT_WRAPPER_PATH'];
const nativemodule: { exports: WrapperNodeApi; } = { exports: {} as WrapperNodeApi };
process.dlopen(nativemodule, wrapperPath);
return nativemodule.exports;
}
let appPath;
if (os.platform() === 'darwin') {
appPath = path.resolve(path.dirname(process.execPath), '../Resources/app');