mm_redis 2.1.7 → 2.1.8
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/example/index.js +40 -0
- package/index.js +11 -4111
- package/lib/redis.js +4085 -0
- package/package.json +12 -3
- package/test.js +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_redis",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "高效的Redis客户端封装库,提供连接池管理、数据类型操作、错误处理和批量操作优化",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"url": "git+https://gitee.com/qiuwenwu91/mm_redis.git"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
|
+
"mm_mod",
|
|
16
|
+
"mm_adapter",
|
|
17
|
+
"mm_redis",
|
|
15
18
|
"redis",
|
|
16
19
|
"cache",
|
|
17
20
|
"client",
|
|
@@ -22,9 +25,10 @@
|
|
|
22
25
|
"sorted-set",
|
|
23
26
|
"list",
|
|
24
27
|
"redis-client",
|
|
25
|
-
"mm_redis",
|
|
26
28
|
"nodejs"
|
|
27
29
|
],
|
|
30
|
+
"layer": "adapter",
|
|
31
|
+
"group": "redis",
|
|
28
32
|
"author": "qww",
|
|
29
33
|
"license": "ISC",
|
|
30
34
|
"bugs": {
|
|
@@ -32,10 +36,15 @@
|
|
|
32
36
|
},
|
|
33
37
|
"homepage": "https://www.npmjs.com/package/mm_redis",
|
|
34
38
|
"dependencies": {
|
|
35
|
-
"
|
|
39
|
+
"mm_corejs": "^1.1.4",
|
|
40
|
+
"mm_mod": "^1.0.1",
|
|
41
|
+
"mm_helper": "^1.0.0",
|
|
36
42
|
"redis": "^6.2.1"
|
|
37
43
|
},
|
|
38
44
|
"engines": {
|
|
39
45
|
"node": ">=14.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"mm_eslint": "^1.7.7"
|
|
40
49
|
}
|
|
41
50
|
}
|
package/test.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
// 独立运行时补充全局 $ 对象(mm_os 宿主环境已提供,npm 包测试需自备)
|
|
2
|
+
if (!global.$) {
|
|
3
|
+
global.$ = {
|
|
4
|
+
log: {
|
|
5
|
+
debug: console.debug ? console.debug.bind(console) : console.log.bind(console),
|
|
6
|
+
info: console.info ? console.info.bind(console) : console.log.bind(console),
|
|
7
|
+
warn: console.warn ? console.warn.bind(console) : console.log.bind(console),
|
|
8
|
+
error: console.error ? console.error.bind(console) : console.log.bind(console),
|
|
9
|
+
success: console.log.bind(console)
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
1
14
|
const { redisAdmin } = require('./index.js');
|
|
2
15
|
|
|
3
16
|
async function test() {
|
|
4
17
|
try {
|
|
5
18
|
var bl, num, arr = [];
|
|
6
19
|
var config = './config.json'.loadJson(__dirname);
|
|
7
|
-
var rs = redisAdmin('
|
|
20
|
+
var rs = redisAdmin('os', config);
|
|
8
21
|
await rs.open();
|
|
9
22
|
|
|
10
23
|
// 清理之前的测试数据
|