@midwayjs/oss 3.5.1 → 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.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.OSSConfiguration = void 0;
10
- const decorator_1 = require("@midwayjs/decorator");
10
+ const core_1 = require("@midwayjs/core");
11
11
  const manager_1 = require("./manager");
12
12
  let OSSConfiguration = class OSSConfiguration {
13
13
  async onReady(container) {
@@ -15,7 +15,7 @@ let OSSConfiguration = class OSSConfiguration {
15
15
  }
16
16
  };
17
17
  OSSConfiguration = __decorate([
18
- (0, decorator_1.Configuration)({
18
+ (0, core_1.Configuration)({
19
19
  namespace: 'oss',
20
20
  importConfigs: [
21
21
  {
package/dist/manager.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as OSS from 'ali-oss';
2
1
  import { ServiceFactory } from '@midwayjs/core';
2
+ import * as OSS from 'ali-oss';
3
3
  import type { OSSServiceFactoryReturnType, OSSServiceFactoryCreateClientConfigType } from './interface';
4
4
  export declare class OSSServiceFactory<T extends OSSServiceFactoryReturnType = OSSServiceFactoryReturnType> extends ServiceFactory<T> {
5
5
  ossConfig: OSSServiceFactoryCreateClientConfigType;
package/dist/manager.js CHANGED
@@ -10,10 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.OSSSTSService = exports.OSSService = exports.OSSServiceFactory = void 0;
13
- const decorator_1 = require("@midwayjs/decorator");
13
+ const core_1 = require("@midwayjs/core");
14
14
  const OSS = require("ali-oss");
15
15
  const assert = require("assert");
16
- const core_1 = require("@midwayjs/core");
17
16
  function checkBucketConfig(config) {
18
17
  assert(config.endpoint || config.region, "[midway:oss] Must set `endpoint` or `region` in oss's config");
19
18
  assert(config.accessKeySecret && config.accessKeyId, "[midway:oss] Must set `accessKeyId` and `accessKeySecret` in oss's config");
@@ -44,18 +43,18 @@ let OSSServiceFactory = class OSSServiceFactory extends core_1.ServiceFactory {
44
43
  }
45
44
  };
46
45
  __decorate([
47
- (0, decorator_1.Config)('oss'),
46
+ (0, core_1.Config)('oss'),
48
47
  __metadata("design:type", Object)
49
48
  ], OSSServiceFactory.prototype, "ossConfig", void 0);
50
49
  __decorate([
51
- (0, decorator_1.Init)(),
50
+ (0, core_1.Init)(),
52
51
  __metadata("design:type", Function),
53
52
  __metadata("design:paramtypes", []),
54
53
  __metadata("design:returntype", Promise)
55
54
  ], OSSServiceFactory.prototype, "init", null);
56
55
  OSSServiceFactory = __decorate([
57
- (0, decorator_1.Provide)(),
58
- (0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
56
+ (0, core_1.Provide)(),
57
+ (0, core_1.Scope)(core_1.ScopeEnum.Singleton)
59
58
  ], OSSServiceFactory);
60
59
  exports.OSSServiceFactory = OSSServiceFactory;
61
60
  let OSSService = class OSSService {
@@ -67,18 +66,18 @@ let OSSService = class OSSService {
67
66
  }
68
67
  };
69
68
  __decorate([
70
- (0, decorator_1.Inject)(),
69
+ (0, core_1.Inject)(),
71
70
  __metadata("design:type", OSSServiceFactory)
72
71
  ], OSSService.prototype, "serviceFactory", void 0);
73
72
  __decorate([
74
- (0, decorator_1.Init)(),
73
+ (0, core_1.Init)(),
75
74
  __metadata("design:type", Function),
76
75
  __metadata("design:paramtypes", []),
77
76
  __metadata("design:returntype", Promise)
78
77
  ], OSSService.prototype, "init", null);
79
78
  OSSService = __decorate([
80
- (0, decorator_1.Provide)(),
81
- (0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
79
+ (0, core_1.Provide)(),
80
+ (0, core_1.Scope)(core_1.ScopeEnum.Singleton)
82
81
  ], OSSService);
83
82
  exports.OSSService = OSSService;
84
83
  (0, core_1.delegateTargetPrototypeMethod)(OSSService, [OSS]);
@@ -94,18 +93,18 @@ let OSSSTSService = class OSSSTSService {
94
93
  }
95
94
  };
96
95
  __decorate([
97
- (0, decorator_1.Inject)(),
96
+ (0, core_1.Inject)(),
98
97
  __metadata("design:type", OSSServiceFactory)
99
98
  ], OSSSTSService.prototype, "serviceFactory", void 0);
100
99
  __decorate([
101
- (0, decorator_1.Init)(),
100
+ (0, core_1.Init)(),
102
101
  __metadata("design:type", Function),
103
102
  __metadata("design:paramtypes", []),
104
103
  __metadata("design:returntype", Promise)
105
104
  ], OSSSTSService.prototype, "init", null);
106
105
  OSSSTSService = __decorate([
107
- (0, decorator_1.Provide)(),
108
- (0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
106
+ (0, core_1.Provide)(),
107
+ (0, core_1.Scope)(core_1.ScopeEnum.Singleton)
109
108
  ], OSSSTSService);
110
109
  exports.OSSSTSService = OSSSTSService;
111
110
  //# sourceMappingURL=manager.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midwayjs/oss",
3
3
  "description": "midway oss component",
4
- "version": "3.5.1",
4
+ "version": "3.6.0",
5
5
  "main": "dist/index",
6
6
  "typings": "index.d.ts",
7
7
  "files": [
@@ -10,11 +10,10 @@
10
10
  "index.d.ts"
11
11
  ],
12
12
  "devDependencies": {
13
- "@midwayjs/core": "^3.5.1",
14
- "@midwayjs/decorator": "^3.4.11",
15
- "@midwayjs/mock": "^3.5.1",
16
- "@types/ali-oss": "6.16.4",
17
- "dotenv": "16.0.2"
13
+ "@midwayjs/core": "^3.6.0",
14
+ "@midwayjs/mock": "^3.6.0",
15
+ "@types/ali-oss": "6.16.5",
16
+ "dotenv": "16.0.3"
18
17
  },
19
18
  "dependencies": {
20
19
  "ali-oss": "^6.16.0"
@@ -39,5 +38,5 @@
39
38
  "type": "git",
40
39
  "url": "https://github.com/midwayjs/midway.git"
41
40
  },
42
- "gitHead": "3b63fc768617037644602dd5ad66d3734ce01b16"
41
+ "gitHead": "22643b0e8519766bb7c68b975930199fc136336e"
43
42
  }