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.
15 lines
271 B
TypeScript
15 lines
271 B
TypeScript
import { defineConfig } from 'tsup';
|
|
|
|
export default defineConfig({
|
|
entry: [
|
|
'src/index.ts',
|
|
'src/event-target-redis.ts',
|
|
'src/call.ts',
|
|
],
|
|
format: ['esm', 'cjs'],
|
|
dts: true,
|
|
sourcemap: true,
|
|
clean: true,
|
|
splitting: true,
|
|
target: 'es2022',
|
|
}); |