@midwayjs/core 3.17.1 → 3.18.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.
@@ -30,6 +30,7 @@ class DataSourceManager {
30
30
  this.dataSource = new Map();
31
31
  this.options = {};
32
32
  this.modelMapping = new WeakMap();
33
+ this.dataSourcePriority = {};
33
34
  }
34
35
  async initDataSource(dataSourceConfig, baseDirOrOptions) {
35
36
  var _a;
@@ -104,7 +104,7 @@ class HttpClient {
104
104
  this.defaultOptions = defaultOptions;
105
105
  }
106
106
  async request(url, options) {
107
- return makeHttpRequest(url, Object.assign(this.defaultOptions, options));
107
+ return makeHttpRequest(url, Object.assign({}, this.defaultOptions, options));
108
108
  }
109
109
  }
110
110
  exports.HttpClient = HttpClient;
@@ -26,7 +26,12 @@ const extractKoaLikeValue = (key, data, paramType) => {
26
26
  return ctx.getFileStream(data);
27
27
  }
28
28
  else if (ctx.files) {
29
- return ctx.files[0];
29
+ if (Array.isArray(ctx.files)) {
30
+ return ctx.files[0];
31
+ }
32
+ else {
33
+ return ctx.files;
34
+ }
30
35
  }
31
36
  else {
32
37
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/core",
3
- "version": "3.17.1",
3
+ "version": "3.18.0",
4
4
  "description": "midway core",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -43,5 +43,5 @@
43
43
  "engines": {
44
44
  "node": ">=12"
45
45
  },
46
- "gitHead": "824d8474a425b342fcd4480649c83677f846afb9"
46
+ "gitHead": "5e6180ba0fabe1acc6df112c68855129a534e941"
47
47
  }