@ladjs/api 14.1.9 → 14.1.11
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 +9 -9
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -61,10 +61,10 @@ class API {
|
|
|
61
61
|
this.logger = _.isPlainObject(this.config.logger)
|
|
62
62
|
? new Cabin(this.config.logger)
|
|
63
63
|
: this.config.logger instanceof Cabin
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
? this.config.logger
|
|
65
|
+
: new Cabin({
|
|
66
|
+
logger: this.config.logger || console
|
|
67
|
+
});
|
|
68
68
|
app.context.logger = this.logger;
|
|
69
69
|
|
|
70
70
|
// Initialize redis
|
|
@@ -72,8 +72,8 @@ class API {
|
|
|
72
72
|
this.config.redis === false
|
|
73
73
|
? false
|
|
74
74
|
: _.isPlainObject(this.config.redis)
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
? new Redis(this.config.redis, this.logger, this.config.redisMonitor)
|
|
76
|
+
: this.config.redis;
|
|
77
77
|
app.context.client = this.client;
|
|
78
78
|
|
|
79
79
|
// Expose passport
|
|
@@ -81,8 +81,8 @@ class API {
|
|
|
81
81
|
this.config.passport === false
|
|
82
82
|
? false
|
|
83
83
|
: _.isPlainObject(this.config.passport)
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
? new Passport(this.config.passport, Users)
|
|
85
|
+
: this.config.passport;
|
|
86
86
|
app.context.passport = this.passport;
|
|
87
87
|
|
|
88
88
|
// Listen for errors emitted by app
|
|
@@ -235,7 +235,7 @@ class API {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
async close() {
|
|
238
|
-
await util.promisify(this.server.close).bind(this.server);
|
|
238
|
+
await util.promisify(this.server.close).bind(this.server)();
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ladjs/api",
|
|
3
3
|
"description": "API server for Lad",
|
|
4
|
-
"version": "14.1.
|
|
4
|
+
"version": "14.1.11",
|
|
5
5
|
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/ladjs/api/issues",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@koa/router": "^12.0.1",
|
|
15
15
|
"@ladjs/i18n": "^8.0.3",
|
|
16
16
|
"@ladjs/koa-simple-ratelimit": "^4.1.1",
|
|
17
|
-
"@ladjs/passport": "^5.0
|
|
17
|
+
"@ladjs/passport": "^5.1.0",
|
|
18
18
|
"@ladjs/redis": "^1.1.1",
|
|
19
19
|
"@ladjs/shared-config": "^9.1.3",
|
|
20
20
|
"@ladjs/store-ip-address": "^0.0.7",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"response-time": "^2.3.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@commitlint/cli": "^
|
|
42
|
-
"@commitlint/config-conventional": "^
|
|
41
|
+
"@commitlint/cli": "^18.4.3",
|
|
42
|
+
"@commitlint/config-conventional": "^18.4.3",
|
|
43
43
|
"ava": "^5.3.1",
|
|
44
44
|
"axe": "^12.2.3",
|
|
45
45
|
"cabin": "^13.2.5",
|
|
46
46
|
"cross-env": "^7.0.3",
|
|
47
|
-
"eslint": "^8.
|
|
47
|
+
"eslint": "^8.52.0",
|
|
48
48
|
"eslint-config-xo-lass": "^2.0.1",
|
|
49
49
|
"fixpack": "^4.0.0",
|
|
50
50
|
"husky": "^8.0.3",
|
|
51
51
|
"ioredis": "^5.3.2",
|
|
52
52
|
"ioredis-mock": "^8.9.0",
|
|
53
|
-
"lint-staged": "^15.0
|
|
53
|
+
"lint-staged": "^15.2.0",
|
|
54
54
|
"mongoose": "6",
|
|
55
55
|
"nyc": "^15.1.0",
|
|
56
56
|
"remark-cli": "11",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"xo": "^0.56.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
|
-
"node": ">=
|
|
62
|
+
"node": ">=18"
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
65
65
|
"index.js"
|