@fails-components/webtransport 1.0.4 → 1.0.8

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.
Files changed (121) hide show
  1. package/dist/main/lib/client.d.ts +95 -0
  2. package/dist/main/lib/client.d.ts.map +1 -0
  3. package/dist/main/lib/dom.d.ts +88 -0
  4. package/dist/main/lib/dom.d.ts.map +1 -0
  5. package/dist/main/lib/error.d.ts +8 -0
  6. package/dist/main/lib/error.d.ts.map +1 -0
  7. package/dist/main/lib/features.d.ts +2 -0
  8. package/dist/main/lib/features.d.ts.map +1 -0
  9. package/dist/main/lib/http2/browser/browser.d.ts +30 -0
  10. package/dist/main/lib/http2/browser/browser.d.ts.map +1 -0
  11. package/dist/main/lib/http2/browser/browserparser.d.ts +41 -0
  12. package/dist/main/lib/http2/browser/browserparser.d.ts.map +1 -0
  13. package/dist/main/lib/http2/flowcontroller.d.ts +70 -0
  14. package/dist/main/lib/http2/flowcontroller.d.ts.map +1 -0
  15. package/dist/main/lib/http2/node/capsuleparser.d.ts +24 -0
  16. package/dist/main/lib/http2/node/capsuleparser.d.ts.map +1 -0
  17. package/dist/main/lib/http2/node/client.d.ts +29 -0
  18. package/dist/main/lib/http2/node/client.d.ts.map +1 -0
  19. package/dist/main/lib/http2/node/index.d.ts +3 -0
  20. package/dist/main/lib/http2/node/index.d.ts.map +1 -0
  21. package/dist/main/lib/http2/node/server.d.ts +57 -0
  22. package/dist/main/lib/http2/node/server.d.ts.map +1 -0
  23. package/dist/main/lib/http2/node/websocketparser.d.ts +86 -0
  24. package/dist/main/lib/http2/node/websocketparser.d.ts.map +1 -0
  25. package/dist/main/lib/http2/parserbase.d.ts +84 -0
  26. package/dist/main/lib/http2/parserbase.d.ts.map +1 -0
  27. package/dist/main/lib/http2/parserbasehttp2.d.ts +31 -0
  28. package/dist/main/lib/http2/parserbasehttp2.d.ts.map +1 -0
  29. package/dist/main/lib/http2/session.d.ts +71 -0
  30. package/dist/main/lib/http2/session.d.ts.map +1 -0
  31. package/dist/main/lib/http2/stream.d.ts +112 -0
  32. package/dist/main/lib/http2/stream.d.ts.map +1 -0
  33. package/dist/main/lib/http2/websocketcommon.d.ts +2 -0
  34. package/dist/main/lib/http2/websocketcommon.d.ts.map +1 -0
  35. package/dist/main/lib/index.browser.d.ts +58 -0
  36. package/dist/main/lib/index.browser.d.ts.map +1 -0
  37. package/dist/main/lib/index.node.d.ts +59 -0
  38. package/dist/main/lib/index.node.d.ts.map +1 -0
  39. package/dist/main/lib/server.d.ts +102 -0
  40. package/dist/main/lib/server.d.ts.map +1 -0
  41. package/dist/main/lib/session.d.ts +296 -0
  42. package/dist/main/lib/session.d.ts.map +1 -0
  43. package/dist/main/lib/stream.d.ts +132 -0
  44. package/dist/main/lib/stream.d.ts.map +1 -0
  45. package/dist/main/lib/types.d.ts +277 -0
  46. package/dist/main/lib/types.d.ts.map +1 -0
  47. package/dist/main/lib/utils.d.ts +11 -0
  48. package/dist/main/lib/utils.d.ts.map +1 -0
  49. package/dist/main/lib/webstreams.browser.d.ts +5 -0
  50. package/dist/main/lib/webstreams.browser.d.ts.map +1 -0
  51. package/dist/main/lib/webstreams.d.ts +10 -0
  52. package/dist/main/lib/webstreams.d.ts.map +1 -0
  53. package/dist/main/lib/webtransport.browser.d.ts +60 -0
  54. package/dist/main/lib/webtransport.browser.d.ts.map +1 -0
  55. package/dist/main/lib/webtransport.node.d.ts +26 -0
  56. package/dist/main/lib/webtransport.node.d.ts.map +1 -0
  57. package/dist/main/lib/webtransportbase.d.ts +70 -0
  58. package/dist/main/lib/webtransportbase.d.ts.map +1 -0
  59. package/dist/main/test/bidirectional-streams.spec.d.ts +5 -0
  60. package/dist/main/test/bidirectional-streams.spec.d.ts.map +1 -0
  61. package/dist/main/test/datagrams.spec.d.ts +5 -0
  62. package/dist/main/test/datagrams.spec.d.ts.map +1 -0
  63. package/dist/main/test/fixtures/certificate.d.ts +21 -0
  64. package/dist/main/test/fixtures/certificate.d.ts.map +1 -0
  65. package/dist/main/test/fixtures/chai.d.ts +2 -0
  66. package/dist/main/test/fixtures/chai.d.ts.map +1 -0
  67. package/dist/main/test/fixtures/known-bytes.d.ts +8 -0
  68. package/dist/main/test/fixtures/known-bytes.d.ts.map +1 -0
  69. package/dist/main/test/fixtures/p-timeout.d.ts +8 -0
  70. package/dist/main/test/fixtures/p-timeout.d.ts.map +1 -0
  71. package/dist/main/test/fixtures/read-cert-hash.d.ts +6 -0
  72. package/dist/main/test/fixtures/read-cert-hash.d.ts.map +1 -0
  73. package/dist/main/test/fixtures/read-stream.d.ts +18 -0
  74. package/dist/main/test/fixtures/read-stream.d.ts.map +1 -0
  75. package/dist/main/test/fixtures/reader-value.d.ts +21 -0
  76. package/dist/main/test/fixtures/reader-value.d.ts.map +1 -0
  77. package/dist/main/test/fixtures/server.d.ts +5 -0
  78. package/dist/main/test/fixtures/server.d.ts.map +1 -0
  79. package/dist/main/test/fixtures/webtransport.browser.d.ts +4 -0
  80. package/dist/main/test/fixtures/webtransport.browser.d.ts.map +1 -0
  81. package/dist/main/test/fixtures/webtransport.d.ts +3 -0
  82. package/dist/main/test/fixtures/webtransport.d.ts.map +1 -0
  83. package/dist/main/test/fixtures/write-stream.d.ts +10 -0
  84. package/dist/main/test/fixtures/write-stream.d.ts.map +1 -0
  85. package/dist/main/test/index.d.ts +2 -0
  86. package/dist/main/test/index.d.ts.map +1 -0
  87. package/dist/main/test/session.spec.d.ts +5 -0
  88. package/dist/main/test/session.spec.d.ts.map +1 -0
  89. package/dist/main/test/unidirectional-streams.spec.d.ts +2 -0
  90. package/dist/main/test/unidirectional-streams.spec.d.ts.map +1 -0
  91. package/dist/main/tsconfig.tsbuildinfo +1 -0
  92. package/dist/transports/http3-quiche/lib/clientsocket.d.ts +19 -0
  93. package/dist/transports/http3-quiche/lib/clientsocket.d.ts.map +1 -0
  94. package/dist/transports/http3-quiche/lib/index.d.ts +11 -0
  95. package/dist/transports/http3-quiche/lib/index.d.ts.map +1 -0
  96. package/dist/transports/http3-quiche/lib/serversocket.d.ts +12 -0
  97. package/dist/transports/http3-quiche/lib/serversocket.d.ts.map +1 -0
  98. package/dist/transports/http3-quiche/lib/socket.d.ts +19 -0
  99. package/dist/transports/http3-quiche/lib/socket.d.ts.map +1 -0
  100. package/dist/transports/http3-quiche/lib/types.d.ts +21 -0
  101. package/dist/transports/http3-quiche/lib/types.d.ts.map +1 -0
  102. package/dist/transports/http3-quiche/lib/utils.d.ts +6 -0
  103. package/dist/transports/http3-quiche/lib/utils.d.ts.map +1 -0
  104. package/lib/features.js +16 -0
  105. package/lib/http2/browser/browser.js +52 -0
  106. package/lib/http2/node/capsuleparser.js +8 -0
  107. package/lib/http2/node/server.js +10 -4
  108. package/lib/http2/node/websocketparser.js +17 -3
  109. package/lib/http2/parserbase.js +7 -0
  110. package/lib/http2/session.js +1 -5
  111. package/lib/session.js +16 -10
  112. package/lib/stream.js +46 -39
  113. package/lib/webtransport.browser.js +8 -2
  114. package/package.json +8 -3
  115. package/test/bidirectional-streams.spec.js +17 -31
  116. package/test/datagrams.spec.js +17 -20
  117. package/test/fixtures/webtransport.browser.js +1 -1
  118. package/test/index.js +13 -4
  119. package/test/session.spec.js +43 -48
  120. package/test/unidirectional-streams.spec.js +17 -30
  121. package/tsconfig.json +15 -0
