mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Clean up
This commit is contained in:
parent
c3d9c824ea
commit
795336ad6f
@ -87,7 +87,6 @@
|
||||
"express": "4.15.2",
|
||||
"file-type": "4.1.0",
|
||||
"fuckadblock": "3.2.1",
|
||||
"git-last-commit": "0.2.0",
|
||||
"glob": "7.1.1",
|
||||
"gm": "1.23.0",
|
||||
"gulp": "3.9.1",
|
||||
|
@ -13,10 +13,9 @@ import * as cluster from 'cluster';
|
||||
import * as debug from 'debug';
|
||||
import Logger from './utils/logger';
|
||||
import * as chalk from 'chalk';
|
||||
import portUsed = require('tcp-port-used');
|
||||
//import portUsed = require('tcp-port-used');
|
||||
import isRoot = require('is-root');
|
||||
import ProgressBar from './utils/cli/progressbar';
|
||||
import LastCommitInfo from './utils/lastCommitInfo';
|
||||
import EnvironmentInfo from './utils/environmentInfo';
|
||||
import MachineInfo from './utils/machineInfo';
|
||||
import DependencyInfo from './utils/dependencyInfo';
|
||||
@ -98,7 +97,6 @@ async function init() {
|
||||
Logger.info(chalk.bold('Misskey <aoi>'));
|
||||
Logger.info('Initializing...');
|
||||
|
||||
await LastCommitInfo.show();
|
||||
EnvironmentInfo.show();
|
||||
MachineInfo.show();
|
||||
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
|
||||
*/
|
||||
app.get(/\/api:meta/, require('./meta'));
|
||||
app.get(/\/api:url/, require('./service/url-preview'));
|
||||
app.post(/\/api:rss/, require('./service/rss-proxy'));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user