1
>
/*---------------------------------------------------------------------------------------------
serviceMachineId.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import { VSBuffer } from '../../../base/common/buffer.js';
7
>
import { generateUuid, isUUID } from '../../../base/common/uuid.js';
8
>
import { IEnvironmentService } from '../../environment/common/environment.js';
9
>
import { IFileService } from '../../files/common/files.js';
10
>
import { IStorageService, StorageScope, StorageTarget } from '../../storage/common/storage.js';
11
>
12
export async function getServiceMachineId(environmentService: IEnvironmentService, fileService: IFileService, storageService: IStorageService | undefined): Promise<string> {
13
let uuid: string | null = storageService ? storageService.get('storage.serviceMachineId', StorageScope.APPLICATION) || null : null;