resolvers: add appQuality and appCommit (#182532)

Currently remote extensions use a hack to read the product.json, but
this can't be done on web. Instead expose proper API to get the
appQuality and appCommit.
This commit is contained in:
Connor Peet
2023-05-15 11:18:57 -07:00
committed by GitHub
parent b7c81ac7cc
commit e47a286153
6 changed files with 20 additions and 1 deletions

View File

@@ -397,7 +397,15 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
registerIssueUriRequestHandler(handler: vscode.IssueUriRequestHandler) {
checkProposedApiEnabled(extension, 'handleIssueUri');
return extHostIssueReporter.registerIssueUriRequestHandler(extension, handler);
}
},
get appQuality(): string | undefined {
checkProposedApiEnabled(extension, 'resolvers');
return initData.quality;
},
get appCommit(): string | undefined {
checkProposedApiEnabled(extension, 'resolvers');
return initData.commit;
},
};
if (!initData.environment.extensionTestsLocationURI) {
// allow to patch env-function when running tests