clipboardy
Advanced tools
Comparing version 1.1.0 to 1.1.1
20
index.js
@@ -25,9 +25,19 @@ 'use strict'; | ||
const winBinPath = path.join(__dirname, 'fallbacks/win-read.vbs'); | ||
// Binaries from: https://github.com/sindresorhus/win-clipboard | ||
const winReadBinPath = path.join(__dirname, 'fallbacks/win/paste.exe'); | ||
const winWriteBinPath = path.join(__dirname, 'fallbacks/win/copy.exe'); | ||
const win32 = { | ||
copy: opts => execa('clip', [], opts), | ||
paste: opts => execa.stdout('cscript', ['/Nologo', winBinPath], opts), | ||
copySync: opts => execa.sync('clip', opts), | ||
pasteSync: opts => execa.sync('cscript', ['/Nologo', winBinPath], opts) | ||
copy: opts => { | ||
const input = opts.input; | ||
delete opts.input; | ||
return execa(winWriteBinPath, [input], opts); | ||
}, | ||
paste: opts => execa.stdout(winReadBinPath, opts), | ||
copySync: opts => { | ||
const input = opts.input; | ||
delete opts.input; | ||
return execa.sync(winWriteBinPath, [input], opts); | ||
}, | ||
pasteSync: opts => execa.sync(winReadBinPath, opts) | ||
}; | ||
@@ -34,0 +44,0 @@ |
{ | ||
"name": "clipboardy", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Access the system clipboard (copy/paste)", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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 2 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
171915
8
123
3