@abtnode/core 1.16.49 → 1.16.50-beta-20250902-084222-ed7de4a8

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.
@@ -37,7 +37,10 @@ const runUserHook = async (label, hookName, args) => {
37
37
  env: {
38
38
  ...getSafeEnv(env),
39
39
  BLOCKLET_HOOK_NAME: hookName,
40
- NODE_OPTIONS: getSecurityNodeOptions({ environmentObj: env, ...args }, nodeInfo.enableFileSystemIsolation),
40
+ NODE_OPTIONS: await getSecurityNodeOptions(
41
+ { environmentObj: env, ...args },
42
+ nodeInfo.enableFileSystemIsolation
43
+ ),
41
44
  },
42
45
  silent,
43
46
  timeout,
@@ -6279,6 +6279,9 @@ class FederatedBlockletManager extends DiskBlockletManager {
6279
6279
  }
6280
6280
  }
6281
6281
 
6282
+ // 获取第一次构建时的 options,但是要排除 channel 字段。在重发阶段会指定 channel
6283
+ const options = omit(get(notification, 'options', {}), ['channel']);
6284
+
6282
6285
  for (const channel of channels) {
6283
6286
  const resendReceivers = resendFailedOnly ? receiverObject[channel] : receiverObject.receivers;
6284
6287
 
@@ -6291,6 +6294,7 @@ class FederatedBlockletManager extends DiskBlockletManager {
6291
6294
  sender,
6292
6295
  pushOnly: true,
6293
6296
  isExist: true,
6297
+ options,
6294
6298
  });
6295
6299
  }
