Skip to content

feat(plugin): support multi-source plugin install (ssh, git@, generic https)#504

Merged
jackwener merged 1 commit intojackwener:mainfrom
ByteYue:feat/multi-source-plugin-install
Mar 27, 2026
Merged

feat(plugin): support multi-source plugin install (ssh, git@, generic https)#504
jackwener merged 1 commit intojackwener:mainfrom
ByteYue:feat/multi-source-plugin-install

Conversation

@ByteYue
Copy link
Copy Markdown
Collaborator

@ByteYue ByteYue commented Mar 27, 2026

Summary

Extends parseSource() to accept any git-cloneable URL, not just GitHub:

  • ssh://git@host/path/repo.git
  • git@host:user/repo.git (SCP-style)
  • https://any-host.com/path/repo.git

GitHub shorthand (github:user/repo) and local paths continue to work unchanged.

Changes

  • src/plugin.ts: Added 3 new URL matchers (SSH, SCP, generic HTTPS) to parseSource() as fallbacks after the existing GitHub-specific patterns. Updated the error message in installPlugin() to list all supported formats.
  • src/cli.ts: Changed CLI description from 'Install a plugin from GitHub' → 'Install a plugin from a git repository'.
  • src/plugin.test.ts: Added 7 new unit tests covering all new URL formats.
  • docs/guide/plugins.md: Updated 'Supported Source Formats' section with new URL examples.

Testing

  • All 507 tests pass (55 test files, 0 failures)
  • 7 new parseSource tests cover SSH, SCP-style, generic HTTPS, prefix stripping, and GitHub priority

Closes #492

… https)

Extends parseSource() to accept any git-cloneable URL, not just GitHub:
- ssh://git@host/path/repo.git
- git@host:user/repo.git (SCP-style)
- https://any-host.com/path/repo.git

GitHub shorthand (github:user/repo) and local paths continue to work.
Updated error messages, CLI description, docs, and added 7 new unit tests.

Closes jackwener#492
@jackwener jackwener force-pushed the feat/multi-source-plugin-install branch from bc0042a to 829d29b Compare March 27, 2026 09:02
@jackwener jackwener merged commit 70ad570 into jackwener:main Mar 27, 2026
23 checks passed
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.

[Feature]: monorepo的plugin安装的时候,能不能支持自定义来源。

2 participants