Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
shipit.on('task_err', () => exit(1))
shipit.on('task_not_found', () => exit(1))
shipit.start(runTasks)
}
}
function invoke(env) {
asyncInvoke(env).catch(error => {
setTimeout(() => {
throw error
})
})
}
const cli = new Liftoff({
name: 'shipit',
extensions: interpret.jsVariants,
v8flags,
})
cli.launch(
{
configPath: program.shipitfile,
require: program.require,
},
invoke,
)
const logDir = `${tmpdir()}\dcm`;
const logFileName = `dcm-${new Date().toLocaleString().replace(' ', '_')}`;
program
.version(version)
.description(description)
.logger(logger({ logDir, logFileName }) as any);
export interface DcmConfig {
registry: string;
middleware?: Function;
modifyRollupConfig?: ExtendRollupConfig;
}
const Dcm = new Liftoff({
name: 'dcm',
configName: 'dcmconfig',
extensions: jsVariants
});
export default (argv: string[]) =>
Dcm.prepare({}, env =>
Dcm.execute(env, () => {
const config: DcmConfig = env.configPath ? require(env.configPath).default : undefined;
registerActions(config);
program.logger().info(`You can find the log file in ${logDir}/${logFileName}`);
program.parse(argv);
})
);