q-koa 13.8.49 → 13.8.51
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/core/app.js +2 -2
- package/core/middlewares.js +5 -9
- package/package.json +11 -12
package/core/app.js
CHANGED
|
@@ -1377,9 +1377,9 @@ class APP {
|
|
|
1377
1377
|
if (!_.isObject(item)) return item
|
|
1378
1378
|
return formatLiteralObj(item)
|
|
1379
1379
|
})
|
|
1380
|
-
_where =
|
|
1380
|
+
_where = formatWhere
|
|
1381
1381
|
} else {
|
|
1382
|
-
_where =
|
|
1382
|
+
_where = where
|
|
1383
1383
|
}
|
|
1384
1384
|
|
|
1385
1385
|
// if (util.isObject(where)) {
|
package/core/middlewares.js
CHANGED
|
@@ -6,7 +6,6 @@ const websocket = require('koa-easy-ws')
|
|
|
6
6
|
const ratelimit = require('koa-ratelimit')
|
|
7
7
|
const { userAgent } = require('koa-useragent')
|
|
8
8
|
const staticFiles = require('koa-static')
|
|
9
|
-
const stringify = require('fast-json-stringify')
|
|
10
9
|
const path = require('path')
|
|
11
10
|
|
|
12
11
|
const rootDirectory = process.cwd()
|
|
@@ -49,15 +48,12 @@ exports.miErrors = () => async (ctx, next) => {
|
|
|
49
48
|
exports.miStatic = (config) =>
|
|
50
49
|
staticFiles(path.resolve(__dirname, `${rootDirectory}/${config.dir}`))
|
|
51
50
|
|
|
52
|
-
exports.miSend = () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
return async (ctx, next) => {
|
|
58
|
-
ctx.send = render.bind(ctx)
|
|
59
|
-
await next()
|
|
51
|
+
exports.miSend = () => async (ctx, next) => {
|
|
52
|
+
ctx.send = (json) => {
|
|
53
|
+
ctx.set('Content-Type', 'application/json')
|
|
54
|
+
ctx.body = json
|
|
60
55
|
}
|
|
56
|
+
await next()
|
|
61
57
|
}
|
|
62
58
|
|
|
63
59
|
exports.miResponse = (methods) =>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "q-koa",
|
|
3
|
-
"version": "13.8.
|
|
3
|
+
"version": "13.8.51",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,17 +19,18 @@
|
|
|
19
19
|
"node": ">=17.0.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"alipay-sdk": "^3.2.0",
|
|
23
22
|
"@alicloud/pop-core": "^1.7.9",
|
|
24
23
|
"@sigodenjs/wechatpay": "^2.1.1",
|
|
24
|
+
"adm-zip": "^0.6.0",
|
|
25
25
|
"ali-oss": "^6.11.2",
|
|
26
|
+
"alipay-sdk": "^3.2.0",
|
|
26
27
|
"async-validator": "^3.1.0",
|
|
27
28
|
"axios": "^0.21.1",
|
|
28
29
|
"captchapng": "^0.0.1",
|
|
29
30
|
"chalk": "^3.0.0",
|
|
30
31
|
"cheerio": "^1.0.0-rc.3",
|
|
31
|
-
"fast-json-stringify": "^2.7.9",
|
|
32
32
|
"fast-xml-parser": "^3.19.0",
|
|
33
|
+
"form-data": "^4.0.0",
|
|
33
34
|
"fs-extra": "^8.1.0",
|
|
34
35
|
"js-md5": "^0.7.3",
|
|
35
36
|
"jsonwebtoken": "^8.5.1",
|
|
@@ -46,24 +47,22 @@
|
|
|
46
47
|
"lodash": "^4.17.15",
|
|
47
48
|
"lru-cache": "^11.5.2",
|
|
48
49
|
"mockjs": "^1.0.1-beta3",
|
|
50
|
+
"moment": "^2.30.1",
|
|
49
51
|
"mysql2": "^1.7.0",
|
|
52
|
+
"node-uuid": "^1.4.8",
|
|
50
53
|
"nodemailer": "^6.4.2",
|
|
51
54
|
"ora": "^4.0.3",
|
|
55
|
+
"pm2": "^7.0.1",
|
|
52
56
|
"qr-image": "^3.2.0",
|
|
57
|
+
"redis": "^4.0.3",
|
|
53
58
|
"sequelize": "^5.21.3",
|
|
59
|
+
"sha1": "^1.1.1",
|
|
54
60
|
"static-koa-router": "^1.0.3",
|
|
61
|
+
"vm2": "^3.9.19",
|
|
55
62
|
"wechat-oauth": "^1.5.0",
|
|
56
63
|
"weixin-pay-fork": "^1.0.9",
|
|
57
|
-
"node-uuid": "^1.4.8",
|
|
58
|
-
"sha1": "^1.1.1",
|
|
59
|
-
"redis": "^4.0.3",
|
|
60
|
-
"yly-nodejs-sdk": "^1.0.2",
|
|
61
|
-
"vm2": "^3.9.19",
|
|
62
64
|
"xlsx": "^0.18.5",
|
|
63
|
-
"
|
|
64
|
-
"moment": "^2.30.1",
|
|
65
|
-
"form-data": "^4.0.0",
|
|
66
|
-
"adm-zip": "^0.6.0"
|
|
65
|
+
"yly-nodejs-sdk": "^1.0.2"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"eslint": "^4.19.1",
|