-
Notifications
You must be signed in to change notification settings - Fork 6
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
Generic filehandle remoteFile refactor #42
Conversation
Codecov Report
@@ Coverage Diff @@
## master #42 +/- ##
==========================================
+ Coverage 89.28% 89.93% +0.64%
==========================================
Files 4 4
Lines 140 149 +9
Branches 49 54 +5
==========================================
+ Hits 125 134 +9
Misses 15 15
Continue to review full report at Codecov.
|
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.
these look great to me, would like to see what @cmdcolin thinks before merging though
This is pretty good code wise but I am not a big fan of our library code depending on stat. I know it already exists in some libraries but it complicates any CORS setup by requiring additional headers and such, and it would now require allowing HEAD request CORS setup too. We can just say "whatever screw CORS we'll proxy it/use node fetch" but not hugely into this either. |
Weird, I wasn't getting notifications for this PR. So I added some additional stuff to |
Looks to me like this adds a pretty darn robust stat implementation, but doesn’t add any overhead to code that doesn’t want to use it. Is that what you guys are getting from this? |
@cmdcolin any other concerns or questions with merging this? I want to make sure I actually addressed what you were asking about. |
I had concerns including |
The HEAD request is basically a way to increase the robustness of the As for the What about the abstraction do you have concerns with? |
Closing in favor of #43. |
These are a couple proposed changes to help me get cors-busting working in jb-desktop. Basically they are:
stat
method to the GenericFilehandle interfacegetFetch
methodBasically I'm extending RemoteFile in jb-desktop so that the
getFetch
method can fall back to using node-fetch if fetch fails (which may be due to cors).