@kumori/aurora-backend-handler 1.0.56 → 1.0.57

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.
@@ -238,7 +238,9 @@ const updateServiceWithRevision = (
238
238
  const updatedService: Service = {
239
239
  ...existingService,
240
240
  revisions: updatedRevisions,
241
- currentRevision: entityId,
241
+ currentRevision: Number(entityId) >= Number(existingService.currentRevision ?? 0)
242
+ ? entityId
243
+ : existingService.currentRevision,
242
244
  role: roles.length > 0 ? roles : existingService.role,
243
245
  usage: newRevision.usage,
244
246
  startedAt: newRevision.createdAt || existingService.startedAt,
@@ -748,7 +750,12 @@ export const processRevisionData = (
748
750
  createdAt: "",
749
751
  },
750
752
  ];
751
- return { ...svc, revisions: updatedRevisions, currentRevision: revisionId };
753
+ const currentRevId = String(svc.currentRevision ?? "0");
754
+ return {
755
+ ...svc,
756
+ revisions: updatedRevisions,
757
+ currentRevision: Number(revisionId) >= Number(currentRevId) ? revisionId : svc.currentRevision,
758
+ };
752
759
  };
753
760
 
754
761
  if (!deployment) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {