Skip to content

Add ssdk typescript libraries #307

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

Merged
merged 8 commits into from
Apr 16, 2021

Conversation

JordonPhillips
Copy link
Contributor

@JordonPhillips JordonPhillips commented Apr 9, 2021

This adds the typescript libraries needed to support the SSDK as well as the library that provides apigateway support.

There's two libraries here:

  • smithy-typescript/server-common - Defines common interfaces used in generating the ssdk.
  • smithy-typescript/server-apigateway - Provides helpers to convert apigateway events to HttpRequests and HttpResponses to apigateway response format.

Out of scope for this PR but still needs to be done:

  • More detailed docs for each.
  • Shared build / test / publish to npm setup, likely to be based off of what's in the aws js repo. That said, if there's something here that would make that harder then I'd like to know.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This adds the typescript libraries needed to support the SSDK as well
as the library that provides apigateway support.
Copy link
Contributor

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my side, just have a few questions and discussion points.

if (i === this.pathSegments.length - 1) {
// greedy label at the end of pathSegments swallows the remaining path segments
requestPathIdx = requestPathSegments.length;
break path_loop;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ispath_loop here and line 76 necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it's a vestige of when this code was even harder to follow (hard to believe, I know). I kept it in case it made the flow of the break more understandable since there's a lot of nesting, not because the break was ambiguous.

This updates the node dependencies for the ssdk libs to node 14, which
is the most recent version supported by Lambda.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants