add vscode.env.remoteAuthority-api, #74188

This commit is contained in:
Johannes Rieken 2019-05-27 11:50:43 +02:00
parent a00a9a2945
commit 6a1574e21e
2 changed files with 13 additions and 1 deletions

11
src/vs/vscode.d.ts vendored
View file

@ -6040,6 +6040,17 @@ declare module 'vscode' {
* @returns A promise indicating if open was successful.
*/
export function openExternal(target: Uri): Thenable<boolean>;
/**
* The [authority](#Uri.authority)-component. When `undefined`, extensions are
* executed in the same context (e.g. operating system or machine) in which the UI
* of the editor is executed. If defined, extensions are running on a different
* context, for instance a remote machine.
*
* *Note* that no assumptions about the actual value should be made as it is defined
* by extensions and not by the editor.
*/
export const remoteAuthority: string | undefined;
}
/**

View file

@ -256,7 +256,8 @@ export function createApiFactory(
},
openExternal(uri: URI) {
return extHostWindow.openUri(uri, { allowTunneling: !!initData.remoteAuthority });
}
},
get remoteAuthority() { return initData.remoteAuthority || undefined; }
});
// namespace: extensions