@blocklet/sdk 1.16.43-beta-20250424-125523-08a65a5c → 1.16.43-beta-20250425-130658-8da18f4d

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.
@@ -40,8 +40,10 @@ const generateETag = (content) => {
40
40
  hash.update(content);
41
41
  return `W/"${hash.digest('base64')}"`;
42
42
  };
43
- const getCacheKey = (filePath, pageGroup, pathPrefix) => {
44
- return `${filePath}:${pageGroup}:${pathPrefix}`;
43
+ const getCacheKey = (pathname, filePath, pageGroup, pathPrefix) => {
44
+ const hash = crypto_1.default.createHash('sha1');
45
+ hash.update(`${pathname}:${filePath}:${pageGroup}:${pathPrefix}`);
46
+ return hash.digest('base64');
45
47
  };
46
48
  const tryWithTimeout = (asyncFn, timeout) => {
47
49
  if (typeof asyncFn !== 'function') {
@@ -79,7 +81,7 @@ const fallback = (file, options = {}) => {
79
81
  }
80
82
  const pageGroup = req.headers['x-page-group'] || '';
81
83
  const pathPrefix = req.headers['x-path-prefix'] || '';
82
- const cacheKey = getCacheKey(filePath, pageGroup, pathPrefix);
84
+ const cacheKey = getCacheKey(req.path, filePath, pageGroup, pathPrefix);
83
85
  if (cacheEnabled) {
84
86
  // Check cache first
85
87
  const cached = cache.get(cacheKey);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.43-beta-20250424-125523-08a65a5c",
6
+ "version": "1.16.43-beta-20250425-130658-8da18f4d",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,17 +27,17 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/client": "1.16.43-beta-20250424-125523-08a65a5c",
31
- "@abtnode/constant": "1.16.43-beta-20250424-125523-08a65a5c",
32
- "@abtnode/util": "1.16.43-beta-20250424-125523-08a65a5c",
30
+ "@abtnode/client": "1.16.43-beta-20250425-130658-8da18f4d",
31
+ "@abtnode/constant": "1.16.43-beta-20250425-130658-8da18f4d",
32
+ "@abtnode/util": "1.16.43-beta-20250425-130658-8da18f4d",
33
33
  "@arcblock/did": "1.20.2",
34
34
  "@arcblock/did-auth": "1.20.2",
35
35
  "@arcblock/jwt": "1.20.2",
36
36
  "@arcblock/ws": "1.20.2",
37
- "@blocklet/constant": "1.16.43-beta-20250424-125523-08a65a5c",
38
- "@blocklet/env": "1.16.43-beta-20250424-125523-08a65a5c",
37
+ "@blocklet/constant": "1.16.43-beta-20250425-130658-8da18f4d",
38
+ "@blocklet/env": "1.16.43-beta-20250425-130658-8da18f4d",
39
39
  "@blocklet/error": "^0.2.4",
40
- "@blocklet/meta": "1.16.43-beta-20250424-125523-08a65a5c",
40
+ "@blocklet/meta": "1.16.43-beta-20250425-130658-8da18f4d",
41
41
  "@did-connect/authenticator": "^2.2.7",
42
42
  "@did-connect/handler": "^2.2.7",
43
43
  "@nedb/core": "^2.1.5",
@@ -83,5 +83,5 @@
83
83
  "ts-node": "^10.9.1",
84
84
  "typescript": "^5.6.3"
85
85
  },
86
- "gitHead": "499de9f28770298a819122ba16a7f2b3cc78c7ee"
86
+ "gitHead": "b5195a0290d5ced00bb716a709548b1a56356134"
87
87
  }