Global

Members

(constant) Approvals :Object

Approval system constants.

Type:
  • Object
Source:

(constant) branchNameToEnvironmentValue

Parse a branch name to an environment name value.

Source:

(constant) calculateTimeLeft

Unified logic for client and server to determine the time remaining until the specified targetDay and targetTime. Time is in 24 hour format of hh:mm, and days is capitalized english day (i.e. "Monday")

Source:

(constant) checkForUpdates

Compare the current version to the VersionList and return an update object if there are available updates.

This method will handle environment fallbacks in case of non-existent environment, or an environment that doesn't have builds for the specified module. In either case, it will fallback to the best suitable static environment. See EnvironmentList#getEnvironmentOrFallback.

Source:

(constant) createDynamicEnvironment

Create a new dynamic Environment based on the module and branch name that triggered the creation of the environment.

Source:

(constant) DEFAULT_TOTAL_BUCKETS :number

The default total number of buckets.

Type:
  • number
Source:

(constant) DIRECTION_DOWN :string

The constant representing the 'DOWN' direction for rollout.

Type:
  • string
Source:

(constant) DIRECTION_UP :string

The constant representing the 'UP' direction for rollout.

Type:
  • string
Source:

(constant) download

Download a file from a url and report on its progress

Source:

(constant) eligibleForDynamicEnvironment

Return true if it's a feature or beta branch.

Source:

(constant) Environments :Object

Environment value constants. These environments are immutable and should never be removed without explicitly verifying clients support the safe removal of that environment.

Type:
  • Object
Source:

(constant) fileToMd5

Stream file chunks and create a md5 hash.

Source:

(constant) getBranchHash

Return an sha256 hash for a given branch name.

Source:

(constant) getVersionListByEnvironment

Get a VersionList for the specified module and environment.

Source:

(constant) Modules :Object

Module string constants. Modules are pieces of the app which can run updates independently of one another, for example the electron app and the recorder install.

Type:
  • Object
Source:

(constant) qualifiesForRollout

Checks if a client qualifies for rollout based on the provided parameters.

Properties:
Name Type Description
isQualified boolean

Whether the client qualifies or not.

hashedIdentifier string

The hashed client identifier.

bucket number

The bucket value.

Source:

(constant) qualifiesForRolloutSync

Checks if a client qualifies for rollout based on the provided parameters. Performs this synchronously -- only works in node context, not browser context.

Properties:
Name Type Description
isQualified boolean

Whether the client qualifies or not.

hashedIdentifier string

The hashed client identifier.

bucket number

The bucket value.

Source:

(constant) unzip

Extract the contents of a zip file into a directory and report on its progress.

Source:

(constant) validateItems

Process checksum entries with limited concurrency to avoid spiking CPU / mem usage too hard for large files. Returns array of checksums with md5 hash of local file and a boolean for validity.

Source:

Methods

getQualification(hashedIdentifier, totalBuckets, rolloutDirection, rolloutPercentage) → {Object}

Returns the qualification, bucket the client places in, and the hashed identifier.

Parameters:
Name Type Description
hashedIdentifier
totalBuckets
rolloutDirection
rolloutPercentage
Source:
Returns:
Type
Object

(async) getTruncatedHash(identifier) → {Promise.<(null|string)>}

Generates a hash for the client identifier. Truncates the result to stay within the safe integer range (thx Tarjei). Runs async to support both browser and node contexts.

Parameters:
Name Type Description
identifier
Source:
Returns:
Type
Promise.<(null|string)>

getTruncatedHashSync(identifier) → {string}

Only runs in node context, not browser context.

Parameters:
Name Type Description
identifier
Source:
Returns:
Type
string