@certd/lib-server 1.39.12 → 1.39.13
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.
|
@@ -119,6 +119,24 @@ let AccessService = class AccessService extends BaseService {
|
|
|
119
119
|
delete param.keyId;
|
|
120
120
|
return await super.update(param);
|
|
121
121
|
}
|
|
122
|
+
async updateAccess(access) {
|
|
123
|
+
const oldEntity = await this.info(access.id);
|
|
124
|
+
if (oldEntity == null) {
|
|
125
|
+
throw new ValidateException('该授权配置不存在,请确认是否已被删除');
|
|
126
|
+
}
|
|
127
|
+
const setting = this.decryptAccessEntity(oldEntity);
|
|
128
|
+
for (const key of Object.keys(access)) {
|
|
129
|
+
if (key === 'id') {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
setting[key] = access[key];
|
|
133
|
+
}
|
|
134
|
+
return await this.update({
|
|
135
|
+
id: access.id,
|
|
136
|
+
type: oldEntity.type,
|
|
137
|
+
setting: JSON.stringify(setting),
|
|
138
|
+
});
|
|
139
|
+
}
|
|
122
140
|
async getSimpleInfo(id) {
|
|
123
141
|
const entity = await this.info(id);
|
|
124
142
|
if (entity == null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certd/lib-server",
|
|
3
|
-
"version": "1.39.
|
|
3
|
+
"version": "1.39.13",
|
|
4
4
|
"description": "midway with flyway, sql upgrade way ",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"build": "npm run before-build && tsc --skipLibCheck",
|
|
13
13
|
"dev-build": "npm run build",
|
|
14
14
|
"test": "midway-bin test --ts -V",
|
|
15
|
+
"test:unit": "cross-env NODE_ENV=unittest mocha --no-config --node-option no-warnings --node-option loader=ts-node/esm \"src/**/*.test.ts\"",
|
|
15
16
|
"test1": "midway-bin test --ts -V -f test/blank.test.ts -t 'hash-check'",
|
|
16
17
|
"cov": "midway-bin cov --ts",
|
|
17
18
|
"lint": "mwts check",
|
|
@@ -28,11 +29,11 @@
|
|
|
28
29
|
],
|
|
29
30
|
"license": "AGPL",
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@certd/acme-client": "^1.39.
|
|
32
|
-
"@certd/basic": "^1.39.
|
|
33
|
-
"@certd/pipeline": "^1.39.
|
|
34
|
-
"@certd/plugin-lib": "^1.39.
|
|
35
|
-
"@certd/plus-core": "^1.39.
|
|
32
|
+
"@certd/acme-client": "^1.39.13",
|
|
33
|
+
"@certd/basic": "^1.39.13",
|
|
34
|
+
"@certd/pipeline": "^1.39.13",
|
|
35
|
+
"@certd/plugin-lib": "^1.39.13",
|
|
36
|
+
"@certd/plus-core": "^1.39.13",
|
|
36
37
|
"@midwayjs/cache": "3.14.0",
|
|
37
38
|
"@midwayjs/core": "3.20.11",
|
|
38
39
|
"@midwayjs/i18n": "3.20.13",
|
|
@@ -43,7 +44,6 @@
|
|
|
43
44
|
"@midwayjs/upload": "3.20.13",
|
|
44
45
|
"@midwayjs/validate": "3.20.13",
|
|
45
46
|
"better-sqlite3": "^11.1.2",
|
|
46
|
-
"cross-env": "^7.0.3",
|
|
47
47
|
"dayjs": "^1.11.7",
|
|
48
48
|
"lodash-es": "^4.17.21",
|
|
49
49
|
"mwts": "^1.3.0",
|
|
@@ -52,17 +52,22 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/chai": "^4.3.3",
|
|
55
|
+
"@types/mocha": "^10.0.1",
|
|
55
56
|
"@types/node": "^18",
|
|
56
57
|
"@typescript-eslint/eslint-plugin": "^8.26.1",
|
|
57
58
|
"@typescript-eslint/parser": "^8.26.1",
|
|
59
|
+
"cross-env": "^7.0.3",
|
|
58
60
|
"eslint": "^8.24.0",
|
|
59
61
|
"eslint-config-prettier": "^8.5.0",
|
|
60
62
|
"eslint-plugin-prettier": "^4.2.1",
|
|
63
|
+
"esmock": "^2.7.5",
|
|
64
|
+
"mocha": "^10.2.0",
|
|
61
65
|
"prettier": "^2.8.8",
|
|
62
66
|
"rimraf": "^5.0.5",
|
|
67
|
+
"ts-node": "^10.9.2",
|
|
63
68
|
"tslib": "^2.8.1",
|
|
64
69
|
"typeorm": "^0.3.11",
|
|
65
70
|
"typescript": "^5.4.2"
|
|
66
71
|
},
|
|
67
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9f7d766cb386b299d4098141f4a47d23e16975e3"
|
|
68
73
|
}
|