@nocobase/plugin-multi-app-manager 2.1.0-alpha.1 → 2.1.0-alpha.11

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 (146) hide show
  1. package/LICENSE +201 -661
  2. package/README.md +79 -10
  3. package/dist/client/Migrate.d.ts +10 -0
  4. package/dist/client/e9551d3b66931c0a.js +10 -0
  5. package/dist/client/index.js +1 -1
  6. package/dist/externalVersion.js +7 -7
  7. package/dist/locale/en-US.json +3 -2
  8. package/dist/locale/zh-CN.json +3 -2
  9. package/dist/node_modules/p-queue/dist/index.d.ts +101 -0
  10. package/dist/node_modules/p-queue/dist/index.js +1 -0
  11. package/dist/node_modules/p-queue/dist/lower-bound.d.ts +1 -0
  12. package/dist/node_modules/p-queue/dist/lower-bound.js +21 -0
  13. package/dist/node_modules/p-queue/dist/options.d.ts +64 -0
  14. package/dist/node_modules/p-queue/dist/options.js +2 -0
  15. package/dist/node_modules/p-queue/dist/priority-queue.d.ts +12 -0
  16. package/dist/node_modules/p-queue/dist/priority-queue.js +32 -0
  17. package/dist/node_modules/p-queue/dist/queue.d.ts +7 -0
  18. package/dist/node_modules/p-queue/dist/queue.js +2 -0
  19. package/dist/node_modules/p-queue/license +9 -0
  20. package/dist/node_modules/p-queue/node_modules/eventemitter3/index.d.ts +134 -0
  21. package/dist/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
  22. package/dist/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
  23. package/dist/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.js +340 -0
  24. package/dist/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
  25. package/dist/node_modules/p-queue/package.json +1 -0
  26. package/dist/server/adapters/legacy-adapter.d.ts +43 -0
  27. package/dist/server/adapters/legacy-adapter.js +207 -0
  28. package/dist/server/server.d.ts +4 -6
  29. package/dist/server/server.js +38 -191
  30. package/package.json +3 -3
  31. package/dist/client/db3a142b120d6553.js +0 -10
  32. package/dist/node_modules/mariadb/LICENSE +0 -502
  33. package/dist/node_modules/mariadb/callback.js +0 -41
  34. package/dist/node_modules/mariadb/lib/cmd/batch-bulk.js +0 -278
  35. package/dist/node_modules/mariadb/lib/cmd/batch-rewrite.js +0 -372
  36. package/dist/node_modules/mariadb/lib/cmd/change-user.js +0 -149
  37. package/dist/node_modules/mariadb/lib/cmd/class/ok-packet.js +0 -17
  38. package/dist/node_modules/mariadb/lib/cmd/column-definition.js +0 -102
  39. package/dist/node_modules/mariadb/lib/cmd/command.js +0 -168
  40. package/dist/node_modules/mariadb/lib/cmd/common-binary-cmd.js +0 -327
  41. package/dist/node_modules/mariadb/lib/cmd/common-text-cmd.js +0 -427
  42. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/caching-sha2-password-auth.js +0 -168
  43. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/clear-password-auth.js +0 -23
  44. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/ed25519-password-auth.js +0 -761
  45. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js +0 -55
  46. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/pam-password-auth.js +0 -58
  47. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/plugin-auth.js +0 -19
  48. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/sha256-password-auth.js +0 -142
  49. package/dist/node_modules/mariadb/lib/cmd/handshake/client-capabilities.js +0 -74
  50. package/dist/node_modules/mariadb/lib/cmd/handshake/client-handshake-response.js +0 -126
  51. package/dist/node_modules/mariadb/lib/cmd/handshake/handshake.js +0 -292
  52. package/dist/node_modules/mariadb/lib/cmd/handshake/initial-handshake.js +0 -74
  53. package/dist/node_modules/mariadb/lib/cmd/handshake/ssl-request.js +0 -29
  54. package/dist/node_modules/mariadb/lib/cmd/ping.js +0 -52
  55. package/dist/node_modules/mariadb/lib/cmd/query.js +0 -255
  56. package/dist/node_modules/mariadb/lib/cmd/quit.js +0 -28
  57. package/dist/node_modules/mariadb/lib/cmd/reset.js +0 -54
  58. package/dist/node_modules/mariadb/lib/cmd/resultset.js +0 -607
  59. package/dist/node_modules/mariadb/lib/cmd/stream.js +0 -45
  60. package/dist/node_modules/mariadb/lib/config/connection-options.js +0 -258
  61. package/dist/node_modules/mariadb/lib/config/pool-cluster-options.js +0 -19
  62. package/dist/node_modules/mariadb/lib/config/pool-options.js +0 -47
  63. package/dist/node_modules/mariadb/lib/connection-callback.js +0 -160
  64. package/dist/node_modules/mariadb/lib/connection.js +0 -1460
  65. package/dist/node_modules/mariadb/lib/const/capabilities.js +0 -64
  66. package/dist/node_modules/mariadb/lib/const/collations.js +0 -473
  67. package/dist/node_modules/mariadb/lib/const/connection_status.js +0 -13
  68. package/dist/node_modules/mariadb/lib/const/error-code.js +0 -1282
  69. package/dist/node_modules/mariadb/lib/const/field-detail.js +0 -35
  70. package/dist/node_modules/mariadb/lib/const/field-type.js +0 -71
  71. package/dist/node_modules/mariadb/lib/const/server-status.js +0 -30
  72. package/dist/node_modules/mariadb/lib/const/state-change.js +0 -12
  73. package/dist/node_modules/mariadb/lib/filtered-pool-cluster.js +0 -81
  74. package/dist/node_modules/mariadb/lib/io/bulk-packet.js +0 -590
  75. package/dist/node_modules/mariadb/lib/io/compression-input-stream.js +0 -141
  76. package/dist/node_modules/mariadb/lib/io/compression-output-stream.js +0 -171
  77. package/dist/node_modules/mariadb/lib/io/packet-input-stream.js +0 -193
  78. package/dist/node_modules/mariadb/lib/io/packet-node-encoded.js +0 -36
  79. package/dist/node_modules/mariadb/lib/io/packet-node-iconv.js +0 -37
  80. package/dist/node_modules/mariadb/lib/io/packet-output-stream.js +0 -502
  81. package/dist/node_modules/mariadb/lib/io/packet.js +0 -515
  82. package/dist/node_modules/mariadb/lib/io/rewrite-packet.js +0 -481
  83. package/dist/node_modules/mariadb/lib/misc/connection-information.js +0 -96
  84. package/dist/node_modules/mariadb/lib/misc/errors.js +0 -123
  85. package/dist/node_modules/mariadb/lib/misc/parse.js +0 -1033
  86. package/dist/node_modules/mariadb/lib/misc/utils.js +0 -298
  87. package/dist/node_modules/mariadb/lib/pool-base.js +0 -611
  88. package/dist/node_modules/mariadb/lib/pool-callback.js +0 -202
  89. package/dist/node_modules/mariadb/lib/pool-cluster-callback.js +0 -66
  90. package/dist/node_modules/mariadb/lib/pool-cluster.js +0 -407
  91. package/dist/node_modules/mariadb/lib/pool-promise.js +0 -108
  92. package/dist/node_modules/mariadb/node_modules/@types/node/assert/strict.d.ts +0 -8
  93. package/dist/node_modules/mariadb/node_modules/@types/node/assert.d.ts +0 -912
  94. package/dist/node_modules/mariadb/node_modules/@types/node/async_hooks.d.ts +0 -501
  95. package/dist/node_modules/mariadb/node_modules/@types/node/buffer.d.ts +0 -2232
  96. package/dist/node_modules/mariadb/node_modules/@types/node/child_process.d.ts +0 -1366
  97. package/dist/node_modules/mariadb/node_modules/@types/node/cluster.d.ts +0 -414
  98. package/dist/node_modules/mariadb/node_modules/@types/node/console.d.ts +0 -412
  99. package/dist/node_modules/mariadb/node_modules/@types/node/constants.d.ts +0 -18
  100. package/dist/node_modules/mariadb/node_modules/@types/node/crypto.d.ts +0 -3338
  101. package/dist/node_modules/mariadb/node_modules/@types/node/dgram.d.ts +0 -545
  102. package/dist/node_modules/mariadb/node_modules/@types/node/diagnostics_channel.d.ts +0 -152
  103. package/dist/node_modules/mariadb/node_modules/@types/node/dns/promises.d.ts +0 -370
  104. package/dist/node_modules/mariadb/node_modules/@types/node/dns.d.ts +0 -659
  105. package/dist/node_modules/mariadb/node_modules/@types/node/domain.d.ts +0 -169
  106. package/dist/node_modules/mariadb/node_modules/@types/node/events.d.ts +0 -651
  107. package/dist/node_modules/mariadb/node_modules/@types/node/fs/promises.d.ts +0 -1091
  108. package/dist/node_modules/mariadb/node_modules/@types/node/fs.d.ts +0 -3869
  109. package/dist/node_modules/mariadb/node_modules/@types/node/globals.d.ts +0 -294
  110. package/dist/node_modules/mariadb/node_modules/@types/node/globals.global.d.ts +0 -1
  111. package/dist/node_modules/mariadb/node_modules/@types/node/http.d.ts +0 -1396
  112. package/dist/node_modules/mariadb/node_modules/@types/node/http2.d.ts +0 -2101
  113. package/dist/node_modules/mariadb/node_modules/@types/node/https.d.ts +0 -391
  114. package/dist/node_modules/mariadb/node_modules/@types/node/index.d.ts +0 -129
  115. package/dist/node_modules/mariadb/node_modules/@types/node/inspector.d.ts +0 -2744
  116. package/dist/node_modules/mariadb/node_modules/@types/node/module.d.ts +0 -114
  117. package/dist/node_modules/mariadb/node_modules/@types/node/net.d.ts +0 -791
  118. package/dist/node_modules/mariadb/node_modules/@types/node/os.d.ts +0 -455
  119. package/dist/node_modules/mariadb/node_modules/@types/node/package.json +0 -220
  120. package/dist/node_modules/mariadb/node_modules/@types/node/path.d.ts +0 -180
  121. package/dist/node_modules/mariadb/node_modules/@types/node/perf_hooks.d.ts +0 -557
  122. package/dist/node_modules/mariadb/node_modules/@types/node/process.d.ts +0 -1481
  123. package/dist/node_modules/mariadb/node_modules/@types/node/punycode.d.ts +0 -117
  124. package/dist/node_modules/mariadb/node_modules/@types/node/querystring.d.ts +0 -131
  125. package/dist/node_modules/mariadb/node_modules/@types/node/readline.d.ts +0 -650
  126. package/dist/node_modules/mariadb/node_modules/@types/node/repl.d.ts +0 -424
  127. package/dist/node_modules/mariadb/node_modules/@types/node/stream/consumers.d.ts +0 -24
  128. package/dist/node_modules/mariadb/node_modules/@types/node/stream/promises.d.ts +0 -42
  129. package/dist/node_modules/mariadb/node_modules/@types/node/stream/web.d.ts +0 -330
  130. package/dist/node_modules/mariadb/node_modules/@types/node/stream.d.ts +0 -1249
  131. package/dist/node_modules/mariadb/node_modules/@types/node/string_decoder.d.ts +0 -67
  132. package/dist/node_modules/mariadb/node_modules/@types/node/timers/promises.d.ts +0 -68
  133. package/dist/node_modules/mariadb/node_modules/@types/node/timers.d.ts +0 -94
  134. package/dist/node_modules/mariadb/node_modules/@types/node/tls.d.ts +0 -1020
  135. package/dist/node_modules/mariadb/node_modules/@types/node/trace_events.d.ts +0 -161
  136. package/dist/node_modules/mariadb/node_modules/@types/node/tty.d.ts +0 -204
  137. package/dist/node_modules/mariadb/node_modules/@types/node/url.d.ts +0 -891
  138. package/dist/node_modules/mariadb/node_modules/@types/node/util.d.ts +0 -1594
  139. package/dist/node_modules/mariadb/node_modules/@types/node/v8.d.ts +0 -378
  140. package/dist/node_modules/mariadb/node_modules/@types/node/vm.d.ts +0 -507
  141. package/dist/node_modules/mariadb/node_modules/@types/node/wasi.d.ts +0 -158
  142. package/dist/node_modules/mariadb/node_modules/@types/node/worker_threads.d.ts +0 -649
  143. package/dist/node_modules/mariadb/node_modules/@types/node/zlib.d.ts +0 -517
  144. package/dist/node_modules/mariadb/package.json +0 -1
  145. package/dist/node_modules/mariadb/promise.js +0 -34
  146. package/dist/node_modules/mariadb/types/index.d.ts +0 -870
