-
Notifications
You must be signed in to change notification settings - Fork 22
/
index.ts
53 lines (47 loc) · 2.28 KB
/
index.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
import { Injectable } from '@opensumi/di';
import { IExtensionNodeClientService, IExtraMetaData, IExtensionMetaData } from '@opensumi/ide-extension/lib/common';
import { getExtension } from './utils';
const extensionList = [
{ id: 'alex-ext-public.typescript-language-features-worker', version: '1.53.0-patch.4' },
{ id: 'alex-ext-public.markdown-language-features-worker', version: '1.53.0-patch.2' },
{ id: 'alex-ext-public.html-language-features-worker', version: '1.53.0-patch.3' },
{ id: 'alex-ext-public.json-language-features-worker', version: '1.53.0-patch.3' },
{ id: 'alex-ext-public.css-language-features-worker', version: '1.53.0-patch.3' },
{ id: 'alex-ext-public.vsicons-slim', version: '1.0.5' },
{ id: 'worker-public.ide-ext-theme', version: '2.5.2' },
];
export const getExtensions: () => Promise<IExtensionMetaData[]> = () => {
const list = extensionList.map((ext) => getExtension(ext.id, ext.version));
return Promise.all(list).then((exts) => exts.filter((item) => !!item) as IExtensionMetaData[]);
};
@Injectable()
export class ExtensionClientService implements IExtensionNodeClientService {
restartExtProcessByClient(): void {
throw new Error('Method not implemented.');
}
getElectronMainThreadListenPath(clientId: string): Promise<string> {
throw new Error('Method not implemented.');
}
async getAllExtensions(scan: string[], extensionCandidate: string[], localization: string, extraMetaData: IExtraMetaData): Promise<IExtensionMetaData[]> {
const extensionList = await getExtensions();
return extensionList;
}
createProcess(clientId: string): Promise<void> {
throw new Error('Method not implemented.');
}
getExtension(extensionPath: string, localization: string, extraMetaData?: IExtraMetaData | undefined): Promise<IExtensionMetaData | undefined> {
throw new Error('Method not implemented.');
}
infoProcessNotExist(): void {
throw new Error('Method not implemented.');
}
infoProcessCrash(): void {
throw new Error('Method not implemented.');
}
disposeClientExtProcess(clientId: string, info: boolean): Promise<void> {
throw new Error('Method not implemented.');
}
updateLanguagePack(languageId: string, languagePackPath: string, storagePath: string): Promise<void> {
throw new Error('Method not implemented.');
}
}