nitrojs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.build
MIT License
6.16k stars 507 forks source link

feat(raw): add `.sql` to raw file extensions #2745

Closed mbegerau closed 1 month ago

mbegerau commented 1 month ago

๐Ÿ”— Linked issue

2666 [useStorage] getItem and getItemRaw -> Inconsistent behaviour between dev and preview/production

โ“ Type of change

๐Ÿ“š Description

The change adds the .sql extension and the application/sql mime type (that is what the mime library assigns to .sql files) to the list of file types that are stored as string and not as Uint8Array.

That makes the process to use the server:assets storage for .sql files straightforward and intuitive.

Resolves partly #2666 The change does not solve the issue that useStorage acts differently in dev and production environment, but it solves the problem that .sql files are not stored as string.

๐Ÿ“ Checklist