Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function main({ startArgs, args, endArgs, }) {
const version = getVersion();
loudRejection();
handleSignals();
// set global options
commander.version(version, '-v, --version');
commander.usage('[command] [flags]');
commander.option('--verbose', 'output verbose messages on internal operations');
commander.option('--json', 'format Pika log messages as lines of JSON (see jsonlines.org)');
// commander.option('--force', 'install and build packages even if they were built before, overwrite lockfile');
// commander.option('--prod, --production [prod]', '', boolify);
commander.option('--emoji [bool]', 'enable emoji in output', boolify, process.platform === 'darwin' || process.env.TERM_PROGRAM === 'Hyper' || process.env.TERM_PROGRAM === 'HyperTerm');
commander.option('-s, --silent', 'skip Pika console logs, other types of logs (script output) will be printed');
commander.option('--cwd ', 'working directory to use', process.cwd());
commander.option('--no-progress', 'disable progress bar');
commander.option('--no-node-version-check', 'do not warn when using a potentially unsupported Node version');
// if -v is the first command, then always exit after returning the version
if (args[0] === '-v') {
console.log(version.trim());
export async function main({
startArgs,
args,
endArgs,
}: {
startArgs: Array,
args: Array,
endArgs: Array,
}): Promise {
const version = getVersion();
loudRejection();
handleSignals();
// set global options
commander.version(version, '-v, --version');
commander.usage('[command] [flags]');
commander.option('--verbose', 'output verbose messages on internal operations');
commander.option('--json', 'format Pika log messages as lines of JSON (see jsonlines.org)');
// commander.option('--force', 'install and build packages even if they were built before, overwrite lockfile');
// commander.option('--prod, --production [prod]', '', boolify);
commander.option(
'--emoji [bool]',
'enable emoji in output',
boolify,
process.platform === 'darwin' || process.env.TERM_PROGRAM === 'Hyper' || process.env.TERM_PROGRAM === 'HyperTerm',
);
commander.option('-s, --silent', 'skip Pika console logs, other types of logs (script output) will be printed');
export async function main({
startArgs,
args,
endArgs,
}: {
startArgs: Array,
args: Array,
endArgs: Array,
}): Promise {
const collect = (val, acc) => {
acc.push(val);
return acc;
};
loudRejection();
handleSignals();
// set global options
commander.version(version, '-v, --version');
commander.usage('[command] [flags]');
commander.option('--no-default-rc', 'prevent Yarn from automatically detecting yarnrc and npmrc files');
commander.option(
'--use-yarnrc
export default function cli () {
loudRejection()
yargs
.wrap(120)
.usage('Usage: $0 [options]')
.demand(1)
.commandDir('./commands')
.version()
.help()
.strict()
.argv
}