Comparing version 2.9.1 to 2.9.2
20
index.js
@@ -9,3 +9,7 @@ 'use strict'; | ||
const opts = { | ||
windowsHide : true, | ||
}; | ||
var winapiCS = path.join(__dirname, 'WinAPI.exe'); | ||
@@ -16,3 +20,3 @@ try { | ||
console.log(e); | ||
throw Error(sprintf("Compilation of winapi has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'winapi' (missing %s)") ); | ||
throw Error(sprintf("Compilation of winapi has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'winapi' (missing %s)")); | ||
} | ||
@@ -23,3 +27,3 @@ | ||
winapi.GetDisplaySettings = function(chain) { | ||
execFile(winapiCS, ["GetDisplaySettings"], function(err, stdout) { | ||
execFile(winapiCS, ["GetDisplaySettings"], opts, function(err, stdout) { | ||
chain(err, JSON.parse(stdout)); | ||
@@ -33,11 +37,11 @@ }); | ||
winapi.ReOrientDisplay = function(orientation, chain) { | ||
execFile(winapiCS, ["ReOrientDisplay", orientation], {}, chain); | ||
execFile(winapiCS, ["ReOrientDisplay", orientation], opts, chain); | ||
}; | ||
winapi.MaximizeWindow = function(title, chain) { | ||
execFile(winapiCS, ["MaximizeWindow", title], {}, chain); | ||
execFile(winapiCS, ["MaximizeWindow", title], opts, chain); | ||
}; | ||
winapi.MinimizeWindow = function(title, chain) { | ||
execFile(winapiCS, ["MinimizeWindow", title], {}, chain); | ||
execFile(winapiCS, ["MinimizeWindow", title], opts, chain); | ||
}; | ||
@@ -47,11 +51,11 @@ | ||
winapi.HideWindow = function(title, chain) { | ||
execFile(winapiCS, ["HideWindow", title], {}, chain); | ||
execFile(winapiCS, ["HideWindow", title], opts, chain); | ||
}; | ||
winapi.ShowWindow = function(title, chain) { | ||
execFile(winapiCS, ["ShowWindow", title], {}, chain); | ||
execFile(winapiCS, ["ShowWindow", title], opts, chain); | ||
}; | ||
winapi.GetDisplaysList = function(chain) { | ||
execFile(winapiCS, ["GetDisplaysList"], {}, function(err, stdout) { | ||
execFile(winapiCS, ["GetDisplaysList"], opts, function(err, stdout) { | ||
chain(err, JSON.parse(stdout)); | ||
@@ -58,0 +62,0 @@ }); |
{ | ||
"name": "winapi", | ||
"version": "2.9.1", | ||
"version": "2.9.2", | ||
"description": "Misc windows API wrappers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 5 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
55
533898
9