mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
chore: disable outline, copilot and hello world plugin (#4894)
This commit is contained in:
Vendored
+1
@@ -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(),
|
||||
|
||||
@@ -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>>();
|
||||
|
||||
|
||||
@@ -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 features
|
||||
canary: {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user