src/vs/workbench/api/common/extHostExtensionService.ts/AbstractExtHostExtensionService/$getCanonicalURI
class AbstractExtHostExtensionService:	public async $getCanonicalURI(remoteAuthority: string, uriComponents: UriComponents): Promise<UriComponents> {

		const { authorityPrefix, resolver } = await this._activateAndGetResolver(remoteAuthority);
		if (!resolver) {
			throw new Error(`Cannot get canonical URI because no remote extension is installed to resolve ${authorityPrefix}`);
		}

		const uri = URI.revive(uriComponents);

		if (typeof resolver.getCanonicalURI === 'undefined') {
			// resolver cannot compute canonical URI
			return uri;
		}

		const result = await asPromise(() => resolver.getCanonicalURI!(uri));
		if (!result) {
			return uri;
		}

		return result;
	}