/
main.ts
37 lines (33 loc) · 1.32 KB
/
main.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
/**********************************************************************
* Copyright (c) 2023 Red Hat, Inc.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
***********************************************************************/
import { CodeWorkspace } from './code-workspace';
import { DevWorkspaceId } from './devworkspace-id';
import { NodeExtraCertificate } from './node-extra-certificate';
import { OpenVSIXRegistry } from './openvsix-registry';
import { TrustedExtensions } from './trusted-extensions';
import { VSCodeLauncher } from './vscode-launcher';
import { WebviewResources } from './webview-resources';
/**
* Mandatory environment variables:
* env.PROJECTS_ROOT
* env.DEVWORKSPACE_FLATTENED_DEVFILE
* env.VSCODE_NODEJS_RUNTIME_DIR
*/
export class Main {
async start(): Promise<void> {
await new DevWorkspaceId().configure();
await new OpenVSIXRegistry().configure();
await new WebviewResources().configure();
await new NodeExtraCertificate().configure();
await new TrustedExtensions().configure();
const workspaceFile = await new CodeWorkspace().generate();
await new VSCodeLauncher().launch(workspaceFile);
}
}