cloudstructs 0.7.2 → 0.7.3

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 (383) hide show
  1. package/.jsii +3 -3
  2. package/lib/codecommit-mirror/index.js +2 -2
  3. package/lib/dmarc/index.js +2 -2
  4. package/lib/ecs-service-roller/index.js +2 -2
  5. package/lib/email-receiver/receiver.js +2 -2
  6. package/lib/email-receiver/whitelist.lambda.js +1 -1
  7. package/lib/saml-identity-provider/index.js +2 -2
  8. package/lib/slack-app/manifest.js +2 -2
  9. package/lib/slack-app/provider.lambda.js +1 -1
  10. package/lib/slack-app/slack-app.js +2 -2
  11. package/lib/slack-events/events.lambda.js +1 -1
  12. package/lib/slack-events/index.js +2 -2
  13. package/lib/slack-events/signature.js +1 -1
  14. package/lib/slack-textract/detect.lambda.js +1 -1
  15. package/lib/slack-textract/index.js +1 -1
  16. package/lib/ssl-server-test/index.js +1 -1
  17. package/lib/state-machine-cr-provider/index.js +3 -3
  18. package/lib/state-machine-cr-provider/runtime/http.js +1 -1
  19. package/lib/state-machine-cr-provider/runtime/index.js +1 -1
  20. package/lib/static-website/index.js +2 -2
  21. package/lib/toolkit-cleaner/clean-images.lambda.js +1 -1
  22. package/lib/toolkit-cleaner/clean-objects.lambda.js +1 -1
  23. package/lib/toolkit-cleaner/extract-template-hashes.lambda.js +1 -1
  24. package/lib/toolkit-cleaner/get-stack-names.lambda.js +1 -1
  25. package/lib/toolkit-cleaner/index.js +3 -3
  26. package/lib/url-shortener/index.js +2 -2
  27. package/lib/url-shortener/redirect.edge-lambda.js +1 -1
  28. package/lib/url-shortener/shortener.lambda.js +1 -1
  29. package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
  30. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +2 -0
  31. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +35 -18
  32. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +4 -2
  33. package/node_modules/@slack/logger/node_modules/@types/node/package.json +3 -15
  34. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  35. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +2 -0
  36. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +35 -18
  37. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +4 -2
  38. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +3 -15
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +2 -0
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +35 -18
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +4 -2
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -15
  44. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
  45. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +2 -0
  46. package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +35 -18
  47. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +4 -2
  48. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +3 -15
  49. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  50. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +2 -0
  51. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +35 -18
  52. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +4 -2
  53. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -15
  54. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  55. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +2 -0
  56. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +35 -18
  57. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +4 -2
  58. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -15
  59. package/package.json +17 -17
  60. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  61. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  62. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  63. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  64. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  65. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  66. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  67. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  68. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  69. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  70. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  71. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  72. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  73. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  74. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  75. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  76. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  77. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  78. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  79. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  80. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  81. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  82. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  83. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  84. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  85. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  86. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  87. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  88. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  89. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  90. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  91. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  92. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  93. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  94. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  95. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  96. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  97. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  98. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  99. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  100. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  101. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  102. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  103. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  104. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  105. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  106. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  107. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  108. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  109. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  110. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  111. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  112. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  113. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  114. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  115. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  116. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  117. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  118. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  119. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  120. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  121. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  122. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  123. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  124. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  125. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  126. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  127. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  128. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  129. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  130. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  131. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  132. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  133. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  134. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  135. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  136. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  137. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  138. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  139. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  140. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  141. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  142. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  143. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  144. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  145. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  146. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  147. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  148. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  149. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  150. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  151. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  152. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  153. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  154. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  155. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  156. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  157. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  158. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  159. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  160. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  161. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  162. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  163. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  164. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  165. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  166. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  167. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  168. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  169. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  170. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  171. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  172. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  173. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  174. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  175. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  176. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  177. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  178. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  179. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  180. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  181. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  182. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  183. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  184. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  185. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  186. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  187. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  188. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  189. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  190. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  191. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  192. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  193. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  194. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  195. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  196. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  197. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  198. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  199. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  200. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  201. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  202. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  203. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  204. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  205. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  206. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  207. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  208. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  209. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  210. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  211. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  212. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  213. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  214. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  215. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  216. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  217. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  218. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  219. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  220. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  221. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  222. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  223. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  224. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  225. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  226. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  227. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  228. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  229. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  230. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  231. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  232. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  233. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  234. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  235. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  236. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  237. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  238. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  239. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  240. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  241. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  242. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  243. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  244. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  245. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  246. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  247. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  248. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  249. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  250. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  251. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  252. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  253. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  254. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  255. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  256. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  257. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  258. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  259. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  260. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  261. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  262. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  263. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  264. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  265. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  266. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  267. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  268. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  269. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  270. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  271. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  272. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  273. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  274. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  275. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  276. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  277. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  278. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  279. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  280. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  281. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  282. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  283. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  284. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  285. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  286. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  287. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  288. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  289. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  290. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  291. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  292. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  293. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  294. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  295. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  296. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  297. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  298. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  299. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  300. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  301. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  302. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  303. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  304. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  305. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  306. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  307. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  308. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  309. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  310. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  311. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  312. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  313. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  314. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  315. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  316. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  317. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  318. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  319. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  320. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  321. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  322. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  323. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  324. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  325. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  326. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  327. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  328. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  329. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  330. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  331. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  332. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  333. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  334. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  335. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  336. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  337. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  338. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  339. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  340. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  341. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  342. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  343. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  344. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  345. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  346. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  347. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  348. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  349. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  350. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  351. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  352. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  353. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  354. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  355. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  356. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  357. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  358. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  359. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  360. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  361. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  362. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  363. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  364. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  365. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  366. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  367. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  368. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  369. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  370. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  371. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  372. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  373. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  374. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  375. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  376. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  377. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  378. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  379. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  380. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  381. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  382. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  383. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
