@qingfu/core-env 0.2.10 → 0.3.0
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/lib/helper.js +2 -2
- package/package.json +8 -8
package/lib/helper.js
CHANGED
|
@@ -55,7 +55,7 @@ helper.multipart = ({ count = 5, size = 20 * 1024 * 1024 } = {}) => {
|
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
helper.upload = ({ bucket, dir, limit }) => {
|
|
58
|
+
helper.upload = ({ bucket, dir, limit, useFallback }) => {
|
|
59
59
|
if ( !dir ) throw new Error( 422 );
|
|
60
60
|
return async ctx => await helper.multipart( limit )( ctx, async () => {
|
|
61
61
|
let files = ctx.request.files;
|
|
@@ -66,7 +66,7 @@ helper.upload = ({ bucket, dir, limit }) => {
|
|
|
66
66
|
let { name, buffer } = files[ field ];
|
|
67
67
|
let readable = new stream.PassThrough();
|
|
68
68
|
readable.end( buffer );
|
|
69
|
-
let meta = { name, bucket, dir };
|
|
69
|
+
let meta = { name, bucket, dir, useFallback };
|
|
70
70
|
let data = await brokers( 'core' ).call( 'store.save', readable, { meta });
|
|
71
71
|
return { field, ...data };
|
|
72
72
|
}));
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qingfu/core-env",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"readmeFilename": "README.md",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@koa/cors": "4.0.0",
|
|
7
7
|
"@koa/router": "12.0.0",
|
|
8
8
|
"base-x": "4.0.0",
|
|
9
|
-
"bull": "4.
|
|
9
|
+
"bull": "4.11.3",
|
|
10
10
|
"busboy": "1.6.0",
|
|
11
11
|
"cookie": "0.5.0",
|
|
12
12
|
"dotenv-extended": "2.9.0",
|
|
13
13
|
"glob": "8.1.0",
|
|
14
|
-
"ioredis": "
|
|
14
|
+
"ioredis": "5.3.2",
|
|
15
15
|
"jsonwebtoken": "9.0.1",
|
|
16
16
|
"koa": "2.14.2",
|
|
17
17
|
"koa-bodyparser": "4.4.1",
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"koa-methodoverride": "2.0.0",
|
|
22
22
|
"koa-qs": "3.0.0",
|
|
23
23
|
"lodash": "4.17.21",
|
|
24
|
-
"moleculer": "0.14.
|
|
25
|
-
"mongoose": "7.
|
|
24
|
+
"moleculer": "0.14.31",
|
|
25
|
+
"mongoose": "7.4.4",
|
|
26
26
|
"mongoose-cast-aggregation": "0.3.1",
|
|
27
|
-
"mongoose-geojson-schema": "2.2.
|
|
27
|
+
"mongoose-geojson-schema": "2.2.5",
|
|
28
28
|
"mongoose-lean-defaults": "2.2.1",
|
|
29
29
|
"mongoose-lean-getters": "1.1.0",
|
|
30
30
|
"mongoose-lean-virtuals": "0.9.1",
|
|
31
31
|
"ms": "2.1.3",
|
|
32
32
|
"notepack.io": "3.0.1",
|
|
33
33
|
"pinyin": "2.11.2",
|
|
34
|
-
"primus": "8.0.
|
|
34
|
+
"primus": "8.0.8",
|
|
35
35
|
"primus-rooms": "3.4.3",
|
|
36
36
|
"qr-image": "3.2.0",
|
|
37
|
-
"superagent": "8.
|
|
37
|
+
"superagent": "8.1.2",
|
|
38
38
|
"wechat-encrypt": "1.1.1",
|
|
39
39
|
"winston": "3.10.0",
|
|
40
40
|
"winston-mongodb": "5.1.1",
|