-
Notifications
You must be signed in to change notification settings - Fork 514
/
extensionVariables.ts
73 lines (60 loc) · 3.9 KB
/
extensionVariables.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AzExtTreeDataProvider, AzExtTreeItem, IExperimentationServiceAdapter } from '@microsoft/vscode-azext-utils';
import { DockerHubRegistryDataProvider, GenericRegistryV2DataProvider, GitHubRegistryDataProvider } from '@microsoft/vscode-docker-registries';
import { ExtensionContext, StatusBarItem, TreeView } from 'vscode';
import { ContainerRuntimeManager } from './runtimes/ContainerRuntimeManager';
import { OrchestratorRuntimeManager } from './runtimes/OrchestratorRuntimeManager';
import { runWithDefaults as runWithDefaultsImpl, streamWithDefaults as streamWithDefaultsImpl } from './runtimes/runners/runWithDefaults';
import { IActivityMeasurementService } from './telemetry/ActivityMeasurementService';
import { ContainersTreeItem } from './tree/containers/ContainersTreeItem';
import { ContextsTreeItem } from './tree/contexts/ContextsTreeItem';
import { ImagesTreeItem } from './tree/images/ImagesTreeItem';
import { NetworksTreeItem } from './tree/networks/NetworksTreeItem';
import { AzureRegistryDataProvider } from './tree/registries/Azure/AzureRegistryDataProvider';
import { UnifiedRegistryItem, UnifiedRegistryTreeDataProvider } from './tree/registries/UnifiedRegistryTreeDataProvider';
import { VolumesTreeItem } from './tree/volumes/VolumesTreeItem';
import { AzExtLogOutputChannelWrapper } from './utils/AzExtLogOutputChannelWrapper';
/**
* Namespace for common variables used throughout the extension. They must be initialized in the activate() method of extension.ts
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace ext {
export let context: ExtensionContext;
export let outputChannel: AzExtLogOutputChannelWrapper;
export let experimentationService: IExperimentationServiceAdapter;
export let activityMeasurementService: IActivityMeasurementService;
export let treeInitError: unknown;
export const ignoreBundle = !/^(false|0)?$/i.test(process.env.AZCODE_DOCKER_IGNORE_BUNDLE || '');
export let imagesTree: AzExtTreeDataProvider;
export let imagesTreeView: TreeView<AzExtTreeItem>;
export let imagesRoot: ImagesTreeItem;
export let containersTree: AzExtTreeDataProvider;
export let containersTreeView: TreeView<AzExtTreeItem>;
export let containersRoot: ContainersTreeItem;
export let networksTree: AzExtTreeDataProvider;
export let networksTreeView: TreeView<AzExtTreeItem>;
export let networksRoot: NetworksTreeItem;
export const prefix: string = 'docker';
export let registriesTree: UnifiedRegistryTreeDataProvider;
export let registriesTreeView: TreeView<UnifiedRegistryItem<unknown>>;
export let registriesRoot: UnifiedRegistryTreeDataProvider;
export let genericRegistryV2DataProvider: GenericRegistryV2DataProvider;
export let azureRegistryDataProvider: AzureRegistryDataProvider;
export let dockerHubRegistryDataProvider: DockerHubRegistryDataProvider;
export let githubRegistryDataProvider: GitHubRegistryDataProvider;
export let volumesTree: AzExtTreeDataProvider;
export let volumesTreeView: TreeView<AzExtTreeItem>;
export let volumesRoot: VolumesTreeItem;
export let contextsTree: AzExtTreeDataProvider;
export let contextsTreeView: TreeView<AzExtTreeItem>;
export let contextsRoot: ContextsTreeItem;
// Container runtime related items
export let runtimeManager: ContainerRuntimeManager;
export let orchestratorManager: OrchestratorRuntimeManager;
export const runWithDefaults = runWithDefaultsImpl;
export const streamWithDefaults = streamWithDefaultsImpl;
export let dockerContextStatusBarItem: StatusBarItem;
}