css-variable-lsp 1.0.0 → 1.0.2

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 (454) hide show
  1. package/README.md +5 -9
  2. package/package.json +5 -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/src/server.js +1 -0
  18. package/server/out/server/src/server.js.map +1 -1
  19. package/server/out/server.js +458 -0
  20. package/server/out/server.js.map +1 -0
  21. package/server/out/specificity.js +138 -0
  22. package/server/out/specificity.js.map +1 -0
  23. package/server/out/specificity.test.js +66 -0
  24. package/server/out/specificity.test.js.map +1 -0
  25. package/server/out/test.js +112 -0
  26. package/server/out/test.js.map +1 -0
  27. package/server/out/tsconfig.tsbuildinfo +1 -1
  28. package/server/src/server.ts +2 -0
  29. package/server/tsconfig.tsbuildinfo +1 -0
  30. package/client/node_modules/.package-lock.json +0 -110
  31. package/client/node_modules/@types/node/LICENSE +0 -21
  32. package/client/node_modules/@types/node/README.md +0 -15
  33. package/client/node_modules/@types/node/assert/strict.d.ts +0 -8
  34. package/client/node_modules/@types/node/assert.d.ts +0 -1005
  35. package/client/node_modules/@types/node/async_hooks.d.ts +0 -586
  36. package/client/node_modules/@types/node/buffer.buffer.d.ts +0 -457
  37. package/client/node_modules/@types/node/buffer.d.ts +0 -1901
  38. package/client/node_modules/@types/node/child_process.d.ts +0 -1453
  39. package/client/node_modules/@types/node/cluster.d.ts +0 -578
  40. package/client/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
  41. package/client/node_modules/@types/node/compatibility/index.d.ts +0 -9
  42. package/client/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  43. package/client/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
  44. package/client/node_modules/@types/node/console.d.ts +0 -452
  45. package/client/node_modules/@types/node/constants.d.ts +0 -21
  46. package/client/node_modules/@types/node/crypto.d.ts +0 -4504
  47. package/client/node_modules/@types/node/dgram.d.ts +0 -596
  48. package/client/node_modules/@types/node/diagnostics_channel.d.ts +0 -551
  49. package/client/node_modules/@types/node/dns/promises.d.ts +0 -477
  50. package/client/node_modules/@types/node/dns.d.ts +0 -860
  51. package/client/node_modules/@types/node/domain.d.ts +0 -170
  52. package/client/node_modules/@types/node/events.d.ts +0 -863
  53. package/client/node_modules/@types/node/fs/promises.d.ts +0 -1208
  54. package/client/node_modules/@types/node/fs.d.ts +0 -4332
  55. package/client/node_modules/@types/node/globals.d.ts +0 -170
  56. package/client/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  57. package/client/node_modules/@types/node/http.d.ts +0 -1919
  58. package/client/node_modules/@types/node/http2.d.ts +0 -2580
  59. package/client/node_modules/@types/node/https.d.ts +0 -549
  60. package/client/node_modules/@types/node/index.d.ts +0 -92
  61. package/client/node_modules/@types/node/inspector.generated.d.ts +0 -2775
  62. package/client/node_modules/@types/node/module.d.ts +0 -503
  63. package/client/node_modules/@types/node/net.d.ts +0 -924
  64. package/client/node_modules/@types/node/os.d.ts +0 -480
  65. package/client/node_modules/@types/node/package.json +0 -145
  66. package/client/node_modules/@types/node/path.d.ts +0 -191
  67. package/client/node_modules/@types/node/perf_hooks.d.ts +0 -860
  68. package/client/node_modules/@types/node/process.d.ts +0 -1632
  69. package/client/node_modules/@types/node/punycode.d.ts +0 -117
  70. package/client/node_modules/@types/node/querystring.d.ts +0 -140
  71. package/client/node_modules/@types/node/readline/promises.d.ts +0 -154
  72. package/client/node_modules/@types/node/readline.d.ts +0 -715
  73. package/client/node_modules/@types/node/repl.d.ts +0 -430
  74. package/client/node_modules/@types/node/stream/consumers.d.ts +0 -38
  75. package/client/node_modules/@types/node/stream/promises.d.ts +0 -90
  76. package/client/node_modules/@types/node/stream/web.d.ts +0 -527
  77. package/client/node_modules/@types/node/stream.d.ts +0 -1680
  78. package/client/node_modules/@types/node/string_decoder.d.ts +0 -67
  79. package/client/node_modules/@types/node/test.d.ts +0 -1208
  80. package/client/node_modules/@types/node/timers/promises.d.ts +0 -108
  81. package/client/node_modules/@types/node/timers.d.ts +0 -286
  82. package/client/node_modules/@types/node/tls.d.ts +0 -1204
  83. package/client/node_modules/@types/node/trace_events.d.ts +0 -171
  84. package/client/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -455
  85. package/client/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  86. package/client/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  87. package/client/node_modules/@types/node/tty.d.ts +0 -206
  88. package/client/node_modules/@types/node/url.d.ts +0 -957
  89. package/client/node_modules/@types/node/util.d.ts +0 -2083
  90. package/client/node_modules/@types/node/v8.d.ts +0 -753
  91. package/client/node_modules/@types/node/vm.d.ts +0 -704
  92. package/client/node_modules/@types/node/wasi.d.ts +0 -160
  93. package/client/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  94. package/client/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  95. package/client/node_modules/@types/node/web-globals/events.d.ts +0 -81
  96. package/client/node_modules/@types/node/web-globals/fetch.d.ts +0 -38
  97. package/client/node_modules/@types/node/worker_threads.d.ts +0 -698
  98. package/client/node_modules/@types/node/zlib.d.ts +0 -517
  99. package/client/node_modules/@types/vscode/LICENSE +0 -21
  100. package/client/node_modules/@types/vscode/README.md +0 -15
  101. package/client/node_modules/@types/vscode/index.d.ts +0 -21145
  102. package/client/node_modules/@types/vscode/package.json +0 -26
  103. package/client/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  104. package/client/node_modules/balanced-match/LICENSE.md +0 -21
  105. package/client/node_modules/balanced-match/README.md +0 -97
  106. package/client/node_modules/balanced-match/index.js +0 -62
  107. package/client/node_modules/balanced-match/package.json +0 -48
  108. package/client/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
  109. package/client/node_modules/brace-expansion/LICENSE +0 -21
  110. package/client/node_modules/brace-expansion/README.md +0 -135
  111. package/client/node_modules/brace-expansion/index.js +0 -203
  112. package/client/node_modules/brace-expansion/package.json +0 -49
  113. package/client/node_modules/minimatch/LICENSE +0 -15
  114. package/client/node_modules/minimatch/README.md +0 -259
  115. package/client/node_modules/minimatch/lib/path.js +0 -4
  116. package/client/node_modules/minimatch/minimatch.js +0 -944
  117. package/client/node_modules/minimatch/package.json +0 -35
  118. package/client/node_modules/semver/LICENSE +0 -15
  119. package/client/node_modules/semver/README.md +0 -664
  120. package/client/node_modules/semver/bin/semver.js +0 -191
  121. package/client/node_modules/semver/classes/comparator.js +0 -143
  122. package/client/node_modules/semver/classes/index.js +0 -7
  123. package/client/node_modules/semver/classes/range.js +0 -557
  124. package/client/node_modules/semver/classes/semver.js +0 -333
  125. package/client/node_modules/semver/functions/clean.js +0 -8
  126. package/client/node_modules/semver/functions/cmp.js +0 -54
  127. package/client/node_modules/semver/functions/coerce.js +0 -62
  128. package/client/node_modules/semver/functions/compare-build.js +0 -9
  129. package/client/node_modules/semver/functions/compare-loose.js +0 -5
  130. package/client/node_modules/semver/functions/compare.js +0 -7
  131. package/client/node_modules/semver/functions/diff.js +0 -60
  132. package/client/node_modules/semver/functions/eq.js +0 -5
  133. package/client/node_modules/semver/functions/gt.js +0 -5
  134. package/client/node_modules/semver/functions/gte.js +0 -5
  135. package/client/node_modules/semver/functions/inc.js +0 -21
  136. package/client/node_modules/semver/functions/lt.js +0 -5
  137. package/client/node_modules/semver/functions/lte.js +0 -5
  138. package/client/node_modules/semver/functions/major.js +0 -5
  139. package/client/node_modules/semver/functions/minor.js +0 -5
  140. package/client/node_modules/semver/functions/neq.js +0 -5
  141. package/client/node_modules/semver/functions/parse.js +0 -18
  142. package/client/node_modules/semver/functions/patch.js +0 -5
  143. package/client/node_modules/semver/functions/prerelease.js +0 -8
  144. package/client/node_modules/semver/functions/rcompare.js +0 -5
  145. package/client/node_modules/semver/functions/rsort.js +0 -5
  146. package/client/node_modules/semver/functions/satisfies.js +0 -12
  147. package/client/node_modules/semver/functions/sort.js +0 -5
  148. package/client/node_modules/semver/functions/valid.js +0 -8
  149. package/client/node_modules/semver/index.js +0 -91
  150. package/client/node_modules/semver/internal/constants.js +0 -37
  151. package/client/node_modules/semver/internal/debug.js +0 -11
  152. package/client/node_modules/semver/internal/identifiers.js +0 -29
  153. package/client/node_modules/semver/internal/lrucache.js +0 -42
  154. package/client/node_modules/semver/internal/parse-options.js +0 -17
  155. package/client/node_modules/semver/internal/re.js +0 -223
  156. package/client/node_modules/semver/package.json +0 -78
  157. package/client/node_modules/semver/preload.js +0 -4
  158. package/client/node_modules/semver/range.bnf +0 -16
  159. package/client/node_modules/semver/ranges/gtr.js +0 -6
  160. package/client/node_modules/semver/ranges/intersects.js +0 -9
  161. package/client/node_modules/semver/ranges/ltr.js +0 -6
  162. package/client/node_modules/semver/ranges/max-satisfying.js +0 -27
  163. package/client/node_modules/semver/ranges/min-satisfying.js +0 -26
  164. package/client/node_modules/semver/ranges/min-version.js +0 -63
  165. package/client/node_modules/semver/ranges/outside.js +0 -82
  166. package/client/node_modules/semver/ranges/simplify.js +0 -49
  167. package/client/node_modules/semver/ranges/subset.js +0 -249
  168. package/client/node_modules/semver/ranges/to-comparators.js +0 -10
  169. package/client/node_modules/semver/ranges/valid.js +0 -13
  170. package/client/node_modules/undici-types/README.md +0 -6
  171. package/client/node_modules/undici-types/agent.d.ts +0 -31
  172. package/client/node_modules/undici-types/api.d.ts +0 -43
  173. package/client/node_modules/undici-types/balanced-pool.d.ts +0 -18
  174. package/client/node_modules/undici-types/cache.d.ts +0 -36
  175. package/client/node_modules/undici-types/client.d.ts +0 -97
  176. package/client/node_modules/undici-types/connector.d.ts +0 -34
  177. package/client/node_modules/undici-types/content-type.d.ts +0 -21
  178. package/client/node_modules/undici-types/cookies.d.ts +0 -28
  179. package/client/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  180. package/client/node_modules/undici-types/dispatcher.d.ts +0 -241
  181. package/client/node_modules/undici-types/errors.d.ts +0 -128
  182. package/client/node_modules/undici-types/fetch.d.ts +0 -209
  183. package/client/node_modules/undici-types/file.d.ts +0 -39
  184. package/client/node_modules/undici-types/filereader.d.ts +0 -54
  185. package/client/node_modules/undici-types/formdata.d.ts +0 -108
  186. package/client/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  187. package/client/node_modules/undici-types/global-origin.d.ts +0 -7
  188. package/client/node_modules/undici-types/handlers.d.ts +0 -9
  189. package/client/node_modules/undici-types/header.d.ts +0 -4
  190. package/client/node_modules/undici-types/index.d.ts +0 -63
  191. package/client/node_modules/undici-types/interceptors.d.ts +0 -5
  192. package/client/node_modules/undici-types/mock-agent.d.ts +0 -50
  193. package/client/node_modules/undici-types/mock-client.d.ts +0 -25
  194. package/client/node_modules/undici-types/mock-errors.d.ts +0 -12
  195. package/client/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  196. package/client/node_modules/undici-types/mock-pool.d.ts +0 -25
  197. package/client/node_modules/undici-types/package.json +0 -55
  198. package/client/node_modules/undici-types/patch.d.ts +0 -71
  199. package/client/node_modules/undici-types/pool-stats.d.ts +0 -19
  200. package/client/node_modules/undici-types/pool.d.ts +0 -28
  201. package/client/node_modules/undici-types/proxy-agent.d.ts +0 -30
  202. package/client/node_modules/undici-types/readable.d.ts +0 -61
  203. package/client/node_modules/undici-types/webidl.d.ts +0 -220
  204. package/client/node_modules/undici-types/websocket.d.ts +0 -131
  205. package/client/node_modules/vscode-jsonrpc/License.txt +0 -11
  206. package/client/node_modules/vscode-jsonrpc/README.md +0 -69
  207. package/client/node_modules/vscode-jsonrpc/browser.d.ts +0 -6
  208. package/client/node_modules/vscode-jsonrpc/browser.js +0 -7
  209. package/client/node_modules/vscode-jsonrpc/lib/browser/main.d.ts +0 -17
  210. package/client/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -76
  211. package/client/node_modules/vscode-jsonrpc/lib/browser/ril.d.ts +0 -12
  212. package/client/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -156
  213. package/client/node_modules/vscode-jsonrpc/lib/common/api.d.ts +0 -14
  214. package/client/node_modules/vscode-jsonrpc/lib/common/api.js +0 -81
  215. package/client/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts +0 -32
  216. package/client/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -96
  217. package/client/node_modules/vscode-jsonrpc/lib/common/connection.d.ts +0 -358
  218. package/client/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -1212
  219. package/client/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts +0 -9
  220. package/client/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -16
  221. package/client/node_modules/vscode-jsonrpc/lib/common/encoding.d.ts +0 -52
  222. package/client/node_modules/vscode-jsonrpc/lib/common/encoding.js +0 -70
  223. package/client/node_modules/vscode-jsonrpc/lib/common/events.d.ts +0 -39
  224. package/client/node_modules/vscode-jsonrpc/lib/common/events.js +0 -128
  225. package/client/node_modules/vscode-jsonrpc/lib/common/is.d.ts +0 -7
  226. package/client/node_modules/vscode-jsonrpc/lib/common/is.js +0 -35
  227. package/client/node_modules/vscode-jsonrpc/lib/common/linkedMap.d.ts +0 -53
  228. package/client/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -398
  229. package/client/node_modules/vscode-jsonrpc/lib/common/messageBuffer.d.ts +0 -18
  230. package/client/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -152
  231. package/client/node_modules/vscode-jsonrpc/lib/common/messageReader.d.ts +0 -77
  232. package/client/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -197
  233. package/client/node_modules/vscode-jsonrpc/lib/common/messageWriter.d.ts +0 -60
  234. package/client/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -115
  235. package/client/node_modules/vscode-jsonrpc/lib/common/messages.d.ts +0 -369
  236. package/client/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -306
  237. package/client/node_modules/vscode-jsonrpc/lib/common/ral.d.ts +0 -74
  238. package/client/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -23
  239. package/client/node_modules/vscode-jsonrpc/lib/common/semaphore.d.ts +0 -10
  240. package/client/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -68
  241. package/client/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +0 -15
  242. package/client/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -76
  243. package/client/node_modules/vscode-jsonrpc/lib/node/main.d.ts +0 -63
  244. package/client/node_modules/vscode-jsonrpc/lib/node/main.js +0 -257
  245. package/client/node_modules/vscode-jsonrpc/lib/node/ril.d.ts +0 -13
  246. package/client/node_modules/vscode-jsonrpc/lib/node/ril.js +0 -161
  247. package/client/node_modules/vscode-jsonrpc/node.cmd +0 -5
  248. package/client/node_modules/vscode-jsonrpc/node.d.ts +0 -6
  249. package/client/node_modules/vscode-jsonrpc/node.js +0 -7
  250. package/client/node_modules/vscode-jsonrpc/package.json +0 -45
  251. package/client/node_modules/vscode-jsonrpc/thirdpartynotices.txt +0 -16
  252. package/client/node_modules/vscode-jsonrpc/typings/thenable.d.ts +0 -5
  253. package/client/node_modules/vscode-languageclient/License.txt +0 -11
  254. package/client/node_modules/vscode-languageclient/README.md +0 -17
  255. package/client/node_modules/vscode-languageclient/browser.d.ts +0 -6
  256. package/client/node_modules/vscode-languageclient/browser.js +0 -7
  257. package/client/node_modules/vscode-languageclient/lib/browser/main.d.ts +0 -8
  258. package/client/node_modules/vscode-languageclient/lib/browser/main.js +0 -37
  259. package/client/node_modules/vscode-languageclient/lib/common/api.d.ts +0 -36
  260. package/client/node_modules/vscode-languageclient/lib/common/api.js +0 -27
  261. package/client/node_modules/vscode-languageclient/lib/common/callHierarchy.d.ts +0 -37
  262. package/client/node_modules/vscode-languageclient/lib/common/callHierarchy.js +0 -97
  263. package/client/node_modules/vscode-languageclient/lib/common/client.d.ts +0 -476
  264. package/client/node_modules/vscode-languageclient/lib/common/client.js +0 -1600
  265. package/client/node_modules/vscode-languageclient/lib/common/codeAction.d.ts +0 -19
  266. package/client/node_modules/vscode-languageclient/lib/common/codeAction.js +0 -99
  267. package/client/node_modules/vscode-languageclient/lib/common/codeConverter.d.ts +0 -78
  268. package/client/node_modules/vscode-languageclient/lib/common/codeConverter.js +0 -876
  269. package/client/node_modules/vscode-languageclient/lib/common/codeLens.d.ts +0 -23
  270. package/client/node_modules/vscode-languageclient/lib/common/codeLens.js +0 -78
  271. package/client/node_modules/vscode-languageclient/lib/common/colorProvider.d.ts +0 -25
  272. package/client/node_modules/vscode-languageclient/lib/common/colorProvider.js +0 -74
  273. package/client/node_modules/vscode-languageclient/lib/common/completion.d.ts +0 -20
  274. package/client/node_modules/vscode-languageclient/lib/common/completion.js +0 -126
  275. package/client/node_modules/vscode-languageclient/lib/common/configuration.d.ts +0 -69
  276. package/client/node_modules/vscode-languageclient/lib/common/configuration.js +0 -209
  277. package/client/node_modules/vscode-languageclient/lib/common/declaration.d.ts +0 -16
  278. package/client/node_modules/vscode-languageclient/lib/common/declaration.js +0 -54
  279. package/client/node_modules/vscode-languageclient/lib/common/definition.d.ts +0 -16
  280. package/client/node_modules/vscode-languageclient/lib/common/definition.js +0 -55
  281. package/client/node_modules/vscode-languageclient/lib/common/diagnostic.d.ts +0 -122
  282. package/client/node_modules/vscode-languageclient/lib/common/diagnostic.js +0 -814
  283. package/client/node_modules/vscode-languageclient/lib/common/documentHighlight.d.ts +0 -15
  284. package/client/node_modules/vscode-languageclient/lib/common/documentHighlight.js +0 -50
  285. package/client/node_modules/vscode-languageclient/lib/common/documentLink.d.ts +0 -19
  286. package/client/node_modules/vscode-languageclient/lib/common/documentLink.js +0 -71
  287. package/client/node_modules/vscode-languageclient/lib/common/documentSymbol.d.ts +0 -17
  288. package/client/node_modules/vscode-languageclient/lib/common/documentSymbol.js +0 -104
  289. package/client/node_modules/vscode-languageclient/lib/common/executeCommand.d.ts +0 -21
  290. package/client/node_modules/vscode-languageclient/lib/common/executeCommand.js +0 -72
  291. package/client/node_modules/vscode-languageclient/lib/common/features.d.ts +0 -418
  292. package/client/node_modules/vscode-languageclient/lib/common/features.js +0 -291
  293. package/client/node_modules/vscode-languageclient/lib/common/fileOperations.d.ts +0 -116
  294. package/client/node_modules/vscode-languageclient/lib/common/fileOperations.js +0 -333
  295. package/client/node_modules/vscode-languageclient/lib/common/fileSystemWatcher.d.ts +0 -18
  296. package/client/node_modules/vscode-languageclient/lib/common/fileSystemWatcher.js +0 -95
  297. package/client/node_modules/vscode-languageclient/lib/common/foldingRange.d.ts +0 -19
  298. package/client/node_modules/vscode-languageclient/lib/common/foldingRange.js +0 -65
  299. package/client/node_modules/vscode-languageclient/lib/common/formatting.d.ts +0 -39
  300. package/client/node_modules/vscode-languageclient/lib/common/formatting.js +0 -182
  301. package/client/node_modules/vscode-languageclient/lib/common/hover.d.ts +0 -16
  302. package/client/node_modules/vscode-languageclient/lib/common/hover.js +0 -58
  303. package/client/node_modules/vscode-languageclient/lib/common/implementation.d.ts +0 -16
  304. package/client/node_modules/vscode-languageclient/lib/common/implementation.js +0 -54
  305. package/client/node_modules/vscode-languageclient/lib/common/inlayHint.d.ts +0 -20
  306. package/client/node_modules/vscode-languageclient/lib/common/inlayHint.js +0 -92
  307. package/client/node_modules/vscode-languageclient/lib/common/inlineCompletion.d.ts +0 -18
  308. package/client/node_modules/vscode-languageclient/lib/common/inlineCompletion.js +0 -54
  309. package/client/node_modules/vscode-languageclient/lib/common/inlineValue.d.ts +0 -18
  310. package/client/node_modules/vscode-languageclient/lib/common/inlineValue.js +0 -65
  311. package/client/node_modules/vscode-languageclient/lib/common/linkedEditingRange.d.ts +0 -21
  312. package/client/node_modules/vscode-languageclient/lib/common/linkedEditingRange.js +0 -53
  313. package/client/node_modules/vscode-languageclient/lib/common/notebook.d.ts +0 -96
  314. package/client/node_modules/vscode-languageclient/lib/common/notebook.js +0 -851
  315. package/client/node_modules/vscode-languageclient/lib/common/progress.d.ts +0 -11
  316. package/client/node_modules/vscode-languageclient/lib/common/progress.js +0 -44
  317. package/client/node_modules/vscode-languageclient/lib/common/progressPart.d.ts +0 -24
  318. package/client/node_modules/vscode-languageclient/lib/common/progressPart.js +0 -96
  319. package/client/node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.d.ts +0 -6
  320. package/client/node_modules/vscode-languageclient/lib/common/protocolCallHierarchyItem.js +0 -16
  321. package/client/node_modules/vscode-languageclient/lib/common/protocolCodeAction.d.ts +0 -6
  322. package/client/node_modules/vscode-languageclient/lib/common/protocolCodeAction.js +0 -14
  323. package/client/node_modules/vscode-languageclient/lib/common/protocolCodeLens.d.ts +0 -5
  324. package/client/node_modules/vscode-languageclient/lib/common/protocolCodeLens.js +0 -13
  325. package/client/node_modules/vscode-languageclient/lib/common/protocolCompletionItem.d.ts +0 -11
  326. package/client/node_modules/vscode-languageclient/lib/common/protocolCompletionItem.js +0 -13
  327. package/client/node_modules/vscode-languageclient/lib/common/protocolConverter.d.ts +0 -167
  328. package/client/node_modules/vscode-languageclient/lib/common/protocolConverter.js +0 -1134
  329. package/client/node_modules/vscode-languageclient/lib/common/protocolDiagnostic.d.ts +0 -18
  330. package/client/node_modules/vscode-languageclient/lib/common/protocolDiagnostic.js +0 -25
  331. package/client/node_modules/vscode-languageclient/lib/common/protocolDocumentLink.d.ts +0 -5
  332. package/client/node_modules/vscode-languageclient/lib/common/protocolDocumentLink.js +0 -13
  333. package/client/node_modules/vscode-languageclient/lib/common/protocolInlayHint.d.ts +0 -5
  334. package/client/node_modules/vscode-languageclient/lib/common/protocolInlayHint.js +0 -13
  335. package/client/node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.d.ts +0 -6
  336. package/client/node_modules/vscode-languageclient/lib/common/protocolTypeHierarchyItem.js +0 -16
  337. package/client/node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.d.ts +0 -7
  338. package/client/node_modules/vscode-languageclient/lib/common/protocolWorkspaceSymbol.js +0 -18
  339. package/client/node_modules/vscode-languageclient/lib/common/reference.d.ts +0 -20
  340. package/client/node_modules/vscode-languageclient/lib/common/reference.js +0 -53
  341. package/client/node_modules/vscode-languageclient/lib/common/rename.d.ts +0 -27
  342. package/client/node_modules/vscode-languageclient/lib/common/rename.js +0 -113
  343. package/client/node_modules/vscode-languageclient/lib/common/selectionRange.d.ts +0 -16
  344. package/client/node_modules/vscode-languageclient/lib/common/selectionRange.js +0 -57
  345. package/client/node_modules/vscode-languageclient/lib/common/semanticTokens.d.ts +0 -33
  346. package/client/node_modules/vscode-languageclient/lib/common/semanticTokens.js +0 -179
  347. package/client/node_modules/vscode-languageclient/lib/common/signatureHelp.d.ts +0 -16
  348. package/client/node_modules/vscode-languageclient/lib/common/signatureHelp.js +0 -71
  349. package/client/node_modules/vscode-languageclient/lib/common/textSynchronization.d.ts +0 -101
  350. package/client/node_modules/vscode-languageclient/lib/common/textSynchronization.js +0 -402
  351. package/client/node_modules/vscode-languageclient/lib/common/typeDefinition.d.ts +0 -16
  352. package/client/node_modules/vscode-languageclient/lib/common/typeDefinition.js +0 -55
  353. package/client/node_modules/vscode-languageclient/lib/common/typeHierarchy.d.ts +0 -31
  354. package/client/node_modules/vscode-languageclient/lib/common/typeHierarchy.js +0 -96
  355. package/client/node_modules/vscode-languageclient/lib/common/utils/async.d.ts +0 -41
  356. package/client/node_modules/vscode-languageclient/lib/common/utils/async.js +0 -276
  357. package/client/node_modules/vscode-languageclient/lib/common/utils/is.d.ts +0 -12
  358. package/client/node_modules/vscode-languageclient/lib/common/utils/is.js +0 -57
  359. package/client/node_modules/vscode-languageclient/lib/common/utils/uuid.d.ts +0 -22
  360. package/client/node_modules/vscode-languageclient/lib/common/utils/uuid.js +0 -97
  361. package/client/node_modules/vscode-languageclient/lib/common/workspaceFolder.d.ts +0 -30
  362. package/client/node_modules/vscode-languageclient/lib/common/workspaceFolder.js +0 -148
  363. package/client/node_modules/vscode-languageclient/lib/common/workspaceSymbol.d.ts +0 -19
  364. package/client/node_modules/vscode-languageclient/lib/common/workspaceSymbol.js +0 -79
  365. package/client/node_modules/vscode-languageclient/lib/node/main.d.ts +0 -100
  366. package/client/node_modules/vscode-languageclient/lib/node/main.js +0 -570
  367. package/client/node_modules/vscode-languageclient/lib/node/processes.d.ts +0 -6
  368. package/client/node_modules/vscode-languageclient/lib/node/processes.js +0 -47
  369. package/client/node_modules/vscode-languageclient/lib/node/terminateProcess.sh +0 -16
  370. package/client/node_modules/vscode-languageclient/node.cmd +0 -5
  371. package/client/node_modules/vscode-languageclient/node.d.ts +0 -6
  372. package/client/node_modules/vscode-languageclient/node.js +0 -7
  373. package/client/node_modules/vscode-languageclient/package.json +0 -50
  374. package/client/node_modules/vscode-languageserver-protocol/License.txt +0 -11
  375. package/client/node_modules/vscode-languageserver-protocol/README.md +0 -16
  376. package/client/node_modules/vscode-languageserver-protocol/browser.d.ts +0 -6
  377. package/client/node_modules/vscode-languageserver-protocol/browser.js +0 -7
  378. package/client/node_modules/vscode-languageserver-protocol/lib/browser/main.d.ts +0 -4
  379. package/client/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -28
  380. package/client/node_modules/vscode-languageserver-protocol/lib/common/api.d.ts +0 -58
  381. package/client/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -77
  382. package/client/node_modules/vscode-languageserver-protocol/lib/common/connection.d.ts +0 -187
  383. package/client/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -15
  384. package/client/node_modules/vscode-languageserver-protocol/lib/common/messages.d.ts +0 -51
  385. package/client/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -44
  386. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.d.ts +0 -1
  387. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.$.js +0 -43
  388. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.d.ts +0 -86
  389. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -42
  390. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.d.ts +0 -66
  391. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -32
  392. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.d.ts +0 -35
  393. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -24
  394. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.d.ts +0 -3252
  395. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.d.ts +0 -37
  396. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -22
  397. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.d.ts +0 -341
  398. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -74
  399. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.d.ts +0 -306
  400. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -101
  401. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.d.ts +0 -109
  402. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -30
  403. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.d.ts +0 -38
  404. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -21
  405. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.d.ts +0 -110
  406. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -43
  407. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.d.ts +0 -57
  408. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -22
  409. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.d.ts +0 -86
  410. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -30
  411. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -943
  412. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.d.ts +0 -52
  413. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -19
  414. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.d.ts +0 -106
  415. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -68
  416. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.d.ts +0 -400
  417. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -214
  418. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.d.ts +0 -107
  419. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -37
  420. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.d.ts +0 -41
  421. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -20
  422. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.d.ts +0 -223
  423. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -57
  424. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.d.ts +0 -72
  425. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -22
  426. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.d.ts +0 -38
  427. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -21
  428. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.d.ts +0 -83
  429. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -42
  430. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.d.ts +0 -74
  431. package/client/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -27
  432. package/client/node_modules/vscode-languageserver-protocol/lib/common/utils/is.d.ts +0 -9
  433. package/client/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -46
  434. package/client/node_modules/vscode-languageserver-protocol/lib/node/main.d.ts +0 -6
  435. package/client/node_modules/vscode-languageserver-protocol/lib/node/main.js +0 -28
  436. package/client/node_modules/vscode-languageserver-protocol/metaModel.schema.json +0 -783
  437. package/client/node_modules/vscode-languageserver-protocol/node.cmd +0 -5
  438. package/client/node_modules/vscode-languageserver-protocol/node.d.ts +0 -6
  439. package/client/node_modules/vscode-languageserver-protocol/node.js +0 -7
  440. package/client/node_modules/vscode-languageserver-protocol/package.json +0 -45
  441. package/client/node_modules/vscode-languageserver-protocol/thirdpartynotices.txt +0 -31
  442. package/client/node_modules/vscode-languageserver-types/License.txt +0 -11
  443. package/client/node_modules/vscode-languageserver-types/README.md +0 -17
  444. package/client/node_modules/vscode-languageserver-types/lib/esm/main.d.ts +0 -3139
  445. package/client/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -2222
  446. package/client/node_modules/vscode-languageserver-types/lib/esm/package.json +0 -3
  447. package/client/node_modules/vscode-languageserver-types/lib/umd/main.d.ts +0 -3139
  448. package/client/node_modules/vscode-languageserver-types/lib/umd/main.js +0 -2272
  449. package/client/node_modules/vscode-languageserver-types/package.json +0 -38
  450. package/client/node_modules/vscode-languageserver-types/thirdpartynotices.txt +0 -16
  451. package/client/package-lock.json +0 -125
  452. package/client/package.json +0 -42
  453. package/client/src/extension.ts +0 -56
  454. package/client/tsconfig.json +0 -12
