Clean up
This commit is contained in:
parent
45b2b2b196
commit
b73eb710e4
5 changed files with 1 additions and 39 deletions
|
@ -87,7 +87,6 @@
|
||||||
"express": "4.15.2",
|
"express": "4.15.2",
|
||||||
"file-type": "4.1.0",
|
"file-type": "4.1.0",
|
||||||
"fuckadblock": "3.2.1",
|
"fuckadblock": "3.2.1",
|
||||||
"git-last-commit": "0.2.0",
|
|
||||||
"glob": "7.1.1",
|
"glob": "7.1.1",
|
||||||
"gm": "1.23.0",
|
"gm": "1.23.0",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
|
|
|
@ -13,10 +13,9 @@ import * as cluster from 'cluster';
|
||||||
import * as debug from 'debug';
|
import * as debug from 'debug';
|
||||||
import Logger from './utils/logger';
|
import Logger from './utils/logger';
|
||||||
import * as chalk from 'chalk';
|
import * as chalk from 'chalk';
|
||||||
import portUsed = require('tcp-port-used');
|
//import portUsed = require('tcp-port-used');
|
||||||
import isRoot = require('is-root');
|
import isRoot = require('is-root');
|
||||||
import ProgressBar from './utils/cli/progressbar';
|
import ProgressBar from './utils/cli/progressbar';
|
||||||
import LastCommitInfo from './utils/lastCommitInfo';
|
|
||||||
import EnvironmentInfo from './utils/environmentInfo';
|
import EnvironmentInfo from './utils/environmentInfo';
|
||||||
import MachineInfo from './utils/machineInfo';
|
import MachineInfo from './utils/machineInfo';
|
||||||
import DependencyInfo from './utils/dependencyInfo';
|
import DependencyInfo from './utils/dependencyInfo';
|
||||||
|
@ -98,7 +97,6 @@ async function init() {
|
||||||
Logger.info(chalk.bold('Misskey <aoi>'));
|
Logger.info(chalk.bold('Misskey <aoi>'));
|
||||||
Logger.info('Initializing...');
|
Logger.info('Initializing...');
|
||||||
|
|
||||||
await LastCommitInfo.show();
|
|
||||||
EnvironmentInfo.show();
|
EnvironmentInfo.show();
|
||||||
MachineInfo.show();
|
MachineInfo.show();
|
||||||
new DependencyInfo().showAll();
|
new DependencyInfo().showAll();
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
import Logger from './logger';
|
|
||||||
import * as chalk from 'chalk';
|
|
||||||
import prominence = require('prominence');
|
|
||||||
import git = require('git-last-commit');
|
|
||||||
|
|
||||||
export default class {
|
|
||||||
static async show(): Promise<void> {
|
|
||||||
let logger = new Logger('LastCommit');
|
|
||||||
try {
|
|
||||||
const commit = await prominence(git).getLastCommit();
|
|
||||||
const shortHash: string = commit.shortHash;
|
|
||||||
const hash: string = commit.hash;
|
|
||||||
const commitDate = new Date(parseInt(commit.committedOn, 10) * 1000).toLocaleDateString('ja-JP');
|
|
||||||
const commitTime = new Date(parseInt(commit.committedOn, 10) * 1000).toLocaleTimeString('ja-JP');
|
|
||||||
logger.info(`${shortHash}${chalk.gray(hash.substr(shortHash.length))}`);
|
|
||||||
logger.info(`${commit.subject} ${chalk.green(`(${commitDate} ${commitTime})`)} ${chalk.blue(`<${commit.author.name}>`)}`);
|
|
||||||
} catch (e) {
|
|
||||||
logger.info('No commit information found');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
import * as express from 'express';
|
|
||||||
import git = require('git-last-commit');
|
|
||||||
|
|
||||||
module.exports = async (req: express.Request, res: express.Response) => {
|
|
||||||
// Get commit info
|
|
||||||
git.getLastCommit((err, commit) => {
|
|
||||||
res.send({
|
|
||||||
commit: commit
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
dst: `${__dirname}/../../`
|
|
||||||
});
|
|
||||||
};
|
|
|
@ -47,7 +47,6 @@ app.use('/resources', express.static(`${__dirname}/resources`, {
|
||||||
/**
|
/**
|
||||||
* Common API
|
* Common API
|
||||||
*/
|
*/
|
||||||
app.get(/\/api:meta/, require('./meta'));
|
|
||||||
app.get(/\/api:url/, require('./service/url-preview'));
|
app.get(/\/api:url/, require('./service/url-preview'));
|
||||||
app.post(/\/api:rss/, require('./service/rss-proxy'));
|
app.post(/\/api:rss/, require('./service/rss-proxy'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue