build: perform TypeCheck for all packages (#2573)

Co-authored-by: himself65 <himself65@outlook.com>
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
LongYinan
2023-05-31 20:49:56 +08:00
committed by Himself65
parent 7e8169c4b8
commit fb9d200dd3
81 changed files with 434 additions and 241 deletions
+5 -3
View File
@@ -1,9 +1,11 @@
/// <reference types="@blocksuite/global" />
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="./global.d.ts" />
import { assertEquals } from '@blocksuite/global/utils';
import getConfig from 'next/config';
import { z } from 'zod';
import { getUaHelper } from './ua-helper';
import { UaHelper } from './ua-helper';
export const buildFlagsSchema = z.object({
/**
@@ -111,7 +113,7 @@ export function getEnvironment() {
return environment;
}
const isDebug = process.env.NODE_ENV === 'development';
if (typeof window === 'undefined') {
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
environment = {
isDesktop: false,
isBrowser: false,
@@ -119,7 +121,7 @@ export function getEnvironment() {
isDebug,
} satisfies Server;
} else {
const uaHelper = getUaHelper();
const uaHelper = new UaHelper(navigator);
environment = {
origin: window.location.origin,