@@ -1,586 +0,0 @@
1
- /**
2
- * The `async_hooks` module provides an API to track asynchronous resources. It
3
- * can be accessed using:
4
- *
5
- * ```js
6
- * import async_hooks from 'async_hooks';
7
- * ```
8
- * @experimental
9
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
10
- */
11
- declare module "async_hooks" {
12
- /**
13
- * ```js
14
- * import { executionAsyncId } from 'async_hooks';
15
- *
16
- * console.log(executionAsyncId()); // 1 - bootstrap
17
- * fs.open(path, 'r', (err, fd) => {
18
- * console.log(executionAsyncId()); // 6 - open()
19
- * });
20
- * ```
21
- *
22
- * The ID returned from `executionAsyncId()` is related to execution timing, not
23
- * causality (which is covered by `triggerAsyncId()`):
24
- *
25
- * ```js
26
- * const server = net.createServer((conn) => {
27
- * // Returns the ID of the server, not of the new connection, because the
28
- * // callback runs in the execution scope of the server's MakeCallback().
29
- * async_hooks.executionAsyncId();
30
- *
31
- * }).listen(port, () => {
32
- * // Returns the ID of a TickObject (process.nextTick()) because all
33
- * // callbacks passed to .listen() are wrapped in a nextTick().
34
- * async_hooks.executionAsyncId();
35
- * });
36
- * ```
37
- *
38
- * Promise contexts may not get precise `executionAsyncIds` by default.
39
- * See the section on `promise execution tracking`.
40
- * @since v8.1.0
41
- * @return The `asyncId` of the current execution context. Useful to track when something calls.
42
- */
43
- function executionAsyncId(): number;
44
- /**
45
- * Resource objects returned by `executionAsyncResource()` are most often internal
46
- * Node.js handle objects with undocumented APIs. Using any functions or properties
47
- * on the object is likely to crash your application and should be avoided.
48
- *
49
- * Using `executionAsyncResource()` in the top-level execution context will
50
- * return an empty object as there is no handle or request object to use,
51
- * but having an object representing the top-level can be helpful.
52
- *
53
- * ```js
54
- * import { open } from 'fs';
55
- * import { executionAsyncId, executionAsyncResource } from 'async_hooks';
56
- *
57
- * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}
58
- * open(new URL(import.meta.url), 'r', (err, fd) => {
59
- * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap
60
- * });
61
- * ```
62
- *
63
- * This can be used to implement continuation local storage without the
64
- * use of a tracking `Map` to store the metadata:
65
- *
66
- * ```js
67
- * import { createServer } from 'http';
68
- * import {
69
- * executionAsyncId,
70
- * executionAsyncResource,
71
- * createHook
72
- * } from 'async_hooks';
73
- * const sym = Symbol('state'); // Private symbol to avoid pollution
74
- *
75
- * createHook({
76
- * init(asyncId, type, triggerAsyncId, resource) {
77
- * const cr = executionAsyncResource();
78
- * if (cr) {
79
- * resource[sym] = cr[sym];
80
- * }
81
- * }
82
- * }).enable();
83
- *
84
- * const server = createServer((req, res) => {
85
- * executionAsyncResource()[sym] = { state: req.url };
86
- * setTimeout(function() {
87
- * res.end(JSON.stringify(executionAsyncResource()[sym]));
88
- * }, 100);
89
- * }).listen(3000);
90
- * ```
91
- * @since v13.9.0, v12.17.0
92
- * @return The resource representing the current execution. Useful to store data within the resource.
93
- */
94
- function executionAsyncResource(): object;
95
- /**
96
- * ```js
97
- * const server = net.createServer((conn) => {
98
- * // The resource that caused (or triggered) this callback to be called
99
- * // was that of the new connection. Thus the return value of triggerAsyncId()
100
- * // is the asyncId of "conn".
101
- * async_hooks.triggerAsyncId();
102
- *
103
- * }).listen(port, () => {
104
- * // Even though all callbacks passed to .listen() are wrapped in a nextTick()
105
- * // the callback itself exists because the call to the server's .listen()
106
- * // was made. So the return value would be the ID of the server.
107
- * async_hooks.triggerAsyncId();
108
- * });
109
- * ```
110
- *
111
- * Promise contexts may not get valid `triggerAsyncId`s by default. See
112
- * the section on `promise execution tracking`.
113
- * @return The ID of the resource responsible for calling the callback that is currently being executed.
114
- */
115
- function triggerAsyncId(): number;
116
- interface HookCallbacks {
117
- /**
118
- * Called when a class is constructed that has the possibility to emit an asynchronous event.
119
- * @param asyncId a unique ID for the async resource
120
- * @param type the type of the async resource
121
- * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
122
- * @param resource reference to the resource representing the async operation, needs to be released during destroy
123
- */
124
- init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
125
- /**
126
- * When an asynchronous operation is initiated or completes a callback is called to notify the user.
127
- * The before callback is called just before said callback is executed.
128
- * @param asyncId the unique identifier assigned to the resource about to execute the callback.
129
- */
130
- before?(asyncId: number): void;
131
- /**
132
- * Called immediately after the callback specified in before is completed.
133
- * @param asyncId the unique identifier assigned to the resource which has executed the callback.
134
- */
135
- after?(asyncId: number): void;
136
- /**
137
- * Called when a promise has resolve() called. This may not be in the same execution id
138
- * as the promise itself.
139
- * @param asyncId the unique id for the promise that was resolve()d.
140
- */
141
- promiseResolve?(asyncId: number): void;
142
- /**
143
- * Called after the resource corresponding to asyncId is destroyed
144
- * @param asyncId a unique ID for the async resource
145
- */
146
- destroy?(asyncId: number): void;
147
- }
148
- interface AsyncHook {
149
- /**
150
- * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
151
- */
152
- enable(): this;
153
- /**
154
- * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
155
- */
156
- disable(): this;
157
- }
158
- /**
159
- * Registers functions to be called for different lifetime events of each async
160
- * operation.
161
- *
162
- * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
163
- * respective asynchronous event during a resource's lifetime.
164
- *
165
- * All callbacks are optional. For example, if only resource cleanup needs to
166
- * be tracked, then only the `destroy` callback needs to be passed. The
167
- * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section.
168
- *
169
- * ```js
170
- * import { createHook } from 'async_hooks';
171
- *
172
- * const asyncHook = createHook({
173
- * init(asyncId, type, triggerAsyncId, resource) { },
174
- * destroy(asyncId) { }
175
- * });
176
- * ```
177
- *
178
- * The callbacks will be inherited via the prototype chain:
179
- *
180
- * ```js
181
- * class MyAsyncCallbacks {
182
- * init(asyncId, type, triggerAsyncId, resource) { }
183
- * destroy(asyncId) {}
184
- * }
185
- *
186
- * class MyAddedCallbacks extends MyAsyncCallbacks {
187
- * before(asyncId) { }
188
- * after(asyncId) { }
189
- * }
190
- *
191
- * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
192
- * ```
193
- *
194
- * Because promises are asynchronous resources whose lifecycle is tracked
195
- * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises.
196
- * @since v8.1.0
197
- * @param callbacks The `Hook Callbacks` to register
198
- * @return Instance used for disabling and enabling hooks
199
- */
200
- function createHook(callbacks: HookCallbacks): AsyncHook;
201
- interface AsyncResourceOptions {
202
- /**
203
- * The ID of the execution context that created this async event.
204
- * @default executionAsyncId()
205
- */
206
- triggerAsyncId?: number | undefined;
207
- /**
208
- * Disables automatic `emitDestroy` when the object is garbage collected.
209
- * This usually does not need to be set (even if `emitDestroy` is called
210
- * manually), unless the resource's `asyncId` is retrieved and the
211
- * sensitive API's `emitDestroy` is called with it.
212
- * @default false
213
- */
214
- requireManualDestroy?: boolean | undefined;
215
- }
216
- /**
217
- * The class `AsyncResource` is designed to be extended by the embedder's async
218
- * resources. Using this, users can easily trigger the lifetime events of their
219
- * own resources.
220
- *
221
- * The `init` hook will trigger when an `AsyncResource` is instantiated.
222
- *
223
- * The following is an overview of the `AsyncResource` API.
224
- *
225
- * ```js
226
- * import { AsyncResource, executionAsyncId } from 'async_hooks';
227
- *
228
- * // AsyncResource() is meant to be extended. Instantiating a
229
- * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
230
- * // async_hook.executionAsyncId() is used.
231
- * const asyncResource = new AsyncResource(
232
- * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
233
- * );
234
- *
235
- * // Run a function in the execution context of the resource. This will
236
- * // * establish the context of the resource
237
- * // * trigger the AsyncHooks before callbacks
238
- * // * call the provided function `fn` with the supplied arguments
239
- * // * trigger the AsyncHooks after callbacks
240
- * // * restore the original execution context
241
- * asyncResource.runInAsyncScope(fn, thisArg, ...args);
242
- *
243
- * // Call AsyncHooks destroy callbacks.
244
- * asyncResource.emitDestroy();
245
- *
246
- * // Return the unique ID assigned to the AsyncResource instance.
247
- * asyncResource.asyncId();
248
- *
249
- * // Return the trigger ID for the AsyncResource instance.
250
- * asyncResource.triggerAsyncId();
251
- * ```
252
- */
253
- class AsyncResource {
254
- /**
255
- * AsyncResource() is meant to be extended. Instantiating a
256
- * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
257
- * async_hook.executionAsyncId() is used.
258
- * @param type The type of async event.
259
- * @param triggerAsyncId The ID of the execution context that created
260
- * this async event (default: `executionAsyncId()`), or an
261
- * AsyncResourceOptions object (since v9.3.0)
262
- */
263
- constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
264
- /**
265
- * Binds the given function to the current execution context.
266
- *
267
- * The returned function will have an `asyncResource` property referencing
268
- * the `AsyncResource` to which the function is bound.
269
- * @since v14.8.0, v12.19.0
270
- * @param fn The function to bind to the current execution context.
271
- * @param type An optional name to associate with the underlying `AsyncResource`.
272
- */
273
- static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
274
- fn: Func,
275
- type?: string,
276
- thisArg?: ThisArg,
277
- ): Func & {
278
- asyncResource: AsyncResource;
279
- };
280
- /**
281
- * Binds the given function to execute to this `AsyncResource`'s scope.
282
- *
283
- * The returned function will have an `asyncResource` property referencing
284
- * the `AsyncResource` to which the function is bound.
285
- * @since v14.8.0, v12.19.0
286
- * @param fn The function to bind to the current `AsyncResource`.
287
- */
288
- bind<Func extends (...args: any[]) => any>(
289
- fn: Func,
290
- ): Func & {
291
- asyncResource: AsyncResource;
292
- };
293
- /**
294
- * Call the provided function with the provided arguments in the execution context
295
- * of the async resource. This will establish the context, trigger the AsyncHooks
296
- * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
297
- * then restore the original execution context.
298
- * @since v9.6.0
299
- * @param fn The function to call in the execution context of this async resource.
300
- * @param thisArg The receiver to be used for the function call.
301
- * @param args Optional arguments to pass to the function.
302
- */
303
- runInAsyncScope<This, Result>(
304
- fn: (this: This, ...args: any[]) => Result,
305
- thisArg?: This,
306
- ...args: any[]
307
- ): Result;
308
- /**
309
- * Call all `destroy` hooks. This should only ever be called once. An error will
310
- * be thrown if it is called more than once. This **must** be manually called. If
311
- * the resource is left to be collected by the GC then the `destroy` hooks will
312
- * never be called.
313
- * @return A reference to `asyncResource`.
314
- */
315
- emitDestroy(): this;
316
- /**
317
- * @return The unique `asyncId` assigned to the resource.
318
- */
319
- asyncId(): number;
320
- /**
321
- * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
322
- */
323
- triggerAsyncId(): number;
324
- }
325
- /**
326
- * This class creates stores that stay coherent through asynchronous operations.
327
- *
328
- * While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
329
- * implementation that involves significant optimizations that are non-obvious to
330
- * implement.
331
- *
332
- * The following example uses `AsyncLocalStorage` to build a simple logger
333
- * that assigns IDs to incoming HTTP requests and includes them in messages
334
- * logged within each request.
335
- *
336
- * ```js
337
- * import http from 'http';
338
- * import { AsyncLocalStorage } from 'async_hooks';
339
- *
340
- * const asyncLocalStorage = new AsyncLocalStorage();
341
- *
342
- * function logWithId(msg) {
343
- * const id = asyncLocalStorage.getStore();
344
- * console.log(`${id !== undefined ? id : '-'}:`, msg);
345
- * }
346
- *
347
- * let idSeq = 0;
348
- * http.createServer((req, res) => {
349
- * asyncLocalStorage.run(idSeq++, () => {
350
- * logWithId('start');
351
- * // Imagine any chain of async operations here
352
- * setImmediate(() => {
353
- * logWithId('finish');
354
- * res.end();
355
- * });
356
- * });
357
- * }).listen(8080);
358
- *
359
- * http.get('http://localhost:8080');
360
- * http.get('http://localhost:8080');
361
- * // Prints:
362
- * // 0: start
363
- * // 1: start
364
- * // 0: finish
365
- * // 1: finish
366
- * ```
367
- *
368
- * Each instance of `AsyncLocalStorage` maintains an independent storage context.
369
- * Multiple instances can safely exist simultaneously without risk of interfering
370
- * with each other's data.
371
- * @since v13.10.0, v12.17.0
372
- */
373
- class AsyncLocalStorage<T> {
374
- /**
375
- * Binds the given function to the current execution context.
376
- * @since v18.16.0
377
- * @param fn The function to bind to the current execution context.
378
- * @returns A new function that calls `fn` within the captured execution context.
379
- */
380
- static bind<Func extends (...args: any[]) => any>(fn: Func): Func & {
381
- asyncResource: AsyncResource;
382
- };
383
- /**
384
- * Captures the current execution context and returns a function that accepts a function as an argument.
385
- * Whenever the returned function is called, it calls the function passed to it within the captured context.
386
- * @since v18.16.0
387
- */
388
- static snapshot(): (<R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R) & {
389
- asyncResource: AsyncResource;
390
- };
391
- /**
392
- * Disables the instance of `AsyncLocalStorage`. All subsequent calls
393
- * to `asyncLocalStorage.getStore()` will return `undefined` until`asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
394
- *
395
- * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
396
- * instance will be exited.
397
- *
398
- * Calling `asyncLocalStorage.disable()` is required before the`asyncLocalStorage` can be garbage collected. This does not apply to stores
399
- * provided by the `asyncLocalStorage`, as those objects are garbage collected
400
- * along with the corresponding async resources.
401
- *
402
- * Use this method when the `asyncLocalStorage` is not in use anymore
403
- * in the current process.
404
- * @since v13.10.0, v12.17.0
405
- * @experimental
406
- */
407
- disable(): void;
408
- /**
409
- * Returns the current store.
410
- * If called outside of an asynchronous context initialized by
411
- * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
412
- * returns `undefined`.
413
- * @since v13.10.0, v12.17.0
414
- */
415
- getStore(): T | undefined;
416
- /**
417
- * Runs a function synchronously within a context and returns its
418
- * return value. The store is not accessible outside of the callback function.
419
- * The store is accessible to any asynchronous operations created within the
420
- * callback.
421
- *
422
- * The optional `args` are passed to the callback function.
423
- *
424
- * If the callback function throws an error, the error is thrown by `run()` too.
425
- * The stacktrace is not impacted by this call and the context is exited.
426
- *
427
- * Example:
428
- *
429
- * ```js
430
- * const store = { id: 2 };
431
- * try {
432
- * asyncLocalStorage.run(store, () => {
433
- * asyncLocalStorage.getStore(); // Returns the store object
434
- * setTimeout(() => {
435
- * asyncLocalStorage.getStore(); // Returns the store object
436
- * }, 200);
437
- * throw new Error();
438
- * });
439
- * } catch (e) {
440
- * asyncLocalStorage.getStore(); // Returns undefined
441
- * // The error will be caught here
442
- * }
443
- * ```
444
- * @since v13.10.0, v12.17.0
445
- */
446
- run<R>(store: T, callback: () => R): R;
447
- run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
448
- /**
449
- * Runs a function synchronously outside of a context and returns its
450
- * return value. The store is not accessible within the callback function or
451
- * the asynchronous operations created within the callback. Any `getStore()`call done within the callback function will always return `undefined`.
452
- *
453
- * The optional `args` are passed to the callback function.
454
- *
455
- * If the callback function throws an error, the error is thrown by `exit()` too.
456
- * The stacktrace is not impacted by this call and the context is re-entered.
457
- *
458
- * Example:
459
- *
460
- * ```js
461
- * // Within a call to run
462
- * try {
463
- * asyncLocalStorage.getStore(); // Returns the store object or value
464
- * asyncLocalStorage.exit(() => {
465
- * asyncLocalStorage.getStore(); // Returns undefined
466
- * throw new Error();
467
- * });
468
- * } catch (e) {
469
- * asyncLocalStorage.getStore(); // Returns the same object or value
470
- * // The error will be caught here
471
- * }
472
- * ```
473
- * @since v13.10.0, v12.17.0
474
- * @experimental
475
- */
476
- exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
477
- /**
478
- * Transitions into the context for the remainder of the current
479
- * synchronous execution and then persists the store through any following
480
- * asynchronous calls.
481
- *
482
- * Example:
483
- *
484
- * ```js
485
- * const store = { id: 1 };
486
- * // Replaces previous store with the given store object
487
- * asyncLocalStorage.enterWith(store);
488
- * asyncLocalStorage.getStore(); // Returns the store object
489
- * someAsyncOperation(() => {
490
- * asyncLocalStorage.getStore(); // Returns the same object
491
- * });
492
- * ```
493
- *
494
- * This transition will continue for the _entire_ synchronous execution.
495
- * This means that if, for example, the context is entered within an event
496
- * handler subsequent event handlers will also run within that context unless
497
- * specifically bound to another context with an `AsyncResource`. That is why`run()` should be preferred over `enterWith()` unless there are strong reasons
498
- * to use the latter method.
499
- *
500
- * ```js
501
- * const store = { id: 1 };
502
- *
503
- * emitter.on('my-event', () => {
504
- * asyncLocalStorage.enterWith(store);
505
- * });
506
- * emitter.on('my-event', () => {
507
- * asyncLocalStorage.getStore(); // Returns the same object
508
- * });
509
- *
510
- * asyncLocalStorage.getStore(); // Returns undefined
511
- * emitter.emit('my-event');
512
- * asyncLocalStorage.getStore(); // Returns the same object
513
- * ```
514
- * @since v13.11.0, v12.17.0
515
- * @experimental
516
- */
517
- enterWith(store: T): void;
518
- }
519
- /**
520
- * @since v17.2.0, v16.14.0
521
- * @return A map of provider types to the corresponding numeric id.
522
- * This map contains all the event types that might be emitted by the `async_hooks.init()` event.
523
- */
524
- namespace asyncWrapProviders {
525
- const NONE: number;
526
- const DIRHANDLE: number;
527
- const DNSCHANNEL: number;
528
- const ELDHISTOGRAM: number;
529
- const FILEHANDLE: number;
530
- const FILEHANDLECLOSEREQ: number;
531
- const FIXEDSIZEBLOBCOPY: number;
532
- const FSEVENTWRAP: number;
533
- const FSREQCALLBACK: number;
534
- const FSREQPROMISE: number;
535
- const GETADDRINFOREQWRAP: number;
536
- const GETNAMEINFOREQWRAP: number;
537
- const HEAPSNAPSHOT: number;
538
- const HTTP2SESSION: number;
539
- const HTTP2STREAM: number;
540
- const HTTP2PING: number;
541
- const HTTP2SETTINGS: number;
542
- const HTTPINCOMINGMESSAGE: number;
543
- const HTTPCLIENTREQUEST: number;
544
- const JSSTREAM: number;
545
- const JSUDPWRAP: number;
546
- const MESSAGEPORT: number;
547
- const PIPECONNECTWRAP: number;
548
- const PIPESERVERWRAP: number;
549
- const PIPEWRAP: number;
550
- const PROCESSWRAP: number;
551
- const PROMISE: number;
552
- const QUERYWRAP: number;
553
- const SHUTDOWNWRAP: number;
554
- const SIGNALWRAP: number;
555
- const STATWATCHER: number;
556
- const STREAMPIPE: number;
557
- const TCPCONNECTWRAP: number;
558
- const TCPSERVERWRAP: number;
559
- const TCPWRAP: number;
560
- const TTYWRAP: number;
561
- const UDPSENDWRAP: number;
562
- const UDPWRAP: number;
563
- const SIGINTWATCHDOG: number;
564
- const WORKER: number;
565
- const WORKERHEAPSNAPSHOT: number;
566
- const WRITEWRAP: number;
567
- const ZLIB: number;
568
- const CHECKPRIMEREQUEST: number;
569
- const PBKDF2REQUEST: number;
570
- const KEYPAIRGENREQUEST: number;
571
- const KEYGENREQUEST: number;
572
- const KEYEXPORTREQUEST: number;
573
- const CIPHERREQUEST: number;
574
- const DERIVEBITSREQUEST: number;
575
- const HASHREQUEST: number;
576
- const RANDOMBYTESREQUEST: number;
577
- const RANDOMPRIMEREQUEST: number;
578
- const SCRYPTREQUEST: number;
579
- const SIGNREQUEST: number;
580
- const TLSWRAP: number;
581
- const VERIFYREQUEST: number;
582
- }
583
- }
584
- declare module "node:async_hooks" {
585
- export * from "async_hooks";
586
- }