- @bufbuild/protobuf를 dependencies에서 devDependencies로 이동 - ws를 peerDependencies에서 devDependencies로 이동 - node_ws_server.ts에 TLS 및 라우팅 기능 추가 - node_ws_client.ts에 TCP 클라이언트 통합 기능 추가 - message_common_pb.ts 프로토콜 버퍼 코드 재생성 - 크로스테스트 클라이언트 파일들 경로 업데이트 - 테스트 파일들 설정 업데이트 - 문서(PORTING_GUIDE, README) 업데이트 |
||
|---|---|---|
| .. | ||
| crosstest | ||
| src | ||
| test | ||
| .gitignore | ||
| CROSSTEST_CHECKLIST.md | ||
| IMPLEMENTATION_CHECKLIST.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
TypeScript Proto Socket
Status: planned
This package implements Proto Socket protocol version 0.1 for TypeScript.
Scope
- Runtime targets: Node.js TCP, Node.js WebSocket, browser native WebSocket.
- Browser entrypoint (
proto-socket):Communicator,BaseClient,BrowserWsClient,connectBrowserWs. Has nows,node:*, orBufferdependency. - Node entrypoint (
proto-socket/node): all of the above plusTcpClient/TcpServer,NodeWsClient/NodeWsServer,connectNodeWs/connectNodeWssusing Node.js built-ins.
Import
// browser
import { connectBrowserWs } from "proto-socket";
// node
import { connectNodeWs, NodeWsServer, TcpClient } from "proto-socket/node";
Runtime Dependencies
The TypeScript runtime has no non-protobuf package dependencies. The current canonical message codec and Node.js TCP/TLS/WebSocket transports are implemented with native platform APIs, so this package has no runtime dependencies at all.
Proto Sync
The canonical schema lives in ../proto/message_common.proto. The TypeScript packet codec in
src/packets/ must stay wire-compatible with that schema. After proto changes, run from the
repository root:
tools/check_proto_sync.sh
Validation
cd typescript
npx tsc --noEmit
npx vitest run
cd go
go run ./crosstest/go_typescript.go