Comments (8)
I'm closing this because I'm trying to tidy up the github issues, but I highly encourage you to join the new Gitter community discussion room I made! https://gitter.im/isomorphic-git/Lobby
from isomorphic-git.
FWIW, I've got an early version of WebAppFind working now (the browser add-on I mention above allowing one to open files from the desktop directly into a desired web app), but the reimplementation is, for now, Mac-only (and Firefox only, despite being a WebExtension).
In the future, I hope to allow granting of directory-level permissions (and persistence of those permissions), which could, in theory, allow isomorphic-git to view/operate on, and be in sync with, a desktop-based repository.
My next step is a video tutorial, as there is not much for docs (and what there is is outdated). But just something you might keep in the back of your mind as far as future possibilities...
from isomorphic-git.
Hmmm... WebSockets would actually be a very good channel. I currently have pretty stable client side support for the smart HTTPS protocol. I would need to do some extra work so that it did the server side of the protocol as well (it's asymmetrical) but I've been meaning to do that.
Long story short - I already plan to add support for the git pack-protocol over WebRTC for direct P2P cloning. WebSockets are actually a little simpler than WebRTC, so I could implement it on WebSockets first, then once that's working go for the P2P protocol.
To make a short story longer... if you can use a custom WebSocket library for your application, you probably can also use the regular "smart" HTTP protocol in your application, so the main advantage that WebSockets give you is probably speed / latency for multiple packfile requests.
To make the story about something completely different, have you taken a look at my proxy server for getting around CORS? https://zeit.co/wmh/cors-buster/jfpactjnem/source?f=index.js That's what I've been using so my web apps can push & pull from Github.
from isomorphic-git.
That sounds great... WebRTC sounds awesome too...
Your server is indicating "An error has occurred" with the following in Chrome's console:
Version: 4.21.2
app.js:2 Check out our code here: https://zeit.co/oss
app.js:2 Have a great day! 📣🐢
app.js:29 500 - Internal Server Error.
undefined
(anonymous) @ app.js:29
Failed to load resource: the server responded with a status of 500 () source
A pity Github (and apparently Bitbucket) don't place nice with CORS, so a CORS proxy server sounds quite useful here. FWIW, if you hadn't seen the larger context of the conversation I referenced, there is a Firefox add-on and a Chrome extension to get around this, even if it wouldn't solve the problem for one's regular users.
The following is off topic but just if it may be interesting...
Given your interest in decentralized access to local data sources on the web, I might just mention my own browser add-on, webappfind, which allowed for one to open files on one's desktop (whether by double-click or "Open with...") immediately into a web app without need for drag and drop. (The web app was indicated either by instructions in a local filetypes.json
file or by protocol handler registration, and the web app would add a window.onmessage
handler to listen for the file contents and optionally be given the privilege to write back to the file (and that file only) using postMessage(data, '*')
.)
I had a working version before Firefox updates broke it, but I found it could now be possible to reimplement given that the cross-browser-directed WebExtensions project of Mozilla can support Native Messaging (potentially working in Chrome as well) and I was able to get a branch confirming that Native Messaging will work (conveniently being able to use Node.js), but I haven't done the full rewrite to reimplement the old behavior. But just sharing if you might find the possibility interesting.
from isomorphic-git.
Interesting. Zeit "wakes up" hibernated servers (within a few seconds)... but apparently only if you visit the actual server, not the "view the source code" link I gave you. Also the view source code link appears not to work in Incognito mode, so it might not be visible to anyone except to me. :( Pity, since I was going for "immutable server with transparent source code so you can relatively trust it won't steal your passwords".
Here's the proxy: https://cors-buster-jfpactjnem.now.sh/ The code is https://github.com/wmhilton/cors-buster/tree/develop-2.0 but I haven't updated the README just the code.
from isomorphic-git.
npm.im/webappfind sounds amazing. I did a similar kind of hack for Atom back in the day, and recently played around with navigator.registerProtocolHandler, and generally that sounds like something I would use. I actually plan to use a browser-based IDE as my full-time text editor in the future. I implemented drag and drop, but it would be nice to have a tool that could install "webapp shims" so that I could right-click "Open With..." anything. You can sort of do it on mobile by registering a protocol scheme as part of the Progressive Web App manifest, but I don't know of a real way to do it on the desktop.
from isomorphic-git.
Hey @wmhilton, sorry for not participating on Gitter, hope you don't mind it too much. You mention some server side work in this issue, I am wondering if in the future it will be possible to use this package to create a mock Git server, so in my tests, I can hand the client a Git URL backed by a server instance from the very same package and implement mock response to the Git operations the client requests (like creating files on the fly for tests).
from isomorphic-git.
@TomasHubelbauer Mocking a git server is probably beyond the scope of this project; if I add server capabilities they would be real server capabilities not just mocks. I'm currently doing something similar in my test suite though for mocking server responses, using the nock
library and piping the request to the stdin of a git-http-backend process, then piping the stdout back into a mock HTTP response. You might find that helpful:
- https://github.com/isomorphic-git/isomorphic-git/blob/master/__tests__/__helpers__/http-backend.js
- https://github.com/isomorphic-git/isomorphic-git/blob/master/__tests__/test-push.js
from isomorphic-git.
Related Issues (20)
- Improve `normalizePath` performance HOT 6
- pushing a tag to a target branch fail HOT 1
- Empty response from git server when using code bundler HOT 33
- Pushing returning 401 Error: No Anonymous Write Access HOT 6
- Tests are failing on Android HOT 15
- Cloning empty repository fails if git server uses git >= 2.41.0 HOT 5
- Getting a 404 with azure devops HOT 1
- not respecting server capabilities ( report-status ) HOT 1
- How can I abort a push operation on Node? AbortController seems to be not supported. HOT 2
- Codespell workflow needs approval
- Disable failing test that require credentials on Azure DevOps HOT 14
- Race condition makes it possible for a ref to be resolved to an empty string while it's in the middle of being updated HOT 16
- Invalid refs should throw HOT 11
- Isomorphic git functionality is broken on any browser
- Error Running Linter on main locally HOT 4
- Github Clone Broken on Latest Version HOT 6
- Pushing an annotated tag has slightly different behavior between isomorphic-git and Git HOT 1
- StatusMatrix results are different on Windows and Linux HOT 2
- Unchanged image/audio files being queued for commit with `git.add()` HOT 3
- BrowserFS deprecated HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isomorphic-git.