@@ -1,391 +0,0 @@
1
- /**
2
- * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
- * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/https.js)
5
- */
6
- declare module 'https' {
7
- import { Duplex } from 'node:stream';
8
- import * as tls from 'node:tls';
9
- import * as http from 'node:http';
10
- import { URL } from 'node:url';
11
- type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
12
- type RequestOptions = http.RequestOptions &
13
- tls.SecureContextOptions & {
14
- rejectUnauthorized?: boolean | undefined; // Defaults to true
15
- servername?: string | undefined; // SNI TLS Extension
16
- };
17
- interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
18
- rejectUnauthorized?: boolean | undefined;
19
- maxCachedSessions?: number | undefined;
20
- }
21
- /**
22
- * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
23
- * @since v0.4.5
24
- */
25
- class Agent extends http.Agent {
26
- constructor(options?: AgentOptions);
27
- options: AgentOptions;
28
- }
29
- interface Server extends http.Server {}
30
- /**
31
- * See `http.Server` for more information.
32
- * @since v0.3.4
33
- */
34
- class Server extends tls.Server {
35
- constructor(requestListener?: http.RequestListener);
36
- constructor(options: ServerOptions, requestListener?: http.RequestListener);
37
- addListener(event: string, listener: (...args: any[]) => void): this;
38
- addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
39
- addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
40
- addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
41
- addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
42
- addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
43
- addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
44
- addListener(event: 'close', listener: () => void): this;
45
- addListener(event: 'connection', listener: (socket: Duplex) => void): this;
46
- addListener(event: 'error', listener: (err: Error) => void): this;
47
- addListener(event: 'listening', listener: () => void): this;
48
- addListener(event: 'checkContinue', listener: http.RequestListener): this;
49
- addListener(event: 'checkExpectation', listener: http.RequestListener): this;
50
- addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
51
- addListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
52
- addListener(event: 'request', listener: http.RequestListener): this;
53
- addListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
54
- emit(event: string, ...args: any[]): boolean;
55
- emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
56
- emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
57
- emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
58
- emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
59
- emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
60
- emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
61
- emit(event: 'close'): boolean;
62
- emit(event: 'connection', socket: Duplex): boolean;
63
- emit(event: 'error', err: Error): boolean;
64
- emit(event: 'listening'): boolean;
65
- emit(event: 'checkContinue', req: http.IncomingMessage, res: http.ServerResponse): boolean;
66
- emit(event: 'checkExpectation', req: http.IncomingMessage, res: http.ServerResponse): boolean;
67
- emit(event: 'clientError', err: Error, socket: Duplex): boolean;
68
- emit(event: 'connect', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean;
69
- emit(event: 'request', req: http.IncomingMessage, res: http.ServerResponse): boolean;
70
- emit(event: 'upgrade', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean;
71
- on(event: string, listener: (...args: any[]) => void): this;
72
- on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
73
- on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
74
- on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
75
- on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
76
- on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
77
- on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
78
- on(event: 'close', listener: () => void): this;
79
- on(event: 'connection', listener: (socket: Duplex) => void): this;
80
- on(event: 'error', listener: (err: Error) => void): this;
81
- on(event: 'listening', listener: () => void): this;
82
- on(event: 'checkContinue', listener: http.RequestListener): this;
83
- on(event: 'checkExpectation', listener: http.RequestListener): this;
84
- on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
85
- on(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
86
- on(event: 'request', listener: http.RequestListener): this;
87
- on(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
88
- once(event: string, listener: (...args: any[]) => void): this;
89
- once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
90
- once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
91
- once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
92
- once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
93
- once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
94
- once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
95
- once(event: 'close', listener: () => void): this;
96
- once(event: 'connection', listener: (socket: Duplex) => void): this;
97
- once(event: 'error', listener: (err: Error) => void): this;
98
- once(event: 'listening', listener: () => void): this;
99
- once(event: 'checkContinue', listener: http.RequestListener): this;
100
- once(event: 'checkExpectation', listener: http.RequestListener): this;
101
- once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
102
- once(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
103
- once(event: 'request', listener: http.RequestListener): this;
104
- once(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
105
- prependListener(event: string, listener: (...args: any[]) => void): this;
106
- prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
107
- prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
108
- prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
109
- prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
110
- prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
111
- prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
112
- prependListener(event: 'close', listener: () => void): this;
113
- prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
114
- prependListener(event: 'error', listener: (err: Error) => void): this;
115
- prependListener(event: 'listening', listener: () => void): this;
116
- prependListener(event: 'checkContinue', listener: http.RequestListener): this;
117
- prependListener(event: 'checkExpectation', listener: http.RequestListener): this;
118
- prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
119
- prependListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
120
- prependListener(event: 'request', listener: http.RequestListener): this;
121
- prependListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
122
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
123
- prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
124
- prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
125
- prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
126
- prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
127
- prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
128
- prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
129
- prependOnceListener(event: 'close', listener: () => void): this;
130
- prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
131
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
132
- prependOnceListener(event: 'listening', listener: () => void): this;
133
- prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this;
134
- prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this;
135
- prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
136
- prependOnceListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
137
- prependOnceListener(event: 'request', listener: http.RequestListener): this;
138
- prependOnceListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
139
- }
140
- /**
141
- * ```js
142
- * // curl -k https://localhost:8000/
143
- * const https = require('https');
144
- * const fs = require('fs');
145
- *
146
- * const options = {
147
- * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
148
- * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
149
- * };
150
- *
151
- * https.createServer(options, (req, res) => {
152
- * res.writeHead(200);
153
- * res.end('hello world\n');
154
- * }).listen(8000);
155
- * ```
156
- *
157
- * Or
158
- *
159
- * ```js
160
- * const https = require('https');
161
- * const fs = require('fs');
162
- *
163
- * const options = {
164
- * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
165
- * passphrase: 'sample'
166
- * };
167
- *
168
- * https.createServer(options, (req, res) => {
169
- * res.writeHead(200);
170
- * res.end('hello world\n');
171
- * }).listen(8000);
172
- * ```
173
- * @since v0.3.4
174
- * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
175
- * @param requestListener A listener to be added to the `'request'` event.
176
- */
177
- function createServer(requestListener?: http.RequestListener): Server;
178
- function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
179
- /**
180
- * Makes a request to a secure web server.
181
- *
182
- * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
183
- * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
184
- *
185
- * `options` can be an object, a string, or a `URL` object. If `options` is a
186
- * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
187
- *
188
- * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
189
- * upload a file with a POST request, then write to the `ClientRequest` object.
190
- *
191
- * ```js
192
- * const https = require('https');
193
- *
194
- * const options = {
195
- * hostname: 'encrypted.google.com',
196
- * port: 443,
197
- * path: '/',
198
- * method: 'GET'
199
- * };
200
- *
201
- * const req = https.request(options, (res) => {
202
- * console.log('statusCode:', res.statusCode);
203
- * console.log('headers:', res.headers);
204
- *
205
- * res.on('data', (d) => {
206
- * process.stdout.write(d);
207
- * });
208
- * });
209
- *
210
- * req.on('error', (e) => {
211
- * console.error(e);
212
- * });
213
- * req.end();
214
- * ```
215
- *
216
- * Example using options from `tls.connect()`:
217
- *
218
- * ```js
219
- * const options = {
220
- * hostname: 'encrypted.google.com',
221
- * port: 443,
222
- * path: '/',
223
- * method: 'GET',
224
- * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
225
- * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
226
- * };
227
- * options.agent = new https.Agent(options);
228
- *
229
- * const req = https.request(options, (res) => {
230
- * // ...
231
- * });
232
- * ```
233
- *
234
- * Alternatively, opt out of connection pooling by not using an `Agent`.
235
- *
236
- * ```js
237
- * const options = {
238
- * hostname: 'encrypted.google.com',
239
- * port: 443,
240
- * path: '/',
241
- * method: 'GET',
242
- * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
243
- * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
244
- * agent: false
245
- * };
246
- *
247
- * const req = https.request(options, (res) => {
248
- * // ...
249
- * });
250
- * ```
251
- *
252
- * Example using a `URL` as `options`:
253
- *
254
- * ```js
255
- * const options = new URL('https://abc:xyz@example.com');
256
- *
257
- * const req = https.request(options, (res) => {
258
- * // ...
259
- * });
260
- * ```
261
- *
262
- * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
263
- *
264
- * ```js
265
- * const tls = require('tls');
266
- * const https = require('https');
267
- * const crypto = require('crypto');
268
- *
269
- * function sha256(s) {
270
- * return crypto.createHash('sha256').update(s).digest('base64');
271
- * }
272
- * const options = {
273
- * hostname: 'github.com',
274
- * port: 443,
275
- * path: '/',
276
- * method: 'GET',
277
- * checkServerIdentity: function(host, cert) {
278
- * // Make sure the certificate is issued to the host we are connected to
279
- * const err = tls.checkServerIdentity(host, cert);
280
- * if (err) {
281
- * return err;
282
- * }
283
- *
284
- * // Pin the public key, similar to HPKP pin-sha25 pinning
285
- * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
286
- * if (sha256(cert.pubkey) !== pubkey256) {
287
- * const msg = 'Certificate verification error: ' +
288
- * `The public key of '${cert.subject.CN}' ` +
289
- * 'does not match our pinned fingerprint';
290
- * return new Error(msg);
291
- * }
292
- *
293
- * // Pin the exact certificate, rather than the pub key
294
- * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
295
- * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
296
- * if (cert.fingerprint256 !== cert256) {
297
- * const msg = 'Certificate verification error: ' +
298
- * `The certificate of '${cert.subject.CN}' ` +
299
- * 'does not match our pinned fingerprint';
300
- * return new Error(msg);
301
- * }
302
- *
303
- * // This loop is informational only.
304
- * // Print the certificate and public key fingerprints of all certs in the
305
- * // chain. Its common to pin the public key of the issuer on the public
306
- * // internet, while pinning the public key of the service in sensitive
307
- * // environments.
308
- * do {
309
- * console.log('Subject Common Name:', cert.subject.CN);
310
- * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
311
- *
312
- * hash = crypto.createHash('sha256');
313
- * console.log(' Public key ping-sha256:', sha256(cert.pubkey));
314
- *
315
- * lastprint256 = cert.fingerprint256;
316
- * cert = cert.issuerCertificate;
317
- * } while (cert.fingerprint256 !== lastprint256);
318
- *
319
- * },
320
- * };
321
- *
322
- * options.agent = new https.Agent(options);
323
- * const req = https.request(options, (res) => {
324
- * console.log('All OK. Server matched our pinned cert or public key');
325
- * console.log('statusCode:', res.statusCode);
326
- * // Print the HPKP values
327
- * console.log('headers:', res.headers['public-key-pins']);
328
- *
329
- * res.on('data', (d) => {});
330
- * });
331
- *
332
- * req.on('error', (e) => {
333
- * console.error(e.message);
334
- * });
335
- * req.end();
336
- * ```
337
- *
338
- * Outputs for example:
339
- *
340
- * ```text
341
- * Subject Common Name: github.com
342
- * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
343
- * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
344
- * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
345
- * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
346
- * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
347
- * Subject Common Name: DigiCert High Assurance EV Root CA
348
- * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
349
- * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
350
- * All OK. Server matched our pinned cert or public key
351
- * statusCode: 200
352
- * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
353
- * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
354
- * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
355
- * ```
356
- * @since v0.3.6
357
- * @param options Accepts all `options` from `request`, with some differences in default values:
358
- */
359
- function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
360
- function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
361
- /**
362
- * Like `http.get()` but for HTTPS.
363
- *
364
- * `options` can be an object, a string, or a `URL` object. If `options` is a
365
- * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
366
- *
367
- * ```js
368
- * const https = require('https');
369
- *
370
- * https.get('https://encrypted.google.com/', (res) => {
371
- * console.log('statusCode:', res.statusCode);
372
- * console.log('headers:', res.headers);
373
- *
374
- * res.on('data', (d) => {
375
- * process.stdout.write(d);
376
- * });
377
- *
378
- * }).on('error', (e) => {
379
- * console.error(e);
380
- * });
381
- * ```
382
- * @since v0.3.6
383
- * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
384
- */
385
- function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
386
- function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
387
- let globalAgent: Agent;
388
- }
389
- declare module 'node:https' {
390
- export * from 'https';
391
- }
@@ -1,129 +0,0 @@
1
- // Type definitions for non-npm package Node.js 17.0
2
- // Project: https://nodejs.org/
3
- // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
- // DefinitelyTyped <https://github.com/DefinitelyTyped>
5
- // Alberto Schiabel <https://github.com/jkomyno>
6
- // Alvis HT Tang <https://github.com/alvis>
7
- // Andrew Makarov <https://github.com/r3nya>
8
- // Benjamin Toueg <https://github.com/btoueg>
9
- // Chigozirim C. <https://github.com/smac89>
10
- // David Junger <https://github.com/touffy>
11
- // Deividas Bakanas <https://github.com/DeividasBakanas>
12
- // Eugene Y. Q. Shen <https://github.com/eyqs>
13
- // Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
14
- // Huw <https://github.com/hoo29>
15
- // Kelvin Jin <https://github.com/kjin>
16
- // Klaus Meinhardt <https://github.com/ajafff>
17
- // Lishude <https://github.com/islishude>
18
- // Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
19
- // Mohsen Azimi <https://github.com/mohsen1>
20
- // Nicolas Even <https://github.com/n-e>
21
- // Nikita Galkin <https://github.com/galkin>
22
- // Parambir Singh <https://github.com/parambirs>
23
- // Sebastian Silbermann <https://github.com/eps1lon>
24
- // Simon Schick <https://github.com/SimonSchick>
25
- // Thomas den Hollander <https://github.com/ThomasdenH>
26
- // Wilco Bakker <https://github.com/WilcoBakker>
27
- // wwwy3y3 <https://github.com/wwwy3y3>
28
- // Samuel Ainsworth <https://github.com/samuela>
29
- // Kyle Uehlein <https://github.com/kuehlein>
30
- // Thanik Bhongbhibhat <https://github.com/bhongy>
31
- // Marcin Kopacz <https://github.com/chyzwar>
32
- // Trivikram Kamat <https://github.com/trivikr>
33
- // Junxiao Shi <https://github.com/yoursunny>
34
- // Ilia Baryshnikov <https://github.com/qwelias>
35
- // ExE Boss <https://github.com/ExE-Boss>
36
- // Piotr Błażejewicz <https://github.com/peterblazejewicz>
37
- // Anna Henningsen <https://github.com/addaleax>
38
- // Victor Perin <https://github.com/victorperin>
39
- // Yongsheng Zhang <https://github.com/ZYSzys>
40
- // NodeJS Contributors <https://github.com/NodeJS>
41
- // Linus Unnebäck <https://github.com/LinusU>
42
- // wafuwafu13 <https://github.com/wafuwafu13>
43
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
44
-
45
- /**
46
- * License for programmatically and manually incorporated
47
- * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
48
- *
49
- * Copyright Node.js contributors. All rights reserved.
50
- * Permission is hereby granted, free of charge, to any person obtaining a copy
51
- * of this software and associated documentation files (the "Software"), to
52
- * deal in the Software without restriction, including without limitation the
53
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
54
- * sell copies of the Software, and to permit persons to whom the Software is
55
- * furnished to do so, subject to the following conditions:
56
- *
57
- * The above copyright notice and this permission notice shall be included in
58
- * all copies or substantial portions of the Software.
59
- *
60
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
65
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
66
- * IN THE SOFTWARE.
67
- */
68
-
69
- // NOTE: These definitions support NodeJS and TypeScript 3.7+.
70
-
71
- // Reference required types from the default lib:
72
- /// <reference lib="es2020" />
73
- /// <reference lib="esnext.asynciterable" />
74
- /// <reference lib="esnext.intl" />
75
- /// <reference lib="esnext.bigint" />
76
-
77
- // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
78
- /// <reference path="assert.d.ts" />
79
- /// <reference path="assert/strict.d.ts" />
80
- /// <reference path="globals.d.ts" />
81
- /// <reference path="async_hooks.d.ts" />
82
- /// <reference path="buffer.d.ts" />
83
- /// <reference path="child_process.d.ts" />
84
- /// <reference path="cluster.d.ts" />
85
- /// <reference path="console.d.ts" />
86
- /// <reference path="constants.d.ts" />
87
- /// <reference path="crypto.d.ts" />
88
- /// <reference path="dgram.d.ts" />
89
- /// <reference path="diagnostics_channel.d.ts" />
90
- /// <reference path="dns.d.ts" />
91
- /// <reference path="dns/promises.d.ts" />
92
- /// <reference path="dns/promises.d.ts" />
93
- /// <reference path="domain.d.ts" />
94
- /// <reference path="events.d.ts" />
95
- /// <reference path="fs.d.ts" />
96
- /// <reference path="fs/promises.d.ts" />
97
- /// <reference path="http.d.ts" />
98
- /// <reference path="http2.d.ts" />
99
- /// <reference path="https.d.ts" />
100
- /// <reference path="inspector.d.ts" />
101
- /// <reference path="module.d.ts" />
102
- /// <reference path="net.d.ts" />
103
- /// <reference path="os.d.ts" />
104
- /// <reference path="path.d.ts" />
105
- /// <reference path="perf_hooks.d.ts" />
106
- /// <reference path="process.d.ts" />
107
- /// <reference path="punycode.d.ts" />
108
- /// <reference path="querystring.d.ts" />
109
- /// <reference path="readline.d.ts" />
110
- /// <reference path="repl.d.ts" />
111
- /// <reference path="stream.d.ts" />
112
- /// <reference path="stream/promises.d.ts" />
113
- /// <reference path="stream/consumers.d.ts" />
114
- /// <reference path="stream/web.d.ts" />
115
- /// <reference path="string_decoder.d.ts" />
116
- /// <reference path="timers.d.ts" />
117
- /// <reference path="timers/promises.d.ts" />
118
- /// <reference path="tls.d.ts" />
119
- /// <reference path="trace_events.d.ts" />
120
- /// <reference path="tty.d.ts" />
121
- /// <reference path="url.d.ts" />
122
- /// <reference path="util.d.ts" />
123
- /// <reference path="v8.d.ts" />
124
- /// <reference path="vm.d.ts" />
125
- /// <reference path="wasi.d.ts" />
126
- /// <reference path="worker_threads.d.ts" />
127
- /// <reference path="zlib.d.ts" />
128
-
129
- /// <reference path="globals.global.d.ts" />