serverless-offline 10.0.1 → 10.0.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/README.md CHANGED
@@ -423,11 +423,13 @@ If your authentication needs are custom and not satisfied by the existing capabi
423
423
  ```js
424
424
  module.exports = function (endpoint, functionKey, method, path) {
425
425
  return {
426
- getAuthenticateFunction: () => ({
427
- async authenticate(request, h) {
428
- // your implementation
429
- },
430
- }),
426
+ getAuthenticateFunction() {
427
+ return {
428
+ async authenticate(request, h) {
429
+ // your implementation
430
+ },
431
+ }
432
+ },
431
433
 
432
434
  name: 'your strategy name',
433
435
  scheme: 'your scheme name',
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": "10.0.1",
4
+ "version": "10.0.2",
5
5
  "description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -4,21 +4,20 @@ import InProcessRunner from '../in-process-runner/index.js'
4
4
 
5
5
  const { functionKey, handler, servicePath, timeout, codeDir } = workerData
6
6
 
7
+ const inProcessRunner = new InProcessRunner(
8
+ {
9
+ codeDir,
10
+ functionKey,
11
+ handler,
12
+ servicePath,
13
+ timeout,
14
+ },
15
+ env,
16
+ )
17
+
7
18
  parentPort.on('message', async (messageData) => {
8
19
  const { context, event, port } = messageData
9
20
 
10
- // TODO we could probably cache this in the module scope?
11
- const inProcessRunner = new InProcessRunner(
12
- {
13
- codeDir,
14
- functionKey,
15
- handler,
16
- servicePath,
17
- timeout,
18
- },
19
- env,
20
- )
21
-
22
21
  let result
23
22
 
24
23
  try {