@abtnode/core 1.17.8-beta-20260106-113136-b3c09e14 → 1.17.8-beta-20260108-120904-21cb5fb6
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.
|
@@ -2338,6 +2338,17 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
2338
2338
|
return newState;
|
|
2339
2339
|
}
|
|
2340
2340
|
|
|
2341
|
+
async configDidConnectActions({ did, actionConfig = {} }, context) {
|
|
2342
|
+
const oldConfig = await states.blockletExtras.getSettings(did, 'actionConfig', {});
|
|
2343
|
+
const parsedData = JSON.parse(actionConfig);
|
|
2344
|
+
const mergeConfig = defaultsDeep(parsedData, oldConfig);
|
|
2345
|
+
await states.blockletExtras.setSettings(did, { actionConfig: mergeConfig });
|
|
2346
|
+
const newState = await this.getBlocklet(did);
|
|
2347
|
+
this.emit(BlockletInternalEvents.appSettingChanged, { appDid: did });
|
|
2348
|
+
this.emit(BlockletEvents.updated, { ...newState, context });
|
|
2349
|
+
return newState;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2341
2352
|
/**
|
|
2342
2353
|
* 测试邮件发送
|
|
2343
2354
|
* @param {string} did
|
|
@@ -39045,7 +39045,7 @@ module.exports = require("zlib");
|
|
|
39045
39045
|
/***/ ((module) => {
|
|
39046
39046
|
|
|
39047
39047
|
"use strict";
|
|
39048
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.17.7","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.17.7","@abtnode/auth":"1.17.7","@abtnode/certificate-manager":"1.17.7","@abtnode/constant":"1.17.7","@abtnode/cron":"1.17.7","@abtnode/db-cache":"1.17.7","@abtnode/docker-utils":"1.17.7","@abtnode/logger":"1.17.7","@abtnode/models":"1.17.7","@abtnode/queue":"1.17.7","@abtnode/rbac":"1.17.7","@abtnode/router-provider":"1.17.7","@abtnode/util":"1.17.7","@aigne/aigne-hub":"^0.10.15","@arcblock/did":"^1.28.
|
|
39048
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.17.7","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.17.7","@abtnode/auth":"1.17.7","@abtnode/certificate-manager":"1.17.7","@abtnode/constant":"1.17.7","@abtnode/cron":"1.17.7","@abtnode/db-cache":"1.17.7","@abtnode/docker-utils":"1.17.7","@abtnode/logger":"1.17.7","@abtnode/models":"1.17.7","@abtnode/queue":"1.17.7","@abtnode/rbac":"1.17.7","@abtnode/router-provider":"1.17.7","@abtnode/util":"1.17.7","@aigne/aigne-hub":"^0.10.15","@arcblock/did":"^1.28.4","@arcblock/did-connect-js":"^1.28.4","@arcblock/did-ext":"^1.28.4","@arcblock/did-motif":"^1.1.14","@arcblock/did-util":"^1.28.4","@arcblock/event-hub":"^1.28.4","@arcblock/jwt":"^1.28.4","@arcblock/pm2-events":"^0.0.5","@arcblock/validator":"^1.28.4","@arcblock/vc":"^1.28.4","@blocklet/constant":"1.17.7","@blocklet/did-space-js":"^1.2.14","@blocklet/env":"1.17.7","@blocklet/error":"^0.3.5","@blocklet/meta":"1.17.7","@blocklet/resolver":"1.17.7","@blocklet/sdk":"1.17.7","@blocklet/server-js":"1.17.7","@blocklet/store":"1.17.7","@blocklet/theme":"^3.4.5","@fidm/x509":"^1.2.1","@ocap/mcrypto":"^1.28.4","@ocap/util":"^1.28.4","@ocap/wallet":"^1.28.4","@slack/webhook":"^7.0.6","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":{"axios-mock-adapter":"^2.1.0","expand-tilde":"^2.0.2","express":"^4.18.2","unzipper":"^0.10.11"},"gitHead":"e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"}');
|
|
39049
39049
|
|
|
39050
39050
|
/***/ }),
|
|
39051
39051
|
|
package/lib/index.js
CHANGED
|
@@ -394,6 +394,7 @@ function ABTNode(options) {
|
|
|
394
394
|
configAuthentication: blockletManager.configAuthentication.bind(blockletManager),
|
|
395
395
|
migrateBlockletAuthentication: blockletManager.migrateBlockletAuthentication.bind(blockletManager),
|
|
396
396
|
configDidConnect: blockletManager.configDidConnect.bind(blockletManager),
|
|
397
|
+
configDidConnectActions: blockletManager.configDidConnectActions.bind(blockletManager),
|
|
397
398
|
joinFederatedLogin: blockletManager.joinFederatedLogin.bind(blockletManager),
|
|
398
399
|
quitFederatedLogin: blockletManager.quitFederatedLogin.bind(blockletManager),
|
|
399
400
|
disbandFederatedLogin: blockletManager.disbandFederatedLogin.bind(blockletManager),
|
package/lib/states/audit-log.js
CHANGED
|
@@ -355,6 +355,8 @@ const getLogContent = async (action, args, context, result, info, node) => {
|
|
|
355
355
|
return `updated authentication for blocklet ${getBlockletInfo(result, info)}:\n${args.authentication}`;
|
|
356
356
|
case 'configDidConnect':
|
|
357
357
|
return `updated DID Connect for blocklet ${getBlockletInfo(result, info)}:\n${args.didConnect}`;
|
|
358
|
+
case 'configDidConnectActions':
|
|
359
|
+
return `updated DID Connect Actions for blocklet ${getBlockletInfo(result, info)}:\n${args.actionConfig}`;
|
|
358
360
|
case 'joinFederatedLogin':
|
|
359
361
|
return `blocklet ${getBlockletInfo(result, info)} join federated login to ${args.appUrl}`;
|
|
360
362
|
case 'quitFederatedLogin':
|
package/lib/team/manager.js
CHANGED
|
@@ -755,6 +755,13 @@ class TeamManager extends EventEmitter {
|
|
|
755
755
|
const models = await this.getModels(did);
|
|
756
756
|
const db = new BaseState(models.Rbac);
|
|
757
757
|
const rbac = await createRBAC({ storage: new SequelizeStorage(db, did) });
|
|
758
|
+
|
|
759
|
+
// Reinitialize cache if it was deleted during async operations
|
|
760
|
+
if (!this.cache[pid]) {
|
|
761
|
+
logger.warn('Cache entry was deleted during RBAC initialization, reinitializing', { did, pid });
|
|
762
|
+
this.cache[pid] = getDefaultTeamState();
|
|
763
|
+
}
|
|
764
|
+
|
|
758
765
|
this.cache[pid].rbac = rbac;
|
|
759
766
|
|
|
760
767
|
const roles = await rbac.getRoles();
|
|
@@ -772,7 +779,12 @@ class TeamManager extends EventEmitter {
|
|
|
772
779
|
}
|
|
773
780
|
}
|
|
774
781
|
|
|
775
|
-
// use cache
|
|
782
|
+
// use cache - reinitialize if deleted
|
|
783
|
+
if (!this.cache[pid]) {
|
|
784
|
+
logger.warn('Cache entry was deleted, reinitializing before returning rbac', { did, pid });
|
|
785
|
+
this.cache[pid] = getDefaultTeamState();
|
|
786
|
+
}
|
|
787
|
+
|
|
776
788
|
return this.cache[pid].rbac;
|
|
777
789
|
}
|
|
778
790
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.8-beta-
|
|
6
|
+
"version": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -17,44 +17,44 @@
|
|
|
17
17
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@abtnode/analytics": "1.17.8-beta-
|
|
21
|
-
"@abtnode/auth": "1.17.8-beta-
|
|
22
|
-
"@abtnode/certificate-manager": "1.17.8-beta-
|
|
23
|
-
"@abtnode/constant": "1.17.8-beta-
|
|
24
|
-
"@abtnode/cron": "1.17.8-beta-
|
|
25
|
-
"@abtnode/db-cache": "1.17.8-beta-
|
|
26
|
-
"@abtnode/docker-utils": "1.17.8-beta-
|
|
27
|
-
"@abtnode/logger": "1.17.8-beta-
|
|
28
|
-
"@abtnode/models": "1.17.8-beta-
|
|
29
|
-
"@abtnode/queue": "1.17.8-beta-
|
|
30
|
-
"@abtnode/rbac": "1.17.8-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.17.8-beta-
|
|
32
|
-
"@abtnode/util": "1.17.8-beta-
|
|
20
|
+
"@abtnode/analytics": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
21
|
+
"@abtnode/auth": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
22
|
+
"@abtnode/certificate-manager": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
23
|
+
"@abtnode/constant": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
24
|
+
"@abtnode/cron": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
25
|
+
"@abtnode/db-cache": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
26
|
+
"@abtnode/docker-utils": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
27
|
+
"@abtnode/logger": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
28
|
+
"@abtnode/models": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
29
|
+
"@abtnode/queue": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
30
|
+
"@abtnode/rbac": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
31
|
+
"@abtnode/router-provider": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
32
|
+
"@abtnode/util": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
33
33
|
"@aigne/aigne-hub": "^0.10.15",
|
|
34
|
-
"@arcblock/did": "^1.28.
|
|
35
|
-
"@arcblock/did-connect-js": "^1.28.
|
|
36
|
-
"@arcblock/did-ext": "^1.28.
|
|
34
|
+
"@arcblock/did": "^1.28.4",
|
|
35
|
+
"@arcblock/did-connect-js": "^1.28.4",
|
|
36
|
+
"@arcblock/did-ext": "^1.28.4",
|
|
37
37
|
"@arcblock/did-motif": "^1.1.14",
|
|
38
|
-
"@arcblock/did-util": "^1.28.
|
|
39
|
-
"@arcblock/event-hub": "^1.28.
|
|
40
|
-
"@arcblock/jwt": "^1.28.
|
|
38
|
+
"@arcblock/did-util": "^1.28.4",
|
|
39
|
+
"@arcblock/event-hub": "^1.28.4",
|
|
40
|
+
"@arcblock/jwt": "^1.28.4",
|
|
41
41
|
"@arcblock/pm2-events": "^0.0.5",
|
|
42
|
-
"@arcblock/validator": "^1.28.
|
|
43
|
-
"@arcblock/vc": "^1.28.
|
|
44
|
-
"@blocklet/constant": "1.17.8-beta-
|
|
42
|
+
"@arcblock/validator": "^1.28.4",
|
|
43
|
+
"@arcblock/vc": "^1.28.4",
|
|
44
|
+
"@blocklet/constant": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
45
45
|
"@blocklet/did-space-js": "^1.2.14",
|
|
46
|
-
"@blocklet/env": "1.17.8-beta-
|
|
46
|
+
"@blocklet/env": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
47
47
|
"@blocklet/error": "^0.3.5",
|
|
48
|
-
"@blocklet/meta": "1.17.8-beta-
|
|
49
|
-
"@blocklet/resolver": "1.17.8-beta-
|
|
50
|
-
"@blocklet/sdk": "1.17.8-beta-
|
|
51
|
-
"@blocklet/server-js": "1.17.8-beta-
|
|
52
|
-
"@blocklet/store": "1.17.8-beta-
|
|
53
|
-
"@blocklet/theme": "^3.4.
|
|
48
|
+
"@blocklet/meta": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
49
|
+
"@blocklet/resolver": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
50
|
+
"@blocklet/sdk": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
51
|
+
"@blocklet/server-js": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
52
|
+
"@blocklet/store": "1.17.8-beta-20260108-120904-21cb5fb6",
|
|
53
|
+
"@blocklet/theme": "^3.4.5",
|
|
54
54
|
"@fidm/x509": "^1.2.1",
|
|
55
|
-
"@ocap/mcrypto": "^1.28.
|
|
56
|
-
"@ocap/util": "^1.28.
|
|
57
|
-
"@ocap/wallet": "^1.28.
|
|
55
|
+
"@ocap/mcrypto": "^1.28.4",
|
|
56
|
+
"@ocap/util": "^1.28.4",
|
|
57
|
+
"@ocap/wallet": "^1.28.4",
|
|
58
58
|
"@slack/webhook": "^7.0.6",
|
|
59
59
|
"archiver": "^7.0.1",
|
|
60
60
|
"axios": "^1.7.9",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"express": "^4.18.2",
|
|
115
115
|
"unzipper": "^0.10.11"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "81be4cd432cd3803b72514917e6197c31e916b9d"
|
|
118
118
|
}
|