UNPKG

lerna

Version:

Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository

39 lines (36 loc) 831 B
import { Command, filterProjects, listableFormatProjects, output } from "./chunk-WC2B4V4E.js"; // libs/commands/list/src/index.ts function factory(argv) { return new ListCommand(argv); } var ListCommand = class extends Command { result; get requiresGit() { return false; } async initialize() { const filteredProjects = filterProjects(this.projectGraph, this.execOpts, this.options); this.result = listableFormatProjects(filteredProjects, this.projectGraph, this.options); } execute() { if (this.result?.text.length) { output(this.result.text); } this.logger.success( "found", "%d %s", this.result?.count, this.result?.count === 1 ? "package" : "packages" ); process.stdout.end(() => process.exit(0)); } }; export { factory, ListCommand };