@kumori/aurora-backend-handler 1.0.72 → 1.0.74

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.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -774,7 +774,7 @@ const handleEvent = async (message: WSMessage) => {
774
774
  }
775
775
  const serviceState = eventData.status?.state?.code;
776
776
  console.log("DEBUG service state:", serviceState);
777
- if (serviceState === "SERVICE_READY" && currentToken) {
777
+ if (serviceState === "SERVICE_READY") {
778
778
  const serviceKey = `${parentParts.tenant}/${entityId}`;
779
779
  const serviceToRefresh = recentlyUpdatedServices.get(serviceKey);
780
780
  console.log(
@@ -784,7 +784,7 @@ const handleEvent = async (message: WSMessage) => {
784
784
  if (serviceToRefresh) {
785
785
  recentlyUpdatedServices.delete(serviceKey);
786
786
  console.log("DEBUG map after delete:", recentlyUpdatedServices);
787
- requestRevisionData(serviceToRefresh, currentToken).catch((err) => {
787
+ requestRevisionData(serviceToRefresh, "").catch((err) => {
788
788
  console.error(
789
789
  `[ws] Error fetching revision data after SERVICE_READY for ${serviceKey}:`,
790
790
  err,
@@ -1164,6 +1164,19 @@ export const getReferenceDomain = () => {
1164
1164
  };
1165
1165
  const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1166
1166
  const { action, entityType, entityName, originalData } = operation;
1167
+ if (action === "UPDATE_CONFIG") {
1168
+ const tenant = originalData?.payload?.tenant;
1169
+ const serviceName = originalData?.payload?.service;
1170
+ if (tenant && serviceName) {
1171
+ const serviceKey = `${tenant}/${serviceName}`;
1172
+ const service = servicesMap.get(serviceKey);
1173
+ if (service) {
1174
+ recentlyUpdatedServices.set(serviceKey, service);
1175
+ console.log('DEBUG recentlyUpdatedServices after UPDATE_CONFIG:', recentlyUpdatedServices);
1176
+ console.log(`DEBUG Added ${serviceKey} to recentlyUpdatedServices after UPDATE_CONFIG`);
1177
+ }
1178
+ }
1179
+ }
1167
1180
  switch (entityType.toLowerCase()) {
1168
1181
  case "tenant":
1169
1182
  if (action === "DELETE") {
@@ -1311,24 +1324,7 @@ const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1311
1324
  eventHelper.service.publish.updated(svcSuccessResult.updatedService);
1312
1325
  }
1313
1326
  }
1314
- break;
1315
- case "revision":
1316
- if (action === "UPDATE_CONFIG") {
1317
- const tenant = originalData?.payload?.tenant;
1318
- const serviceName = originalData?.payload?.service;
1319
- if (tenant && serviceName) {
1320
- const serviceKey = `${tenant}/${serviceName}`;
1321
- const service = servicesMap.get(serviceKey);
1322
- if (service) {
1323
- recentlyUpdatedServices.set(serviceKey, service);
1324
- console.log('DEBUG recentlyUpdatedServices after UPDATE_CONFIG:', recentlyUpdatedServices);
1325
- console.log(
1326
- `DEBUG Added ${serviceKey} to recentlyUpdatedServices after UPDATE_CONFIG`,
1327
- );
1328
- }
1329
- }
1330
- }
1331
- break;
1327
+ break;;
1332
1328
  case "account":
1333
1329
  const accSuccessResult = handleAccountOperationSuccess({
1334
1330
  action,