@zenweb/cache 4.3.0 → 4.3.1
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/utils.d.ts +1 -2
- package/dist/utils.js +2 -2
- package/package.json +9 -6
- package/CHANGELOG.md +0 -32
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cacheKey = exports.runRedisScript = exports.sleep = exports.debug = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@zenweb/core");
|
|
5
5
|
const crypto = require("crypto");
|
|
6
|
-
exports.debug = (0,
|
|
6
|
+
exports.debug = (0, core_1.zenwebDebug)('cache');
|
|
7
7
|
/**
|
|
8
8
|
* Promise 等待
|
|
9
9
|
* @param ms 毫秒
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenweb/cache",
|
|
3
|
-
"
|
|
3
|
+
"packageManager": "yarn@4.0.2",
|
|
4
|
+
"version": "4.3.1",
|
|
4
5
|
"description": "Zenweb Cache module",
|
|
5
6
|
"exports": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
@@ -8,10 +9,11 @@
|
|
|
8
9
|
"dist"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
12
|
+
"vscode": "yarn dlx @yarnpkg/sdks vscode",
|
|
11
13
|
"build": "rimraf dist && tsc",
|
|
12
|
-
"prepublishOnly": "
|
|
14
|
+
"prepublishOnly": "yarn run build",
|
|
13
15
|
"test": "ts-mocha -p tsconfig.json test/**/*.test.ts",
|
|
14
|
-
"dev": "cd example && cross-env DEBUG
|
|
16
|
+
"dev": "cd example && cross-env DEBUG=\\* NODE_ENV=development ts-node app"
|
|
15
17
|
},
|
|
16
18
|
"author": {
|
|
17
19
|
"name": "YeFei",
|
|
@@ -31,16 +33,17 @@
|
|
|
31
33
|
"homepage": "https://zenweb.node.ltd/docs/modules/cache",
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"@types/mocha": "^10.0.1",
|
|
36
|
+
"@types/node": "^20.10.6",
|
|
34
37
|
"cross-env": "^7.0.3",
|
|
35
38
|
"mocha": "^10.2.0",
|
|
36
39
|
"rimraf": "^4.3.1",
|
|
37
40
|
"ts-mocha": "^10.0.0",
|
|
38
41
|
"ts-node": "^10.9.1",
|
|
39
|
-
"typescript": "^5.
|
|
40
|
-
"zenweb": "^4.
|
|
42
|
+
"typescript": "^5.3.3",
|
|
43
|
+
"zenweb": "^4.2.7"
|
|
41
44
|
},
|
|
42
45
|
"dependencies": {
|
|
43
|
-
"
|
|
46
|
+
"@zenweb/core": "^4.2.3",
|
|
44
47
|
"ioredis": "^5.3.2"
|
|
45
48
|
}
|
|
46
49
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [4.3.0] - 2023-12-14
|
|
4
|
-
normalKey 改名为 cacheKey
|
|
5
|
-
retryCount 参数说明,并修改默认值为 10
|
|
6
|
-
|
|
7
|
-
## [4.2.2] - 2023-8-23
|
|
8
|
-
修改: 除了 Buffer 类型意外全部都使用 JSON 序列化
|
|
9
|
-
|
|
10
|
-
## [4.2.1] - 2023-8-23
|
|
11
|
-
fix: 内容未压缩,客户端支持压缩内容时却标识为压缩内容
|
|
12
|
-
|
|
13
|
-
## [4.2.0] - 2023-8-22
|
|
14
|
-
更新: cached 中间件支持 null key,不使用缓存
|
|
15
|
-
|
|
16
|
-
## [4.1.3] - 2023-8-21
|
|
17
|
-
fix: 二次获取缓存数据时会返回压缩数据的问题
|
|
18
|
-
|
|
19
|
-
## [4.1.2] - 2023-8-21
|
|
20
|
-
fix: 首次缓存新数据时会返回压缩数据的问题
|
|
21
|
-
|
|
22
|
-
## [4.1.1] - 2023-8-18
|
|
23
|
-
增加 normalKey number 参数
|
|
24
|
-
|
|
25
|
-
## [4.1.0] - 2023-8-18
|
|
26
|
-
增加 normalKey 方法
|
|
27
|
-
|
|
28
|
-
## [4.0.1] - 2023-8-17
|
|
29
|
-
cached 中间件增加 type 参数
|
|
30
|
-
|
|
31
|
-
## [4.0.0] - 2023-8-8
|
|
32
|
-
发布
|