mirror of
https://github.com/Microsoft/vscode
synced 2024-07-02 15:59:00 +00:00
Activate vscode.github-authentication
from the test resolver
This commit is contained in:
parent
5b2f96e69d
commit
36b9d931d7
|
@ -9,6 +9,8 @@ export function activate(_context: vscode.ExtensionContext) {
|
|||
vscode.workspace.registerRemoteAuthorityResolver('test', {
|
||||
async resolve(_authority: string): Promise<vscode.ResolverResult> {
|
||||
console.log(`Resolving ${_authority}`);
|
||||
console.log(`Activating vscode.github-authentication to simulate auth`);
|
||||
await vscode.extensions.getExtension('vscode.github-authentication')?.activate();
|
||||
return new vscode.ManagedResolvedAuthority(async () => {
|
||||
return new InitialManagedMessagePassing();
|
||||
});
|
||||
|
|
|
@ -28,6 +28,7 @@ import { IProductConfiguration } from 'vs/base/common/product';
|
|||
import { isString } from 'vs/base/common/types';
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { getRemoteServerRootPath } from 'vs/platform/remote/common/remoteHosts';
|
||||
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
|
||||
|
||||
const textMimeType = {
|
||||
'.html': 'text/html',
|
||||
|
@ -343,9 +344,12 @@ export class WebClientServer {
|
|||
};
|
||||
|
||||
if (useTestResolver) {
|
||||
const filePath = FileAccess.asFileUri(`${builtinExtensionsPath}/vscode-test-resolver/package.json`).fsPath;
|
||||
const packageJSON = JSON.parse((await fsp.readFile(filePath)).toString());
|
||||
values['WORKBENCH_BUILTIN_EXTENSIONS'] = asJSON([{ extensionPath: 'vscode-test-resolver', packageJSON }]);
|
||||
const bundledExtensions: { extensionPath: string; packageJSON: IExtensionManifest }[] = [];
|
||||
for (const extensionPath of ['vscode-test-resolver', 'github-authentication']) {
|
||||
const packageJSON = JSON.parse((await fsp.readFile(FileAccess.asFileUri(`${builtinExtensionsPath}/${extensionPath}/package.json`).fsPath)).toString());
|
||||
bundledExtensions.push({ extensionPath, packageJSON });
|
||||
}
|
||||
values['WORKBENCH_BUILTIN_EXTENSIONS'] = asJSON(bundledExtensions);
|
||||
}
|
||||
|
||||
let data;
|
||||
|
|
Loading…
Reference in New Issue
Block a user