serverless-offline 11.0.2 → 11.0.3
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/package.json +3 -3
- package/src/lambda/LambdaFunction.js +16 -16
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dedicatedTo": "Blue, a great migrating bird.",
|
|
3
3
|
"name": "serverless-offline",
|
|
4
|
-
"version": "11.0.
|
|
4
|
+
"version": "11.0.3",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"@hapi/h2o2": "^10.0.0",
|
|
87
87
|
"@hapi/hapi": "^20.2.2",
|
|
88
88
|
"@serverless/utils": "^6.7.0",
|
|
89
|
-
"aws-sdk": "^2.
|
|
89
|
+
"aws-sdk": "^2.1230.0",
|
|
90
90
|
"boxen": "^7.0.0",
|
|
91
|
-
"chalk": "^5.0
|
|
91
|
+
"chalk": "^5.1.0",
|
|
92
92
|
"execa": "^6.1.0",
|
|
93
93
|
"fs-extra": "^10.1.0",
|
|
94
94
|
"java-invoke-local": "0.0.6",
|
|
@@ -306,31 +306,31 @@ export default class LambdaFunction {
|
|
|
306
306
|
this.#handlerRunner.run(this.#event, context),
|
|
307
307
|
...(this.#noTimeout ? [] : [this.#timeoutAndTerminate()]),
|
|
308
308
|
])
|
|
309
|
+
|
|
310
|
+
this.#stopExecutionTimer()
|
|
311
|
+
|
|
312
|
+
// TEMP TODO FIXME find better solution
|
|
313
|
+
if (!this.#handlerRunner.isDockerRunner()) {
|
|
314
|
+
log.notice(
|
|
315
|
+
`(λ: ${
|
|
316
|
+
this.#functionKey
|
|
317
|
+
}) RequestId: ${requestId} Duration: ${this.#executionTimeInMillis().toFixed(
|
|
318
|
+
2,
|
|
319
|
+
)} ms Billed Duration: ${this.#billedExecutionTimeInMillis()} ms`,
|
|
320
|
+
)
|
|
321
|
+
}
|
|
309
322
|
} catch (err) {
|
|
310
323
|
if (err instanceof LambdaTimeoutError) {
|
|
311
324
|
await this.#handlerRunner.cleanup()
|
|
312
325
|
}
|
|
313
326
|
|
|
314
327
|
throw err
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
this.#stopExecutionTimer()
|
|
328
|
+
} finally {
|
|
329
|
+
this.#status = 'IDLE'
|
|
318
330
|
|
|
319
|
-
|
|
320
|
-
if (!this.#handlerRunner.isDockerRunner()) {
|
|
321
|
-
log.notice(
|
|
322
|
-
`(λ: ${
|
|
323
|
-
this.#functionKey
|
|
324
|
-
}) RequestId: ${requestId} Duration: ${this.#executionTimeInMillis().toFixed(
|
|
325
|
-
2,
|
|
326
|
-
)} ms Billed Duration: ${this.#billedExecutionTimeInMillis()} ms`,
|
|
327
|
-
)
|
|
331
|
+
this.#startIdleTimer()
|
|
328
332
|
}
|
|
329
333
|
|
|
330
|
-
this.#status = 'IDLE'
|
|
331
|
-
|
|
332
|
-
this.#startIdleTimer()
|
|
333
|
-
|
|
334
334
|
return result
|
|
335
335
|
}
|
|
336
336
|
}
|