Skip to content

spectacular-dashboard / VersionCheckService / VersionCheckService

Class: VersionCheckService

VersionCheckService.VersionCheckService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new VersionCheckService(): VersionCheckService

Returns

VersionCheckService

Properties

cachedVersionInfo

Private cachedVersionInfo: null | VersionInfo = null

Defined in

src/VersionCheckService.ts:16


hasShownNotification

Private hasShownNotification: boolean = false

Defined in

src/VersionCheckService.ts:17


GITHUB_API_URL

Static Private Readonly GITHUB_API_URL: "https://api.github.com/repos/Tadzesi/SpecTacular/releases/latest"

Defined in

src/VersionCheckService.ts:14


GITHUB_RELEASES_URL

Static Private Readonly GITHUB_RELEASES_URL: "https://github.com/Tadzesi/SpecTacular/releases"

Defined in

src/VersionCheckService.ts:13


instance

Static Private instance: VersionCheckService

Defined in

src/VersionCheckService.ts:12

Methods

checkForUpdates

checkForUpdates(): Promise<VersionInfo>

Returns

Promise<VersionInfo>

Defined in

src/VersionCheckService.ts:31


fetchLatestVersion

fetchLatestVersion(): Promise<null | string>

Returns

Promise<null | string>

Defined in

src/VersionCheckService.ts:92


getCurrentVersion

getCurrentVersion(): string

Returns

string

Defined in

src/VersionCheckService.ts:26


getVersionInfo

getVersionInfo(): null | VersionInfo

Returns

null | VersionInfo

Defined in

src/VersionCheckService.ts:88


isNewerVersion

isNewerVersion(latest, current): boolean

Parameters

NameType
lateststring
currentstring

Returns

boolean

Defined in

src/VersionCheckService.ts:145


showUpdateNotificationIfNeeded

showUpdateNotificationIfNeeded(): Promise<void>

Returns

Promise<void>

Defined in

src/VersionCheckService.ts:66


getInstance

getInstance(): VersionCheckService

Returns

VersionCheckService

Defined in

src/VersionCheckService.ts:19

Released under the MIT License.