@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.
- package/helpers/revision-helper.ts +15 -7
- package/package.json +1 -1
|
@@ -281,13 +281,21 @@ const updateServiceWithRevision = (
|
|
|
281
281
|
String(rev.id) === String(entityId) ? newRevision : rev,
|
|
282
282
|
);
|
|
283
283
|
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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
|
|