@@ -0,0 +1,277 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import type { WebTransportSession, WebTransportHash, WebTransportOptions } from './dom';
4
+ import type { IncomingHttpHeaders, Http2Stream } from 'http2';
5
+ import { ParserBase } from './http2/parserbase';
6
+ import { Http2WebTransportSession } from './http2/session';
7
+ import { HttpClient } from './client';
8
+ /**
9
+ * Native HttpWTSession counterpart
10
+ */
11
+ export interface NativeHttpWTSession {
12
+ jsobj: WebTransportSessionEventHandler;
13
+ sendInitialParameters?: () => void;
14
+ writeDatagram: (chunk: Uint8Array) => void;
15
+ orderUnidiStream: () => void;
16
+ orderBidiStream: () => void;
17
+ orderSessionStats: () => void;
18
+ orderDatagramStats: () => void;
19
+ notifySessionDraining: () => void;
20
+ close: (arg: {
21
+ code: number;
22
+ reason: string;
23
+ }) => void;
24
+ }
25
+ /**
26
+ * Native HttpWTStream counterpart
27
+ */
28
+ export interface NativeHttpWTStream {
29
+ jsobj: WebTransportStreamEventHandler;
30
+ readbuffer: ArrayBuffer | undefined;
31
+ sendInitialParameters?: () => void;
32
+ startReading: () => void;
33
+ drainReads: () => void;
34
+ stopReading: () => void;
35
+ stopSending: (code: number) => void;
36
+ resetStream: (code: number) => void;
37
+ writeChunk: (buf: Uint8Array) => void;
38
+ streamFinal: () => void;
39
+ }
40
+ export interface NativeServerOptions {
41
+ port: number | 443;
42
+ secret?: string;
43
+ host: string;
44
+ cert: string;
45
+ certhttp2?: string;
46
+ privKey: string;
47
+ privKeyhttp2?: string;
48
+ initialStreamFlowControlWindow?: number;
49
+ streamShouldAutoTuneReceiveWindow?: boolean;
50
+ streamFlowControlWindowSizeLimit?: number;
51
+ initialSessionFlowControlWindow?: number;
52
+ sessionShouldAutoTuneReceiveWindow?: boolean;
53
+ sessionFlowControlWindowSizeLimit?: number;
54
+ }
55
+ export interface NativeClientOptions {
56
+ port: number;
57
+ host: string;
58
+ serverCertificateHashes: WebTransportHash[];
59
+ localPort: number;
60
+ allowPooling: boolean;
61
+ forceIpv6: boolean;
62
+ initialStreamFlowControlWindow?: number;
63
+ streamShouldAutoTuneReceiveWindow?: boolean;
64
+ streamFlowControlWindowSizeLimit?: number;
65
+ initialSessionFlowControlWindow?: number;
66
+ sessionShouldAutoTuneReceiveWindow?: boolean;
67
+ sessionFlowControlWindowSizeLimit?: number;
68
+ }
69
+ export interface FlowControlable {
70
+ sendWindowUpdate: (windowOffset: bigint) => void;
71
+ sendBlocked: (windowOffSet: bigint) => void;
72
+ connected: () => boolean;
73
+ closeConnection: (arg: {
74
+ code: number;
75
+ reason: string;
76
+ }) => void;
77
+ smoothedRtt: () => number;
78
+ }
79
+ export interface ReadBuffer {
80
+ buffer?: Uint8Array;
81
+ readBytes?: number;
82
+ byob?: ReadableStreamBYOBRequest;
83
+ drained?: boolean;
84
+ fin: boolean;
85
+ }
86
+ export interface NativeFinishSessionRequest {
87
+ header: IncomingHttpHeaders;
88
+ session: Http2Stream;
89
+ status: number;
90
+ protocol: 'capsule' | 'websocket' | 'websocketoverhttp1' | 'http3';
91
+ head?: Buffer;
92
+ }
93
+ export type Purpose = 'StreamRecvSignal' | 'StreamRead' | 'StreamWrite' | 'StreamReset' | 'StreamNetworkFinish';
94
+ export type NetTask = 'stopSending' | 'resetStream' | 'streamFinal';
95
+ export interface StreamRecvSignalEvent {
96
+ code: number;
97
+ nettask: NetTask;
98
+ }
99
+ export interface StreamReadEvent {
100
+ buffergrow?: number;
101
+ fin?: boolean;
102
+ success?: boolean;
103
+ }
104
+ export interface StreamWriteEvent {
105
+ success?: boolean;
106
+ }
107
+ export interface StreamResetEvent {
108
+ }
109
+ export interface StreamNetworkFinishEvent {
110
+ nettask: NetTask;
111
+ }
112
+ export interface WebTransportStreamEventHandler {
113
+ onStreamRecvSignal: (evt: StreamRecvSignalEvent) => void;
114
+ onStreamWrite: (evt: StreamWriteEvent) => void;
115
+ onStreamNetworkFinish: (evt: StreamNetworkFinishEvent) => void;
116
+ }
117
+ export interface SessionReadyEvent {
118
+ object: NativeHttpWTSession;
119
+ }
120
+ export interface SessionCloseEvent {
121
+ errorcode: number;
122
+ error: string;
123
+ }
124
+ export interface SessionStatsEvent {
125
+ timestamp: number;
126
+ expiredOutgoing: bigint;
127
+ lostOutgoing: bigint;
128
+ minRtt: number;
129
+ smoothedRtt: number;
130
+ rttVariation: number;
131
+ estimatedSendRateBps: bigint;
132
+ }
133
+ export interface DatagramStatsEvent {
134
+ timestamp: number;
135
+ expiredOutgoing: bigint;
136
+ lostOutgoing: bigint;
137
+ }
138
+ export interface DatagramReceivedEvent {
139
+ datagram: Uint8Array;
140
+ }
141
+ export interface DatagramSendEvent {
142
+ }
143
+ export interface GoawayReceivedEvent {
144
+ }
145
+ export interface NewStreamEvent {
146
+ stream: NativeHttpWTStream;
147
+ bidirectional: boolean;
148
+ incoming: boolean;
149
+ }
150
+ export interface WebTransportSessionEventHandler {
151
+ onReady: (evt: SessionReadyEvent) => void;
152
+ onClose: (evt: SessionCloseEvent) => void;
153
+ onDatagramReceived: (evt: DatagramReceivedEvent) => void;
154
+ onDatagramSend: (evt: DatagramSendEvent) => void;
155
+ onGoAwayReceived: (evt: GoawayReceivedEvent) => void;
156
+ onSessionStats: (evt: SessionStatsEvent) => void;
157
+ onDatagramStats: (evt: DatagramStatsEvent) => void;
158
+ onStream: (evt: NewStreamEvent) => void;
159
+ closeHook?: (() => void) | null;
160
+ }
161
+ export interface ClientConnectedEvent {
162
+ success: boolean;
163
+ }
164
+ export interface ClientWebtransportSupportEvent {
165
+ }
166
+ export interface HttpWTSessionVisitorEvent {
167
+ session: NativeHttpWTSession;
168
+ reliable?: boolean;
169
+ }
170
+ export interface HttpClientEventHandler {
171
+ onClientConnected: (evt: ClientConnectedEvent) => void;
172
+ onClientWebTransportSupport: (evt: ClientWebtransportSupportEvent) => void;
173
+ onHttpWTSessionVisitor: (evt: HttpWTSessionVisitorEvent) => void;
174
+ }
175
+ export interface HttpWTServerSessionVisitorEvent extends HttpWTSessionVisitorEvent {
176
+ path: string;
177
+ header: Object;
178
+ }
179
+ export interface ServerSessionRequestEvent {
180
+ header: Object;
181
+ head?: Buffer | undefined;
182
+ promise?: any;
183
+ session: any;
184
+ object?: any;
185
+ protocol: string;
186
+ }
187
+ /**
188
+ * The Http server is listening on the specified port
189
+ */
190
+ export interface HttpServerListeningEvent {
191
+ port: number | undefined;
192
+ host: string | undefined;
193
+ }
194
+ export interface HttpServerEventHandler {
195
+ onHttpWTSessionVisitor: (evt: HttpWTServerSessionVisitorEvent) => void;
196
+ onServerError: (error?: Error) => void;
197
+ onServerListening: (evt: HttpServerListeningEvent) => void;
198
+ onServerClose: () => void;
199
+ }
200
+ /**
201
+ * A defered promise with the value T
202
+ */
203
+ export interface Deferred<T = unknown> {
204
+ promise: Promise<T>;
205
+ resolve: (value?: T) => void;
206
+ reject: (reason?: any) => void;
207
+ }
208
+ export type WebTransportSessionState = 'connecting' | 'connected' | 'draining' | 'closed' | 'failed';
209
+ export interface WebTransportSessionImpl extends WebTransportSession {
210
+ state: WebTransportSessionState;
211
+ }
212
+ export interface HttpWebTransportInit extends WebTransportOptions {
213
+ host: string;
214
+ port: string | number;
215
+ quicheLogVerbose?: number;
216
+ forceIpv6?: boolean;
217
+ localPort?: number;
218
+ }
219
+ export type WebTransportServerReliability = 'unreliableOnly' | 'reliableOnly' | 'both';
220
+ export interface HttpServerInit extends HttpWebTransportInit {
221
+ port: string | number;
222
+ host: string;
223
+ secret: string;
224
+ cert: string;
225
+ privKey: string;
226
+ maxConnections?: number;
227
+ initialStreamFlowControlWindow?: number;
228
+ streamShouldAutoTuneReceiveWindow?: boolean;
229
+ streamFlowControlWindowSizeLimit?: number;
230
+ initialSessionFlowControlWindow?: number;
231
+ sessionShouldAutoTuneReceiveWindow?: boolean;
232
+ sessionFlowControlWindowSizeLimit?: number;
233
+ reliability?: WebTransportServerReliability;
234
+ }
235
+ export interface HttpClientInit extends HttpWebTransportInit {
236
+ forceReliable?: any;
237
+ forceIpv6?: boolean;
238
+ localPort?: number;
239
+ initialStreamFlowControlWindow?: number;
240
+ streamShouldAutoTuneReceiveWindow?: boolean;
241
+ streamFlowControlWindowSizeLimit?: number;
242
+ initialSessionFlowControlWindow?: number;
243
+ sessionShouldAutoTuneReceiveWindow?: boolean;
244
+ sessionFlowControlWindowSizeLimit?: number;
245
+ createReliableClient?: (cklient: HttpClient) => any;
246
+ createUnreliableClient?: (client: HttpClient) => any;
247
+ }
248
+ export interface TransportHttp3Quiche {
249
+ checkQuicheInit: () => void;
250
+ Http3WebTransportServer: new (init: HttpServerInit) => any;
251
+ Http3WebTransportServerSocket: new (init: HttpServerInit) => any;
252
+ }
253
+ export interface Logger {
254
+ (formatter: any, ...args: any[]): void;
255
+ error: (formatter: any, ...args: any[]) => void;
256
+ trace: (formatter: any, ...args: any[]) => void;
257
+ }
258
+ export type CreateParserFunction = (nativesession: Http2WebTransportSession) => ParserBase;
259
+ export interface ParserInit {
260
+ isclient: boolean;
261
+ nativesession: any;
262
+ initialStreamSendWindowOffset: number;
263
+ initialStreamReceiveWindowOffset: number;
264
+ streamShouldAutoTuneReceiveWindow: boolean;
265
+ streamReceiveWindowSizeLimit: number;
266
+ }
267
+ export interface ParserHttp2Init extends ParserInit {
268
+ stream: Http2Stream;
269
+ }
270
+ export interface ParserWebsocketInit extends ParserInit {
271
+ ws: WebSocket;
272
+ }
273
+ export interface ReadDataInt {
274
+ data: Uint8Array;
275
+ fin: boolean;
276
+ }
277
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/types.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,+BAA+B,CAAA;IACtC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,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,EAAE,MAAM,I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CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,GAAG,CAAA;CACrD;AAED,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,IAAI,CAAA;IAE3B,uBAAuB,EAAE,KAAK,IAAI,EAAE,cAAc,KAAK,GAAG,CAAA;IAC1D,6BAA6B,EAAE,KAAK,IAAI,EAAE,cAAc,KAAK,GAAG,CAAA;CACjE;AAED,MAAM,WAAW,MAAM;IACrB,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IACtC,KAAK,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IAC/C,KAAK,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;CAChD;AAED,MAAM,MAAM,oBAAoB,GAAG,CACjC,aAAa,EAAE,wBAAwB,KACpC,UAAU,CAAA;AAEf,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,GAAG,CAAA;IAClB,6BAA6B,EAAE,MAAM,CAAA;IACrC,gCAAgC,EAAE,MAAM,CAAA;IACxC,iCAAiC,EAAE,OAAO,CAAA;IAC1C,4BAA4B,EAAE,MAAM,CAAA;CACrC;AAED,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,MAAM,EAAE,WAAW,CAAA;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,EAAE,EAAE,SAAS,CAAA;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,OAAO,CAAA;CACb"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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,CAQpC"}
@@ -0,0 +1,5 @@
1
+ /** @type {ReadableStream} */
2
+ export const ReadableStream: ReadableStream;
3
+ /** @type {WritableStream} */
4
+ export const WritableStream: WritableStream;
5
+ //# sourceMappingURL=webstreams.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webstreams.browser.d.ts","sourceRoot":"","sources":["../../../lib/webstreams.browser.js"],"names":[],"mappings":"AAAA,6BAA6B;AAE7B,6BAFW,cAAc,CAE8B;AACvD,6BAA6B;AAE7B,6BAFW,cAAc,CAE8B"}
@@ -0,0 +1,10 @@
1
+ export const ReadableStream: {
2
+ new (underlyingSource: import("stream/web").UnderlyingByteSource, strategy?: import("stream/web").QueuingStrategy<Uint8Array> | undefined): ReadableStreamNode<Uint8Array>;
3
+ new <R = any>(underlyingSource?: import("stream/web").UnderlyingSource<R> | undefined, strategy?: import("stream/web").QueuingStrategy<R> | undefined): ReadableStreamNode<R>;
4
+ prototype: ReadableStreamNode<any>;
5
+ };
6
+ export const WritableStream: {
7
+ new <W = any>(underlyingSink?: import("stream/web").UnderlyingSink<W> | undefined, strategy?: import("stream/web").QueuingStrategy<W> | undefined): WritableStreamNode<W>;
8
+ prototype: WritableStreamNode<any>;
9
+ };
10
+ //# sourceMappingURL=webstreams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webstreams.d.ts","sourceRoot":"","sources":["../../../lib/webstreams.js"],"names":[],"mappings":"AAKA;;;;EAAgD;AAChD;;;EAAgD"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @typedef {import('./dom').WebTransport} WebTransportInterface
3
+ *
4
+ * @implements {WebTransportInterface}
5
+ */
6
+ export class WebTransportPonyfill extends WebTransportBase implements WebTransportInterface {
7
+ curtype: string | undefined;
8
+ }
9
+ export class WebTransportPolyfill {
10
+ /**
11
+ * @param {string} url
12
+ * @param {import('./dom.js').WebTransportOptions} [args]
13
+ */
14
+ constructor(url: string, args?: import("./dom").WebTransportOptions | undefined);
15
+ curtype: string;
16
+ closeset: boolean;
17
+ allowFallback: boolean;
18
+ initiatedFallback: boolean;
19
+ args: import("./dom").WebTransportOptions | undefined;
20
+ closed: Promise<any>;
21
+ closeRes: (value: any) => void;
22
+ closeRej: (reason?: any) => void;
23
+ ready: Promise<any>;
24
+ readyRes: (value: any) => void;
25
+ readyRej: (reason?: any) => void;
26
+ draining: Promise<any>;
27
+ drainingRes: (value: any) => void;
28
+ drainingRej: (reason?: any) => void;
29
+ curtransport: WebTransport | WebTransportPonyfill;
30
+ /** @type {import('./dom').WebTransportDatagramDuplexStream} */
31
+ datagrams: import('./dom').WebTransportDatagramDuplexStream;
32
+ datagramsReader: ReadableStreamDefaultReader<Uint8Array>;
33
+ datagramsWriter: WritableStreamDefaultWriter<Uint8Array>;
34
+ incomingBidirectionalStreams: globalThis.ReadableStream<any>;
35
+ incomingBidirectionalStreamsReader: ReadableStreamDefaultReader<import("./dom").WebTransportBidirectionalStream>;
36
+ incomingUnidirectionalStreams: globalThis.ReadableStream<any>;
37
+ incomingUnidirectionalStreamsReader: ReadableStreamDefaultReader<import("./dom").WebTransportReceiveStream>;
38
+ get congestionControl(): import("./dom").WebTransportCongestionControl;
39
+ get reliability(): import("./dom").WebTransportReliabilityMode;
40
+ get supportsReliableOnly(): boolean;
41
+ getStats(): Promise<any>;
42
+ /**
43
+ * @param {WebTransportCloseInfo} [closeinfo]
44
+ */
45
+ close(closeinfo?: import("./dom").WebTransportCloseInfo | undefined): void;
46
+ createBidirectionalStream(): Promise<import("./dom").WebTransportBidirectionalStream>;
47
+ createUnidirectionalStream(): Promise<import("./dom").WebTransportSendStream>;
48
+ }
49
+ export type WebTransport = import('./dom').WebTransport;
50
+ export type WebTransportCloseInfo = import('./dom').WebTransportCloseInfo;
51
+ export type WebTransportBidirectionalStream = import('./dom').WebTransportBidirectionalStream;
52
+ export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
53
+ export type WebTransportError = import('./error').WebTransportError;
54
+ /**
55
+ * <T>
56
+ */
57
+ export type ReadableStream<T> = import('node:stream/web').ReadableStream<T>;
58
+ export type WebTransportInterface = import('./dom').WebTransport;
59
+ import { WebTransportBase } from "./webtransportbase.js";
60
+ //# sourceMappingURL=webtransport.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webtransport.browser.d.ts","sourceRoot":"","sources":["../../../lib/webtransport.browser.js"],"names":[],"mappings":"AAmDA;;;;GAIG;AACH;IAwBI,4BAA0B;CAc7B;AAED;IACE;;;OAGG;IACH,iBAHW,MAAM,0DAsLhB;IAlLC,gBAAuB;IACvB,kBAAqB;IACrB,uBAAyB;IACzB,2BAA8B;IAC9B,sDAAgB;IAEhB,qBAGE;IAFA,+BAAuB;IACvB,iCAAsB;IAGxB,oBAGE;IAFA,+BAAuB;IACvB,iCAAsB;IAGxB,uBAGE;IAFA,kCAA0B;IAC1B,oCAAyB;IAMzB,cAeW,YAAY,GAAC,oBAAoB,CAfW;IAoFzD,+DAA+D;IAE/D,WAFW,OAAO,OAAO,EAAE,gCAAgC,CAExC;IAMf,yDAAuE;IAgBvE,yDAAuE;IAa3E,6DAeE;IAZE,iHAC4D;IAahE,8DAeE;IAZE,4GAC6D;IAcnE,uEAGC;IAED,+DAGC;IAED,oCAEC;IAED,yBAGC;IAED;;OAEG;IACH,2EAGC;IAED,sFAGC;IAED,8EAGC;CACF;2BArTY,OAAO,OAAO,EAAE,YAAY;oCAC5B,OAAO,OAAO,EAAE,qBAAqB;8CACrC,OAAO,OAAO,EAAE,+BAA+B;wCAC/C,OAAO,OAAO,EAAE,yBAAyB;gCACzC,OAAO,SAAS,EAAE,iBAAiB;;;;gCAKnC,OAAO,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC;oCAkC3C,OAAO,OAAO,EAAE,YAAY"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @typedef {import('./dom').WebTransportCloseInfo} WebTransportCloseInfo
3
+ * @typedef {import('./dom').WebTransportBidirectionalStream} WebTransportBidirectionalStream
4
+ * @typedef {import('./dom').WebTransportReceiveStream} WebTransportReceiveStream
5
+ */
6
+ /**
7
+ * @template T
8
+ * @typedef {import('node:stream/web').ReadableStream<T>} ReadableStream<T>
9
+ */
10
+ /**
11
+ * @typedef {import('./dom').WebTransport} WebTransportInterface
12
+ *
13
+ * @implements {WebTransportInterface}
14
+ */
15
+ export class WebTransport extends WebTransportBase implements WebTransportInterface {
16
+ }
17
+ export type WebTransportCloseInfo = import('./dom').WebTransportCloseInfo;
18
+ export type WebTransportBidirectionalStream = import('./dom').WebTransportBidirectionalStream;
19
+ export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
20
+ /**
21
+ * <T>
22
+ */
23
+ export type ReadableStream<T> = import('node:stream/web').ReadableStream<T>;
24
+ export type WebTransportInterface = import('./dom').WebTransport;
25
+ import { WebTransportBase } from "./webtransportbase.js";
26
+ //# sourceMappingURL=webtransport.node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webtransport.node.d.ts","sourceRoot":"","sources":["../../../lib/webtransport.node.js"],"names":[],"mappings":"AAiDA;;;;GAIG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH;CAuEC;oCAtFY,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"}
@@ -0,0 +1,70 @@
1
+ /** @type {WeakMap<WebTransportBase, import('./session.js').HttpWTSession>} */
2
+ /**
3
+ * @typedef {import('./dom.js').WebTransportCloseInfo} WebTransportCloseInfo
4
+ * @typedef {import('./dom.js').WebTransportBidirectionalStream} WebTransportBidirectionalStream
5
+ * @typedef {import('./dom.js').WebTransportReceiveStream} WebTransportReceiveStream
6
+ * @typedef {import('./session.js').HttpWTSession} HttpWTSession
7
+ * @typedef { import('./session.js').HttpClient} HttpClient
8
+ */
9
+ /**
10
+ * @template T
11
+ * @typedef {import('node:stream/web').ReadableStream<T>} ReadableStream<T>
12
+ */
13
+ /**
14
+ * @typedef {import('./dom.js').WebTransport} WebTransportInterface
15
+ *
16
+ * @implements {WebTransportInterface}
17
+ */
18
+ export class WebTransportBase implements WebTransportInterface {
19
+ /**
20
+ * @param {string} url
21
+ * @param {import('./dom.js').WebTransportOptions} [args]
22
+ */
23
+ constructor(url: string, args?: import("./dom.js").WebTransportOptions | undefined);
24
+ ready: Promise<void>;
25
+ closed: Promise<import("./dom.js").WebTransportCloseInfo>;
26
+ draining: Promise<undefined>;
27
+ datagrams: import("./dom.js").WebTransportDatagramDuplexStream;
28
+ incomingBidirectionalStreams: globalThis.ReadableStream<import("./dom.js").WebTransportBidirectionalStream>;
29
+ incomingUnidirectionalStreams: globalThis.ReadableStream<import("./dom.js").WebTransportReceiveStream>;
30
+ sessionint: import("./session.js").HttpWTSession;
31
+ /**
32
+ * @param{import('./types.js').HttpWebTransportInit} args
33
+ * @return {{sessionint: HttpWTSession, client: HttpClient}}
34
+ * @abstract
35
+ */
36
+ createClient(args: import('./types.js').HttpWebTransportInit): {
37
+ sessionint: HttpWTSession;
38
+ client: HttpClient;
39
+ };
40
+ /**
41
+ * @param{{client: HttpClient, sessionint: HttpWTSession, ourl: URL}} args
42
+ * @abstract
43
+ */
44
+ startUpConnection({ client, sessionint, ourl }: {
45
+ client: HttpClient;
46
+ sessionint: HttpWTSession;
47
+ ourl: URL;
48
+ }): void;
49
+ get reliability(): import("./dom.js").WebTransportReliabilityMode;
50
+ get congestionControl(): import("./dom.js").WebTransportCongestionControl;
51
+ get supportsReliableOnly(): boolean;
52
+ getStats(): Promise<any>;
53
+ /**
54
+ * @param {WebTransportCloseInfo} [closeinfo]
55
+ */
56
+ close(closeinfo?: import("./dom.js").WebTransportCloseInfo | undefined): void;
57
+ createBidirectionalStream(): Promise<import("./dom.js").WebTransportBidirectionalStream>;
58
+ createUnidirectionalStream(): Promise<import("./dom.js").WebTransportSendStream>;
59
+ }
60
+ export type WebTransportCloseInfo = import('./dom.js').WebTransportCloseInfo;
61
+ export type WebTransportBidirectionalStream = import('./dom.js').WebTransportBidirectionalStream;
62
+ export type WebTransportReceiveStream = import('./dom.js').WebTransportReceiveStream;
63
+ export type HttpWTSession = import('./session.js').HttpWTSession;
64
+ export type HttpClient = import('./session.js').HttpClient;
65
+ /**
66
+ * <T>
67
+ */
68
+ export type ReadableStream<T> = import('node:stream/web').ReadableStream<T>;
69
+ export type WebTransportInterface = import('./dom.js').WebTransport;
70
+ //# sourceMappingURL=webtransportbase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webtransportbase.d.ts","sourceRoot":"","sources":["../../../lib/webtransportbase.js"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E;;;;;;GAMG;AAEH;;;GAGG;AAEH;;;;GAIG;AACH;IACE;;;OAGG;IACH,iBAHW,MAAM,6DA8BhB;IAdC,qBAA6B;IAC7B,0DAA+B;IAC/B,6BAAmC;IAEnC,+DAAqC;IAErC,4GAA2E;IAE3E,uGAC0C;IAE1C,iDAA4B;IAK9B;;;;OAIG;IACH,mBAJU,OAAO,YAAY,EAAE,oBAAoB,GACvC;QAAC,UAAU,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAC,CAK1D;IAED;;;OAGG;IACH,gDAHU;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,UAAU,EAAE,aAAa,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAC,QAKnE;IAED,kEAQC;IAED,0EAQC;IAED,oCAIC;IAED,yBAQC;IAED;;OAEG;IACH,8EASC;IAED,yFASC;IAED,iFASC;CACF;oCA3IY,OAAO,UAAU,EAAE,qBAAqB;8CACxC,OAAO,UAAU,EAAE,+BAA+B;wCAClD,OAAO,UAAU,EAAE,yBAAyB;4BAC5C,OAAO,cAAc,EAAE,aAAa;yBACnC,OAAO,cAAc,EAAE,UAAU;;;;gCAKlC,OAAO,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC;oCAI3C,OAAO,UAAU,EAAE,YAAY"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * <T>
3
+ */
4
+ export type Deferred<T> = import('../lib/types').Deferred<T>;
5
+ //# sourceMappingURL=bidirectional-streams.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bidirectional-streams.spec.d.ts","sourceRoot":"","sources":["../../../test/bidirectional-streams.spec.js"],"names":[],"mappings":";;;0BAkBa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * <T>
3
+ */
4
+ export type Deferred<T> = import('../lib/types').Deferred<T>;
5
+ //# sourceMappingURL=datagrams.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datagrams.spec.d.ts","sourceRoot":"","sources":["../../../test/datagrams.spec.js"],"names":[],"mappings":";;;0BAUa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,21 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export const expect: Chai.ExpectStatic;
2
+ //# sourceMappingURL=chai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chai.d.ts","sourceRoot":"","sources":["../../../../test/fixtures/chai.js"],"names":[],"mappings":"AAOA,uCAAiC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Bytes send by tests
3
+ */
4
+ export const KNOWN_BYTES: Uint8Array[];
5
+ export const KNOWN_BYTES_LENGTH: number;
6
+ export const KNOWN_BYTES_LONG: Uint8Array[];
7
+ export const KNOWN_BYTES_LONG_LENGTH: number;
8
+ //# sourceMappingURL=known-bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-bytes.d.ts","sourceRoot":"","sources":["../../../../test/fixtures/known-bytes.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,uCAMC;AAED,wCAGC;AAiBD,4CAOC;AAED,6CAGC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @template T
3
+ * @param {Promise<T>} promise
4
+ * @param {number} timeout
5
+ * @returns {Promise<T>}
6
+ */
7
+ export function pTimeout<T>(promise: Promise<T>, timeout: number): Promise<T>;
8
+ //# sourceMappingURL=p-timeout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"p-timeout.d.ts","sourceRoot":"","sources":["../../../../test/fixtures/p-timeout.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,0DAHW,MAAM,cAkBhB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @param {string} [certHash]
3
+ * @returns {Uint8Array}
4
+ */
5
+ export function readCertHash(certHash?: string | undefined): Uint8Array;
6
+ //# sourceMappingURL=read-cert-hash.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @template T
3
+ * @typedef {import('../../lib/webstreams').ReadableStream<T>} ReadableStream<T>
4
+ */
5
+ /**
6
+ * Read a stream contents to the end and return it
7
+ *
8
+ * @template T
9
+ * @param {ReadableStream<T>} readable
10
+ * @param {number} [expected]
11
+ * @returns
12
+ */
13
+ export function readStream<T>(readable: any, expected?: number | undefined): Promise<T[]>;
14
+ /**
15
+ * <T>
16
+ */
17
+ export type ReadableStream<T> = any;
18
+ //# sourceMappingURL=read-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-stream.d.ts","sourceRoot":"","sources":["../../../../test/fixtures/read-stream.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;GAOG;AACH,0FA8BC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @template T
3
+ * @typedef {import('../../lib/webstreams').ReadableStream<T>} ReadableStream<T>
4
+ */
5
+ /**
6
+ * @template T
7
+ * @param {ReadableStream<T>} readableStream
8
+ * @returns {Promise<T>}
9
+ */
10
+ export function getReaderValue<T>(readableStream: any): Promise<T>;
11
+ /**
12
+ * @template T
13
+ * @param {ReadableStream<T>} readableStream
14
+ * @returns {AsyncGenerator<T>}
15
+ */
16
+ export function getReaderStream<T>(readableStream: any): AsyncGenerator<T, any, any>;
17
+ /**
18
+ * <T>
19
+ */
20
+ export type ReadableStream<T> = any;
21
+ //# sourceMappingURL=reader-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reader-value.d.ts","sourceRoot":"","sources":["../../../../test/fixtures/reader-value.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,mEAkBC;AAED;;;;GAIG;AACH,qFAoBC"}