Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'hpal run debug:curl [options]',
'hpal run debug:curl []
'lint-warnings-threshold': 0,
paths: ['test'],
reporter: 'console',
shuffle: false,
silence: false,
'silent-skips': false,
sourcemaps: false,
'context-timeout': 0,
timeout: 2000,
verbose: false
};
const argv = Bossy.parse(definition);
if (argv instanceof Error) {
console.error(Bossy.usage(definition, 'lab [options] [path]'));
console.error('\n' + argv.message);
process.exit(1);
}
if (argv.help) {
console.log(Bossy.usage(definition, 'lab [options] [path]'));
process.exit(0);
}
if (argv.version) {
console.log(Pkg.version);
process.exit(0);
}
const options = Object.assign({}, defaults, internals.rc);
options.paths = argv._ ? [].concat(argv._) : options.paths;
sourcemaps: false,
'context-timeout': 0,
timeout: 2000,
verbose: false
};
const argv = Bossy.parse(definition);
if (argv instanceof Error) {
console.error(Bossy.usage(definition, 'lab [options] [path]'));
console.error('\n' + argv.message);
process.exit(1);
}
if (argv.help) {
console.log(Bossy.usage(definition, 'lab [options] [path]'));
process.exit(0);
}
if (argv.version) {
console.log(Pkg.version);
process.exit(0);
}
const options = Object.assign({}, defaults, internals.rc);
options.paths = argv._ ? [].concat(argv._) : options.paths;
const keys = ['assert', 'bail', 'colors', 'context-timeout', 'coverage', 'coverage-exclude',
'coverage-path', 'coverage-all', 'coverage-flat', 'coverage-module', 'coverage-pattern', 'default-plan-threshold', 'dry', 'environment', 'flat', 'globals', 'grep',
'lint', 'lint-errors-threshold', 'lint-fix', 'lint-options', 'lint-warnings-threshold',
'linter', 'output', 'pattern', 'reporter', 'seed', 'shuffle', 'silence',
'silent-skips', 'sourcemaps', 'threshold', 'timeout', 'transform', 'types', 'types-test', 'verbose'];
module.exports.run = async function (argv, callback) {
const args = Bossy.parse(cliArgs, { argv });
if (args instanceof Error) {
return callback(new Error(Bossy.usage(cliArgs, args.message)));
}
const configFile = args.config;
const globs = args.input;
const ignore = args.ignore;
const fix = args.fix;
const cache = args.cache;
const cwd = args.pwd || process.cwd();
try {
const files = await getFilesToLint({ globs, ignore, cwd });
const result = lintFiles({ configFile, fix, cache, files });
const exitCode = +!!result.errorCount;
const output = formatResults(result);
callback(null, output, exitCode);
const getUsage = () => {
const usage = [
'hpal run debug:routes [options]',
'hpal run debug:routes [options]',
'hpal run debug:routes []