mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 21:25:45 +08:00
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:
Vendored
+5
-3
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user