From e43dcf4113d76df6588373f7728fb24695feb61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Birm=C3=A9?= Date: Thu, 17 Nov 2022 09:35:14 +0100 Subject: [PATCH] chore: provide version in heartbeat response (#16) --- src/shared/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 228a053..c3af666 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -8,6 +8,8 @@ import { IncomingHttpHeaders } from "http"; import path from "path"; import { CorruptorConfigMap } from "../manifests/utils/configs"; +const { version } = require("../../package.json"); + export const handleOptionsRequest = async (event: ALBEvent): Promise => { return { statusCode: 204, @@ -43,7 +45,7 @@ export const generateHeartbeatResponse = (): Promise => { "Access-Control-Allow-Headers": "Content-Type, Origin", }, }; - response.body = JSON.stringify({ message: "OK! 💚" }); + response.body = JSON.stringify({ message: "OK! 💚", version }); return Promise.resolve(response); };