Skip to content

feat(extension): add search and upgrade commands#304

Open
margaretjgu wants to merge 7 commits into
feat/extension-dispatchfrom
feat/extension-search-upgrade
Open

feat(extension): add search and upgrade commands#304
margaretjgu wants to merge 7 commits into
feat/extension-dispatchfrom
feat/extension-search-upgrade

Conversation

@margaretjgu
Copy link
Copy Markdown
Member

Summary

Closes #298. Part of #222. Depends on #303.

elastic extension search [query]

  • Queries the GitHub repository search API for repos tagged with elastic-extension topic
  • Optional free-text query to narrow results
  • Returns repo, description, url, and a ready-to-paste installCommand for each result
  • Handles rate-limit (403/429) with a clear message suggesting GITHUB_TOKEN
  • fetch() called with redirect: 'error' to prevent credential leakage on redirects
  • New module src/extension/search.ts

elastic extension upgrade [name]

  • With a name: upgrades one extension (git pull --ff-only for github, npm update for npm), rediscovers entrypoint, updates registry
  • Without a name: upgrades all installed extensions; collects per-extension errors and reports them together rather than stopping on first failure
  • Added to src/extension/installer.ts alongside the existing install/uninstall functions

Test plan

  • npx tsc --noEmit passes clean
  • 16/16 tests pass (upgradeExtension error path, upgradeAllExtensions empty case, 6 search stub tests)
  • ~/.bun/bin/bun test test/extension/ -- all pass
  • elastic extension search (functional, requires network)
  • elastic extension upgrade local after install (functional, requires git)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 7.12s
✅ REPOSITORY gitleaks yes no no 56.42s
✅ REPOSITORY git_diff yes no no 0.54s
✅ REPOSITORY secretlint yes no no 29.6s
✅ REPOSITORY trivy yes no no 19.01s
✅ TYPESCRIPT eslint 10 0 0 5.39s

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

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.

1 participant