serverless-offline 11.4.0 → 11.6.0
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/README.md
CHANGED
|
@@ -262,7 +262,7 @@ By default you can send your requests to `http://localhost:3000/`. Please note t
|
|
|
262
262
|
|
|
263
263
|
### node.js
|
|
264
264
|
|
|
265
|
-
Lambda handlers for the `node.js` runtime can run in different execution modes
|
|
265
|
+
Lambda handlers with `serverless-offline` for the `node.js` runtime can run in different execution modes and have some differences with a variety of pros and cons. they are currently mutually exclusive and it's not possible to use a combination, e.g. use `in-process` for one Lambda, and `worker-threads` for another. It is planned to combine the flags into one single flag in the future and also add support for combining run modes.
|
|
266
266
|
|
|
267
267
|
#### worker-threads (default)
|
|
268
268
|
|
|
@@ -273,6 +273,10 @@ Lambda handlers for the `node.js` runtime can run in different execution modes w
|
|
|
273
273
|
- global state is not being shared across handlers
|
|
274
274
|
- easy debugging
|
|
275
275
|
|
|
276
|
+
NOTE:
|
|
277
|
+
|
|
278
|
+
- native modules need to be a Node-API addon or be declared as context-aware using NODE_MODULE_INIT(): https://nodejs.org/docs/latest/api/addons.html#worker-support
|
|
279
|
+
|
|
276
280
|
#### in-process
|
|
277
281
|
|
|
278
282
|
- handlers run in the same context (instance) as `serverless` and `serverless-offline`
|
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.
|
|
4
|
+
"version": "11.6.0",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@aws-sdk/client-lambda": "^3.
|
|
85
|
+
"@aws-sdk/client-lambda": "^3.216.0",
|
|
86
86
|
"@hapi/boom": "^10.0.0",
|
|
87
87
|
"@hapi/h2o2": "^10.0.0",
|
|
88
88
|
"@hapi/hapi": "^21.0.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"fs-extra": "^10.1.0",
|
|
94
94
|
"is-wsl": "^2.2.0",
|
|
95
95
|
"java-invoke-local": "0.0.6",
|
|
96
|
-
"jose": "^4.11.
|
|
96
|
+
"jose": "^4.11.1",
|
|
97
97
|
"js-string-escape": "^1.0.1",
|
|
98
98
|
"jsonpath-plus": "^7.2.0",
|
|
99
99
|
"jsonschema": "^1.4.1",
|
|
@@ -103,14 +103,14 @@
|
|
|
103
103
|
"node-schedule": "^2.1.0",
|
|
104
104
|
"object.hasown": "^1.1.2",
|
|
105
105
|
"p-memoize": "^7.1.1",
|
|
106
|
-
"p-retry": "^5.1.
|
|
106
|
+
"p-retry": "^5.1.2",
|
|
107
107
|
"velocityjs": "^2.0.6",
|
|
108
108
|
"ws": "^8.11.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@istanbuljs/esm-loader-hook": "^0.2.0",
|
|
112
112
|
"archiver": "^5.3.1",
|
|
113
|
-
"eslint": "^8.
|
|
113
|
+
"eslint": "^8.28.0",
|
|
114
114
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
115
115
|
"eslint-config-prettier": "^8.5.0",
|
|
116
116
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"lint-staged": "^13.0.3",
|
|
121
121
|
"mocha": "^10.1.0",
|
|
122
122
|
"nyc": "^15.1.0",
|
|
123
|
-
"prettier": "^2.
|
|
124
|
-
"serverless": "^3.
|
|
123
|
+
"prettier": "^2.8.0",
|
|
124
|
+
"serverless": "^3.25.0",
|
|
125
125
|
"standard-version": "^9.5.0"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
@@ -18,6 +18,7 @@ export const supportedNodejs = new Set([
|
|
|
18
18
|
'nodejs12.x',
|
|
19
19
|
'nodejs14.x',
|
|
20
20
|
'nodejs16.x',
|
|
21
|
+
'nodejs18.x',
|
|
21
22
|
])
|
|
22
23
|
|
|
23
24
|
// PROVIDED
|
|
@@ -49,5 +50,6 @@ export const supportedRuntimes = new Set([
|
|
|
49
50
|
export const unsupportedDockerRuntimes = new Set([
|
|
50
51
|
'nodejs14.x',
|
|
51
52
|
'nodejs16.x',
|
|
53
|
+
'nodejs18.x',
|
|
52
54
|
'python3.9',
|
|
53
55
|
])
|
|
@@ -78,9 +78,12 @@ export default function createAuthScheme(authorizerOptions, provider, lambda) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (authorization === undefined) {
|
|
81
|
-
|
|
81
|
+
log.error(
|
|
82
82
|
`Identity Source is null for ${identitySourceType} ${identitySourceField} (λ: ${authFunName})`,
|
|
83
83
|
)
|
|
84
|
+
return Boom.unauthorized(
|
|
85
|
+
'User is not authorized to access this resource',
|
|
86
|
+
)
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
const identityValidationExpression = new RegExp(
|