-
Notifications
You must be signed in to change notification settings - Fork 181
feat: node-appwrite use ts #799
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
1e01b38
feat: node-appwrite use ts
loks0n 130303b
chore: remove node debug
loks0n 81ad78d
fix: flag
loks0n 9433c6b
chore: remove unneccessary deps
loks0n 2cdcfea
fix: type
loks0n 0406dca
fix: pjson
loks0n b771fad
chore: use node changelog
loks0n 2aa9c66
fix: arrayBuffer
loks0n 0a017aa
chore: compat InputFile
loks0n 00eff15
chore: use File type for inputfile
loks0n d497934
chore: publint recommendations
loks0n 57a10e1
chore: fix edge
loks0n 1923225
fix: node 18
loks0n 9126083
chore: fix local build
loks0n 982fe0f
chore: revert pjson changes
loks0n 0e79594
feat: support onProgress
loks0n 962b89b
feat: base user agent
loks0n f5ad360
chore: remove realtime references
loks0n 0b71332
fix: export models
loks0n 1cb4395
fix: build warnings
loks0n 29e7d93
chore: remove esm build
loks0n ac094f6
feat: restore InputFile entrypoint
loks0n 7304672
Revert "feat: restore InputFile entrypoint"
loks0n 45919f0
Revert "chore: remove esm build"
loks0n 107507c
feat: improve user agent
loks0n 79cdd26
feat: support self signed
loks0n 47ea41b
fix: build
loks0n c1a5053
chore: bump node-fetch-native
loks0n 0b1b8db
chore: improve ua
loks0n 3c65f7e
fix: node 16
loks0n 5e9c5d4
fix: remove credentials include
loks0n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should still be
InputFile
right? Otherwise the storage service param will expect aFile
?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've switched this to
File
on purpose. The InputFile class now returns an instance of the File class.File is a web Javascript standard API[1] and is available on most edge runtimes including vercel[2].
It's available in Node.js from version 18, and we use
node-fetch-native
to fallback on a polyfill where it doesn't exist.[1] https://developer.mozilla.org/en-US/docs/Web/API/File
[2] https://nextjs.org/docs/pages/api-reference/edge
[3] https://nodejs.org/docs/latest/api/buffer.html#class-file
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 change the service method parameter types? We can use
File
internally, but should still expect anInputFile
in the user-facing methods likestorage.createFile
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, because the user's
InputFile
helpers import will break on edge runtimes (due to its dependency on Node'sfs
module), so if we wantstorage.createFile
to work on edge runtimes, we'll have to use the builtinFile
object.If we use
InputFile
in the service method parameters then it is more obvious to the user that the helpers exist, but it will only work in Node-like environments