@kumori/aurora-backend-handler 1.1.18 → 1.1.20

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.
@@ -1696,7 +1696,6 @@ export async function deployServiceHelper(
1696
1696
  serviceForm,
1697
1697
  marketplaceItem,
1698
1698
  );
1699
- console.log("DEBUG - ServiceSpecDSL:", serviceSpecDSL);
1700
1699
  CUEBundle = buildServiceDeploymentModule(serviceSpecDSL);
1701
1700
 
1702
1701
  // if (marketplaceItem?.package) {
@@ -41,6 +41,10 @@ export const handleTokenEvent = ({
41
41
  : "",
42
42
  token: tokenInMap?.token || "",
43
43
  };
44
+ if (!tokenInMap) {
45
+ tokenMap.set(tokenId, newUserToken);
46
+ }
47
+
44
48
  const updatedUserTokens = [...userData.tokens];
45
49
  const existingTokenIndex = updatedUserTokens.findIndex(
46
50
  (t) => t.name === tokenId
@@ -76,7 +80,6 @@ export const handleTokenEvent = ({
76
80
  };
77
81
  }
78
82
  };
79
-
80
83
  interface HandleTokenOperationSuccessParams {
81
84
  responsePayload: any;
82
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -626,6 +626,7 @@ const handleEvent = async (message: WSMessage) => {
626
626
  : {};
627
627
  switch (kind) {
628
628
  case "user":
629
+ const previousTokens = userData.tokens || [];
629
630
  const userEventResult = handleUserEvent({
630
631
  eventData,
631
632
  tenantsMap,
@@ -648,6 +649,9 @@ const handleEvent = async (message: WSMessage) => {
648
649
  },
649
650
  );
650
651
  userData = userEventResult.userData;
652
+ if (!userData.tokens?.length && previousTokens.length) {
653
+ userData.tokens = previousTokens;
654
+ }
651
655
  tempProviders = userEventResult.tempProviders;
652
656
  userEventResult.deletedTenantKeys.forEach((key) => {
653
657
  tenantsMap.delete(key);