css-variable-lsp 1.0.0 → 1.0.1

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