summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-18 02:24:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-18 02:24:14 +0900
commitb73eb710e42985789c0e029bd982a44be614105e (patch)
treeef2ccc98132bd24627cbf167537bf3d3a6d9277c /src
parentFix (diff)
downloadsharkey-b73eb710e42985789c0e029bd982a44be614105e.tar.gz
sharkey-b73eb710e42985789c0e029bd982a44be614105e.tar.bz2
sharkey-b73eb710e42985789c0e029bd982a44be614105e.zip
Clean up
Diffstat (limited to 'src')
-rw-r--r--src/index.ts4
-rw-r--r--src/utils/lastCommitInfo.ts21
-rw-r--r--src/web/meta.ts13
-rw-r--r--src/web/server.ts1
4 files changed, 1 insertions, 38 deletions
diff --git a/src/index.ts b/src/index.ts
index 5475099aa5..54a86e365f 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -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();
diff --git a/src/utils/lastCommitInfo.ts b/src/utils/lastCommitInfo.ts
deleted file mode 100644
index 9682365dad..0000000000
--- a/src/utils/lastCommitInfo.ts
+++ /dev/null
@@ -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');
- }
- }
-}
diff --git a/src/web/meta.ts b/src/web/meta.ts
deleted file mode 100644
index 41bba8c0bd..0000000000
--- a/src/web/meta.ts
+++ /dev/null
@@ -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}/../../`
- });
-};
diff --git a/src/web/server.ts b/src/web/server.ts
index 70083753b2..baad0f6c67 100644
--- a/src/web/server.ts
+++ b/src/web/server.ts
@@ -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'));