Sorry, the diff of this file is too big to display
+16
-12
@@ -1,22 +0,26 @@ | ||
| const native = require('./build/Release/win32-fun.node') | ||
| // const native = require('./build/Release/win32-fun.node') | ||
| // Will load a compiled build if present or a prebuild. | ||
| // If no build if found it will throw an exception | ||
| const native = require("node-gyp-build")(__dirname); | ||
| // getMemory and getMemorySync | ||
| function check(path, callback) { | ||
| var result = undefined | ||
| var error = undefined | ||
| var result = undefined; | ||
| var error = undefined; | ||
| try { | ||
| result = native.getDiskUsage(path) | ||
| result = native.getDiskUsage(path); | ||
| } catch (error_) { | ||
| error = error_ | ||
| error = error_; | ||
| } | ||
| if (callback) { | ||
| callback(error, result) | ||
| callback(error, result); | ||
| } | ||
| } | ||
| exports.getDiskSpace = function(path, callback) { | ||
| exports.getDiskSpace = function (path, callback) { | ||
| if (callback) { | ||
| return check(path, callback) | ||
| return check(path, callback); | ||
| } | ||
@@ -26,6 +30,6 @@ | ||
| check(path, (err, result) => { | ||
| err ? reject(err) : resolve(result) | ||
| }) | ||
| }) | ||
| } | ||
| err ? reject(err) : resolve(result); | ||
| }); | ||
| }); | ||
| }; | ||
@@ -32,0 +36,0 @@ exports.getDiskSpaceSync = native.getDiskUsage; |
+7
-3
| { | ||
| "name": "win32-fun", | ||
| "version": "1.1.4", | ||
| "version": "1.1.5", | ||
| "description": "disk memory information, put the monitor into sleep mode, wake up the monitor, set volume", | ||
@@ -9,2 +9,4 @@ "repository": "https://github.com/sid-max1996/win32-fun", | ||
| "scripts": { | ||
| "install": "node-gyp-build", | ||
| "prebuild": "prebuildify --napi", | ||
| "build": "node-gyp rebuild", | ||
@@ -16,7 +18,9 @@ "clean": "node-gyp clean" | ||
| "devDependencies": { | ||
| "node-gyp": "^5.0.3" | ||
| "node-gyp": "^9.3.0", | ||
| "prebuildify": "^6.0.1" | ||
| }, | ||
| "dependencies": { | ||
| "node-addon-api": "^1.7.1" | ||
| "node-addon-api": "^1.7.1", | ||
| "node-gyp-build": "^4.8.4" | ||
| } | ||
| } |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
150364
1230.54%16
6.67%61
5.17%2
100%2
100%2
100%+ Added
+ Added