@sussudio/platform
Version:
Internal APIs for VS Code's service injection the base services.
56 lines (54 loc) • 2.57 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IBackupMainService } from './backup.mjs';
import { IEmptyWindowBackupInfo } from '../node/backup.mjs';
import { IConfigurationService } from '../../configuration/common/configuration.mjs';
import { IEnvironmentMainService } from '../../environment/electron-main/environmentMainService.mjs';
import { IStateMainService } from '../../state/electron-main/state.mjs';
import { ILogService } from '../../log/common/log.mjs';
import { IFolderBackupInfo, IWorkspaceBackupInfo } from '../common/backup.mjs';
export declare class BackupMainService implements IBackupMainService {
private readonly environmentMainService;
private readonly configurationService;
private readonly logService;
private readonly stateMainService;
readonly _serviceBrand: undefined;
private static readonly backupWorkspacesMetadataStorageKey;
protected backupHome: string;
private workspaces;
private folders;
private emptyWindows;
private readonly backupUriComparer;
private readonly backupPathComparer;
constructor(
environmentMainService: IEnvironmentMainService,
configurationService: IConfigurationService,
logService: ILogService,
stateMainService: IStateMainService,
);
initialize(): Promise<void>;
protected getWorkspaceBackups(): IWorkspaceBackupInfo[];
protected getFolderBackups(): IFolderBackupInfo[];
isHotExitEnabled(): boolean;
private isHotExitOnExitAndWindowClose;
private getHotExitConfig;
getEmptyWindowBackups(): IEmptyWindowBackupInfo[];
registerWorkspaceBackup(workspaceInfo: IWorkspaceBackupInfo): string;
registerWorkspaceBackup(workspaceInfo: IWorkspaceBackupInfo, migrateFrom: string): Promise<string>;
private moveBackupFolder;
registerFolderBackup(folderInfo: IFolderBackupInfo): string;
registerEmptyWindowBackup(emptyWindowInfo: IEmptyWindowBackupInfo): string;
private validateWorkspaces;
private validateFolders;
private validateEmptyWorkspaces;
private deleteStaleBackup;
private prepareNewEmptyWindowBackup;
private convertToEmptyWindowBackup;
getDirtyWorkspaces(): Promise<Array<IWorkspaceBackupInfo | IFolderBackupInfo>>;
private hasBackups;
private doHasBackups;
private storeWorkspacesMetadata;
protected getFolderHash(folder: IFolderBackupInfo): string;
}