@abtnode/util 1.17.5-beta-20251209-090953-3a59e7ac → 1.17.5-beta-20251214-122206-29056e8c
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/lib/blocklet.js +9 -3
- package/package.json +14 -14
package/lib/blocklet.js
CHANGED
|
@@ -42,10 +42,16 @@ const getComponentApiKey = ({ serverSk, app, component } = {}) => {
|
|
|
42
42
|
throw new Error('component.meta.did should not be empty');
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// Normalize installedAt to ISO string for consistent hashing
|
|
46
|
+
// This handles both Date objects and ISO strings
|
|
47
|
+
let installedAtStr = '';
|
|
48
|
+
if (component?.installedAt) {
|
|
49
|
+
installedAtStr =
|
|
50
|
+
component.installedAt instanceof Date ? component.installedAt.toISOString() : String(component.installedAt);
|
|
51
|
+
}
|
|
52
|
+
|
|
45
53
|
const hash = createHash('sha256');
|
|
46
|
-
const token = hash
|
|
47
|
-
.update(`${serverSk}${app?.meta?.did}${component?.meta?.did}${component?.installedAt}`)
|
|
48
|
-
.digest('base64');
|
|
54
|
+
const token = hash.update(`${serverSk}${app?.meta?.did}${component?.meta?.did}${installedAtStr}`).digest('base64');
|
|
49
55
|
return token;
|
|
50
56
|
};
|
|
51
57
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.5-beta-
|
|
6
|
+
"version": "1.17.5-beta-20251214-122206-29056e8c",
|
|
7
7
|
"description": "ArcBlock's JavaScript utility",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
"author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@abtnode/constant": "1.17.5-beta-
|
|
22
|
-
"@abtnode/db-cache": "1.17.5-beta-
|
|
23
|
-
"@arcblock/did": "^1.27.
|
|
24
|
-
"@arcblock/event-hub": "^1.27.
|
|
21
|
+
"@abtnode/constant": "1.17.5-beta-20251214-122206-29056e8c",
|
|
22
|
+
"@abtnode/db-cache": "1.17.5-beta-20251214-122206-29056e8c",
|
|
23
|
+
"@arcblock/did": "^1.27.14",
|
|
24
|
+
"@arcblock/event-hub": "^1.27.14",
|
|
25
25
|
"@arcblock/pm2": "^6.0.12",
|
|
26
|
-
"@blocklet/constant": "1.17.5-beta-
|
|
27
|
-
"@blocklet/error": "^0.3.
|
|
28
|
-
"@blocklet/meta": "1.17.5-beta-
|
|
29
|
-
"@blocklet/xss": "^0.3.
|
|
30
|
-
"@ocap/client": "^1.27.
|
|
31
|
-
"@ocap/mcrypto": "^1.27.
|
|
32
|
-
"@ocap/util": "^1.27.
|
|
33
|
-
"@ocap/wallet": "^1.27.
|
|
26
|
+
"@blocklet/constant": "1.17.5-beta-20251214-122206-29056e8c",
|
|
27
|
+
"@blocklet/error": "^0.3.4",
|
|
28
|
+
"@blocklet/meta": "1.17.5-beta-20251214-122206-29056e8c",
|
|
29
|
+
"@blocklet/xss": "^0.3.12",
|
|
30
|
+
"@ocap/client": "^1.27.14",
|
|
31
|
+
"@ocap/mcrypto": "^1.27.14",
|
|
32
|
+
"@ocap/util": "^1.27.14",
|
|
33
|
+
"@ocap/wallet": "^1.27.14",
|
|
34
34
|
"archiver": "^7.0.1",
|
|
35
35
|
"axios": "^1.7.9",
|
|
36
36
|
"axios-mock-adapter": "^2.1.0",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"express": "^4.18.2",
|
|
91
91
|
"fs-extra": "^11.2.0"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "6839aebc2fdccbfbe7448f1e38f90be300ee4051"
|
|
94
94
|
}
|