Archived
1
0

chore(vscode): update to 1.56.0

This commit is contained in:
Akash Satheesan
2021-04-30 20:25:17 +05:30
1749 changed files with 88014 additions and 43316 deletions

View File

@ -261,6 +261,9 @@ const requestHandler = (req, res) => {
} else if (pathname === '/fetch-callback') {
// callback fetch support
return handleFetchCallback(req, res, parsedUrl);
} else if (pathname === '/builtin') {
// builtin extnesions JSON
return handleBuiltInExtensions(req, res, parsedUrl);
}
return serveError(req, res, 404, 'Not found.');
@ -303,6 +306,17 @@ function addCORSReplyHeader(req) {
return (ALLOWED_CORS_ORIGINS.indexOf(req.headers['origin']) >= 0);
}
/**
* @param {import('http').IncomingMessage} req
* @param {import('http').ServerResponse} res
* @param {import('url').UrlWithParsedQuery} parsedUrl
*/
async function handleBuiltInExtensions(req, res, parsedUrl) {
const { extensions } = await builtInExtensionsPromise;
res.writeHead(200, { 'Content-Type': 'application/json' });
return res.end(JSON.stringify(extensions));
}
/**
* @param {import('http').IncomingMessage} req
* @param {import('http').ServerResponse} res