@abtnode/blocklet-services 1.16.54-beta-20251024-030947-6f2889bf → 1.16.54-beta-20251028-073105-3ed10cef

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/api/libs/jwt.js CHANGED
@@ -53,8 +53,8 @@ const initJwt = (node, options) => {
53
53
  oauth = null,
54
54
  org = '',
55
55
  }
56
- ) =>
57
- createAuthToken({
56
+ ) => {
57
+ return createAuthToken({
58
58
  did,
59
59
  passport,
60
60
  role,
@@ -69,6 +69,7 @@ const initJwt = (node, options) => {
69
69
  oauth,
70
70
  org: org || defaultOrg,
71
71
  });
72
+ };
72
73
 
73
74
  /**
74
75
  * Verifies a JWT session token
@@ -1,6 +1,6 @@
1
1
  const { BlockletStatus } = require('@blocklet/constant');
2
2
  const { WELLKNOWN_BLOCKLET_ADMIN_PATH } = require('@abtnode/constant');
3
- const getBlockletMaintenanceTemplate = require('@abtnode/router-templates/lib/blocklet-maintenance');
3
+ const { getBlockletMaintenanceTemplate } = require('@abtnode/router-templates/lib/blocklet-maintenance');
4
4
  const { findComponentByIdV2 } = require('@blocklet/meta/lib/util');
5
5
 
6
6
  const { shouldGotoStartPage, getRedirectUrl, redirectWithoutCache } = require('../util');
@@ -290,8 +290,11 @@ module.exports = {
290
290
  return;
291
291
  }
292
292
 
293
- // Pass options to getWalletFromBlocklet (already supports keyType)
294
- const wallet = getWalletFromBlocklet({ blocklet, options });
293
+ // Force ethereum type for ethSign - pass type: 'ethereum' explicitly
294
+ const wallet = getWalletFromBlocklet({
295
+ blocklet,
296
+ options: { ...options, type: 'ethereum' },
297
+ });
295
298
  const signature = await wallet.ethSign(data, hashBeforeSign);
296
299
 
297
300
  const componentId = req.headers['x-component-did'];
@@ -337,14 +340,14 @@ module.exports = {
337
340
  (req, res) => {
338
341
  try {
339
342
  const { blocklet } = req;
340
- const { sub, type, index } = req.body || {};
343
+ const { sub, type, index, options } = req.body || {};
341
344
 
342
345
  if (!sub) {
343
346
  res.status(400).json({ error: 'Sub is required' });
344
347
  return;
345
348
  }
346
349
 
347
- const wallet = getWalletFromBlocklet({ blocklet, options: { type } });
350
+ const wallet = getWalletFromBlocklet({ blocklet, options: { type, ...options } });
348
351
  const userWallet = fromAppDid(sub, wallet.secretKey, type, index);
349
352
 
350
353
  const componentId = req.headers['x-component-did'];
@@ -28,7 +28,7 @@ const _getSecurityConfig = async ({ node, blockletDid, id, componentMountPoints,
28
28
  try {
29
29
  const { securityRules: rawSecurityRules } = await node.getBlockletSecurityRules({
30
30
  did: blockletDid,
31
- formated: true,
31
+ formatted: true,
32
32
  });
33
33
  // NOTICE: 如果指定的组件已经不存在,则跳过对应的安全规则
34
34
  const securityRules = rawSecurityRules.filter((x) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.54-beta-20251024-030947-6f2889bf",
6
+ "version": "1.16.54-beta-20251028-073105-3ed10cef",
7
7
  "description": "Provide unified services for every blocklet",
8
8
  "main": "api/index.js",
9
9
  "files": [
@@ -14,8 +14,8 @@
14
14
  "scripts": {
15
15
  "lint": "eslint tests api src --ext js --ext jsx",
16
16
  "lint:fix": "npm run lint -- --fix",
17
- "test": "bun test",
18
- "coverage": "bun test --coverage",
17
+ "test": "bun test --bail --timeout 30000",
18
+ "coverage": "bun test --bail --timeout 30000 --coverage",
19
19
  "prepublishOnly": "npm run build",
20
20
  "clean": "rm -rf dist",
21
21
  "start": "npm-run-all --parallel start:*",
@@ -34,17 +34,17 @@
34
34
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
35
35
  "license": "Apache-2.0",
36
36
  "dependencies": {
37
- "@abtnode/analytics": "1.16.54-beta-20251024-030947-6f2889bf",
38
- "@abtnode/auth": "1.16.54-beta-20251024-030947-6f2889bf",
39
- "@abtnode/connect-storage": "1.16.54-beta-20251024-030947-6f2889bf",
40
- "@abtnode/constant": "1.16.54-beta-20251024-030947-6f2889bf",
41
- "@abtnode/core": "1.16.54-beta-20251024-030947-6f2889bf",
42
- "@abtnode/cron": "1.16.54-beta-20251024-030947-6f2889bf",
43
- "@abtnode/db-cache": "1.16.54-beta-20251024-030947-6f2889bf",
44
- "@abtnode/logger": "1.16.54-beta-20251024-030947-6f2889bf",
45
- "@abtnode/models": "1.16.54-beta-20251024-030947-6f2889bf",
46
- "@abtnode/router-templates": "1.16.54-beta-20251024-030947-6f2889bf",
47
- "@abtnode/util": "1.16.54-beta-20251024-030947-6f2889bf",
37
+ "@abtnode/analytics": "1.16.54-beta-20251028-073105-3ed10cef",
38
+ "@abtnode/auth": "1.16.54-beta-20251028-073105-3ed10cef",
39
+ "@abtnode/connect-storage": "1.16.54-beta-20251028-073105-3ed10cef",
40
+ "@abtnode/constant": "1.16.54-beta-20251028-073105-3ed10cef",
41
+ "@abtnode/core": "1.16.54-beta-20251028-073105-3ed10cef",
42
+ "@abtnode/cron": "1.16.54-beta-20251028-073105-3ed10cef",
43
+ "@abtnode/db-cache": "1.16.54-beta-20251028-073105-3ed10cef",
44
+ "@abtnode/logger": "1.16.54-beta-20251028-073105-3ed10cef",
45
+ "@abtnode/models": "1.16.54-beta-20251028-073105-3ed10cef",
46
+ "@abtnode/router-templates": "1.16.54-beta-20251028-073105-3ed10cef",
47
+ "@abtnode/util": "1.16.54-beta-20251028-073105-3ed10cef",
48
48
  "@arcblock/did": "^1.26.3",
49
49
  "@arcblock/did-connect-js": "^1.26.3",
50
50
  "@arcblock/did-ext": "^1.26.3",
@@ -54,18 +54,18 @@
54
54
  "@arcblock/jwt": "^1.26.3",
55
55
  "@arcblock/validator": "^1.26.3",
56
56
  "@arcblock/ws": "^1.26.3",
57
- "@blocklet/constant": "1.16.54-beta-20251024-030947-6f2889bf",
57
+ "@blocklet/constant": "1.16.54-beta-20251028-073105-3ed10cef",
58
58
  "@blocklet/dbhub": "^0.2.9",
59
- "@blocklet/env": "1.16.54-beta-20251024-030947-6f2889bf",
59
+ "@blocklet/env": "1.16.54-beta-20251028-073105-3ed10cef",
60
60
  "@blocklet/error": "^0.2.5",
61
61
  "@blocklet/form-builder": "^0.1.12",
62
62
  "@blocklet/form-collector": "^0.1.8",
63
- "@blocklet/images": "1.16.54-beta-20251024-030947-6f2889bf",
64
- "@blocklet/js-sdk": "1.16.54-beta-20251024-030947-6f2889bf",
65
- "@blocklet/meta": "1.16.54-beta-20251024-030947-6f2889bf",
66
- "@blocklet/rate-limit": "1.16.54-beta-20251024-030947-6f2889bf",
67
- "@blocklet/sdk": "1.16.54-beta-20251024-030947-6f2889bf",
68
- "@blocklet/server-js": "1.16.54-beta-20251024-030947-6f2889bf",
63
+ "@blocklet/images": "1.16.54-beta-20251028-073105-3ed10cef",
64
+ "@blocklet/js-sdk": "1.16.54-beta-20251028-073105-3ed10cef",
65
+ "@blocklet/meta": "1.16.54-beta-20251028-073105-3ed10cef",
66
+ "@blocklet/rate-limit": "1.16.54-beta-20251028-073105-3ed10cef",
67
+ "@blocklet/sdk": "1.16.54-beta-20251028-073105-3ed10cef",
68
+ "@blocklet/server-js": "1.16.54-beta-20251028-073105-3ed10cef",
69
69
  "@blocklet/theme": "^3.1.51",
70
70
  "@blocklet/theme-builder": "0.4.7",
71
71
  "@blocklet/uploader-server": "^0.2.15",
@@ -125,7 +125,7 @@
125
125
  "whatwg-url": "14.0.0"
126
126
  },
127
127
  "devDependencies": {
128
- "@abtnode/ux": "1.16.54-beta-20251024-030947-6f2889bf",
128
+ "@abtnode/ux": "1.16.54-beta-20251028-073105-3ed10cef",
129
129
  "@arcblock/bridge": "^3.1.51",
130
130
  "@arcblock/did-connect-react": "^3.1.51",
131
131
  "@arcblock/icons": "^3.1.51",
@@ -135,7 +135,7 @@
135
135
  "@blocklet/did-space-react": "^1.1.34",
136
136
  "@blocklet/launcher-layout": "^3.1.51",
137
137
  "@blocklet/payment-react": "^1.21.17",
138
- "@blocklet/tracker": "1.16.54-beta-20251024-030947-6f2889bf",
138
+ "@blocklet/tracker": "1.16.54-beta-20251028-073105-3ed10cef",
139
139
  "@blocklet/ui-react": "^3.1.51",
140
140
  "@blocklet/uploader": "^0.2.15",
141
141
  "@emotion/react": "^11.14.0",
@@ -156,7 +156,6 @@
156
156
  "express-routemap": "^1.6.0",
157
157
  "file-type": "16",
158
158
  "flat": "^5.0.2",
159
- "jest": "^29.7.0",
160
159
  "js-cookie": "^3.0.5",
161
160
  "lodash-es": "^4.17.21",
162
161
  "mutationobserver-shim": "^0.3.7",
@@ -216,5 +215,5 @@
216
215
  "url": "https://github.com/ArcBlock/blocklet-server/issues",
217
216
  "email": "shijun@arcblock.io"
218
217
  },
219
- "gitHead": "73e5a3a80b82a2a7c62d42fdc08207b28e67633e"
218
+ "gitHead": "3002dd309759dd23c921b098b9edbef08838b734"
220
219
  }