Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
import {Cli} from 'clipanion';
import BuildBundleCommand from './commands/build/bundle';
import BuildPluginCommand from './commands/build/plugin';
import HelpCommand from './commands/help';
import NewPluginCommand from './commands/new/plugin';
const cli = new Cli({
binaryName: `yarn builder`,
});
cli.register(NewPluginCommand);
cli.register(BuildBundleCommand);
cli.register(BuildPluginCommand);
cli.register(HelpCommand);
cli.runExit(process.argv.slice(2), {
stdin: process.stdin,
stdout: process.stdout,
stderr: process.stderr,
});
} catch {}
progress.tick();
}
} catch (error) {
reportedProgress.stop();
throw error;
}
report.reportSeparator();
await reportedProgress;
});
}
}
const cli = new Cli({binaryName: `yarn dlx @yarnpkg/check`});
cli.register(EntryCommand);
cli.runExit(process.argv.slice(2), {
stdin: process.stdin,
stdout: process.stdout,
stderr: process.stderr,
});
async function run(): Promise {
const cli = new Cli({
binaryLabel: `Yarn Package Manager`,
binaryName: `yarn`,
binaryVersion,
});
try {
await exec(cli);
} catch (error) {
process.stdout.write(cli.error(error));
process.exitCode = 1;
}
}