@suveren/gateway 0.8.4 → 0.8.6

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 (97) hide show
  1. package/dist/control-plane/index.mjs +170 -83
  2. package/dist/mcp-server/http.mjs +75 -0
  3. package/dist/ui/assets/index-BJqF5rmx.css +1 -0
  4. package/dist/ui/assets/index-DWpjjPIf.js +110 -0
  5. package/dist/ui/index.html +2 -2
  6. package/node_modules/@types/node/README.md +2 -2
  7. package/node_modules/@types/node/buffer.d.ts +1 -0
  8. package/node_modules/@types/node/child_process.d.ts +1 -1
  9. package/node_modules/@types/node/crypto.d.ts +20 -8
  10. package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  11. package/node_modules/@types/node/ffi.d.ts +14 -0
  12. package/node_modules/@types/node/http.d.ts +1 -1
  13. package/node_modules/@types/node/http2.d.ts +3 -2
  14. package/node_modules/@types/node/net.d.ts +16 -4
  15. package/node_modules/@types/node/package.json +3 -18
  16. package/node_modules/@types/node/perf_hooks.d.ts +31 -19
  17. package/node_modules/@types/node/process.d.ts +1 -0
  18. package/node_modules/@types/node/quic.d.ts +45 -5
  19. package/node_modules/@types/node/stream/iter.d.ts +9 -12
  20. package/node_modules/@types/node/stream/web.d.ts +20 -0
  21. package/node_modules/@types/node/test/reporters.d.ts +1 -0
  22. package/node_modules/@types/node/test.d.ts +72 -0
  23. package/node_modules/@types/node/tls.d.ts +40 -25
  24. package/node_modules/@types/node/vfs.d.ts +7 -6
  25. package/node_modules/@types/node/vm.d.ts +2 -1
  26. package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
  27. package/node_modules/@types/node/worker_threads.d.ts +4 -1
  28. package/node_modules/@types/node/zlib.d.ts +17 -0
  29. package/node_modules/body-parser/HISTORY.md +156 -145
  30. package/node_modules/body-parser/package.json +2 -2
  31. package/node_modules/express/History.md +583 -576
  32. package/node_modules/express/lib/request.js +2 -2
  33. package/node_modules/express/package.json +3 -3
  34. package/node_modules/fast-uri/index.js +10 -6
  35. package/node_modules/fast-uri/package.json +1 -1
  36. package/node_modules/fast-uri/test/security-normalization.test.js +38 -0
  37. package/node_modules/hono/README.md +1 -1
  38. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +5 -4
  39. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +5 -4
  40. package/node_modules/hono/dist/cjs/context.js +1 -1
  41. package/node_modules/hono/dist/cjs/helper/accepts/accepts.js +1 -1
  42. package/node_modules/hono/dist/cjs/jsx/dom/render.js +44 -8
  43. package/node_modules/hono/dist/cjs/middleware/language/language.js +4 -1
  44. package/node_modules/hono/dist/cjs/request.js +4 -1
  45. package/node_modules/hono/dist/cjs/utils/accept.js +4 -7
  46. package/node_modules/hono/dist/context.js +1 -1
  47. package/node_modules/hono/dist/helper/accepts/accepts.js +1 -1
  48. package/node_modules/hono/dist/jsx/dom/render.js +44 -8
  49. package/node_modules/hono/dist/middleware/language/language.js +4 -1
  50. package/node_modules/hono/dist/request.js +4 -1
  51. package/node_modules/hono/dist/types/helper/proxy/index.d.ts +1 -1
  52. package/node_modules/hono/dist/types/helper/route/index.d.ts +2 -2
  53. package/node_modules/hono/dist/types/middleware/combine/index.d.ts +3 -1
  54. package/node_modules/hono/dist/types/utils/types.d.ts +1 -1
  55. package/node_modules/hono/dist/utils/accept.js +4 -7
  56. package/node_modules/hono/package.json +1 -1
  57. package/node_modules/ip-address/README.md +114 -114
  58. package/node_modules/ip-address/dist/common.d.ts +5 -0
  59. package/node_modules/ip-address/dist/common.js +12 -0
  60. package/node_modules/ip-address/dist/common.js.map +1 -1
  61. package/node_modules/ip-address/dist/ipv4.d.ts +10 -3
  62. package/node_modules/ip-address/dist/ipv4.js +20 -5
  63. package/node_modules/ip-address/dist/ipv4.js.map +1 -1
  64. package/node_modules/ip-address/dist/ipv6.d.ts +5 -1
  65. package/node_modules/ip-address/dist/ipv6.js +18 -3
  66. package/node_modules/ip-address/dist/ipv6.js.map +1 -1
  67. package/node_modules/ip-address/package.json +1 -1
  68. package/node_modules/proxy-addr/HISTORY.md +60 -54
  69. package/node_modules/proxy-addr/README.md +1 -1
  70. package/node_modules/proxy-addr/index.js +32 -0
  71. package/node_modules/proxy-addr/package.json +8 -4
  72. package/node_modules/qs/.github/THREAT_MODEL.md +3 -3
  73. package/node_modules/qs/CHANGELOG.md +15 -0
  74. package/node_modules/qs/README.md +19 -1
  75. package/node_modules/qs/dist/qs.js +21 -21
  76. package/node_modules/qs/eslint.config.mjs +1 -1
  77. package/node_modules/qs/lib/parse.js +3 -4
  78. package/node_modules/qs/lib/stringify.js +23 -8
  79. package/node_modules/qs/lib/utils.js +10 -3
  80. package/node_modules/qs/package.json +4 -4
  81. package/node_modules/qs/test/parse.js +192 -3
  82. package/node_modules/qs/test/stringify.js +317 -0
  83. package/node_modules/qs/test/utils.js +12 -0
  84. package/node_modules/undici-types/client.d.ts +8 -3
  85. package/node_modules/undici-types/connector.d.ts +1 -0
  86. package/node_modules/undici-types/cookies.d.ts +1 -1
  87. package/node_modules/undici-types/dispatcher.d.ts +3 -3
  88. package/node_modules/undici-types/errors.d.ts +10 -0
  89. package/node_modules/undici-types/fetch.d.ts +5 -1
  90. package/node_modules/undici-types/handlers.d.ts +2 -0
  91. package/node_modules/undici-types/interceptors.d.ts +1 -1
  92. package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
  93. package/node_modules/undici-types/package.json +1 -1
  94. package/node_modules/undici-types/proxy-agent.d.ts +7 -0
  95. package/package.json +1 -1
  96. package/dist/ui/assets/index-BYVb_0oG.css +0 -1
  97. package/dist/ui/assets/index-Z0OQ-dd1.js +0 -110
