Update builder and migrate to ESM #3

Merged
Sirherobrine23 merged 7 commits from ci_zig into main 2024-02-17 16:41:50 +00:00
2 changed files with 3 additions and 113 deletions
Showing only changes of commit 5917c3b8ab - Show all commits

@ -1,110 +0,0 @@
{
"target_defaults": {
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"defines": [
"NAPI_DISABLE_CPP_EXCEPTIONS"
],
"conditions": [
["OS=='win'", {
"defines": [
"_HAS_EXCEPTIONS=1"
],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1
},
},
}],
["OS=='mac'", {
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
},
}],
],
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")"
],
"cflags": [
"-fpermissive",
"-fexceptions",
"-w",
"-fpermissive",
"-fPIC",
"-static"
],
"cflags_cc": [
"-fpermissive",
"-fexceptions",
"-w",
"-fpermissive",
"-fPIC",
"-static"
]
},
"targets": [
{
"target_name": "wginterface",
"include_dirs": [
"addons/genKey",
"addons/tools"
],
"sources": [
"addons/genKey/wgkeys.cpp",
"addons/tools/wginterface.cpp"
],
"conditions": [
["OS=='linux'", {
"defines": [
"LISTDEV",
"GETCONFIG",
"SETCONFIG",
"DELIFACE"
],
"sources": [
"addons/tools/linux/wireguard.c",
"addons/tools/wginterface-linux.cpp"
]
}],
["OS=='mac'", {
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"cflags_cc": [ "-fexceptions" ],
"cflags": [ "-fexceptions" ],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
}
}],
["OS=='win'", {
"include_dirs": [
"addons/tools/win"
],
"defines": [
"ONSTARTADDON",
"LISTDEV",
"GETCONFIG",
"SETCONFIG",
"DELIFACE"
],
"libraries": [
"bcrypt.lib",
"crypt32.lib",
"iphlpapi.lib",
"kernel32.lib",
"ntdll.lib",
"ws2_32.lib",
"setupapi.lib"
],
"sources": [
"addons/tools/wginterface-win.cpp"
]
}],
["OS not in 'linux win'", {
"sources": [
"addons/tools/wginterface-dummy.cpp"
]
}]
]
}
]
}

@ -49,12 +49,12 @@
"postpack": "tsc --build --clean" "postpack": "tsc --build --clean"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.11.0", "@types/node": "^20.11.19",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"dependencies": { "dependencies": {
"node-addon-api": "^7.0.0", "node-addon-api": "^7.1.0",
"node-gyp": "^10.0.1" "rebory": "^0.1.3"
} }
} }