@midwayjs/casbin-typeorm-adapter 3.19.0 → 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.
package/dist/adapter.js CHANGED
@@ -23,7 +23,7 @@ class TypeORMAdapter extends casbin_1.BaseAdapter {
23
23
  * @param adapterConfig
24
24
  */
25
25
  static getCasbinRuleType(type, adapterConfig) {
26
- if (adapterConfig === null || adapterConfig === void 0 ? void 0 : adapterConfig.customCasbinRuleEntity) {
26
+ if (adapterConfig?.customCasbinRuleEntity) {
27
27
  return adapterConfig.customCasbinRuleEntity;
28
28
  }
29
29
  if (type === 'mongodb') {
@@ -13,6 +13,7 @@ exports.CasbinMongoRule = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  let CasbinMongoRule = class CasbinMongoRule extends typeorm_1.BaseEntity {
15
15
  };
16
+ exports.CasbinMongoRule = CasbinMongoRule;
16
17
  __decorate([
17
18
  (0, typeorm_1.ObjectIdColumn)(),
18
19
  __metadata("design:type", Object)
@@ -65,8 +66,7 @@ __decorate([
65
66
  }),
66
67
  __metadata("design:type", String)
67
68
  ], CasbinMongoRule.prototype, "v6", void 0);
68
- CasbinMongoRule = __decorate([
69
+ exports.CasbinMongoRule = CasbinMongoRule = __decorate([
69
70
  (0, typeorm_1.Entity)()
70
71
  ], CasbinMongoRule);
71
- exports.CasbinMongoRule = CasbinMongoRule;
72
72
  //# sourceMappingURL=casbinMongoRule.js.map
@@ -13,6 +13,7 @@ exports.CasbinRule = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  let CasbinRule = class CasbinRule extends typeorm_1.BaseEntity {
15
15
  };
16
+ exports.CasbinRule = CasbinRule;
16
17
  __decorate([
17
18
  (0, typeorm_1.PrimaryGeneratedColumn)(),
18
19
  __metadata("design:type", Number)
@@ -65,8 +66,7 @@ __decorate([
65
66
  }),
66
67
  __metadata("design:type", String)
67
68
  ], CasbinRule.prototype, "v6", void 0);
68
- CasbinRule = __decorate([
69
+ exports.CasbinRule = CasbinRule = __decorate([
69
70
  (0, typeorm_1.Entity)()
70
71
  ], CasbinRule);
71
- exports.CasbinRule = CasbinRule;
72
72
  //# sourceMappingURL=casbinRule.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midwayjs/casbin-typeorm-adapter",
3
3
  "description": "midway casbin typeorm adapter",
4
- "version": "3.19.0",
4
+ "version": "4.0.0-alpha.1",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "files": [
@@ -9,16 +9,16 @@
9
9
  "dist/**/*.d.ts"
10
10
  ],
11
11
  "devDependencies": {
12
- "@midwayjs/core": "^3.19.0",
13
- "@midwayjs/koa": "^3.19.0",
14
- "@midwayjs/mock": "^3.19.0",
12
+ "@midwayjs/core": "^4.0.0-alpha.1",
13
+ "@midwayjs/koa": "^4.0.0-alpha.1",
14
+ "@midwayjs/mock": "^4.0.0-alpha.1",
15
15
  "casbin": "5.32.0",
16
16
  "sqlite3": "5.1.7",
17
17
  "typeorm": "0.3.20"
18
18
  },
19
19
  "dependencies": {
20
- "@midwayjs/casbin": "^3.19.0",
21
- "@midwayjs/typeorm": "^3.19.0"
20
+ "@midwayjs/casbin": "^4.0.0-alpha.1",
21
+ "@midwayjs/typeorm": "^4.0.0-alpha.1"
22
22
  },
23
23
  "keywords": [
24
24
  "midway",
@@ -31,8 +31,8 @@
31
31
  "license": "MIT",
32
32
  "scripts": {
33
33
  "build": "tsc",
34
- "test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
35
- "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit",
34
+ "test": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand",
35
+ "cov": "node -r ts-node/register ../../node_modules/jest/bin/jest.js --runInBand --coverage --forceExit",
36
36
  "ci": "npm run test",
37
37
  "lint": "mwts check"
38
38
  },
@@ -43,5 +43,5 @@
43
43
  "type": "git",
44
44
  "url": "https://github.com/midwayjs/midway.git"
45
45
  },
46
- "gitHead": "437e92d9375b0e375f83aa363f3e6a60187c7109"
46
+ "gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
47
47
  }