@kumori/aurora-backend-handler 1.1.53 → 1.1.54

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.
@@ -137,13 +137,20 @@ const determineFinalStatusAndError = (
137
137
  const bestCandidateTs = Math.max(incomingTs, revisionTs);
138
138
  const isNewer = !existingService || bestCandidateTs > currentTs;
139
139
 
140
- let finalStatus = existingService?.status;
141
- let finalError = existingService?.error;
140
+ const removingStatus = {
141
+ code: "REMOVING_SERVICE",
142
+ message: `Service ${entityId} is being removed`,
143
+ args: [],
144
+ timestamp: new Date().toISOString(),
145
+ };
142
146
 
143
- if (existingService?.status?.code === "REMOVING_SERVICE") {
144
- return { finalStatus, finalError, pendingErrorIndex: -1 };
147
+ if (eventData.meta?.deleted || existingService?.status?.code === "REMOVING_SERVICE") {
148
+ return { finalStatus: removingStatus, finalError: undefined, pendingErrorIndex: -1 };
145
149
  }
146
150
 
151
+ let finalStatus = existingService?.status;
152
+ let finalError = existingService?.error;
153
+
147
154
  if (isNewer) {
148
155
  const revisionHasError = !!currentRevision?.errorCode;
149
156
  finalStatus = (revisionHasError || (currentRevision?.status && revisionTs >= incomingTs))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.53",
3
+ "version": "1.1.54",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {