Switch back to vscode-uri
This commit is contained in:
Родитель
d989e6f4b1
Коммит
87ed302f29
|
@ -5851,6 +5851,13 @@
|
|||
"vscode-languageserver-types": "^3.6.1",
|
||||
"vscode-nls": "^3.2.1",
|
||||
"vscode-uri": "^1.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-uri": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz",
|
||||
"integrity": "sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"vscode-jsonrpc": {
|
||||
|
@ -5898,6 +5905,13 @@
|
|||
"requires": {
|
||||
"vscode-languageserver-protocol": "^3.7.0",
|
||||
"vscode-uri": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-uri": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.8.tgz",
|
||||
"integrity": "sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"vscode-languageserver-protocol": {
|
||||
|
@ -5938,9 +5952,9 @@
|
|||
}
|
||||
},
|
||||
"vscode-uri": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.6.tgz",
|
||||
"integrity": "sha512-sLI2L0uGov3wKVb9EB+vIQBl9tVP90nqRvxSoJ35vI3NjxE8jfsE5DSOhWgSunHSZmKS4OCi2jrtfxK7uyp2ww=="
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.2.tgz",
|
||||
"integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA=="
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "1.7.2",
|
||||
|
|
|
@ -157,7 +157,8 @@
|
|||
"underscore": "1.9.1",
|
||||
"uuid": "^3.3.2",
|
||||
"vscode-extension-telemetry": "^0.1.6",
|
||||
"vscode-languageclient": "^7.0.0"
|
||||
"vscode-languageclient": "^7.0.0",
|
||||
"vscode-uri": "^3.0.2"
|
||||
},
|
||||
"extensionDependencies": [
|
||||
"ms-vscode.azure-account"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { URL } from 'url';
|
||||
import Uri from 'vscode-uri';
|
||||
|
||||
interface SchemaContributorProvider {
|
||||
readonly requestSchema: (resource: string) => string;
|
||||
|
@ -75,10 +75,10 @@ class SchemaContributor {
|
|||
*/
|
||||
public requestCustomSchemaContent(uri: string): string {
|
||||
if (uri) {
|
||||
const protocol = new URL(uri).protocol.slice(0, -1); // trim the :
|
||||
if (protocol && this._customSchemaContributors[protocol] &&
|
||||
this._customSchemaContributors[protocol].requestSchemaContent) {
|
||||
return this._customSchemaContributors[protocol].requestSchemaContent(uri);
|
||||
const scheme = Uri.parse(uri).scheme;
|
||||
if (scheme && this._customSchemaContributors[scheme] &&
|
||||
this._customSchemaContributors[scheme].requestSchemaContent) {
|
||||
return this._customSchemaContributors[scheme].requestSchemaContent(uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче