@rio-cloud/cdk-v2-constructs 8.2.0-alpha.0 → 8.2.1-alpha.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 (179) hide show
  1. package/.jsii +2 -2
  2. package/node_modules/@types/node/README.md +3 -3
  3. package/node_modules/@types/node/assert/strict.d.ts +105 -2
  4. package/node_modules/@types/node/assert.d.ts +211 -92
  5. package/node_modules/@types/node/async_hooks.d.ts +103 -19
  6. package/node_modules/@types/node/buffer.buffer.d.ts +472 -0
  7. package/node_modules/@types/node/buffer.d.ts +88 -516
  8. package/node_modules/@types/node/child_process.d.ts +167 -231
  9. package/node_modules/@types/node/cluster.d.ts +172 -26
  10. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  11. package/node_modules/@types/node/console.d.ts +66 -28
  12. package/node_modules/@types/node/constants.d.ts +14 -12
  13. package/node_modules/@types/node/crypto.d.ts +1458 -497
  14. package/node_modules/@types/node/dgram.d.ts +44 -30
  15. package/node_modules/@types/node/diagnostics_channel.d.ts +389 -4
  16. package/node_modules/@types/node/dns/promises.d.ts +120 -42
  17. package/node_modules/@types/node/dns.d.ts +209 -95
  18. package/node_modules/@types/node/domain.d.ts +14 -18
  19. package/node_modules/@types/node/events.d.ts +245 -113
  20. package/node_modules/@types/node/fs/promises.d.ts +194 -96
  21. package/node_modules/@types/node/fs.d.ts +695 -270
  22. package/node_modules/@types/node/globals.d.ts +97 -308
  23. package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
  24. package/node_modules/@types/node/http.d.ts +363 -97
  25. package/node_modules/@types/node/http2.d.ts +684 -231
  26. package/node_modules/@types/node/https.d.ts +122 -87
  27. package/node_modules/@types/node/index.d.ts +24 -11
  28. package/node_modules/@types/node/inspector.d.ts +220 -2690
  29. package/node_modules/@types/node/inspector.generated.d.ts +4239 -0
  30. package/node_modules/@types/node/module.d.ts +705 -149
  31. package/node_modules/@types/node/net.d.ts +178 -54
  32. package/node_modules/@types/node/os.d.ts +47 -17
  33. package/node_modules/@types/node/package.json +22 -97
  34. package/node_modules/@types/node/path.d.ts +12 -3
  35. package/node_modules/@types/node/perf_hooks.d.ts +500 -97
  36. package/node_modules/@types/node/process.d.ts +657 -87
  37. package/node_modules/@types/node/punycode.d.ts +5 -5
  38. package/node_modules/@types/node/querystring.d.ts +24 -13
  39. package/node_modules/@types/node/readline/promises.d.ts +25 -14
  40. package/node_modules/@types/node/readline.d.ts +102 -41
  41. package/node_modules/@types/node/repl.d.ts +38 -30
  42. package/node_modules/@types/node/sea.d.ts +162 -0
  43. package/node_modules/@types/node/sqlite.d.ts +1040 -0
  44. package/node_modules/@types/node/stream/consumers.d.ts +33 -7
  45. package/node_modules/@types/node/stream/promises.d.ts +8 -1
  46. package/node_modules/@types/node/stream/web.d.ts +251 -28
  47. package/node_modules/@types/node/stream.d.ts +1060 -1055
  48. package/node_modules/@types/node/string_decoder.d.ts +8 -8
  49. package/node_modules/@types/node/test.d.ts +2133 -1166
  50. package/node_modules/@types/node/timers/promises.d.ts +31 -16
  51. package/node_modules/@types/node/timers.d.ts +159 -114
  52. package/node_modules/@types/node/tls.d.ts +232 -163
  53. package/node_modules/@types/node/trace_events.d.ts +43 -28
  54. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
  55. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  56. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  57. package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
  58. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  59. package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  60. package/node_modules/@types/node/tty.d.ts +9 -9
  61. package/node_modules/@types/node/url.d.ts +236 -84
  62. package/node_modules/@types/node/util.d.ts +562 -412
  63. package/node_modules/@types/node/v8.d.ts +368 -21
  64. package/node_modules/@types/node/vm.d.ts +443 -149
  65. package/node_modules/@types/node/wasi.d.ts +62 -18
  66. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  67. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  68. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  69. package/node_modules/@types/node/web-globals/events.d.ts +97 -0
  70. package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
  71. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  72. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  73. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  74. package/node_modules/@types/node/worker_threads.d.ts +310 -107
  75. package/node_modules/@types/node/zlib.d.ts +301 -73
  76. package/node_modules/undici-types/LICENSE +21 -0
  77. package/node_modules/undici-types/agent.d.ts +13 -12
  78. package/node_modules/undici-types/api.d.ts +26 -26
  79. package/node_modules/undici-types/balanced-pool.d.ts +19 -7
  80. package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
  81. package/node_modules/undici-types/client-stats.d.ts +15 -0
  82. package/node_modules/undici-types/client.d.ts +26 -15
  83. package/node_modules/undici-types/connector.d.ts +2 -2
  84. package/node_modules/undici-types/cookies.d.ts +2 -0
  85. package/node_modules/undici-types/diagnostics-channel.d.ts +19 -12
  86. package/node_modules/undici-types/dispatcher.d.ts +148 -113
  87. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  88. package/node_modules/undici-types/errors.d.ts +79 -46
  89. package/node_modules/undici-types/eventsource.d.ts +66 -0
  90. package/node_modules/undici-types/fetch.d.ts +41 -39
  91. package/node_modules/undici-types/formdata.d.ts +8 -8
  92. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  93. package/node_modules/undici-types/global-origin.d.ts +5 -5
  94. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  95. package/node_modules/undici-types/handlers.d.ts +11 -5
  96. package/node_modules/undici-types/header.d.ts +157 -1
  97. package/node_modules/undici-types/index.d.ts +68 -43
  98. package/node_modules/undici-types/interceptors.d.ts +71 -3
  99. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  100. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  101. package/node_modules/undici-types/mock-client.d.ts +6 -4
  102. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  103. package/node_modules/undici-types/mock-interceptor.d.ts +24 -23
  104. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  105. package/node_modules/undici-types/package.json +1 -1
  106. package/node_modules/undici-types/patch.d.ts +0 -42
  107. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  108. package/node_modules/undici-types/pool.d.ts +21 -8
  109. package/node_modules/undici-types/proxy-agent.d.ts +5 -6
  110. package/node_modules/undici-types/readable.d.ts +24 -17
  111. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  112. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  113. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  114. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  115. package/node_modules/undici-types/util.d.ts +18 -0
  116. package/node_modules/undici-types/utility.d.ts +7 -0
  117. package/node_modules/undici-types/webidl.d.ts +157 -36
  118. package/node_modules/undici-types/websocket.d.ts +67 -12
  119. package/package.json +9 -60
  120. package/version.json +1 -1
  121. package/node_modules/@types/node/dom-events.d.ts +0 -122
  122. package/node_modules/@types/node/globals.global.d.ts +0 -1
  123. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  124. package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  125. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  126. package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  127. package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  128. package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  129. package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  130. package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  131. package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
  132. package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
  133. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
  134. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  135. package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  136. package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  137. package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  138. package/node_modules/@types/node/ts4.8/events.d.ts +0 -796
  139. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1232
  140. package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4289
  141. package/node_modules/@types/node/ts4.8/globals.d.ts +0 -381
  142. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  143. package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
  144. package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  145. package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  146. package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  147. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  148. package/node_modules/@types/node/ts4.8/module.d.ts +0 -287
  149. package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  150. package/node_modules/@types/node/ts4.8/os.d.ts +0 -477
  151. package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  152. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
  153. package/node_modules/@types/node/ts4.8/process.d.ts +0 -1532
  154. package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  155. package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  156. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  157. package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  158. package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  159. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  160. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  161. package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
  162. package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  163. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  164. package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
  165. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  166. package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  167. package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  168. package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  169. package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  170. package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  171. package/node_modules/@types/node/ts4.8/util.d.ts +0 -2186
  172. package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
  173. package/node_modules/@types/node/ts4.8/vm.d.ts +0 -901
  174. package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  175. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  176. package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  177. package/node_modules/argparse/CHANGELOG.md +0 -216
  178. package/node_modules/undici-types/file.d.ts +0 -39
  179. package/node_modules/undici-types/filereader.d.ts +0 -54
@@ -5,10 +5,10 @@
5
5
  * ```js
6
6
  * import url from 'node:url';
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/url.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/url.js)
9
9
  */
10
10
  declare module "url" {
11
- import { Blob as NodeBlob } from "node:buffer";
11
+ import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer";
12
12
  import { ClientRequestArgs } from "node:http";
13
13
  import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
14
14
  // Input to `url.format`
@@ -46,6 +46,22 @@ declare module "url" {
46
46
  interface UrlWithStringQuery extends Url {
47
47
  query: string | null;
48
48
  }
49
+ interface FileUrlToPathOptions {
50
+ /**
51
+ * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
52
+ * @default undefined
53
+ * @since v22.1.0
54
+ */
55
+ windows?: boolean | undefined;
56
+ }
57
+ interface PathToFileUrlOptions {
58
+ /**
59
+ * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
60
+ * @default undefined
61
+ * @since v22.1.0
62
+ */
63
+ windows?: boolean | undefined;
64
+ }
49
65
  /**
50
66
  * The `url.parse()` method takes a URL string, parses it, and returns a URL
51
67
  * object.
@@ -55,29 +71,53 @@ declare module "url" {
55
71
  * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
56
72
  *
57
73
  * `url.parse()` uses a lenient, non-standard algorithm for parsing URL
58
- * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
59
- * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
74
+ * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487)
75
+ * and incorrect handling of usernames and passwords. Do not use with untrusted
76
+ * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the
77
+ * [WHATWG URL](https://nodejs.org/docs/latest-v24.x/api/url.html#the-whatwg-url-api) API instead, for example:
78
+ *
79
+ * ```js
80
+ * function getURL(req) {
81
+ * const proto = req.headers['x-forwarded-proto'] || 'https';
82
+ * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com';
83
+ * return new URL(`${proto}://${host}${req.url || '/'}`);
84
+ * }
85
+ * ```
86
+ *
87
+ * The example above assumes well-formed headers are forwarded from a reverse
88
+ * proxy to your Node.js server. If you are not using a reverse proxy, you should
89
+ * use the example below:
90
+ *
91
+ * ```js
92
+ * function getURL(req) {
93
+ * return new URL(`https://example.com${req.url || '/'}`);
94
+ * }
95
+ * ```
60
96
  * @since v0.1.25
61
97
  * @deprecated Use the WHATWG URL API instead.
62
98
  * @param urlString The URL string to parse.
63
- * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
64
- * on the returned URL object will be an unparsed, undecoded string.
65
- * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
66
- * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
99
+ * @param parseQueryString If `true`, the `query` property will always
100
+ * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v24.x/api/querystring.html) module's `parse()`
101
+ * method. If `false`, the `query` property on the returned URL object will be an
102
+ * unparsed, undecoded string. **Default:** `false`.
103
+ * @param slashesDenoteHost If `true`, the first token after the literal
104
+ * string `//` and preceding the next `/` will be interpreted as the `host`.
105
+ * For instance, given `//foo/bar`, the result would be
106
+ * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
107
+ * **Default:** `false`.
67
108
  */
68
- function parse(urlString: string): UrlWithStringQuery;
69
109
  function parse(
70
110
  urlString: string,
71
- parseQueryString: false | undefined,
111
+ parseQueryString?: false,
72
112
  slashesDenoteHost?: boolean,
73
113
  ): UrlWithStringQuery;
74
114
  function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
75
115
  function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
76
116
  /**
77
- * The `url.format()` method returns a formatted URL string derived from`urlObject`.
117
+ * The `url.format()` method returns a formatted URL string derived from `urlObject`.
78
118
  *
79
119
  * ```js
80
- * const url = require('node:url');
120
+ * import url from 'node:url';
81
121
  * url.format({
82
122
  * protocol: 'https',
83
123
  * hostname: 'example.com',
@@ -100,33 +140,33 @@ declare module "url" {
100
140
  * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
101
141
  * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
102
142
  * colon (`:`) character, the literal string `:` will be appended to `result`.
103
- * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
143
+ * * If either of the following conditions is true, then the literal string `//` will be appended to `result`:
104
144
  * * `urlObject.slashes` property is true;
105
- * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
106
- * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
107
- * and appended to `result`followed by the literal string `@`.
145
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`;
146
+ * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string
147
+ * and appended to `result` followed by the literal string `@`.
108
148
  * * If the `urlObject.host` property is `undefined` then:
109
149
  * * If the `urlObject.hostname` is a string, it is appended to `result`.
110
150
  * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
111
151
  * an `Error` is thrown.
112
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
152
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
113
153
  * * The literal string `:` is appended to `result`, and
114
- * * The value of `urlObject.port` is coerced to a string and appended to`result`.
115
- * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
154
+ * * The value of `urlObject.port` is coerced to a string and appended to `result`.
155
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`.
116
156
  * * If the `urlObject.pathname` property is a string that is not an empty string:
117
- * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
157
+ * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash
118
158
  * (`/`), then the literal string `'/'` is appended to `result`.
119
159
  * * The value of `urlObject.pathname` is appended to `result`.
120
160
  * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
121
- * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
122
- * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
161
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the
162
+ * `querystring` module's `stringify()` method passing the value of `urlObject.query`.
123
163
  * * Otherwise, if `urlObject.search` is a string:
124
- * * If the value of `urlObject.search`_does not start_ with the ASCII question
164
+ * * If the value of `urlObject.search` _does not start_ with the ASCII question
125
165
  * mark (`?`) character, the literal string `?` is appended to `result`.
126
166
  * * The value of `urlObject.search` is appended to `result`.
127
167
  * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
128
168
  * * If the `urlObject.hash` property is a string:
129
- * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
169
+ * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
130
170
  * character, the literal string `#` is appended to `result`.
131
171
  * * The value of `urlObject.hash` is appended to `result`.
132
172
  * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
@@ -138,18 +178,18 @@ declare module "url" {
138
178
  */
