@freelog/tools-lib 0.1.60 → 0.1.64
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/service-API/informalNodes.d.ts +6 -0
- package/dist/tools-lib.cjs.development.js +24 -4
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +24 -4
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/regexp.d.ts +2 -0
- package/package.json +2 -2
- package/src/service-API/informalNodes.ts +17 -0
- package/src/utils/regexp.ts +6 -0
package/dist/utils/regexp.d.ts
CHANGED
|
@@ -10,3 +10,5 @@ export declare const EMAIL_ADDRESS: RegExp;
|
|
|
10
10
|
export declare const USERNAME: RegExp;
|
|
11
11
|
export declare const PASSWORD: RegExp;
|
|
12
12
|
export declare const NATURAL_NUMBER: RegExp;
|
|
13
|
+
export declare const BUCKET_NAME: RegExp;
|
|
14
|
+
export declare const JS_VARIABLE_NAME: RegExp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@freelog/tools-lib",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.64",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "^4.3.2"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@freelog/resource-policy-lang": "
|
|
57
|
+
"@freelog/resource-policy-lang": "1.1.26",
|
|
58
58
|
"@freelog/tools-lib": "^0.1.43",
|
|
59
59
|
"axios": "^0.21.1",
|
|
60
60
|
"crypto-js": "^4.0.0",
|
|
@@ -206,3 +206,20 @@ export function rulesRematch({nodeId, ...params}: RulesRematchParamsType) {
|
|
|
206
206
|
data: params,
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
|
+
|
|
210
|
+
// 批量获取测试资源授权结果
|
|
211
|
+
interface BatchGetAuthsParamsType {
|
|
212
|
+
nodeId: number;
|
|
213
|
+
exhibitIds: string;
|
|
214
|
+
authType: 1 | 2 | 3; //授权类型 1:节点侧授权 2:资源侧授权 3:节点+资源侧授权
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function batchGetAuths({nodeId, ...params}: BatchGetAuthsParamsType) {
|
|
218
|
+
// return FUtil.Axios.post(`/v2/testNodes/${nodeId}/rules/rematch`, params);
|
|
219
|
+
return FUtil.Request({
|
|
220
|
+
method: 'GET',
|
|
221
|
+
// url: `/v2/auths/testResources/nodes/${nodeId}/result`,
|
|
222
|
+
url: `/v2/auths/exhibits/${nodeId}/test/batchAuth/results`,
|
|
223
|
+
params: params,
|
|
224
|
+
});
|
|
225
|
+
}
|
package/src/utils/regexp.ts
CHANGED
|
@@ -38,3 +38,9 @@ export const PASSWORD: RegExp = new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$
|
|
|
38
38
|
|
|
39
39
|
// 自然数
|
|
40
40
|
export const NATURAL_NUMBER: RegExp = new RegExp(/^[0-9]*$/);
|
|
41
|
+
|
|
42
|
+
// 对象的Bucket名称
|
|
43
|
+
export const BUCKET_NAME: RegExp = new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/);
|
|
44
|
+
|
|
45
|
+
// JS变量名称
|
|
46
|
+
export const JS_VARIABLE_NAME: RegExp = new RegExp(/^[A-Za-z$_][\w$_]*$/);
|