@kumori/aurora-backend-handler 1.0.93 → 1.0.94

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.93",
3
+ "version": "1.0.94",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -762,9 +762,17 @@ const handleEvent = async (message: WSMessage) => {
762
762
  pendingProjects.push(serviceResult.pendingProject);
763
763
  }
764
764
  }
765
- // if (serviceResult.wasDeployed ) {
766
- // eventHelper.service.publish.deployed(resolvedService);
767
- // }
765
+ if (serviceResult.wasDeployed) {
766
+ const statusCode = resolvedService.status?.code;
767
+ const isDeletingState =
768
+ statusCode === "REMOVING_SERVICE" ||
769
+ statusCode === "DELETING" ||
770
+ resolvedService.error?.code === "REMOVING_SERVICE";
771
+
772
+ if (!isDeletingState) {
773
+ eventHelper.service.publish.deployed(resolvedService);
774
+ }
775
+ }
768
776
  const serviceState = eventData.status?.state?.code;
769
777
  if (serviceState === "SERVICE_READY") {
770
778
  const serviceKey = `${parentParts.tenant}/${entityId}`;
@@ -1301,7 +1309,10 @@ const handleOperationSuccess = (operation: PendingOperation, response: any) => {
1301
1309
  svcSuccessResult.serviceId,
1302
1310
  svcSuccessResult.updatedService,
1303
1311
  );
1304
- if (svcSuccessResult.eventType === "deployed" || operation.action !== "DELETE") {
1312
+ if (
1313
+ svcSuccessResult.eventType === "deployed" ||
1314
+ operation.action !== "DELETE"
1315
+ ) {
1305
1316
  eventHelper.service.publish.deployed(svcSuccessResult.updatedService);
1306
1317
  } else if (svcSuccessResult.eventType === "updated") {
1307
1318
  eventHelper.service.publish.updated(svcSuccessResult.updatedService);