Commit 2f90d2e
committed
feat(releases): add GitHub release download utilities
Add generic GitHub release download utilities for cross-project use:
- downloadGitHubRelease(): Download releases from any GitHub repository
- downloadSocketBtmRelease(): Specialized wrapper for socket-btm releases
Features:
- Version caching with .version files to avoid redundant downloads
- Cross-platform binary downloads (darwin, linux, win32)
- Automatic platform/arch detection with musl support for Linux
- macOS quarantine attribute removal for downloaded binaries
- Generic asset downloads (WASM files, models, etc.)
- API inspired by industry tools (brew, cargo, gh) for intuitive usage
Package exports:
- @socketsecurity/lib/releases/github
- @socketsecurity/lib/releases/socket-btm
Note: Unit tests included but need mock refinement for HTTP requests1 parent 89c0207 commit 2f90d2e
File tree
6 files changed
+2032
-1
lines changed- src/releases
- test/unit
6 files changed
+2032
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
526 | 534 | | |
527 | 535 | | |
528 | 536 | | |
| |||
0 commit comments