139
179
  function format(urlObject: URL, options?: URLFormatOptions): string;
140
180
  /**
141
- * The `url.format()` method returns a formatted URL string derived from`urlObject`.
181
+ * The `url.format()` method returns a formatted URL string derived from `urlObject`.
142
182
  *
143
183
  * ```js
144
- * const url = require('url');
184
+ * import url from 'node:url';
145
185
  * url.format({
146
186
  * protocol: 'https',
147
187
  * hostname: 'example.com',
148
188
  * pathname: '/some/path',
149
189
  * query: {
150
190
  * page: 1,
151
- * format: 'json'
152
- * }
191
+ * format: 'json',
192
+ * },
153
193
  * });
154
194
  *
155
195
  * // => 'https://example.com/some/path?page=1&format=json'
@@ -164,33 +204,33 @@ declare module "url" {
164
204
  * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
165
205
  * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
166
206
  * colon (`:`) character, the literal string `:` will be appended to `result`.
167
- * * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
207
+ * * If either of the following conditions is true, then the literal string `//` will be appended to `result`:
168
208
  * * `urlObject.slashes` property is true;
169
- * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
170
- * * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
171
- * and appended to `result`followed by the literal string `@`.
209
+ * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`;
210
+ * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string
211
+ * and appended to `result` followed by the literal string `@`.
172
212
  * * If the `urlObject.host` property is `undefined` then:
173
213
  * * If the `urlObject.hostname` is a string, it is appended to `result`.
174
214
  * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
175
215
  * an `Error` is thrown.
176
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
216
+ * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
177
217
  * * The literal string `:` is appended to `result`, and
178
- * * The value of `urlObject.port` is coerced to a string and appended to`result`.
179
- * * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
218
+ * * The value of `urlObject.port` is coerced to a string and appended to `result`.
219
+ * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`.
180
220
  * * If the `urlObject.pathname` property is a string that is not an empty string:
181
- * * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
221
+ * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash
182
222
  * (`/`), then the literal string `'/'` is appended to `result`.
183
223
  * * The value of `urlObject.pathname` is appended to `result`.
184
224
  * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
185
- * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
186
- * `querystring` module's `stringify()`method passing the value of `urlObject.query`.
225
+ * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the
226
+ * `querystring` module's `stringify()` method passing the value of `urlObject.query`.
187
227
  * * Otherwise, if `urlObject.search` is a string:
188
- * * If the value of `urlObject.search`_does not start_ with the ASCII question
228
+ * * If the value of `urlObject.search` _does not start_ with the ASCII question
189
229
  * mark (`?`) character, the literal string `?` is appended to `result`.
190
230
  * * The value of `urlObject.search` is appended to `result`.
191
231
  * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
192
232
  * * If the `urlObject.hash` property is a string:
193
- * * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
233
+ * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
194
234
  * character, the literal string `#` is appended to `result`.
195
235
  * * The value of `urlObject.hash` is appended to `result`.
196
236
  * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
@@ -206,7 +246,7 @@ declare module "url" {
206
246
  * manner similar to that of a web browser resolving an anchor tag.
207
247
  *
208
248
  * ```js
209
- * const url = require('node:url');
249
+ * import url from 'node:url';
210
250
  * url.resolve('/one/two/three', 'four'); // '/one/two/four'
211
251
  * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
212
252
  * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
@@ -294,11 +334,44 @@ declare module "url" {
294
334
  * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
295
335
  * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
296
336
  * ```
337
+ *
338
+ * **Security Considerations:**
339
+ *
340
+ * This function decodes percent-encoded characters, including encoded dot-segments
341
+ * (`%2e` as `.` and `%2e%2e` as `..`), and then normalizes the resulting path.
342
+ * This means that encoded directory traversal sequences (such as `%2e%2e`) are
343
+ * decoded and processed as actual path traversal, even though encoded slashes
344
+ * (`%2F`, `%5C`) are correctly rejected.
345
+ *
346
+ * **Applications must not rely on `fileURLToPath()` alone to prevent directory
347
+ * traversal attacks.** Always perform explicit path validation and security checks
348
+ * on the returned path value to ensure it remains within expected boundaries
349
+ * before using it for file system operations.
297
350
  * @since v10.12.0
298
351
  * @param url The file URL string or URL object to convert to a path.
299
352
  * @return The fully-resolved platform-specific Node.js file path.
300
353
  */
