There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
chore: disable outline, copilot and hello world plugin (#4894)
Joooye_3415b0c127f592
diff --git a/packages/common/env/src/global.ts b/packages/common/env/src/global.tsindex 215a94824a..5699cc6e19 100644--- a/packages/common/env/src/global.ts+++ b/packages/common/env/src/global.ts@@ -16,6 +16,7 @@ export const blockSuiteFeatureFlags = z.object({export const runtimeFlagsSchema = z.object({enablePlugin: z.boolean(),+ builtinPlugins: z.array(z.string()),enableTestProperties: z.boolean(),enableBroadcastChannelProvider: z.boolean(),enableDebugPage: z.boolean(),diff --git a/packages/common/infra/src/__internal__/plugin.ts b/packages/common/infra/src/__internal__/plugin.tsindex 4709df884d..9e2840939a 100644--- a/packages/common/infra/src/__internal__/plugin.ts+++ b/packages/common/infra/src/__internal__/plugin.ts@@ -6,13 +6,7 @@ import type { z } from 'zod';import type { packageJsonOutputSchema } from '../type.js';-export const builtinPluginPaths = new Set([- '/plugins/copilot',- '/plugins/hello-world',- '/plugins/image-preview',- '/plugins/vue-hello-world',- '/plugins/outline',-]);+export const builtinPluginPaths = new Set(runtimeConfig.builtinPlugins);const pluginCleanupMap = new Map<string, Set<() => void>>();diff --git a/packages/frontend/core/.webpack/runtime-config.ts b/packages/frontend/core/.webpack/runtime-config.tsindex 4a49aa041b..4347b706f8 100644--- a/packages/frontend/core/.webpack/runtime-config.ts+++ b/packages/frontend/core/.webpack/runtime-config.ts@@ -17,6 +17,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {const buildPreset: Record<BuildFlags['channel'], RuntimeConfig> = {stable: {enablePlugin: true,+ builtinPlugins: ['/plugins/image-preview'],enableTestProperties: false,enableBroadcastChannelProvider: true,enableDebugPage: true,@@ -52,6 +53,13 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {// canary will be aggressive and enable all featurescanary: {enablePlugin: true,+ builtinPlugins: [+ '/plugins/copilot',+ '/plugins/hello-world',+ '/plugins/image-preview',+ '/plugins/vue-hello-world',+ '/plugins/outline',+ ],enableTestProperties: true,enableBroadcastChannelProvider: true,enableDebugPage: true,@@ -83,6 +91,13 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {const currentBuildPreset = buildPreset[currentBuild];const environmentPreset = {+ builtinPlugins: [+ '/plugins/copilot',+ '/plugins/hello-world',+ '/plugins/image-preview',+ '/plugins/vue-hello-world',+ '/plugins/outline',+ ],enablePlugin: process.env.ENABLE_PLUGIN? process.env.ENABLE_PLUGIN === 'true': currentBuildPreset.enablePlugin,