chore: disable outline, copilot and hello world plugin (#4894)
This commit is contained in:
1
packages/common/env/src/global.ts
vendored
1
packages/common/env/src/global.ts
vendored
@@ -16,6 +16,7 @@ export const blockSuiteFeatureFlags = z.object({
|
|||||||
|
|
||||||
export const runtimeFlagsSchema = z.object({
|
export const runtimeFlagsSchema = z.object({
|
||||||
enablePlugin: z.boolean(),
|
enablePlugin: z.boolean(),
|
||||||
|
builtinPlugins: z.array(z.string()),
|
||||||
enableTestProperties: z.boolean(),
|
enableTestProperties: z.boolean(),
|
||||||
enableBroadcastChannelProvider: z.boolean(),
|
enableBroadcastChannelProvider: z.boolean(),
|
||||||
enableDebugPage: z.boolean(),
|
enableDebugPage: z.boolean(),
|
||||||
|
|||||||
@@ -6,13 +6,7 @@ import type { z } from 'zod';
|
|||||||
|
|
||||||
import type { packageJsonOutputSchema } from '../type.js';
|
import type { packageJsonOutputSchema } from '../type.js';
|
||||||
|
|
||||||
export const builtinPluginPaths = new Set([
|
export const builtinPluginPaths = new Set(runtimeConfig.builtinPlugins);
|
||||||
'/plugins/copilot',
|
|
||||||
'/plugins/hello-world',
|
|
||||||
'/plugins/image-preview',
|
|
||||||
'/plugins/vue-hello-world',
|
|
||||||
'/plugins/outline',
|
|
||||||
]);
|
|
||||||
|
|
||||||
const pluginCleanupMap = new Map<string, Set<() => void>>();
|
const pluginCleanupMap = new Map<string, Set<() => void>>();
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
const buildPreset: Record<BuildFlags['channel'], RuntimeConfig> = {
|
const buildPreset: Record<BuildFlags['channel'], RuntimeConfig> = {
|
||||||
stable: {
|
stable: {
|
||||||
enablePlugin: true,
|
enablePlugin: true,
|
||||||
|
builtinPlugins: ['/plugins/image-preview'],
|
||||||
enableTestProperties: false,
|
enableTestProperties: false,
|
||||||
enableBroadcastChannelProvider: true,
|
enableBroadcastChannelProvider: true,
|
||||||
enableDebugPage: true,
|
enableDebugPage: true,
|
||||||
@@ -52,6 +53,13 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
// canary will be aggressive and enable all features
|
// canary will be aggressive and enable all features
|
||||||
canary: {
|
canary: {
|
||||||
enablePlugin: true,
|
enablePlugin: true,
|
||||||
|
builtinPlugins: [
|
||||||
|
'/plugins/copilot',
|
||||||
|
'/plugins/hello-world',
|
||||||
|
'/plugins/image-preview',
|
||||||
|
'/plugins/vue-hello-world',
|
||||||
|
'/plugins/outline',
|
||||||
|
],
|
||||||
enableTestProperties: true,
|
enableTestProperties: true,
|
||||||
enableBroadcastChannelProvider: true,
|
enableBroadcastChannelProvider: true,
|
||||||
enableDebugPage: true,
|
enableDebugPage: true,
|
||||||
@@ -83,6 +91,13 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
|||||||
const currentBuildPreset = buildPreset[currentBuild];
|
const currentBuildPreset = buildPreset[currentBuild];
|
||||||
|
|
||||||
const environmentPreset = {
|
const environmentPreset = {
|
||||||
|
builtinPlugins: [
|
||||||
|
'/plugins/copilot',
|
||||||
|
'/plugins/hello-world',
|
||||||
|
'/plugins/image-preview',
|
||||||
|
'/plugins/vue-hello-world',
|
||||||
|
'/plugins/outline',
|
||||||
|
],
|
||||||
enablePlugin: process.env.ENABLE_PLUGIN
|
enablePlugin: process.env.ENABLE_PLUGIN
|
||||||
? process.env.ENABLE_PLUGIN === 'true'
|
? process.env.ENABLE_PLUGIN === 'true'
|
||||||
: currentBuildPreset.enablePlugin,
|
: currentBuildPreset.enablePlugin,
|
||||||
|
|||||||
Reference in New Issue
Block a user