@@ -375,6 +375,7 @@ declare module "node:test" {
375
375
  "test:enqueue": [data: EventData.TestEnqueue];
376
376
  "test:fail": [data: EventData.TestFail];
377
377
  "test:interrupted": [data: EventData.TestInterrupted];
378
+ "test:log": [data: EventData.TestLog];
378
379
  "test:pass": [data: EventData.TestPass];
379
380
  "test:plan": [data: EventData.TestPlan];
380
381
  "test:start": [data: EventData.TestStart];
@@ -455,6 +456,13 @@ declare module "node:test" {
455
456
  * `undefined` if the test was run through the REPL.
456
457
  */
457
458
  column?: number;
459
+ /**
460
+ * The path of the test file that was
461
+ * executed as the entry point of the child process that emitted this event.
462
+ * Only present when tests run with process isolation. May differ from
463
+ * `file` when the test is defined in a module imported by the entry file.
464
+ */
465
+ entryFile?: string;
458
466
  /**
459
467
  * The path of the test file, `undefined` if test was run through the REPL.
460
468
  */
@@ -845,6 +853,36 @@ declare module "node:test" {
845
853
  */
846
854
  tests: TestStart[];
847
855
  }
856
+ interface TestLog extends LocationInfo {
857
+ /**
858
+ * The structured payload passed to `context.log`, or
859
+ * `undefined` if none was provided. The test runner does not interpret this
860
+ * value.
861
+ */
862
+ data: unknown;
863
+ /**
864
+ * The log message.
865
+ */
866
+ message: string;
867
+ /**
868
+ * The test name.
869
+ */
870
+ name: string;
871
+ /**
872
+ * The nesting level of the test.
873
+ */
874
+ nesting: number;
875
+ /**
876
+ * The `testId` of the enclosing test, or
877
+ * `undefined` for top-level tests.
878
+ */
879
+ parentId: number | undefined;
880
+ /**
881
+ * A numeric identifier for the test instance that emitted
882
+ * the log message.
883
+ */
884
+ testId: number;
885
+ }
848
886
  interface TestPass extends LocationInfo {
849
887
  /**
850
888
  * Additional execution metadata.
@@ -1130,6 +1168,25 @@ declare module "node:test" {
1130
1168
  * @param message Message to be reported.
1131
1169
  */
1132
1170
  diagnostic(message: string): void;
1171
+ /**
1172
+ * This function is used to write a log message to the output. Unlike
1173
+ * `context.diagnostic`, the resulting `'test:log'` event is emitted
1174
+ * immediately, in the order that the tests execute, rather than being buffered
1175
+ * until the test reports its results. This function does not return a value.
1176
+ *
1177
+ * ```js
1178
+ * test('top level test', (t) => {
1179
+ * t.log('fetched user', { userId: 42 });
1180
+ * t.log('retrying flaky endpoint', { attempt: 3 });
1181
+ * });
1182
+ * ```
1183
+ * @since v26.6.0
1184
+ * @param message Message to be reported.
1185
+ * @param data Optional structured payload attached to the message. The test
1186
+ * runner passes it through untouched. When tests run with process isolation,
1187
+ * this value must be compatible with the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
1188
+ */
1189
+ log(message: string, data?: unknown): void;
1133
1190
  /**
1134
1191
  * The absolute path of the test file that created the current test. If a test file imports
1135
1192
  * additional modules that generate tests, the imported tests will return the path of the root test file.
@@ -1492,6 +1549,21 @@ declare module "node:test" {
1492
1549
  * @param message A diagnostic message to output.
1493
1550
  */
1494
1551
  diagnostic(message: string): void;
1552
+ /**
1553
+ * Write a log message to the output. The resulting `'test:log'` event is
1554
+ * emitted immediately, in the order that the tests execute.
1555
+ *
1556
+ * ```js
1557
+ * test.describe('my suite', (suite) => {
1558
+ * suite.log('Suite log message');
1559
+ * });
1560
+ * ```
1561
+ * @since v26.6.0
1562
+ * @param message Message to be reported.
1563
+ * @param data Optional structured payload attached to the message. The test
1564
+ * runner passes it through untouched.
1565
+ */
1566
+ log(message: string, data?: unknown): void;
1495
1567
  }
1496
1568
  interface TestOptions {
1497
1569
  /**
@@ -219,6 +219,13 @@ declare module "node:tls" {
219
219
  * @since v0.11.4
220
220
  */
221
221
  authorized: boolean;
222
+ /**
223
+ * The negotiated ALPN protocol. This is `null` before the handshake completes.
224
+ * Once the handshake completes, it settles as either the negotiated protocol
225
+ * name, or `false` if the peers did not negotiate an ALPN protocol.
226
+ * @since v6.0.0
227
+ */
228
+ alpnProtocol: string | false | null;
222
229
  /**
223
230
  * Returns the reason why the peer's certificate was not been verified. This
224
231
  * property is set only when `tlsSocket.authorized === false`.
@@ -230,16 +237,6 @@ declare module "node:tls" {
230
237
  * @since v0.11.4
231
238
  */
232
239
  encrypted: true;
233
- /**
234
- * String containing the selected ALPN protocol.
235
- * Before a handshake has completed, this value is always null.
236
- * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
237
- */
238
- alpnProtocol: string | false | null;
239
- /**
240
- * String containing the server name requested via SNI (Server Name Indication) TLS extension.
241
- */
242
- servername: string | false | null;
243
240
  /**
244
241
  * Returns an object representing the local certificate. The returned object has
245
242
  * some properties corresponding to the fields of the certificate.
@@ -270,11 +267,19 @@ declare module "node:tls" {
270
267
  */
271
268
  getCipher(): CipherNameAndProtocol;
272
269
  /**
273
- * Returns an object representing the type, name, and size of parameter of
274
- * an ephemeral key exchange in `perfect forward secrecy` on a client
275
- * connection. It returns an empty object when the key exchange is not
276
- * ephemeral. As this is only supported on a client socket; `null` is returned
277
- * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`.
270
+ * Returns an object describing ephemeral key agreement in [perfect forward
271
+ * secrecy](https://nodejs.org/docs/latest-v26.x/api/tls.html#perfect-forward-secrecy) on a client connection. It returns an empty object when the key
272
+ * agreement is not ephemeral. As this is only supported on a client socket;
273
+ * `null` is returned if called on a server socket. The supported types are `'DH'`,
274
+ * `'ECDH'`, and `'TLSGroup'`. For `'DH'` and `'ECDH'`, the object describes peer
275
+ * temporary key parameters. For `'TLSGroup'`, the object identifies the negotiated
276
+ * TLS Supported Group used for key agreement when a peer temporary key object is
277
+ * not available.
278
+ *
279
+ * The `name` property is available only when type is `'ECDH'` or `'TLSGroup'`. The
280
+ * `size` property is not available when type is `'TLSGroup'`. For `'TLSGroup'`,
281
+ * `name` is the negotiated TLS Supported Group name. Standardized TLS group names
282
+ * and code points are listed in the [IANA TLS Supported Groups registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8).
278
283
  *
279
284
  * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`.
280
285
  * @since v5.0.0
@@ -394,6 +399,13 @@ declare module "node:tls" {
394
399
  },
395
400
  callback: (err: Error | null) => void,
396
401
  ): undefined | boolean;
402
+ /**
403
+ * The SNI (Server Name Indication) host name associated with the socket. This is
404
+ * `null` before the handshake completes. Once the handshake completes it settles
405
+ * as either the host name string, or `false` if SNI was not used.
406
+ * @since v0.11.3
407
+ */
408
+ servername: string | false | null;
397
409
  /**
398
410
  * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket.
399
411
  * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`.
@@ -822,13 +834,16 @@ declare module "node:tls" {
822
834
  */
823
835
  dhparam?: string | Buffer | undefined;
824
836
  /**
825
- * A string describing a named curve or a colon separated list of curve
826
- * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
827
- * agreement. Set to auto to select the curve automatically. Use
828
- * crypto.getCurves() to obtain a list of available curve names. On
829
- * recent releases, openssl ecparam -list_curves will also display the
830
- * name and description of each available elliptic curve. Default:
831
- * tls.DEFAULT_ECDH_CURVE.
837
+ * A string describing a named curve, TLS group, or
838
+ * colon-separated list of named curves or TLS groups to use for key agreement,
839
+ * for example `P-521:P-384:P-256`, `X25519`, or `X25519MLKEM768`. The
840
+ * historical name of this option refers to ECDH key agreement in TLSv1.2 and
841
+ * below. In TLSv1.3, this option configures the TLS Supported Groups and
842
+ * key share groups offered or accepted by the TLS stack. Set to `auto` to
843
+ * select the group automatically. Use `crypto.getCurves()` to obtain a
844
+ * list of available elliptic curve names. For TLS group names, use
845
+ * `openssl list -tls-groups` or consult the [IANA TLS Supported Groups
846
+ * registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8).
832
847
  */
833
848
  ecdhCurve?: string | undefined;
834
849
  /**
@@ -1167,9 +1182,9 @@ declare module "node:tls" {
1167
1182
  */
1168
1183
  function setDefaultCACertificates(certs: ReadonlyArray<string | NodeJS.ArrayBufferView>): void;
1169
1184
  /**
1170
- * The default curve name to use for ECDH key agreement in a tls server.
1171
- * The default value is `'auto'`. See `{@link createSecureContext()}` for further
1172
- * information.
1185
+ * The default named curve or TLS group list to use for key agreement in a TLS
1186
+ * server. The default value is `'auto'`. See `tls.createSecureContext()` for
1187
+ * further information.
1173
1188
  * @since v0.11.13
1174
1189
  */
1175
1190
  let DEFAULT_ECDH_CURVE: string;
@@ -182,10 +182,11 @@ declare module "node:vfs" {
182
182
  setReadOnly(): void;
183
183
  }
184
184
  /**
185
- * A provider that wraps a directory (i.e. one on the actual file system) and exposes its
186
- * contents through the VFS API. All VFS paths are resolved relative to
187
- * the root and verified to stay inside it; symbolic links resolving
188
- * outside the root are rejected.
185
+ * A provider that wraps a directory (i.e. one on the actual file system) and
186
+ * exposes its contents through the VFS API. All VFS paths are resolved relative to
187
+ * the root and verified to stay inside it; symbolic links resolving outside the
188
+ * root are rejected. This path mapping is not a sandbox or access-control
189
+ * mechanism.
189
190
  * @since v26.4.0
190
191
  */
191
192
  class RealFSProvider extends VirtualProvider {
@@ -193,8 +194,8 @@ declare module "node:vfs" {
193
194
  * ```js
194
195
  * const vfs = require('node:vfs');
195
196
  *
196
- * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/sandbox'));
197
- * realVfs.writeFileSync('/file.txt', 'hello'); // writes /tmp/sandbox/file.txt
197
+ * const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/vfs-root'));
198
+ * realVfs.writeFileSync('/file.txt', 'hello'); // writes /tmp/vfs-root/file.txt
198
199
  * ```
199
200
  * @since v26.4.0
200
201
  * @param rootPath The absolute file-system path to use as the root.
@@ -886,6 +886,7 @@ declare module "node:vm" {
886
886
  * const module = new vm.SourceTextModule(
887
887
  * 'Object.getPrototypeOf(import.meta.prop).secret = secret;',
888
888
  * {
889
+ * context: contextifiedObject,
889
890
  * initializeImportMeta(meta) {
890
891
  * // Note: this object is created in the top context. As such,
891
892
  * // Object.getPrototypeOf(import.meta.prop) points to the
@@ -904,7 +905,7 @@ declare module "node:vm" {
904
905
  * // To fix this problem, replace
905
906
  * // meta.prop = {};
906
907
  * // above with
907
- * // meta.prop = vm.runInContext('{}', contextifiedObject);
908
+ * // meta.prop = vm.runInContext('({})', contextifiedObject);
908
909
  * ```
909
910
  * @param code JavaScript Module code to parse
910
911
  */
@@ -19,6 +19,8 @@ type _ReadableStreamDefaultController<R = any> = typeof globalThis extends { onm
19
19
  : webstreams.ReadableStreamDefaultController<R>;
20
20
  type _ReadableStreamDefaultReader<R = any> = typeof globalThis extends { onmessage: any } ? {}
21
21
  : webstreams.ReadableStreamDefaultReader<R>;
22
+ type _ReadableWritablePair<R = any, W = any> = typeof globalThis extends { onmessage: any } ? {}
23
+ : webstreams.ReadableWritablePair<R, W>;
22
24
  type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {} : webstreams.TextDecoderStream;
23
25
  type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {} : webstreams.TextEncoderStream;
24
26
  type _TransformStream<I = any, O = any> = typeof globalThis extends { onmessage: any } ? {}
@@ -82,6 +84,8 @@ declare global {
82
84
  ? T
83
85
  : typeof webstreams.ReadableStreamDefaultReader;
84
86
 
87
+ interface ReadableWritablePair<R = any, W = any> extends _ReadableWritablePair<R, W> {}
88
+
85
89
  interface TextDecoderStream extends _TextDecoderStream {}
86
90
  var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T
87
91
  : typeof webstreams.TextDecoderStream;
@@ -6,6 +6,7 @@ declare module "node:worker_threads" {
6
6
  NodeEventTarget,
7
7
  } from "node:events";
8
8
  import { FileHandle } from "node:fs/promises";
9
+ import { Server, Socket } from "node:net";
9
10
  import { Performance } from "node:perf_hooks";
10
11
  import { Readable, Writable } from "node:stream";
11
12
  import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
@@ -514,7 +515,9 @@ declare module "node:worker_threads" {
514
515
  | FileHandle
515
516
  | ReadableStream
516
517
  | WritableStream
517
- | TransformStream;
518
+ | TransformStream
519
+ | Server
520
+ | Socket;
518
521
  interface LockGrantedCallback<T> {
519
522
  (lock: Lock | null): T;
520
523
  }
@@ -32,6 +32,13 @@ declare module "node:zlib" {
32
32
  * @default buffer.kMaxLength
33
33
  */
34
34
  maxOutputLength?: number | undefined;
35
+ /**
36
+ * If `true`, decompression fails when
37
+ * trailing input is detected after the end of the compressed stream. This
38
+ * includes unreadable bytes and, when decompressing gzip, additional gzip
39
+ * members following the first member. **Default:** `false`
40
+ */
41
+ rejectGarbageAfterEnd?: boolean | undefined;
35
42
  }
36
43
  interface BrotliOptions {
37
44
  /**
@@ -63,6 +70,11 @@ declare module "node:zlib" {
63
70
  * If `true`, returns an object with `buffer` and `engine`.
64
71
  */
65
72
  info?: boolean | undefined;
73
+ /**
74
+ * If `true`, decompression fails when
75
+ * input remains after the first complete compressed stream. **Default:** `false`
76
+ */
77
+ rejectGarbageAfterEnd?: boolean | undefined;
66
78
  }
67
79
  interface ZstdOptions {
68
80
  /**
@@ -98,6 +110,11 @@ declare module "node:zlib" {
98
110
  * @since v24.6.0
99
111
  */
100
112
  dictionary?: NodeJS.ArrayBufferView | undefined;
113
+ /**
114
+ * If `true`, decompression fails when
115
+ * input remains after the first complete compressed stream. **Default:** `false`
116
+ */
117
+ rejectGarbageAfterEnd?: boolean | undefined;
101
118
  }
102
119
  interface Zlib {
103
120
  readonly bytesWritten: number;