6296
6300
  } catch (error) {
@@ -38946,7 +38946,7 @@ module.exports = require("zlib");
38946
38946
  /***/ ((module) => {
38947
38947
 
38948
38948
  "use strict";
38949
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.16.48","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib","test":"node tools/jest.js","coverage":"npm run test -- --coverage"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.16.48","@abtnode/auth":"1.16.48","@abtnode/certificate-manager":"1.16.48","@abtnode/constant":"1.16.48","@abtnode/cron":"1.16.48","@abtnode/db-cache":"1.16.48","@abtnode/docker-utils":"1.16.48","@abtnode/logger":"1.16.48","@abtnode/models":"1.16.48","@abtnode/queue":"1.16.48","@abtnode/rbac":"1.16.48","@abtnode/router-provider":"1.16.48","@abtnode/static-server":"1.16.48","@abtnode/timemachine":"1.16.48","@abtnode/util":"1.16.48","@aigne/aigne-hub":"^0.8.5","@arcblock/did":"1.24.0","@arcblock/did-connect-js":"1.24.0","@arcblock/did-ext":"1.24.0","@arcblock/did-motif":"^1.1.14","@arcblock/did-util":"1.24.0","@arcblock/event-hub":"1.24.0","@arcblock/jwt":"1.24.0","@arcblock/pm2-events":"^0.0.5","@arcblock/validator":"1.24.0","@arcblock/vc":"1.24.0","@blocklet/constant":"1.16.48","@blocklet/did-space-js":"^1.1.19","@blocklet/env":"1.16.48","@blocklet/error":"^0.2.5","@blocklet/meta":"1.16.48","@blocklet/resolver":"1.16.48","@blocklet/sdk":"1.16.48","@blocklet/server-js":"1.16.48","@blocklet/store":"1.16.48","@blocklet/theme":"^3.1.33","@fidm/x509":"^1.2.1","@ocap/mcrypto":"1.24.0","@ocap/util":"1.24.0","@ocap/wallet":"1.24.0","@slack/webhook":"^5.0.4","archiver":"^7.0.1","axios":"^1.7.9","axon":"^2.0.3","chalk":"^4.1.2","cross-spawn":"^7.0.3","dayjs":"^1.11.13","deep-diff":"^1.0.2","detect-port":"^1.5.1","envfile":"^7.1.0","escape-string-regexp":"^4.0.0","fast-glob":"^3.3.2","filesize":"^10.1.1","flat":"^5.0.2","fs-extra":"^11.2.0","get-port":"^5.1.1","hasha":"^5.2.2","is-base64":"^1.1.0","is-cidr":"4","is-ip":"3","is-url":"^1.2.4","joi":"17.12.2","joi-extension-semver":"^5.0.0","js-yaml":"^4.1.0","kill-port":"^2.0.1","lodash":"^4.17.21","node-stream-zip":"^1.15.0","p-all":"^3.0.0","p-limit":"^3.1.0","p-map":"^4.0.0","p-retry":"^4.6.2","p-wait-for":"^3.2.0","private-ip":"^2.3.4","rate-limiter-flexible":"^5.0.5","read-last-lines":"^1.8.0","semver":"^7.6.3","sequelize":"^6.35.0","shelljs":"^0.8.5","slugify":"^1.6.6","ssri":"^8.0.1","stream-throttle":"^0.1.3","stream-to-promise":"^3.0.0","systeminformation":"^5.23.3","tail":"^2.2.4","tar":"^6.1.11","transliteration":"^2.3.5","ua-parser-js":"^1.0.2","ufo":"^1.5.3","uuid":"^11.1.0","valid-url":"^1.0.9","which":"^2.0.2","xbytes":"^1.8.0"},"devDependencies":{"expand-tilde":"^2.0.2","express":"^4.18.2","jest":"^29.7.0","unzipper":"^0.10.11"},"gitHead":"e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"}');
38949
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.16.49","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib","test":"node tools/jest.js","coverage":"npm run test -- --coverage"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.16.49","@abtnode/auth":"1.16.49","@abtnode/certificate-manager":"1.16.49","@abtnode/constant":"1.16.49","@abtnode/cron":"1.16.49","@abtnode/db-cache":"1.16.49","@abtnode/docker-utils":"1.16.49","@abtnode/logger":"1.16.49","@abtnode/models":"1.16.49","@abtnode/queue":"1.16.49","@abtnode/rbac":"1.16.49","@abtnode/router-provider":"1.16.49","@abtnode/static-server":"1.16.49","@abtnode/timemachine":"1.16.49","@abtnode/util":"1.16.49","@aigne/aigne-hub":"^0.8.6","@arcblock/did":"1.24.0","@arcblock/did-connect-js":"1.24.0","@arcblock/did-ext":"1.24.0","@arcblock/did-motif":"^1.1.14","@arcblock/did-util":"1.24.0","@arcblock/event-hub":"1.24.0","@arcblock/jwt":"1.24.0","@arcblock/pm2-events":"^0.0.5","@arcblock/validator":"1.24.0","@arcblock/vc":"1.24.0","@blocklet/constant":"1.16.49","@blocklet/did-space-js":"^1.1.19","@blocklet/env":"1.16.49","@blocklet/error":"^0.2.5","@blocklet/meta":"1.16.49","@blocklet/resolver":"1.16.49","@blocklet/sdk":"1.16.49","@blocklet/server-js":"1.16.49","@blocklet/store":"1.16.49","@blocklet/theme":"^3.1.33","@fidm/x509":"^1.2.1","@ocap/mcrypto":"1.24.0","@ocap/util":"1.24.0","@ocap/wallet":"1.24.0","@slack/webhook":"^5.0.4","archiver":"^7.0.1","axios":"^1.7.9","axon":"^2.0.3","chalk":"^4.1.2","cross-spawn":"^7.0.3","dayjs":"^1.11.13","deep-diff":"^1.0.2","detect-port":"^1.5.1","envfile":"^7.1.0","escape-string-regexp":"^4.0.0","fast-glob":"^3.3.2","filesize":"^10.1.1","flat":"^5.0.2","fs-extra":"^11.2.0","get-port":"^5.1.1","hasha":"^5.2.2","is-base64":"^1.1.0","is-cidr":"4","is-ip":"3","is-url":"^1.2.4","joi":"17.12.2","joi-extension-semver":"^5.0.0","js-yaml":"^4.1.0","kill-port":"^2.0.1","lodash":"^4.17.21","node-stream-zip":"^1.15.0","p-all":"^3.0.0","p-limit":"^3.1.0","p-map":"^4.0.0","p-retry":"^4.6.2","p-wait-for":"^3.2.0","private-ip":"^2.3.4","rate-limiter-flexible":"^5.0.5","read-last-lines":"^1.8.0","semver":"^7.6.3","sequelize":"^6.35.0","shelljs":"^0.8.5","slugify":"^1.6.6","ssri":"^8.0.1","stream-throttle":"^0.1.3","stream-to-promise":"^3.0.0","systeminformation":"^5.23.3","tail":"^2.2.4","tar":"^6.1.11","transliteration":"^2.3.5","ua-parser-js":"^1.0.2","ufo":"^1.5.3","uuid":"^11.1.0","valid-url":"^1.0.9","which":"^2.0.2","xbytes":"^1.8.0"},"devDependencies":{"expand-tilde":"^2.0.2","express":"^4.18.2","jest":"^29.7.0","unzipper":"^0.10.11"},"gitHead":"e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"}');
38950
38950
 
