Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xan105 committed Jun 21, 2024
1 parent 6db7adb commit ae66d18
Show file tree
Hide file tree
Showing 8 changed files with 784 additions and 9,768 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules/
build/
.nyc_output/
build/
6 changes: 0 additions & 6 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ npm install @xan105/win-verify-trust --build-from-source
```

You will need C/C++ build tools and Python 3.x (node-gyp) to build this module.<br />
🚀 x64 and x86 prebuilt binary provided.
🚀 x86, x64 and arm64 prebuilt binary provided.

API
===
Expand Down
13 changes: 6 additions & 7 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"targets": [{
"target_name": "winVerifyTrust.napi",
"target_name": "winVerifyTrust",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"sources": [
Expand All @@ -15,13 +15,12 @@
"AdditionalOptions": []
}
},
'include_dirs': [
"<!@(node -p \"require('node-addon-api').include\")"
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")"
],
'libraries': [],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
"dependencies": [
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_maybe"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ]
"defines": [ "NODE_ADDON_API_DISABLE_DEPRECATED" ]
}]
}
17 changes: 8 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ found in the LICENSE file in the root directory of this source tree.
*/

import { join, extname } from "node:path";
import { find, load } from "node-gyp-load";
import { dlopen } from "node-gyp-load";
import { exists } from "@xan105/fs";
import { resolve } from "@xan105/fs/path";
import { Failure, errorLookup } from "@xan105/error";
import { isString, isStringNotEmpty, isObjLike } from "@xan105/is";
import { shouldStringNotEmpty, shouldObjLike } from "@xan105/is/assert";
import { shouldWindows, shouldStringNotEmpty, shouldObjLike } from "@xan105/is/assert";

//Load bindings
const bindings = await find({
name: "winVerifyTrust",
dir: join(import.meta.dirname, "../"),
prebuild: true
});
shouldWindows();

//Load bindings
const {
verifySignature,
certificateInfo
} = load(bindings);
} = await dlopen({
name: "winVerifyTrust",
cwd: join(import.meta.dirname, "../")
});

async function shouldValidFile(filePath){

Expand Down
Loading

0 comments on commit ae66d18

Please sign in to comment.