@@ -1,944 +0,0 @@
1
- /**
2
- * The `node:url` module provides utilities for URL resolution and parsing. It can
3
- * be accessed using:
4
- *
5
- * ```js
6
- * import url from 'node:url';
7
- * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.11.0/lib/url.js)
9
- */
10
- declare module "url" {
11
- import { Blob as NodeBlob } from "node:buffer";
12
- import { ClientRequestArgs } from "node:http";
13
- import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
14
- // Input to `url.format`
15
- interface UrlObject {
16
- auth?: string | null | undefined;
17
- hash?: string | null | undefined;
18
- host?: string | null | undefined;
19
- hostname?: string | null | undefined;
20
- href?: string | null | undefined;
21
- pathname?: string | null | undefined;
22
- protocol?: string | null | undefined;
23
- search?: string | null | undefined;
24
- slashes?: boolean | null | undefined;
25
- port?: string | number | null | undefined;
26
- query?: string | null | ParsedUrlQueryInput | undefined;
27
- }
28
- // Output of `url.parse`
29
- interface Url {
30
- auth: string | null;
31
- hash: string | null;
32
- host: string | null;
33
- hostname: string | null;
34
- href: string;
35
- path: string | null;
36
- pathname: string | null;
37
- protocol: string | null;
38
- search: string | null;
39
- slashes: boolean | null;
40
- port: string | null;
41
- query: string | null | ParsedUrlQuery;
42
- }
43
- interface UrlWithParsedQuery extends Url {
44
- query: ParsedUrlQuery;
45
- }
46
- interface UrlWithStringQuery extends Url {
47
- query: string | null;
48
- }
49
- /**
50
- * The `url.parse()` method takes a URL string, parses it, and returns a URL
51
- * object.
52
- *
53
- * A `TypeError` is thrown if `urlString` is not a string.
54
- *
55
- * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
56
- *
57
- * `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.
60
- * @since v0.1.25
61
- * @deprecated Use the WHATWG URL API instead.
62
- * @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'}`.
67
- */
68
- function parse(urlString: string): UrlWithStringQuery;
69
- function parse(
70
- urlString: string,
71
- parseQueryString: false | undefined,
72
- slashesDenoteHost?: boolean,
73
- ): UrlWithStringQuery;
74
- function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
75
- function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
76
- /**
77
- * The `url.format()` method returns a formatted URL string derived from `urlObject`.
78
- *
79
- * ```js
80
- * const url = require('node:url');
81
- * url.format({
82
- * protocol: 'https',
83
- * hostname: 'example.com',
84
- * pathname: '/some/path',
85
- * query: {
86
- * page: 1,
87
- * format: 'json',
88
- * },
89
- * });
90
- *
91
- * // => 'https://example.com/some/path?page=1&format=json'
92
- * ```
93
- *
94
- * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
95
- *
96
- * The formatting process operates as follows:
97
- *
98
- * * A new empty string `result` is created.
99
- * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
100
- * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
101
- * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
102
- * 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`:
104
- * * `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 `@`.
108
- * * If the `urlObject.host` property is `undefined` then:
109
- * * If the `urlObject.hostname` is a string, it is appended to `result`.
110
- * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
111
- * an `Error` is thrown.
112
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
113
- * * 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`.
116
- * * 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
118
- * (`/`), then the literal string `'/'` is appended to `result`.
119
- * * The value of `urlObject.pathname` is appended to `result`.
120
- * * 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`.
123
- * * Otherwise, if `urlObject.search` is a string:
124
- * * If the value of `urlObject.search` _does not start_ with the ASCII question
125
- * mark (`?`) character, the literal string `?` is appended to `result`.
126
- * * The value of `urlObject.search` is appended to `result`.
127
- * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
128
- * * If the `urlObject.hash` property is a string:
129
- * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
130
- * character, the literal string `#` is appended to `result`.
131
- * * The value of `urlObject.hash` is appended to `result`.
132
- * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
133
- * string, an `Error` is thrown.
134
- * * `result` is returned.
135
- * @since v0.1.25
136
- * @legacy Use the WHATWG URL API instead.
137
- * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
138
- */
139
- function format(urlObject: URL, options?: URLFormatOptions): string;
140
- /**
141
- * The `url.format()` method returns a formatted URL string derived from `urlObject`.
142
- *
143
- * ```js
144
- * const url = require('node:url');
145
- * url.format({
146
- * protocol: 'https',
147
- * hostname: 'example.com',
148
- * pathname: '/some/path',
149
- * query: {
150
- * page: 1,
151
- * format: 'json',
152
- * },
153
- * });
154
- *
155
- * // => 'https://example.com/some/path?page=1&format=json'
156
- * ```
157
- *
158
- * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
159
- *
160
- * The formatting process operates as follows:
161
- *
162
- * * A new empty string `result` is created.
163
- * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
164
- * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
165
- * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
166
- * 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`:
168
- * * `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 `@`.
172
- * * If the `urlObject.host` property is `undefined` then:
173
- * * If the `urlObject.hostname` is a string, it is appended to `result`.
174
- * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
175
- * an `Error` is thrown.
176
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
177
- * * 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`.
180
- * * 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
182
- * (`/`), then the literal string `'/'` is appended to `result`.
183
- * * The value of `urlObject.pathname` is appended to `result`.
184
- * * 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`.
187
- * * Otherwise, if `urlObject.search` is a string:
188
- * * If the value of `urlObject.search` _does not start_ with the ASCII question
189
- * mark (`?`) character, the literal string `?` is appended to `result`.
190
- * * The value of `urlObject.search` is appended to `result`.
191
- * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
192
- * * If the `urlObject.hash` property is a string:
193
- * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
194
- * character, the literal string `#` is appended to `result`.
195
- * * The value of `urlObject.hash` is appended to `result`.
196
- * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
197
- * string, an `Error` is thrown.
198
- * * `result` is returned.
199
- * @since v0.1.25
200
- * @legacy Use the WHATWG URL API instead.
201
- * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
202
- */
203
- function format(urlObject: UrlObject | string): string;
204
- /**
205
- * The `url.resolve()` method resolves a target URL relative to a base URL in a
206
- * manner similar to that of a web browser resolving an anchor tag.
207
- *
208
- * ```js
209
- * const url = require('node:url');
210
- * url.resolve('/one/two/three', 'four'); // '/one/two/four'
211
- * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
212
- * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
213
- * ```
214
- *
215
- * To achieve the same result using the WHATWG URL API:
216
- *
217
- * ```js
218
- * function resolve(from, to) {
219
- * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
220
- * if (resolvedUrl.protocol === 'resolve:') {
221
- * // `from` is a relative URL.
222
- * const { pathname, search, hash } = resolvedUrl;
223
- * return pathname + search + hash;
224
- * }
225
- * return resolvedUrl.toString();
226
- * }
227
- *
228
- * resolve('/one/two/three', 'four'); // '/one/two/four'
229
- * resolve('http://example.com/', '/one'); // 'http://example.com/one'
230
- * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
231
- * ```
232
- * @since v0.1.25
233
- * @legacy Use the WHATWG URL API instead.
234
- * @param from The base URL to use if `to` is a relative URL.
235
- * @param to The target URL to resolve.
236
- */
237
- function resolve(from: string, to: string): string;
238
- /**
239
- * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
240
- * invalid domain, the empty string is returned.
241
- *
242
- * It performs the inverse operation to {@link domainToUnicode}.
243
- *
244
- * ```js
245
- * import url from 'node:url';
246
- *
247
- * console.log(url.domainToASCII('español.com'));
248
- * // Prints xn--espaol-zwa.com
249
- * console.log(url.domainToASCII('中文.com'));
250
- * // Prints xn--fiq228c.com
251
- * console.log(url.domainToASCII('xn--iñvalid.com'));
252
- * // Prints an empty string
253
- * ```
254
- * @since v7.4.0, v6.13.0
255
- */
256
- function domainToASCII(domain: string): string;
257
- /**
258
- * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
259
- * domain, the empty string is returned.
260
- *
261
- * It performs the inverse operation to {@link domainToASCII}.
262
- *
263
- * ```js
264
- * import url from 'node:url';
265
- *
266
- * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
267
- * // Prints español.com
268
- * console.log(url.domainToUnicode('xn--fiq228c.com'));
269
- * // Prints 中文.com
270
- * console.log(url.domainToUnicode('xn--iñvalid.com'));
271
- * // Prints an empty string
272
- * ```
273
- * @since v7.4.0, v6.13.0
274
- */
275
- function domainToUnicode(domain: string): string;
276
- /**
277
- * This function ensures the correct decodings of percent-encoded characters as
278
- * well as ensuring a cross-platform valid absolute path string.
279
- *
280
- * ```js
281
- * import { fileURLToPath } from 'node:url';
282
- *
283
- * const __filename = fileURLToPath(import.meta.url);
284
- *
285
- * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
286
- * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
287
- *
288
- * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
289
- * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
290
- *
291
- * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
292
- * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
293
- *
294
- * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
295
- * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
296
- * ```
297
- * @since v10.12.0
298
- * @param url The file URL string or URL object to convert to a path.
299
- * @return The fully-resolved platform-specific Node.js file path.
300
- */
301
- function fileURLToPath(url: string | URL): string;
302
- /**
303
- * This function ensures that `path` is resolved absolutely, and that the URL
304
- * control characters are correctly encoded when converting into a File URL.
305
- *
306
- * ```js
307
- * import { pathToFileURL } from 'node:url';
308
- *
309
- * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
310
- * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
311
- *
312
- * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
313
- * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
314
- * ```
315
- * @since v10.12.0
316
- * @param path The path to convert to a File URL.
317
- * @return The file URL object.
318
- */
319
- function pathToFileURL(path: string): URL;
320
- /**
321
- * This utility function converts a URL object into an ordinary options object as
322
- * expected by the `http.request()` and `https.request()` APIs.
323
- *
324
- * ```js
325
- * import { urlToHttpOptions } from 'node:url';
326
- * const myURL = new URL('https://a:b@測試?abc#foo');
327
- *
328
- * console.log(urlToHttpOptions(myURL));
329
- * /*
330
- * {
331
- * protocol: 'https:',
332
- * hostname: 'xn--g6w251d',
333
- * hash: '#foo',
334
- * search: '?abc',
335
- * pathname: '/',
336
- * path: '/?abc',
337
- * href: 'https://a:b@xn--g6w251d/?abc#foo',
338
- * auth: 'a:b'
339
- * }
340
- *
341
- * ```
342
- * @since v15.7.0, v14.18.0
343
- * @param url The `WHATWG URL` object to convert to an options object.
344
- * @return Options object
345
- */
346
- function urlToHttpOptions(url: URL): ClientRequestArgs;
347
- interface URLFormatOptions {
348
- /**
349
- * `true` if the serialized URL string should include the username and password, `false` otherwise.
350
- * @default true
351
- */
352
- auth?: boolean | undefined;
353
- /**
354
- * `true` if the serialized URL string should include the fragment, `false` otherwise.
355
- * @default true
356
- */
357
- fragment?: boolean | undefined;
358
- /**
359
- * `true` if the serialized URL string should include the search query, `false` otherwise.
360
- * @default true
361
- */
362
- search?: boolean | undefined;
363
- /**
364
- * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to
365
- * being Punycode encoded.
366
- * @default false
367
- */
368
- unicode?: boolean | undefined;
369
- }
370
- /**
371
- * Browser-compatible `URL` class, implemented by following the WHATWG URL
372
- * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
373
- * The `URL` class is also available on the global object.
374
- *
375
- * In accordance with browser conventions, all properties of `URL` objects
376
- * are implemented as getters and setters on the class prototype, rather than as
377
- * data properties on the object itself. Thus, unlike `legacy urlObject`s,
378
- * 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
379
- * return `true`.
380
- * @since v7.0.0, v6.13.0
381
- */
382
- class URL {
383
- /**
384
- * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
385
- *
386
- * ```js
387
- * const {
388
- * Blob,
389
- * resolveObjectURL,
390
- * } = require('node:buffer');
391
- *
392
- * const blob = new Blob(['hello']);
393
- * const id = URL.createObjectURL(blob);
394
- *
395
- * // later...
396
- *
397
- * const otherBlob = resolveObjectURL(id);
398
- * console.log(otherBlob.size);
399
- * ```
400
- *
401
- * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it.
402
- *
403
- * `Blob` objects are registered within the current thread. If using Worker
404
- * Threads, `Blob` objects registered within one Worker will not be available
405
- * to other workers or the main thread.
406
- * @since v16.7.0
407
- * @experimental
408
- */
409
- static createObjectURL(blob: NodeBlob): string;
410
- /**
411
- * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
412
- * ID that isn't registered will silently fail.
413
- * @since v16.7.0
414
- * @experimental
415
- * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
416
- */
417
- static revokeObjectURL(id: string): void;
418
- /**
419
- * Checks if an `input` relative to the `base` can be parsed to a `URL`.
420
- *
421
- * ```js
422
- * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
423
- *
424
- * const isNotValid = URL.canParse('/foo'); // false
425
- * ```
426
- * @since v19.9.0
427
- * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
428
- * `converted to a string` first.
429
- * @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.
430
- */
431
- static canParse(input: string, base?: string): boolean;
432
- constructor(input: string | { toString: () => string }, base?: string | URL);
433
- /**
434
- * Gets and sets the fragment portion of the URL.
435
- *
436
- * ```js
437
- * const myURL = new URL('https://example.org/foo#bar');
438
- * console.log(myURL.hash);
439
- * // Prints #bar
440
- *
441
- * myURL.hash = 'baz';
442
- * console.log(myURL.href);
443
- * // Prints https://example.org/foo#baz
444
- * ```
445
- *
446
- * Invalid URL characters included in the value assigned to the `hash` property
447
- * are `percent-encoded`. The selection of which characters to
448
- * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
449
- */
450
- hash: string;
451
- /**
452
- * Gets and sets the host portion of the URL.
453
- *
454
- * ```js
455
- * const myURL = new URL('https://example.org:81/foo');
456
- * console.log(myURL.host);
457
- * // Prints example.org:81
458
- *
459
- * myURL.host = 'example.com:82';
460
- * console.log(myURL.href);
461
- * // Prints https://example.com:82/foo
462
- * ```
463
- *
464
- * Invalid host values assigned to the `host` property are ignored.
465
- */
466
- host: string;
467
- /**
468
- * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
469
- * port.
470
- *
471
- * ```js
472
- * const myURL = new URL('https://example.org:81/foo');
473
- * console.log(myURL.hostname);
474
- * // Prints example.org
475
- *
476
- * // Setting the hostname does not change the port
477
- * myURL.hostname = 'example.com';
478
- * console.log(myURL.href);
479
- * // Prints https://example.com:81/foo
480
- *
481
- * // Use myURL.host to change the hostname and port
482
- * myURL.host = 'example.org:82';
483
- * console.log(myURL.href);
484
- * // Prints https://example.org:82/foo
485
- * ```
486
- *
487
- * Invalid host name values assigned to the `hostname` property are ignored.
488
- */
489
- hostname: string;
490
- /**
491
- * Gets and sets the serialized URL.
492
- *
493
- * ```js
494
- * const myURL = new URL('https://example.org/foo');
495
- * console.log(myURL.href);
496
- * // Prints https://example.org/foo
497
- *
498
- * myURL.href = 'https://example.com/bar';
499
- * console.log(myURL.href);
500
- * // Prints https://example.com/bar
501
- * ```
502
- *
503
- * Getting the value of the `href` property is equivalent to calling {@link toString}.
504
- *
505
- * Setting the value of this property to a new value is equivalent to creating a
506
- * new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
507
- *
508
- * If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
509
- */
510
- href: string;
511
- /**
512
- * Gets the read-only serialization of the URL's origin.
513
- *
514
- * ```js
515
- * const myURL = new URL('https://example.org/foo/bar?baz');
516
- * console.log(myURL.origin);
517
- * // Prints https://example.org
518
- * ```
519
- *
520
- * ```js
521
- * const idnURL = new URL('https://測試');
522
- * console.log(idnURL.origin);
523
- * // Prints https://xn--g6w251d
524
- *
525
- * console.log(idnURL.hostname);
526
- * // Prints xn--g6w251d
527
- * ```
528
- */
529
- readonly origin: string;
530
- /**
531
- * Gets and sets the password portion of the URL.
532
- *
533
- * ```js
534
- * const myURL = new URL('https://abc:xyz@example.com');
535
- * console.log(myURL.password);
536
- * // Prints xyz
537
- *
538
- * myURL.password = '123';
539
- * console.log(myURL.href);
540
- * // Prints https://abc:123@example.com/
541
- * ```
542
- *
543
- * Invalid URL characters included in the value assigned to the `password` property
544
- * are `percent-encoded`. The selection of which characters to
545
- * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
546
- */
547
- password: string;
548
- /**
549
- * Gets and sets the path portion of the URL.
550
- *
551
- * ```js
552
- * const myURL = new URL('https://example.org/abc/xyz?123');
553
- * console.log(myURL.pathname);
554
- * // Prints /abc/xyz
555
- *
556
- * myURL.pathname = '/abcdef';
557
- * console.log(myURL.href);
558
- * // Prints https://example.org/abcdef?123
559
- * ```
560
- *
561
- * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters
562
- * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
563
- */
564
- pathname: string;
565
- /**
566
- * Gets and sets the port portion of the URL.
567
- *
568
- * 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
569
- * result in the `port` value becoming
570
- * the empty string (`''`).
571
- *
572
- * The port value can be an empty string in which case the port depends on
573
- * the protocol/scheme:
574
- *
575
- * <omitted>
576
- *
577
- * Upon assigning a value to the port, the value will first be converted to a
578
- * string using `.toString()`.
579
- *
580
- * If that string is invalid but it begins with a number, the leading number is
581
- * assigned to `port`.
582
- * If the number lies outside the range denoted above, it is ignored.
583
- *
584
- * ```js
585
- * const myURL = new URL('https://example.org:8888');
586
- * console.log(myURL.port);
587
- * // Prints 8888
588
- *
589
- * // Default ports are automatically transformed to the empty string
590
- * // (HTTPS protocol's default port is 443)
591
- * myURL.port = '443';
592
- * console.log(myURL.port);
593
- * // Prints the empty string
594
- * console.log(myURL.href);
595
- * // Prints https://example.org/
596
- *
597
- * myURL.port = 1234;
598
- * console.log(myURL.port);
599
- * // Prints 1234
600
- * console.log(myURL.href);
601
- * // Prints https://example.org:1234/
602
- *
603
- * // Completely invalid port strings are ignored
604
- * myURL.port = 'abcd';
605
- * console.log(myURL.port);
606
- * // Prints 1234
607
- *
608
- * // Leading numbers are treated as a port number
609
- * myURL.port = '5678abcd';
610
- * console.log(myURL.port);
611
- * // Prints 5678
612
- *
613
- * // Non-integers are truncated
614
- * myURL.port = 1234.5678;
615
- * console.log(myURL.port);
616
- * // Prints 1234
617
- *
618
- * // Out-of-range numbers which are not represented in scientific notation
619
- * // will be ignored.
620
- * myURL.port = 1e10; // 10000000000, will be range-checked as described below
621
- * console.log(myURL.port);
622
- * // Prints 1234
623
- * ```
624
- *
625
- * Numbers which contain a decimal point,
626
- * such as floating-point numbers or numbers in scientific notation,
627
- * are not an exception to this rule.
628
- * Leading numbers up to the decimal point will be set as the URL's port,
629
- * assuming they are valid:
630
- *
631
- * ```js
632
- * myURL.port = 4.567e21;
633
- * console.log(myURL.port);
634
- * // Prints 4 (because it is the leading number in the string '4.567e21')
635
- * ```
636
- */
637
- port: string;
638
- /**
639
- * Gets and sets the protocol portion of the URL.
640
- *
641
- * ```js
642
- * const myURL = new URL('https://example.org');
643
- * console.log(myURL.protocol);
644
- * // Prints https:
645
- *
646
- * myURL.protocol = 'ftp';
647
- * console.log(myURL.href);
648
- * // Prints ftp://example.org/
649
- * ```
650
- *
651
- * Invalid URL protocol values assigned to the `protocol` property are ignored.
652
- */
653
- protocol: string;
654
- /**
655
- * Gets and sets the serialized query portion of the URL.
656
- *
657
- * ```js
658
- * const myURL = new URL('https://example.org/abc?123');
659
- * console.log(myURL.search);
660
- * // Prints ?123
661
- *
662
- * myURL.search = 'abc=xyz';
663
- * console.log(myURL.href);
664
- * // Prints https://example.org/abc?abc=xyz
665
- * ```
666
- *
667
- * Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
668
- * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
669
- */
670
- search: string;
671
- /**
672
- * Gets the `URLSearchParams` object representing the query parameters of the
673
- * URL. This property is read-only but the `URLSearchParams` object it provides
674
- * can be used to mutate the URL instance; to replace the entirety of query
675
- * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
676
- *
677
- * Use care when using `.searchParams` to modify the `URL` because,
678
- * per the WHATWG specification, the `URLSearchParams` object uses
679
- * different rules to determine which characters to percent-encode. For
680
- * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
681
- * character, while `URLSearchParams` will always encode it:
682
- *
683
- * ```js
684
- * const myURL = new URL('https://example.org/abc?foo=~bar');
685
- *
686
- * console.log(myURL.search); // prints ?foo=~bar
687
- *
688
- * // Modify the URL via searchParams...
689
- * myURL.searchParams.sort();
690
- *
691
- * console.log(myURL.search); // prints ?foo=%7Ebar
692
- * ```
693
- */
694
- readonly searchParams: URLSearchParams;
695
- /**
696
- * Gets and sets the username portion of the URL.
697
- *
698
- * ```js
699
- * const myURL = new URL('https://abc:xyz@example.com');
700
- * console.log(myURL.username);
701
- * // Prints abc
702
- *
703
- * myURL.username = '123';
704
- * console.log(myURL.href);
705
- * // Prints https://123:xyz@example.com/
706
- * ```
707
- *
708
- * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which
709
- * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
710
- */
711
- username: string;
712
- /**
713
- * The `toString()` method on the `URL` object returns the serialized URL. The
714
- * value returned is equivalent to that of {@link href} and {@link toJSON}.
715
- */
716
- toString(): string;
717
- /**
718
- * The `toJSON()` method on the `URL` object returns the serialized URL. The
719
- * value returned is equivalent to that of {@link href} and {@link toString}.
720
- *
721
- * This method is automatically called when an `URL` object is serialized
722
- * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
723
- *
724
- * ```js
725
- * const myURLs = [
726
- * new URL('https://www.example.com'),
727
- * new URL('https://test.example.org'),
728
- * ];
729
- * console.log(JSON.stringify(myURLs));
730
- * // Prints ["https://www.example.com/","https://test.example.org/"]
731
- * ```
732
- */
733
- toJSON(): string;
734
- }
735
- /**
736
- * 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
737
- * four following constructors.
738
- * The `URLSearchParams` class is also available on the global object.
739
- *
740
- * The WHATWG `URLSearchParams` interface and the `querystring` module have
741
- * similar purpose, but the purpose of the `querystring` module is more
742
- * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
743
- * On the other hand, this API is designed purely for URL query strings.
744
- *
745
- * ```js
746
- * const myURL = new URL('https://example.org/?abc=123');
747
- * console.log(myURL.searchParams.get('abc'));
748
- * // Prints 123
749
- *
750
- * myURL.searchParams.append('abc', 'xyz');
751
- * console.log(myURL.href);
752
- * // Prints https://example.org/?abc=123&#x26;abc=xyz
753
- *
754
- * myURL.searchParams.delete('abc');
755
- * myURL.searchParams.set('a', 'b');
756
- * console.log(myURL.href);
757
- * // Prints https://example.org/?a=b
758
- *
759
- * const newSearchParams = new URLSearchParams(myURL.searchParams);
760
- * // The above is equivalent to
761
- * // const newSearchParams = new URLSearchParams(myURL.search);
762
- *
763
- * newSearchParams.append('a', 'c');
764
- * console.log(myURL.href);
765
- * // Prints https://example.org/?a=b
766
- * console.log(newSearchParams.toString());
767
- * // Prints a=b&#x26;a=c
768
- *
769
- * // newSearchParams.toString() is implicitly called
770
- * myURL.search = newSearchParams;
771
- * console.log(myURL.href);
772
- * // Prints https://example.org/?a=b&#x26;a=c
773
- * newSearchParams.delete('a');
774
- * console.log(myURL.href);
775
- * // Prints https://example.org/?a=b&#x26;a=c
776
- * ```
777
- * @since v7.5.0, v6.13.0
778
- */
779
- class URLSearchParams implements Iterable<[string, string]> {
780
- constructor(
781
- init?:
782
- | URLSearchParams
783
- | string
784
- | Record<string, string | readonly string[]>
785
- | Iterable<[string, string]>
786
- | ReadonlyArray<[string, string]>,
787
- );
788
- /**
789
- * Append a new name-value pair to the query string.
790
- */
791
- append(name: string, value: string): void;
792
- /**
793
- * If `value` is provided, removes all name-value pairs
794
- * where name is `name` and value is `value`.
795
- *
796
- * If `value` is not provided, removes all name-value pairs whose name is `name`.
797
- */
798
- delete(name: string, value?: string): void;
799
- /**
800
- * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
801
- * 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`.
802
- *
803
- * Alias for `urlSearchParams[@@iterator]()`.
804
- */
805
- entries(): IterableIterator<[string, string]>;
806
- /**
807
- * Iterates over each name-value pair in the query and invokes the given function.
808
- *
809
- * ```js
810
- * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
811
- * myURL.searchParams.forEach((value, name, searchParams) => {
812
- * console.log(name, value, myURL.searchParams === searchParams);
813
- * });
814
- * // Prints:
815
- * // a b true
816
- * // c d true
817
- * ```
818
- * @param fn Invoked for each name-value pair in the query
819
- * @param thisArg To be used as `this` value for when `fn` is called
820
- */
821
- forEach<TThis = this>(
822
- fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
823
- thisArg?: TThis,
824
- ): void;
825
- /**
826
- * Returns the value of the first name-value pair whose name is `name`. If there
827
- * are no such pairs, `null` is returned.
828
- * @return or `null` if there is no name-value pair with the given `name`.
829
- */
830
- get(name: string): string | null;
831
- /**
832
- * Returns the values of all name-value pairs whose name is `name`. If there are
833
- * no such pairs, an empty array is returned.
834
- */
835
- getAll(name: string): string[];
836
- /**
837
- * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument.
838
- *
839
- * If `value` is provided, returns `true` when name-value pair with
840
- * same `name` and `value` exists.
841
- *
842
- * If `value` is not provided, returns `true` if there is at least one name-value
843
- * pair whose name is `name`.
844
- */
845
- has(name: string, value?: string): boolean;
846
- /**
847
- * Returns an ES6 `Iterator` over the names of each name-value pair.
848
- *
849
- * ```js
850
- * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
851
- * for (const name of params.keys()) {
852
- * console.log(name);
853
- * }
854
- * // Prints:
855
- * // foo
856
- * // foo
857
- * ```
858
- */
859
- keys(): IterableIterator<string>;
860
- /**
861
- * 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`,
862
- * set the first such pair's value to `value` and remove all others. If not,
863
- * append the name-value pair to the query string.
864
- *
865
- * ```js
866
- * const params = new URLSearchParams();
867
- * params.append('foo', 'bar');
868
- * params.append('foo', 'baz');
869
- * params.append('abc', 'def');
870
- * console.log(params.toString());
871
- * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
872
- *
873
- * params.set('foo', 'def');
874
- * params.set('xyz', 'opq');
875
- * console.log(params.toString());
876
- * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
877
- * ```
878
- */
879
- set(name: string, value: string): void;
880
- /**
881
- * The total number of parameter entries.
882
- * @since v19.8.0
883
- */
884
- readonly size: number;
885
- /**
886
- * Sort all existing name-value pairs in-place by their names. Sorting is done
887
- * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
888
- * with the same name is preserved.
889
- *
890
- * This method can be used, in particular, to increase cache hits.
891
- *
892
- * ```js
893
- * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
894
- * params.sort();
895
- * console.log(params.toString());
896
- * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
897
- * ```
898
- * @since v7.7.0, v6.13.0
899
- */
900
- sort(): void;
901
- /**
902
- * Returns the search parameters serialized as a string, with characters
903
- * percent-encoded where necessary.
904
- */
905
- toString(): string;
906
- /**
907
- * Returns an ES6 `Iterator` over the values of each name-value pair.
908
- */
909
- values(): IterableIterator<string>;
910
- [Symbol.iterator](): IterableIterator<[string, string]>;
911
- }
912
- import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
913
- global {
914
- interface URLSearchParams extends _URLSearchParams {}
915
- interface URL extends _URL {}
916
- interface Global {
917
- URL: typeof _URL;
918
- URLSearchParams: typeof _URLSearchParams;
919
- }
920
- /**
921
- * `URL` class is a global reference for `require('url').URL`
922
- * https://nodejs.org/api/url.html#the-whatwg-url-api
923
- * @since v10.0.0
924
- */
925
- var URL: typeof globalThis extends {
926
- onmessage: any;
927
- URL: infer T;
928
- } ? T
929
- : typeof _URL;
930
- /**
931
- * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
932
- * https://nodejs.org/api/url.html#class-urlsearchparams
933
- * @since v10.0.0
934
- */
935
- var URLSearchParams: typeof globalThis extends {
936
- onmessage: any;
937
- URLSearchParams: infer T;
938
- } ? T
939
- : typeof _URLSearchParams;
940
- }
941
- }
942
- declare module "node:url" {
943
- export * from "url";
944
- }