feat(cli): generalize jss install spec (Phase 2 of #464) - #481
Merged
Conversation
Direct port of jspod's parseAppSpec. After Phase 1's single bare-name shape, accept three input forms plus two optional suffixes: jss install chrome # bare → solid-apps/chrome jss install JavaScriptSolidServer/git # <org>/<repo> jss install https://github.com/foo/bar # full URL jss install chrome#v1 # pin tag/branch jss install foo/bar=mypath # rename pod path The ref suffix triggers `git clone --branch <ref>`. The rename suffix overrides the derived pod-path name. Validation rejects shell metacharacters and triple-slash org/repo paths. Phase 1 backward-compatible: bare names continue to resolve to the solid-apps default registry exactly as before. Verified against a fresh JSS pod: - bare name (Phase 1 regression): chrome - <org>/<repo>: melvincarvalho/xlogin - rename: melvincarvalho/xlogin=xl - full URL + rename: https://github.com/melvincarvalho/xlogin=xl2 - ref pin: solid-apps/pdf#gh-pages - invalid shapes (foo/bar/baz, =name-only, etc.) → exit 1 - JavaScriptSolidServer/git fails on push: known pre-existing JSS#474 (10MB bodyLimit), unrelated to this PR Fixes #480
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.
Fixes #480. Phase 2 of the phased install plan. Direct port of jspod's
parseAppSpec— Phase 1's single bare-name shape now coexists with three input shapes (<name>,<org>/<repo>, full URL) and two optional suffixes (#<ref>,=<rename>).Verified end-to-end
chrome→/public/apps/chrome/200<org>/<repo>melvincarvalho/xlogin→/public/apps/xlogin/200melvincarvalho/xlogin=xl→/public/apps/xl/200https://github.com/melvincarvalho/xlogin=xl2→/public/apps/xl2/200solid-apps/pdf#gh-pages→ installed at that reffoo/bar/baz,=name-only, etc. → exit 1Out-of-scope for this PR
JavaScriptSolidServer/gitinstall fails on push due to JSS#474 (10MB bodyLimit) — known pre-existing, unrelated. The spec parser handled it correctly; the body-size limit is what tripped.Not in scope (later phases)
--did did:nostr:<hex>resolution--nostr-privkey <hex>NIP-98 authjss install)--bundleapt-style meta-packages