Skip to content

Commit 6a7cfed

Browse files
Upgrade: [dependabot] - bump @middy/input-output-logger from 7.1.2 to 7.2.1 (#2133)
Bumps [@middy/input-output-logger](https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger) from 7.1.2 to 7.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/middyjs/middy/releases"><code>@​middy/input-output-logger</code>'s releases</a>.</em></p> <blockquote> <h2>7.2.1</h2> <h2>What changed</h2> <ul> <li><code>@​middy/cloudformation-response</code> version 7.1.7 breaks life cycle of custom resource <a href="https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger/issues/1602">#1602</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/middyjs/middy/compare/7.2.0...7.2.1">https://github.com/middyjs/middy/compare/7.2.0...7.2.1</a></p> <h2>7.2.0</h2> <h2>What's Changed</h2> <ul> <li>event-normalizer: add support for rmq</li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/middyjs/middy/compare/7.1.8...7.2.0">https://github.com/middyjs/middy/compare/7.1.8...7.2.0</a></p> <h2>7.1.8</h2> <h2>What's Changed</h2> <ul> <li>fix appconfig: crash when Configuration absent in GetLatestConfiguration response (SDK &gt;= 3.929.0) <a href="https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger/issues/1600">#1600</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/middyjs/middy/compare/7.1.7...7.1.8">https://github.com/middyjs/middy/compare/7.1.7...7.1.8</a></p> <h2>7.1.7</h2> <h2>What's Changed</h2> <ul> <li><code>@​middy/secrets-manager</code>: Fixed crash when LastRotationDate or LastChangedDate is undefined during rotation-date-based cache expiry calculation. Previously, Math.max(undefined, ...) would produce NaN, breaking the cache logic. Now defaults to 0 when either date is missing.</li> <li><code>@​middy/cloudformation-response</code>: Auto-populate PhysicalResourceId from context.logStreamName when not explicitly set. This prevents CloudFormation custom resource responses from failing due to a missing required field.</li> <li><code>@​middy/core</code> (types): Widened the TErr generic in UseFn from Error to any, allowing middleware that uses custom error types to be passed to .use() without type errors.</li> </ul> <ul> <li>Issue/1594 in <a href="https://redirect.github.com/middyjs/middy/pull/1597">middyjs/middy#1597</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/middyjs/middy/compare/7.1.6...7.1.7">https://github.com/middyjs/middy/compare/7.1.6...7.1.7</a></p> <h2>7.1.6</h2> <h2>What's Changed</h2> <ul> <li>Compatability with lambda power tools broken since 7.1.3 <a href="https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger/issues/1594">#1594</a></li> <li>chore(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot] in <a href="https://redirect.github.com/middyjs/middy/pull/1593">middyjs/middy#1593</a></li> <li>chore(deps): bump actions/setup-node from 6.2.0 to 6.3.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot] in <a href="https://redirect.github.com/middyjs/middy/pull/1592">middyjs/middy#1592</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/middyjs/middy/compare/7.1.5...7.1.6">https://github.com/middyjs/middy/compare/7.1.5...7.1.6</a></p> <h2>7.1.5</h2> <h2>What's Changed</h2> <ul> <li>httpResponseSerializer generates type error in Middy 7.1.4 <a href="https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger/issues/1590">#1590</a></li> <li>(http-event-normalizer): API Gateway Event v2 is not accepted <a href="https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger/issues/1589">#1589</a></li> <li>chore: update type test setup by <a href="https://github.com/mrazauskas"><code>@​mrazauskas</code></a> in <a href="https://redirect.github.com/middyjs/middy/pull/1588">middyjs/middy#1588</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/middyjs/middy/compare/7.1.4...7.1.5">https://github.com/middyjs/middy/compare/7.1.4...7.1.5</a></p> <h2>7.1.4</h2> <h2>What's Changed</h2> <ul> <li>7.1.3 introduced type error &quot;Argument not assignable to parameter of type Context&quot; <a href="https://github.com/middyjs/middy/tree/HEAD/packages/input-output-logger/issues/1585">#1585</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/middyjs/middy/commit/8ca0256b1cbd80c50a84bb152d39492d9fcfad32"><code>8ca0256</code></a> chore: version bump</li> <li><a href="https://github.com/middyjs/middy/commit/136e3b47cf73ed841ddf7f6530781105725bbd15"><code>136e3b4</code></a> chore: dep update</li> <li><a href="https://github.com/middyjs/middy/commit/ca70b9b027cab978d526eb3202adf65ae905080d"><code>ca70b9b</code></a> chore: version bump</li> <li><a href="https://github.com/middyjs/middy/commit/452b6680882b52fb086e7bbce03b6c1749bb5881"><code>452b668</code></a> chore: dep update</li> <li><a href="https://github.com/middyjs/middy/commit/84db5d79412e8e3616fe4f707bea35aa45e41eae"><code>84db5d7</code></a> chore: version bump</li> <li><a href="https://github.com/middyjs/middy/commit/3fda6c69d1742fa8110b7137856cc8061881609c"><code>3fda6c6</code></a> chore: dep update</li> <li><a href="https://github.com/middyjs/middy/commit/46f5a5b05dfc00bd0fa2faa02cc94051b6416512"><code>46f5a5b</code></a> docs: fix linking</li> <li><a href="https://github.com/middyjs/middy/commit/32035db2944b2b99650299a08bc6605262c9e6c2"><code>32035db</code></a> chore: version bump</li> <li><a href="https://github.com/middyjs/middy/commit/f4bffa9ae1c296be795737e3c0de992f06e39f78"><code>f4bffa9</code></a> chore: version bump</li> <li><a href="https://github.com/middyjs/middy/commit/b4829c6b4cdb43b3b9d91af0bc1a68f7880d3457"><code>b4829c6</code></a> docs: remove unused tags</li> <li>Additional commits viewable in <a href="https://github.com/middyjs/middy/commits/7.2.1/packages/input-output-logger">compare view</a></li> </ul> </details> <br /> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jack Spagnoli <jack.spagnoli1@nhs.net>
1 parent 2918413 commit 6a7cfed

12 files changed

Lines changed: 247 additions & 1252 deletions

package-lock.json

Lines changed: 214 additions & 1176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/certificateChecker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@aws-sdk/client-cloudwatch-logs": "^3.1032.0",
1010
"@aws-sdk/client-secrets-manager": "^3.1032.0",
1111
"@middy/core": "^7.2.3",
12-
"@middy/input-output-logger": "^7.1.0",
12+
"@middy/input-output-logger": "^7.2.1",
1313
"uuid": "^14.0.0"
1414
},
1515
"scripts": {

packages/certificateChecker/src/certificateChecker.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {checkCertificateExpiry} from "./helpers"
55
import {Secret} from "./helpers"
66
import middy from "@middy/core"
77
import inputOutputLogger from "@middy/input-output-logger"
8+
import {LogItemMessage} from "@aws-lambda-powertools/logger/types"
89

910
const secretsClient = new SecretsManagerClient({})
1011

@@ -61,12 +62,8 @@ export const handler = middy(lambdaHandler)
6162
.use(injectLambdaContext(logger, {clearState: true}))
6263
.use(
6364
inputOutputLogger({
64-
logger: (request) => {
65-
if (request.response) {
66-
logger.debug(request)
67-
} else {
68-
logger.info(request)
69-
}
65+
logger: (request: unknown) => {
66+
logger.info(request as LogItemMessage)
7067
}
7168
})
7269
)

packages/driftDetector/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@aws-sdk/client-cloudformation": "^3.1032.0",
1010
"@aws-sdk/client-cloudwatch-logs": "^3.1032.0",
1111
"@middy/core": "^7.2.3",
12-
"@middy/input-output-logger": "^7.1.0"
12+
"@middy/input-output-logger": "^7.2.1"
1313
},
1414
"scripts": {
1515
"compile": "tsc",

packages/proxygen/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@aws-sdk/client-cloudwatch-logs": "^3.1032.0",
1010
"@aws-sdk/client-secrets-manager": "^3.1032.0",
1111
"@middy/core": "^7.2.3",
12-
"@middy/input-output-logger": "^7.1.0",
12+
"@middy/input-output-logger": "^7.2.1",
1313
"axios": "^1.15.0",
1414
"jsonwebtoken": "^9.0.3",
1515
"uuid": "^14.0.0"
@@ -22,7 +22,6 @@
2222
},
2323
"devDependencies": {
2424
"@types/jsonwebtoken": "^9.0.10",
25-
"@types/uuid": "^11.0.0",
2625
"aws-sdk-vitest-mock": "^1.0.55",
2726
"nock": "^15.0.0",
2827
"vitest": "^4.0.17"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import inputOutputLogger from "@middy/input-output-logger"
2+
import {LogItemMessage} from "@aws-lambda-powertools/logger/types"
3+
import {Logger} from "@aws-lambda-powertools/logger"
4+
import {Request} from "@middy/core"
5+
6+
export const iOLogger = (logger: Logger) => inputOutputLogger({
7+
logger: (request: unknown) => {
8+
if ((request as Request).response) {
9+
logger.debug(request as LogItemMessage)
10+
} else {
11+
logger.info(request as LogItemMessage)
12+
}
13+
}
14+
})

packages/proxygen/src/proxygenInstanceDelete.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
proxygenErrorHandler
1111
} from "./helpers"
1212
import middy from "@middy/core"
13-
import inputOutputLogger from "@middy/input-output-logger"
1413
import axios from "axios"
14+
import {iOLogger} from "./middleware"
1515

1616
const logger = new Logger({serviceName: "proxygenInstanceDelete"})
1717

@@ -35,14 +35,4 @@ const lambdaHandler = async (event: Proxygen) => {
3535

3636
export const handler = middy(lambdaHandler)
3737
.use(injectLambdaContext(logger, {clearState: true}))
38-
.use(
39-
inputOutputLogger({
40-
logger: (request) => {
41-
if (request.response) {
42-
logger.debug(request)
43-
} else {
44-
logger.info(request)
45-
}
46-
}
47-
})
48-
)
38+
.use(iOLogger(logger))

packages/proxygen/src/proxygenInstanceGet.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
proxygenErrorHandler
1111
} from "./helpers"
1212
import middy from "@middy/core"
13-
import inputOutputLogger from "@middy/input-output-logger"
1413
import axios from "axios"
14+
import {iOLogger} from "./middleware"
1515

1616
const logger = new Logger({serviceName: "proxygenInstanceGet"})
1717

@@ -35,14 +35,4 @@ const lambdaHandler = async (event: Proxygen) => {
3535

3636
export const handler = middy(lambdaHandler)
3737
.use(injectLambdaContext(logger, {clearState: true}))
38-
.use(
39-
inputOutputLogger({
40-
logger: (request) => {
41-
if (request.response) {
42-
logger.debug(request)
43-
} else {
44-
logger.info(request)
45-
}
46-
}
47-
})
48-
)
38+
.use(iOLogger(logger))

packages/proxygen/src/proxygenInstancePut.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010
proxygenErrorHandler
1111
} from "./helpers"
1212
import middy from "@middy/core"
13-
import inputOutputLogger from "@middy/input-output-logger"
1413
import axios from "axios"
14+
import {iOLogger} from "./middleware"
1515

1616
const logger = new Logger({serviceName: "proxygenInstancePut"})
1717

@@ -36,14 +36,4 @@ const lambdaHandler = async (event: Proxygen) => {
3636

3737
export const handler = middy(lambdaHandler)
3838
.use(injectLambdaContext(logger, {clearState: true}))
39-
.use(
40-
inputOutputLogger({
41-
logger: (request) => {
42-
if (request.response) {
43-
logger.debug(request)
44-
} else {
45-
logger.info(request)
46-
}
47-
}
48-
})
49-
)
39+
.use(iOLogger(logger))

packages/proxygen/src/proxygenMTLSSecretPut.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
proxygenErrorHandler
1111
} from "./helpers"
1212
import middy from "@middy/core"
13-
import inputOutputLogger from "@middy/input-output-logger"
1413
import axios from "axios"
1514
import {getSecret} from "./signingHelpers"
15+
import {iOLogger} from "./middleware"
1616

1717
const logger = new Logger({serviceName: "proxygenMTLSSecretPut"})
1818

@@ -50,14 +50,4 @@ const lambdaHandler = async (event: Proxygen) => {
5050

5151
export const handler = middy(lambdaHandler)
5252
.use(injectLambdaContext(logger, {clearState: true}))
53-
.use(
54-
inputOutputLogger({
55-
logger: (request) => {
56-
if (request.response) {
57-
logger.debug(request)
58-
} else {
59-
logger.info(request)
60-
}
61-
}
62-
})
63-
)
53+
.use(iOLogger(logger))

0 commit comments

Comments
 (0)