@spongex/check-github-releases
v1.1.0
Published
Check a GitHub Releases via the API and parse download links
Downloads
3
Readme
check-github-releases
Check a GitHub Releases via the API and parse download links
Install to your existing project using:
npm i @spongex/check-github-releasesInclude ECMAScript:
import { checkGitHubReleases } from '@spongex/check-github-releases'Include CommonJS:
const { checkGitHubReleases } = require('@spongex/check-github-releases')Usage
checkGitHubReleases: async (
GitHubURL: string,
opts?:[ { group:Extensions, extensions:Array } ]
) => Promise
Takes the following parameters:
__GitHubURL__A string of the GitHub Releases API URLoptsOptional parameter to add additional extension groups to check. This is an array that takes an object in the following format:groupThe asset group to add to. Valid options are: Extensions.winExt, Extensions.macExt, Extensions.linExtextensionsAn array of strings containing the extensions to add to the parser
Returns an object in the following format:
winURLsAn array ofURLAssetof parsed Windows assetsmacURLsAn array ofURLAssetof parsed Mac assetslinURLsAn array ofURLAssetof parsed Linux assetssourceURLsAn array ofURLAssetof parsed source code assetsmessageError code message if anyerrorError flag, true if error else false
The URLAsset is an object with the following format:
nameA string with the filenameurlA string with the URL to download the asset
Changelog
1.1.0
- Added the following extentions to Mac:
pkg,mas,mas-dev
- Added the following extentions to Linux:
freebsd,p5p,apk
1.0.0
- Initial release
