abler-api 1.0.60 → 1.0.65
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 +5 -22
- package/package.json +7 -25
package/dist/cjs/pp-util.js
CHANGED
|
@@ -222,7 +222,7 @@ async function checkRedis() {
|
|
|
222
222
|
redis.error = e;
|
|
223
223
|
});
|
|
224
224
|
if (redis.error) {
|
|
225
|
-
console.log(t_f$3("未能成功連接
|
|
225
|
+
console.log(t_f$3("未能成功連接 red\n" + "npm\n" + "Search packages\n" + "Search\nis: %s,請檢查相關設置", redis.error));
|
|
226
226
|
return t_f$3("未能成功連接 redis: %s,請檢查相關設置", redis.error);
|
|
227
227
|
}
|
|
228
228
|
// console.log(`checkRedis done:`);
|
|
@@ -232,13 +232,8 @@ async function initDb() {
|
|
|
232
232
|
try {
|
|
233
233
|
await dbUtil$1.config(conf$3, err$1);
|
|
234
234
|
} catch (e) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
// if (e.reason === 'bad decrypt') {
|
|
239
|
-
// e = new Error(`解密Redis密码(${conf.redis.password})失败`);
|
|
240
|
-
// }
|
|
241
|
-
return t_f$3("初始化数据库连接失败(%s)", e.message);
|
|
235
|
+
let message = e.reason === 'bad decrypt' ? t_f$3("解密数据库密码(%s)失败", conf$3.dbConf.dbpwd) : e.message;
|
|
236
|
+
return t_f$3("初始化数据库连接失败(%s)", message);
|
|
242
237
|
}
|
|
243
238
|
}
|
|
244
239
|
async function initKvStorage(dbSql) {
|
|
@@ -1901,20 +1896,8 @@ class apiUtil$2 {
|
|
|
1901
1896
|
* 创建验证码对象
|
|
1902
1897
|
* npm i svg-captcha
|
|
1903
1898
|
*/
|
|
1904
|
-
static createSvgCaptcha(
|
|
1905
|
-
|
|
1906
|
-
inverse: options.hasOwnProperty('inverse') ? options.inverse : false,
|
|
1907
|
-
fontSize: options.fontSize || 48,
|
|
1908
|
-
noise: options.noise || 2,
|
|
1909
|
-
width: options.width || 150,
|
|
1910
|
-
height: options.height || 75,
|
|
1911
|
-
size: options.size || 4,
|
|
1912
|
-
charPreset: options.charPreset || '0123456789',
|
|
1913
|
-
ignoreChars: options.ignoreChars || '0oli',
|
|
1914
|
-
color: options.hasOwnProperty('color') ? options.color : true,
|
|
1915
|
-
background: options.background || '#cc9966'
|
|
1916
|
-
});
|
|
1917
|
-
return captcha;
|
|
1899
|
+
static async createSvgCaptcha(...args) {
|
|
1900
|
+
return await ppUtil$3.createCaptcha(...args);
|
|
1918
1901
|
}
|
|
1919
1902
|
|
|
1920
1903
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abler-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "API服务相关工具",
|
|
5
5
|
"main": "./dist/cjs/pp-util.js",
|
|
6
6
|
"-module": "./dist/es/pp-util.js",
|
|
@@ -15,33 +15,15 @@
|
|
|
15
15
|
"author": "peng_peng",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"abler-db": "^1.0.
|
|
19
|
-
"abler-i18n": "^1.0.
|
|
20
|
-
"abler-messenger": "^1.1.
|
|
21
|
-
"abler-net": "^1.0.
|
|
22
|
-
"abler-util": "^1.0.
|
|
18
|
+
"abler-db": "^1.0.73",
|
|
19
|
+
"abler-i18n": "^1.0.16",
|
|
20
|
+
"abler-messenger": "^1.1.28",
|
|
21
|
+
"abler-net": "^1.0.32",
|
|
22
|
+
"abler-util": "^1.0.32",
|
|
23
23
|
"basic-auth": "^2.0.1",
|
|
24
24
|
"node-cron": "^3.0.1",
|
|
25
25
|
"proxy-agent": "6.5.0",
|
|
26
26
|
"q": "^1.5.1"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
29
|
-
"@babel/core": "^7.18.5",
|
|
30
|
-
"@babel/eslint-parser": "^7.18.2",
|
|
31
|
-
"@babel/plugin-transform-runtime": "^7.18.0",
|
|
32
|
-
"@babel/preset-env": "^7.18.2",
|
|
33
|
-
"@babel/runtime": "^7.18.0",
|
|
34
|
-
"@rollup/plugin-babel": "^5.3.1",
|
|
35
|
-
"@rollup/plugin-commonjs": "^22.0.0",
|
|
36
|
-
"@rollup/plugin-eslint": "^8.0.2",
|
|
37
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^5.25.0",
|
|
39
|
-
"@typescript-eslint/parser": "^5.25.0",
|
|
40
|
-
"eslint": "^8.16.0",
|
|
41
|
-
"eslint-plugin-react": "^7.30.0",
|
|
42
|
-
"rollup-plugin-filesize": "^10.0.0",
|
|
43
|
-
"rollup-plugin-json": "^4.0.0",
|
|
44
|
-
"rollup-plugin-terser": "^7.0.2"
|
|
45
|
-
},
|
|
46
|
-
"gitHead": "817cbcb28593b6d119f12b0ae084c8015de77fca"
|
|
28
|
+
"gitHead": "7ae60872884d30c128ca6a006244f95a8ada9584"
|
|
47
29
|
}
|