fix: fix @tianji/shared build problem

This commit is contained in:
moonrailgun 2024-01-29 01:18:35 +08:00
parent 8a42ef616e
commit f5f0a560f1
3 changed files with 2 additions and 3 deletions

View File

@ -9,7 +9,6 @@
"start": "cd src/server && cross-env NODE_ENV=production node ./dist/src/server/main.js",
"start:docker": "pnpm start:docker:db && pnpm start",
"start:docker:db": "cd src/server && pnpm db:migrate:apply",
"postinstall": "cd src/server && pnpm db:generate",
"test": "vitest",
"build": "pnpm build:tracker && pnpm build:server && pnpm build:client && pnpm build:geo",
"build:client": "cd src/client && pnpm build",

View File

@ -9,7 +9,7 @@
"require": "./dist/cjs/src/shared/src/index.js"
},
"scripts": {
"build": "pnpm build:cjs && pnpm build:esm",
"build": "concurrently --kill-others npm:build:cjs npm:build:esm",
"build:cjs": "tsc --module commonjs --outDir ./dist/cjs",
"build:esm": "tsc --module esnext --outDir ./dist/esm",
"postinstall": "pnpm build"

View File

@ -1,4 +1,4 @@
import type { ServerStatusInfo } from '../../types';
import { type ServerStatusInfo } from '../../types/server';
export function isServerOnline(info: ServerStatusInfo): boolean {
return new Date(info.updatedAt).valueOf() + info.timeout * 1000 > Date.now();