-
Notifications
You must be signed in to change notification settings - Fork 18
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
(WIP) Update templates/examples for SDK v3 #319
(WIP) Update templates/examples for SDK v3 #319
Conversation
0efb6dd
to
e181b8e
Compare
@@ -30,18 +22,15 @@ npm install | |||
|
|||
```typescript | |||
const client = new S3Client({ | |||
region: "<>", |
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.
Is this intended?
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.
Ah good catch - this changed in the example because I rewrote the example to use the router to both be able to list objects and also stream objects for which I hardcoded the region. I will update the readme to use the hardcoded version for now if that is acceptable.
secretAccessKey: '<>', | ||
sessionToken: '<>', | ||
}, | ||
region: 'us-west-2', |
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.
same as above
@@ -3,17 +3,17 @@ spin_manifest_version = 2 | |||
[application] | |||
authors = ["karthik2804 <[email protected]>"] | |||
description = "" | |||
name = "s3" | |||
name = "sqs" |
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.
Good catch.
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.
This looks great! Thank you for being extremely diligent in applying changes uniformly.
I left a bunch of suggestions, but none of them are really blocking—except for updating to 3.0 of the SDK: I think we should land this once we've published that. Alternatively we can land it now without a new release, and plan for a very quick follow-up
// Any unmatched route will return a 404 | ||
router | ||
.get("/", async () => { | ||
let command = new SendMessageCommand(params); |
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.
Does this dynamically make use of request state somehow? If not, we should move it outside the request handler, so it happens at wizening time.
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.
I love the way you've got rid of the spin.ts
file, and re-established a distinction between Spin stuff and third-party stuff like the router. I left notes on a couple of things I was puzzled by, but they're nits: this is storming stuff.
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
Signed-off-by: karthik2804 <[email protected]>
d951c50
to
045f9b3
Compare
This PR updates the HTTP template to use the new V3 SDK. It currently points at
3.0.0-rc1
.To currently try out the templates, one can install it using
$ spin templates install --update --git https://github.com/karthik2804/spin-js-sdk --branch update_templates_samples_v3
TODOS:
v3.0.0
once we have a stable releasev3.0.0
update all examples and generate apackage-lock.json