serverless-offline 9.2.2 → 9.2.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 +1 -1
- package/src/events/http/Endpoint.js +2 -2
- package/src/events/http/authJWTSettingsExtractor.js +14 -10
- package/src/lambda/handler-runner/child-process-runner/ChildProcessRunner.js +1 -1
- package/src/lambda/handler-runner/child-process-runner/childProcessHelper.js +1 -1
- package/src/lambda/handler-runner/worker-thread-runner/WorkerThreadRunner.js +1 -1
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": "9.2.
|
|
4
|
+
"version": "9.2.3",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./src/index.js",
|
|
@@ -10,11 +10,11 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
10
10
|
|
|
11
11
|
// velocity template defaults
|
|
12
12
|
const defaultRequestTemplate = readFileSync(
|
|
13
|
-
resolve(__dirname, '
|
|
13
|
+
resolve(__dirname, 'templates/offline-default.req.vm'),
|
|
14
14
|
'utf8',
|
|
15
15
|
)
|
|
16
16
|
const defaultResponseTemplate = readFileSync(
|
|
17
|
-
resolve(__dirname, '
|
|
17
|
+
resolve(__dirname, 'templates/offline-default.res.vm'),
|
|
18
18
|
'utf8',
|
|
19
19
|
)
|
|
20
20
|
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { log } from '@serverless/utils/log.js'
|
|
2
2
|
|
|
3
|
+
function buildFailureResult(warningMessage) {
|
|
4
|
+
log.warning(warningMessage)
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
unsupportedAuth: true,
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function buildSuccessResult(authorizerName) {
|
|
12
|
+
return {
|
|
13
|
+
authorizerName,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
3
17
|
export default function authJWTSettingsExtractor(
|
|
4
18
|
endpoint,
|
|
5
19
|
provider,
|
|
6
20
|
ignoreJWTSignature,
|
|
7
21
|
) {
|
|
8
|
-
const buildFailureResult = (warningMessage) => {
|
|
9
|
-
log.warning(warningMessage)
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
unsupportedAuth: true,
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const buildSuccessResult = (authorizerName) => ({ authorizerName })
|
|
17
|
-
|
|
18
22
|
const { authorizer } = endpoint
|
|
19
23
|
|
|
20
24
|
if (!authorizer) {
|
|
@@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url'
|
|
|
3
3
|
import { MessageChannel, Worker } from 'node:worker_threads'
|
|
4
4
|
|
|
5
5
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
6
|
-
const workerThreadHelperPath = resolve(__dirname, '
|
|
6
|
+
const workerThreadHelperPath = resolve(__dirname, 'workerThreadHelper.js')
|
|
7
7
|
|
|
8
8
|
export default class WorkerThreadRunner {
|
|
9
9
|
#workerThread = null
|