Create a new GitHubReleaseProvider.
GitHub organization or user (default: "MemberJunction")
Repository name (default: "MJ")
Download a release ZIP archive to a local file path.
Streams the download to disk to avoid holding the entire archive in memory.
Follows HTTP redirects automatically (GitHub often 302-redirects to a CDN).
Enforces a DOWNLOAD_TIMEOUT_MS timeout via AbortController.
URL to download from (zipball URL or asset URL).
Absolute path where the ZIP file will be written.
OptionalonProgress: (percent: number) => voidOptional callback invoked with download percentage (0–100)
as data arrives when the server provides a Content-Length header. When
Content-Length is missing (e.g., API zipball fallback), the callback is
invoked with -1 on each chunk so the caller can display bytes-received
instead of a percentage bar.
const provider = new GitHubReleaseProvider();
const version = await provider.GetReleaseByTag('v5.1.0');
await provider.DownloadRelease(version.DownloadUrl, '/tmp/mj.zip', (pct) => {
if (pct >= 0) process.stdout.write(`\rDownloading... ${pct}%`);
else process.stdout.write(`\rDownloading...`);
});
Get a specific version by its git tag name.
Tries to resolve as a formal GitHub Release first. If the release is not found (404), falls back to looking up the tag via the Commits API to get the commit date and constructs a zipball download URL.
The git tag to look up (e.g., "v5.1.0").
A VersionInfo for the requested tag.
List available MemberJunction versions, sorted most recent first.
Tries formal GitHub Releases first (up to 50). If no releases are found, falls back to listing git tags (up to 30) and fetching commit dates for the most recent MAX_TAG_DATE_LOOKUPS tags.
If true, includes releases marked as prerelease
on GitHub. Defaults to false.
Array of VersionInfo objects sorted by release date descending.
Adapter that lists and downloads MemberJunction releases from GitHub.
All network calls use the unauthenticated GitHub REST API with a
User-Agent: MJ-Installerheader. The unauthenticated rate limit is 60 requests per hour per IP, which is sufficient for installer workflows.The provider first attempts to use formal GitHub Releases (which include uploaded ZIP assets and release notes). If no releases are found, it falls back to listing git tags and constructing zipball download URLs.