mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:04:14 +08:00
update undici lint
This commit is contained in:
parent
307361f0ac
commit
3e4ee8ef9e
@ -827,6 +827,7 @@ export default tseslint.config(
|
||||
'string_decoder',
|
||||
'tas-client-umd',
|
||||
'tls',
|
||||
'undici',
|
||||
'undici-types',
|
||||
'url',
|
||||
'util',
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
import { ChildProcessWithoutNullStreams, spawn } from 'child_process';
|
||||
import { readFile } from 'fs/promises';
|
||||
import { homedir } from 'os';
|
||||
// eslint-disable-next-line local/code-import-patterns
|
||||
import type { RequestInit as UndiciRequestInit } from 'undici';
|
||||
import { parseEnvFile } from '../../../base/common/envfile.js';
|
||||
import { untildify } from '../../../base/common/labels.js';
|
||||
@ -159,13 +158,11 @@ class McpHTTPHandleNode extends McpHTTPHandle {
|
||||
});
|
||||
|
||||
// And then rewrite the URL to be http://localhost/<fragment>
|
||||
httpUrl = uri
|
||||
.with({
|
||||
scheme: 'http',
|
||||
authority: 'localhost', // HTTP always wants a host (not that we're using it), but if we're using a socket or pipe then localhost is sorta right anyway
|
||||
path: uri.fragment,
|
||||
})
|
||||
.toString(true);
|
||||
httpUrl = uri.with({
|
||||
scheme: 'http',
|
||||
authority: 'localhost', // HTTP always wants a host (not that we're using it), but if we're using a socket or pipe then localhost is sorta right anyway
|
||||
path: uri.fragment,
|
||||
}).toString(true);
|
||||
}
|
||||
|
||||
const undiciResponse = await fetch(httpUrl, undiciInit);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user