serverless-offline 11.0.0 → 11.0.1

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": "11.0.0",
4
+ "version": "11.0.1",
5
5
  "description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -903,13 +903,17 @@ export default class HttpServer {
903
903
  }
904
904
 
905
905
  if (this.#apiKeysValues == null) {
906
- const apiKey = createApiKey()
907
-
908
906
  this.#apiKeysValues = getApiKeysValues(
909
- this.#serverless.service.provider.apiGateway?.apiKeys ?? [apiKey],
907
+ this.#serverless.service.provider.apiGateway?.apiKeys ?? [],
910
908
  )
911
909
 
912
- log.notice(`Key with token: ${apiKey}`)
910
+ if (this.#apiKeysValues.size === 0) {
911
+ const apiKey = createApiKey()
912
+
913
+ this.#apiKeysValues.add(apiKey)
914
+
915
+ log.notice(`Key with token: ${apiKey}`)
916
+ }
913
917
  }
914
918
  }
915
919