verdaccio
Version:
A lightweight private npm proxy registry
23 lines (22 loc) • 947 B
JavaScript
import { InfoCommand } from "./commands/info.mjs";
import { isVersionValid } from "./utils.mjs";
import { InitCommand } from "./commands/init.mjs";
import { VersionCommand } from "./commands/version.mjs";
import { Cli } from "clipanion";
//#region src/lib/cli/cli.ts
var pkgVersion = "6.9.0";
if (process.getuid && process.getuid() === 0) process.emitWarning(`Verdaccio doesn't need superuser privileges. don't run it under root`);
if (!isVersionValid(process.version)) throw new Error(`Verdaccio requires at least Node.js v22 or higher and you have installed ${process.version},
please upgrade your Node.js distribution`);
var [node, app, ...args] = process.argv;
var cli = new Cli({
binaryLabel: `verdaccio`,
binaryName: `${node} ${app}`,
binaryVersion: pkgVersion
});
cli.register(InfoCommand);
cli.register(InitCommand);
cli.register(VersionCommand);
cli.runExit(args, Cli.defaultContext);
//#endregion
//# sourceMappingURL=cli.mjs.map