archive
/
tstatic
Archived
1
Fork 0

Upgrade dependencies

This commit is contained in:
Jake Howard 2017-07-08 14:18:15 +01:00
parent 53c6c977a8
commit 3e7f956bf6
Signed by: jake
GPG Key ID: 57AFB45680EDD477
3 changed files with 23 additions and 24 deletions

View File

@ -27,30 +27,29 @@
},
"homepage": "https://github.com/RealOrangeOne/tstatic#readme",
"dependencies": {
"basic-auth": "=1.1.0",
"compression": "=1.6.2",
"connect-static-file": "=1.1.2",
"docopt": "=0.6.2",
"express": "=4.15.2",
"compression": "1.6.2",
"connect-static-file": "1.2.0",
"docopt": "0.6.2",
"express": "4.15.3",
"express-basic-auth": "1.0.1",
"express-ip-access-control": "=1.0.5",
"express-winston": "=2.3.0",
"helmet": "=3.6.1",
"opbeat": "=4.12.0",
"open": "=0.0.5",
"serve-index": "=1.8.0",
"winston": "=2.3.1"
"express-ip-access-control": "1.0.5",
"express-winston": "2.4.0",
"helmet": "3.6.1",
"opbeat": "4.14.0",
"open": "0.0.5",
"serve-index": "1.9.0",
"winston": "2.3.1"
},
"devDependencies": {
"chai": "=3.5.0",
"chai-as-promised": "=6.0.0",
"mocha": "=3.2.0",
"node-fetch": "=1.6.3",
"nsp": "=2.6.3",
"supertest": "=3.0.0",
"ts-node": "=2.1.0",
"tslint": "=4.5.1",
"typescript": "=2.2.1",
"typings": "=2.1.0"
"chai": "4.0.2",
"chai-as-promised": "7.1.1",
"mocha": "3.4.2",
"node-fetch": "1.7.1",
"nsp": "2.6.3",
"supertest": "3.0.0",
"ts-node": "3.2.0",
"tslint": "5.5.0",
"typescript": "2.2.1",
"typings": "2.1.0"
}
}

View File

@ -4,7 +4,7 @@ import * as path from 'path';
export default function handle404(serveDir: string) {
const handle404Middleware = staticFile(path.join(serveDir, '.404.html'));
return function (request: Request, response: Response, next: Function) {
return function(request: Request, response: Response, next: () => void) {
response.statusCode = 404;
return handle404Middleware(request, response, next);
};

View File

@ -6,7 +6,7 @@ function isDirectory(url: string): boolean {
return /\/$/.test(url);
}
export function indexHandle(request: express.Request, response: express.Response, next: Function) {
export function indexHandle(request: express.Request, response: express.Response, next: () => void) {
if (isDirectory(request.url)) {
request.url = path.join(request.url, 'index.html');
}