UNPKG

@sussudio/platform

Version:

Internal APIs for VS Code's service injection the base services.

57 lines (55 loc) 2.4 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Event } from '@sussudio/base/common/event.mjs'; import { IEnvironmentMainService } from '../../environment/electron-main/environmentMainService.mjs'; import { ILifecycleMainService } from '../../lifecycle/electron-main/lifecycleMainService.mjs'; import { ILogService } from '../../log/common/log.mjs'; import { ITelemetryService } from '../../telemetry/common/telemetry.mjs'; import { AvailableForDownload, IUpdateService, State, UpdateType } from '../common/update.mjs'; declare abstract class AbstractUpdateService implements IUpdateService { private readonly lifecycleMainService; protected logService: ILogService; readonly _serviceBrand: undefined; private _state; private readonly _onStateChange; readonly onStateChange: Event<State>; get state(): State; protected setState(state: State): void; constructor( lifecycleMainService: ILifecycleMainService, environmentMainService: IEnvironmentMainService, logService: ILogService, ); private scheduleCheckForUpdates; checkForUpdates(explicit: boolean): Promise<void>; downloadUpdate(): Promise<void>; protected doDownloadUpdate(state: AvailableForDownload): Promise<void>; applyUpdate(): Promise<void>; protected doApplyUpdate(): Promise<void>; quitAndInstall(): Promise<void>; protected getUpdateType(): UpdateType; protected doQuitAndInstall(): void; abstract isLatestVersion(): Promise<boolean | undefined>; _applySpecificUpdate(packagePath: string): Promise<void>; protected abstract doCheckForUpdates(context: any): void; } export declare class SnapUpdateService extends AbstractUpdateService { private snap; private snapRevision; private readonly telemetryService; constructor( snap: string, snapRevision: string, lifecycleMainService: ILifecycleMainService, environmentMainService: IEnvironmentMainService, logService: ILogService, telemetryService: ITelemetryService, ); protected doCheckForUpdates(): void; protected doQuitAndInstall(): void; private isUpdateAvailable; isLatestVersion(): Promise<boolean | undefined>; } export {};