@midwayjs/upload 3.5.2 → 3.6.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.
@@ -10,9 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UploadConfiguration = void 0;
13
- const decorator_1 = require("@midwayjs/decorator");
14
- const DefaultConfig = require("./config/config.default");
15
13
  const core_1 = require("@midwayjs/core");
14
+ const DefaultConfig = require("./config/config.default");
16
15
  const middleware_1 = require("./middleware");
17
16
  const utils_1 = require("./utils");
18
17
  let UploadConfiguration = class UploadConfiguration {
@@ -35,15 +34,15 @@ let UploadConfiguration = class UploadConfiguration {
35
34
  }
36
35
  };
37
36
  __decorate([
38
- (0, decorator_1.Inject)(),
37
+ (0, core_1.Inject)(),
39
38
  __metadata("design:type", core_1.MidwayApplicationManager)
40
39
  ], UploadConfiguration.prototype, "applicationManager", void 0);
41
40
  __decorate([
42
- (0, decorator_1.Config)('upload'),
41
+ (0, core_1.Config)('upload'),
43
42
  __metadata("design:type", Object)
44
43
  ], UploadConfiguration.prototype, "uploadConfig", void 0);
45
44
  UploadConfiguration = __decorate([
46
- (0, decorator_1.Configuration)({
45
+ (0, core_1.Configuration)({
47
46
  namespace: 'upload',
48
47
  importConfigs: [
49
48
  {
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UploadMiddleware = void 0;
13
- const decorator_1 = require("@midwayjs/decorator");
13
+ const core_1 = require("@midwayjs/core");
14
14
  const path_1 = require("path");
15
15
  const fs_1 = require("fs");
16
16
  const stream_1 = require("stream");
@@ -20,7 +20,7 @@ const getRawBody = require("raw-body");
20
20
  const { unlink, writeFile } = fs_1.promises;
21
21
  let UploadMiddleware = class UploadMiddleware {
22
22
  resolve(app) {
23
- if (app.getFrameworkType() === decorator_1.MidwayFrameworkType.WEB_EXPRESS) {
23
+ if (app.getFrameworkType() === core_1.MidwayFrameworkType.WEB_EXPRESS) {
24
24
  return async (req, res, next) => {
25
25
  return this.execUpload(req, req, res, next, true);
26
26
  };
@@ -168,15 +168,15 @@ let UploadMiddleware = class UploadMiddleware {
168
168
  }
169
169
  };
170
170
  __decorate([
171
- (0, decorator_1.Config)('upload'),
171
+ (0, core_1.Config)('upload'),
172
172
  __metadata("design:type", Object)
173
173
  ], UploadMiddleware.prototype, "upload", void 0);
174
174
  __decorate([
175
- (0, decorator_1.Logger)(),
175
+ (0, core_1.Logger)(),
176
176
  __metadata("design:type", Object)
177
177
  ], UploadMiddleware.prototype, "logger", void 0);
178
178
  UploadMiddleware = __decorate([
179
- (0, decorator_1.Middleware)()
179
+ (0, core_1.Middleware)()
180
180
  ], UploadMiddleware);
181
181
  exports.UploadMiddleware = UploadMiddleware;
182
182
  //# sourceMappingURL=middleware.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/upload",
3
- "version": "3.5.2",
3
+ "version": "3.6.0",
4
4
  "description": "Midway Component for upload",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -25,14 +25,13 @@
25
25
  "raw-body": "2.5.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@midwayjs/core": "^3.5.1",
29
- "@midwayjs/decorator": "^3.4.11",
30
- "@midwayjs/express": "^3.5.1",
31
- "@midwayjs/faas": "^3.5.2",
32
- "@midwayjs/koa": "^3.5.1",
33
- "@midwayjs/mock": "^3.5.1",
34
- "@midwayjs/serverless-app": "^3.5.2",
35
- "@midwayjs/web": "^3.5.1"
28
+ "@midwayjs/core": "^3.6.0",
29
+ "@midwayjs/express": "^3.6.0",
30
+ "@midwayjs/faas": "^3.6.0",
31
+ "@midwayjs/koa": "^3.6.0",
32
+ "@midwayjs/mock": "^3.6.0",
33
+ "@midwayjs/serverless-app": "^3.6.0",
34
+ "@midwayjs/web": "^3.6.0"
36
35
  },
37
- "gitHead": "bfdca205f0c9321066ec480cd244eee043dccab0"
36
+ "gitHead": "22643b0e8519766bb7c68b975930199fc136336e"
38
37
  }