@gjsify/http2 0.1.0

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.
@@ -0,0 +1,636 @@
1
+ import { EventEmitter } from 'node:events';
2
+ export declare const constants: {
3
+ readonly NGHTTP2_NO_ERROR: 0;
4
+ readonly NGHTTP2_PROTOCOL_ERROR: 1;
5
+ readonly NGHTTP2_INTERNAL_ERROR: 2;
6
+ readonly NGHTTP2_FLOW_CONTROL_ERROR: 3;
7
+ readonly NGHTTP2_SETTINGS_TIMEOUT: 4;
8
+ readonly NGHTTP2_STREAM_CLOSED: 5;
9
+ readonly NGHTTP2_FRAME_SIZE_ERROR: 6;
10
+ readonly NGHTTP2_REFUSED_STREAM: 7;
11
+ readonly NGHTTP2_CANCEL: 8;
12
+ readonly NGHTTP2_COMPRESSION_ERROR: 9;
13
+ readonly NGHTTP2_CONNECT_ERROR: 10;
14
+ readonly NGHTTP2_ENHANCE_YOUR_CALM: 11;
15
+ readonly NGHTTP2_INADEQUATE_SECURITY: 12;
16
+ readonly NGHTTP2_HTTP_1_1_REQUIRED: 13;
17
+ readonly NGHTTP2_ERR_FRAME_SIZE_ERROR: -522;
18
+ readonly NGHTTP2_ERR_DEFERRED: -508;
19
+ readonly NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE: -509;
20
+ readonly NGHTTP2_ERR_INVALID_ARGUMENT: -501;
21
+ readonly NGHTTP2_ERR_STREAM_CLOSED: -510;
22
+ readonly NGHTTP2_ERR_NOMEM: -901;
23
+ readonly NGHTTP2_SESSION_SERVER: 0;
24
+ readonly NGHTTP2_SESSION_CLIENT: 1;
25
+ readonly NGHTTP2_STREAM_STATE_IDLE: 1;
26
+ readonly NGHTTP2_STREAM_STATE_OPEN: 2;
27
+ readonly NGHTTP2_STREAM_STATE_RESERVED_LOCAL: 3;
28
+ readonly NGHTTP2_STREAM_STATE_RESERVED_REMOTE: 4;
29
+ readonly NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: 5;
30
+ readonly NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: 6;
31
+ readonly NGHTTP2_STREAM_STATE_CLOSED: 7;
32
+ readonly NGHTTP2_FLAG_NONE: 0;
33
+ readonly NGHTTP2_FLAG_END_STREAM: 1;
34
+ readonly NGHTTP2_FLAG_END_HEADERS: 4;
35
+ readonly NGHTTP2_FLAG_ACK: 1;
36
+ readonly NGHTTP2_FLAG_PADDED: 8;
37
+ readonly NGHTTP2_FLAG_PRIORITY: 32;
38
+ readonly NGHTTP2_HCAT_REQUEST: 0;
39
+ readonly NGHTTP2_HCAT_RESPONSE: 1;
40
+ readonly NGHTTP2_HCAT_PUSH_RESPONSE: 2;
41
+ readonly NGHTTP2_HCAT_HEADERS: 3;
42
+ readonly NGHTTP2_NV_FLAG_NONE: 0;
43
+ readonly NGHTTP2_NV_FLAG_NO_INDEX: 1;
44
+ readonly NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: 1;
45
+ readonly NGHTTP2_SETTINGS_ENABLE_PUSH: 2;
46
+ readonly NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: 3;
47
+ readonly NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: 4;
48
+ readonly NGHTTP2_SETTINGS_MAX_FRAME_SIZE: 5;
49
+ readonly NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: 6;
50
+ readonly NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL: 8;
51
+ readonly DEFAULT_SETTINGS_HEADER_TABLE_SIZE: 4096;
52
+ readonly DEFAULT_SETTINGS_ENABLE_PUSH: 1;
53
+ readonly DEFAULT_SETTINGS_MAX_CONCURRENT_STREAMS: 4294967295;
54
+ readonly DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: 65535;
55
+ readonly DEFAULT_SETTINGS_MAX_FRAME_SIZE: 16384;
56
+ readonly DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE: 65535;
57
+ readonly DEFAULT_SETTINGS_ENABLE_CONNECT_PROTOCOL: 0;
58
+ readonly MAX_MAX_FRAME_SIZE: 16777215;
59
+ readonly MIN_MAX_FRAME_SIZE: 16384;
60
+ readonly MAX_INITIAL_WINDOW_SIZE: 2147483647;
61
+ readonly NGHTTP2_DEFAULT_WEIGHT: 16;
62
+ readonly PADDING_STRATEGY_NONE: 0;
63
+ readonly PADDING_STRATEGY_ALIGNED: 1;
64
+ readonly PADDING_STRATEGY_MAX: 2;
65
+ readonly PADDING_STRATEGY_CALLBACK: 1;
66
+ readonly HTTP2_HEADER_STATUS: ":status";
67
+ readonly HTTP2_HEADER_METHOD: ":method";
68
+ readonly HTTP2_HEADER_AUTHORITY: ":authority";
69
+ readonly HTTP2_HEADER_SCHEME: ":scheme";
70
+ readonly HTTP2_HEADER_PATH: ":path";
71
+ readonly HTTP2_HEADER_PROTOCOL: ":protocol";
72
+ readonly HTTP2_HEADER_ACCEPT: "accept";
73
+ readonly HTTP2_HEADER_ACCEPT_CHARSET: "accept-charset";
74
+ readonly HTTP2_HEADER_ACCEPT_ENCODING: "accept-encoding";
75
+ readonly HTTP2_HEADER_ACCEPT_LANGUAGE: "accept-language";
76
+ readonly HTTP2_HEADER_ACCEPT_RANGES: "accept-ranges";
77
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: "access-control-allow-credentials";
78
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: "access-control-allow-headers";
79
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: "access-control-allow-methods";
80
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: "access-control-allow-origin";
81
+ readonly HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: "access-control-expose-headers";
82
+ readonly HTTP2_HEADER_ACCESS_CONTROL_MAX_AGE: "access-control-max-age";
83
+ readonly HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: "access-control-request-headers";
84
+ readonly HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: "access-control-request-method";
85
+ readonly HTTP2_HEADER_AGE: "age";
86
+ readonly HTTP2_HEADER_ALLOW: "allow";
87
+ readonly HTTP2_HEADER_ALT_SVC: "alt-svc";
88
+ readonly HTTP2_HEADER_AUTHORIZATION: "authorization";
89
+ readonly HTTP2_HEADER_CACHE_CONTROL: "cache-control";
90
+ readonly HTTP2_HEADER_CONNECTION: "connection";
91
+ readonly HTTP2_HEADER_CONTENT_DISPOSITION: "content-disposition";
92
+ readonly HTTP2_HEADER_CONTENT_ENCODING: "content-encoding";
93
+ readonly HTTP2_HEADER_CONTENT_LANGUAGE: "content-language";
94
+ readonly HTTP2_HEADER_CONTENT_LENGTH: "content-length";
95
+ readonly HTTP2_HEADER_CONTENT_LOCATION: "content-location";
96
+ readonly HTTP2_HEADER_CONTENT_MD5: "content-md5";
97
+ readonly HTTP2_HEADER_CONTENT_RANGE: "content-range";
98
+ readonly HTTP2_HEADER_CONTENT_SECURITY_POLICY: "content-security-policy";
99
+ readonly HTTP2_HEADER_CONTENT_TYPE: "content-type";
100
+ readonly HTTP2_HEADER_COOKIE: "cookie";
101
+ readonly HTTP2_HEADER_DATE: "date";
102
+ readonly HTTP2_HEADER_DNT: "dnt";
103
+ readonly HTTP2_HEADER_EARLY_DATA: "early-data";
104
+ readonly HTTP2_HEADER_ETAG: "etag";
105
+ readonly HTTP2_HEADER_EXPECT: "expect";
106
+ readonly HTTP2_HEADER_EXPECT_CT: "expect-ct";
107
+ readonly HTTP2_HEADER_EXPIRES: "expires";
108
+ readonly HTTP2_HEADER_FORWARDED: "forwarded";
109
+ readonly HTTP2_HEADER_FROM: "from";
110
+ readonly HTTP2_HEADER_HOST: "host";
111
+ readonly HTTP2_HEADER_HTTP2_SETTINGS: "http2-settings";
112
+ readonly HTTP2_HEADER_IF_MATCH: "if-match";
113
+ readonly HTTP2_HEADER_IF_MODIFIED_SINCE: "if-modified-since";
114
+ readonly HTTP2_HEADER_IF_NONE_MATCH: "if-none-match";
115
+ readonly HTTP2_HEADER_IF_RANGE: "if-range";
116
+ readonly HTTP2_HEADER_IF_UNMODIFIED_SINCE: "if-unmodified-since";
117
+ readonly HTTP2_HEADER_KEEP_ALIVE: "keep-alive";
118
+ readonly HTTP2_HEADER_LAST_MODIFIED: "last-modified";
119
+ readonly HTTP2_HEADER_LINK: "link";
120
+ readonly HTTP2_HEADER_LOCATION: "location";
121
+ readonly HTTP2_HEADER_MAX_FORWARDS: "max-forwards";
122
+ readonly HTTP2_HEADER_ORIGIN: "origin";
123
+ readonly HTTP2_HEADER_PREFER: "prefer";
124
+ readonly HTTP2_HEADER_PRIORITY: "priority";
125
+ readonly HTTP2_HEADER_PROXY_AUTHENTICATE: "proxy-authenticate";
126
+ readonly HTTP2_HEADER_PROXY_AUTHORIZATION: "proxy-authorization";
127
+ readonly HTTP2_HEADER_PROXY_CONNECTION: "proxy-connection";
128
+ readonly HTTP2_HEADER_RANGE: "range";
129
+ readonly HTTP2_HEADER_REFERER: "referer";
130
+ readonly HTTP2_HEADER_REFRESH: "refresh";
131
+ readonly HTTP2_HEADER_RETRY_AFTER: "retry-after";
132
+ readonly HTTP2_HEADER_SERVER: "server";
133
+ readonly HTTP2_HEADER_SET_COOKIE: "set-cookie";
134
+ readonly HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: "strict-transport-security";
135
+ readonly HTTP2_HEADER_TE: "te";
136
+ readonly HTTP2_HEADER_TIMING_ALLOW_ORIGIN: "timing-allow-origin";
137
+ readonly HTTP2_HEADER_TRAILER: "trailer";
138
+ readonly HTTP2_HEADER_TRANSFER_ENCODING: "transfer-encoding";
139
+ readonly HTTP2_HEADER_TK: "tk";
140
+ readonly HTTP2_HEADER_UPGRADE: "upgrade";
141
+ readonly HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS: "upgrade-insecure-requests";
142
+ readonly HTTP2_HEADER_USER_AGENT: "user-agent";
143
+ readonly HTTP2_HEADER_VARY: "vary";
144
+ readonly HTTP2_HEADER_VIA: "via";
145
+ readonly HTTP2_HEADER_WARNING: "warning";
146
+ readonly HTTP2_HEADER_WWW_AUTHENTICATE: "www-authenticate";
147
+ readonly HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS: "x-content-type-options";
148
+ readonly HTTP2_HEADER_X_FORWARDED_FOR: "x-forwarded-for";
149
+ readonly HTTP2_HEADER_X_FRAME_OPTIONS: "x-frame-options";
150
+ readonly HTTP2_HEADER_X_XSS_PROTECTION: "x-xss-protection";
151
+ readonly HTTP2_HEADER_PURPOSE: "purpose";
152
+ readonly HTTP2_METHOD_ACL: "ACL";
153
+ readonly HTTP2_METHOD_BASELINE_CONTROL: "BASELINE-CONTROL";
154
+ readonly HTTP2_METHOD_BIND: "BIND";
155
+ readonly HTTP2_METHOD_CHECKIN: "CHECKIN";
156
+ readonly HTTP2_METHOD_CHECKOUT: "CHECKOUT";
157
+ readonly HTTP2_METHOD_CONNECT: "CONNECT";
158
+ readonly HTTP2_METHOD_COPY: "COPY";
159
+ readonly HTTP2_METHOD_DELETE: "DELETE";
160
+ readonly HTTP2_METHOD_GET: "GET";
161
+ readonly HTTP2_METHOD_HEAD: "HEAD";
162
+ readonly HTTP2_METHOD_LABEL: "LABEL";
163
+ readonly HTTP2_METHOD_LINK: "LINK";
164
+ readonly HTTP2_METHOD_LOCK: "LOCK";
165
+ readonly HTTP2_METHOD_MERGE: "MERGE";
166
+ readonly HTTP2_METHOD_MKACTIVITY: "MKACTIVITY";
167
+ readonly HTTP2_METHOD_MKCALENDAR: "MKCALENDAR";
168
+ readonly HTTP2_METHOD_MKCOL: "MKCOL";
169
+ readonly HTTP2_METHOD_MKREDIRECTREF: "MKREDIRECTREF";
170
+ readonly HTTP2_METHOD_MKWORKSPACE: "MKWORKSPACE";
171
+ readonly HTTP2_METHOD_MOVE: "MOVE";
172
+ readonly HTTP2_METHOD_OPTIONS: "OPTIONS";
173
+ readonly HTTP2_METHOD_ORDERPATCH: "ORDERPATCH";
174
+ readonly HTTP2_METHOD_PATCH: "PATCH";
175
+ readonly HTTP2_METHOD_POST: "POST";
176
+ readonly HTTP2_METHOD_PRI: "PRI";
177
+ readonly HTTP2_METHOD_PROPFIND: "PROPFIND";
178
+ readonly HTTP2_METHOD_PROPPATCH: "PROPPATCH";
179
+ readonly HTTP2_METHOD_PUT: "PUT";
180
+ readonly HTTP2_METHOD_REBIND: "REBIND";
181
+ readonly HTTP2_METHOD_REPORT: "REPORT";
182
+ readonly HTTP2_METHOD_SEARCH: "SEARCH";
183
+ readonly HTTP2_METHOD_TRACE: "TRACE";
184
+ readonly HTTP2_METHOD_UNBIND: "UNBIND";
185
+ readonly HTTP2_METHOD_UNCHECKOUT: "UNCHECKOUT";
186
+ readonly HTTP2_METHOD_UNLINK: "UNLINK";
187
+ readonly HTTP2_METHOD_UNLOCK: "UNLOCK";
188
+ readonly HTTP2_METHOD_UPDATE: "UPDATE";
189
+ readonly HTTP2_METHOD_UPDATEREDIRECTREF: "UPDATEREDIRECTREF";
190
+ readonly HTTP2_METHOD_VERSION_CONTROL: "VERSION-CONTROL";
191
+ readonly HTTP_STATUS_CONTINUE: 100;
192
+ readonly HTTP_STATUS_SWITCHING_PROTOCOLS: 101;
193
+ readonly HTTP_STATUS_PROCESSING: 102;
194
+ readonly HTTP_STATUS_EARLY_HINTS: 103;
195
+ readonly HTTP_STATUS_OK: 200;
196
+ readonly HTTP_STATUS_CREATED: 201;
197
+ readonly HTTP_STATUS_ACCEPTED: 202;
198
+ readonly HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: 203;
199
+ readonly HTTP_STATUS_NO_CONTENT: 204;
200
+ readonly HTTP_STATUS_RESET_CONTENT: 205;
201
+ readonly HTTP_STATUS_PARTIAL_CONTENT: 206;
202
+ readonly HTTP_STATUS_MULTI_STATUS: 207;
203
+ readonly HTTP_STATUS_ALREADY_REPORTED: 208;
204
+ readonly HTTP_STATUS_IM_USED: 226;
205
+ readonly HTTP_STATUS_MULTIPLE_CHOICES: 300;
206
+ readonly HTTP_STATUS_MOVED_PERMANENTLY: 301;
207
+ readonly HTTP_STATUS_FOUND: 302;
208
+ readonly HTTP_STATUS_SEE_OTHER: 303;
209
+ readonly HTTP_STATUS_NOT_MODIFIED: 304;
210
+ readonly HTTP_STATUS_USE_PROXY: 305;
211
+ readonly HTTP_STATUS_TEMPORARY_REDIRECT: 307;
212
+ readonly HTTP_STATUS_PERMANENT_REDIRECT: 308;
213
+ readonly HTTP_STATUS_BAD_REQUEST: 400;
214
+ readonly HTTP_STATUS_UNAUTHORIZED: 401;
215
+ readonly HTTP_STATUS_PAYMENT_REQUIRED: 402;
216
+ readonly HTTP_STATUS_FORBIDDEN: 403;
217
+ readonly HTTP_STATUS_NOT_FOUND: 404;
218
+ readonly HTTP_STATUS_METHOD_NOT_ALLOWED: 405;
219
+ readonly HTTP_STATUS_NOT_ACCEPTABLE: 406;
220
+ readonly HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: 407;
221
+ readonly HTTP_STATUS_REQUEST_TIMEOUT: 408;
222
+ readonly HTTP_STATUS_CONFLICT: 409;
223
+ readonly HTTP_STATUS_GONE: 410;
224
+ readonly HTTP_STATUS_LENGTH_REQUIRED: 411;
225
+ readonly HTTP_STATUS_PRECONDITION_FAILED: 412;
226
+ readonly HTTP_STATUS_PAYLOAD_TOO_LARGE: 413;
227
+ readonly HTTP_STATUS_URI_TOO_LONG: 414;
228
+ readonly HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: 415;
229
+ readonly HTTP_STATUS_RANGE_NOT_SATISFIABLE: 416;
230
+ readonly HTTP_STATUS_EXPECTATION_FAILED: 417;
231
+ readonly HTTP_STATUS_TEAPOT: 418;
232
+ readonly HTTP_STATUS_MISDIRECTED_REQUEST: 421;
233
+ readonly HTTP_STATUS_UNPROCESSABLE_ENTITY: 422;
234
+ readonly HTTP_STATUS_LOCKED: 423;
235
+ readonly HTTP_STATUS_FAILED_DEPENDENCY: 424;
236
+ readonly HTTP_STATUS_TOO_EARLY: 425;
237
+ readonly HTTP_STATUS_UPGRADE_REQUIRED: 426;
238
+ readonly HTTP_STATUS_PRECONDITION_REQUIRED: 428;
239
+ readonly HTTP_STATUS_TOO_MANY_REQUESTS: 429;
240
+ readonly HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: 431;
241
+ readonly HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: 451;
242
+ readonly HTTP_STATUS_INTERNAL_SERVER_ERROR: 500;
243
+ readonly HTTP_STATUS_NOT_IMPLEMENTED: 501;
244
+ readonly HTTP_STATUS_BAD_GATEWAY: 502;
245
+ readonly HTTP_STATUS_SERVICE_UNAVAILABLE: 503;
246
+ readonly HTTP_STATUS_GATEWAY_TIMEOUT: 504;
247
+ readonly HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: 505;
248
+ readonly HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: 506;
249
+ readonly HTTP_STATUS_INSUFFICIENT_STORAGE: 507;
250
+ readonly HTTP_STATUS_LOOP_DETECTED: 508;
251
+ readonly HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: 509;
252
+ readonly HTTP_STATUS_NOT_EXTENDED: 510;
253
+ readonly HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: 511;
254
+ };
255
+ export interface Http2Settings {
256
+ headerTableSize?: number;
257
+ enablePush?: boolean;
258
+ maxConcurrentStreams?: number;
259
+ initialWindowSize?: number;
260
+ maxFrameSize?: number;
261
+ maxHeaderListSize?: number;
262
+ enableConnectProtocol?: boolean;
263
+ }
264
+ export declare function getDefaultSettings(): Http2Settings;
265
+ export declare function getPackedSettings(settings?: Http2Settings): Uint8Array;
266
+ export declare function getUnpackedSettings(buf: Uint8Array | ArrayBuffer): Http2Settings;
267
+ export declare class Http2Session extends EventEmitter {
268
+ readonly alpnProtocol: string | undefined;
269
+ readonly encrypted: boolean;
270
+ readonly type: number;
271
+ private _closed;
272
+ private _destroyed;
273
+ private _settings;
274
+ constructor();
275
+ get closed(): boolean;
276
+ get destroyed(): boolean;
277
+ get connecting(): boolean;
278
+ get pendingSettingsAck(): boolean;
279
+ get localSettings(): Http2Settings;
280
+ get remoteSettings(): Http2Settings;
281
+ settings(settings: Http2Settings, callback?: () => void): void;
282
+ goaway(code?: number, _lastStreamId?: number, _data?: Uint8Array): void;
283
+ ping(payload?: Uint8Array, callback?: (err: Error | null, duration: number, payload: Uint8Array) => void): boolean;
284
+ close(callback?: () => void): void;
285
+ destroy(error?: Error, code?: number): void;
286
+ ref(): void;
287
+ unref(): void;
288
+ }
289
+ export declare class ServerHttp2Session extends Http2Session {
290
+ readonly type: 0;
291
+ altsvc(_alt: string, _originOrStream: string | number): void;
292
+ origin(..._origins: string[]): void;
293
+ }
294
+ export declare class ClientHttp2Session extends Http2Session {
295
+ request(_headers?: Record<string, string | string[]>, _options?: unknown): Http2Stream;
296
+ }
297
+ export declare class Http2Stream extends EventEmitter {
298
+ readonly id: number;
299
+ readonly session: Http2Session | null;
300
+ readonly sentHeaders: Record<string, string | string[]>;
301
+ readonly sentInfoHeaders: Record<string, string | string[]>[];
302
+ private _closed;
303
+ private _destroyed;
304
+ private _state;
305
+ get closed(): boolean;
306
+ get destroyed(): boolean;
307
+ get pending(): boolean;
308
+ get state(): number;
309
+ get endAfterHeaders(): boolean;
310
+ get bufferSize(): number;
311
+ get rstCode(): number;
312
+ close(code?: number, callback?: () => void): void;
313
+ destroy(error?: Error): void;
314
+ priority(_options: {
315
+ exclusive?: boolean;
316
+ parent?: number;
317
+ weight?: number;
318
+ silent?: boolean;
319
+ }): void;
320
+ setTimeout(msecs: number, callback?: () => void): void;
321
+ }
322
+ export declare class ServerHttp2Stream extends Http2Stream {
323
+ readonly headersSent: boolean;
324
+ readonly pushAllowed: boolean;
325
+ respond(_headers?: Record<string, string | string[] | number>, _options?: unknown): void;
326
+ respondWithFD(_fd: number | unknown, _headers?: Record<string, string | string[]>, _options?: unknown): void;
327
+ respondWithFile(_path: string, _headers?: Record<string, string | string[]>, _options?: unknown): void;
328
+ pushStream(_headers: Record<string, string | string[]>, _options: unknown, _callback: (err: Error | null, pushStream: ServerHttp2Stream, headers: Record<string, string | string[]>) => void): void;
329
+ additionalHeaders(_headers: Record<string, string | string[]>): void;
330
+ }
331
+ export declare class ClientHttp2Stream extends Http2Stream {
332
+ }
333
+ export declare class Http2ServerRequest extends EventEmitter {
334
+ readonly headers: Record<string, string | string[] | undefined>;
335
+ readonly httpVersion: string;
336
+ readonly method: string;
337
+ readonly url: string;
338
+ readonly stream: Http2Stream | null;
339
+ readonly authority: string;
340
+ readonly scheme: string;
341
+ get complete(): boolean;
342
+ setTimeout(msecs: number, callback?: () => void): this;
343
+ }
344
+ export declare class Http2ServerResponse extends EventEmitter {
345
+ statusCode: number;
346
+ readonly stream: Http2Stream | null;
347
+ readonly headersSent: boolean;
348
+ private _headers;
349
+ setHeader(name: string, value: string | string[] | number): this;
350
+ getHeader(name: string): string | string[] | number | undefined;
351
+ getHeaders(): Record<string, string | string[] | number>;
352
+ removeHeader(name: string): void;
353
+ hasHeader(name: string): boolean;
354
+ writeHead(statusCode: number, headers?: Record<string, string | string[] | number>): this;
355
+ end(_data?: string | Uint8Array, _encoding?: string, _callback?: () => void): this;
356
+ write(_chunk: string | Uint8Array, _encoding?: string, _callback?: () => void): boolean;
357
+ createPushResponse(_headers: Record<string, string | string[]>, _callback: (err: Error | null, res: Http2ServerResponse) => void): void;
358
+ setTimeout(msecs: number, callback?: () => void): this;
359
+ }
360
+ export declare function createServer(_options?: Record<string, unknown>, _onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): unknown;
361
+ export declare function createSecureServer(_options?: Record<string, unknown>, _onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): unknown;
362
+ export declare function connect(_authority: string | URL, _options?: Record<string, unknown>, _listener?: (session: ClientHttp2Session) => void): ClientHttp2Session;
363
+ export declare const sensitiveHeaders: unique symbol;
364
+ export declare function performServerHandshake(_socket: unknown): unknown;
365
+ declare const _default: {
366
+ constants: {
367
+ readonly NGHTTP2_NO_ERROR: 0;
368
+ readonly NGHTTP2_PROTOCOL_ERROR: 1;
369
+ readonly NGHTTP2_INTERNAL_ERROR: 2;
370
+ readonly NGHTTP2_FLOW_CONTROL_ERROR: 3;
371
+ readonly NGHTTP2_SETTINGS_TIMEOUT: 4;
372
+ readonly NGHTTP2_STREAM_CLOSED: 5;
373
+ readonly NGHTTP2_FRAME_SIZE_ERROR: 6;
374
+ readonly NGHTTP2_REFUSED_STREAM: 7;
375
+ readonly NGHTTP2_CANCEL: 8;
376
+ readonly NGHTTP2_COMPRESSION_ERROR: 9;
377
+ readonly NGHTTP2_CONNECT_ERROR: 10;
378
+ readonly NGHTTP2_ENHANCE_YOUR_CALM: 11;
379
+ readonly NGHTTP2_INADEQUATE_SECURITY: 12;
380
+ readonly NGHTTP2_HTTP_1_1_REQUIRED: 13;
381
+ readonly NGHTTP2_ERR_FRAME_SIZE_ERROR: -522;
382
+ readonly NGHTTP2_ERR_DEFERRED: -508;
383
+ readonly NGHTTP2_ERR_STREAM_ID_NOT_AVAILABLE: -509;
384
+ readonly NGHTTP2_ERR_INVALID_ARGUMENT: -501;
385
+ readonly NGHTTP2_ERR_STREAM_CLOSED: -510;
386
+ readonly NGHTTP2_ERR_NOMEM: -901;
387
+ readonly NGHTTP2_SESSION_SERVER: 0;
388
+ readonly NGHTTP2_SESSION_CLIENT: 1;
389
+ readonly NGHTTP2_STREAM_STATE_IDLE: 1;
390
+ readonly NGHTTP2_STREAM_STATE_OPEN: 2;
391
+ readonly NGHTTP2_STREAM_STATE_RESERVED_LOCAL: 3;
392
+ readonly NGHTTP2_STREAM_STATE_RESERVED_REMOTE: 4;
393
+ readonly NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: 5;
394
+ readonly NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: 6;
395
+ readonly NGHTTP2_STREAM_STATE_CLOSED: 7;
396
+ readonly NGHTTP2_FLAG_NONE: 0;
397
+ readonly NGHTTP2_FLAG_END_STREAM: 1;
398
+ readonly NGHTTP2_FLAG_END_HEADERS: 4;
399
+ readonly NGHTTP2_FLAG_ACK: 1;
400
+ readonly NGHTTP2_FLAG_PADDED: 8;
401
+ readonly NGHTTP2_FLAG_PRIORITY: 32;
402
+ readonly NGHTTP2_HCAT_REQUEST: 0;
403
+ readonly NGHTTP2_HCAT_RESPONSE: 1;
404
+ readonly NGHTTP2_HCAT_PUSH_RESPONSE: 2;
405
+ readonly NGHTTP2_HCAT_HEADERS: 3;
406
+ readonly NGHTTP2_NV_FLAG_NONE: 0;
407
+ readonly NGHTTP2_NV_FLAG_NO_INDEX: 1;
408
+ readonly NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: 1;
409
+ readonly NGHTTP2_SETTINGS_ENABLE_PUSH: 2;
410
+ readonly NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: 3;
411
+ readonly NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: 4;
412
+ readonly NGHTTP2_SETTINGS_MAX_FRAME_SIZE: 5;
413
+ readonly NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: 6;
414
+ readonly NGHTTP2_SETTINGS_ENABLE_CONNECT_PROTOCOL: 8;
415
+ readonly DEFAULT_SETTINGS_HEADER_TABLE_SIZE: 4096;
416
+ readonly DEFAULT_SETTINGS_ENABLE_PUSH: 1;
417
+ readonly DEFAULT_SETTINGS_MAX_CONCURRENT_STREAMS: 4294967295;
418
+ readonly DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: 65535;
419
+ readonly DEFAULT_SETTINGS_MAX_FRAME_SIZE: 16384;
420
+ readonly DEFAULT_SETTINGS_MAX_HEADER_LIST_SIZE: 65535;
421
+ readonly DEFAULT_SETTINGS_ENABLE_CONNECT_PROTOCOL: 0;
422
+ readonly MAX_MAX_FRAME_SIZE: 16777215;
423
+ readonly MIN_MAX_FRAME_SIZE: 16384;
424
+ readonly MAX_INITIAL_WINDOW_SIZE: 2147483647;
425
+ readonly NGHTTP2_DEFAULT_WEIGHT: 16;
426
+ readonly PADDING_STRATEGY_NONE: 0;
427
+ readonly PADDING_STRATEGY_ALIGNED: 1;
428
+ readonly PADDING_STRATEGY_MAX: 2;
429
+ readonly PADDING_STRATEGY_CALLBACK: 1;
430
+ readonly HTTP2_HEADER_STATUS: ":status";
431
+ readonly HTTP2_HEADER_METHOD: ":method";
432
+ readonly HTTP2_HEADER_AUTHORITY: ":authority";
433
+ readonly HTTP2_HEADER_SCHEME: ":scheme";
434
+ readonly HTTP2_HEADER_PATH: ":path";
435
+ readonly HTTP2_HEADER_PROTOCOL: ":protocol";
436
+ readonly HTTP2_HEADER_ACCEPT: "accept";
437
+ readonly HTTP2_HEADER_ACCEPT_CHARSET: "accept-charset";
438
+ readonly HTTP2_HEADER_ACCEPT_ENCODING: "accept-encoding";
439
+ readonly HTTP2_HEADER_ACCEPT_LANGUAGE: "accept-language";
440
+ readonly HTTP2_HEADER_ACCEPT_RANGES: "accept-ranges";
441
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: "access-control-allow-credentials";
442
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: "access-control-allow-headers";
443
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: "access-control-allow-methods";
444
+ readonly HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: "access-control-allow-origin";
445
+ readonly HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: "access-control-expose-headers";
446
+ readonly HTTP2_HEADER_ACCESS_CONTROL_MAX_AGE: "access-control-max-age";
447
+ readonly HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: "access-control-request-headers";
448
+ readonly HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: "access-control-request-method";
449
+ readonly HTTP2_HEADER_AGE: "age";
450
+ readonly HTTP2_HEADER_ALLOW: "allow";
451
+ readonly HTTP2_HEADER_ALT_SVC: "alt-svc";
452
+ readonly HTTP2_HEADER_AUTHORIZATION: "authorization";
453
+ readonly HTTP2_HEADER_CACHE_CONTROL: "cache-control";
454
+ readonly HTTP2_HEADER_CONNECTION: "connection";
455
+ readonly HTTP2_HEADER_CONTENT_DISPOSITION: "content-disposition";
456
+ readonly HTTP2_HEADER_CONTENT_ENCODING: "content-encoding";
457
+ readonly HTTP2_HEADER_CONTENT_LANGUAGE: "content-language";
458
+ readonly HTTP2_HEADER_CONTENT_LENGTH: "content-length";
459
+ readonly HTTP2_HEADER_CONTENT_LOCATION: "content-location";
460
+ readonly HTTP2_HEADER_CONTENT_MD5: "content-md5";
461
+ readonly HTTP2_HEADER_CONTENT_RANGE: "content-range";
462
+ readonly HTTP2_HEADER_CONTENT_SECURITY_POLICY: "content-security-policy";
463
+ readonly HTTP2_HEADER_CONTENT_TYPE: "content-type";
464
+ readonly HTTP2_HEADER_COOKIE: "cookie";
465
+ readonly HTTP2_HEADER_DATE: "date";
466
+ readonly HTTP2_HEADER_DNT: "dnt";
467
+ readonly HTTP2_HEADER_EARLY_DATA: "early-data";
468
+ readonly HTTP2_HEADER_ETAG: "etag";
469
+ readonly HTTP2_HEADER_EXPECT: "expect";
470
+ readonly HTTP2_HEADER_EXPECT_CT: "expect-ct";
471
+ readonly HTTP2_HEADER_EXPIRES: "expires";
472
+ readonly HTTP2_HEADER_FORWARDED: "forwarded";
473
+ readonly HTTP2_HEADER_FROM: "from";
474
+ readonly HTTP2_HEADER_HOST: "host";
475
+ readonly HTTP2_HEADER_HTTP2_SETTINGS: "http2-settings";
476
+ readonly HTTP2_HEADER_IF_MATCH: "if-match";
477
+ readonly HTTP2_HEADER_IF_MODIFIED_SINCE: "if-modified-since";
478
+ readonly HTTP2_HEADER_IF_NONE_MATCH: "if-none-match";
479
+ readonly HTTP2_HEADER_IF_RANGE: "if-range";
480
+ readonly HTTP2_HEADER_IF_UNMODIFIED_SINCE: "if-unmodified-since";
481
+ readonly HTTP2_HEADER_KEEP_ALIVE: "keep-alive";
482
+ readonly HTTP2_HEADER_LAST_MODIFIED: "last-modified";
483
+ readonly HTTP2_HEADER_LINK: "link";
484
+ readonly HTTP2_HEADER_LOCATION: "location";
485
+ readonly HTTP2_HEADER_MAX_FORWARDS: "max-forwards";
486
+ readonly HTTP2_HEADER_ORIGIN: "origin";
487
+ readonly HTTP2_HEADER_PREFER: "prefer";
488
+ readonly HTTP2_HEADER_PRIORITY: "priority";
489
+ readonly HTTP2_HEADER_PROXY_AUTHENTICATE: "proxy-authenticate";
490
+ readonly HTTP2_HEADER_PROXY_AUTHORIZATION: "proxy-authorization";
491
+ readonly HTTP2_HEADER_PROXY_CONNECTION: "proxy-connection";
492
+ readonly HTTP2_HEADER_RANGE: "range";
493
+ readonly HTTP2_HEADER_REFERER: "referer";
494
+ readonly HTTP2_HEADER_REFRESH: "refresh";
495
+ readonly HTTP2_HEADER_RETRY_AFTER: "retry-after";
496
+ readonly HTTP2_HEADER_SERVER: "server";
497
+ readonly HTTP2_HEADER_SET_COOKIE: "set-cookie";
498
+ readonly HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: "strict-transport-security";
499
+ readonly HTTP2_HEADER_TE: "te";
500
+ readonly HTTP2_HEADER_TIMING_ALLOW_ORIGIN: "timing-allow-origin";
501
+ readonly HTTP2_HEADER_TRAILER: "trailer";
502
+ readonly HTTP2_HEADER_TRANSFER_ENCODING: "transfer-encoding";
503
+ readonly HTTP2_HEADER_TK: "tk";
504
+ readonly HTTP2_HEADER_UPGRADE: "upgrade";
505
+ readonly HTTP2_HEADER_UPGRADE_INSECURE_REQUESTS: "upgrade-insecure-requests";
506
+ readonly HTTP2_HEADER_USER_AGENT: "user-agent";
507
+ readonly HTTP2_HEADER_VARY: "vary";
508
+ readonly HTTP2_HEADER_VIA: "via";
509
+ readonly HTTP2_HEADER_WARNING: "warning";
510
+ readonly HTTP2_HEADER_WWW_AUTHENTICATE: "www-authenticate";
511
+ readonly HTTP2_HEADER_X_CONTENT_TYPE_OPTIONS: "x-content-type-options";
512
+ readonly HTTP2_HEADER_X_FORWARDED_FOR: "x-forwarded-for";
513
+ readonly HTTP2_HEADER_X_FRAME_OPTIONS: "x-frame-options";
514
+ readonly HTTP2_HEADER_X_XSS_PROTECTION: "x-xss-protection";
515
+ readonly HTTP2_HEADER_PURPOSE: "purpose";
516
+ readonly HTTP2_METHOD_ACL: "ACL";
517
+ readonly HTTP2_METHOD_BASELINE_CONTROL: "BASELINE-CONTROL";
518
+ readonly HTTP2_METHOD_BIND: "BIND";
519
+ readonly HTTP2_METHOD_CHECKIN: "CHECKIN";
520
+ readonly HTTP2_METHOD_CHECKOUT: "CHECKOUT";
521
+ readonly HTTP2_METHOD_CONNECT: "CONNECT";
522
+ readonly HTTP2_METHOD_COPY: "COPY";
523
+ readonly HTTP2_METHOD_DELETE: "DELETE";
524
+ readonly HTTP2_METHOD_GET: "GET";
525
+ readonly HTTP2_METHOD_HEAD: "HEAD";
526
+ readonly HTTP2_METHOD_LABEL: "LABEL";
527
+ readonly HTTP2_METHOD_LINK: "LINK";
528
+ readonly HTTP2_METHOD_LOCK: "LOCK";
529
+ readonly HTTP2_METHOD_MERGE: "MERGE";
530
+ readonly HTTP2_METHOD_MKACTIVITY: "MKACTIVITY";
531
+ readonly HTTP2_METHOD_MKCALENDAR: "MKCALENDAR";
532
+ readonly HTTP2_METHOD_MKCOL: "MKCOL";
533
+ readonly HTTP2_METHOD_MKREDIRECTREF: "MKREDIRECTREF";
534
+ readonly HTTP2_METHOD_MKWORKSPACE: "MKWORKSPACE";
535
+ readonly HTTP2_METHOD_MOVE: "MOVE";
536
+ readonly HTTP2_METHOD_OPTIONS: "OPTIONS";
537
+ readonly HTTP2_METHOD_ORDERPATCH: "ORDERPATCH";
538
+ readonly HTTP2_METHOD_PATCH: "PATCH";
539
+ readonly HTTP2_METHOD_POST: "POST";
540
+ readonly HTTP2_METHOD_PRI: "PRI";
541
+ readonly HTTP2_METHOD_PROPFIND: "PROPFIND";
542
+ readonly HTTP2_METHOD_PROPPATCH: "PROPPATCH";
543
+ readonly HTTP2_METHOD_PUT: "PUT";
544
+ readonly HTTP2_METHOD_REBIND: "REBIND";
545
+ readonly HTTP2_METHOD_REPORT: "REPORT";
546
+ readonly HTTP2_METHOD_SEARCH: "SEARCH";
547
+ readonly HTTP2_METHOD_TRACE: "TRACE";
548
+ readonly HTTP2_METHOD_UNBIND: "UNBIND";
549
+ readonly HTTP2_METHOD_UNCHECKOUT: "UNCHECKOUT";
550
+ readonly HTTP2_METHOD_UNLINK: "UNLINK";
551
+ readonly HTTP2_METHOD_UNLOCK: "UNLOCK";
552
+ readonly HTTP2_METHOD_UPDATE: "UPDATE";
553
+ readonly HTTP2_METHOD_UPDATEREDIRECTREF: "UPDATEREDIRECTREF";
554
+ readonly HTTP2_METHOD_VERSION_CONTROL: "VERSION-CONTROL";
555
+ readonly HTTP_STATUS_CONTINUE: 100;
556
+ readonly HTTP_STATUS_SWITCHING_PROTOCOLS: 101;
557
+ readonly HTTP_STATUS_PROCESSING: 102;
558
+ readonly HTTP_STATUS_EARLY_HINTS: 103;
559
+ readonly HTTP_STATUS_OK: 200;
560
+ readonly HTTP_STATUS_CREATED: 201;
561
+ readonly HTTP_STATUS_ACCEPTED: 202;
562
+ readonly HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: 203;
563
+ readonly HTTP_STATUS_NO_CONTENT: 204;
564
+ readonly HTTP_STATUS_RESET_CONTENT: 205;
565
+ readonly HTTP_STATUS_PARTIAL_CONTENT: 206;
566
+ readonly HTTP_STATUS_MULTI_STATUS: 207;
567
+ readonly HTTP_STATUS_ALREADY_REPORTED: 208;
568
+ readonly HTTP_STATUS_IM_USED: 226;
569
+ readonly HTTP_STATUS_MULTIPLE_CHOICES: 300;
570
+ readonly HTTP_STATUS_MOVED_PERMANENTLY: 301;
571
+ readonly HTTP_STATUS_FOUND: 302;
572
+ readonly HTTP_STATUS_SEE_OTHER: 303;
573
+ readonly HTTP_STATUS_NOT_MODIFIED: 304;
574
+ readonly HTTP_STATUS_USE_PROXY: 305;
575
+ readonly HTTP_STATUS_TEMPORARY_REDIRECT: 307;
576
+ readonly HTTP_STATUS_PERMANENT_REDIRECT: 308;
577
+ readonly HTTP_STATUS_BAD_REQUEST: 400;
578
+ readonly HTTP_STATUS_UNAUTHORIZED: 401;
579
+ readonly HTTP_STATUS_PAYMENT_REQUIRED: 402;
580
+ readonly HTTP_STATUS_FORBIDDEN: 403;
581
+ readonly HTTP_STATUS_NOT_FOUND: 404;
582
+ readonly HTTP_STATUS_METHOD_NOT_ALLOWED: 405;
583
+ readonly HTTP_STATUS_NOT_ACCEPTABLE: 406;
584
+ readonly HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: 407;
585
+ readonly HTTP_STATUS_REQUEST_TIMEOUT: 408;
586
+ readonly HTTP_STATUS_CONFLICT: 409;
587
+ readonly HTTP_STATUS_GONE: 410;
588
+ readonly HTTP_STATUS_LENGTH_REQUIRED: 411;
589
+ readonly HTTP_STATUS_PRECONDITION_FAILED: 412;
590
+ readonly HTTP_STATUS_PAYLOAD_TOO_LARGE: 413;
591
+ readonly HTTP_STATUS_URI_TOO_LONG: 414;
592
+ readonly HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: 415;
593
+ readonly HTTP_STATUS_RANGE_NOT_SATISFIABLE: 416;
594
+ readonly HTTP_STATUS_EXPECTATION_FAILED: 417;
595
+ readonly HTTP_STATUS_TEAPOT: 418;
596
+ readonly HTTP_STATUS_MISDIRECTED_REQUEST: 421;
597
+ readonly HTTP_STATUS_UNPROCESSABLE_ENTITY: 422;
598
+ readonly HTTP_STATUS_LOCKED: 423;
599
+ readonly HTTP_STATUS_FAILED_DEPENDENCY: 424;
600
+ readonly HTTP_STATUS_TOO_EARLY: 425;
601
+ readonly HTTP_STATUS_UPGRADE_REQUIRED: 426;
602
+ readonly HTTP_STATUS_PRECONDITION_REQUIRED: 428;
603
+ readonly HTTP_STATUS_TOO_MANY_REQUESTS: 429;
604
+ readonly HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: 431;
605
+ readonly HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: 451;
606
+ readonly HTTP_STATUS_INTERNAL_SERVER_ERROR: 500;
607
+ readonly HTTP_STATUS_NOT_IMPLEMENTED: 501;
608
+ readonly HTTP_STATUS_BAD_GATEWAY: 502;
609
+ readonly HTTP_STATUS_SERVICE_UNAVAILABLE: 503;
610
+ readonly HTTP_STATUS_GATEWAY_TIMEOUT: 504;
611
+ readonly HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: 505;
612
+ readonly HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: 506;
613
+ readonly HTTP_STATUS_INSUFFICIENT_STORAGE: 507;
614
+ readonly HTTP_STATUS_LOOP_DETECTED: 508;
615
+ readonly HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: 509;
616
+ readonly HTTP_STATUS_NOT_EXTENDED: 510;
617
+ readonly HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: 511;
618
+ };
619
+ createServer: typeof createServer;
620
+ createSecureServer: typeof createSecureServer;
621
+ connect: typeof connect;
622
+ getDefaultSettings: typeof getDefaultSettings;
623
+ getPackedSettings: typeof getPackedSettings;
624
+ getUnpackedSettings: typeof getUnpackedSettings;
625
+ sensitiveHeaders: symbol;
626
+ performServerHandshake: typeof performServerHandshake;
627
+ Http2Session: typeof Http2Session;
628
+ Http2Stream: typeof Http2Stream;
629
+ ServerHttp2Session: typeof ServerHttp2Session;
630
+ ClientHttp2Session: typeof ClientHttp2Session;
631
+ ServerHttp2Stream: typeof ServerHttp2Stream;
632
+ ClientHttp2Stream: typeof ClientHttp2Stream;
633
+ Http2ServerRequest: typeof Http2ServerRequest;
634
+ Http2ServerResponse: typeof Http2ServerResponse;
635
+ };
636
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@gjsify/http2",
3
+ "version": "0.1.0",
4
+ "description": "Node.js http2 module for Gjs",
5
+ "type": "module",
6
+ "module": "lib/esm/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/esm/index.js"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "clear": "rm -rf lib tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo test.gjs.mjs test.node.mjs || exit 0",
16
+ "check": "tsc --noEmit",
17
+ "build": "yarn build:gjsify && yarn build:types",
18
+ "build:gjsify": "gjsify build --library 'src/**/*.{ts,js}' --exclude 'src/**/*.spec.{mts,ts}' 'src/test.{mts,ts}'",
19
+ "build:types": "tsc",
20
+ "build:test": "yarn build:test:gjs && yarn build:test:node",
21
+ "build:test:gjs": "gjsify build src/test.mts --app gjs --outfile test.gjs.mjs",
22
+ "build:test:node": "gjsify build src/test.mts --app node --outfile test.node.mjs",
23
+ "test": "yarn build:gjsify && yarn build:test && yarn test:node && yarn test:gjs",
24
+ "test:gjs": "gjs -m test.gjs.mjs",
25
+ "test:node": "node test.node.mjs"
26
+ },
27
+ "keywords": [
28
+ "gjs",
29
+ "node",
30
+ "http2"
31
+ ],
32
+ "devDependencies": {
33
+ "@gjsify/cli": "^0.1.0",
34
+ "@gjsify/unit": "^0.1.0",
35
+ "@types/node": "^25.5.0",
36
+ "typescript": "^6.0.2"
37
+ },
38
+ "dependencies": {
39
+ "@gjsify/events": "^0.1.0"
40
+ }
41
+ }