starpc 0.21.1 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/srpc/conn.js +1 -1
- package/dist/srpc/pushable.d.ts +1 -1
- package/package.json +1 -1
- package/srpc/conn.ts +1 -1
- package/srpc/message-port.ts +1 -1
- package/srpc/pushable.ts +1 -6
package/dist/srpc/conn.js
CHANGED
|
@@ -25,7 +25,7 @@ export class Conn {
|
|
|
25
25
|
if (server) {
|
|
26
26
|
this.server = server;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
const muxerFactory = connParams?.muxerFactory ?? yamux()();
|
|
29
29
|
this.muxer = muxerFactory.createStreamMuxer({
|
|
30
30
|
onIncomingStream: this.handleIncomingStream.bind(this),
|
|
31
31
|
direction: connParams?.direction || 'outbound',
|
package/dist/srpc/pushable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Pushable } from 'it-pushable';
|
|
2
2
|
import { Source, Sink } from 'it-stream-types';
|
|
3
3
|
export declare function writeToPushable<T>(dataSource: AsyncIterable<T>, out: Pushable<T>): Promise<void>;
|
|
4
|
-
export declare function buildPushableSink<T
|
|
4
|
+
export declare function buildPushableSink<T>(target: Pushable<T>): Sink<Source<T>, Promise<void>>;
|
package/package.json
CHANGED
package/srpc/conn.ts
CHANGED
|
@@ -78,7 +78,7 @@ export class Conn
|
|
|
78
78
|
if (server) {
|
|
79
79
|
this.server = server
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
const muxerFactory = connParams?.muxerFactory ?? yamux()()
|
|
82
82
|
this.muxer = muxerFactory.createStreamMuxer({
|
|
83
83
|
onIncomingStream: this.handleIncomingStream.bind(this),
|
|
84
84
|
direction: connParams?.direction || 'outbound',
|
package/srpc/message-port.ts
CHANGED
package/srpc/pushable.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Pushable } from 'it-pushable'
|
|
2
2
|
import { Source, Sink } from 'it-stream-types'
|
|
3
|
-
import { castToError } from './errors.js'
|
|
4
3
|
|
|
5
4
|
// writeToPushable writes the incoming server data to the pushable.
|
|
6
5
|
export async function writeToPushable<T>(
|
|
@@ -18,11 +17,7 @@ export async function writeToPushable<T>(
|
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
export function buildPushableSink<T
|
|
22
|
-
target: Pushable<T>,
|
|
23
|
-
): Sink<Source<T>, Promise<void>>
|
|
24
|
-
|
|
25
|
-
export function buildPushableSink<T extends Iterable<any> | AsyncIterable<any>>(
|
|
20
|
+
export function buildPushableSink<T>(
|
|
26
21
|
target: Pushable<T>,
|
|
27
22
|
): Sink<Source<T>, Promise<void>> {
|
|
28
23
|
return async (source: Source<T>): Promise<void> => {
|