Class: VersionEntry

VersionEntry()

A VersionEntry holds all the metadata about a given build. The VersionEntry instance can be used to interact with and update build metadata, compare the entry to another one, and even download & extract the VersionEntry.

Constructor

new VersionEntry()

Source:

Methods

addPatch(patch) → {VersionEntry}

Add a patch to the VersionEntry.

Parameters:
Name Type Description
patch
Source:
Returns:
Type
VersionEntry

(async) download(downloadPath, onProgress)

Download the update package for this VersionEntry to the specified destination.

Parameters:
Name Type Description
downloadPath
onProgress
Source:

(async) extract()

Extract the update package for this VersionEntry to the specified destination.

Source:

isEqual(compareTo) → {boolean}

Return true if this entry is a mutation of the comparison VersionEntry, or vice versa.

Parameters:
Name Type Description
compareTo VersionEntry
Source:
Returns:
Type
boolean

isLegacy() → {*|boolean}

Return true if this is a legacy entry (pre-update refactor, no semver or origin props etc).

Source:
Returns:
Type
* | boolean

isMutationOf(compareTo, opts) → {boolean}

Return true if this VersionEntry is a mutation of the specified VersionEntry, or vice versa.

Parameters:
Name Type Description
compareTo VersionEntry
opts
Source:
Returns:
Type
boolean

setAutoUpdate(autoUpdate)

Set whether or not this VersionEntry should automatically install updates on application launch.

Parameters:
Name Type Description
autoUpdate
Source:

setBranch(branchName, isOrigin) → {VersionEntry}

Set the origin branch for the VersionEntry.

Parameters:
Name Type Default Description
branchName String
isOrigin Boolean false
Source:
Returns:
Type
VersionEntry

setChecksums(checksums) → {VersionEntry}

Update the checksums of the VersionEntry.

Parameters:
Name Type Description
checksums
Source:
Returns:
Type
VersionEntry

setCommitHash(shortHash) → {VersionEntry}

Set the commit hash for the VersionEntry.

Parameters:
Name Type Description
shortHash String
Source:
Returns:
Type
VersionEntry

setDependency(module, semver)

Set the dependency on another module, specifying the origin branch and the semver to target. For example, electron can be dependent on a specific recorder version or vice-versa.

Parameters:
Name Type Description
module
semver
Source:

setForceUpdate(forceUpdate) → {VersionEntry}

Set the force update state for the VersionEntry. If true, the users app will restart at the first chance it gets (outside of game) and install the update. Default is false.

Parameters:
Name Type Description
forceUpdate Boolean
Source:
Returns:
Type
VersionEntry

setInstallerUrl(installer) → {VersionEntry}

Set the url for the installer MedalSetup.exe for this version.

Parameters:
Name Type Description
installer
Source:
Returns:
Type
VersionEntry

setNupkgReleasesFileUrl(nupkgReleasesFileUrl) → {VersionEntry}

Set the url for the NuGet RELEASES file for this version.

Parameters:
Name Type Description
nupkgReleasesFileUrl
Source:
Returns:
Type
VersionEntry

setNupkgUrl(nupkgUrl) → {VersionEntry}

Set the url for the NuGet package for this version.

Parameters:
Name Type Description
nupkgUrl
Source:
Returns:
Type
VersionEntry

setPatches(patches) → {VersionEntry}

Set the patches for the VersionEntry.

Parameters:
Name Type Description
patches Array.<VersionEntry>
Source:
Returns:
Type
VersionEntry

setPromptUpdate(promptUpdate) → {VersionEntry}

Set the prompt update state for the VersionEntry. If true, the user will be shown UI prompts to update the app. Default is true.

Parameters:
Name Type Description
promptUpdate Boolean
Source:
Returns:
Type
VersionEntry

setReleaseTimestamp(timestamp) → {VersionEntry}

Set the timestamp of the release (not the build itself)

Parameters:
Name Type Description
timestamp
Source:
Returns:
Type
VersionEntry

setRollout(rollout)

Set the Rollout configuration for this VersionEntry

Parameters:
Name Type Description
rollout
Source:

setVersion(version)

Set the version entry to the specified semver.

Parameters:
Name Type Description
version String
Source:

toJson() → {Object}

Convert to a parsed JSON object.

Source:
Returns:
Type
Object