mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-02 17:23:40 -05:00
Merge from vscode 05fc61ffb1aee9fd19173c32113daed079f9b7bd (#5074)
* Merge from vscode 05fc61ffb1aee9fd19173c32113daed079f9b7bd * fix tests
This commit is contained in:
@@ -40,7 +40,7 @@ import { IRPCProtocol, createExtHostContextProxyIdentifier as createExtId, creat
|
||||
import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress';
|
||||
import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { ResolvedAuthority } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
||||
import { ResolvedAuthority, RemoteAuthorityResolverErrorCode } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
||||
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
|
||||
import * as codeInset from 'vs/workbench/contrib/codeinset/common/codeInset';
|
||||
import * as callHierarchy from 'vs/workbench/contrib/callHierarchy/common/callHierarchy';
|
||||
@@ -812,8 +812,24 @@ export interface ExtHostSearchShape {
|
||||
$clearCache(cacheKey: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface IResolveAuthorityErrorResult {
|
||||
type: 'error';
|
||||
error: {
|
||||
message: string | undefined;
|
||||
code: RemoteAuthorityResolverErrorCode;
|
||||
detail: any;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IResolveAuthorityOKResult {
|
||||
type: 'ok';
|
||||
value: ResolvedAuthority;
|
||||
}
|
||||
|
||||
export type IResolveAuthorityResult = IResolveAuthorityErrorResult | IResolveAuthorityOKResult;
|
||||
|
||||
export interface ExtHostExtensionServiceShape {
|
||||
$resolveAuthority(remoteAuthority: string): Promise<ResolvedAuthority>;
|
||||
$resolveAuthority(remoteAuthority: string, resolveAttempt: number): Promise<IResolveAuthorityResult>;
|
||||
$startExtensionHost(enabledExtensionIds: ExtensionIdentifier[]): Promise<void>;
|
||||
$activateByEvent(activationEvent: string): Promise<void>;
|
||||
$activate(extensionId: ExtensionIdentifier, activationEvent: string): Promise<boolean>;
|
||||
@@ -1062,7 +1078,7 @@ export interface ExtHostTerminalServiceShape {
|
||||
$acceptTerminalRendererInput(id: number, data: string): void;
|
||||
$acceptTerminalTitleChange(id: number, name: string): void;
|
||||
$acceptTerminalDimensions(id: number, cols: number, rows: number): void;
|
||||
$createProcess(id: number, shellLaunchConfig: ShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number): void;
|
||||
$createProcess(id: number, shellLaunchConfig: ShellLaunchConfigDto, activeWorkspaceRootUri: UriComponents, cols: number, rows: number, isWorkspaceShellAllowed: boolean): void;
|
||||
$acceptProcessInput(id: number, data: string): void;
|
||||
$acceptProcessResize(id: number, cols: number, rows: number): void;
|
||||
$acceptProcessShutdown(id: number, immediate: boolean): void;
|
||||
|
||||
@@ -13,6 +13,7 @@ import { URI } from 'vs/base/common/uri';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import * as vscode from 'vscode';
|
||||
import { FileSystemProviderErrorCode, markAsFileSystemProviderError } from 'vs/platform/files/common/files';
|
||||
import { RemoteAuthorityResolverErrorCode } from 'vs/platform/remote/common/remoteAuthorityResolver';
|
||||
|
||||
function es5ClassCompat(target: Function): any {
|
||||
///@ts-ignore
|
||||
@@ -445,6 +446,35 @@ export class ResolvedAuthority {
|
||||
}
|
||||
}
|
||||
|
||||
export class RemoteAuthorityResolverError extends Error {
|
||||
|
||||
static NotAvailable(message?: string, handled?: boolean): RemoteAuthorityResolverError {
|
||||
return new RemoteAuthorityResolverError(message, RemoteAuthorityResolverErrorCode.NotAvailable, handled);
|
||||
}
|
||||
|
||||
static TemporarilyNotAvailable(message?: string): RemoteAuthorityResolverError {
|
||||
return new RemoteAuthorityResolverError(message, RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable);
|
||||
}
|
||||
|
||||
public readonly _message: string | undefined;
|
||||
public readonly _code: RemoteAuthorityResolverErrorCode;
|
||||
public readonly _detail: any;
|
||||
|
||||
constructor(message?: string, code: RemoteAuthorityResolverErrorCode = RemoteAuthorityResolverErrorCode.Unknown, detail?: any) {
|
||||
super(message);
|
||||
|
||||
this._message = message;
|
||||
this._code = code;
|
||||
this._detail = detail;
|
||||
|
||||
// workaround when extending builtin objects and when compiling to ES5, see:
|
||||
// https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
|
||||
if (typeof (<any>Object).setPrototypeOf === 'function') {
|
||||
(<any>Object).setPrototypeOf(this, RemoteAuthorityResolverError.prototype);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export enum EndOfLine {
|
||||
LF = 1,
|
||||
CRLF = 2
|
||||
|
||||
Reference in New Issue
Block a user