Repository navigation
feat: serve a git repository as the library's source from the reader's own server - #81
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Moves the source service from lesscap/work into the reader's server, so anyone can follow a local repository with one command:
GAMMA_SOURCE_NAME=notes GAMMA_SOURCE_WORKTREE=$HOME/notes pnpm devSet
GAMMA_SOURCE_NAMEwith exactly one of these:GAMMA_SOURCE_WORKTREEserves the files on disk, committed or not, leaving out what git ignores.GAMMA_SOURCE_REPOserves the committed files of a clone the server pulls everyGAMMA_SOURCE_PULL_SECONDS.GAMMA_SOURCE_URLnames an address that already serves a source. This is unchanged.A served repository appears at
/api/library, and/api/sourcepoints the reader there. The browser protocol is unchanged, soui-packages/webis untouched apart from dropping the/workdev proxy, which nothing needs any more.GAMMA_SOURCE_INCLUDEis now optional; leaving it out lists the whole repository. The README gains a "Sync from a repository" section.The code comes from lesscap/work
web-packages/brain2, with its tests. brain2.lesscap.com still runs that service and is left alone here.Checked:
pnpm check./api/sourcepoints at/api/library, and the listing has 1,839 files.