Merge remote-tracking branch 'origin/main' into tyriar/profile_api

This commit is contained in:
Daniel Imms
2021-05-26 11:09:35 -07:00
290 changed files with 4606 additions and 2990 deletions

View File

@@ -219,7 +219,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
})();
const authentication: typeof vscode.authentication = {
getSession(providerId: string, scopes: string[], options?: vscode.AuthenticationGetSessionOptions) {
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
},
get onDidChangeSessions(): Event<vscode.AuthenticationSessionsChangeEvent> {
@@ -316,16 +316,20 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
allowContributedOpeners: options?.allowContributedOpeners,
});
},
asExternalUri(uri: URI) {
async asExternalUri(uri: URI) {
if (uri.scheme === initData.environment.appUriScheme) {
return extHostUrls.createAppUri(uri);
}
if (!matchesScheme(uri.scheme, Schemas.http) && !matchesScheme(uri.scheme, Schemas.https)) {
if (!matchesScheme(uri, Schemas.http) && !matchesScheme(uri, Schemas.https)) {
checkProposedApiEnabled(extension); // https://github.com/microsoft/vscode/issues/124263
}
return extHostWindow.asExternalUri(uri, { allowTunneling: !!initData.remote.authority });
try {
return await extHostWindow.asExternalUri(uri, { allowTunneling: !!initData.remote.authority });
} catch {
return uri;
}
},
get remoteName() {
return getRemoteName(initData.remote.authority);
@@ -1001,10 +1005,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
stopDebugging(session?: vscode.DebugSession) {
return extHostDebugService.stopDebugging(session);
},
addBreakpoints(breakpoints: vscode.Breakpoint[]) {
addBreakpoints(breakpoints: readonly vscode.Breakpoint[]) {
return extHostDebugService.addBreakpoints(breakpoints);
},
removeBreakpoints(breakpoints: vscode.Breakpoint[]) {
removeBreakpoints(breakpoints: readonly vscode.Breakpoint[]) {
return extHostDebugService.removeBreakpoints(breakpoints);
},
asDebugSourceUri(source: vscode.DebugProtocolSource, session?: vscode.DebugSession): vscode.Uri {