mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-04 07:23:22 +02:00
Compare commits
5 commits
21ada132b1
...
4babd17383
Author | SHA1 | Date | |
---|---|---|---|
4babd17383 | |||
b408843ff1 | |||
0f3487c533 | |||
edc6f77c64 | |||
0dd74a93bf |
|
@ -53,13 +53,38 @@ const got = require("got");
|
||||||
const dayjs = require("dayjs");
|
const dayjs = require("dayjs");
|
||||||
const semver = require("semver");
|
const semver = require("semver");
|
||||||
const util = require("util");
|
const util = require("util");
|
||||||
const log = require("../server/log");
|
|
||||||
const packageJson = require("../package.json");
|
const packageJson = require("../package.json");
|
||||||
let token = process.env.CHANGELOG_TOKEN;
|
let token = process.env.CHANGELOG_TOKEN;
|
||||||
|
|
||||||
const readFile = util.promisify(fs.readFile);
|
const readFile = util.promisify(fs.readFile);
|
||||||
const writeFile = util.promisify(fs.writeFile);
|
const writeFile = util.promisify(fs.writeFile);
|
||||||
|
|
||||||
|
function timestamp() {
|
||||||
|
const datetime = new Date().toISOString().split(".")[0].replace("T", " ");
|
||||||
|
|
||||||
|
return colors.dim(datetime);
|
||||||
|
}
|
||||||
|
|
||||||
|
const log = {
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
error(...args) {
|
||||||
|
console.error(timestamp(), colors.red("[ERROR]"), ...args);
|
||||||
|
},
|
||||||
|
warn(...args) {
|
||||||
|
console.error(timestamp(), colors.yellow("[WARN]"), ...args);
|
||||||
|
},
|
||||||
|
info(...args) {
|
||||||
|
console.log(timestamp(), colors.blue("[INFO]"), ...args);
|
||||||
|
},
|
||||||
|
debug(...args) {
|
||||||
|
console.log(timestamp(), colors.green("[DEBUG]"), ...args);
|
||||||
|
},
|
||||||
|
raw(...args) {
|
||||||
|
console.log(...args);
|
||||||
|
},
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
};
|
||||||
|
|
||||||
const changelogPath = path.resolve(__dirname, "..", "CHANGELOG.md");
|
const changelogPath = path.resolve(__dirname, "..", "CHANGELOG.md");
|
||||||
|
|
||||||
// CLI argument validations
|
// CLI argument validations
|
||||||
|
|
|
@ -39,10 +39,12 @@ describe("Server", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
after(function (done) {
|
after(function (done) {
|
||||||
server.close(done);
|
// Tear down test fixtures in the order they were setup,
|
||||||
|
// in case setup crashed for any reason
|
||||||
logInfoStub.restore();
|
logInfoStub.restore();
|
||||||
logWarnStub.restore();
|
logWarnStub.restore();
|
||||||
checkForUpdatesStub.restore();
|
checkForUpdatesStub.restore();
|
||||||
|
server.close(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||||
|
|
Loading…
Reference in a new issue