@midwayjs/leoric 3.19.1 → 4.0.0-alpha.1

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.
@@ -57,6 +57,7 @@ let LeoricConfiguration = class LeoricConfiguration {
57
57
  }
58
58
  }
59
59
  };
60
+ exports.LeoricConfiguration = LeoricConfiguration;
60
61
  __decorate([
61
62
  (0, core_1.Inject)(),
62
63
  __metadata("design:type", core_1.MidwayDecoratorService)
@@ -67,7 +68,7 @@ __decorate([
67
68
  __metadata("design:paramtypes", []),
68
69
  __metadata("design:returntype", Promise)
69
70
  ], LeoricConfiguration.prototype, "init", null);
70
- LeoricConfiguration = __decorate([
71
+ exports.LeoricConfiguration = LeoricConfiguration = __decorate([
71
72
  (0, core_1.Configuration)({
72
73
  namespace: 'leoric',
73
74
  importConfigs: [
@@ -79,5 +80,4 @@ LeoricConfiguration = __decorate([
79
80
  ],
80
81
  })
81
82
  ], LeoricConfiguration);
82
- exports.LeoricConfiguration = LeoricConfiguration;
83
83
  //# sourceMappingURL=configuration.js.map
@@ -78,6 +78,7 @@ let LeoricDataSourceManager = class LeoricDataSourceManager extends core_1.DataS
78
78
  }
79
79
  }
80
80
  };
81
+ exports.LeoricDataSourceManager = LeoricDataSourceManager;
81
82
  __decorate([
82
83
  (0, core_1.Config)('leoric'),
83
84
  __metadata("design:type", Object)
@@ -96,9 +97,8 @@ __decorate([
96
97
  __metadata("design:paramtypes", []),
97
98
  __metadata("design:returntype", Promise)
98
99
  ], LeoricDataSourceManager.prototype, "init", null);
99
- LeoricDataSourceManager = __decorate([
100
+ exports.LeoricDataSourceManager = LeoricDataSourceManager = __decorate([
100
101
  (0, core_1.Provide)(),
101
102
  (0, core_1.Scope)(core_1.ScopeEnum.Singleton)
102
103
  ], LeoricDataSourceManager);
103
- exports.LeoricDataSourceManager = LeoricDataSourceManager;
104
104
  //# sourceMappingURL=dataSourceManager.js.map
package/dist/decorator.js CHANGED
@@ -5,14 +5,16 @@ const core_1 = require("@midwayjs/core");
5
5
  exports.MODEL_KEY = 'leoric:model_key';
6
6
  exports.DATA_SOURCE_KEY = 'leoric:data_source_key';
7
7
  function InjectDataSource(dataSourceName) {
8
- return (0, core_1.createCustomPropertyDecorator)(exports.DATA_SOURCE_KEY, { dataSourceName });
8
+ return core_1.DecoratorManager.createCustomPropertyDecorator(exports.DATA_SOURCE_KEY, {
9
+ dataSourceName,
10
+ });
9
11
  }
10
12
  exports.InjectDataSource = InjectDataSource;
11
13
  function InjectModel(modelName, dataSourceName) {
12
14
  return (target, propertyKey) => {
13
15
  if (!modelName)
14
16
  modelName = propertyKey.toString();
15
- return (0, core_1.createCustomPropertyDecorator)(exports.MODEL_KEY, {
17
+ return core_1.DecoratorManager.createCustomPropertyDecorator(exports.MODEL_KEY, {
16
18
  modelName,
17
19
  dataSourceName,
18
20
  })(target, propertyKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/leoric",
3
- "version": "3.19.1",
3
+ "version": "4.0.0-alpha.1",
4
4
  "description": "Leoric as a Midway model component",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -21,20 +21,20 @@
21
21
  "leoric": "2.13.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@midwayjs/core": "^3.19.0",
25
- "@midwayjs/koa": "^3.19.0",
26
- "@midwayjs/mock": "^3.19.0",
24
+ "@midwayjs/core": "^4.0.0-alpha.1",
25
+ "@midwayjs/koa": "^4.0.0-alpha.1",
26
+ "@midwayjs/mock": "^4.0.0-alpha.1",
27
27
  "sqlite3": "5.1.7"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "tsc",
31
- "test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
32
- "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit",
31
+ "test": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand",
32
+ "cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit",
33
33
  "lint:fix": "../../node_modules/.bin/mwts fix"
34
34
  },
35
35
  "repository": {
36
36
  "type": "git",
37
37
  "url": "https://github.com/midwayjs/midway.git"
38
38
  },
39
- "gitHead": "cf2fb9d4990bab9e8d28b034f31f242d510ce873"
39
+ "gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
40
40
  }