Filters out v8 flags for your Node.js CLIs.
Filters out well-known v8 flags given to your app and spawns new process with v8 flags passed to Node.js and the rest of the args passed to your actual CLI. Basically an extraction of related mocha code.
npm install bin-v8-flags-filter
In JS file specified as
bin in your
const v8FlagsFilter = ;const path = ;const cliPath = path; // Path to your actual CLI file that contains app code.;
path- path to CLI script.
options- an optional object with the following optional keys:
ignore- an array of v8 flags to ignore, i.e. to not filter-out when spawning a new process.
forcedKillDelay- a number of milliseconds after which to send a kill command to the spawned process, only after an interrupt has already been issued. Defaults to
useShutdownMessage- rather than forwarding along interrupt signals to the spawned process, instead forwards a
'shutdown'message to the spawned process.