-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Promise return type for proxy function #332
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling this project in TypeScript gave the following error: ``` error TS2314: Generic type 'Promise<T>' requires 1 type argument(s). declare function proxy(proxyParams: ProxyParams): Promise ``` This commit tries to fix this error without being explicit with the return type.
brettstack
approved these changes
Jan 11, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Released in RC 6 |
github-actions bot
pushed a commit
that referenced
this pull request
Feb 1, 2021
# [4.0.0](v3.3.5...v4.0.0) (2021-02-01) ### Bug Fixes * **audit:** npm audit fix ([66b03e5](66b03e5)) * add body parsing for lambda edge event source ([116949d](116949d)) * add Promise return type for proxy function ([#332](#332)) ([5b23f3c](5b23f3c)) * change logging to include a log key ([542d473](542d473)) * clean up sockets on EADDRINUSE server close ([e768599](e768599)) * dependabot alerts ([df60394](df60394)) * fix API Gateway V2 header response ([90bad18](90bad18)), closes [#352](#352) * fix getRequestValuesFromEvent headers ([f915e94](f915e94)) * fix Lambda@Edge event source ([95b0aa6](95b0aa6)) * fix Lambda@Edge headers and body ([aabd9d3](aabd9d3)) * fix remoteAddress undefined on ALB event source ([a092233](a092233)) * log actual headers in SERVERLESS_EXPRESS:FORWARD_RESPONSE:EVENT_SOURCE_RESPONSE_PARAMS ([72f2ef5](72f2ef5)) * make optional the property `binarySettings` of `ConfigureParams` in typings ([b08ee87](b08ee87)) * remove commitlint from travis ([7b12e56](7b12e56)) * remove Node.js 4 support ([713ad14](713ad14)) * remove Node.js 4 support ([e01c9af](e01c9af)) * remove winston dependency and add basic logger ([5bd6c2c](5bd6c2c)) * transform lambda edge response headers to lower case ([922fec0](922fec0)) * transform request header keys to lower case ([daa656b](daa656b)) * update dependencies ([e705bc6](e705bc6)) * update dependencies ([075e15b](075e15b)) * update dependencies ([39c55eb](39c55eb)) ### Features * add additional event mapping logic ([e5909b5](e5909b5)) * add custom mapping example ([fe99c85](fe99c85)) * add HTTP API (APIGW-V2) event source ([60cb8e1](60cb8e1)) * add lambda edge support and example ([230c9c5](230c9c5)) * add logger ([e35a348](e35a348)) * add multiValueHeader and multiValueQueryStringParameters ([7199aa5](7199aa5)) * add respondWithErrors config ([53cf974](53cf974)) * add stripBasePath for custom domain names ([3a5c7ed](3a5c7ed)) * auto-detect binary response and add binarySettings ([64a99dc](64a99dc)) * call Express directly instead of via a proxy server running on a local socket ([a468c72](a468c72)) * lay groundwork for different event sources ([2db86f2](2db86f2)) * refactor and expose a new interface ([7de5d45](7de5d45)) * remove middleware and expose getCurrentLambdaInvoke method ([b56c13b](b56c13b)) * use multiValueHeaders for requests and responses ([c5ce62f](c5ce62f)) * use promise resolution by default ([a9c01a3](a9c01a3)) ### BREAKING CHANGES * The new interface is backwards incompatible and includes new and simpler ways of configuring and using the package.
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
OneDev0411
added a commit
to OneDev0411/serverless-express
that referenced
this pull request
Mar 16, 2023
# [4.0.0](CodeGenieApp/serverless-express@v3.3.5...v4.0.0) (2021-02-01) ### Bug Fixes * **audit:** npm audit fix ([66b03e5](CodeGenieApp/serverless-express@66b03e5)) * add body parsing for lambda edge event source ([116949d](CodeGenieApp/serverless-express@116949d)) * add Promise return type for proxy function ([#332](CodeGenieApp/serverless-express#332)) ([5b23f3c](CodeGenieApp/serverless-express@5b23f3c)) * change logging to include a log key ([542d473](CodeGenieApp/serverless-express@542d473)) * clean up sockets on EADDRINUSE server close ([e768599](CodeGenieApp/serverless-express@e768599)) * dependabot alerts ([df60394](CodeGenieApp/serverless-express@df60394)) * fix API Gateway V2 header response ([90bad18](CodeGenieApp/serverless-express@90bad18)), closes [#352](CodeGenieApp/serverless-express#352) * fix getRequestValuesFromEvent headers ([f915e94](CodeGenieApp/serverless-express@f915e94)) * fix Lambda@Edge event source ([95b0aa6](CodeGenieApp/serverless-express@95b0aa6)) * fix Lambda@Edge headers and body ([aabd9d3](CodeGenieApp/serverless-express@aabd9d3)) * fix remoteAddress undefined on ALB event source ([a092233](CodeGenieApp/serverless-express@a092233)) * log actual headers in SERVERLESS_EXPRESS:FORWARD_RESPONSE:EVENT_SOURCE_RESPONSE_PARAMS ([72f2ef5](CodeGenieApp/serverless-express@72f2ef5)) * make optional the property `binarySettings` of `ConfigureParams` in typings ([b08ee87](CodeGenieApp/serverless-express@b08ee87)) * remove commitlint from travis ([7b12e56](CodeGenieApp/serverless-express@7b12e56)) * remove Node.js 4 support ([713ad14](CodeGenieApp/serverless-express@713ad14)) * remove Node.js 4 support ([e01c9af](CodeGenieApp/serverless-express@e01c9af)) * remove winston dependency and add basic logger ([5bd6c2c](CodeGenieApp/serverless-express@5bd6c2c)) * transform lambda edge response headers to lower case ([922fec0](CodeGenieApp/serverless-express@922fec0)) * transform request header keys to lower case ([daa656b](CodeGenieApp/serverless-express@daa656b)) * update dependencies ([e705bc6](CodeGenieApp/serverless-express@e705bc6)) * update dependencies ([075e15b](CodeGenieApp/serverless-express@075e15b)) * update dependencies ([39c55eb](CodeGenieApp/serverless-express@39c55eb)) ### Features * add additional event mapping logic ([e5909b5](CodeGenieApp/serverless-express@e5909b5)) * add custom mapping example ([fe99c85](CodeGenieApp/serverless-express@fe99c85)) * add HTTP API (APIGW-V2) event source ([60cb8e1](CodeGenieApp/serverless-express@60cb8e1)) * add lambda edge support and example ([230c9c5](CodeGenieApp/serverless-express@230c9c5)) * add logger ([e35a348](CodeGenieApp/serverless-express@e35a348)) * add multiValueHeader and multiValueQueryStringParameters ([7199aa5](CodeGenieApp/serverless-express@7199aa5)) * add respondWithErrors config ([53cf974](CodeGenieApp/serverless-express@53cf974)) * add stripBasePath for custom domain names ([3a5c7ed](CodeGenieApp/serverless-express@3a5c7ed)) * auto-detect binary response and add binarySettings ([64a99dc](CodeGenieApp/serverless-express@64a99dc)) * call Express directly instead of via a proxy server running on a local socket ([a468c72](CodeGenieApp/serverless-express@a468c72)) * lay groundwork for different event sources ([2db86f2](CodeGenieApp/serverless-express@2db86f2)) * refactor and expose a new interface ([7de5d45](CodeGenieApp/serverless-express@7de5d45)) * remove middleware and expose getCurrentLambdaInvoke method ([b56c13b](CodeGenieApp/serverless-express@b56c13b)) * use multiValueHeaders for requests and responses ([c5ce62f](CodeGenieApp/serverless-express@c5ce62f)) * use promise resolution by default ([a9c01a3](CodeGenieApp/serverless-express@a9c01a3)) ### BREAKING CHANGES * The new interface is backwards incompatible and includes new and simpler ways of configuring and using the package.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Compiling this project in TypeScript 4.1.2 gave the following error:
This commit tries to fix this error without being explicit with the return type.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.