38951
38951
  /***/ }),
38952
38952
 
@@ -119,6 +119,7 @@ class NotificationState extends BaseState {
119
119
  feedType: payload.feedType || '',
120
120
  data: payload.data || {},
121
121
  activity: payload.activity || {},
122
+ options: payload.options || {},
122
123
  };
123
124
  const doc = await this.insert(notificationData);
124
125
 
@@ -306,6 +306,9 @@ class User extends ExtendBase {
306
306
  if (!exist) {
307
307
  throw new CustomError(404, `inviter not found: ${inviter}`);
308
308
  }
309
+ if (!isValid(exist.did)) {
310
+ throw new CustomError(400, 'inviter exist did invalid');
311
+ }
309
312
 
310
313
  try {
311
314
  const { pageSize: size = 20, page = 1 } = paging || {};
@@ -314,7 +317,7 @@ class User extends ExtendBase {
314
317
  // LIMIT ${pageSize} OFFSET ${offset}
315
318
  const subQuery = `
316
319
  WITH RECURSIVE UserTree(did,inviter,generation,createdAt) AS (
317
- SELECT did,inviter,generation,"createdAt" FROM users WHERE inviter="${exist.did}"
320
+ SELECT did,inviter,generation,"createdAt" FROM users WHERE inviter='${exist.did}'
318
321
  UNION ALL
319
322
  SELECT child.did,child.inviter,child.generation,child."createdAt" FROM users AS child INNER JOIN UserTree AS parent ON (child.inviter=parent.did) ORDER BY child."createdAt" DESC
320
323
  )
@@ -338,10 +341,14 @@ SELECT did,inviter,generation FROM UserTree ${generation > 0 ? `WHERE generation
338
341
  throw new CustomError(404, `invitee not found: ${invitee}`);
339
342
  }
340
343
 
344
+ if (!isValid(exist.did)) {
345
+ throw new CustomError(400, 'invitee exist did invalid');
346
+ }
347
+
341
348
  try {
342
349
  const subQuery = `
343
350
  WITH RECURSIVE UserTree(did,inviter,generation) AS (
344
- SELECT did,inviter,generation FROM users WHERE did="${exist.did}"
351
+ SELECT did,inviter,generation FROM users WHERE did='${exist.did}'
345
352
  UNION ALL
346
353
  SELECT
347
354
  inviter,
@@ -714,7 +714,7 @@ const startBlockletProcess = async (
714
714
  ...env,
715
715
  NODE_ENV: 'production',
716
716
  BLOCKLET_START_AT: now,
717
- NODE_OPTIONS: getSecurityNodeOptions(b, nodeInfo.enableFileSystemIsolation),
717
+ NODE_OPTIONS: await getSecurityNodeOptions(b, nodeInfo.enableFileSystemIsolation),
718
718
  },
719
719
  script,
720
720
  args,
@@ -17,6 +17,7 @@ const REMOVE_FIELDS = [
17
17
  'source',
18
18
  'severity',
19
19
  'receivers',
20
+ 'options',
20
21
  ];
21
22
 
22
23
  // eslint-disable-next-line import/prefer-default-export
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.49",
6
+ "version": "1.16.50-beta-20250902-084222-ed7de4a8",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,22 +19,22 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@abtnode/analytics": "1.16.49",
23
- "@abtnode/auth": "1.16.49",
24
- "@abtnode/certificate-manager": "1.16.49",
25
- "@abtnode/constant": "1.16.49",
26
- "@abtnode/cron": "1.16.49",
27
- "@abtnode/db-cache": "1.16.49",
28
- "@abtnode/docker-utils": "1.16.49",
29
- "@abtnode/logger": "1.16.49",
30
- "@abtnode/models": "1.16.49",
31
- "@abtnode/queue": "1.16.49",
32
- "@abtnode/rbac": "1.16.49",
33
- "@abtnode/router-provider": "1.16.49",
34
- "@abtnode/static-server": "1.16.49",
35
- "@abtnode/timemachine": "1.16.49",
36
- "@abtnode/util": "1.16.49",
37
- "@aigne/aigne-hub": "^0.8.5",
22
+ "@abtnode/analytics": "1.16.50-beta-20250902-084222-ed7de4a8",
23
+ "@abtnode/auth": "1.16.50-beta-20250902-084222-ed7de4a8",
24
+ "@abtnode/certificate-manager": "1.16.50-beta-20250902-084222-ed7de4a8",
25
+ "@abtnode/constant": "1.16.50-beta-20250902-084222-ed7de4a8",
26
+ "@abtnode/cron": "1.16.50-beta-20250902-084222-ed7de4a8",
27
+ "@abtnode/db-cache": "1.16.50-beta-20250902-084222-ed7de4a8",
28
+ "@abtnode/docker-utils": "1.16.50-beta-20250902-084222-ed7de4a8",
29
+ "@abtnode/logger": "1.16.50-beta-20250902-084222-ed7de4a8",
30
+ "@abtnode/models": "1.16.50-beta-20250902-084222-ed7de4a8",
31
+ "@abtnode/queue": "1.16.50-beta-20250902-084222-ed7de4a8",
32
+ "@abtnode/rbac": "1.16.50-beta-20250902-084222-ed7de4a8",
33
+ "@abtnode/router-provider": "1.16.50-beta-20250902-084222-ed7de4a8",
34
+ "@abtnode/static-server": "1.16.50-beta-20250902-084222-ed7de4a8",
35
+ "@abtnode/timemachine": "1.16.50-beta-20250902-084222-ed7de4a8",
36
+ "@abtnode/util": "1.16.50-beta-20250902-084222-ed7de4a8",
37
+ "@aigne/aigne-hub": "^0.8.6",
38
38
  "@arcblock/did": "1.24.0",
39
39
  "@arcblock/did-connect-js": "1.24.0",
40
40
  "@arcblock/did-ext": "1.24.0",
@@ -45,15 +45,15 @@
45
45
  "@arcblock/pm2-events": "^0.0.5",
46
46
  "@arcblock/validator": "1.24.0",
47
47
  "@arcblock/vc": "1.24.0",
48
- "@blocklet/constant": "1.16.49",
48
+ "@blocklet/constant": "1.16.50-beta-20250902-084222-ed7de4a8",
49
49
  "@blocklet/did-space-js": "^1.1.19",
50
- "@blocklet/env": "1.16.49",
50
+ "@blocklet/env": "1.16.50-beta-20250902-084222-ed7de4a8",
51
51
  "@blocklet/error": "^0.2.5",
52
- "@blocklet/meta": "1.16.49",
53
- "@blocklet/resolver": "1.16.49",
54
- "@blocklet/sdk": "1.16.49",
55
- "@blocklet/server-js": "1.16.49",
56
- "@blocklet/store": "1.16.49",
52
+ "@blocklet/meta": "1.16.50-beta-20250902-084222-ed7de4a8",
53
+ "@blocklet/resolver": "1.16.50-beta-20250902-084222-ed7de4a8",
54
+ "@blocklet/sdk": "1.16.50-beta-20250902-084222-ed7de4a8",
55
+ "@blocklet/server-js": "1.16.50-beta-20250902-084222-ed7de4a8",
56
+ "@blocklet/store": "1.16.50-beta-20250902-084222-ed7de4a8",
57
57
  "@blocklet/theme": "^3.1.33",
58
58
  "@fidm/x509": "^1.2.1",
59
59
  "@ocap/mcrypto": "1.24.0",
@@ -118,5 +118,5 @@
118
118
  "jest": "^29.7.0",
119
119
  "unzipper": "^0.10.11"
120
120
  },
121
- "gitHead": "58c3ce97ab6586c52c5cee838a072d49ccb59b4b"
121
+ "gitHead": "a38c234351b618eeaea323c8cd7dee9760ab030f"
122
122
  }