Add call protocol module with streaming support
New sub-path export @alkdev/pubsub/call providing:
- CallEventSchema (TypeBox schemas) for call.requested/responded/part/completed/aborted/error
- PendingRequestMap with call() (request/response) and subscribe() (streaming via Repeater)
- CallError class and CallErrorCode constants
- Scoped topic subscriptions (call.responded:{requestId}) to avoid O(n) fanout
- subscribe() yields call.part events until call.completed or call.error,
with automatic call.aborted on consumer break
Also adds @alkdev/typebox as runtime dependency and architecture doc.
This commit is contained in:
14
package.json
14
package.json
@@ -26,6 +26,16 @@
|
||||
"types": "./dist/event-target-redis.d.cts",
|
||||
"default": "./dist/event-target-redis.cjs"
|
||||
}
|
||||
},
|
||||
"./call": {
|
||||
"import": {
|
||||
"types": "./dist/call.d.ts",
|
||||
"default": "./dist/call.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/call.d.cts",
|
||||
"default": "./dist/call.cjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
@@ -52,7 +62,9 @@
|
||||
"quic"
|
||||
],
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"@alkdev/typebox": "^0.34.49"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ioredis": "^5.0.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user