2019-07-02 06:01:09 +07:00
|
|
|
// 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.
|
2019-07-23 04:00:59 +07:00
|
|
|
module.exports = (remoteAuthority) => {
|
2019-07-02 06:01:09 +07:00
|
|
|
return {
|
|
|
|
transformIncoming: (uri) => {
|
|
|
|
switch (uri.scheme) {
|
2019-10-29 23:23:34 +07:00
|
|
|
case "vscode-remote": return { scheme: "file", path: uri.path };
|
2019-07-02 06:01:09 +07:00
|
|
|
default: return uri;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
transformOutgoing: (uri) => {
|
|
|
|
switch (uri.scheme) {
|
2019-10-29 23:23:34 +07:00
|
|
|
case "file": return { scheme: "vscode-remote", authority: remoteAuthority, path: uri.path };
|
2019-07-02 06:01:09 +07:00
|
|
|
default: return uri;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
transformOutgoingScheme: (scheme) => {
|
|
|
|
switch (scheme) {
|
2019-10-30 22:32:57 +07:00
|
|
|
case "file": return "vscode-remote";
|
2019-07-02 06:01:09 +07:00
|
|
|
default: return scheme;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|