Make extension sidebar work

This commit is contained in:
Asher
2019-07-10 16:29:15 -05:00
parent 86e8ba12e7
commit 54ffd1d351
7 changed files with 934 additions and 1286 deletions

View File

@@ -1,10 +1,11 @@
// This file is included via a regular Node require. I'm not sure how (or if)
// we can write this in Typescript and have it compile to non-AMD syntax.
module.exports = (remoteAuthority) => {
module.exports = (remoteAuthority, https) => {
return {
transformIncoming: (uri) => {
switch (uri.scheme) {
case "vscode-remote": return { scheme: "file", path: uri.path };
case "https": return { scheme: "file", path: uri.path };
case "http": return { scheme: "file", path: uri.path };
case "file": return { scheme: "vscode-local", path: uri.path };
default: return uri;
}
@@ -12,14 +13,14 @@ module.exports = (remoteAuthority) => {
transformOutgoing: (uri) => {
switch (uri.scheme) {
case "vscode-local": return { scheme: "file", path: uri.path };
case "file": return { scheme: "vscode-remote", authority: remoteAuthority, path: uri.path };
case "file": return { scheme: https ? "https" : "http", authority: remoteAuthority, path: uri.path };
default: return uri;
}
},
transformOutgoingScheme: (scheme) => {
switch (scheme) {
case "vscode-local": return "file";
case "file": return "vscode-remote";
case "file": return https ? "https" : "http";
default: return scheme;
}
},