Socket
Socket
Sign inDemoInstall

safe-execa

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

safe-execa - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

lib/index.d.ts
import execa from 'execa';
export declare function sync(file: string, args?: readonly string[], options?: execa.SyncOptions): execa.ExecaSyncReturnValue;
export default function (file: string, args?: readonly string[], options?: execa.Options): Promise<execa.ExecaReturnValue<string>>;
export default function (file: string, args?: readonly string[], options?: execa.Options): execa.ExecaChildProcess<string>;

@@ -32,23 +32,7 @@ "use strict";

}
async function default_1(file, args, options) {
const fileAbsolutePath = await getCommandAbsolutePath(file, options);
function default_1(file, args, options) {
const fileAbsolutePath = getCommandAbsolutePathSync(file, options);
return execa_1.default(fileAbsolutePath, args, options);
}
exports.default = default_1;
async function getCommandAbsolutePath(file, options) {
var _a, _b;
if (file.includes('\\') || file.includes('/'))
return file;
const path = (_b = (_a = options === null || options === void 0 ? void 0 : options.env) === null || _a === void 0 ? void 0 : _a[path_name_1.default]) !== null && _b !== void 0 ? _b : process.env[path_name_1.default];
const key = JSON.stringify([path, file]);
let fileAbsolutePath = pathCache.get(key);
if (fileAbsolutePath == null) {
fileAbsolutePath = await which_1.default(file, { path });
pathCache.set(key, fileAbsolutePath);
}
if (fileAbsolutePath == null) {
throw new Error(`Couldn't find ${file}`);
}
return fileAbsolutePath;
}
//# sourceMappingURL=index.js.map
{
"name": "safe-execa",
"version": "0.1.0",
"version": "0.1.1",
"description": "Like execa but prevents binary planting attacks on Windows",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc