Skip to content

feat(cli): generalize jss install spec (Phase 2 of #464) - #481

Merged
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-480-install-spec-phase2
May 18, 2026
Merged

feat(cli): generalize jss install spec (Phase 2 of #464)#481
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-480-install-spec-phase2

Conversation

@melvincarvalho

Copy link
Copy Markdown
Contributor

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

Shape Test
Bare name (regression) chrome/public/apps/chrome/ 200
<org>/<repo> melvincarvalho/xlogin/public/apps/xlogin/ 200
Rename melvincarvalho/xlogin=xl/public/apps/xl/ 200
Full URL + rename https://github.com/melvincarvalho/xlogin=xl2/public/apps/xl2/ 200
Ref pin solid-apps/pdf#gh-pages → installed at that ref
Invalid shapes foo/bar/baz, =name-only, etc. → exit 1

Out-of-scope for this PR

  • JavaScriptSolidServer/git install 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)

  • Phase 3: --did did:nostr:<hex> resolution
  • Phase 4: --nostr-privkey <hex> NIP-98 auth
  • Phase 5: curated default set (no-arg jss install)
  • Phase 6: --bundle apt-style meta-packages

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
@melvincarvalho
melvincarvalho merged commit 3c8e979 into gh-pages May 18, 2026
1 check passed
@melvincarvalho
melvincarvalho deleted the issue-480-install-spec-phase2 branch May 18, 2026 04:19
melvincarvalho added a commit that referenced this pull request May 18, 2026
Includes since 0.0.197:
- jss install <name>            (#479, Phase 1 of #464)
- jss install generalized spec  (#481, Phase 2 of #464)
- jss install --nostr-privkey   (#483, Phase 4 of #464)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalize jss install spec: <org>/<repo>, URLs, refs, rename (Phase 2 of #464)

1 participant