1
>
/*---------------------------------------------------------------------------------------------
product.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 { env } from '../../../base/common/process.js';
7
>
import { IProductConfiguration } from '../../../base/common/product.js';
8
>
import { ISandboxConfiguration } from '../../../base/parts/sandbox/common/sandboxTypes.js';
9
>
10
>
/**
11
>
* @deprecated It is preferred that you use `IProductService` if you can. This
12
>
* allows web embedders to override our defaults. But for things like `product.quality`,
13
>
* the use is fine because that property is not overridable.
14
>
*/
15
>
let product: IProductConfiguration;
16
>
17
>
// Native sandbox environment
18
>
const vscodeGlobal = (globalThis as { vscode?: { context?: { configuration(): ISandboxConfiguration | undefined } } }).vscode;
19
>
if (typeof vscodeGlobal !== 'undefined' && typeof vscodeGlobal.context !== 'undefined') {
20
const configuration: ISandboxConfiguration | undefined = vscodeGlobal.context.configuration();
21
if (configuration) {