diff --git a/lambda/log-redirect/package-lock.json b/lambda/log-redirect/package-lock.json index 77273f5..6ee5a5e 100644 --- a/lambda/log-redirect/package-lock.json +++ b/lambda/log-redirect/package-lock.json @@ -8,8 +8,8 @@ "name": "util-lambda", "version": "1.0.0", "dependencies": { - "@aws-lambda-powertools/logger": "1.18.1", - "@aws-lambda-powertools/tracer": "1.18.1", + "@aws-lambda-powertools/logger": "2.0.2", + "@aws-lambda-powertools/tracer": "2.0.2", "@aws-sdk/client-secrets-manager": "3.525.0", "@middy/core": "5.2.6", "@middy/error-logger": "5.2.6", @@ -119,16 +119,16 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-lambda-powertools/commons": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.18.1.tgz", - "integrity": "sha512-gFRgQ2GJDghKvf+fXvT0kQVftgOT05W+hCa7RkfZj6HSjVAO+9DZZeJL3JK1HcsLAjWRj7W9ra0/MqB3Abf+PQ==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-2.0.2.tgz", + "integrity": "sha512-5fHXZwol2LVb+UGwNPHVIZfeAgztyLaAABNvVlDqzrkpwlbfEAEBRxQN9I/vgm4NNJC7+hZHqk0ca+R4JHZBGQ==" }, "node_modules/@aws-lambda-powertools/logger": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.18.1.tgz", - "integrity": "sha512-GsSMqaFXCSz+llSOn2CVNMoN+j/jNsS6JP2Opy9myU0tvg7PeuU3+rN24vKyibUwpxM466IzWFBSJkYdm0bqVw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-2.0.2.tgz", + "integrity": "sha512-VzwVI2N8HVy7T8xAAKwoZjV/iKHYauFpFPCsM5rRaQ9s6j4dNrwGNmCcv+iLLopRCsXJHoSzBUQ+nBBI/eZ4sA==", "dependencies": { - "@aws-lambda-powertools/commons": "^1.18.1", + "@aws-lambda-powertools/commons": "^2.0.2", "lodash.merge": "^4.6.2" }, "peerDependencies": { @@ -141,11 +141,11 @@ } }, "node_modules/@aws-lambda-powertools/tracer": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.18.1.tgz", - "integrity": "sha512-bMLBtdEFNmLUR9RJvBULR6XJD0XopUhhS1mlpeQlm2BCPIN3gLbqAlJK8dMXyAw8GCpLpHaziCo2+7a/AIh7lA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-2.0.2.tgz", + "integrity": "sha512-qLUXsMK/KJ7ctUx62hr8irargqvF5o4TY9IkUNFTTC9DTP5905ulgogxtH9fJP6hvvX7KCFzoJmvibROXAxFOw==", "dependencies": { - "@aws-lambda-powertools/commons": "^1.18.1", + "@aws-lambda-powertools/commons": "^2.0.2", "aws-xray-sdk-core": "^3.5.3" }, "peerDependencies": { diff --git a/lambda/log-redirect/package.json b/lambda/log-redirect/package.json index c4064ed..c3e3b54 100644 --- a/lambda/log-redirect/package.json +++ b/lambda/log-redirect/package.json @@ -2,8 +2,8 @@ "name": "util-lambda", "version": "1.0.0", "dependencies": { - "@aws-lambda-powertools/logger": "1.18.1", - "@aws-lambda-powertools/tracer": "1.18.1", + "@aws-lambda-powertools/logger": "2.0.2", + "@aws-lambda-powertools/tracer": "2.0.2", "@middy/core": "5.2.6", "@middy/http-header-normalizer": "5.2.6", "@middy/http-error-handler": "5.2.6", diff --git a/lambda/log-redirect/src/mythplus.ts b/lambda/log-redirect/src/mythplus.ts index 1795c8f..8b4fc8d 100644 --- a/lambda/log-redirect/src/mythplus.ts +++ b/lambda/log-redirect/src/mythplus.ts @@ -3,12 +3,12 @@ import middy from "@middy/core"; import httpHeaderNormalizer from "@middy/http-header-normalizer"; import errorLogger from "@middy/error-logger"; import httpErrorHandlerMiddleware from "@middy/http-error-handler"; -import {getLatestMythPlusReport, getLatestRaidReport, REPORT_URL_PREFIX, reportsAge} from "./wcl"; -import {captureLambdaHandler} from "@aws-lambda-powertools/tracer"; +import {getLatestMythPlusReport, REPORT_URL_PREFIX, reportsAge} from "./wcl"; import {logger, tracer} from "./util"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; -const lambdaHandler = async function (event: APIGatewayProxyEventV2): Promise { +const lambdaHandler = async function (_: APIGatewayProxyEventV2): Promise { const reportId = await getLatestMythPlusReport(); if(reportId) { diff --git a/lambda/log-redirect/src/raid.ts b/lambda/log-redirect/src/raid.ts index beb13a6..65f4cc4 100644 --- a/lambda/log-redirect/src/raid.ts +++ b/lambda/log-redirect/src/raid.ts @@ -4,11 +4,11 @@ import httpHeaderNormalizer from "@middy/http-header-normalizer"; import errorLogger from "@middy/error-logger"; import httpErrorHandlerMiddleware from "@middy/http-error-handler"; import {getLatestRaidReport, REPORT_URL_PREFIX, reportsAge} from "./wcl"; -import {captureLambdaHandler, Tracer} from "@aws-lambda-powertools/tracer"; -import {injectLambdaContext} from "@aws-lambda-powertools/logger"; import {logger, tracer} from "./util"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; -const lambdaHandler = async function (event: APIGatewayProxyEventV2): Promise { +const lambdaHandler = async function (_: APIGatewayProxyEventV2): Promise { const reportId = await getLatestRaidReport(); if(reportId) { diff --git a/lambda/prime-scout/package-lock.json b/lambda/prime-scout/package-lock.json index 3cbba71..dc58c93 100644 --- a/lambda/prime-scout/package-lock.json +++ b/lambda/prime-scout/package-lock.json @@ -8,8 +8,8 @@ "name": "prime-scout-lambda", "version": "1.0.0", "dependencies": { - "@aws-lambda-powertools/logger": "1.18.1", - "@aws-lambda-powertools/tracer": "1.18.1", + "@aws-lambda-powertools/logger": "2.0.2", + "@aws-lambda-powertools/tracer": "2.0.2", "@middy/core": "5.2.6", "@middy/error-logger": "5.2.6", "@middy/http-content-negotiation": "5.2.6", @@ -30,16 +30,16 @@ } }, "node_modules/@aws-lambda-powertools/commons": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-1.18.1.tgz", - "integrity": "sha512-gFRgQ2GJDghKvf+fXvT0kQVftgOT05W+hCa7RkfZj6HSjVAO+9DZZeJL3JK1HcsLAjWRj7W9ra0/MqB3Abf+PQ==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/commons/-/commons-2.0.2.tgz", + "integrity": "sha512-5fHXZwol2LVb+UGwNPHVIZfeAgztyLaAABNvVlDqzrkpwlbfEAEBRxQN9I/vgm4NNJC7+hZHqk0ca+R4JHZBGQ==" }, "node_modules/@aws-lambda-powertools/logger": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-1.18.1.tgz", - "integrity": "sha512-GsSMqaFXCSz+llSOn2CVNMoN+j/jNsS6JP2Opy9myU0tvg7PeuU3+rN24vKyibUwpxM466IzWFBSJkYdm0bqVw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/logger/-/logger-2.0.2.tgz", + "integrity": "sha512-VzwVI2N8HVy7T8xAAKwoZjV/iKHYauFpFPCsM5rRaQ9s6j4dNrwGNmCcv+iLLopRCsXJHoSzBUQ+nBBI/eZ4sA==", "dependencies": { - "@aws-lambda-powertools/commons": "^1.18.1", + "@aws-lambda-powertools/commons": "^2.0.2", "lodash.merge": "^4.6.2" }, "peerDependencies": { @@ -52,11 +52,11 @@ } }, "node_modules/@aws-lambda-powertools/tracer": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-1.18.1.tgz", - "integrity": "sha512-bMLBtdEFNmLUR9RJvBULR6XJD0XopUhhS1mlpeQlm2BCPIN3gLbqAlJK8dMXyAw8GCpLpHaziCo2+7a/AIh7lA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@aws-lambda-powertools/tracer/-/tracer-2.0.2.tgz", + "integrity": "sha512-qLUXsMK/KJ7ctUx62hr8irargqvF5o4TY9IkUNFTTC9DTP5905ulgogxtH9fJP6hvvX7KCFzoJmvibROXAxFOw==", "dependencies": { - "@aws-lambda-powertools/commons": "^1.18.1", + "@aws-lambda-powertools/commons": "^2.0.2", "aws-xray-sdk-core": "^3.5.3" }, "peerDependencies": { diff --git a/lambda/prime-scout/package.json b/lambda/prime-scout/package.json index 98da778..965243d 100644 --- a/lambda/prime-scout/package.json +++ b/lambda/prime-scout/package.json @@ -2,8 +2,8 @@ "name": "prime-scout-lambda", "version": "1.0.0", "dependencies": { - "@aws-lambda-powertools/logger": "1.18.1", - "@aws-lambda-powertools/tracer": "1.18.1", + "@aws-lambda-powertools/logger": "2.0.2", + "@aws-lambda-powertools/tracer": "2.0.2", "@middy/core": "5.2.6", "@middy/http-header-normalizer": "5.2.6", "@middy/http-error-handler": "5.2.6", diff --git a/lambda/prime-scout/src/scout.ts b/lambda/prime-scout/src/scout.ts index 7b69db8..fa6b696 100644 --- a/lambda/prime-scout/src/scout.ts +++ b/lambda/prime-scout/src/scout.ts @@ -3,8 +3,10 @@ import middy from "@middy/core"; import httpHeaderNormalizer from "@middy/http-header-normalizer"; import errorLogger from "@middy/error-logger"; import httpErrorHandlerMiddleware from "@middy/http-error-handler"; -import {captureLambdaHandler, Tracer} from "@aws-lambda-powertools/tracer"; -import {injectLambdaContext, Logger} from "@aws-lambda-powertools/logger"; +import {Tracer} from "@aws-lambda-powertools/tracer"; +import {Logger} from "@aws-lambda-powertools/logger"; +import {captureLambdaHandler} from "@aws-lambda-powertools/tracer/middleware"; +import {injectLambdaContext} from "@aws-lambda-powertools/logger/middleware"; import httpContentNegotiation from '@middy/http-content-negotiation' import httpJsonBodyParserMiddleware from '@middy/http-json-body-parser' import httpResponseSerializerMiddleware from '@middy/http-response-serializer'