@kumori/aurora-backend-handler 1.1.22 → 1.1.24

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.
@@ -170,10 +170,6 @@ export const loadUserData = async () => {
170
170
  if (tenantData?.domains && Object.keys(tenantData.domains)[0])
171
171
  registry.name = Object.keys(tenantData.domains)[0];
172
172
  tenant.registry.push(registry);
173
- } else {
174
- console.warn(
175
- `No se encontró información de registry para el tenant ${tenant.name}`,
176
- );
177
173
  }
178
174
 
179
175
  const tenantAccounts: Account[] = [];
@@ -1,4 +1,3 @@
1
-
2
1
  import { Tenant, tenantRole, User, UserData } from "@kumori/aurora-interfaces";
3
2
  import { parseKeyPath } from "../utils/utils";
4
3
 
@@ -98,10 +97,6 @@ export const handleTenantEvent: (
98
97
  ) {
99
98
  newTenant.npmRegistry.domain = Object.keys(eventData.spec.domains)[0];
100
99
  }
101
- } else {
102
- console.warn(
103
- `No se encontró información de registry en eventData para el tenant ${newTenant.name}`,
104
- );
105
100
  }
106
101
  return newTenant;
107
102
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.22",
3
+ "version": "1.1.24",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -599,7 +599,7 @@ const rebuildHierarchy = () => {
599
599
  notificationsEnabled: preservedUserData.notificationsEnabled,
600
600
  organizations: Array.from(organizationsMap.values()),
601
601
  clusterTokens: Array.from(clusterTokensMap.values()),
602
- tokens: preservedUserData.tokens || [],
602
+ tokens: tokenMap.size > 0 ? (preservedUserData.tokens || []).filter(t => tokenMap.has(t.name)) : (preservedUserData.tokens || []),
603
603
  tenants: Array.from(tenantsMap.values()),
604
604
  axebowPlan: preservedUserData.axebowPlan,
605
605
  companyName: preservedUserData.companyName,
@@ -1966,10 +1966,9 @@ export const updateUserComplete = (updatedUserData: UserData): User => {
1966
1966
  const localOnlyTokens = (userData.tokens || []).filter(
1967
1967
  (t) => !incomingTokenNames.has(t.name)
1968
1968
  );
1969
- const mergedTokens = [
1970
- ...(updatedUserData.tokens || []),
1971
- ...localOnlyTokens,
1972
- ];
1969
+ const mergedTokens = [...(updatedUserData.tokens || []), ...localOnlyTokens]
1970
+ .filter((t, index, arr) => arr.findIndex(x => x.name === t.name) === index)
1971
+ .filter(t => tokenMap.size === 0 || tokenMap.has(t.name));
1973
1972
 
1974
1973
  userData = {
1975
1974
  id: updatedUserData.id || userData.id,