-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat: add directus
provider
#787
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
✅ Deploy Preview for nuxt-image-v1 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Live Preview ready!
|
I really can't wait to test nuxt.studio 🥲 |
LGTM |
Would you be able to merge the latest main and add snapshots/expected values for directus? 🙏 |
I've yet never used/created vitest, but there is always a first time right? I should add the entry inside the const missingProviderTests = [
'directus', // covered in a unique test
'strapi', // covered in a unique test
'layer0' // backwards-compatible alias for edgio
] and what else? |
You could add entries for directus in this file: Lines 2 to 23 in 28f550d
Only use the approach I adopted for If you think it needs more testing, then you can also add additional tests in the |
Directus does support all the listed ones inside
Any options and transformations are added as query parameters to the url. |
|
Ok, so the last commit should do it |
Would you run pnpm i to ensure you're running the latest dependencies? |
Pulled latest commits, I started a Directus test via docker and the requests are perfectly fulfilled. |
Upsy. Thanks, I was a bit on a rush. Co-authored-by: Daniel Roe <daniel@roe.dev>
const transforms = modifiers.transforms | ||
if (transforms && transforms.length > 0) { | ||
// We stringify and encode in URL the list of lists, then apply it back to the modifiers | ||
modifiers.transforms = new URLSearchParams(JSON.stringify(transforms)).toString().replace(/=+$/, '') as unknown as (string | number)[][] |
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 a little bit inconsistent with other providers using ufo utils but should be fine...
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 for the note. I'm not yet familiar with ufo, but since it is on my learning list I'll try to update this once I'm more confident
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.
Haven't locally tried but looks 💯
Lately I started experimenting with Directus Headless CMS and to my surprise it has a nice implementation and usage of sharp.
So I decided to add it as a provider for ease of use.