@kumori/aurora-backend-handler 1.1.9 → 1.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -6,8 +6,6 @@ import {
6
6
  ClusterToken,
7
7
  Environment,
8
8
  Instance,
9
- Link,
10
- MarketplaceService,
11
9
  Notification,
12
10
  Organization,
13
11
  Plan,
@@ -17,9 +15,7 @@ import {
17
15
  Resource,
18
16
  Service,
19
17
  Tenant,
20
- tenantRole,
21
18
  Token,
22
- Usage,
23
19
  User,
24
20
  UserData,
25
21
  } from "@kumori/aurora-interfaces";
@@ -567,6 +563,7 @@ const rebuildHierarchy = () => {
567
563
  const preservedUserData = { ...userData };
568
564
 
569
565
  tenantsMap.forEach((tenant) => {
566
+ console.log("[DEBUG] rebuild - tenant.users before:", JSON.stringify(tenant.users));
570
567
  tenant.accounts = Array.from(accountsMap.values()).filter((account) => {
571
568
  account.environments = Array.from(environmentsMap.values())
572
569
  .filter((env) => env.account === account.id)
@@ -594,8 +591,8 @@ const rebuildHierarchy = () => {
594
591
  pendingProjects.splice(i, 1);
595
592
  }
596
593
  }
594
+ console.log("[DEBUG] rebuild tenant.users before:", JSON.stringify(tenant.users));
597
595
  });
598
-
599
596
  userData = {
600
597
  id: preservedUserData.id,
601
598
  name: preservedUserData.name,
@@ -817,7 +814,7 @@ const handleEvent = async (message: WSMessage) => {
817
814
  eventData,
818
815
  userData,
819
816
  );
820
-
817
+ console.log("[DEBUG] newTenant.users:", JSON.stringify(newTenant.users))
821
818
  if (
822
819
  existingTenant &&
823
820
  existingTenant.role &&
@@ -863,6 +860,7 @@ const handleEvent = async (message: WSMessage) => {
863
860
  }
864
861
 
865
862
  tenantsMap.set(entityId, newTenant);
863
+ console.log("[DEBUG] tenantsMap after set:", JSON.stringify(tenantsMap.get(entityId)?.users));
866
864
  if (pendingTenantStatus.has(entityId)) {
867
865
  const pendingStatus = pendingTenantStatus.get(entityId)!;
868
866
  tenantsMap.set(entityId, { ...newTenant, status: pendingStatus });