[html] clean up request service: add CustomDataRequestService #135459

This commit is contained in:
Martin Aeschlimann
2021-11-29 11:25:04 +01:00
parent 414c15079b
commit 3d8b5674c7
19 changed files with 95 additions and 178 deletions

View File

@@ -4,9 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import { IHTMLDataProvider, newHTMLDataProvider } from 'vscode-html-languageservice';
import { RequestService } from './requests';
import { CustomDataRequestService } from './htmlServer';
export function fetchHTMLDataProviders(dataPaths: string[], requestService: RequestService): Promise<IHTMLDataProvider[]> {
export function fetchHTMLDataProviders(dataPaths: string[], requestService: CustomDataRequestService): Promise<IHTMLDataProvider[]> {
const providers = dataPaths.map(async p => {
try {
const content = await requestService.getContent(p);