@kumori/aurora-backend-handler 1.0.83 → 1.0.84
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/service-helper.ts +17 -23
- package/package.json +1 -1
|
@@ -210,30 +210,24 @@ export const handleServiceEvent = ({
|
|
|
210
210
|
updatedPendingRevisionErrors.splice(pendingErrorIndex, 1);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
const currentRevisionId =
|
|
214
|
-
eventData.status.revision ||
|
|
215
|
-
(serviceRevisions.length > 0
|
|
216
|
-
? Math.max(...serviceRevisions.map((r) => Number(r.id))).toString()
|
|
217
|
-
: "");
|
|
218
|
-
|
|
219
213
|
const baseServiceData = {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
214
|
+
tenant: serviceTenantId,
|
|
215
|
+
account: eventData.spec.metadata.targetAccount || pathParts.account,
|
|
216
|
+
environment:
|
|
217
|
+
eventData.spec.metadata.targetEnvironment || pathParts.environment,
|
|
218
|
+
name: entityId,
|
|
219
|
+
revisions: [...serviceRevisions].sort(
|
|
220
|
+
(a, b) => Number(b.id) - Number(a.id),
|
|
221
|
+
),
|
|
222
|
+
status: finalStatus || eventData.status.state,
|
|
223
|
+
error: finalError,
|
|
224
|
+
role: serviceRoles.length > 0 ? serviceRoles : existingService?.role || [],
|
|
225
|
+
usage: serviceUsage,
|
|
226
|
+
lastDeployed: eventData.spec.ctstamp,
|
|
227
|
+
project: projectLabel || existingService?.project || "",
|
|
228
|
+
currentRevision: String(eventData.spec.ctstamp || eventData.status.revision || ""),
|
|
229
|
+
startedAt: currentRevision?.createdAt || existingService?.startedAt || "",
|
|
230
|
+
};
|
|
237
231
|
|
|
238
232
|
let newService: Service;
|
|
239
233
|
|