301
- function fileURLToPath(url: string | URL): string;
354
+ function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string;
355
+ /**
356
+ * Like `url.fileURLToPath(...)` except that instead of returning a string
357
+ * representation of the path, a `Buffer` is returned. This conversion is
358
+ * helpful when the input URL contains percent-encoded segments that are
359
+ * not valid UTF-8 / Unicode sequences.
360
+ *
361
+ * **Security Considerations:**
362
+ *
363
+ * This function has the same security considerations as `url.fileURLToPath()`.
364
+ * It decodes percent-encoded characters, including encoded dot-segments
365
+ * (`%2e` as `.` and `%2e%2e` as `..`), and normalizes the path. **Applications
366
+ * must not rely on this function alone to prevent directory traversal attacks.**
367
+ * Always perform explicit path validation on the returned buffer value before
368
+ * using it for file system operations.
369
+ * @since v24.3.0
370
+ * @param url The file URL string or URL object to convert to a path.
371
+ * @returns The fully-resolved platform-specific Node.js file path
372
+ * as a `Buffer`.
373
+ */
374
+ function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): NonSharedBuffer;
302
375
  /**
303
376
  * This function ensures that `path` is resolved absolutely, and that the URL
304
377
  * control characters are correctly encoded when converting into a File URL.
@@ -316,7 +389,7 @@ declare module "url" {
316
389
  * @param path The path to convert to a File URL.
317
390
  * @return The file URL object.
318
391
  */
