Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default async function main() {
const {
HAUL_INSPECTOR,
HAUL_INSPECTOR_PORT,
HAUL_INSPECTOR_HOST,
NODE_INSPECTOR,
} = process.env;
let { haulInspector, nodeInspector } = yargsParser(process.argv);
haulInspector = haulInspector || HAUL_INSPECTOR;
nodeInspector = nodeInspector || NODE_INSPECTOR;
const runtime = new Runtime(
haulInspector || HAUL_INSPECTOR_PORT || HAUL_INSPECTOR_HOST
? new InspectorClient(HAUL_INSPECTOR_HOST, HAUL_INSPECTOR_PORT)
: undefined
);
await runtime.ready(haulInspector === 'wait');
// Experimental
if (nodeInspector) {
const wait = nodeInspector === 'wait';
runtime.nodeInspectorStarted(wait);
const inspector = require('inspector');
inspector.open(undefined, undefined, wait);
}
[
initCommand,
bundleCommand,