@midwayjs/sequelize 3.0.0-beta.9 → 3.0.3
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/dist/config/config.default.js.map +1 -0
- package/dist/configuration.js.map +1 -0
- package/dist/core/baseTable.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/package.json +11 -10
- package/CHANGELOG.md +0 -86
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.default.js","sourceRoot":"","sources":["../../src/config/config.default.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAEhB,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE;QACP,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,iBAAiB,CAAC;KAC/D;IACD,IAAI,EAAE,KAAK;CACZ,CAAC","sourcesContent":["import * as path from 'path';\n\nexport const sequelize = {\n options: {\n dialect: 'sqlite',\n storage: path.join(__dirname, '../../test', 'database.sqlite'),\n },\n sync: false,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAwE;AACxE,+DAAiD;AACjD,yDAAyD;AAUzD,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IAMjC,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,gCAAS,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,IAAA,sBAAU,EAAC,gBAAgB,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;YAC7B,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SAC5B;IACH,CAAC;CACF,CAAA;AAZC;IADC,IAAA,kBAAM,EAAC,WAAW,CAAC;;+DACJ;AAJL,sBAAsB;IARlC,IAAA,yBAAa,EAAC;QACb,SAAS,EAAE,WAAW;QACtB,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,aAAa;aACvB;SACF;KACF,CAAC;GACW,sBAAsB,CAgBlC;AAhBY,wDAAsB","sourcesContent":["import { Config, Configuration, listModule } from '@midwayjs/decorator';\nimport { Sequelize } from 'sequelize-typescript';\nimport * as DefaultConfig from './config/config.default';\n\n@Configuration({\n namespace: 'sequelize',\n importConfigs: [\n {\n default: DefaultConfig,\n },\n ],\n})\nexport class SequelizeConfiguration {\n instance: Sequelize;\n\n @Config('sequelize')\n sequelizeConfig;\n\n async onReady() {\n const options = this.sequelizeConfig.options;\n this.instance = new Sequelize(options);\n const entities = listModule('sequelize:core');\n this.instance.addModels(entities);\n await this.instance.authenticate();\n if (this.sequelizeConfig.sync) {\n await this.instance.sync();\n }\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseTable.js","sourceRoot":"","sources":["../../src/core/baseTable.ts"],"names":[],"mappings":";;;AAAA,+DAK8B;AAC9B,mDAAiD;AAMjD,SAAgB,SAAS,CAAC,GAAS;IACjC,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,IAAA,sBAAU,EAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;QAClC,QAAQ,CAAC,GAAG,CAAC,CAAC;KACf;SAAM;QACL,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC,EAAE;YACd,IAAA,sBAAU,EAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;YACrC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5B,CAAC,CAAC;KACH;AACH,CAAC;AAXD,8BAWC;AAED,SAAS,QAAQ,CAAC,MAAM,EAAE,UAAe,EAAE;IACzC,IAAA,mCAAY,EAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IACjE,IAAA,iCAAU,EAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC","sourcesContent":["import {\n setModelName,\n addOptions,\n Model,\n TableOptions,\n} from 'sequelize-typescript';\nimport { saveModule } from '@midwayjs/decorator';\n\nexport function BaseTable<M extends Model = Model>(\n options: TableOptions<M>\n): any;\nexport function BaseTable(target: any): void;\nexport function BaseTable(arg?: any) {\n if (typeof arg === 'function') {\n saveModule('sequelize:core', arg);\n annotate(arg);\n } else {\n const options = Object.assign({}, arg);\n return target => {\n saveModule('sequelize:core', target);\n annotate(target, options);\n };\n }\n}\n\nfunction annotate(target, options: any = {}) {\n setModelName(target.prototype, options.modelName || target.name);\n addOptions(target.prototype, options);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAA0E;AAAjE,8GAAA,sBAAsB,OAAiB;AAChD,8CAA6C;AAApC,sGAAA,SAAS,OAAA","sourcesContent":["export { SequelizeConfiguration as Configuration } from './configuration';\nexport { BaseTable } from './core/baseTable';\n"]}
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/sequelize",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"main": "dist/index",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist/**/*.js",
|
|
8
8
|
"dist/**/*.d.ts",
|
|
9
|
-
"index.d.ts"
|
|
9
|
+
"index.d.ts",
|
|
10
|
+
"dist/**/*.js.map"
|
|
10
11
|
],
|
|
11
12
|
"devDependencies": {
|
|
12
|
-
"@midwayjs/decorator": "^3.0.
|
|
13
|
-
"@midwayjs/koa": "^3.0.
|
|
14
|
-
"@midwayjs/mock": "^3.0.
|
|
15
|
-
"sqlite3": "
|
|
13
|
+
"@midwayjs/decorator": "^3.0.2",
|
|
14
|
+
"@midwayjs/koa": "^3.0.3",
|
|
15
|
+
"@midwayjs/mock": "^3.0.2",
|
|
16
|
+
"sqlite3": "5.0.2"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"sequelize": "~6.
|
|
19
|
+
"sequelize": "~6.14.0",
|
|
19
20
|
"sequelize-typescript": "^2.1.0"
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
@@ -30,8 +31,8 @@
|
|
|
30
31
|
"license": "MIT",
|
|
31
32
|
"scripts": {
|
|
32
33
|
"build": "tsc",
|
|
33
|
-
"test": "NODE_ENV=development node --require=ts-node/register ../../node_modules/.bin/jest",
|
|
34
|
-
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --coverage --forceExit"
|
|
34
|
+
"test": "NODE_ENV=development node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
|
|
35
|
+
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit"
|
|
35
36
|
},
|
|
36
37
|
"engines": {
|
|
37
38
|
"node": ">=12"
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"type": "git",
|
|
41
42
|
"url": "http://github.com/midwayjs/midway.git"
|
|
42
43
|
},
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "43a5971b284aa918d22d191236c5664b011f8d87"
|
|
44
45
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @midwayjs/sequelize
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @midwayjs/sequelize
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* add app.keys ([#1395](https://github.com/midwayjs/midway/issues/1395)) ([c44afc6](https://github.com/midwayjs/midway/commit/c44afc6cc6764a959d1fa7ae04d60099282d156a))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
|
|
34
|
-
|
|
35
|
-
**Note:** Version bump only for package @midwayjs/sequelize
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
# [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
|
|
42
|
-
|
|
43
|
-
**Note:** Version bump only for package @midwayjs/sequelize
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
|
|
50
|
-
|
|
51
|
-
**Note:** Version bump only for package @midwayjs/sequelize
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
# [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### Features
|
|
61
|
-
|
|
62
|
-
* add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
|
|
69
|
-
|
|
70
|
-
**Note:** Version bump only for package @midwayjs/sequelize
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
# [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
### Bug Fixes
|
|
80
|
-
|
|
81
|
-
* static prefix ([#1321](https://github.com/midwayjs/midway/issues/1321)) ([31fe961](https://github.com/midwayjs/midway/commit/31fe961931fed7656a144b1682ee4c4bb25fdff5))
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Features
|
|
85
|
-
|
|
86
|
-
* add sequelize component ([#1283](https://github.com/midwayjs/midway/issues/1283)) ([9ad91d1](https://github.com/midwayjs/midway/commit/9ad91d1e3ef3cf4cd799a1f8ef3d57b7efae60cf))
|