fix: fix @tianji/shared build problem
This commit is contained in:
parent
8a42ef616e
commit
f5f0a560f1
@ -9,7 +9,6 @@
|
|||||||
"start": "cd src/server && cross-env NODE_ENV=production node ./dist/src/server/main.js",
|
"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": "pnpm start:docker:db && pnpm start",
|
||||||
"start:docker:db": "cd src/server && pnpm db:migrate:apply",
|
"start:docker:db": "cd src/server && pnpm db:migrate:apply",
|
||||||
"postinstall": "cd src/server && pnpm db:generate",
|
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"build": "pnpm build:tracker && pnpm build:server && pnpm build:client && pnpm build:geo",
|
"build": "pnpm build:tracker && pnpm build:server && pnpm build:client && pnpm build:geo",
|
||||||
"build:client": "cd src/client && pnpm build",
|
"build:client": "cd src/client && pnpm build",
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"require": "./dist/cjs/src/shared/src/index.js"
|
"require": "./dist/cjs/src/shared/src/index.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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:cjs": "tsc --module commonjs --outDir ./dist/cjs",
|
||||||
"build:esm": "tsc --module esnext --outDir ./dist/esm",
|
"build:esm": "tsc --module esnext --outDir ./dist/esm",
|
||||||
"postinstall": "pnpm build"
|
"postinstall": "pnpm build"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { ServerStatusInfo } from '../../types';
|
import { type ServerStatusInfo } from '../../types/server';
|
||||||
|
|
||||||
export function isServerOnline(info: ServerStatusInfo): boolean {
|
export function isServerOnline(info: ServerStatusInfo): boolean {
|
||||||
return new Date(info.updatedAt).valueOf() + info.timeout * 1000 > Date.now();
|
return new Date(info.updatedAt).valueOf() + info.timeout * 1000 > Date.now();
|
||||||
|
Loading…
Reference in New Issue
Block a user