@suveren/gateway 0.2.12 → 0.3.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.
Files changed (170) hide show
  1. package/README.md +21 -7
  2. package/dist/control-plane/index.mjs +146 -2
  3. package/dist/mcp-server/http.mjs +80 -38
  4. package/dist/ui/assets/index-RkZBhIxU.js +105 -0
  5. package/dist/ui/index.html +1 -1
  6. package/node_modules/@hap/core/dist/index.d.mts +147 -3
  7. package/node_modules/@hap/core/dist/index.d.ts +147 -3
  8. package/node_modules/@hap/core/dist/index.js +74 -10
  9. package/node_modules/@hap/core/dist/index.mjs +69 -10
  10. package/node_modules/@hap/core/package.json +1 -1
  11. package/node_modules/@hap/core/src/gatekeeper.ts +4 -4
  12. package/node_modules/@hap/core/src/identity.ts +77 -0
  13. package/node_modules/@hap/core/src/index.ts +2 -0
  14. package/node_modules/@hap/core/src/intent-disclosure.ts +69 -0
  15. package/node_modules/@hap/core/src/types.ts +62 -2
  16. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/README.md +16 -1
  17. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/index.js +4 -20
  18. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/read.js +17 -17
  19. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/types/json.js +60 -32
  20. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/types/raw.js +3 -3
  21. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/types/text.js +3 -3
  22. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/types/urlencoded.js +16 -20
  23. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/lib/utils.js +18 -16
  24. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
  25. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type/README.md +69 -0
  26. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +26 -0
  27. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type/dist/index.js +170 -0
  28. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
  29. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/node_modules/content-type/package.json +52 -0
  30. package/node_modules/@modelcontextprotocol/sdk/node_modules/body-parser/package.json +23 -10
  31. package/node_modules/@types/node/README.md +1 -1
  32. package/node_modules/@types/node/assert/strict.d.ts +10 -1
  33. package/node_modules/@types/node/assert.d.ts +144 -17
  34. package/node_modules/@types/node/async_hooks.d.ts +9 -9
  35. package/node_modules/@types/node/buffer.d.ts +0 -5
  36. package/node_modules/@types/node/child_process.d.ts +17 -21
  37. package/node_modules/@types/node/cluster.d.ts +13 -13
  38. package/node_modules/@types/node/console.d.ts +1 -1
  39. package/node_modules/@types/node/crypto.d.ts +454 -571
  40. package/node_modules/@types/node/diagnostics_channel.d.ts +37 -29
  41. package/node_modules/@types/node/dns.d.ts +14 -14
  42. package/node_modules/@types/node/events.d.ts +3 -3
  43. package/node_modules/@types/node/fs/promises.d.ts +4 -4
  44. package/node_modules/@types/node/fs.d.ts +3 -12
  45. package/node_modules/@types/node/globals.d.ts +4 -4
  46. package/node_modules/@types/node/http.d.ts +5 -5
  47. package/node_modules/@types/node/http2.d.ts +5 -1
  48. package/node_modules/@types/node/index.d.ts +0 -3
  49. package/node_modules/@types/node/inspector.d.ts +1 -1
  50. package/node_modules/@types/node/module.d.ts +16 -45
  51. package/node_modules/@types/node/net.d.ts +1 -1
  52. package/node_modules/@types/node/os.d.ts +2 -2
  53. package/node_modules/@types/node/package.json +4 -4
  54. package/node_modules/@types/node/perf_hooks.d.ts +1 -9
  55. package/node_modules/@types/node/process.d.ts +11 -11
  56. package/node_modules/@types/node/readline.d.ts +12 -11
  57. package/node_modules/@types/node/repl.d.ts +10 -10
  58. package/node_modules/@types/node/sqlite.d.ts +1 -1
  59. package/node_modules/@types/node/stream/promises.d.ts +2 -2
  60. package/node_modules/@types/node/stream/web.d.ts +1 -1
  61. package/node_modules/@types/node/stream.d.ts +5 -5
  62. package/node_modules/@types/node/test/reporters.d.ts +1 -1
  63. package/node_modules/@types/node/test.d.ts +8 -8
  64. package/node_modules/@types/node/tls.d.ts +1 -1
  65. package/node_modules/@types/node/ts5.6/index.d.ts +1 -4
  66. package/node_modules/@types/node/ts5.7/index.d.ts +0 -3
  67. package/node_modules/@types/node/url.d.ts +3 -3
  68. package/node_modules/@types/node/util/types.d.ts +1 -1
  69. package/node_modules/@types/node/util.d.ts +3 -20
  70. package/node_modules/@types/node/v8.d.ts +1 -1
  71. package/node_modules/@types/node/vm.d.ts +9 -9
  72. package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  73. package/node_modules/@types/node/worker_threads.d.ts +2 -5
  74. package/node_modules/@types/node/zlib.d.ts +3 -3
  75. package/node_modules/fast-uri/index.js +1 -1
  76. package/node_modules/fast-uri/package.json +1 -1
  77. package/node_modules/fast-uri/test/security.test.js +28 -0
  78. package/node_modules/hono/dist/adapter/aws-lambda/handler.js +14 -20
  79. package/node_modules/hono/dist/adapter/lambda-edge/handler.js +8 -2
  80. package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +14 -20
  81. package/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +8 -2
  82. package/node_modules/hono/dist/cjs/helper/css/common.js +3 -1
  83. package/node_modules/hono/dist/cjs/helper/css/index.js +9 -1
  84. package/node_modules/hono/dist/cjs/jsx/base.js +8 -14
  85. package/node_modules/hono/dist/cjs/jsx/components.js +41 -21
  86. package/node_modules/hono/dist/cjs/jsx/context.js +131 -5
  87. package/node_modules/hono/dist/cjs/jsx/streaming.js +9 -7
  88. package/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +1 -1
  89. package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -5
  90. package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -32
  91. package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +1 -1
  92. package/node_modules/hono/dist/cjs/middleware/timing/timing.js +3 -1
  93. package/node_modules/hono/dist/cjs/utils/ipaddr.js +6 -1
  94. package/node_modules/hono/dist/helper/css/common.js +3 -1
  95. package/node_modules/hono/dist/helper/css/index.js +9 -1
  96. package/node_modules/hono/dist/jsx/base.js +15 -15
  97. package/node_modules/hono/dist/jsx/components.js +42 -22
  98. package/node_modules/hono/dist/jsx/context.js +129 -5
  99. package/node_modules/hono/dist/jsx/streaming.js +10 -8
  100. package/node_modules/hono/dist/middleware/bearer-auth/index.js +1 -1
  101. package/node_modules/hono/dist/middleware/cors/index.js +2 -5
  102. package/node_modules/hono/dist/middleware/language/language.js +10 -32
  103. package/node_modules/hono/dist/middleware/serve-static/index.js +1 -1
  104. package/node_modules/hono/dist/middleware/timing/timing.js +3 -1
  105. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
  106. package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +1 -1
  107. package/node_modules/hono/dist/types/jsx/base.d.ts +1 -3
  108. package/node_modules/hono/dist/types/jsx/context.d.ts +39 -0
  109. package/node_modules/hono/dist/utils/ipaddr.js +6 -1
  110. package/node_modules/hono/package.json +19 -13
  111. package/node_modules/http-proxy-middleware/README.md +3 -10
  112. package/node_modules/http-proxy-middleware/dist/errors.d.ts +4 -0
  113. package/node_modules/http-proxy-middleware/dist/errors.js +16 -1
  114. package/node_modules/http-proxy-middleware/dist/factory.d.ts +2 -2
  115. package/node_modules/http-proxy-middleware/dist/handlers/fix-request-body-utils/stringify-form-data.d.ts +7 -0
  116. package/node_modules/http-proxy-middleware/dist/handlers/fix-request-body-utils/stringify-form-data.js +45 -0
  117. package/node_modules/http-proxy-middleware/dist/handlers/fix-request-body.d.ts +1 -1
  118. package/node_modules/http-proxy-middleware/dist/handlers/fix-request-body.js +23 -23
  119. package/node_modules/http-proxy-middleware/dist/handlers/response-interceptor.d.ts +1 -1
  120. package/node_modules/http-proxy-middleware/dist/handlers/response-interceptor.js +1 -1
  121. package/node_modules/http-proxy-middleware/dist/http-proxy-middleware.d.ts +1 -1
  122. package/node_modules/http-proxy-middleware/dist/http-proxy-middleware.js +2 -2
  123. package/node_modules/http-proxy-middleware/dist/legacy/create-proxy-middleware.d.ts +1 -1
  124. package/node_modules/http-proxy-middleware/dist/legacy/create-proxy-middleware.js +1 -1
  125. package/node_modules/http-proxy-middleware/dist/legacy/options-adapter.js +1 -1
  126. package/node_modules/http-proxy-middleware/dist/legacy/types.d.ts +1 -1
  127. package/node_modules/http-proxy-middleware/dist/path-filter.d.ts +1 -1
  128. package/node_modules/http-proxy-middleware/dist/path-filter.js +1 -1
  129. package/node_modules/http-proxy-middleware/dist/path-rewriter.js +1 -1
  130. package/node_modules/http-proxy-middleware/dist/plugins/default/error-response-plugin.js +2 -1
  131. package/node_modules/http-proxy-middleware/dist/plugins/default/logger-plugin.js +3 -3
  132. package/node_modules/http-proxy-middleware/dist/router.js +26 -8
  133. package/node_modules/http-proxy-middleware/dist/status-code.js +15 -12
  134. package/node_modules/http-proxy-middleware/dist/types.d.ts +3 -3
  135. package/node_modules/http-proxy-middleware/dist/types.js +0 -4
  136. package/node_modules/http-proxy-middleware/dist/utils/sanitize.d.ts +1 -0
  137. package/node_modules/http-proxy-middleware/dist/utils/sanitize.js +6 -0
  138. package/node_modules/http-proxy-middleware/package.json +30 -28
  139. package/node_modules/qs/CHANGELOG.md +11 -0
  140. package/node_modules/qs/dist/qs.js +17 -17
  141. package/node_modules/qs/lib/parse.js +19 -8
  142. package/node_modules/qs/lib/utils.js +47 -8
  143. package/node_modules/qs/package.json +6 -5
  144. package/node_modules/qs/test/parse.js +230 -0
  145. package/node_modules/qs/test/utils.js +194 -0
  146. package/node_modules/side-channel/CHANGELOG.md +10 -0
  147. package/node_modules/side-channel/README.md +1 -1
  148. package/node_modules/side-channel/index.js +5 -2
  149. package/node_modules/side-channel/package.json +10 -10
  150. package/node_modules/side-channel/test/index.js +16 -0
  151. package/node_modules/undici-types/agent.d.ts +0 -2
  152. package/node_modules/undici-types/client.d.ts +25 -19
  153. package/node_modules/undici-types/dispatcher.d.ts +7 -33
  154. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  155. package/node_modules/undici-types/fetch.d.ts +24 -4
  156. package/node_modules/undici-types/h2c-client.d.ts +6 -6
  157. package/node_modules/undici-types/handlers.d.ts +1 -2
  158. package/node_modules/undici-types/header.d.ts +5 -0
  159. package/node_modules/undici-types/index.d.ts +3 -1
  160. package/node_modules/undici-types/interceptors.d.ts +1 -1
  161. package/node_modules/undici-types/package.json +1 -1
  162. package/node_modules/undici-types/pool.d.ts +0 -2
  163. package/node_modules/undici-types/proxy-agent.d.ts +2 -2
  164. package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
  165. package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
  166. package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
  167. package/node_modules/undici-types/webidl.d.ts +0 -1
  168. package/package.json +3 -3
  169. package/dist/ui/assets/index-CS16uhqb.js +0 -102
  170. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
@@ -139,19 +139,6 @@ declare module "node:util" {
139
139
  export interface Inspectable {
140
140
  [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any;
141
141
  }
142
- // TODO: Remove these in a future major
143
- /** @deprecated Use `InspectStyle` instead. */
144
- export type Style = Exclude<InspectStyle, "name">;
145
- /** @deprecated Use the `Inspectable` interface instead. */
146
- export type CustomInspectFunction = (depth: number, options: InspectContext) => any;
147
- /** @deprecated Use `InspectContext` instead. */
148
- export interface InspectOptionsStylized extends InspectContext {}
149
- /** @deprecated Use `InspectColorModifier` instead. */
150
- export type Modifiers = InspectColorModifier;
151
- /** @deprecated Use `InspectColorForeground` instead. */
152
- export type ForegroundColors = InspectColorForeground;
153
- /** @deprecated Use `InspectColorBackground` instead. */
154
- export type BackgroundColors = InspectColorBackground;
155
142
  export interface CallSiteObject {
156
143
  /**
157
144
  * Returns the name of the function associated with this call site.
@@ -340,8 +327,7 @@ declare module "node:util" {
340
327
  *
341
328
  * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`.
342
329
  * If the source map is not available, the original location will be the same as the current location.
343
- * When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`,
344
- * `sourceMap` will be true by default.
330
+ * When the `--enable-source-maps` flag is enabled, `sourceMap` will be true by default.
345
331
  *
346
332
  * ```ts
347
333
  * import { getCallSites } from 'node:util';
@@ -1115,7 +1101,7 @@ declare module "node:util" {
1115
1101
  * ```
1116
1102
  *
1117
1103
  * If there is an `original[util.promisify.custom]` property present, `promisify`
1118
- * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v25.x/api/util.html#custom-promisified-functions).
1104
+ * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v26.x/api/util.html#custom-promisified-functions).
1119
1105
  *
1120
1106
  * `promisify()` assumes that `original` is a function taking a callback as its
1121
1107
  * final argument in all cases. If `original` is not a function, `promisify()`
@@ -1260,7 +1246,7 @@ declare module "node:util" {
1260
1246
  *
1261
1247
  * The special format value `none` applies no additional styling to the text.
1262
1248
  *
1263
- * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v25.x/api/util.html#modifiers).
1249
+ * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v26.x/api/util.html#modifiers).
1264
1250
  * @param format A text format or an Array of text formats defined in `util.inspect.colors`.
1265
1251
  * @param text The text to to be formatted.
1266
1252
  * @since v20.12.0
@@ -1270,9 +1256,6 @@ declare module "node:util" {
1270
1256
  text: string,
1271
1257
  options?: StyleTextOptions,
1272
1258
  ): string;
1273
- /** @deprecated This alias will be removed in a future version. Use the canonical `TextEncoderEncodeIntoResult` instead. */
1274
- // TODO: remove in future major
1275
- export interface EncodeIntoResult extends TextEncoderEncodeIntoResult {}
1276
1259
  //// parseArgs
1277
1260
  /**
1278
1261
  * Provides a higher level API for command-line argument parsing than interacting
@@ -636,7 +636,7 @@ declare module "node:v8" {
636
636
  function stopCoverage(): void;
637
637
  /**
638
638
  * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once.
639
- * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
639
+ * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v26.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
640
640
  * @since v18.10.0, v16.18.0
641
641
  */
642
642
  function setHeapSnapshotNearHeapLimit(limit: number): void;
@@ -35,7 +35,7 @@ declare module "node:vm" {
35
35
  /**
36
36
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
37
37
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
38
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
38
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
39
39
  * @experimental
40
40
  */
41
41
  importModuleDynamically?:
@@ -81,7 +81,7 @@ declare module "node:vm" {
81
81
  /**
82
82
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
83
83
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
84
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
84
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
85
85
  * @experimental
86
86
  */
87
87
  importModuleDynamically?:
@@ -95,7 +95,7 @@ declare module "node:vm" {
95
95
  /**
96
96
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
97
97
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
98
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
98
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
99
99
  * @experimental
100
100
  */
101
101
  importModuleDynamically?:
@@ -115,7 +115,7 @@ declare module "node:vm" {
115
115
  /**
116
116
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
117
117
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
118
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
118
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
119
119
  * @experimental
120
120
  */
121
121
  importModuleDynamically?:
@@ -159,7 +159,7 @@ declare module "node:vm" {
159
159
  /**
160
160
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
161
161
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
162
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
162
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
163
163
  * @experimental
164
164
  */
165
165
  importModuleDynamically?:
@@ -363,9 +363,9 @@ declare module "node:vm" {
363
363
  }
364
364
  /**
365
365
  * If the given `contextObject` is an object, the `vm.createContext()` method will
366
- * [prepare that object](https://nodejs.org/docs/latest-v25.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
366
+ * [prepare that object](https://nodejs.org/docs/latest-v26.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
367
367
  * and return a reference to it so that it can be used in calls to {@link runInContext} or
368
- * [`script.runInContext()`](https://nodejs.org/docs/latest-v25.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
368
+ * [`script.runInContext()`](https://nodejs.org/docs/latest-v26.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
369
369
  * Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
370
370
  * existing properties but also having the built-in objects and functions any standard
371
371
  * [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
@@ -837,7 +837,7 @@ declare module "node:vm" {
837
837
  /**
838
838
  * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
839
839
  * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
840
- * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
840
+ * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
841
841
  * @experimental
842
842
  */
843
843
  importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
@@ -1112,7 +1112,7 @@ declare module "node:vm" {
1112
1112
  * and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
1113
1113
  * context to load the requested module.
1114
1114
  *
1115
- * For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v25.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
1115
+ * For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
1116
1116
  * @since v21.7.0, v20.12.0
1117
1117
  */
1118
1118
  const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
@@ -65,4 +65,19 @@ declare global {
65
65
  readonly INVALID_NODE_TYPE_ERR: 24;
66
66
  readonly DATA_CLONE_ERR: 25;
67
67
  };
68
+
69
+ // Not conditional, as this is not yet exposed by the DOM lib generator.
70
+ interface QuotaExceededError extends DOMException {
71
+ readonly quota: number | null;
72
+ readonly requested: number | null;
73
+ }
74
+ var QuotaExceededError: {
75
+ prototype: QuotaExceededError;
76
+ new(message?: string, options?: QuotaExceededErrorOptions): QuotaExceededError;
77
+ };
78
+
79
+ interface QuotaExceededErrorOptions {
80
+ quota?: number;
81
+ requested?: number;
82
+ }
68
83
  }
@@ -22,9 +22,6 @@ declare module "node:worker_threads" {
22
22
  const threadName: string | null;
23
23
  const workerData: any;
24
24
  interface WorkerPerformance extends Pick<Performance, "eventLoopUtilization"> {}
25
- /** @deprecated Use `import { Transferable } from "node:worker_threads"` instead. */
26
- // TODO: remove in a future major @types/node version.
27
- type TransferListItem = Transferable;
28
25
  interface WorkerOptions {
29
26
  /**
30
27
  * List of arguments which would be stringified and appended to
@@ -340,13 +337,13 @@ declare module "node:worker_threads" {
340
337
  interface Worker extends InternalEventEmitter<WorkerEventMap> {}
341
338
  /**
342
339
  * Mark an object as not transferable. If `object` occurs in the transfer list of
343
- * a [`port.postMessage()`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist) call, an error is thrown. This is a no-op if
340
+ * a [`port.postMessage()`](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#portpostmessagevalue-transferlist) call, an error is thrown. This is a no-op if
344
341
  * `object` is a primitive value.
345
342
  *
346
343
  * In particular, this makes sense for objects that can be cloned, rather than
347
344
  * transferred, and which are used by other objects on the sending side.
348
345
  * For example, Node.js marks the `ArrayBuffer`s it uses for its
349
- * [`Buffer` pool](https://nodejs.org/docs/latest-v25.x/api/buffer.html#static-method-bufferallocunsafesize) with this.
346
+ * [`Buffer` pool](https://nodejs.org/docs/latest-v26.x/api/buffer.html#static-method-bufferallocunsafesize) with this.
350
347
  * `ArrayBuffer.prototype.transfer()` is disallowed on such array buffer
351
348
  * instances.
352
349
  *
@@ -55,7 +55,7 @@ declare module "node:zlib" {
55
55
  }
56
56
  | undefined;
57
57
  /**
58
- * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v25.x/api/zlib.html#convenience-methods).
58
+ * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
59
59
  * @default buffer.kMaxLength
60
60
  */
61
61
  maxOutputLength?: number | undefined;
@@ -79,12 +79,12 @@ declare module "node:zlib" {
79
79
  chunkSize?: number | undefined;
80
80
  /**
81
81
  * Key-value object containing indexed
82
- * [Zstd parameters](https://nodejs.org/docs/latest-v25.x/api/zlib.html#zstd-constants).
82
+ * [Zstd parameters](https://nodejs.org/docs/latest-v26.x/api/zlib.html#zstd-constants).
83
83
  */
84
84
  params?: { [key: number]: number | boolean } | undefined;
85
85
  /**
86
86
  * Limits output size when using
87
- * [convenience methods](https://nodejs.org/docs/latest-v25.x/api/zlib.html#convenience-methods).
87
+ * [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
88
88
  * @default buffer.kMaxLength
89
89
  */
90
90
  maxOutputLength?: number | undefined;
@@ -305,7 +305,7 @@ function parseWithStatus (uri, opts) {
305
305
  if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {
306
306
  // convert Unicode IDN -> ASCII IDN
307
307
  try {
308
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase())
308
+ parsed.host = new URL('http://' + parsed.host).hostname
309
309
  } catch (e) {
310
310
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e
311
311
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fast-uri",
3
3
  "description": "Dependency-free RFC 3986 URI toolbox",
4
- "version": "3.1.2",
4
+ "version": "3.1.3",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "types": "types/index.d.ts",
@@ -131,3 +131,31 @@ test('normalize does not double-decode %2540 into a live @', (t) => {
131
131
  t.plan(1)
132
132
  t.notEqual(parsed.host, 'trusted.com@evil.com', 'http://trusted.com%2540evil.com/')
133
133
  })
134
+
135
+ test('parse canonicalises IDN / Unicode hosts to their ASCII form', (t) => {
136
+ const cases = [
137
+ {
138
+ input: 'http://127。0。0。1/',
139
+ expectedHost: '127.0.0.1',
140
+ description: 'full-width ideographic stops as octet separators'
141
+ },
142
+ {
143
+ input: 'http://example.com/',
144
+ expectedHost: 'example.com',
145
+ description: 'fullwidth e as first letter'
146
+ },
147
+ {
148
+ input: 'http://納豆.example.org/',
149
+ expectedHost: 'xn--99zt52a.example.org',
150
+ description: 'CJK label requiring punycode'
151
+ }
152
+ ]
153
+
154
+ t.plan(cases.length * 2)
155
+
156
+ cases.forEach(({ input, expectedHost, description }) => {
157
+ const parsed = fastURI.parse(input)
158
+ t.notOk(parsed.error, `parse should not set error: ${description}`)
159
+ t.equal(parsed.host, expectedHost, `host canonicalised to ASCII: ${description}`)
160
+ })
161
+ })
@@ -109,7 +109,9 @@ var EventProcessor = class {
109
109
  method
110
110
  };
111
111
  if (event.body) {
112
- requestInit.body = event.isBase64Encoded ? decodeBase64(event.body) : event.body;
112
+ const body = event.isBase64Encoded ? decodeBase64(event.body) : new TextEncoder().encode(event.body);
113
+ requestInit.body = body;
114
+ headers.set("content-length", body.length.toString());
113
115
  }
114
116
  return new Request(url, requestInit);
115
117
  }
@@ -207,21 +209,17 @@ var EventV1Processor = class extends EventProcessor {
207
209
  getHeaders(event) {
208
210
  const headers = new Headers();
209
211
  this.getCookies(event, headers);
210
- if (event.headers) {
211
- for (const [k, v] of Object.entries(event.headers)) {
212
- if (v) {
213
- headers.set(k, sanitizeHeaderValue(v));
214
- }
215
- }
216
- }
217
212
  if (event.multiValueHeaders) {
218
213
  for (const [k, values] of Object.entries(event.multiValueHeaders)) {
219
214
  if (values) {
220
- const foundK = headers.get(k);
221
- values.forEach((v) => {
222
- const sanitizedValue = sanitizeHeaderValue(v);
223
- return (!foundK || !foundK.includes(sanitizedValue)) && headers.append(k, sanitizedValue);
224
- });
215
+ values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
216
+ }
217
+ }
218
+ }
219
+ if (event.headers) {
220
+ for (const [k, v] of Object.entries(event.headers)) {
221
+ if (v && !headers.has(k)) {
222
+ headers.set(k, sanitizeHeaderValue(v));
225
223
  }
226
224
  }
227
225
  }
@@ -281,7 +279,7 @@ var ALBProcessor = class extends EventProcessor {
281
279
  if (result.multiValueHeaders) {
282
280
  result.multiValueHeaders["set-cookie"] = cookies;
283
281
  } else {
284
- result.headers["set-cookie"] = cookies.join(", ");
282
+ result.headers["set-cookie"] = cookies[0];
285
283
  }
286
284
  }
287
285
  };
@@ -301,11 +299,7 @@ var LatticeV2Processor = class extends EventProcessor {
301
299
  if (event.headers) {
302
300
  for (const [k, values] of Object.entries(event.headers)) {
303
301
  if (values) {
304
- const foundK = headers.get(k);
305
- values.forEach((v) => {
306
- const sanitizedValue = sanitizeHeaderValue(v);
307
- return (!foundK || !foundK.includes(sanitizedValue)) && headers.append(k, sanitizedValue);
308
- });
302
+ values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
309
303
  }
310
304
  }
311
305
  }
@@ -316,7 +310,7 @@ var LatticeV2Processor = class extends EventProcessor {
316
310
  setCookiesToResult(result, cookies) {
317
311
  result.headers = {
318
312
  ...result.headers,
319
- "set-cookie": cookies.join(", ")
313
+ "set-cookie": cookies
320
314
  };
321
315
  }
322
316
  };
@@ -45,11 +45,17 @@ var createRequest = (event) => {
45
45
  const url = queryString ? `${urlPath}?${queryString}` : urlPath;
46
46
  const headers = new Headers();
47
47
  Object.entries(event.Records[0].cf.request.headers).forEach(([k, v]) => {
48
- v.forEach((header) => headers.set(k, header.value));
48
+ v.forEach((header) => headers.append(k, header.value));
49
49
  });
50
50
  const requestBody = event.Records[0].cf.request.body;
51
51
  const method = event.Records[0].cf.request.method;
52
- const body = createBody(method, requestBody);
52
+ const rawBody = createBody(method, requestBody);
53
+ let body = rawBody;
54
+ if (rawBody !== void 0) {
55
+ const bytes = typeof rawBody === "string" ? new TextEncoder().encode(rawBody) : rawBody;
56
+ body = bytes;
57
+ headers.set("content-length", bytes.length.toString());
58
+ }
53
59
  return new Request(url, {
54
60
  headers,
55
61
  method,
@@ -139,7 +139,9 @@ class EventProcessor {
139
139
  method
140
140
  };
141
141
  if (event.body) {
142
- requestInit.body = event.isBase64Encoded ? (0, import_encode.decodeBase64)(event.body) : event.body;
142
+ const body = event.isBase64Encoded ? (0, import_encode.decodeBase64)(event.body) : new TextEncoder().encode(event.body);
143
+ requestInit.body = body;
144
+ headers.set("content-length", body.length.toString());
143
145
  }
144
146
  return new Request(url, requestInit);
145
147
  }
@@ -237,21 +239,17 @@ class EventV1Processor extends EventProcessor {
237
239
  getHeaders(event) {
238
240
  const headers = new Headers();
239
241
  this.getCookies(event, headers);
240
- if (event.headers) {
241
- for (const [k, v] of Object.entries(event.headers)) {
242
- if (v) {
243
- headers.set(k, sanitizeHeaderValue(v));
244
- }
245
- }
246
- }
247
242
  if (event.multiValueHeaders) {
248
243
  for (const [k, values] of Object.entries(event.multiValueHeaders)) {
249
244
  if (values) {
250
- const foundK = headers.get(k);
251
- values.forEach((v) => {
252
- const sanitizedValue = sanitizeHeaderValue(v);
253
- return (!foundK || !foundK.includes(sanitizedValue)) && headers.append(k, sanitizedValue);
254
- });
245
+ values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
246
+ }
247
+ }
248
+ }
249
+ if (event.headers) {
250
+ for (const [k, v] of Object.entries(event.headers)) {
251
+ if (v && !headers.has(k)) {
252
+ headers.set(k, sanitizeHeaderValue(v));
255
253
  }
256
254
  }
257
255
  }
@@ -311,7 +309,7 @@ class ALBProcessor extends EventProcessor {
311
309
  if (result.multiValueHeaders) {
312
310
  result.multiValueHeaders["set-cookie"] = cookies;
313
311
  } else {
314
- result.headers["set-cookie"] = cookies.join(", ");
312
+ result.headers["set-cookie"] = cookies[0];
315
313
  }
316
314
  }
317
315
  }
@@ -331,11 +329,7 @@ class LatticeV2Processor extends EventProcessor {
331
329
  if (event.headers) {
332
330
  for (const [k, values] of Object.entries(event.headers)) {
333
331
  if (values) {
334
- const foundK = headers.get(k);
335
- values.forEach((v) => {
336
- const sanitizedValue = sanitizeHeaderValue(v);
337
- return (!foundK || !foundK.includes(sanitizedValue)) && headers.append(k, sanitizedValue);
338
- });
332
+ values.forEach((v) => headers.append(k, sanitizeHeaderValue(v)));
339
333
  }
340
334
  }
341
335
  }
@@ -346,7 +340,7 @@ class LatticeV2Processor extends EventProcessor {
346
340
  setCookiesToResult(result, cookies) {
347
341
  result.headers = {
348
342
  ...result.headers,
349
- "set-cookie": cookies.join(", ")
343
+ "set-cookie": cookies
350
344
  };
351
345
  }
352
346
  }
@@ -78,11 +78,17 @@ const createRequest = (event) => {
78
78
  const url = queryString ? `${urlPath}?${queryString}` : urlPath;
79
79
  const headers = new Headers();
80
80
  Object.entries(event.Records[0].cf.request.headers).forEach(([k, v]) => {
81
- v.forEach((header) => headers.set(k, header.value));
81
+ v.forEach((header) => headers.append(k, header.value));
82
82
  });
83
83
  const requestBody = event.Records[0].cf.request.body;
84
84
  const method = event.Records[0].cf.request.method;
85
- const body = createBody(method, requestBody);
85
+ const rawBody = createBody(method, requestBody);
86
+ let body = rawBody;
87
+ if (rawBody !== void 0) {
88
+ const bytes = typeof rawBody === "string" ? new TextEncoder().encode(rawBody) : rawBody;
89
+ body = bytes;
90
+ headers.set("content-length", bytes.length.toString());
91
+ }
86
92
  return new Request(url, {
87
93
  headers,
88
94
  method,
@@ -61,6 +61,7 @@ const normalizeLabel = (label) => {
61
61
  return label.trim().replace(/\s+/g, "-");
62
62
  };
63
63
  const isValidClassName = (name) => /^-?[_a-zA-Z][_a-zA-Z0-9-]*$/.test(name);
64
+ const hasUnsafeSelectorChar = (name) => /[<{}]/.test(name);
64
65
  const RESERVED_KEYFRAME_NAMES = /* @__PURE__ */ new Set([
65
66
  "default",
66
67
  "inherit",
@@ -198,7 +199,8 @@ const cxCommon = (args) => {
198
199
  [CLASS_NAME]: "",
199
200
  [STYLE_STRING]: "",
200
201
  [SELECTORS]: [],
201
- [EXTERNAL_CLASS_NAMES]: [arg]
202
+ // drop names that are unsafe to emit as a selector
203
+ [EXTERNAL_CLASS_NAMES]: hasUnsafeSelectorChar(arg) ? [] : [arg]
202
204
  };
203
205
  }
204
206
  }
@@ -29,6 +29,7 @@ module.exports = __toCommonJS(css_exports);
29
29
  var import_html = require("../../helper/html");
30
30
  var import_constants = require("../../jsx/constants");
31
31
  var import_css = require("../../jsx/dom/css");
32
+ var import_html2 = require("../../utils/html");
32
33
  var import_common = require("./common");
33
34
  var import_common2 = require("./common");
34
35
  const createCssContext = ({
@@ -88,7 +89,14 @@ const createCssContext = ({
88
89
  }
89
90
  return Promise.resolve((0, import_html.raw)("", [appendStyle]));
90
91
  };
91
- const className = new String(cssClassName[import_common.CLASS_NAME]);
92
+ const rawClassName = cssClassName[import_common.CLASS_NAME];
93
+ let escapedClassName = rawClassName;
94
+ if (/[&<>'"]/.test(rawClassName)) {
95
+ const escapedBuffer = [""];
96
+ (0, import_html2.escapeToBuffer)(rawClassName, escapedBuffer);
97
+ escapedClassName = escapedBuffer[0];
98
+ }
99
+ const className = new String(escapedClassName);
92
100
  Object.assign(className, cssClassName);
93
101
  className.isEscaped = true;
94
102
  className.callbacks = [addClassNameToContext];
@@ -125,7 +125,7 @@ class JSXNode {
125
125
  key;
126
126
  children;
127
127
  isEscaped = true;
128
- localContexts;
128
+ suspendedContext;
129
129
  constructor(tag, props, children) {
130
130
  if (typeof tag !== "function" && !(0, import_utils.isValidTagName)(tag)) {
131
131
  throw new Error(`Invalid JSX tag name: ${tag}`);
@@ -143,18 +143,12 @@ class JSXNode {
143
143
  return this.props.ref || null;
144
144
  }
145
145
  toString() {
146
- const buffer = [""];
147
- this.localContexts?.forEach(([context, value]) => {
148
- context.values.push(value);
149
- });
150
- try {
146
+ const render = () => {
147
+ const buffer = [""];
151
148
  this.toStringToBuffer(buffer);
152
- } finally {
153
- this.localContexts?.forEach(([context]) => {
154
- context.values.pop();
155
- });
156
- }
157
- return buffer.length === 1 ? "callbacks" in buffer ? (0, import_html2.resolveCallbackSync)((0, import_html.raw)(buffer[0], buffer.callbacks)).toString() : buffer[0] : (0, import_html2.stringBufferToString)(buffer, buffer.callbacks);
149
+ return buffer.length === 1 ? "callbacks" in buffer ? (0, import_html2.resolveCallbackSync)((0, import_html.raw)(buffer[0], buffer.callbacks)).toString() : buffer[0] : (0, import_html2.stringBufferToString)(buffer, buffer.callbacks);
150
+ };
151
+ return this.suspendedContext ? this.suspendedContext(render) : (0, import_context.runWithRenderContext)(render);
158
152
  }
159
153
  toStringToBuffer(buffer) {
160
154
  const tag = this.tag;
@@ -230,12 +224,12 @@ class JSXFunctionNode extends JSXNode {
230
224
  if (import_context.globalContexts.length === 0) {
231
225
  buffer.unshift("", res);
232
226
  } else {
233
- const currentContexts = import_context.globalContexts.map((c) => [c, c.values.at(-1)]);
227
+ const suspendedContext = (0, import_context.captureRenderContext)();
234
228
  buffer.unshift(
235
229
  "",
236
230
  res.then((childRes) => {
237
231
  if (childRes instanceof JSXNode) {
238
- childRes.localContexts = currentContexts;
232
+ childRes.suspendedContext = suspendedContext;
239
233
  }
240
234
  return childRes;
241
235
  })