@kumori/aurora-backend-handler 1.1.108 → 1.1.109

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.
@@ -281,13 +281,21 @@ const updateServiceWithRevision = (
281
281
  String(rev.id) === String(entityId) ? newRevision : rev,
282
282
  );
283
283
 
284
- const updatedService: Service = {
285
- ...existingService,
286
- revisions: updatedRevisions,
287
- role: roles.length > 0 ? roles : existingService.role,
288
- usage: newRevision.usage,
289
- startedAt: newRevision.createdAt || existingService.startedAt,
290
- };
284
+ const isCurrentRevision =
285
+ String(existingService.currentRevision) === String(entityId);
286
+
287
+ const updatedService: Service = isCurrentRevision
288
+ ? {
289
+ ...existingService,
290
+ revisions: updatedRevisions,
291
+ role: roles.length > 0 ? roles : existingService.role,
292
+ usage: newRevision.usage,
293
+ startedAt: newRevision.createdAt || existingService.startedAt,
294
+ }
295
+ : {
296
+ ...existingService,
297
+ revisions: updatedRevisions,
298
+ };
291
299
 
292
300
  const deploymentErrorEvent = eventData.status?.error ? updatedService : null;
293
301
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.108",
3
+ "version": "1.1.109",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {