mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
VS Code merge to df8fe74bd55313de0dd2303bc47a4aab0ca56b0e (#17979)
* Merge from vscode 504f934659740e9d41501cad9f162b54d7745ad9 * delete unused folders * distro * Bump build node version * update chokidar * FIx hygiene errors * distro * Fix extension lint issues * Remove strict-vscode * Add copyright header exemptions * Bump vscode-extension-telemetry to fix webpacking issue with zone.js * distro * Fix failing tests (revert marked.js back to current one until we decide to update) * Skip searchmodel test * Fix mac build * temp debug script loading * Try disabling coverage * log error too * Revert "log error too" This reverts commit af0183e5d4ab458fdf44b88fbfab9908d090526f. * Revert "temp debug script loading" This reverts commit 3d687d541c76db2c5b55626c78ae448d3c25089c. * Add comments explaining coverage disabling * Fix ansi_up loading issue * Merge latest from ads * Use newer option * Fix compile * add debug logging warn * Always log stack * log more * undo debug * Update to use correct base path (+cleanup) * distro * fix compile errors * Remove strict-vscode * Fix sql editors not showing * Show db dropdown input & fix styling * Fix more info in gallery * Fix gallery asset requests * Delete unused workflow * Fix tapable resolutions for smoke test compile error * Fix smoke compile * Disable crash reporting * Disable interactive Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
"onCommand:vscode-testresolver.newWindowWithError",
|
||||
"onCommand:vscode-testresolver.showLog",
|
||||
"onCommand:vscode-testresolver.openTunnel",
|
||||
"onCommand:vscode-testresolver.startRemoteServer"
|
||||
"onCommand:vscode-testresolver.startRemoteServer",
|
||||
"onCommand:vscode-testresolver.toggleConnectionPause"
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"devDependencies": {
|
||||
@@ -44,7 +45,8 @@
|
||||
"label": "${path}",
|
||||
"separator": "/",
|
||||
"tildify": true,
|
||||
"workspaceSuffix": "TestResolver"
|
||||
"workspaceSuffix": "TestResolver",
|
||||
"workspaceTooltip": "Remote running on the same machine"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -70,9 +72,14 @@
|
||||
"command": "vscode-testresolver.openTunnel"
|
||||
},
|
||||
{
|
||||
"title": "Open Remote Server...",
|
||||
"title": "Open a Remote Port...",
|
||||
"category": "Remote-TestResolver",
|
||||
"command": "vscode-testresolver.startRemoteServer"
|
||||
},
|
||||
{
|
||||
"title": "Pause Connection (Test Reconnect)",
|
||||
"category": "Remote-TestResolver",
|
||||
"command": "vscode-testresolver.toggleConnectionPause"
|
||||
}
|
||||
],
|
||||
"menus": {
|
||||
@@ -84,6 +91,10 @@
|
||||
{
|
||||
"command": "vscode-testresolver.startRemoteServer",
|
||||
"when": "remoteName == test"
|
||||
},
|
||||
{
|
||||
"command": "vscode-testresolver.toggleConnectionPause",
|
||||
"when": "remoteName == test"
|
||||
}
|
||||
],
|
||||
"statusBar/remoteIndicator": [
|
||||
@@ -111,6 +122,11 @@
|
||||
"command": "vscode-testresolver.startRemoteServer",
|
||||
"when": "remoteName == test",
|
||||
"group": "remote_90_test_2_more@5"
|
||||
},
|
||||
{
|
||||
"command": "vscode-testresolver.toggleConnectionPause",
|
||||
"when": "remoteName == test",
|
||||
"group": "remote_90_test_2_more@6"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -126,11 +142,6 @@
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"testresolver.pause": {
|
||||
"description": "If set, connection is paused",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"testresolver.supportPublicPorts": {
|
||||
"description": "If set, the test resolver tunnel factory will support mock public ports. Forwarded ports will not actually be public. Requires reload.",
|
||||
"type": "boolean",
|
||||
|
||||
@@ -135,9 +135,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
let remoteReady = true, localReady = true;
|
||||
const remoteSocket = net.createConnection({ port: serverAddr.port });
|
||||
|
||||
let isDisconnected = getConfiguration('pause') === true;
|
||||
vscode.workspace.onDidChangeConfiguration(_ => {
|
||||
let newIsDisconnected = getConfiguration('pause') === true;
|
||||
let isDisconnected = connectionPaused;
|
||||
connectionPausedEvent.event(_ => {
|
||||
let newIsDisconnected = connectionPaused;
|
||||
if (isDisconnected !== newIsDisconnected) {
|
||||
outputChannel.appendLine(`Connection state: ${newIsDisconnected ? 'open' : 'paused'}`);
|
||||
isDisconnected = newIsDisconnected;
|
||||
@@ -215,6 +215,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
});
|
||||
}
|
||||
|
||||
let connectionPaused = false;
|
||||
let connectionPausedEvent = new vscode.EventEmitter<boolean>();
|
||||
|
||||
const authorityResolverDisposable = vscode.workspace.registerRemoteAuthorityResolver('test', {
|
||||
async getCanonicalURI(uri: vscode.Uri): Promise<vscode.Uri> {
|
||||
return vscode.Uri.file(uri.path);
|
||||
@@ -258,6 +261,22 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
}
|
||||
}));
|
||||
|
||||
const pauseStatusBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
|
||||
pauseStatusBarEntry.text = 'Remote connection paused. Click to undo';
|
||||
pauseStatusBarEntry.command = 'vscode-testresolver.toggleConnectionPause';
|
||||
pauseStatusBarEntry.backgroundColor = new vscode.ThemeColor('statusBarItem.errorBackground');
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.toggleConnectionPause', () => {
|
||||
if (!connectionPaused) {
|
||||
connectionPaused = true;
|
||||
pauseStatusBarEntry.show();
|
||||
} else {
|
||||
connectionPaused = false;
|
||||
pauseStatusBarEntry.hide();
|
||||
}
|
||||
connectionPausedEvent.fire(connectionPaused);
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.commands.registerCommand('vscode-testresolver.openTunnel', async () => {
|
||||
const result = await vscode.window.showInputBox({
|
||||
prompt: 'Enter the remote port for the tunnel',
|
||||
@@ -363,13 +382,14 @@ async function tunnelFactory(tunnelOptions: vscode.TunnelOptions, tunnelCreation
|
||||
|
||||
return createTunnelService();
|
||||
|
||||
function newTunnel(localAddress: { host: string, port: number }) {
|
||||
function newTunnel(localAddress: { host: string, port: number }): vscode.Tunnel {
|
||||
const onDidDispose: vscode.EventEmitter<void> = new vscode.EventEmitter();
|
||||
let isDisposed = false;
|
||||
return {
|
||||
localAddress,
|
||||
remoteAddress: tunnelOptions.remoteAddress,
|
||||
public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') && tunnelOptions.public,
|
||||
protocol: tunnelOptions.protocol,
|
||||
onDidDispose: onDidDispose.event,
|
||||
dispose: () => {
|
||||
if (!isDisposed) {
|
||||
|
||||
Reference in New Issue
Block a user