提交 a47be8c8 编写于 作者: J Johannes Rieken

enable proposed api usage via product.json

上级 bc6e4f52
......@@ -31,6 +31,7 @@ export interface IProductConfiguration {
exeBasedExtensionTips: { [id: string]: any; };
extensionKeywords: { [extension: string]: string[]; };
extensionAllowedBadgeProviders: string[];
extensionAllowedProposedApi: string[];
keymapExtensionTips: string[];
crashReporter: {
companyName: string;
......
......@@ -58,6 +58,7 @@ import { ExtHostDecorations } from 'vs/workbench/api/node/extHostDecorations';
import { toGlobPattern, toLanguageSelector } from 'vs/workbench/api/node/extHostTypeConverters';
import { ExtensionActivatedByAPI } from 'vs/workbench/api/node/extHostExtensionActivator';
import { ILogService } from 'vs/platform/log/common/log';
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
export interface IExtensionApiFactory {
(extension: IExtensionDescription): typeof vscode;
......@@ -128,8 +129,14 @@ export function createApiFactory(
const EXTENSION_ID = extension.id;
if (extension.enableProposedApi && !extension.isBuiltin) {
if (!isFalsyOrEmpty(product.extensionAllowedProposedApi)
&& product.extensionAllowedProposedApi.indexOf(extension.id) >= 0
) {
// fast lane -> proposed api is available to all extensions
// that are listed in product.json-files
extension.enableProposedApi = true;
} else if (extension.enableProposedApi && !extension.isBuiltin) {
if (
!initData.environment.enableProposedApiForAll &&
initData.environment.enableProposedApiFor.indexOf(extension.id) < 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册