319
- function pathToFileURL(path: string): URL;
392
+ function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL;
320
393
  /**
321
394
  * This utility function converts a URL object into an ordinary options object as
322
395
  * expected by the `http.request()` and `https.request()` APIs.
@@ -345,9 +418,26 @@ declare module "url" {
345
418
  */
346
419
  function urlToHttpOptions(url: URL): ClientRequestArgs;
347
420
  interface URLFormatOptions {
421
+ /**
422
+ * `true` if the serialized URL string should include the username and password, `false` otherwise.
423
+ * @default true
424
+ */
348
425
  auth?: boolean | undefined;
426
+ /**
427
+ * `true` if the serialized URL string should include the fragment, `false` otherwise.
428
+ * @default true
429
+ */
349
430
  fragment?: boolean | undefined;
431
+ /**
432
+ * `true` if the serialized URL string should include the search query, `false` otherwise.
433
+ * @default true
434
+ */
350
435
  search?: boolean | undefined;
436
+ /**
437
+ * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to
438
+ * being Punycode encoded.
439
+ * @default false
440
+ */
351
441
  unicode?: boolean | undefined;
352
442
  }
353
443
  /**
@@ -357,7 +447,7 @@ declare module "url" {
357
447
  *
358
448
  * In accordance with browser conventions, all properties of `URL` objects
359
449
  * are implemented as getters and setters on the class prototype, rather than as
360
- * data properties on the object itself. Thus, unlike `legacy urlObject` s,
450
+ * data properties on the object itself. Thus, unlike `legacy urlObject`s,
361
451
  * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
362
452
  * return `true`.
363
453
  * @since v7.0.0, v6.13.0
@@ -367,10 +457,10 @@ declare module "url" {
367
457
  * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
368
458
  *
369
459
  * ```js
370
- * const {
460
+ * import {
371
461
  * Blob,
372
462
  * resolveObjectURL,
373
- * } = require('node:buffer');
463
+ * } from 'node:buffer';
374
464
  *
375
465
  * const blob = new Blob(['hello']);
376
466
  * const id = URL.createObjectURL(blob);
@@ -381,23 +471,21 @@ declare module "url" {
381
471
  * console.log(otherBlob.size);
382
472
  * ```
383
473
  *
384
- * The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
474
+ * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it.
385
475
  *
386
476
  * `Blob` objects are registered within the current thread. If using Worker
387
477
  * Threads, `Blob` objects registered within one Worker will not be available
388
478
  * to other workers or the main thread.
389
479
  * @since v16.7.0
390
- * @experimental
391
480
  */
392
481
  static createObjectURL(blob: NodeBlob): string;
393
482
  /**
394
483
  * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
395
484
  * ID that isn't registered will silently fail.
396
485
  * @since v16.7.0
397
- * @experimental
398
486
  * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
399
487
  */
400
- static revokeObjectURL(objectUrl: string): void;
488
+ static revokeObjectURL(id: string): void;
401
489
  /**
402
490
  * Checks if an `input` relative to the `base` can be parsed to a `URL`.
403
491
  *
@@ -412,7 +500,19 @@ declare module "url" {
412
500
  * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
413
501
  */
414
502
  static canParse(input: string, base?: string): boolean;
415
- constructor(input: string, base?: string | URL);
503
+ /**
504
+ * Parses a string as a URL. If `base` is provided, it will be used as the base
505
+ * URL for the purpose of resolving non-absolute `input` URLs. Returns `null`
506
+ * if the parameters can't be resolved to a valid URL.
507
+ * @since v22.1.0
508
+ * @param input The absolute or relative input URL to parse. If `input`
509
+ * is relative, then `base` is required. If `input` is absolute, the `base`
510
+ * is ignored. If `input` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
511
+ * @param base The base URL to resolve against if the `input` is not
512
+ * absolute. If `base` is not a string, it is [converted to a string](https://tc39.es/ecma262/#sec-tostring) first.
513
+ */
514
+ static parse(input: string, base?: string): URL | null;
515
+ constructor(input: string | { toString: () => string }, base?: string | URL);
416
516
  /**
417
517
  * Gets and sets the fragment portion of the URL.
418
518
  *
@@ -486,9 +586,9 @@ declare module "url" {
486
586
  * Getting the value of the `href` property is equivalent to calling {@link toString}.
487
587
  *
488
588
  * Setting the value of this property to a new value is equivalent to creating a
489
- * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
589
+ * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified.
490
590
  *
491
- * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
591
+ * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown.
492
592
  */
