mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge vscode source through 1.62 release (#19981)
* Build breaks 1 * Build breaks * Build breaks * Build breaks * More build breaks * Build breaks (#2512) * Runtime breaks * Build breaks * Fix dialog location break * Update typescript * Fix ASAR break issue * Unit test breaks * Update distro * Fix breaks in ADO builds (#2513) * Bump to node 16 * Fix hygiene errors * Bump distro * Remove reference to node type * Delete vscode specific extension * Bump to node 16 in CI yaml * Skip integration tests in CI builds (while fixing) * yarn.lock update * Bump moment dependency in remote yarn * Fix drop-down chevron style * Bump to node 16 * Remove playwrite from ci.yaml * Skip building build scripts in hygine check
This commit is contained in:
@@ -73,9 +73,7 @@ export function updateProxyConfigurationsScope(scope: ConfigurationScope): void
|
||||
let proxyConfiguration: IConfigurationNode | undefined;
|
||||
function registerProxyConfigurations(scope: ConfigurationScope): void {
|
||||
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
|
||||
if (proxyConfiguration) {
|
||||
configurationRegistry.deregisterConfigurations([proxyConfiguration]);
|
||||
}
|
||||
const oldProxyConfiguration = proxyConfiguration;
|
||||
proxyConfiguration = {
|
||||
id: 'http',
|
||||
order: 15,
|
||||
@@ -122,7 +120,7 @@ function registerProxyConfigurations(scope: ConfigurationScope): void {
|
||||
}
|
||||
}
|
||||
};
|
||||
configurationRegistry.registerConfiguration(proxyConfiguration);
|
||||
configurationRegistry.updateConfigurations({ add: [proxyConfiguration], remove: oldProxyConfiguration ? [oldProxyConfiguration] : [] });
|
||||
}
|
||||
|
||||
registerProxyConfigurations(ConfigurationScope.MACHINE);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import { parse as parseUrl } from 'url';
|
||||
import { Promises } from 'vs/base/common/async';
|
||||
import { streamToBufferReadableStream } from 'vs/base/common/buffer';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { canceled } from 'vs/base/common/errors';
|
||||
@@ -63,9 +64,17 @@ export class RequestService extends Disposable implements IRequestService {
|
||||
this.logService.trace('RequestService#request', options.url);
|
||||
|
||||
const { proxyUrl, strictSSL } = this;
|
||||
|
||||
let shellEnv: typeof process.env | undefined = undefined;
|
||||
try {
|
||||
shellEnv = await resolveShellEnv(this.logService, this.environmentService.args, process.env);
|
||||
} catch (error) {
|
||||
this.logService.error('RequestService#request resolving shell environment failed', error);
|
||||
}
|
||||
|
||||
const env = {
|
||||
...process.env,
|
||||
...(await resolveShellEnv(this.logService, this.environmentService.args, process.env)),
|
||||
...shellEnv
|
||||
};
|
||||
const agent = options.agent ? options.agent : await getProxyAgent(options.url || '', env, { proxyUrl, strictSSL });
|
||||
|
||||
@@ -90,7 +99,7 @@ export class RequestService extends Disposable implements IRequestService {
|
||||
|
||||
private _request(options: NodeRequestOptions, token: CancellationToken): Promise<IRequestContext> {
|
||||
|
||||
return new Promise<IRequestContext>(async (c, e) => {
|
||||
return Promises.withAsyncBody<IRequestContext>(async (c, e) => {
|
||||
let req: http.ClientRequest;
|
||||
|
||||
const endpoint = parseUrl(options.url!);
|
||||
|
||||
Reference in New Issue
Block a user