2023-04-25 06:33:09 +03:00
|
|
|
// @ts-check
|
2023-03-01 10:40:01 +03:00
|
|
|
import 'dotenv/config';
|
2023-04-25 06:33:09 +03:00
|
|
|
/**
|
|
|
|
* @type {import('@affine/env').BlockSuiteFeatureFlags}
|
|
|
|
*/
|
|
|
|
export const blockSuiteFeatureFlags = {
|
|
|
|
enable_database: true,
|
|
|
|
enable_slash_menu: true,
|
|
|
|
enable_edgeless_toolbar: true,
|
|
|
|
enable_block_hub: true,
|
|
|
|
enable_drag_handle: true,
|
|
|
|
enable_surface: true,
|
|
|
|
enable_linked_page: true,
|
2023-05-26 09:52:36 +03:00
|
|
|
enable_bookmark_operation: process.env.ENABLE_BOOKMARK_OPERATION === 'true',
|
2023-04-25 06:33:09 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @type {import('@affine/env').BuildFlags}
|
|
|
|
*/
|
|
|
|
export const buildFlags = {
|
2023-05-30 13:02:49 +03:00
|
|
|
enablePlugin: process.env.ENABLE_PLUGIN === 'true',
|
2023-05-29 07:06:40 +03:00
|
|
|
enableAllPageFilter:
|
|
|
|
!!process.env.VERCEL ||
|
|
|
|
(process.env.ENABLE_ALL_PAGE_FILTER
|
|
|
|
? process.env.ENABLE_ALL_PAGE_FILTER === 'true'
|
|
|
|
: false),
|
2023-05-09 09:09:39 +03:00
|
|
|
enableImagePreviewModal: process.env.ENABLE_IMAGE_PREVIEW_MODAL
|
|
|
|
? process.env.ENABLE_IMAGE_PREVIEW_MODAL === 'true'
|
|
|
|
: true,
|
2023-05-05 07:18:54 +03:00
|
|
|
enableTestProperties: process.env.ENABLE_TEST_PROPERTIES
|
|
|
|
? process.env.ENABLE_TEST_PROPERTIES === 'true'
|
|
|
|
: true,
|
2023-04-18 10:23:00 +03:00
|
|
|
enableLegacyCloud: process.env.ENABLE_LEGACY_PROVIDER
|
|
|
|
? process.env.ENABLE_LEGACY_PROVIDER === 'true'
|
|
|
|
: true,
|
2023-03-01 22:47:09 +03:00
|
|
|
enableBroadCastChannelProvider: Boolean(
|
|
|
|
process.env.ENABLE_BC_PROVIDER ?? '1'
|
|
|
|
),
|
2023-03-11 02:45:10 +03:00
|
|
|
enableDebugPage: Boolean(
|
|
|
|
process.env.ENABLE_DEBUG_PAGE ?? process.env.NODE_ENV === 'development'
|
|
|
|
),
|
2023-05-18 02:16:22 +03:00
|
|
|
changelogUrl:
|
2023-06-15 16:54:06 +03:00
|
|
|
process.env.CHANGELOG_URL ??
|
2023-06-20 13:58:05 +03:00
|
|
|
'https://affine.pro/blog/what-is-new-affine-0620',
|
2023-06-07 12:31:54 +03:00
|
|
|
enablePreloading:
|
|
|
|
process.env.ENABLE_PRELOADING === undefined
|
|
|
|
? true
|
|
|
|
: process.env.ENABLE_PRELOADING === 'true',
|
2023-03-01 10:40:01 +03:00
|
|
|
};
|