493
593
  href: string;
494
594
  /**
@@ -541,14 +641,14 @@ declare module "url" {
541
641
  * // Prints https://example.org/abcdef?123
542
642
  * ```
543
643
  *
544
- * Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters
644
+ * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters
545
645
  * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
546
646
  */
547
647
  pathname: string;
548
648
  /**
549
649
  * Gets and sets the port portion of the URL.
550
650
  *
551
- * The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will
651
+ * The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will
552
652
  * result in the `port` value becoming
553
653
  * the empty string (`''`).
554
654
  *
@@ -647,7 +747,7 @@ declare module "url" {
647
747
  * // Prints https://example.org/abc?abc=xyz
648
748
  * ```
649
749
  *
650
- * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
750
+ * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which
651
751
  * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
652
752
  */
653
753
  search: string;
@@ -688,7 +788,7 @@ declare module "url" {
688
788
  * // Prints https://123:xyz@example.com/
689
789
  * ```
690
790
  *
691
- * Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which
791
+ * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which
692
792
  * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
693
793
  */
694
794
  username: string;
@@ -715,8 +815,59 @@ declare module "url" {
715
815
  */
716
816
  toJSON(): string;
717
817
  }
818
+ interface URLPatternComponentResult {
819
+ input: string;
820
+ groups: Record<string, string | undefined>;
821
+ }
822
+ interface URLPatternInit {
823
+ protocol?: string;
824
+ username?: string;
825
+ password?: string;
826
+ hostname?: string;
827
+ port?: string;
828
+ pathname?: string;
829
+ search?: string;
830
+ hash?: string;
831
+ baseURL?: string;
832
+ }
833
+ interface URLPatternOptions {
834
+ ignoreCase?: boolean;
835
+ }
836
+ interface URLPatternResult {
837
+ inputs: (string | URLPatternInit)[];
838
+ protocol: URLPatternComponentResult;
839
+ username: URLPatternComponentResult;
840
+ password: URLPatternComponentResult;
841
+ hostname: URLPatternComponentResult;
842
+ port: URLPatternComponentResult;
843
+ pathname: URLPatternComponentResult;
844
+ search: URLPatternComponentResult;
845
+ hash: URLPatternComponentResult;
846
+ }
718
847
  /**
719
- * The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the
848
+ * @since v23.8.0
849
+ * @experimental
850
+ */
851
+ class URLPattern {
852
+ constructor(input: string | URLPatternInit, baseURL: string, options?: URLPatternOptions);
853
+ constructor(input?: string | URLPatternInit, options?: URLPatternOptions);
854
+ exec(input?: string | URLPatternInit, baseURL?: string): URLPatternResult | null;
855
+ readonly hasRegExpGroups: boolean;
856
+ readonly hash: string;
857
+ readonly hostname: string;
858
+ readonly password: string;
859
+ readonly pathname: string;
860
+ readonly port: string;
861
+ readonly protocol: string;
862
+ readonly search: string;
863
+ test(input?: string | URLPatternInit, baseURL?: string): boolean;
864
+ readonly username: string;
865
+ }
866
+ interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
867
+ [Symbol.iterator](): URLSearchParamsIterator<T>;
868
+ }
869
+ /**
870
+ * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the
720
871
  * four following constructors.
721
872
  * The `URLSearchParams` class is also available on the global object.
722
873
  *
@@ -774,18 +925,18 @@ declare module "url" {
774
925
  append(name: string, value: string): void;
775
926
  /**
776
927
  * If `value` is provided, removes all name-value pairs
777
- * where name is `name` and value is `value`..
928
+ * where name is `name` and value is `value`.
778
929
  *
779
930
  * If `value` is not provided, removes all name-value pairs whose name is `name`.
780
931
  */
781
932
  delete(name: string, value?: string): void;
782
933
  /**
783
934
  * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
784
- * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
935
+ * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`.
785
936
  *
786
- * Alias for `urlSearchParams[@@iterator]()`.
937
+ * Alias for `urlSearchParams[Symbol.iterator]()`.
787
938
  */
788
- entries(): IterableIterator<[string, string]>;
939
+ entries(): URLSearchParamsIterator<[string, string]>;
789
940
  /**
790
941
  * Iterates over each name-value pair in the query and invokes the given function.
791
942
  *
@@ -802,7 +953,7 @@ declare module "url" {
802
953
  * @param thisArg To be used as `this` value for when `fn` is called
803
954
  */
804
955
  forEach<TThis = this>(
805
- callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
956
+ fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
806
957
  thisArg?: TThis,
807
958
  ): void;
808
959
  /**
@@ -817,7 +968,7 @@ declare module "url" {
817
968
  */
818
969
  getAll(name: string): string[];
819
970
  /**
820
- * Checks if the `URLSearchParams` object contains key-value pair(s) based on`name` and an optional `value` argument.
971
+ * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument.
821
972
  *
822
973
  * If `value` is provided, returns `true` when name-value pair with
823
974
  * same `name` and `value` exists.
@@ -839,9 +990,9 @@ declare module "url" {
839
990
  * // foo
840
991
  * ```
841
992
  */
842
- keys(): IterableIterator<string>;
993
+ keys(): URLSearchParamsIterator<string>;
843
994
  /**
844
- * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
995
+ * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
845
996
  * set the first such pair's value to `value` and remove all others. If not,
846
997
  * append the name-value pair to the query string.
847
998
  *
@@ -889,37 +1040,38 @@ declare module "url" {
889
1040
  /**
890
1041
  * Returns an ES6 `Iterator` over the values of each name-value pair.
891
1042
  */
892
- values(): IterableIterator<string>;
893
- [Symbol.iterator](): IterableIterator<[string, string]>;
1043
+ values(): URLSearchParamsIterator<string>;
1044
+ [Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
894
1045
  }
895
- import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
1046
+ import {
1047
+ URL as _URL,
1048
+ URLPattern as _URLPattern,
1049
+ URLPatternInit as _URLPatternInit,
1050
+ URLPatternResult as _URLPatternResult,
1051
+ URLSearchParams as _URLSearchParams,
1052
+ } from "url";
896
1053
  global {
897
- interface URLSearchParams extends _URLSearchParams {}
898
1054
  interface URL extends _URL {}
899
- interface Global {
900
- URL: typeof _URL;
901
- URLSearchParams: typeof _URLSearchParams;
902
- }
903
- /**
904
- * `URL` class is a global reference for `require('url').URL`
905
- * https://nodejs.org/api/url.html#the-whatwg-url-api
906
- * @since v10.0.0
907
- */
908
1055
  var URL: typeof globalThis extends {
909
1056
  onmessage: any;
910
1057
  URL: infer T;
911
1058
  } ? T
912
1059
  : typeof _URL;
913
- /**
914
- * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
915
- * https://nodejs.org/api/url.html#class-urlsearchparams
916
- * @since v10.0.0
917
- */
1060
+ interface URLSearchParams extends _URLSearchParams {}
918
1061
  var URLSearchParams: typeof globalThis extends {
919
1062
  onmessage: any;
920
1063
  URLSearchParams: infer T;
921
1064
  } ? T
922
1065
  : typeof _URLSearchParams;
1066
+ interface URLPatternInit extends _URLPatternInit {}
1067
+ interface URLPatternResult extends _URLPatternResult {}
1068
+ interface URLPattern extends _URLPattern {}
1069
+ var URLPattern: typeof globalThis extends {
1070
+ onmessage: any;
1071
+ scheduler: any; // Must be a var introduced at the same time as URLPattern.
1072
+ URLPattern: infer T;
1073
+ } ? T
1074
+ : typeof _URLPattern;
923
1075
  }
924
1076
  }
925
1077
  declare module "node:url" {