spectacular-dashboard / VersionCheckService / VersionCheckService
Class: VersionCheckService
VersionCheckService.VersionCheckService
Table of contents
Constructors
Properties
Methods
- checkForUpdates
- fetchLatestVersion
- getCurrentVersion
- getVersionInfo
- isNewerVersion
- showUpdateNotificationIfNeeded
- getInstance
Constructors
constructor
• new VersionCheckService(): VersionCheckService
Returns
Properties
cachedVersionInfo
• Private cachedVersionInfo: null | VersionInfo = null
Defined in
hasShownNotification
• Private hasShownNotification: boolean = false
Defined in
GITHUB_API_URL
▪ Static Private Readonly GITHUB_API_URL: "https://api.github.com/repos/Tadzesi/SpecTacular/releases/latest"
Defined in
GITHUB_RELEASES_URL
▪ Static Private Readonly GITHUB_RELEASES_URL: "https://github.com/Tadzesi/SpecTacular/releases"
Defined in
instance
▪ Static Private instance: VersionCheckService
Defined in
Methods
checkForUpdates
▸ checkForUpdates(): Promise<VersionInfo>
Returns
Promise<VersionInfo>
Defined in
fetchLatestVersion
▸ fetchLatestVersion(): Promise<null | string>
Returns
Promise<null | string>
Defined in
getCurrentVersion
▸ getCurrentVersion(): string
Returns
string
Defined in
getVersionInfo
▸ getVersionInfo(): null | VersionInfo
Returns
null | VersionInfo
Defined in
isNewerVersion
▸ isNewerVersion(latest, current): boolean
Parameters
| Name | Type |
|---|---|
latest | string |
current | string |
Returns
boolean
Defined in
src/VersionCheckService.ts:145
showUpdateNotificationIfNeeded
▸ showUpdateNotificationIfNeeded(): Promise<void>
Returns
Promise<void>
Defined in
getInstance
▸ getInstance(): VersionCheckService