@kumori/aurora-backend-handler 1.0.71 → 1.0.73

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.71",
3
+ "version": "1.0.73",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -773,14 +773,17 @@ const handleEvent = async (message: WSMessage) => {
773
773
  eventHelper.service.publish.deployed(serviceResult.service);
774
774
  }
775
775
  const serviceState = eventData.status?.state?.code;
776
- console.log('DEBUG service state:', serviceState);
776
+ console.log("DEBUG service state:", serviceState);
777
777
  if (serviceState === "SERVICE_READY" && currentToken) {
778
778
  const serviceKey = `${parentParts.tenant}/${entityId}`;
779
779
  const serviceToRefresh = recentlyUpdatedServices.get(serviceKey);
780
- console.log('DEBUG service to refresh after SERVICE_READY:', serviceToRefresh);
780
+ console.log(
781
+ "DEBUG service to refresh after SERVICE_READY:",
782
+ serviceToRefresh,
783
+ );
781
784
  if (serviceToRefresh) {
782
785
  recentlyUpdatedServices.delete(serviceKey);
783
- console.log('DEBUG map after delete:', recentlyUpdatedServices);
786
+ console.log("DEBUG map after delete:", recentlyUpdatedServices);
784
787
  requestRevisionData(serviceToRefresh, currentToken).catch((err) => {
785
788
  console.error(
786
789
  `[ws] Error fetching revision data after SERVICE_READY for ${serviceKey}:`,
@@ -1161,6 +1164,19 @@ export const getReferenceDomain = () => {
1161
1164
  };
1162
1165
  const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1163
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
+ }
1164
1180
  switch (entityType.toLowerCase()) {
1165
1181
  case "tenant":
1166
1182
  if (action === "DELETE") {
@@ -1304,18 +1320,11 @@ const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1304
1320
  eventHelper.service.publish.deployed(svcSuccessResult.updatedService);
1305
1321
  } else if (svcSuccessResult.eventType === "updated") {
1306
1322
  eventHelper.service.publish.updated(svcSuccessResult.updatedService);
1307
- recentlyUpdatedServices.set(
1308
- svcSuccessResult.serviceId,
1309
- svcSuccessResult.updatedService,
1310
- );
1311
- console.log('DEBUG service updated:', svcSuccessResult.updatedService);
1312
- console.log('DEBUG recentlyUpdatedServices after update:', recentlyUpdatedServices);
1313
- console.log('DEBUG map keys:', Array.from(recentlyUpdatedServices.keys()));
1314
1323
  } else if (svcSuccessResult.eventType === "deleting") {
1315
1324
  eventHelper.service.publish.updated(svcSuccessResult.updatedService);
1316
1325
  }
1317
1326
  }
1318
- break;
1327
+ break;;
1319
1328
  case "account":
1320
1329
  const accSuccessResult = handleAccountOperationSuccess({
1321
1330
  action,