dashboard-core/theme/dbd-soft-ui/utils/updater/npm.js
Jonny_Bro (Nikita) 08275381dc integrate theme
2023-06-19 14:21:58 +05:00

21 lines
No EOL
967 B
JavaScript

const consolePrefix = `${'['.blue}${'dbd-soft-ui'.yellow}${']'.blue} `
async function npmDashCheck() {
await npmThemeCheck();
const latestVersion = checkArray['dist-tags'].latest
const currentVersion = require("../../../../index").version
if (currentVersion < latestVersion) console.log(`${consolePrefix}${'Your version of discord-dashboard is'.cyan} ${'outdated'.red}${'!'.cyan}`);
else console.log(`${consolePrefix}${'Your version of discord-dashboard is'.cyan} ${'up-to-date'.green}${'!'.cyan}`);
}
async function npmThemeCheck() {
const latestVersion = checkArray['dist-tags'].latest
const currentVersion = require("../../package.json").version
if (currentVersion < latestVersion) console.log(`${consolePrefix}${'Your version of dbd-soft-ui is'.cyan} ${'outdated'.red}${'!'.cyan}`);
else console.log(`${consolePrefix}${'Your version of dbd-soft-ui is'.cyan} ${'up-to-date'.green}${'!'.cyan}`);
}
exports.update = async () => {
await npmDashCheck()
}