-
Notifications
You must be signed in to change notification settings - Fork 221
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
Separate backends #369
Comments
@james-pre Hey! I'm sorry to ask you again, to where I can find a new repo for the remote backend (dropbox)? I want to implement google drive backend as I really need it. If there is anything I can do for you please let me know. thx |
I made the decision not to include any backends for 3rd party services since it was already a huge amount of work splitting up the codebase, rewriting the internal API to use promises, and writing the compatibility for fs promises. Once BFS is up to Node 20 compatibility, I would work on other backends. If you want, I would love a PR for the Dropbox backend that brings it up to the current BFS internal API. Thanks. |
I think it would be enough to just include some generic blackened that would be easy to extend so you can just fill the required implementation for operations like reading directories and files. Though I believe these 3rd party backends might be quite popular I think it would be better to have official support for them.
Have any roadmap or timetable? I'm looking forward to this happening!
Sorry I don't need Dropbox backend, but here I implemented a Google Drive backend: https://github.com/zardoy/browserfs/blob/google-drive/src/backends/GoogleDrive.ts (and already tested a bit) also btw I wanted to support old Node.js API so I added back callback-style support in API EDIT: sorry for the delay, didn't have much time to finish the Google Drive backend, now I need to cleanup all that somehow :) |
I agree with you, I just haven't implemented the 3rd party backends. As for your callback based backend, the backends must implement the internal BFS API (using promises). The compatibility/emulation part of the code then adds the full Node callback API, among other things. I don't have any exact times for when I want to get things done, since I work on BFS in my free time (which can vary widely). Thank you for all the interest! |
I think BFS/core has gotten to a really good point for me to look into implementing the 3rd party backends. First, I want to overhaul the other packages (DOM, Fetch, Worker, Zip, Iso, etc.). Maybe I can look into implementing them in the next month or so? |
IMO it would be much better to support all core features first. For example I'm still eagerly waiting for latest Node.js to be supported (for some things I personally do workarounds like https://github.com/zardoy/prismarine-web-client/blob/f16dbdd61f5b524c892d3da9bfa78f5b18ed13d8/src/browserfs.ts#L33) |
Anyway |
Backends should be separated into different NPM packages so users don't have to import needed backends:
Fetch
/HTTPRequest
/XMLHTTPRequest
backendLocalStorage
andIndexedDB
)Emscripten
backendZipFS
backend (will be updated to include explode, unreduce, and unshrink)IsoFS
backendDropbox
backendNote that ownership of the
@browserfs
organization on NPM is pending and this would resolve #233 and #200.The text was updated successfully, but these errors were encountered: