diff --git a/src/action.js b/src/action.js index 886269b..09bff52 100644 --- a/src/action.js +++ b/src/action.js @@ -43,7 +43,7 @@ function getUserId(event) { // Re-use an existing user ID if one exists if (event?.cookies?.find((c) => c.startsWith(`${USER_ID_COOKIE_NAME}=`))) { const reqCookie = event.cookies.find((c) => - c.startsWith(`${USER_ID_COOKIE_NAME}=`) + c.startsWith(`${USER_ID_COOKIE_NAME}=`), ); const reqCookieValue = reqCookie.split("=", 2)[1]; return reqCookieValue; @@ -59,7 +59,7 @@ function getSessionId(event, userId) { // Re-use an existing session ID if one exists if (event?.cookies?.find((c) => c.startsWith(`${SESSION_COOKIE_NAME}=`))) { const reqCookie = event.cookies.find((c) => - c.startsWith(`${SESSION_COOKIE_NAME}=`) + c.startsWith(`${SESSION_COOKIE_NAME}=`), ); const reqCookieValue = reqCookie.split("=", 2)[1]; return reqCookieValue; @@ -109,7 +109,7 @@ export const handler = async (event) => { StreamName: process.env.ACTION_LOG_STREAM_NAME, PartitionKey: createHash("md5").update(logCsv).digest("hex"), Data: Buffer.from(logCsv), - }) + }), ); return { diff --git a/src/writer.js b/src/writer.js index 24bd5c3..78c025f 100644 --- a/src/writer.js +++ b/src/writer.js @@ -4,7 +4,7 @@ export const handler = async (event, context) => { console.log(JSON.stringify(event)); const logLines = event?.Records?.map((r) => - Buffer.from(r.kinesis.data, "base64").toString("ascii") + Buffer.from(r.kinesis.data, "base64").toString("ascii"), ); if (logLines?.length) { diff --git a/tsconfig.json b/tsconfig.json index 2911cac..ad8fd1d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "commonjs", - "target": "es2023", + "target": "es2022", "allowJs": true, "checkJs": true, "noEmit": true