
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@bconnorwhite/exec
Advanced tools
Execute commands while keeping flags easily configurable as an object.
yarn add @bconnorwhite/exec
stdio: "inherit"
exec(command: Command) => ChildProcess | SpawnSyncReturns<Buffer>
type Command = {
command: string;
args?: string | string[];
flags?: Flags;
env?: NodeJS.ProcessEnv;
}
type Flags = {
[flag: string]: string | boolean | string[] | undefined;
}
import exec from "@bconnorwhite/exec";
exec({
command: "babel",
args: ["./src"],
flags: {
"out-dir": "./build",
"config-file": "./babel.config.json",
"watch": true
}
});
// Equivalent of:
// babel ./src --out-dir ./build --config-file ./babel.config.json --watch
execAll(
commands: Command[],
options: Options
) => Promise<(ChildProcess | SpawnSyncReturns<Buffer>)[]>
type Command = {
command: string;
args?: string | string[];
flags?: Flags;
env?: NodeJS.ProcessEnv;
}
type Options = {
env?: NodeJS.ProcessEnv;
parallel?: boolean;
}
import { execAll } from "@bconnorwhite/exec";
execAll([{
command: "babel",
args: ["./src"],
flags: {
"out-dir": "./build",
"config-file": "./babel.config.json",
"watch": true
}
}, {
command: "tsc",
flags: {
"emitDeclarationOnly": true
}
}], {
env: {
NODE_ENV: "development"
},
parallel: false
});
// Equivalent of:
// NODE_ENV=development babel ./src --out-dir ./build --config-file ./babel.config.json --watch && tsc --emitDeclarationOnly
flagsToArray(flags?: Flags) => string[]
type Flags = {
[flag: string]: string | boolean | string[] | undefined;
}
import { flagsToArray } from "@bconnorwhite/exec";
flagsToArray({
"out-dir": "./build",
"config-file": "./babel.config.json",
"watch": true
});
// ["--out-dir", "./build", "--config-file", "./babel.config.json", "--watch"]
FAQs
Execute commands while keeping flags easily configurable as an object
The npm package @bconnorwhite/exec receives a total of 122 weekly downloads. As such, @bconnorwhite/exec popularity was classified as not popular.
We found that @bconnorwhite/exec demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.