@abtnode/core 1.17.8-beta-20260108-021819-e099f0ca → 1.17.8-beta-20260108-224855-28496abb
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/team/manager.js +26 -1
- package/package.json +22 -22
package/lib/team/manager.js
CHANGED
|
@@ -710,12 +710,25 @@ class TeamManager extends EventEmitter {
|
|
|
710
710
|
this.cache[pid] = getDefaultTeamState();
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
+
// Reinitialize cache if deleted during async operations
|
|
714
|
+
if (!this.cache[pid]) {
|
|
715
|
+
logger.warn('Cache entry was deleted, reinitializing before checking state', { teamDid, pid, key });
|
|
716
|
+
this.cache[pid] = getDefaultTeamState();
|
|
717
|
+
}
|
|
718
|
+
|
|
713
719
|
if (this.cache[pid][key]) {
|
|
714
720
|
return this.cache[pid][key];
|
|
715
721
|
}
|
|
716
722
|
|
|
717
723
|
const state = await this.createState(teamDid, upperFirst(key));
|
|
718
724
|
logger.info(`${key} state created`, { teamDid });
|
|
725
|
+
|
|
726
|
+
// Reinitialize cache if deleted during state creation
|
|
727
|
+
if (!this.cache[pid]) {
|
|
728
|
+
logger.warn('Cache entry was deleted during state creation, reinitializing', { teamDid, pid, key });
|
|
729
|
+
this.cache[pid] = getDefaultTeamState();
|
|
730
|
+
}
|
|
731
|
+
|
|
719
732
|
this.cache[pid][key] = state;
|
|
720
733
|
return state;
|
|
721
734
|
}
|
|
@@ -755,6 +768,13 @@ class TeamManager extends EventEmitter {
|
|
|
755
768
|
const models = await this.getModels(did);
|
|
756
769
|
const db = new BaseState(models.Rbac);
|
|
757
770
|
const rbac = await createRBAC({ storage: new SequelizeStorage(db, did) });
|
|
771
|
+
|
|
772
|
+
// Reinitialize cache if it was deleted during async operations
|
|
773
|
+
if (!this.cache[pid]) {
|
|
774
|
+
logger.warn('Cache entry was deleted during RBAC initialization, reinitializing', { did, pid });
|
|
775
|
+
this.cache[pid] = getDefaultTeamState();
|
|
776
|
+
}
|
|
777
|
+
|
|
758
778
|
this.cache[pid].rbac = rbac;
|
|
759
779
|
|
|
760
780
|
const roles = await rbac.getRoles();
|
|
@@ -772,7 +792,12 @@ class TeamManager extends EventEmitter {
|
|
|
772
792
|
}
|
|
773
793
|
}
|
|
774
794
|
|
|
775
|
-
// use cache
|
|
795
|
+
// use cache - reinitialize if deleted
|
|
796
|
+
if (!this.cache[pid]) {
|
|
797
|
+
logger.warn('Cache entry was deleted, reinitializing before returning rbac', { did, pid });
|
|
798
|
+
this.cache[pid] = getDefaultTeamState();
|
|
799
|
+
}
|
|
800
|
+
|
|
776
801
|
return this.cache[pid].rbac;
|
|
777
802
|
}
|
|
778
803
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.8-beta-20260108-
|
|
6
|
+
"version": "1.17.8-beta-20260108-224855-28496abb",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -17,19 +17,19 @@
|
|
|
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-20260108-
|
|
21
|
-
"@abtnode/auth": "1.17.8-beta-20260108-
|
|
22
|
-
"@abtnode/certificate-manager": "1.17.8-beta-20260108-
|
|
23
|
-
"@abtnode/constant": "1.17.8-beta-20260108-
|
|
24
|
-
"@abtnode/cron": "1.17.8-beta-20260108-
|
|
25
|
-
"@abtnode/db-cache": "1.17.8-beta-20260108-
|
|
26
|
-
"@abtnode/docker-utils": "1.17.8-beta-20260108-
|
|
27
|
-
"@abtnode/logger": "1.17.8-beta-20260108-
|
|
28
|
-
"@abtnode/models": "1.17.8-beta-20260108-
|
|
29
|
-
"@abtnode/queue": "1.17.8-beta-20260108-
|
|
30
|
-
"@abtnode/rbac": "1.17.8-beta-20260108-
|
|
31
|
-
"@abtnode/router-provider": "1.17.8-beta-20260108-
|
|
32
|
-
"@abtnode/util": "1.17.8-beta-20260108-
|
|
20
|
+
"@abtnode/analytics": "1.17.8-beta-20260108-224855-28496abb",
|
|
21
|
+
"@abtnode/auth": "1.17.8-beta-20260108-224855-28496abb",
|
|
22
|
+
"@abtnode/certificate-manager": "1.17.8-beta-20260108-224855-28496abb",
|
|
23
|
+
"@abtnode/constant": "1.17.8-beta-20260108-224855-28496abb",
|
|
24
|
+
"@abtnode/cron": "1.17.8-beta-20260108-224855-28496abb",
|
|
25
|
+
"@abtnode/db-cache": "1.17.8-beta-20260108-224855-28496abb",
|
|
26
|
+
"@abtnode/docker-utils": "1.17.8-beta-20260108-224855-28496abb",
|
|
27
|
+
"@abtnode/logger": "1.17.8-beta-20260108-224855-28496abb",
|
|
28
|
+
"@abtnode/models": "1.17.8-beta-20260108-224855-28496abb",
|
|
29
|
+
"@abtnode/queue": "1.17.8-beta-20260108-224855-28496abb",
|
|
30
|
+
"@abtnode/rbac": "1.17.8-beta-20260108-224855-28496abb",
|
|
31
|
+
"@abtnode/router-provider": "1.17.8-beta-20260108-224855-28496abb",
|
|
32
|
+
"@abtnode/util": "1.17.8-beta-20260108-224855-28496abb",
|
|
33
33
|
"@aigne/aigne-hub": "^0.10.15",
|
|
34
34
|
"@arcblock/did": "^1.28.4",
|
|
35
35
|
"@arcblock/did-connect-js": "^1.28.4",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@arcblock/pm2-events": "^0.0.5",
|
|
42
42
|
"@arcblock/validator": "^1.28.4",
|
|
43
43
|
"@arcblock/vc": "^1.28.4",
|
|
44
|
-
"@blocklet/constant": "1.17.8-beta-20260108-
|
|
44
|
+
"@blocklet/constant": "1.17.8-beta-20260108-224855-28496abb",
|
|
45
45
|
"@blocklet/did-space-js": "^1.2.14",
|
|
46
|
-
"@blocklet/env": "1.17.8-beta-20260108-
|
|
46
|
+
"@blocklet/env": "1.17.8-beta-20260108-224855-28496abb",
|
|
47
47
|
"@blocklet/error": "^0.3.5",
|
|
48
|
-
"@blocklet/meta": "1.17.8-beta-20260108-
|
|
49
|
-
"@blocklet/resolver": "1.17.8-beta-20260108-
|
|
50
|
-
"@blocklet/sdk": "1.17.8-beta-20260108-
|
|
51
|
-
"@blocklet/server-js": "1.17.8-beta-20260108-
|
|
52
|
-
"@blocklet/store": "1.17.8-beta-20260108-
|
|
48
|
+
"@blocklet/meta": "1.17.8-beta-20260108-224855-28496abb",
|
|
49
|
+
"@blocklet/resolver": "1.17.8-beta-20260108-224855-28496abb",
|
|
50
|
+
"@blocklet/sdk": "1.17.8-beta-20260108-224855-28496abb",
|
|
51
|
+
"@blocklet/server-js": "1.17.8-beta-20260108-224855-28496abb",
|
|
52
|
+
"@blocklet/store": "1.17.8-beta-20260108-224855-28496abb",
|
|
53
53
|
"@blocklet/theme": "^3.4.5",
|
|
54
54
|
"@fidm/x509": "^1.2.1",
|
|
55
55
|
"@ocap/mcrypto": "^1.28.4",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"express": "^4.18.2",
|
|
115
115
|
"unzipper": "^0.10.11"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "e4407556f8c8f909afdfc6abc05228b0b495dcbf"
|
|
118
118
|
}
|