I'd like to be able to read the currently active hash of my Angular PWA. However I can't see any mechanism for doing that.
The SwUpdate object provides observables that allow you to read the current version's hash when a new version is activated or when it becomes available but doesn't seem to expose any static method for getting the hash of the current version.
class SwUpdate {
available: Observable<UpdateAvailableEvent>
activated: Observable<UpdateActivatedEvent>
unrecoverable: Observable<UnrecoverableStateEvent>
isEnabled: boolean
checkForUpdate(): Promise<void>
activateUpdate(): Promise<void>
}
I'd like to be able to read something like SwUpdate.current to read the current hash value (say a518f9f1ab65954c2eafa02fec134fa54b391651) without having to wait for an available or activated event. Is this possible?