serverless-offline 13.1.0 → 13.1.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dedicatedTo": "Blue, a great migrating bird.",
|
|
3
3
|
"name": "serverless-offline",
|
|
4
|
-
"version": "13.1.
|
|
4
|
+
"version": "13.1.2",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
]
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@aws-sdk/client-lambda": "^3.
|
|
82
|
+
"@aws-sdk/client-lambda": "^3.421.0",
|
|
83
83
|
"@hapi/boom": "^10.0.1",
|
|
84
84
|
"@hapi/h2o2": "^10.0.4",
|
|
85
85
|
"@hapi/hapi": "^21.3.2",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"desm": "^1.3.0",
|
|
91
91
|
"execa": "^8.0.1",
|
|
92
92
|
"fs-extra": "^11.1.1",
|
|
93
|
-
"is-wsl": "^3.
|
|
93
|
+
"is-wsl": "^3.1.0",
|
|
94
94
|
"java-invoke-local": "0.0.6",
|
|
95
95
|
"jose": "^4.14.6",
|
|
96
96
|
"js-string-escape": "^1.0.1",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"luxon": "^3.2.0",
|
|
101
101
|
"node-schedule": "^2.1.1",
|
|
102
102
|
"p-memoize": "^7.1.1",
|
|
103
|
-
"p-retry": "^6.
|
|
103
|
+
"p-retry": "^6.1.0",
|
|
104
104
|
"velocityjs": "^2.0.6",
|
|
105
105
|
"ws": "^8.14.2"
|
|
106
106
|
},
|
|
@@ -292,7 +292,11 @@ export default class HttpServer {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
createRoutes(functionKey, albEvent) {
|
|
295
|
-
|
|
295
|
+
let method = 'ANY'
|
|
296
|
+
if ((albEvent.conditions.method || []).length > 0) {
|
|
297
|
+
method = albEvent.conditions.method[0].toUpperCase()
|
|
298
|
+
}
|
|
299
|
+
|
|
296
300
|
const path = albEvent.conditions.path[0]
|
|
297
301
|
const hapiPath = generateAlbHapiPath(path, this.#options, this.#serverless)
|
|
298
302
|
|
|
@@ -39,6 +39,9 @@ export default class LambdaProxyIntegrationEventV2 {
|
|
|
39
39
|
this.#request.auth.credentials.context) ||
|
|
40
40
|
{}
|
|
41
41
|
|
|
42
|
+
// AWS adds the lambda key to the auth context object
|
|
43
|
+
const lambdaAuthContext = { lambda: authContext }
|
|
44
|
+
|
|
42
45
|
let authAuthorizer
|
|
43
46
|
|
|
44
47
|
if (env.AUTHORIZER) {
|
|
@@ -154,7 +157,7 @@ export default class LambdaProxyIntegrationEventV2 {
|
|
|
154
157
|
apiId: 'offlineContext_apiId',
|
|
155
158
|
authorizer:
|
|
156
159
|
authAuthorizer ||
|
|
157
|
-
assign(
|
|
160
|
+
assign(lambdaAuthContext, {
|
|
158
161
|
jwt: {
|
|
159
162
|
claims,
|
|
160
163
|
scopes,
|