@abtnode/core 1.16.49-beta-20250902-002109-7f238eb8 → 1.16.50-beta-20250902-043619-201bcaed
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/hooks.js +4 -1
- package/lib/blocklet/manager/disk.js +4 -0
- package/lib/blocklet/migration-dist/migration.cjs +1 -1
- package/lib/states/notification.js +1 -0
- package/lib/states/user.js +9 -2
- package/lib/util/blocklet.js +1 -1
- package/lib/util/notification.js +1 -0
- package/package.json +25 -25
package/lib/blocklet/hooks.js
CHANGED
|
@@ -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(
|
|
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.
|
|
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
|
|
package/lib/states/user.js
CHANGED
|
@@ -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=
|
|
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=
|
|
351
|
+
SELECT did,inviter,generation FROM users WHERE did='${exist.did}'
|
|
345
352
|
UNION ALL
|
|
346
353
|
SELECT
|
|
347
354
|
inviter,
|
package/lib/util/blocklet.js
CHANGED
|
@@ -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,
|
package/lib/util/notification.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.50-beta-20250902-043619-201bcaed",
|
|
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.
|
|
23
|
-
"@abtnode/auth": "1.16.
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.
|
|
25
|
-
"@abtnode/constant": "1.16.
|
|
26
|
-
"@abtnode/cron": "1.16.
|
|
27
|
-
"@abtnode/db-cache": "1.16.
|
|
28
|
-
"@abtnode/docker-utils": "1.16.
|
|
29
|
-
"@abtnode/logger": "1.16.
|
|
30
|
-
"@abtnode/models": "1.16.
|
|
31
|
-
"@abtnode/queue": "1.16.
|
|
32
|
-
"@abtnode/rbac": "1.16.
|
|
33
|
-
"@abtnode/router-provider": "1.16.
|
|
34
|
-
"@abtnode/static-server": "1.16.
|
|
35
|
-
"@abtnode/timemachine": "1.16.
|
|
36
|
-
"@abtnode/util": "1.16.
|
|
37
|
-
"@aigne/aigne-hub": "^0.8.
|
|
22
|
+
"@abtnode/analytics": "1.16.50-beta-20250902-043619-201bcaed",
|
|
23
|
+
"@abtnode/auth": "1.16.50-beta-20250902-043619-201bcaed",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.50-beta-20250902-043619-201bcaed",
|
|
25
|
+
"@abtnode/constant": "1.16.50-beta-20250902-043619-201bcaed",
|
|
26
|
+
"@abtnode/cron": "1.16.50-beta-20250902-043619-201bcaed",
|
|
27
|
+
"@abtnode/db-cache": "1.16.50-beta-20250902-043619-201bcaed",
|
|
28
|
+
"@abtnode/docker-utils": "1.16.50-beta-20250902-043619-201bcaed",
|
|
29
|
+
"@abtnode/logger": "1.16.50-beta-20250902-043619-201bcaed",
|
|
30
|
+
"@abtnode/models": "1.16.50-beta-20250902-043619-201bcaed",
|
|
31
|
+
"@abtnode/queue": "1.16.50-beta-20250902-043619-201bcaed",
|
|
32
|
+
"@abtnode/rbac": "1.16.50-beta-20250902-043619-201bcaed",
|
|
33
|
+
"@abtnode/router-provider": "1.16.50-beta-20250902-043619-201bcaed",
|
|
34
|
+
"@abtnode/static-server": "1.16.50-beta-20250902-043619-201bcaed",
|
|
35
|
+
"@abtnode/timemachine": "1.16.50-beta-20250902-043619-201bcaed",
|
|
36
|
+
"@abtnode/util": "1.16.50-beta-20250902-043619-201bcaed",
|
|
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.
|
|
48
|
+
"@blocklet/constant": "1.16.50-beta-20250902-043619-201bcaed",
|
|
49
49
|
"@blocklet/did-space-js": "^1.1.19",
|
|
50
|
-
"@blocklet/env": "1.16.
|
|
50
|
+
"@blocklet/env": "1.16.50-beta-20250902-043619-201bcaed",
|
|
51
51
|
"@blocklet/error": "^0.2.5",
|
|
52
|
-
"@blocklet/meta": "1.16.
|
|
53
|
-
"@blocklet/resolver": "1.16.
|
|
54
|
-
"@blocklet/sdk": "1.16.
|
|
55
|
-
"@blocklet/server-js": "1.16.
|
|
56
|
-
"@blocklet/store": "1.16.
|
|
52
|
+
"@blocklet/meta": "1.16.50-beta-20250902-043619-201bcaed",
|
|
53
|
+
"@blocklet/resolver": "1.16.50-beta-20250902-043619-201bcaed",
|
|
54
|
+
"@blocklet/sdk": "1.16.50-beta-20250902-043619-201bcaed",
|
|
55
|
+
"@blocklet/server-js": "1.16.50-beta-20250902-043619-201bcaed",
|
|
56
|
+
"@blocklet/store": "1.16.50-beta-20250902-043619-201bcaed",
|
|
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": "
|
|
121
|
+
"gitHead": "303555dda4a22370d579651b10886d05688c5533"
|
|
122
122
|
}
|