mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
chore: standardize tsconfig (#9568)
This commit is contained in:
Vendored
-56
@@ -1,61 +1,5 @@
|
||||
import { UaHelper } from './ua-helper.js';
|
||||
|
||||
export type BUILD_CONFIG_TYPE = {
|
||||
debug: boolean;
|
||||
distribution: 'web' | 'desktop' | 'admin' | 'mobile' | 'ios' | 'android';
|
||||
/**
|
||||
* 'web' | 'desktop' | 'admin'
|
||||
*/
|
||||
isDesktopEdition: boolean;
|
||||
/**
|
||||
* 'mobile'
|
||||
*/
|
||||
isMobileEdition: boolean;
|
||||
|
||||
isElectron: boolean;
|
||||
isWeb: boolean;
|
||||
isMobileWeb: boolean;
|
||||
isIOS: boolean;
|
||||
isAndroid: boolean;
|
||||
isAdmin: boolean;
|
||||
|
||||
// this is for the electron app
|
||||
/**
|
||||
* @deprecated need to be refactored
|
||||
*/
|
||||
serverUrlPrefix: string;
|
||||
appVersion: string;
|
||||
editorVersion: string;
|
||||
appBuildType: 'stable' | 'beta' | 'internal' | 'canary';
|
||||
|
||||
githubUrl: string;
|
||||
changelogUrl: string;
|
||||
downloadUrl: string;
|
||||
// see: tools/workers
|
||||
imageProxyUrl: string;
|
||||
linkPreviewUrl: string;
|
||||
};
|
||||
|
||||
export type Environment = {
|
||||
// Variant
|
||||
isSelfHosted: boolean;
|
||||
|
||||
// Device
|
||||
isLinux: boolean;
|
||||
isMacOs: boolean;
|
||||
isIOS: boolean;
|
||||
isSafari: boolean;
|
||||
isWindows: boolean;
|
||||
isFireFox: boolean;
|
||||
isMobile: boolean;
|
||||
isChrome: boolean;
|
||||
isPwa: boolean;
|
||||
chromeVersion?: number;
|
||||
|
||||
// runtime configs
|
||||
publicPath: string;
|
||||
};
|
||||
|
||||
export function setupGlobal() {
|
||||
if (globalThis.$AFFINE_SETUP) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user