@midwayjs/sequelize 4.0.0-beta.1 → 4.0.0-beta.11
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/README.md +1 -1
- package/dist/configuration.js +3 -0
- package/dist/dataSourceManager.js +2 -0
- package/dist/decorator.js +3 -3
- package/package.json +6 -5
package/README.md
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -14,6 +14,9 @@ const core_1 = require("@midwayjs/core");
|
|
|
14
14
|
const dataSourceManager_1 = require("./dataSourceManager");
|
|
15
15
|
const decorator_1 = require("./decorator");
|
|
16
16
|
let SequelizeConfiguration = class SequelizeConfiguration {
|
|
17
|
+
sequelizeConfig;
|
|
18
|
+
decoratorService;
|
|
19
|
+
dataSourceManager;
|
|
17
20
|
async init() {
|
|
18
21
|
this.decoratorService.registerPropertyHandler(decorator_1.ENTITY_MODEL_KEY, (propertyName, meta) => {
|
|
19
22
|
return this.dataSourceManager
|
|
@@ -13,6 +13,8 @@ exports.SequelizeDataSourceManager = void 0;
|
|
|
13
13
|
const core_1 = require("@midwayjs/core");
|
|
14
14
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
15
|
let SequelizeDataSourceManager = class SequelizeDataSourceManager extends core_1.DataSourceManager {
|
|
16
|
+
sequelizeConfig;
|
|
17
|
+
coreLogger;
|
|
16
18
|
async init() {
|
|
17
19
|
await this.initDataSource(this.sequelizeConfig, {
|
|
18
20
|
concurrent: true,
|
package/dist/decorator.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DATA_SOURCE_KEY = exports.ENTITY_MODEL_KEY = void 0;
|
|
4
|
+
exports.InjectRepository = InjectRepository;
|
|
5
|
+
exports.InjectDataSource = InjectDataSource;
|
|
4
6
|
const core_1 = require("@midwayjs/core");
|
|
5
7
|
exports.ENTITY_MODEL_KEY = 'sequelize:entity_model_key';
|
|
6
8
|
exports.DATA_SOURCE_KEY = 'sequelize:data_source_key';
|
|
@@ -10,11 +12,9 @@ function InjectRepository(modelKey, connectionName) {
|
|
|
10
12
|
connectionName,
|
|
11
13
|
});
|
|
12
14
|
}
|
|
13
|
-
exports.InjectRepository = InjectRepository;
|
|
14
15
|
function InjectDataSource(dataSourceName) {
|
|
15
16
|
return core_1.DecoratorManager.createCustomPropertyDecorator(exports.DATA_SOURCE_KEY, {
|
|
16
17
|
dataSourceName,
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
exports.InjectDataSource = InjectDataSource;
|
|
20
20
|
//# sourceMappingURL=decorator.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/sequelize",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.11",
|
|
4
|
+
"description": "Midway Component for Sequelize",
|
|
4
5
|
"main": "dist/index.js",
|
|
5
6
|
"typings": "index.d.ts",
|
|
6
7
|
"files": [
|
|
@@ -9,8 +10,8 @@
|
|
|
9
10
|
"index.d.ts"
|
|
10
11
|
],
|
|
11
12
|
"devDependencies": {
|
|
12
|
-
"@midwayjs/core": "^4.0.0-beta.
|
|
13
|
-
"@midwayjs/mock": "^4.0.0-beta.
|
|
13
|
+
"@midwayjs/core": "^4.0.0-beta.11",
|
|
14
|
+
"@midwayjs/mock": "^4.0.0-beta.11",
|
|
14
15
|
"sequelize": "6.37.5",
|
|
15
16
|
"sequelize-typescript": "2.1.6",
|
|
16
17
|
"sqlite3": "5.1.7"
|
|
@@ -31,11 +32,11 @@
|
|
|
31
32
|
"cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit"
|
|
32
33
|
},
|
|
33
34
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
35
|
+
"node": ">=20"
|
|
35
36
|
},
|
|
36
37
|
"repository": {
|
|
37
38
|
"type": "git",
|
|
38
39
|
"url": "https://github.com/midwayjs/midway.git"
|
|
39
40
|
},
|
|
40
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "6ef05719ca6e900f1ec34aff7a5c5a9614358c50"
|
|
41
42
|
}
|