@ladjs/api 6.0.3 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +11 -2
- package/package.json +23 -23
package/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const process = require('process');
|
|
1
2
|
const http = require('http');
|
|
2
3
|
const https = require('https');
|
|
3
4
|
const util = require('util');
|
|
@@ -191,8 +192,16 @@ class API {
|
|
|
191
192
|
this.close = this.close.bind(this);
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
async listen(
|
|
195
|
-
|
|
195
|
+
async listen(
|
|
196
|
+
port = this.config.port,
|
|
197
|
+
host = this.config.serverHost,
|
|
198
|
+
...args
|
|
199
|
+
) {
|
|
200
|
+
await util.promisify(this.server.listen).bind(this.server)(
|
|
201
|
+
port,
|
|
202
|
+
host,
|
|
203
|
+
...args
|
|
204
|
+
);
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
async close() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ladjs/api",
|
|
3
3
|
"description": "API server for Lad",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.3",
|
|
5
5
|
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
|
|
6
6
|
"ava": {
|
|
7
7
|
"failFast": true,
|
|
@@ -20,50 +20,50 @@
|
|
|
20
20
|
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@koa/router": "^10.
|
|
24
|
-
"@ladjs/i18n": "^7.
|
|
23
|
+
"@koa/router": "^10.1.1",
|
|
24
|
+
"@ladjs/i18n": "^7.2.4",
|
|
25
25
|
"@ladjs/redis": "^1.0.7",
|
|
26
|
-
"@ladjs/shared-config": "^
|
|
26
|
+
"@ladjs/shared-config": "^6.0.0",
|
|
27
27
|
"@ladjs/store-ip-address": "^0.0.7",
|
|
28
|
-
"boolean": "^3.
|
|
28
|
+
"boolean": "^3.1.4",
|
|
29
29
|
"cabin": "^9.0.4",
|
|
30
30
|
"express-request-id": "^1.4.1",
|
|
31
31
|
"kcors": "^2.2.2",
|
|
32
|
-
"koa": "^2.13.
|
|
33
|
-
"koa-404-handler": "^0.0
|
|
32
|
+
"koa": "^2.13.4",
|
|
33
|
+
"koa-404-handler": "^0.1.0",
|
|
34
34
|
"koa-basic-auth": "^4.0.0",
|
|
35
|
-
"koa-better-error-handler": "^7.0.
|
|
35
|
+
"koa-better-error-handler": "^7.0.1",
|
|
36
36
|
"koa-better-timeout": "^0.0.6",
|
|
37
37
|
"koa-bodyparser": "^4.3.0",
|
|
38
|
-
"koa-compress": "^5.0
|
|
38
|
+
"koa-compress": "^5.1.0",
|
|
39
39
|
"koa-conditional-get": "^3.0.0",
|
|
40
40
|
"koa-connect": "^2.1.0",
|
|
41
41
|
"koa-etag": "^4.0.0",
|
|
42
42
|
"koa-json": "^2.0.2",
|
|
43
43
|
"koa-no-trailing-slash": "^2.1.0",
|
|
44
|
-
"koa-simple-ratelimit": "^5.1.
|
|
45
|
-
"lodash": "^4.17.
|
|
46
|
-
"multimatch": "
|
|
44
|
+
"koa-simple-ratelimit": "^5.1.1",
|
|
45
|
+
"lodash": "^4.17.21",
|
|
46
|
+
"multimatch": "5",
|
|
47
47
|
"request-received": "^0.0.3",
|
|
48
48
|
"response-time": "^2.3.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@commitlint/cli": "^
|
|
52
|
-
"@commitlint/config-conventional": "^
|
|
51
|
+
"@commitlint/cli": "^15.0.0",
|
|
52
|
+
"@commitlint/config-conventional": "^15.0.0",
|
|
53
53
|
"ava": "^3.15.0",
|
|
54
|
-
"codecov": "^3.8.
|
|
54
|
+
"codecov": "^3.8.3",
|
|
55
55
|
"cross-env": "^7.0.3",
|
|
56
|
-
"eslint": "^
|
|
57
|
-
"eslint-config-xo-lass": "^1.0.
|
|
56
|
+
"eslint": "^8.3.0",
|
|
57
|
+
"eslint-config-xo-lass": "^1.0.6",
|
|
58
58
|
"fixpack": "^4.0.0",
|
|
59
|
-
"husky": "^
|
|
60
|
-
"lint-staged": "
|
|
61
|
-
"mongoose": "^
|
|
59
|
+
"husky": "^7.0.4",
|
|
60
|
+
"lint-staged": "12.1.2",
|
|
61
|
+
"mongoose": "^6.0.14",
|
|
62
62
|
"nyc": "^15.1.0",
|
|
63
|
-
"remark-cli": "^
|
|
63
|
+
"remark-cli": "^10.0.1",
|
|
64
64
|
"remark-preset-github": "^4.0.1",
|
|
65
|
-
"supertest": "^6.1.
|
|
66
|
-
"xo": "^0.
|
|
65
|
+
"supertest": "^6.1.6",
|
|
66
|
+
"xo": "^0.47.0"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=10.10.0"
|