abler-api 0.2.3 → 0.2.5
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/cjs/pp-util.js +8 -5
- package/package.json +46 -45
package/dist/cjs/pp-util.js
CHANGED
|
@@ -1164,10 +1164,10 @@ class apiUtil$2 {
|
|
|
1164
1164
|
* @param token
|
|
1165
1165
|
* @returns {*}
|
|
1166
1166
|
*/
|
|
1167
|
-
static tokenDataExist(token) {
|
|
1168
|
-
return kvStorage.stored(token);
|
|
1167
|
+
static async tokenDataExist(token) {
|
|
1168
|
+
return await kvStorage.stored(token);
|
|
1169
1169
|
}
|
|
1170
|
-
static
|
|
1170
|
+
static checkParametersOK(params) {
|
|
1171
1171
|
configNeeded();
|
|
1172
1172
|
let paramSufix = params._param_sufix || "";
|
|
1173
1173
|
for (let i = 1; i < arguments.length; i++) {
|
|
@@ -1199,9 +1199,12 @@ class apiUtil$2 {
|
|
|
1199
1199
|
} else {
|
|
1200
1200
|
paramExists = typeof params[paramName] != 'undefined' || typeof params[paramName + paramSufix] != 'undefined';
|
|
1201
1201
|
}
|
|
1202
|
-
if (!paramExists)
|
|
1202
|
+
if (!paramExists) throw errCfg.ERROR(errCfg.PARAMETER_NEEDED, paramName);
|
|
1203
1203
|
}
|
|
1204
|
-
return
|
|
1204
|
+
return paramSufix;
|
|
1205
|
+
}
|
|
1206
|
+
static async parametersOK(params) {
|
|
1207
|
+
return await apiUtil$2.checkParametersOK(params);
|
|
1205
1208
|
}
|
|
1206
1209
|
|
|
1207
1210
|
/**
|
package/package.json
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "abler-api",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "API服务相关工具",
|
|
5
|
-
"main": "./dist/cjs/pp-util.js",
|
|
6
|
-
"-module": "./dist/es/pp-util.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "npx rollup -c rollup.config.js",
|
|
9
|
-
"postbuild": "node ..\\postbuild.js",
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
-
},
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
|
-
"author": "peng_peng",
|
|
16
|
-
"license": "ISC",
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"
|
|
19
|
-
"abler-
|
|
20
|
-
"abler-
|
|
21
|
-
"abler-
|
|
22
|
-
"abler-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@babel/core": "^7.18.5",
|
|
29
|
-
"@babel/eslint-parser": "^7.18.2",
|
|
30
|
-
"@babel/plugin-transform-runtime": "^7.18.0",
|
|
31
|
-
"@babel/preset-env": "^7.18.2",
|
|
32
|
-
"@babel/runtime": "^7.18.0",
|
|
33
|
-
"@rollup/plugin-babel": "^5.3.1",
|
|
34
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
35
|
-
"@rollup/plugin-eslint": "^8.0.2",
|
|
36
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
|
38
|
-
"@typescript-eslint/parser": "^5.25.0",
|
|
39
|
-
"eslint": "^8.16.0",
|
|
40
|
-
"eslint-plugin-react": "^7.30.0",
|
|
41
|
-
"rollup-plugin-filesize": "^9.1.2",
|
|
42
|
-
"rollup-plugin-json": "^4.0.0",
|
|
43
|
-
"rollup-plugin-terser": "^7.0.2"
|
|
44
|
-
}
|
|
45
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "abler-api",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "API服务相关工具",
|
|
5
|
+
"main": "./dist/cjs/pp-util.js",
|
|
6
|
+
"-module": "./dist/es/pp-util.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "npx rollup -c rollup.config.js",
|
|
9
|
+
"postbuild": "node ..\\postbuild.js",
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"author": "peng_peng",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"abler-db": "^0.1.59",
|
|
19
|
+
"abler-i18n": "^0.1.26",
|
|
20
|
+
"abler-messenger": "^0.1.18",
|
|
21
|
+
"abler-net": "^0.1.15",
|
|
22
|
+
"abler-util": "^0.3.6",
|
|
23
|
+
"basic-auth": "^2.0.1",
|
|
24
|
+
"node-cron": "^3.0.1",
|
|
25
|
+
"q": "^1.5.1"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@babel/core": "^7.18.5",
|
|
29
|
+
"@babel/eslint-parser": "^7.18.2",
|
|
30
|
+
"@babel/plugin-transform-runtime": "^7.18.0",
|
|
31
|
+
"@babel/preset-env": "^7.18.2",
|
|
32
|
+
"@babel/runtime": "^7.18.0",
|
|
33
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
34
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
35
|
+
"@rollup/plugin-eslint": "^8.0.2",
|
|
36
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
|
38
|
+
"@typescript-eslint/parser": "^5.25.0",
|
|
39
|
+
"eslint": "^8.16.0",
|
|
40
|
+
"eslint-plugin-react": "^7.30.0",
|
|
41
|
+
"rollup-plugin-filesize": "^9.1.2",
|
|
42
|
+
"rollup-plugin-json": "^4.0.0",
|
|
43
|
+
"rollup-plugin-terser": "^7.0.2"
|
|
44
|
+
},
|
|
45
|
+
"gitHead": "940c54b7600092f22175b650c4a6002186e48314"
|
|
46
|
+
}
|