This commit is contained in:
idranme
2024-09-03 01:04:16 +08:00
parent a7bb55b31c
commit 387c9dcb52
16 changed files with 195 additions and 123 deletions

View File

@@ -11,7 +11,8 @@ import {
NodeIKernelTipOffService,
NodeIKernelSearchService
} from './services'
import os from 'node:os'
import { constants } from 'node:os'
import { Dict } from 'cosmokit'
const Process = require('node:process')
export interface NodeIQQNTWrapperSession {
@@ -72,7 +73,7 @@ const constructor = [
Process.dlopenOrig = Process.dlopen
Process.dlopen = function (module, filename, flags = os.constants.dlopen.RTLD_LAZY) {
Process.dlopen = function (module: Dict, filename: string, flags = constants.dlopen.RTLD_LAZY) {
const dlopenRet = this.dlopenOrig(module, filename, flags)
for (let export_name in module.exports) {
module.exports[export_name] = new Proxy(module.exports[export_name], {