Git Product home page Git Product logo

Comments (8)

billiegoose avatar billiegoose commented on May 15, 2024 1

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.

brettz9 avatar brettz9 commented on May 15, 2024 1

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.

billiegoose avatar billiegoose commented on May 15, 2024

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.

brettz9 avatar brettz9 commented on May 15, 2024

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.

billiegoose avatar billiegoose commented on May 15, 2024

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.

billiegoose avatar billiegoose commented on May 15, 2024

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.

TomasHubelbauer avatar TomasHubelbauer commented on May 15, 2024

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.

billiegoose avatar billiegoose commented on May 15, 2024

@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:

from isomorphic-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.