Skip to content

Commit

Permalink
Update test and remove addon key gen
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Sampaio Queiroga <[email protected]>
  • Loading branch information
Sirherobrine23 committed Jan 24, 2024
1 parent d1bf97a commit 38dca1b
Show file tree
Hide file tree
Showing 11 changed files with 364 additions and 530 deletions.
6 changes: 3 additions & 3 deletions addons/tools/wginterface.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class deleteInterface : public Napi::AsyncWorker {
private:
std::string wgName;
public:
deleteInterface(const Napi::Env env, std::string name): AsyncWorker(env), deletePromise{env}, wgName{name} {}
deleteInterface(const Napi::Env env, std::string name): AsyncWorker(env), wgName{name}, deletePromise{env} {}
~deleteInterface() {}
const Napi::Promise::Deferred deletePromise;

Expand Down Expand Up @@ -163,7 +163,7 @@ class setConfig : public Napi::AsyncWorker {
}

~setConfig() {}
setConfig(const Napi::Env env, std::string name, const Napi::Object &config) : AsyncWorker(env), setPromise{env}, wgName{name} {
setConfig(const Napi::Env env, std::string name, const Napi::Object &config) : AsyncWorker(env), wgName{name}, setPromise{env} {
// Wireguard public key
const auto sppk = config.Get("publicKey");
if (sppk.IsString()) {
Expand Down Expand Up @@ -278,7 +278,7 @@ class getConfig : public Napi::AsyncWorker {
std::map<std::string, Peer> peersVector;
public:
~getConfig() {}
getConfig(const Napi::Env env, std::string name): AsyncWorker(env), getPromise{env}, wgName{name} {}
getConfig(const Napi::Env env, std::string name): AsyncWorker(env), wgName{name}, getPromise{env} {}
const Napi::Promise::Deferred getPromise;

void OnError(const Napi::Error& e) override {
Expand Down
18 changes: 0 additions & 18 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,6 @@
]
},
"targets": [
{
"target_name": "keygen",
"sources": [
"addons/genKey/wgkeys.cpp",
"addons/genKey/key_gen.cpp"
],
"conditions": [
["OS=='mac'", {
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"cflags_cc": [ "-fexceptions" ],
"cflags": [ "-fexceptions" ],
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES"
}
}]
]
},
{
"target_name": "wginterface",
"include_dirs": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wireguard-tools.js",
"version": "1.8.2",
"version": "1.8.3",
"description": "Control your wireguard interface from node.js, not a wireguard-tools/wg wrapper!",
"private": false,
"type": "commonjs",
Expand Down
195 changes: 0 additions & 195 deletions src/experimental/key.ts

This file was deleted.

20 changes: 0 additions & 20 deletions src/experimental/key_test.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * as key_experimental from "./experimental/key";
export * as key from "./key";
export * as wgQuick from "./quick";
export * from "./wginterface";
Expand Down
3 changes: 1 addition & 2 deletions src/index_test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import "./quick_test";
import "./key_test";
import "./experimental/key_test";
import "./key_test";
Loading

0 comments on commit 38dca1b

Please sign in to comment.