feat(network): 基于 TSRPC 的网络同步模块 (#318)

- network-protocols: 共享协议包,使用 TSRPC CLI 生成完整类型验证
- network: 浏览器客户端,提供 NetworkPlugin、NetworkService 和同步系统
- network-server: Node.js 服务端,提供 GameServer 和房间管理
This commit is contained in:
YHH
2025-12-24 22:49:29 +08:00
committed by GitHub
parent dbc6793dc4
commit 235c432edb
35 changed files with 2727 additions and 88 deletions

View File

@@ -0,0 +1,14 @@
import { defineConfig } from 'tsup';
import { runtimeOnlyPreset } from '../build-config/src/presets/plugin-tsup';
export default defineConfig({
...runtimeOnlyPreset({
external: [/^tsrpc/, 'tsbuffer', 'tsbuffer-schema']
}),
tsconfig: 'tsconfig.build.json',
// 禁用 tsup 的 DTS 捆绑器,改用 tsc 生成声明文件
// tsup 的 DTS bundler 无法正确解析 tsrpc 的类型继承链
// Disable tsup's DTS bundler, use tsc to generate declarations
// tsup's DTS bundler cannot correctly resolve tsrpc's type inheritance chain
dts: false
});