-
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: POC for new sdk js lib implementation #159
Conversation
db80273
to
c8de545
Compare
*/ | ||
const spinSdk: SpinSdk = __internal__.spin_sdk | ||
spinSdk.utils = utils | ||
spinSdk.Router = () => { |
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.
nit: could we have Router
as a top-level import from the SDK, instead of it being namespaced as spinSdk.Router
?
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 is looking great, LGTM!
(post this merging we need to update the docs for the JS SDK as well)
c8de545
to
233bdb3
Compare
3b0c897
to
73d99a8
Compare
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
Signed-off-by: karthik2804 <karthik.ganeshram@fermyon.com>
73d99a8
to
fe449a6
Compare
This is a very work-in-progress implementation of the SDK lib. This PR attempts to replace the current
spin-sdk
package which hosts only type to a package that provides implementations as well. This allows for there to be an explicit import of types in both ts/js as per #158.Currently, there are examples for both ts/js In
examples/javascript/sdk-poc-js
examples/javascript/sdk-poc-ts
The advantage to this is that helper functions can be added without a need for there to be a new build of the plugin along with allowing us to create explicit imports allowing for the removal of magic imports.
The one downside to this approach is that there will be slightly more work maintaining both the code that is internal to the SDK as well as this package.
There definitely needs to be a lot more of the cleanup if this is an approach we want to pursue.
Thoughts?