mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
dd05ee3a65
Co-authored-by: Eric Nemchik <eric@nemchik.com> Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
27 lines
641 B
TypeScript
27 lines
641 B
TypeScript
import {Command} from "commander";
|
|
import Utils from "./utils";
|
|
import packageManager from "../plugins/packages";
|
|
import log from "../log";
|
|
|
|
const program = new Command("outdated");
|
|
program
|
|
.description("Check for any outdated packages")
|
|
.on("--help", Utils.extraHelp)
|
|
.action(async () => {
|
|
log.info("Checking for outdated packages");
|
|
|
|
await packageManager
|
|
.outdated(0)
|
|
.then((outdated) => {
|
|
if (outdated) {
|
|
log.info("There are outdated packages");
|
|
} else {
|
|
log.info("No outdated packages");
|
|
}
|
|
})
|
|
.catch(() => {
|
|
log.error("Error finding outdated packages.");
|
|
});
|
|
});
|
|
|
|
export default program;
|