Merge from vscode 8b5ebbb1b8f6b2127bbbd551ac10cc080482d5b4 (#5041)

This commit is contained in:
Anthony Dresser
2019-04-15 20:37:22 -07:00
committed by GitHub
parent dcdbc95ae7
commit a5bc65fbfb
48 changed files with 495 additions and 294 deletions

27
src/vs/vscode.d.ts vendored
View File

@@ -5714,6 +5714,21 @@ declare module 'vscode' {
copy?(source: Uri, destination: Uri, options: { overwrite: boolean }): void | Thenable<void>;
}
/**
* Defines a port mapping used for localhost inside the webview.
*/
export interface WebviewPortMapping {
/**
* Localhost port to remap inside the webview.
*/
readonly webviewPort: number;
/**
* Destination port. The `webviewPort` is resolved to this port.
*/
readonly extensionHostPort: number;
}
/**
* Content settings for a webview.
*/
@@ -5740,6 +5755,18 @@ declare module 'vscode' {
* Pass in an empty array to disallow access to any local resources.
*/
readonly localResourceRoots?: ReadonlyArray<Uri>;
/**
* Mappings of localhost ports used inside the webview.
*
* Port mapping allow webviews to transparently define how localhost ports are resolved. This can be used
* to allow using a static localhost port inside the webview that is resolved to random port that a service is
* running on.
*
* If a webview accesses localhost content, we recomend that you specify port mappings even if
* the `webviewPort` and `extensionHostPort` ports are the same.
*/
readonly portMapping?: ReadonlyArray<WebviewPortMapping>;
}
/**