@gjsify/http2 0.3.12 → 0.3.14

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/esm/index.js CHANGED
@@ -1,94 +1,48 @@
1
- import {
2
- constants,
3
- getDefaultSettings,
4
- getPackedSettings,
5
- getUnpackedSettings
6
- } from "./protocol.js";
7
- import { constants as constants2, getDefaultSettings as getDefaultSettings2, getPackedSettings as getPackedSettings2, getUnpackedSettings as getUnpackedSettings2 } from "./protocol.js";
8
- import {
9
- Http2ServerRequest,
10
- Http2ServerResponse,
11
- ServerHttp2Stream,
12
- ServerHttp2Session,
13
- Http2Server,
14
- Http2SecureServer
15
- } from "./server.js";
16
- import {
17
- Http2ServerRequest as Http2ServerRequest2,
18
- Http2ServerResponse as Http2ServerResponse2,
19
- ServerHttp2Stream as ServerHttp2Stream2,
20
- ServerHttp2Session as ServerHttp2Session2,
21
- Http2Server as Http2Server2,
22
- Http2SecureServer as Http2SecureServer2
23
- } from "./server.js";
24
- import {
25
- Http2Session,
26
- ClientHttp2Session,
27
- ClientHttp2Stream
28
- } from "./client-session.js";
29
- import {
30
- Http2Session as Http2Session2,
31
- ClientHttp2Session as ClientHttp2Session2,
32
- ClientHttp2Stream as ClientHttp2Stream2
33
- } from "./client-session.js";
1
+ import { constants, getDefaultSettings, getPackedSettings, getUnpackedSettings } from "./protocol.js";
2
+ import { ClientHttp2Session, ClientHttp2Stream, Http2Session } from "./client-session.js";
3
+ import { Http2SecureServer, Http2Server, Http2ServerRequest, Http2ServerResponse, ServerHttp2Session, ServerHttp2Stream } from "./server.js";
4
+
5
+ //#region src/index.ts
34
6
  function createServer(options, handler) {
35
- return new Http2Server2(options, handler);
7
+ return new Http2Server(options, handler);
36
8
  }
37
9
  function createSecureServer(options, handler) {
38
- return new Http2SecureServer2(options, handler);
10
+ return new Http2SecureServer(options, handler);
39
11
  }
40
12
  function connect(authority, options, listener) {
41
- const authorityStr = typeof authority === "string" ? authority : authority.toString();
42
- if (typeof options === "function") {
43
- listener = options;
44
- options = {};
45
- }
46
- const session = new ClientHttp2Session2(authorityStr, options ?? {});
47
- if (listener) session.once("connect", listener);
48
- return session;
13
+ const authorityStr = typeof authority === "string" ? authority : authority.toString();
14
+ if (typeof options === "function") {
15
+ listener = options;
16
+ options = {};
17
+ }
18
+ const session = new ClientHttp2Session(authorityStr, options ?? {});
19
+ if (listener) session.once("connect", listener);
20
+ return session;
49
21
  }
50
- const sensitiveHeaders = /* @__PURE__ */ Symbol.for("nodejs.http2.sensitiveHeaders");
22
+ const sensitiveHeaders = Symbol.for("nodejs.http2.sensitiveHeaders");
51
23
  function performServerHandshake(_socket) {
52
- throw new Error("http2.performServerHandshake() is not yet implemented in GJS");
24
+ throw new Error("http2.performServerHandshake() is not yet implemented in GJS");
53
25
  }
54
- var index_default = {
55
- constants: constants2,
56
- createServer,
57
- createSecureServer,
58
- connect,
59
- getDefaultSettings: getDefaultSettings2,
60
- getPackedSettings: getPackedSettings2,
61
- getUnpackedSettings: getUnpackedSettings2,
62
- sensitiveHeaders,
63
- performServerHandshake,
64
- Http2Session: Http2Session2,
65
- Http2Server: Http2Server2,
66
- Http2SecureServer: Http2SecureServer2,
67
- Http2ServerRequest: Http2ServerRequest2,
68
- Http2ServerResponse: Http2ServerResponse2,
69
- ServerHttp2Session: ServerHttp2Session2,
70
- ServerHttp2Stream: ServerHttp2Stream2,
71
- ClientHttp2Session: ClientHttp2Session2,
72
- ClientHttp2Stream: ClientHttp2Stream2
73
- };
74
- export {
75
- ClientHttp2Session,
76
- ClientHttp2Stream,
77
- Http2SecureServer,
78
- Http2Server,
79
- Http2ServerRequest,
80
- Http2ServerResponse,
81
- Http2Session,
82
- ServerHttp2Session,
83
- ServerHttp2Stream,
84
- connect,
85
- constants,
86
- createSecureServer,
87
- createServer,
88
- index_default as default,
89
- getDefaultSettings,
90
- getPackedSettings,
91
- getUnpackedSettings,
92
- performServerHandshake,
93
- sensitiveHeaders
26
+ var src_default = {
27
+ constants,
28
+ createServer,
29
+ createSecureServer,
30
+ connect,
31
+ getDefaultSettings,
32
+ getPackedSettings,
33
+ getUnpackedSettings,
34
+ sensitiveHeaders,
35
+ performServerHandshake,
36
+ Http2Session,
37
+ Http2Server,
38
+ Http2SecureServer,
39
+ Http2ServerRequest,
40
+ Http2ServerResponse,
41
+ ServerHttp2Session,
42
+ ServerHttp2Stream,
43
+ ClientHttp2Session,
44
+ ClientHttp2Stream
94
45
  };
46
+
47
+ //#endregion
48
+ export { ClientHttp2Session, ClientHttp2Stream, Http2SecureServer, Http2Server, Http2ServerRequest, Http2ServerResponse, Http2Session, ServerHttp2Session, ServerHttp2Stream, connect, constants, createSecureServer, createServer, src_default as default, getDefaultSettings, getPackedSettings, getUnpackedSettings, performServerHandshake, sensitiveHeaders };