-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Refactor to dub
TypeScript SDK
#13449
base: main
Are you sure you want to change the base?
Conversation
Simplify Dub Raycast Extension by using `dub` TypeScript SDK
Thank you for your contribution! 🎉 🔔 @quuu @jfkisafk @steven-tey you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. We're currently experiencing high demand and limited capacity. As a result, extension reviews might take longer than usual to get the initial review. Please expect an initial review within 5-10 business days. |
Hey @steven-tey , I tried to use the sdk too, but got the same error before! So I stuck with |
@peduarte @thomaslombart any ideas here? 👀 |
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.
We can address these while we try to resolve that Header issue. After that, we might need to see if the DUB error(s) are being properly propagated to the user.
Co-authored-by: stelo <42366677+jfkisafk@users.noreply.github.com>
Co-authored-by: stelo <42366677+jfkisafk@users.noreply.github.com>
@jfkisafk thank you so much! Addressed all your feedback 🙏 |
Hey @steven-tey this is not a raycast issue, b/c the error is happening during the
In the generated file, the source code is copied from the dub TS SDK, and the I think the code that Speakeasy is generating is not adding the import/dependency for |
@jfkisafk this should be the |
It is strange, I can see that the import is not necessary (my IDEs are also indicating that). Not sure why in the generated .js file this is causing an issue @steven-tey . Let me investigate more. Or easier debugging option would be to just use |
Hey @steven-tey the problem is exactly this: https://stackoverflow.com/a/65355673 I tested it by just placing: new Headers({
"Content-Type": "application/json",
}) in the codepath without the |
@jfkisafk just added a polyfill patch thanks to @disintegrator that fully fixes this! 🤩 CleanShot.2024-07-15.at.08.21.45.mp4 |
@@ -0,0 +1,81 @@ | |||
diff --git a/extensions/dub-link-shortener/package-lock.json b/extensions/dub-link-shortener/package-lock.json |
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 file necessary?
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.
@steven-tey I had the same question, it looked like a git patch that was already applied. Shall we clean this up?
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.
Other than this .patch
file, things look okay on my side. Ready to merge after I get some answers :)
Description
Simplify Dub Raycast Extension by using
dub
TypeScript SDK.Also added support for shortening links with custom domains:
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder