@kumori/aurora-backend-handler 1.0.46 → 1.0.47

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.
@@ -217,27 +217,17 @@ const updateServiceWithRevision = (
217
217
  const existingRevisionIndex = existingService.revisions.findIndex(
218
218
  (rev) => rev.id === entityId,
219
219
  );
220
- const shouldIncludeInList =
221
- newRevision.errorCode !== "COMPUTE_ERROR" &&
222
- eventData.status?.error?.code !== "COMPUTE_ERROR";
223
-
224
- let updatedRevisions: Revision[];
225
- if (shouldIncludeInList) {
226
- updatedRevisions =
227
- existingRevisionIndex === -1
228
- ? [...existingService.revisions, newRevision]
229
- : existingService.revisions.map((rev) =>
230
- rev.id === entityId ? newRevision : rev,
231
- );
232
- } else {
233
- updatedRevisions = existingService.revisions.filter(
234
- (rev) => rev.id !== entityId,
235
- );
236
- }
220
+ const updatedRevisions: Revision[] =
221
+ existingRevisionIndex === -1
222
+ ? [...existingService.revisions, newRevision]
223
+ : existingService.revisions.map((rev) =>
224
+ rev.id === entityId ? newRevision : rev,
225
+ );
237
226
 
238
227
  const updatedService: Service = {
239
228
  ...existingService,
240
229
  revisions: updatedRevisions,
230
+ currentRevision: entityId,
241
231
  role: roles.length > 0 ? roles : existingService.role,
242
232
  usage: newRevision.usage,
243
233
  startedAt: newRevision.createdAt || existingService.startedAt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {