@fails-components/webtransport 0.3.1 → 1.0.1
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/lib/client.js +81 -40
- package/lib/dom.ts +7 -5
- package/lib/http2/browser/browser.js +168 -0
- package/lib/http2/browser/browserparser.js +248 -0
- package/lib/http2/flowcontroller.js +371 -0
- package/lib/http2/node/capsuleparser.js +291 -0
- package/lib/http2/node/client.js +239 -0
- package/lib/http2/node/index.js +2 -0
- package/lib/http2/node/server.js +499 -0
- package/lib/http2/node/websocketparser.js +829 -0
- package/lib/http2/parserbase.js +139 -0
- package/lib/http2/parserbasehttp2.js +128 -0
- package/lib/http2/session.js +225 -0
- package/lib/http2/stream.js +354 -0
- package/lib/http2/websocketcommon.js +1 -0
- package/lib/{index.js → index.browser.js} +6 -10
- package/lib/index.node.js +27 -0
- package/lib/server.js +252 -69
- package/lib/session.js +31 -68
- package/lib/stream.js +103 -179
- package/lib/types.ts +174 -87
- package/lib/utils.js +2 -1
- package/lib/webstreams.browser.js +6 -0
- package/lib/webstreams.js +7 -0
- package/lib/webtransport.browser.js +284 -0
- package/lib/webtransport.node.js +137 -0
- package/lib/{webtransport.js → webtransportbase.js} +47 -41
- package/old_test/test.js +31 -29
- package/old_test/testsuite.js +1 -1
- package/package.json +18 -17
- package/readme.md +94 -30
- package/test/bidirectional-streams.spec.js +51 -9
- package/test/datagrams.spec.js +8 -2
- package/test/fixtures/known-bytes.js +29 -0
- package/test/fixtures/read-stream.js +1 -1
- package/test/fixtures/reader-value.js +1 -1
- package/test/fixtures/server.js +24 -10
- package/test/fixtures/webtransport.browser.js +20 -2
- package/test/fixtures/webtransport.js +1 -1
- package/test/index.js +33 -6
- package/test/pw-no-https-errors.json +5 -0
- package/test/session.spec.js +71 -52
- package/test/unidirectional-streams.spec.js +20 -4
- package/CMakeLists.txt +0 -991
- package/LICENSE.chromium +0 -27
- package/LICENSE.envoy +0 -207
- package/build.js +0 -313
- package/dist/lib/client.d.ts +0 -78
- package/dist/lib/client.d.ts.map +0 -1
- package/dist/lib/dom.d.ts +0 -87
- package/dist/lib/dom.d.ts.map +0 -1
- package/dist/lib/error.d.ts +0 -8
- package/dist/lib/error.d.ts.map +0 -1
- package/dist/lib/event-loop.d.ts +0 -33
- package/dist/lib/event-loop.d.ts.map +0 -1
- package/dist/lib/index.d.ts +0 -79
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/native.d.ts +0 -2
- package/dist/lib/native.d.ts.map +0 -1
- package/dist/lib/server.d.ts +0 -92
- package/dist/lib/server.d.ts.map +0 -1
- package/dist/lib/session.d.ts +0 -298
- package/dist/lib/session.d.ts.map +0 -1
- package/dist/lib/stream.d.ts +0 -135
- package/dist/lib/stream.d.ts.map +0 -1
- package/dist/lib/transport.d.ts +0 -34
- package/dist/lib/transport.d.ts.map +0 -1
- package/dist/lib/types.d.ts +0 -212
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -11
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/webtransport.d.ts +0 -47
- package/dist/lib/webtransport.d.ts.map +0 -1
- package/dist/test/bidirectional-streams.spec.d.ts +0 -5
- package/dist/test/bidirectional-streams.spec.d.ts.map +0 -1
- package/dist/test/datagrams.spec.d.ts +0 -5
- package/dist/test/datagrams.spec.d.ts.map +0 -1
- package/dist/test/event-loop.node.d.ts +0 -2
- package/dist/test/event-loop.node.d.ts.map +0 -1
- package/dist/test/fixtures/certificate.d.ts +0 -21
- package/dist/test/fixtures/certificate.d.ts.map +0 -1
- package/dist/test/fixtures/chai.d.ts +0 -2
- package/dist/test/fixtures/chai.d.ts.map +0 -1
- package/dist/test/fixtures/known-bytes.d.ts +0 -6
- package/dist/test/fixtures/known-bytes.d.ts.map +0 -1
- package/dist/test/fixtures/p-timeout.d.ts +0 -8
- package/dist/test/fixtures/p-timeout.d.ts.map +0 -1
- package/dist/test/fixtures/read-cert-hash.d.ts +0 -6
- package/dist/test/fixtures/read-cert-hash.d.ts.map +0 -1
- package/dist/test/fixtures/read-stream.d.ts +0 -19
- package/dist/test/fixtures/read-stream.d.ts.map +0 -1
- package/dist/test/fixtures/reader-value.d.ts +0 -22
- package/dist/test/fixtures/reader-value.d.ts.map +0 -1
- package/dist/test/fixtures/server.d.ts +0 -5
- package/dist/test/fixtures/server.d.ts.map +0 -1
- package/dist/test/fixtures/webtransport.browser.d.ts +0 -3
- package/dist/test/fixtures/webtransport.browser.d.ts.map +0 -1
- package/dist/test/fixtures/webtransport.d.ts +0 -3
- package/dist/test/fixtures/webtransport.d.ts.map +0 -1
- package/dist/test/fixtures/write-stream.d.ts +0 -10
- package/dist/test/fixtures/write-stream.d.ts.map +0 -1
- package/dist/test/index.d.ts +0 -2
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/session.spec.d.ts +0 -5
- package/dist/test/session.spec.d.ts.map +0 -1
- package/dist/test/unidirectional-streams.spec.d.ts +0 -2
- package/dist/test/unidirectional-streams.spec.d.ts.map +0 -1
- package/failslogolicensereadme.txt +0 -4
- package/lib/event-loop.js +0 -88
- package/lib/native.js +0 -28
- package/lib/transport.js +0 -82
- package/platform/icufix/fakedata.cpp +0 -8
- package/platform/quiche/quic/core/io/socket_win.inc +0 -3
- package/platform/quiche_platform_impl/quiche_bug_tracker_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_client_stats_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_command_line_flags_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_containers_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_event_loop_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_export_impl.h +0 -6
- package/platform/quiche_platform_impl/quiche_flag_utils_impl.h +0 -11
- package/platform/quiche_platform_impl/quiche_flags_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_iovec_impl.h +0 -10
- package/platform/quiche_platform_impl/quiche_logging_impl.h +0 -21
- package/platform/quiche_platform_impl/quiche_mem_slice_impl.h +0 -2
- package/platform/quiche_platform_impl/quiche_mutex_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_prefetch_impl.h +0 -11
- package/platform/quiche_platform_impl/quiche_reference_counted_impl.h +0 -16
- package/platform/quiche_platform_impl/quiche_server_stats_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_stack_trace_impl.h +0 -12
- package/platform/quiche_platform_impl/quiche_stream_buffer_allocator_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_testvalue_impl.h +0 -1
- package/platform/quiche_platform_impl/quiche_thread_local_impl.h +0 -6
- package/platform/quiche_platform_impl/quiche_time_utils_impl.h +0 -13
- package/platform/quiche_platform_impl/quiche_udp_socket_platform_impl.h +0 -39
- package/src/http3backendresponse.cc +0 -36
- package/src/http3backendresponse.h +0 -109
- package/src/http3client.cc +0 -1529
- package/src/http3client.h +0 -557
- package/src/http3clientsession.cc +0 -65
- package/src/http3clientsession.h +0 -60
- package/src/http3clientstream.cc +0 -52
- package/src/http3clientstream.h +0 -42
- package/src/http3dispatcher.cc +0 -62
- package/src/http3dispatcher.h +0 -57
- package/src/http3eventloop.cc +0 -1107
- package/src/http3eventloop.h +0 -316
- package/src/http3server.cc +0 -514
- package/src/http3server.h +0 -151
- package/src/http3serverbackend.cc +0 -105
- package/src/http3serverbackend.h +0 -98
- package/src/http3serversession.cc +0 -123
- package/src/http3serversession.h +0 -95
- package/src/http3serverstream.cc +0 -463
- package/src/http3serverstream.h +0 -114
- package/src/http3sessioncache.cc +0 -85
- package/src/http3sessioncache.h +0 -59
- package/src/http3wtsessionvisitor.cc +0 -46
- package/src/http3wtsessionvisitor.h +0 -397
- package/src/http3wtstreamvisitor.cc +0 -155
- package/src/http3wtstreamvisitor.h +0 -404
- package/test/event-loop.node.js +0 -24
- package/tsconfig.json +0 -39
package/dist/lib/stream.d.ts
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* WebTransport stream events
|
|
4
|
-
* @typedef {import('./types').WebTransportStreamEventHandler} WebTransportStreamEventHandler
|
|
5
|
-
* @typedef {import('./types').StreamRecvSignalEvent} StreamRecvSignalEvent
|
|
6
|
-
* @typedef {import('./types').StreamReadEvent} StreamReadEvent
|
|
7
|
-
* @typedef {import('./types').StreamWriteEvent} StreamWriteEvent
|
|
8
|
-
* @typedef {import('./types').StreamResetEvent} StreamResetEvent
|
|
9
|
-
* @typedef {import('./types').StreamNetworkFinishEvent} StreamNetworkFinishEvent
|
|
10
|
-
*
|
|
11
|
-
* @typedef {import('./types').NativeHttp3WTStream} NativeHttp3WTStream
|
|
12
|
-
*
|
|
13
|
-
* @typedef {import('./dom').WebTransportReceiveStream} WebTransportReceiveStream
|
|
14
|
-
* @typedef {import('./dom').WebTransportSendStream} WebTransportSendStream
|
|
15
|
-
*
|
|
16
|
-
* @typedef {import('./session').Http3WTSession} Http3WTSession
|
|
17
|
-
*
|
|
18
|
-
* @typedef {import('stream/web').WritableStreamDefaultController} WritableStreamDefaultController
|
|
19
|
-
*/
|
|
20
|
-
export class Http3WTStream {
|
|
21
|
-
/**
|
|
22
|
-
* @param {StreamRecvSignalEvent | StreamReadEvent | StreamWriteEvent | StreamResetEvent | StreamNetworkFinishEvent} args
|
|
23
|
-
*/
|
|
24
|
-
static callback(args: StreamRecvSignalEvent | StreamReadEvent | StreamWriteEvent | StreamResetEvent | StreamNetworkFinishEvent): void;
|
|
25
|
-
/**
|
|
26
|
-
* @param {object} args
|
|
27
|
-
* @param {NativeHttp3WTStream} args.object
|
|
28
|
-
* @param {Http3WTSession} args.parentobj
|
|
29
|
-
* @param {object} args.transport
|
|
30
|
-
* @param {boolean} args.bidirectional
|
|
31
|
-
* @param {boolean} args.incoming
|
|
32
|
-
*/
|
|
33
|
-
constructor(args: {
|
|
34
|
-
object: NativeHttp3WTStream;
|
|
35
|
-
parentobj: Http3WTSession;
|
|
36
|
-
transport: object;
|
|
37
|
-
bidirectional: boolean;
|
|
38
|
-
incoming: boolean;
|
|
39
|
-
});
|
|
40
|
-
objint: import("./types").NativeHttp3WTStream;
|
|
41
|
-
parentobj: import("./session").Http3WTSession;
|
|
42
|
-
transport: object;
|
|
43
|
-
bidirectional: boolean;
|
|
44
|
-
incoming: boolean;
|
|
45
|
-
closed: boolean;
|
|
46
|
-
/** @type {Promise<void> | null} */
|
|
47
|
-
pendingoperation: Promise<void> | null;
|
|
48
|
-
pendingres: (() => void) | null;
|
|
49
|
-
/** @type {WebTransportReceiveStream} */
|
|
50
|
-
readable: WebTransportReceiveStream;
|
|
51
|
-
/** @type {WebTransportSendStream} */
|
|
52
|
-
writable: WebTransportSendStream;
|
|
53
|
-
/** @type {Promise<void> | null} */
|
|
54
|
-
pendingoperationRead: Promise<void> | null;
|
|
55
|
-
pendingresRead: ((value: void | PromiseLike<void>) => void) | null;
|
|
56
|
-
/** @type {Number} */
|
|
57
|
-
incomingbufferfilled: number;
|
|
58
|
-
/** @type {Number} */
|
|
59
|
-
incomingbufferreadpos: number;
|
|
60
|
-
readableController: import("stream/web").ReadableByteStreamController;
|
|
61
|
-
cancelres: (() => void) | null;
|
|
62
|
-
readableclosed: boolean;
|
|
63
|
-
writableController: import("stream/web").WritableStreamDefaultController;
|
|
64
|
-
abortres: (() => void) | null;
|
|
65
|
-
drainBuffer(): void;
|
|
66
|
-
/**
|
|
67
|
-
* @param {import('./types').StreamRecvSignalEvent} args
|
|
68
|
-
* @returns {void}
|
|
69
|
-
*/
|
|
70
|
-
onStreamRecvSignal(args: import('./types').StreamRecvSignalEvent): void;
|
|
71
|
-
writableclosed: boolean | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* @param {StreamReadEvent} args
|
|
74
|
-
* @returns {void}
|
|
75
|
-
*/
|
|
76
|
-
onStreamRead(args: StreamReadEvent): void;
|
|
77
|
-
/**
|
|
78
|
-
* @param {StreamWriteEvent} args
|
|
79
|
-
*/
|
|
80
|
-
onStreamWrite(args: StreamWriteEvent): void;
|
|
81
|
-
/**
|
|
82
|
-
* @param {StreamResetEvent} args
|
|
83
|
-
*/
|
|
84
|
-
onStreamReset(args: StreamResetEvent): void;
|
|
85
|
-
/**
|
|
86
|
-
* @param {StreamNetworkFinishEvent} args
|
|
87
|
-
*/
|
|
88
|
-
onStreamNetworkFinish(args: StreamNetworkFinishEvent): void;
|
|
89
|
-
stopSendingRecv: boolean | undefined;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* WebTransport stream events
|
|
93
|
-
*/
|
|
94
|
-
export type WebTransportStreamEventHandler = import('./types').WebTransportStreamEventHandler;
|
|
95
|
-
/**
|
|
96
|
-
* WebTransport stream events
|
|
97
|
-
*/
|
|
98
|
-
export type StreamRecvSignalEvent = import('./types').StreamRecvSignalEvent;
|
|
99
|
-
/**
|
|
100
|
-
* WebTransport stream events
|
|
101
|
-
*/
|
|
102
|
-
export type StreamReadEvent = import('./types').StreamReadEvent;
|
|
103
|
-
/**
|
|
104
|
-
* WebTransport stream events
|
|
105
|
-
*/
|
|
106
|
-
export type StreamWriteEvent = import('./types').StreamWriteEvent;
|
|
107
|
-
/**
|
|
108
|
-
* WebTransport stream events
|
|
109
|
-
*/
|
|
110
|
-
export type StreamResetEvent = import('./types').StreamResetEvent;
|
|
111
|
-
/**
|
|
112
|
-
* WebTransport stream events
|
|
113
|
-
*/
|
|
114
|
-
export type StreamNetworkFinishEvent = import('./types').StreamNetworkFinishEvent;
|
|
115
|
-
/**
|
|
116
|
-
* WebTransport stream events
|
|
117
|
-
*/
|
|
118
|
-
export type NativeHttp3WTStream = import('./types').NativeHttp3WTStream;
|
|
119
|
-
/**
|
|
120
|
-
* WebTransport stream events
|
|
121
|
-
*/
|
|
122
|
-
export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
|
|
123
|
-
/**
|
|
124
|
-
* WebTransport stream events
|
|
125
|
-
*/
|
|
126
|
-
export type WebTransportSendStream = import('./dom').WebTransportSendStream;
|
|
127
|
-
/**
|
|
128
|
-
* WebTransport stream events
|
|
129
|
-
*/
|
|
130
|
-
export type Http3WTSession = import('./session').Http3WTSession;
|
|
131
|
-
/**
|
|
132
|
-
* WebTransport stream events
|
|
133
|
-
*/
|
|
134
|
-
export type WritableStreamDefaultController = import('stream/web').WritableStreamDefaultController;
|
|
135
|
-
//# sourceMappingURL=stream.d.ts.map
|
package/dist/lib/stream.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../lib/stream.js"],"names":[],"mappings":";AAMA;;;;;;;;;;;;;;;;;GAiBG;AAEH;IAkaE;;OAEG;IACH,sBAFW,qBAAqB,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,wBAAwB,QAsClH;IAxcD;;;;;;;OAOG;IACH;QANqC,MAAM,EAAhC,mBAAmB;QACE,SAAS,EAA9B,cAAc;QACD,SAAS,EAAtB,MAAM;QACQ,aAAa,EAA3B,OAAO;QACO,QAAQ,EAAtB,OAAO;OAyKjB;IAtKC,8CAAyB;IAEzB,8CAA+B;IAC/B,kBAA+B;IAC/B,uBAAuC;IACvC,kBAA6B;IAC7B,gBAAmB;IAEnB,mCAAmC;IACnC,kBADW,QAAQ,IAAI,CAAC,GAAG,IAAI,CACH;IAC5B,mBAwJkB,IAAI,SAxJA;IAEtB,wCAAwC;IACxC,UADW,yBAAyB,CACvB;IACb,qCAAqC;IACrC,UADW,sBAAsB,CACpB;IAEb,mCAAmC;IACnC,sBADW,QAAQ,IAAI,CAAC,GAAG,IAAI,CACC;IAChC,mEAA0B;IAGxB,qBAAqB;IACrB,6BAA6B;IAC7B,qBAAqB;IACrB,8BAA8B;IAUxB,sEAAoC;IAwBlC,kBAqGQ,IAAI,SArGY;IAQ1B,wBAA0B;IAyB1B,yEAAoC;IAgDlC,iBAwBQ,IAAI,SAxBW;IA4BnC,oBAsDC;IAED;;;OAGG;IACH,yBAHW,OAAO,SAAS,EAAE,qBAAqB,GACrC,IAAI,CAiEhB;IA5BO,oCAA0B;IA8BlC;;;OAGG;IACH,mBAHW,eAAe,GACb,IAAI,CAsChB;IAED;;OAEG;IACH,oBAFW,gBAAgB,QAY1B;IAED;;OAEG;IACH,oBAFW,gBAAgB,QAe1B;IAED;;OAEG;IACH,4BAFW,wBAAwB,QAqClC;IAzBK,qCAA2B;CAmElC;;;;6CA3dY,OAAO,SAAS,EAAE,8BAA8B;;;;oCAChD,OAAO,SAAS,EAAE,qBAAqB;;;;8BACvC,OAAO,SAAS,EAAE,eAAe;;;;+BACjC,OAAO,SAAS,EAAE,gBAAgB;;;;+BAClC,OAAO,SAAS,EAAE,gBAAgB;;;;uCAClC,OAAO,SAAS,EAAE,wBAAwB;;;;kCAE1C,OAAO,SAAS,EAAE,mBAAmB;;;;wCAErC,OAAO,OAAO,EAAE,yBAAyB;;;;qCACzC,OAAO,OAAO,EAAE,sBAAsB;;;;6BAEtC,OAAO,WAAW,EAAE,cAAc;;;;8CAElC,OAAO,YAAY,EAAE,+BAA+B"}
|
package/dist/lib/transport.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {import('./types').Http3WebTransportInit} Http3WebTransportInit
|
|
3
|
-
*/
|
|
4
|
-
export class Http3WebTransport {
|
|
5
|
-
/**
|
|
6
|
-
* @typedef {object} TransportCallbackEvent
|
|
7
|
-
* @property {{ jsobj: { customCallback: (args: any) => void }}} object
|
|
8
|
-
* @property {string} purpose
|
|
9
|
-
*
|
|
10
|
-
* @param {TransportCallbackEvent} args
|
|
11
|
-
*/
|
|
12
|
-
static transportCallback(args: {
|
|
13
|
-
object: {
|
|
14
|
-
jsobj: {
|
|
15
|
-
customCallback: (args: any) => void;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
purpose: string;
|
|
19
|
-
}): void;
|
|
20
|
-
/**
|
|
21
|
-
* @param {Http3WebTransportInit} args
|
|
22
|
-
* @param {'server' | 'client'} purpose
|
|
23
|
-
*/
|
|
24
|
-
constructor(args: Http3WebTransportInit, purpose: 'server' | 'client');
|
|
25
|
-
/** @type {Http3WebTransportInit | undefined} */
|
|
26
|
-
args: Http3WebTransportInit | undefined;
|
|
27
|
-
/** @type {'server' | 'client' | undefined} */
|
|
28
|
-
purpose: 'server' | 'client' | undefined;
|
|
29
|
-
sessions: {};
|
|
30
|
-
createTransportInt(): void;
|
|
31
|
-
transportInt: any;
|
|
32
|
-
}
|
|
33
|
-
export type Http3WebTransportInit = import('./types').Http3WebTransportInit;
|
|
34
|
-
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../lib/transport.js"],"names":[],"mappings":"AAOA;;GAEG;AAEH;IAiDE;;;;;;OAMG;IACH;;;uCALgD,GAAG,KAAK,IAAI;;;iBAC9C,MAAM;aAiBnB;IApED;;;OAGG;IACH,kBAHW,qBAAqB,WACrB,QAAQ,GAAG,QAAQ,EAQ7B;IALC,gDAAgD;IAChD,MADW,qBAAqB,GAAG,SAAS,CAC5B;IAChB,8CAA8C;IAC9C,SADW,QAAQ,GAAG,QAAQ,GAAG,SAAS,CACpB;IACtB,aAAkB;IAGpB,2BAkCC;IAtBK,kBAGC;CA0CR;oCAzEY,OAAO,SAAS,EAAE,qBAAqB"}
|
package/dist/lib/types.d.ts
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import type { WebTransport, WebTransportOptions } from './dom';
|
|
2
|
-
/**
|
|
3
|
-
* Native Http3WTSession counterpart
|
|
4
|
-
*/
|
|
5
|
-
export interface NativeHttp3WTSession {
|
|
6
|
-
jsobj: WebTransportSessionEventHandler;
|
|
7
|
-
writeDatagram: (chunk: Uint8Array) => void;
|
|
8
|
-
orderUnidiStream: () => void;
|
|
9
|
-
orderBidiStream: () => void;
|
|
10
|
-
orderSessionStats: () => void;
|
|
11
|
-
orderDatagramStats: () => void;
|
|
12
|
-
notifySessionDraining(): () => void;
|
|
13
|
-
close: (arg: {
|
|
14
|
-
code: number;
|
|
15
|
-
reason: string;
|
|
16
|
-
}) => void;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Native Http3WTStream counterpart
|
|
20
|
-
*/
|
|
21
|
-
export interface NativeHttp3WTStream {
|
|
22
|
-
updateReadPos(bytesread: Number, pos: Number): unknown;
|
|
23
|
-
jsobj: WebTransportStreamEventHandler;
|
|
24
|
-
readbuffer: Uint8Array | undefined;
|
|
25
|
-
startReading: () => void;
|
|
26
|
-
stopReading: () => void;
|
|
27
|
-
stopSending: (code: number) => void;
|
|
28
|
-
resetStream: (code: number) => void;
|
|
29
|
-
writeChunk: (buf: Uint8Array) => void;
|
|
30
|
-
streamFinal: () => void;
|
|
31
|
-
}
|
|
32
|
-
export declare type Purpose = 'StreamRecvSignal' | 'StreamRead' | 'StreamWrite' | 'StreamReset' | 'StreamNetworkFinish';
|
|
33
|
-
export declare type NetTask = 'stopSending' | 'resetStream' | 'streamFinal';
|
|
34
|
-
export interface StreamRecvSignalEvent {
|
|
35
|
-
object: NativeHttp3WTStream;
|
|
36
|
-
purpose: 'StreamRecvSignal';
|
|
37
|
-
code: number;
|
|
38
|
-
nettask: NetTask;
|
|
39
|
-
}
|
|
40
|
-
export interface StreamReadEvent {
|
|
41
|
-
object: NativeHttp3WTStream;
|
|
42
|
-
purpose: 'StreamRead';
|
|
43
|
-
buffergrow?: number;
|
|
44
|
-
fin?: boolean;
|
|
45
|
-
success?: boolean;
|
|
46
|
-
}
|
|
47
|
-
export interface StreamWriteEvent {
|
|
48
|
-
object: NativeHttp3WTStream;
|
|
49
|
-
purpose: 'StreamWrite';
|
|
50
|
-
}
|
|
51
|
-
export interface StreamResetEvent {
|
|
52
|
-
object: NativeHttp3WTStream;
|
|
53
|
-
purpose: 'StreamReset';
|
|
54
|
-
}
|
|
55
|
-
export interface StreamNetworkFinishEvent {
|
|
56
|
-
object: NativeHttp3WTStream;
|
|
57
|
-
purpose: 'StreamNetworkFinish';
|
|
58
|
-
nettask: NetTask;
|
|
59
|
-
}
|
|
60
|
-
export interface WebTransportStreamEventHandler {
|
|
61
|
-
onStreamRecvSignal: (evt: StreamRecvSignalEvent) => void;
|
|
62
|
-
onStreamRead: (evt: StreamReadEvent) => void;
|
|
63
|
-
onStreamWrite: (evt: StreamWriteEvent) => void;
|
|
64
|
-
onStreamReset: (evt: StreamResetEvent) => void;
|
|
65
|
-
onStreamNetworkFinish: (evt: StreamNetworkFinishEvent) => void;
|
|
66
|
-
}
|
|
67
|
-
export interface SessionReadyEvent {
|
|
68
|
-
object: NativeHttp3WTSession;
|
|
69
|
-
purpose: 'SessionReady';
|
|
70
|
-
}
|
|
71
|
-
export interface SessionCloseEvent {
|
|
72
|
-
object: NativeHttp3WTSession;
|
|
73
|
-
purpose: 'SessionClose';
|
|
74
|
-
errorcode: number;
|
|
75
|
-
error: string;
|
|
76
|
-
}
|
|
77
|
-
export interface SessionStatsEvent {
|
|
78
|
-
object: NativeHttp3WTSession;
|
|
79
|
-
purpose: 'SessionStats';
|
|
80
|
-
timestamp: number;
|
|
81
|
-
expiredOutgoing: bigint;
|
|
82
|
-
lostOutgoing: bigint;
|
|
83
|
-
minRtt: number;
|
|
84
|
-
smoothedRtt: number;
|
|
85
|
-
rttVariation: number;
|
|
86
|
-
estimatedSendRateBps: bigint;
|
|
87
|
-
}
|
|
88
|
-
export interface DatagramStatsEvent {
|
|
89
|
-
object: NativeHttp3WTSession;
|
|
90
|
-
purpose: 'DatagramStats';
|
|
91
|
-
timestamp: number;
|
|
92
|
-
expiredOutgoing: bigint;
|
|
93
|
-
lostOutgoing: bigint;
|
|
94
|
-
}
|
|
95
|
-
export interface DatagramReceivedEvent {
|
|
96
|
-
object: NativeHttp3WTSession;
|
|
97
|
-
purpose: 'DatagramReceived';
|
|
98
|
-
datagram: Uint8Array;
|
|
99
|
-
}
|
|
100
|
-
export interface DatagramSendEvent {
|
|
101
|
-
object: NativeHttp3WTSession;
|
|
102
|
-
purpose: 'DatagramSend';
|
|
103
|
-
}
|
|
104
|
-
export interface GoawayReceivedEvent {
|
|
105
|
-
object: NativeHttp3WTSession;
|
|
106
|
-
purpose: 'GoawayReceived';
|
|
107
|
-
}
|
|
108
|
-
export interface NewStreamEvent {
|
|
109
|
-
object: NativeHttp3WTSession;
|
|
110
|
-
purpose: 'Http3WTStreamVisitor';
|
|
111
|
-
stream: NativeHttp3WTStream;
|
|
112
|
-
transport: object;
|
|
113
|
-
bidirectional: boolean;
|
|
114
|
-
incoming: boolean;
|
|
115
|
-
}
|
|
116
|
-
export interface WebTransportSessionEventHandler {
|
|
117
|
-
onReady: (evt: SessionReadyEvent) => void;
|
|
118
|
-
onClose: (evt: SessionCloseEvent) => void;
|
|
119
|
-
onDatagramReceived: (evt: DatagramReceivedEvent) => void;
|
|
120
|
-
onDatagramSend: (evt: DatagramSendEvent) => void;
|
|
121
|
-
onGoAwayReceived: (evt: GoawayReceivedEvent) => void;
|
|
122
|
-
onSessionStats: (evt: SessionStatsEvent) => void;
|
|
123
|
-
onDatagramStats: (evt: DatagramStatsEvent) => void;
|
|
124
|
-
onStream: (evt: NewStreamEvent) => void;
|
|
125
|
-
closeHook?: (() => void) | null;
|
|
126
|
-
}
|
|
127
|
-
export interface ClientConnectedEvent {
|
|
128
|
-
purpose: 'ClientConnected';
|
|
129
|
-
success: boolean;
|
|
130
|
-
}
|
|
131
|
-
export interface ClientWebtransportSupportEvent {
|
|
132
|
-
purpose: 'ClientWebtransportSupport';
|
|
133
|
-
}
|
|
134
|
-
export interface Http3WTSessionVisitorEvent {
|
|
135
|
-
purpose: 'Http3WTSessionVisitor';
|
|
136
|
-
session: NativeHttp3WTSession;
|
|
137
|
-
}
|
|
138
|
-
export interface Http3ClientEventHandler {
|
|
139
|
-
onClientConnected: (evt: ClientConnectedEvent) => void;
|
|
140
|
-
onClientWebTransportSupport: (evt: ClientWebtransportSupportEvent) => void;
|
|
141
|
-
onHttp3WTSessionVisitor: (evt: Http3WTSessionVisitorEvent) => void;
|
|
142
|
-
}
|
|
143
|
-
export interface Http3WTServerSessionVisitorEvent extends Http3WTSessionVisitorEvent {
|
|
144
|
-
path: string;
|
|
145
|
-
object: any;
|
|
146
|
-
header?: any;
|
|
147
|
-
}
|
|
148
|
-
export interface ServerSessionRequestEvent {
|
|
149
|
-
purpose: 'SessionRequest';
|
|
150
|
-
header: Object;
|
|
151
|
-
promise: any;
|
|
152
|
-
session: any;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* The Http3 server is listening on the specified port
|
|
156
|
-
*/
|
|
157
|
-
export interface Http3ServerListeningEvent {
|
|
158
|
-
purpose: 'Http3ServerListening';
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* The Http3 server has stopped listening on the specified port
|
|
162
|
-
*/
|
|
163
|
-
export interface ServerStatusEvent {
|
|
164
|
-
port: number | null;
|
|
165
|
-
host: string | null;
|
|
166
|
-
purpose: 'ServerStatus';
|
|
167
|
-
status: 'error' | 'listening' | 'close';
|
|
168
|
-
}
|
|
169
|
-
export interface Http3ServerEventHandler {
|
|
170
|
-
onHttp3WTSessionVisitor: (evt: Http3WTServerSessionVisitorEvent) => void;
|
|
171
|
-
onServerError: () => void;
|
|
172
|
-
onServerListening: () => void;
|
|
173
|
-
onServerClose: () => void;
|
|
174
|
-
onServerStatus: (evt: ServerStatusEvent) => void;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* A defered promise with the value T
|
|
178
|
-
*/
|
|
179
|
-
export interface Deferred<T = unknown> {
|
|
180
|
-
promise: Promise<T>;
|
|
181
|
-
resolve: (value?: T) => void;
|
|
182
|
-
reject: (reason?: any) => void;
|
|
183
|
-
}
|
|
184
|
-
export declare type WebTransportSessionState = 'connecting' | 'connected' | 'draining' | 'closed' | 'failed';
|
|
185
|
-
export interface WebTransportSession extends WebTransport {
|
|
186
|
-
state: WebTransportSessionState;
|
|
187
|
-
}
|
|
188
|
-
export interface Http3WebTransportInit extends WebTransportOptions {
|
|
189
|
-
host: string;
|
|
190
|
-
port: string | number;
|
|
191
|
-
quicheLogVerbose?: number;
|
|
192
|
-
}
|
|
193
|
-
export interface Http3ServerInit extends Http3WebTransportInit {
|
|
194
|
-
port: string | number;
|
|
195
|
-
host: string;
|
|
196
|
-
secret: string;
|
|
197
|
-
cert: string;
|
|
198
|
-
privKey: string;
|
|
199
|
-
maxConnections?: number;
|
|
200
|
-
initialStreamFlowControlWindow?: number;
|
|
201
|
-
initialSessionFlowControlWindow?: number;
|
|
202
|
-
}
|
|
203
|
-
export interface Http3ClientInit extends Http3WebTransportInit {
|
|
204
|
-
forceIpv6?: boolean;
|
|
205
|
-
localPort?: number;
|
|
206
|
-
}
|
|
207
|
-
export interface Logger {
|
|
208
|
-
(formatter: any, ...args: any[]): void;
|
|
209
|
-
error: (formatter: any, ...args: any[]) => void;
|
|
210
|
-
trace: (formatter: any, ...args: any[]) => void;
|
|
211
|
-
}
|
|
212
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/lib/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAE9D;;GAEG;AACF,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,+BAA+B,CAAA;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IAC1C,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,qBAAqB,IAAI,MAAM,IAAI,CAAA;IACnC,KAAK,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAA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S,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;CAChD"}
|
package/dist/lib/utils.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @template {unknown} T
|
|
3
|
-
* @returns {import('./types').Deferred<T>}
|
|
4
|
-
*/
|
|
5
|
-
export function defer<T extends unknown>(): import("./types").Deferred<T>;
|
|
6
|
-
/**
|
|
7
|
-
* @param {string} name
|
|
8
|
-
* @returns {import('./types').Logger}
|
|
9
|
-
*/
|
|
10
|
-
export function logger(name: string): import('./types').Logger;
|
|
11
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,0EAiBC;AAED;;;GAGG;AACH,6BAHW,MAAM,GACJ,OAAO,SAAS,EAAE,MAAM,CAOpC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {import('./dom').WebTransportCloseInfo} WebTransportCloseInfo
|
|
4
|
-
* @typedef {import('./dom').WebTransportBidirectionalStream} WebTransportBidirectionalStream
|
|
5
|
-
* @typedef {import('./dom').WebTransportReceiveStream} WebTransportReceiveStream
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @template T
|
|
9
|
-
* @typedef {import('node:stream/web').ReadableStream<T>} ReadableStream<T>
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {import('./dom').WebTransport} WebTransportInterface
|
|
13
|
-
*
|
|
14
|
-
* @implements {WebTransportInterface}
|
|
15
|
-
*/
|
|
16
|
-
export class WebTransport implements WebTransportInterface {
|
|
17
|
-
/**
|
|
18
|
-
* @param {string} url
|
|
19
|
-
* @param {import('./dom').WebTransportOptions} [args]
|
|
20
|
-
*/
|
|
21
|
-
constructor(url: string, args?: import("./dom").WebTransportOptions | undefined);
|
|
22
|
-
ready: Promise<void>;
|
|
23
|
-
closed: Promise<import("./dom").WebTransportCloseInfo>;
|
|
24
|
-
draining: Promise<undefined>;
|
|
25
|
-
datagrams: import("./dom").WebTransportDatagramDuplexStream;
|
|
26
|
-
/** @type {ReadableStream<WebTransportBidirectionalStream>} */
|
|
27
|
-
incomingBidirectionalStreams: ReadableStream<WebTransportBidirectionalStream>;
|
|
28
|
-
incomingUnidirectionalStreams: import("stream/web").ReadableStream<import("./dom").WebTransportReceiveStream>;
|
|
29
|
-
get reliability(): import("./dom").WebTransportReliabilityMode;
|
|
30
|
-
get congestionControl(): import("./dom").WebTransportCongestionControl;
|
|
31
|
-
getStats(): Promise<any>;
|
|
32
|
-
/**
|
|
33
|
-
* @param {WebTransportCloseInfo} [closeinfo]
|
|
34
|
-
*/
|
|
35
|
-
close(closeinfo?: import("./dom").WebTransportCloseInfo | undefined): void;
|
|
36
|
-
createBidirectionalStream(): Promise<import("./dom").WebTransportBidirectionalStream>;
|
|
37
|
-
createUnidirectionalStream(): Promise<import("./dom").WebTransportSendStream>;
|
|
38
|
-
}
|
|
39
|
-
export type WebTransportCloseInfo = import('./dom').WebTransportCloseInfo;
|
|
40
|
-
export type WebTransportBidirectionalStream = import('./dom').WebTransportBidirectionalStream;
|
|
41
|
-
export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
|
|
42
|
-
/**
|
|
43
|
-
* <T>
|
|
44
|
-
*/
|
|
45
|
-
export type ReadableStream<T> = import('node:stream/web').ReadableStream<T>;
|
|
46
|
-
export type WebTransportInterface = import('./dom').WebTransport;
|
|
47
|
-
//# sourceMappingURL=webtransport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webtransport.d.ts","sourceRoot":"","sources":["../../lib/webtransport.js"],"names":[],"mappings":";AAMA;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH;IACE;;;OAGG;IACH,iBAHW,MAAM,0DA6ChB;IAtBC,qBAA6B;IAC7B,uDAA+B;IAC/B,6BAAmC;IAEnC,4DAAqC;IAErC,8DAA8D;IAC9D,8BADW,eAAe,+BAA+B,CAAC,CACiB;IAE3E,8GAC0C;IAc5C,+DAQC;IAED,uEAQC;IAED,yBAQC;IAED;;OAEG;IACH,2EASC;IAED,sFASC;IAED,8EASC;CACF;oCAjIY,OAAO,OAAO,EAAE,qBAAqB;8CACrC,OAAO,OAAO,EAAE,+BAA+B;wCAC/C,OAAO,OAAO,EAAE,yBAAyB;;;;gCAKzC,OAAO,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC;oCAI3C,OAAO,OAAO,EAAE,YAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bidirectional-streams.spec.d.ts","sourceRoot":"","sources":["../../test/bidirectional-streams.spec.js"],"names":[],"mappings":";;;0BAaa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datagrams.spec.d.ts","sourceRoot":"","sources":["../../test/datagrams.spec.js"],"names":[],"mappings":";;;0BAUa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-loop.node.d.ts","sourceRoot":"","sources":["../../test/event-loop.node.js"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {object} Certificate
|
|
3
|
-
* @property {string} public
|
|
4
|
-
* @property {string} private
|
|
5
|
-
* @property {string} cert
|
|
6
|
-
* @property {Uint8Array} hash
|
|
7
|
-
* @property {string} fingerprint
|
|
8
|
-
*
|
|
9
|
-
* @param {*} attrs
|
|
10
|
-
* @param {*} options
|
|
11
|
-
* @returns {Promise<Certificate | null>}
|
|
12
|
-
*/
|
|
13
|
-
export function generateWebTransportCertificate(attrs: any, options: any): Promise<Certificate | null>;
|
|
14
|
-
export type Certificate = {
|
|
15
|
-
public: string;
|
|
16
|
-
private: string;
|
|
17
|
-
cert: string;
|
|
18
|
-
hash: Uint8Array;
|
|
19
|
-
fingerprint: string;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=certificate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../test/fixtures/certificate.js"],"names":[],"mappings":"AAgVA;;;;;;;;;;;GAWG;AACH,2EAFa,QAAQ,WAAW,GAAG,IAAI,CAAC,CA8GvC;;YAtHa,MAAM;aACN,MAAM;UACN,MAAM;UACN,UAAU;iBACV,MAAM"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chai.d.ts","sourceRoot":"","sources":["../../../test/fixtures/chai.js"],"names":[],"mappings":"AAOA,uCAAiC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"known-bytes.d.ts","sourceRoot":"","sources":["../../../test/fixtures/known-bytes.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,uCAMC;AAED,wCAGC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"p-timeout.d.ts","sourceRoot":"","sources":["../../../test/fixtures/p-timeout.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,0DAHW,MAAM,cAkBhB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-cert-hash.d.ts","sourceRoot":"","sources":["../../../test/fixtures/read-cert-hash.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,6DAFa,UAAU,CAItB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* @template T
|
|
4
|
-
* @typedef {import('node:stream/web').ReadableStream<T>} ReadableStream<T>
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Read a stream contents to the end and return it
|
|
8
|
-
*
|
|
9
|
-
* @template T
|
|
10
|
-
* @param {ReadableStream<T>} readable
|
|
11
|
-
* @param {number} [expected]
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
export function readStream<T>(readable: import("stream/web").ReadableStream<T>, expected?: number | undefined): Promise<T[]>;
|
|
15
|
-
/**
|
|
16
|
-
* <T>
|
|
17
|
-
*/
|
|
18
|
-
export type ReadableStream<T> = import('node:stream/web').ReadableStream<T>;
|
|
19
|
-
//# sourceMappingURL=read-stream.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-stream.d.ts","sourceRoot":"","sources":["../../../test/fixtures/read-stream.js"],"names":[],"mappings":";AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,6HA8BC;;;;gCAzCY,OAAO,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* @template T
|
|
4
|
-
* @typedef {import('node:stream/web').ReadableStream<T>} ReadableStream<T>
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @template T
|
|
8
|
-
* @param {ReadableStream<T>} readableStream
|
|
9
|
-
* @returns {Promise<T>}
|
|
10
|
-
*/
|
|
11
|
-
export function getReaderValue<T>(readableStream: import("stream/web").ReadableStream<T>): Promise<T>;
|
|
12
|
-
/**
|
|
13
|
-
* @template T
|
|
14
|
-
* @param {ReadableStream<T>} readableStream
|
|
15
|
-
* @returns {AsyncGenerator<T>}
|
|
16
|
-
*/
|
|
17
|
-
export function getReaderStream<T>(readableStream: import("stream/web").ReadableStream<T>): AsyncGenerator<T, any, any>;
|
|
18
|
-
/**
|
|
19
|
-
* <T>
|
|
20
|
-
*/
|
|
21
|
-
export type ReadableStream<T> = import('node:stream/web').ReadableStream<T>;
|
|
22
|
-
//# sourceMappingURL=reader-value.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reader-value.d.ts","sourceRoot":"","sources":["../../../test/fixtures/reader-value.js"],"names":[],"mappings":";AAAA;;;GAGG;AAEH;;;;GAIG;AACH,sGAkBC;AAED;;;;GAIG;AACH,wHAoBC;;;;gCArDY,OAAO,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../test/fixtures/server.js"],"names":[],"mappings":"AASA;;;GAkPC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webtransport.browser.d.ts","sourceRoot":"","sources":["../../../test/fixtures/webtransport.browser.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webtransport.d.ts","sourceRoot":"","sources":["../../../test/fixtures/webtransport.js"],"names":[],"mappings":""}
|