@contrast/agent-bundle 5.42.0 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/README.md +1 -10
  2. package/node_modules/@contrast/agent/README.md +1 -10
  3. package/node_modules/@contrast/agent/package.json +12 -12
  4. package/node_modules/@contrast/agent-swc-plugin/package.json +3 -3
  5. package/node_modules/@contrast/agentify/lib/rewrite-hooks.js +3 -3
  6. package/node_modules/@contrast/agentify/lib/utils.js +13 -7
  7. package/node_modules/@contrast/agentify/package.json +17 -17
  8. package/node_modules/@contrast/architecture-components/package.json +6 -6
  9. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/ejs/template.js +1 -1
  10. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/pug/index.js +1 -1
  11. package/node_modules/@contrast/assess/lib/dataflow/sinks/install/http/server-response.js +1 -12
  12. package/node_modules/@contrast/assess/lib/dataflow/sinks/install/restify.js +1 -1
  13. package/node_modules/@contrast/assess/lib/dataflow/sources/handler.js +21 -24
  14. package/node_modules/@contrast/assess/lib/dataflow/sources/install/http.js +1 -1
  15. package/node_modules/@contrast/assess/lib/dataflow/tracker.js +1 -1
  16. package/node_modules/@contrast/assess/lib/get-source-context.js +11 -22
  17. package/node_modules/@contrast/assess/lib/index.js +1 -1
  18. package/node_modules/@contrast/assess/lib/make-source-context.js +5 -10
  19. package/node_modules/@contrast/assess/lib/policy.js +400 -0
  20. package/node_modules/@contrast/assess/lib/response-scanning/handlers/index.js +10 -14
  21. package/node_modules/@contrast/assess/lib/response-scanning/install/http.js +0 -12
  22. package/node_modules/@contrast/assess/lib/session-configuration/handlers.js +1 -1
  23. package/node_modules/@contrast/assess/package.json +14 -14
  24. package/node_modules/@contrast/code-events/binding.gyp +1 -1
  25. package/node_modules/@contrast/code-events/package.json +11 -9
  26. package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi108.node +0 -0
  27. package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi115.node +0 -0
  28. package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi127.node +0 -0
  29. package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/{@contrast+code-events.abi93.node → @contrast+code-events.abi137.node} +0 -0
  30. package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi108.armv8.node +0 -0
  31. package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi115.armv8.node +0 -0
  32. package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi127.armv8.node +0 -0
  33. package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi137.armv8.node +0 -0
  34. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi108.glibc.node +0 -0
  35. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi108.musl.node +0 -0
  36. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi115.glibc.node +0 -0
  37. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi115.musl.node +0 -0
  38. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi127.glibc.node +0 -0
  39. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi127.musl.node +0 -0
  40. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi137.glibc.node +0 -0
  41. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi137.musl.node +0 -0
  42. package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi108.node +0 -0
  43. package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi115.node +0 -0
  44. package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi127.node +0 -0
  45. package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi137.node +0 -0
  46. package/node_modules/@contrast/common/lib/constants.d.ts +1 -1
  47. package/node_modules/@contrast/common/lib/constants.js +1 -1
  48. package/node_modules/@contrast/common/lib/index.js +15 -15
  49. package/node_modules/@contrast/common/lib/primordials.d.ts +22 -20
  50. package/node_modules/@contrast/common/lib/types.d.ts +18 -6
  51. package/node_modules/@contrast/common/package.json +2 -2
  52. package/node_modules/@contrast/config/lib/options.js +37 -4
  53. package/node_modules/@contrast/config/package.json +4 -4
  54. package/node_modules/@contrast/core/lib/app-info.js +53 -74
  55. package/node_modules/@contrast/core/lib/index.d.ts +17 -1
  56. package/node_modules/@contrast/core/lib/sensitive-data-masking/index.js +33 -5
  57. package/node_modules/@contrast/core/package.json +10 -9
  58. package/node_modules/@contrast/deadzones/package.json +6 -6
  59. package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.d.ts +17 -13
  60. package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +16 -4
  61. package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.d.ts +2 -2
  62. package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +2 -3
  63. package/node_modules/@contrast/dep-hooks/lib/handler-invoker.d.ts +6 -6
  64. package/node_modules/@contrast/dep-hooks/lib/handler-invoker.js +0 -1
  65. package/node_modules/@contrast/dep-hooks/lib/helpers.d.ts +0 -7
  66. package/node_modules/@contrast/dep-hooks/lib/helpers.js +2 -18
  67. package/node_modules/@contrast/dep-hooks/lib/index.d.ts +17 -12
  68. package/node_modules/@contrast/dep-hooks/lib/index.js +5 -3
  69. package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +2 -1
  70. package/node_modules/@contrast/dep-hooks/lib/package-finder.js +6 -6
  71. package/node_modules/@contrast/dep-hooks/package.json +4 -3
  72. package/node_modules/@contrast/distringuish/package.json +7 -6
  73. package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi108.node +0 -0
  74. package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi115.node +0 -0
  75. package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi127.node +0 -0
  76. package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/{@contrast+distringuish.abi93.node → @contrast+distringuish.abi137.node} +0 -0
  77. package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi108.armv8.node +0 -0
  78. package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi115.armv8.node +0 -0
  79. package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi127.armv8.node +0 -0
  80. package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi137.armv8.node +0 -0
  81. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi108.glibc.node +0 -0
  82. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi108.musl.node +0 -0
  83. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi115.glibc.node +0 -0
  84. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi115.musl.node +0 -0
  85. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi127.glibc.node +0 -0
  86. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi127.musl.node +0 -0
  87. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi137.glibc.node +0 -0
  88. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi137.musl.node +0 -0
  89. package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi108.node +0 -0
  90. package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi115.node +0 -0
  91. package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi127.node +0 -0
  92. package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi137.node +0 -0
  93. package/node_modules/@contrast/esm-hooks/lib/debug-methods.mjs +4 -4
  94. package/node_modules/@contrast/esm-hooks/lib/get-file-type.mjs +2 -9
  95. package/node_modules/@contrast/esm-hooks/lib/hooks.mjs +0 -2
  96. package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/fs/promises.mjs +2 -0
  97. package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/fs.mjs +3 -0
  98. package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/util.mjs +1 -0
  99. package/node_modules/@contrast/esm-hooks/package.json +7 -7
  100. package/node_modules/@contrast/fn-inspect/package.json +9 -5
  101. package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi108.node +0 -0
  102. package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi115.node +0 -0
  103. package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi127.node +0 -0
  104. package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/{@contrast+fn-inspect.abi93.node → @contrast+fn-inspect.abi137.node} +0 -0
  105. package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi108.armv8.node +0 -0
  106. package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi115.armv8.node +0 -0
  107. package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi127.armv8.node +0 -0
  108. package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi137.armv8.node +0 -0
  109. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi108.glibc.node +0 -0
  110. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi108.musl.node +0 -0
  111. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi115.glibc.node +0 -0
  112. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi115.musl.node +0 -0
  113. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi127.glibc.node +0 -0
  114. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi127.musl.node +0 -0
  115. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi137.glibc.node +0 -0
  116. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/{@contrast+fn-inspect.abi93.musl.node → @contrast+fn-inspect.abi137.musl.node} +0 -0
  117. package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi108.node +0 -0
  118. package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi115.node +0 -0
  119. package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi127.node +0 -0
  120. package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi137.node +0 -0
  121. package/node_modules/@contrast/instrumentation/lib/http2.js +0 -11
  122. package/node_modules/@contrast/instrumentation/package.json +6 -6
  123. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +312 -224
  124. package/node_modules/@contrast/library-analysis/package.json +6 -6
  125. package/node_modules/@contrast/logger/lib/index.js +18 -8
  126. package/node_modules/@contrast/logger/lib/serializers.js +5 -5
  127. package/node_modules/@contrast/logger/lib/utils.d.ts +0 -6
  128. package/node_modules/@contrast/logger/package.json +4 -4
  129. package/node_modules/@contrast/metrics/lib/index.d.ts +6 -6
  130. package/node_modules/@contrast/metrics/lib/index.js +0 -1
  131. package/node_modules/@contrast/metrics/package.json +7 -7
  132. package/node_modules/@contrast/patcher/package.json +3 -3
  133. package/node_modules/@contrast/perf/package.json +7 -4
  134. package/node_modules/@contrast/protect/lib/hardening/handlers.js +37 -21
  135. package/node_modules/@contrast/protect/lib/index.d.ts +3 -2
  136. package/node_modules/@contrast/protect/lib/index.js +9 -2
  137. package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +269 -238
  138. package/node_modules/@contrast/protect/lib/input-analysis/install/http.js +3 -4
  139. package/node_modules/@contrast/protect/lib/input-tracing/{handlers/index.js → handlers.js} +15 -15
  140. package/node_modules/@contrast/protect/lib/input-tracing/index.js +0 -1
  141. package/node_modules/@contrast/protect/lib/make-source-context.js +5 -7
  142. package/node_modules/@contrast/protect/lib/policy.js +130 -95
  143. package/node_modules/@contrast/protect/lib/semantic-analysis/handlers.js +19 -18
  144. package/node_modules/@contrast/protect/package.json +12 -12
  145. package/node_modules/@contrast/reporter/lib/index.js +1 -1
  146. package/node_modules/@contrast/reporter/lib/reporters/base.d.ts +0 -1
  147. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.d.ts +4 -2
  148. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.js +14 -14
  149. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.d.ts +43 -6
  150. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +262 -429
  151. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/server-inventory.d.ts +3 -3
  152. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +17 -7
  153. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +12 -13
  154. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/utils.js +6 -7
  155. package/node_modules/@contrast/reporter/lib/reporters/file.js +1 -1
  156. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.d.ts +2 -3
  157. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.js +72 -86
  158. package/node_modules/@contrast/reporter/lib/reporters/security-logger/messages.js +6 -7
  159. package/node_modules/@contrast/reporter/lib/validators.js +0 -1
  160. package/node_modules/@contrast/reporter/node_modules/sonic-boom/.husky/pre-commit +2 -2
  161. package/node_modules/@contrast/reporter/node_modules/sonic-boom/.taprc +5 -0
  162. package/node_modules/@contrast/reporter/node_modules/sonic-boom/README.md +2 -4
  163. package/node_modules/@contrast/reporter/node_modules/sonic-boom/bench.js +5 -36
  164. package/node_modules/@contrast/reporter/node_modules/sonic-boom/index.js +56 -300
  165. package/node_modules/@contrast/reporter/node_modules/sonic-boom/package.json +12 -7
  166. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test.js +1684 -0
  167. package/node_modules/@contrast/reporter/node_modules/sonic-boom/types/index.d.ts +1 -2
  168. package/node_modules/@contrast/reporter/package.json +10 -10
  169. package/node_modules/@contrast/rewriter/lib/index.js +5 -43
  170. package/node_modules/@contrast/rewriter/package.json +8 -8
  171. package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +0 -5
  172. package/node_modules/@contrast/route-coverage/lib/install/restify.js +1 -1
  173. package/node_modules/@contrast/route-coverage/package.json +10 -10
  174. package/node_modules/@contrast/scopes/package.json +6 -6
  175. package/node_modules/@contrast/sec-obs/lib/traces/http.js +1 -1
  176. package/node_modules/@contrast/sec-obs/lib/traces/http.test.js +1 -1
  177. package/node_modules/@contrast/sec-obs/package.json +10 -10
  178. package/node_modules/@contrast/sources/lib/index.js +1 -1
  179. package/node_modules/@contrast/sources/lib/index.test.js +0 -26
  180. package/node_modules/@contrast/sources/package.json +3 -3
  181. package/node_modules/@contrast/telemetry/package.json +6 -6
  182. package/node_modules/@opentelemetry/semantic-conventions/README.md +3 -2
  183. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +4350 -2882
  184. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +4350 -2882
  185. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
  186. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +136 -0
  187. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +154 -0
  188. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js.map +1 -0
  189. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +713 -141
  190. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +713 -141
  191. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
  192. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.d.ts +2 -0
  193. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +2 -0
  194. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js.map +1 -1
  195. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.d.ts +1 -0
  196. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +1 -0
  197. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js.map +1 -1
  198. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +7 -1
  199. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +7 -1
  200. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
  201. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.d.ts +5 -0
  202. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +23 -0
  203. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js.map +1 -0
  204. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
  205. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
  206. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
  207. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +4350 -2882
  208. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +4350 -2882
  209. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
  210. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +136 -0
  211. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +154 -0
  212. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js.map +1 -0
  213. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +713 -141
  214. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +713 -141
  215. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
  216. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.d.ts +2 -0
  217. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +2 -0
  218. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js.map +1 -1
  219. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.d.ts +1 -0
  220. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +1 -0
  221. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js.map +1 -1
  222. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +7 -1
  223. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +7 -1
  224. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
  225. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.d.ts +5 -0
  226. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +23 -0
  227. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js.map +1 -0
  228. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
  229. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
  230. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
  231. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +4350 -2882
  232. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +4354 -2883
  233. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
  234. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +136 -0
  235. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +157 -0
  236. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js.map +1 -0
  237. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +713 -141
  238. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +720 -147
  239. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
  240. package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.d.ts +2 -0
  241. package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +2 -0
  242. package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js.map +1 -1
  243. package/node_modules/@opentelemetry/semantic-conventions/build/src/index.d.ts +1 -0
  244. package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +1 -0
  245. package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js.map +1 -1
  246. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +7 -1
  247. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +10 -4
  248. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
  249. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.d.ts +5 -0
  250. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +26 -0
  251. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js.map +1 -0
  252. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
  253. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
  254. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
  255. package/node_modules/@opentelemetry/semantic-conventions/package.json +6 -7
  256. package/node_modules/@swc/core/README.md +5 -0
  257. package/node_modules/@swc/core/binding.d.ts +2 -2
  258. package/node_modules/@swc/core/index.d.ts +5 -4
  259. package/node_modules/@swc/core/index.js +2 -2
  260. package/node_modules/@swc/core/package.json +12 -12
  261. package/node_modules/@swc/core-darwin-arm64/package.json +1 -1
  262. package/node_modules/@swc/core-darwin-arm64/swc.darwin-arm64.node +0 -0
  263. package/node_modules/@swc/core-darwin-x64/package.json +1 -1
  264. package/node_modules/@swc/core-darwin-x64/swc.darwin-x64.node +0 -0
  265. package/node_modules/@swc/core-linux-arm64-gnu/package.json +1 -1
  266. package/node_modules/@swc/core-linux-arm64-gnu/swc.linux-arm64-gnu.node +0 -0
  267. package/node_modules/@swc/core-linux-arm64-musl/package.json +1 -1
  268. package/node_modules/@swc/core-linux-arm64-musl/swc.linux-arm64-musl.node +0 -0
  269. package/node_modules/@swc/core-linux-x64-gnu/package.json +1 -1
  270. package/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
  271. package/node_modules/@swc/core-linux-x64-musl/package.json +1 -1
  272. package/node_modules/@swc/core-linux-x64-musl/swc.linux-x64-musl.node +0 -0
  273. package/node_modules/@swc/core-win32-arm64-msvc/package.json +1 -1
  274. package/node_modules/@swc/core-win32-arm64-msvc/swc.win32-arm64-msvc.node +0 -0
  275. package/node_modules/@swc/core-win32-x64-msvc/package.json +1 -1
  276. package/node_modules/@swc/core-win32-x64-msvc/swc.win32-x64-msvc.node +0 -0
  277. package/node_modules/@swc/types/index.d.ts +14 -5
  278. package/node_modules/@swc/types/package.json +2 -2
  279. package/node_modules/@types/node/README.md +1 -1
  280. package/node_modules/@types/node/assert/strict.d.ts +105 -2
  281. package/node_modules/@types/node/assert.d.ts +119 -95
  282. package/node_modules/@types/node/buffer.d.ts +1 -1
  283. package/node_modules/@types/node/child_process.d.ts +26 -122
  284. package/node_modules/@types/node/crypto.d.ts +161 -17
  285. package/node_modules/@types/node/dns.d.ts +5 -0
  286. package/node_modules/@types/node/events.d.ts +79 -33
  287. package/node_modules/@types/node/fs/promises.d.ts +41 -26
  288. package/node_modules/@types/node/fs.d.ts +276 -35
  289. package/node_modules/@types/node/globals.d.ts +148 -347
  290. package/node_modules/@types/node/http.d.ts +57 -8
  291. package/node_modules/@types/node/https.d.ts +5 -0
  292. package/node_modules/@types/node/index.d.ts +7 -2
  293. package/node_modules/@types/node/inspector.d.ts +187 -4089
  294. package/node_modules/@types/node/inspector.generated.d.ts +4052 -0
  295. package/node_modules/@types/node/module.d.ts +1 -0
  296. package/node_modules/@types/node/net.d.ts +21 -0
  297. package/node_modules/@types/node/package.json +3 -3
  298. package/node_modules/@types/node/sqlite.d.ts +34 -0
  299. package/node_modules/@types/node/test.d.ts +106 -23
  300. package/node_modules/@types/node/tls.d.ts +32 -0
  301. package/node_modules/@types/node/ts5.6/index.d.ts +7 -2
  302. package/node_modules/@types/node/ts5.7/index.d.ts +7 -2
  303. package/node_modules/@types/node/url.d.ts +25 -6
  304. package/node_modules/@types/node/util.d.ts +11 -4
  305. package/node_modules/@types/node/vm.d.ts +73 -10
  306. package/node_modules/@types/node/wasi.d.ts +21 -0
  307. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  308. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  309. package/node_modules/@types/node/{dom-events.d.ts → web-globals/events.d.ts} +49 -51
  310. package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
  311. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  312. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  313. package/node_modules/@types/node/worker_threads.d.ts +84 -50
  314. package/node_modules/@types/node/zlib.d.ts +6 -0
  315. package/node_modules/axios/CHANGELOG.md +58 -0
  316. package/node_modules/axios/README.md +87 -10
  317. package/node_modules/axios/dist/axios.js +355 -289
  318. package/node_modules/axios/dist/axios.js.map +1 -1
  319. package/node_modules/axios/dist/axios.min.js +2 -2
  320. package/node_modules/axios/dist/axios.min.js.map +1 -1
  321. package/node_modules/axios/dist/browser/axios.cjs +286 -213
  322. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  323. package/node_modules/axios/dist/esm/axios.js +286 -213
  324. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  325. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  326. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  327. package/node_modules/axios/dist/node/axios.cjs +377 -213
  328. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  329. package/node_modules/axios/index.d.cts +12 -5
  330. package/node_modules/axios/index.d.ts +13 -4
  331. package/node_modules/axios/lib/adapters/adapters.js +6 -4
  332. package/node_modules/axios/lib/adapters/fetch.js +221 -162
  333. package/node_modules/axios/lib/adapters/http.js +18 -0
  334. package/node_modules/axios/lib/adapters/xhr.js +11 -8
  335. package/node_modules/axios/lib/core/Axios.js +0 -2
  336. package/node_modules/axios/lib/core/AxiosError.js +10 -3
  337. package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
  338. package/node_modules/axios/lib/defaults/index.js +1 -1
  339. package/node_modules/axios/lib/env/data.js +1 -1
  340. package/node_modules/axios/lib/helpers/buildURL.js +1 -3
  341. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
  342. package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
  343. package/node_modules/axios/lib/utils.js +5 -3
  344. package/node_modules/axios/package.json +18 -12
  345. package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  346. package/node_modules/balanced-match/LICENSE.md +21 -0
  347. package/node_modules/balanced-match/README.md +97 -0
  348. package/node_modules/balanced-match/index.js +62 -0
  349. package/node_modules/balanced-match/package.json +48 -0
  350. package/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
  351. package/node_modules/brace-expansion/LICENSE +21 -0
  352. package/node_modules/brace-expansion/README.md +135 -0
  353. package/node_modules/brace-expansion/index.js +203 -0
  354. package/node_modules/brace-expansion/package.json +49 -0
  355. package/node_modules/detect-libc/lib/detect-libc.js +59 -13
  356. package/node_modules/detect-libc/lib/elf.js +39 -0
  357. package/node_modules/detect-libc/lib/filesystem.js +18 -8
  358. package/node_modules/detect-libc/package.json +3 -2
  359. package/node_modules/minimatch/LICENSE +15 -0
  360. package/node_modules/minimatch/README.md +454 -0
  361. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  362. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  363. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  364. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  365. package/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
  366. package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  367. package/node_modules/minimatch/dist/commonjs/ast.js +592 -0
  368. package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  369. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  370. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  371. package/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  372. package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  373. package/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
  374. package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  375. package/node_modules/minimatch/dist/commonjs/escape.js +22 -0
  376. package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  377. package/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
  378. package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  379. package/node_modules/minimatch/dist/commonjs/index.js +1017 -0
  380. package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  381. package/node_modules/minimatch/dist/commonjs/package.json +3 -0
  382. package/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
  383. package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  384. package/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
  385. package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  386. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  387. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  388. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  389. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  390. package/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
  391. package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  392. package/node_modules/minimatch/dist/esm/ast.js +588 -0
  393. package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  394. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  395. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  396. package/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  397. package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  398. package/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
  399. package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  400. package/node_modules/minimatch/dist/esm/escape.js +18 -0
  401. package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  402. package/node_modules/minimatch/dist/esm/index.d.ts +94 -0
  403. package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  404. package/node_modules/minimatch/dist/esm/index.js +1001 -0
  405. package/node_modules/minimatch/dist/esm/index.js.map +1 -0
  406. package/node_modules/minimatch/dist/esm/package.json +3 -0
  407. package/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
  408. package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  409. package/node_modules/minimatch/dist/esm/unescape.js +20 -0
  410. package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  411. package/node_modules/minimatch/package.json +82 -0
  412. package/node_modules/node-abi/LICENSE +21 -0
  413. package/node_modules/node-abi/README.md +54 -0
  414. package/node_modules/node-abi/abi_registry.json +408 -0
  415. package/node_modules/node-abi/getNextTarget.js +13 -0
  416. package/node_modules/node-abi/index.js +161 -0
  417. package/node_modules/node-abi/package.json +46 -0
  418. package/node_modules/node-addon-api/README.md +25 -249
  419. package/node_modules/node-addon-api/common.gypi +1 -0
  420. package/node_modules/node-addon-api/index.js +2 -0
  421. package/node_modules/node-addon-api/napi-inl.h +592 -166
  422. package/node_modules/node-addon-api/napi.h +167 -59
  423. package/node_modules/node-addon-api/node_addon_api.gyp +10 -0
  424. package/node_modules/node-addon-api/noexcept.gypi +1 -1
  425. package/node_modules/node-addon-api/package.json +13 -13
  426. package/node_modules/node-addon-api/tools/conversion.js +1 -1
  427. package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
  428. package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
  429. package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
  430. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  431. package/node_modules/protobufjs/dist/protobuf.js +2 -2
  432. package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
  433. package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
  434. package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
  435. package/node_modules/protobufjs/package.json +1 -1
  436. package/node_modules/undici-types/agent.d.ts +0 -4
  437. package/node_modules/undici-types/client.d.ts +0 -2
  438. package/node_modules/undici-types/diagnostics-channel.d.ts +9 -0
  439. package/node_modules/undici-types/dispatcher.d.ts +3 -8
  440. package/node_modules/undici-types/env-http-proxy-agent.d.ts +2 -1
  441. package/node_modules/undici-types/eventsource.d.ts +3 -3
  442. package/node_modules/undici-types/fetch.d.ts +1 -0
  443. package/node_modules/undici-types/h2c-client.d.ts +0 -2
  444. package/node_modules/undici-types/handlers.d.ts +1 -1
  445. package/node_modules/undici-types/index.d.ts +3 -1
  446. package/node_modules/undici-types/mock-client.d.ts +2 -0
  447. package/node_modules/undici-types/mock-interceptor.d.ts +2 -1
  448. package/node_modules/undici-types/mock-pool.d.ts +2 -0
  449. package/node_modules/undici-types/package.json +1 -1
  450. package/node_modules/undici-types/retry-handler.d.ts +9 -0
  451. package/node_modules/undici-types/snapshot-agent.d.ts +107 -0
  452. package/node_modules/undici-types/webidl.d.ts +29 -15
  453. package/node_modules/undici-types/websocket.d.ts +3 -1
  454. package/package.json +3 -3
  455. package/node_modules/@contrast/assess/lib/get-policy.js +0 -336
  456. package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi93.armv8.node +0 -0
  457. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.glibc.node +0 -0
  458. package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.musl.node +0 -0
  459. package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi93.node +0 -0
  460. package/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +0 -111
  461. package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi93.armv8.node +0 -0
  462. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi93.glibc.node +0 -0
  463. package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi93.musl.node +0 -0
  464. package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi93.node +0 -0
  465. package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi93.armv8.node +0 -0
  466. package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi93.glibc.node +0 -0
  467. package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi93.node +0 -0
  468. package/node_modules/@contrast/perf/lib/index.test.js +0 -547
  469. package/node_modules/@contrast/perf/lib/tsconfig.json +0 -31
  470. package/node_modules/@contrast/protect/lib/input-tracing/install/spdy.js +0 -63
  471. package/node_modules/@contrast/reporter/node_modules/sonic-boom/.taprc.yaml +0 -11
  472. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/destroy.test.js +0 -49
  473. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/end.test.js +0 -98
  474. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/flush-sync.test.js +0 -140
  475. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/flush.test.js +0 -419
  476. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/fsync.test.js +0 -63
  477. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/helper.js +0 -42
  478. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/minlength.test.js +0 -35
  479. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/mode.test.js +0 -116
  480. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/reopen.test.js +0 -239
  481. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/retry.test.js +0 -414
  482. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/sync.test.js +0 -261
  483. package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/write.test.js +0 -465
  484. package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
@@ -36,39 +36,6 @@
36
36
  */
37
37
  declare module "events" {
38
38
  import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
39
- // NOTE: This class is in the docs but is **not actually exported** by Node.
40
- // If https://github.com/nodejs/node/issues/39903 gets resolved and Node
41
- // actually starts exporting the class, uncomment below.
42
- // import { EventListener, EventListenerObject } from '__dom-events';
43
- // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
44
- // interface NodeEventTarget extends EventTarget {
45
- // /**
46
- // * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
47
- // * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
48
- // */
49
- // addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
50
- // /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
51
- // eventNames(): string[];
52
- // /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
53
- // listenerCount(type: string): number;
54
- // /** Node.js-specific alias for `eventTarget.removeListener()`. */
55
- // off(type: string, listener: EventListener | EventListenerObject): this;
56
- // /** Node.js-specific alias for `eventTarget.addListener()`. */
57
- // on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
58
- // /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
59
- // once(type: string, listener: EventListener | EventListenerObject): this;
60
- // /**
61
- // * Node.js-specific extension to the `EventTarget` class.
62
- // * If `type` is specified, removes all registered listeners for `type`,
63
- // * otherwise removes all registered listeners.
64
- // */
65
- // removeAllListeners(type: string): this;
66
- // /**
67
- // * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
68
- // * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
69
- // */
70
- // removeListener(type: string, listener: EventListener | EventListenerObject): this;
71
- // }
72
39
  interface EventEmitterOptions {
73
40
  /**
74
41
  * Enables automatic capturing of promise rejection.
@@ -584,6 +551,85 @@ declare module "events" {
584
551
  */
585
552
  readonly asyncResource: EventEmitterReferencingAsyncResource;
586
553
  }
554
+ /**
555
+ * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget`
556
+ * that emulates a subset of the `EventEmitter` API.
557
+ * @since v14.5.0
558
+ */
559
+ export interface NodeEventTarget extends EventTarget {
560
+ /**
561
+ * Node.js-specific extension to the `EventTarget` class that emulates the
562
+ * equivalent `EventEmitter` API. The only difference between `addListener()` and
563
+ * `addEventListener()` is that `addListener()` will return a reference to the
564
+ * `EventTarget`.
565
+ * @since v14.5.0
566
+ */
567
+ addListener(type: string, listener: (arg: any) => void): this;
568
+ /**
569
+ * Node.js-specific extension to the `EventTarget` class that dispatches the
570
+ * `arg` to the list of handlers for `type`.
571
+ * @since v15.2.0
572
+ * @returns `true` if event listeners registered for the `type` exist,
573
+ * otherwise `false`.
574
+ */
575
+ emit(type: string, arg: any): boolean;
576
+ /**
577
+ * Node.js-specific extension to the `EventTarget` class that returns an array
578
+ * of event `type` names for which event listeners are registered.
579
+ * @since 14.5.0
580
+ */
581
+ eventNames(): string[];
582
+ /**
583
+ * Node.js-specific extension to the `EventTarget` class that returns the number
584
+ * of event listeners registered for the `type`.
585
+ * @since v14.5.0
586
+ */
587
+ listenerCount(type: string): number;
588
+ /**
589
+ * Node.js-specific extension to the `EventTarget` class that sets the number
590
+ * of max event listeners as `n`.
591
+ * @since v14.5.0
592
+ */
593
+ setMaxListeners(n: number): void;
594
+ /**
595
+ * Node.js-specific extension to the `EventTarget` class that returns the number
596
+ * of max event listeners.
597
+ * @since v14.5.0
598
+ */
599
+ getMaxListeners(): number;
600
+ /**
601
+ * Node.js-specific alias for `eventTarget.removeEventListener()`.
602
+ * @since v14.5.0
603
+ */
604
+ off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
605
+ /**
606
+ * Node.js-specific alias for `eventTarget.addEventListener()`.
607
+ * @since v14.5.0
608
+ */
609
+ on(type: string, listener: (arg: any) => void): this;
610
+ /**
611
+ * Node.js-specific extension to the `EventTarget` class that adds a `once`
612
+ * listener for the given event `type`. This is equivalent to calling `on`
613
+ * with the `once` option set to `true`.
614
+ * @since v14.5.0
615
+ */
616
+ once(type: string, listener: (arg: any) => void): this;
617
+ /**
618
+ * Node.js-specific extension to the `EventTarget` class. If `type` is specified,
619
+ * removes all registered listeners for `type`, otherwise removes all registered
620
+ * listeners.
621
+ * @since v14.5.0
622
+ */
623
+ removeAllListeners(type?: string): this;
624
+ /**
625
+ * Node.js-specific extension to the `EventTarget` class that removes the
626
+ * `listener` for the given `type`. The only difference between `removeListener()`
627
+ * and `removeEventListener()` is that `removeListener()` will return a reference
628
+ * to the `EventTarget`.
629
+ * @since v14.5.0
630
+ */
631
+ removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
632
+ }
587
633
  }
588
634
  global {
589
635
  namespace NodeJS {
@@ -20,6 +20,8 @@ declare module "fs/promises" {
20
20
  CopyOptions,
21
21
  Dir,
22
22
  Dirent,
23
+ DisposableTempDir,
24
+ EncodingOption,
23
25
  GlobOptions,
24
26
  GlobOptionsWithFileTypes,
25
27
  GlobOptionsWithoutFileTypes,
@@ -40,7 +42,7 @@ declare module "fs/promises" {
40
42
  StatsFs,
41
43
  TimeLike,
42
44
  WatchEventType,
43
- WatchOptions,
45
+ WatchOptions as _WatchOptions,
44
46
  WriteStream,
45
47
  WriteVResult,
46
48
  } from "node:fs";
@@ -961,6 +963,26 @@ declare module "fs/promises" {
961
963
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
962
964
  */
963
965
  function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
966
+ /**
967
+ * The resulting Promise holds an async-disposable object whose `path` property
968
+ * holds the created directory path. When the object is disposed, the directory
969
+ * and its contents will be removed asynchronously if it still exists. If the
970
+ * directory cannot be deleted, disposal will throw an error. The object has an
971
+ * async `remove()` method which will perform the same task.
972
+ *
973
+ * Both this function and the disposal function on the resulting object are
974
+ * async, so it should be used with `await` + `await using` as in
975
+ * `await using dir = await fsPromises.mkdtempDisposable('prefix')`.
976
+ *
977
+ * <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
978
+ *
979
+ * For detailed information, see the documentation of `fsPromises.mkdtemp()`.
980
+ *
981
+ * The optional `options` argument can be a string specifying an encoding, or an
982
+ * object with an `encoding` property specifying the character encoding to use.
983
+ * @since v24.4.0
984
+ */
985
+ function mkdtempDisposable(prefix: PathLike, options?: EncodingOption): Promise<DisposableTempDir>;
964
986
  /**
965
987
  * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
966
988
  * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
@@ -1182,6 +1204,16 @@ declare module "fs/promises" {
1182
1204
  * @return Fulfills with an {fs.Dir}.
1183
1205
  */
1184
1206
  function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
1207
+ interface WatchOptions extends _WatchOptions {
1208
+ maxQueue?: number | undefined;
1209
+ overflow?: "ignore" | "throw" | undefined;
1210
+ }
1211
+ interface WatchOptionsWithBufferEncoding extends WatchOptions {
1212
+ encoding: "buffer";
1213
+ }
1214
+ interface WatchOptionsWithStringEncoding extends WatchOptions {
1215
+ encoding?: BufferEncoding | undefined;
1216
+ }
1185
1217
  /**
1186
1218
  * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
1187
1219
  *
@@ -1214,33 +1246,16 @@ declare module "fs/promises" {
1214
1246
  */
1215
1247
  function watch(
1216
1248
  filename: PathLike,
1217
- options:
1218
- | (WatchOptions & {
1219
- encoding: "buffer";
1220
- })
1221
- | "buffer",
1222
- ): AsyncIterable<FileChangeInfo<Buffer>>;
1223
- /**
1224
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1225
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1226
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1227
- * If `encoding` is not supplied, the default of `'utf8'` is used.
1228
- * If `persistent` is not supplied, the default of `true` is used.
1229
- * If `recursive` is not supplied, the default of `false` is used.
1230
- */
1231
- function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
1232
- /**
1233
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1234
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1235
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1236
- * If `encoding` is not supplied, the default of `'utf8'` is used.
1237
- * If `persistent` is not supplied, the default of `true` is used.
1238
- * If `recursive` is not supplied, the default of `false` is used.
1239
- */
1249
+ options?: WatchOptionsWithStringEncoding | BufferEncoding,
1250
+ ): NodeJS.AsyncIterator<FileChangeInfo<string>>;
1251
+ function watch(
1252
+ filename: PathLike,
1253
+ options: WatchOptionsWithBufferEncoding | "buffer",
1254
+ ): NodeJS.AsyncIterator<FileChangeInfo<Buffer>>;
1240
1255
  function watch(
1241
1256
  filename: PathLike,
1242
- options: WatchOptions | string,
1243
- ): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
1257
+ options: WatchOptions | BufferEncoding | "buffer",
1258
+ ): NodeJS.AsyncIterator<FileChangeInfo<string | Buffer>>;
1244
1259
  /**
1245
1260
  * Asynchronously copies the entire directory structure from `src` to `dest`,
1246
1261
  * including subdirectories and files.
@@ -323,15 +323,17 @@ declare module "fs" {
323
323
  */
324
324
  readSync(): Dirent | null;
325
325
  /**
326
- * An alias for `dir.close()`.
326
+ * Calls `dir.close()` if the directory handle is open, and returns a promise that
327
+ * fulfills when disposal is complete.
327
328
  * @since v24.1.0
328
329
  */
329
- [Symbol.dispose](): void;
330
+ [Symbol.asyncDispose](): Promise<void>;
330
331
  /**
331
- * An alias for `dir.closeSync()`.
332
+ * Calls `dir.closeSync()` if the directory handle is open, and returns
333
+ * `undefined`.
332
334
  * @since v24.1.0
333
335
  */
334
- [Symbol.asyncDispose](): void;
336
+ [Symbol.dispose](): void;
335
337
  }
336
338
  /**
337
339
  * Class: fs.StatWatcher
@@ -448,6 +450,230 @@ declare module "fs" {
448
450
  prependListener<K extends keyof ReadStreamEvents>(event: K, listener: ReadStreamEvents[K]): this;
449
451
  prependOnceListener<K extends keyof ReadStreamEvents>(event: K, listener: ReadStreamEvents[K]): this;
450
452
  }
453
+ export interface Utf8StreamOptions {
454
+ /**
455
+ * Appends writes to dest file instead of truncating it.
456
+ * @default true
457
+ */
458
+ append?: boolean | undefined;
459
+ /**
460
+ * Which type of data you can send to the write
461
+ * function, supported values are `'utf8'` or `'buffer'`.
462
+ * @default 'utf8'
463
+ */
464
+ contentMode?: "utf8" | "buffer" | undefined;
465
+ /**
466
+ * A path to a file to be written to (mode controlled by the
467
+ * append option).
468
+ */
469
+ dest?: string | undefined;
470
+ /**
471
+ * A file descriptor, something that is returned by `fs.open()`
472
+ * or `fs.openSync()`.
473
+ */
474
+ fd?: number | undefined;
475
+ /**
476
+ * An object that has the same API as the `fs` module, useful
477
+ * for mocking, testing, or customizing the behavior of the stream.
478
+ */
479
+ fs?: object | undefined;
480
+ /**
481
+ * Perform a `fs.fsyncSync()` every time a write is
482
+ * completed.
483
+ */
484
+ fsync?: boolean | undefined;
485
+ /**
486
+ * The maximum length of the internal buffer. If a write
487
+ * operation would cause the buffer to exceed `maxLength`, the data written is
488
+ * dropped and a drop event is emitted with the dropped data
489
+ */
490
+ maxLength?: number | undefined;
491
+ /**
492
+ * The maximum number of bytes that can be written;
493
+ * @default 16384
494
+ */
495
+ maxWrite?: number | undefined;
496
+ /**
497
+ * The minimum length of the internal buffer that is
498
+ * required to be full before flushing.
499
+ */
500
+ minLength?: number | undefined;
501
+ /**
502
+ * Ensure directory for `dest` file exists when true.
503
+ * @default false
504
+ */
505
+ mkdir?: boolean | undefined;
506
+ /**
507
+ * Specify the creating file mode (see `fs.open()`).
508
+ */
509
+ mode?: number | string | undefined;
510
+ /**
511
+ * Calls flush every `periodicFlush` milliseconds.
512
+ */
513
+ periodicFlush?: number | undefined;
514
+ /**
515
+ * A function that will be called when `write()`,
516
+ * `writeSync()`, or `flushSync()` encounters an `EAGAIN` or `EBUSY` error.
517
+ * If the return value is `true` the operation will be retried, otherwise it
518
+ * will bubble the error. The `err` is the error that caused this function to
519
+ * be called, `writeBufferLen` is the length of the buffer that was written,
520
+ * and `remainingBufferLen` is the length of the remaining buffer that the
521
+ * stream did not try to write.
522
+ */
523
+ retryEAGAIN?: ((err: Error | null, writeBufferLen: number, remainingBufferLen: number) => boolean) | undefined;
524
+ /**
525
+ * Perform writes synchronously.
526
+ */
527
+ sync?: boolean | undefined;
528
+ }
529
+ /**
530
+ * An optimized UTF-8 stream writer that allows for flushing all the internal
531
+ * buffering on demand. It handles `EAGAIN` errors correctly, allowing for
532
+ * customization, for example, by dropping content if the disk is busy.
533
+ * @since v24.6.0
534
+ * @experimental
535
+ */
536
+ export class Utf8Stream extends EventEmitter {
537
+ constructor(options: Utf8StreamOptions);
538
+ /**
539
+ * Whether the stream is appending to the file or truncating it.
540
+ */
541
+ readonly append: boolean;
542
+ /**
543
+ * The type of data that can be written to the stream. Supported
544
+ * values are `'utf8'` or `'buffer'`.
545
+ * @default 'utf8'
546
+ */
547
+ readonly contentMode: "utf8" | "buffer";
548
+ /**
549
+ * Close the stream immediately, without flushing the internal buffer.
550
+ */
551
+ destroy(): void;
552
+ /**
553
+ * Close the stream gracefully, flushing the internal buffer before closing.
554
+ */
555
+ end(): void;
556
+ /**
557
+ * The file descriptor that is being written to.
558
+ */
559
+ readonly fd: number;
560
+ /**
561
+ * The file that is being written to.
562
+ */
563
+ readonly file: string;
564
+ /**
565
+ * Writes the current buffer to the file if a write was not in progress. Do
566
+ * nothing if `minLength` is zero or if it is already writing.
567
+ */
568
+ flush(callback: (err: Error | null) => void): void;
569
+ /**
570
+ * Flushes the buffered data synchronously. This is a costly operation.
571
+ */
572
+ flushSync(): void;
573
+ /**
574
+ * Whether the stream is performing a `fs.fsyncSync()` after every
575
+ * write operation.
576
+ */
577
+ readonly fsync: boolean;
578
+ /**
579
+ * The maximum length of the internal buffer. If a write
580
+ * operation would cause the buffer to exceed `maxLength`, the data written is
581
+ * dropped and a drop event is emitted with the dropped data.
582
+ */
583
+ readonly maxLength: number;
584
+ /**
585
+ * The minimum length of the internal buffer that is required to be
586
+ * full before flushing.
587
+ */
588
+ readonly minLength: number;
589
+ /**
590
+ * Whether the stream should ensure that the directory for the
591
+ * `dest` file exists. If `true`, it will create the directory if it does not
592
+ * exist.
593
+ * @default false
594
+ */
595
+ readonly mkdir: boolean;
596
+ /**
597
+ * The mode of the file that is being written to.
598
+ */
599
+ readonly mode: number | string;
600
+ /**
601
+ * The number of milliseconds between flushes. If set to `0`, no
602
+ * periodic flushes will be performed.
603
+ */
604
+ readonly periodicFlush: number;
605
+ /**
606
+ * Reopen the file in place, useful for log rotation.
607
+ * @param file A path to a file to be written to (mode
608
+ * controlled by the append option).
609
+ */
610
+ reopen(file: PathLike): void;
611
+ /**
612
+ * Whether the stream is writing synchronously or asynchronously.
613
+ */
614
+ readonly sync: boolean;
615
+ /**
616
+ * When the `options.contentMode` is set to `'utf8'` when the stream is created,
617
+ * the `data` argument must be a string. If the `contentMode` is set to `'buffer'`,
618
+ * the `data` argument must be a `Buffer`.
619
+ * @param data The data to write.
620
+ */
621
+ write(data: string | Buffer): boolean;
622
+ /**
623
+ * Whether the stream is currently writing data to the file.
624
+ */
625
+ readonly writing: boolean;
626
+ /**
627
+ * Calls `utf8Stream.destroy()`.
628
+ */
629
+ [Symbol.dispose](): void;
630
+ /**
631
+ * events.EventEmitter
632
+ * 1. change
633
+ * 2. close
634
+ * 3. error
635
+ */
636
+ addListener(event: "close", listener: () => void): this;
637
+ addListener(event: "drain", listener: () => void): this;
638
+ addListener(event: "drop", listener: (data: string | Buffer) => void): this;
639
+ addListener(event: "error", listener: (error: Error) => void): this;
640
+ addListener(event: "finish", listener: () => void): this;
641
+ addListener(event: "ready", listener: () => void): this;
642
+ addListener(event: "write", listener: (n: number) => void): this;
643
+ addListener(event: string, listener: (...args: any[]) => void): this;
644
+ on(event: "close", listener: () => void): this;
645
+ on(event: "drain", listener: () => void): this;
646
+ on(event: "drop", listener: (data: string | Buffer) => void): this;
647
+ on(event: "error", listener: (error: Error) => void): this;
648
+ on(event: "finish", listener: () => void): this;
649
+ on(event: "ready", listener: () => void): this;
650
+ on(event: "write", listener: (n: number) => void): this;
651
+ on(event: string, listener: (...args: any[]) => void): this;
652
+ once(event: "close", listener: () => void): this;
653
+ once(event: "drain", listener: () => void): this;
654
+ once(event: "drop", listener: (data: string | Buffer) => void): this;
655
+ once(event: "error", listener: (error: Error) => void): this;
656
+ once(event: "finish", listener: () => void): this;
657
+ once(event: "ready", listener: () => void): this;
658
+ once(event: "write", listener: (n: number) => void): this;
659
+ once(event: string, listener: (...args: any[]) => void): this;
660
+ prependListener(event: "close", listener: () => void): this;
661
+ prependListener(event: "drain", listener: () => void): this;
662
+ prependListener(event: "drop", listener: (data: string | Buffer) => void): this;
663
+ prependListener(event: "error", listener: (error: Error) => void): this;
664
+ prependListener(event: "finish", listener: () => void): this;
665
+ prependListener(event: "ready", listener: () => void): this;
666
+ prependListener(event: "write", listener: (n: number) => void): this;
667
+ prependListener(event: string, listener: (...args: any[]) => void): this;
668
+ prependOnceListener(event: "close", listener: () => void): this;
669
+ prependOnceListener(event: "drain", listener: () => void): this;
670
+ prependOnceListener(event: "drop", listener: (data: string | Buffer) => void): this;
671
+ prependOnceListener(event: "error", listener: (error: Error) => void): this;
672
+ prependOnceListener(event: "finish", listener: () => void): this;
673
+ prependOnceListener(event: "ready", listener: () => void): this;
674
+ prependOnceListener(event: "write", listener: (n: number) => void): this;
675
+ prependOnceListener(event: string, listener: (...args: any[]) => void): this;
676
+ }
451
677
 
452
678
  /**
453
679
  * The Keys are events of the ReadStream and the values are the functions that are called when the event is emitted.
@@ -1964,6 +2190,39 @@ declare module "fs" {
1964
2190
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1965
2191
  */
1966
2192
  export function mkdtempSync(prefix: string, options?: EncodingOption): string | Buffer;
2193
+ export interface DisposableTempDir extends AsyncDisposable {
2194
+ /**
2195
+ * The path of the created directory.
2196
+ */
2197
+ path: string;
2198
+ /**
2199
+ * A function which removes the created directory.
2200
+ */
2201
+ remove(): Promise<void>;
2202
+ /**
2203
+ * The same as `remove`.
2204
+ */
2205
+ [Symbol.asyncDispose](): Promise<void>;
2206
+ }
2207
+ /**
2208
+ * Returns a disposable object whose `path` property holds the created directory
2209
+ * path. When the object is disposed, the directory and its contents will be
2210
+ * removed if it still exists. If the directory cannot be deleted, disposal will
2211
+ * throw an error. The object has a `remove()` method which will perform the same
2212
+ * task.
2213
+ *
2214
+ * <!-- TODO: link MDN docs for disposables once https://github.com/mdn/content/pull/38027 lands -->
2215
+ *
2216
+ * For detailed information, see the documentation of `fs.mkdtemp()`.
2217
+ *
2218
+ * There is no callback-based version of this API because it is designed for use
2219
+ * with the `using` syntax.
2220
+ *
2221
+ * The optional `options` argument can be a string specifying an encoding, or an
2222
+ * object with an `encoding` property specifying the character encoding to use.
2223
+ * @since v24.4.0
2224
+ */
2225
+ export function mkdtempDisposableSync(prefix: string, options?: EncodingOption): DisposableTempDir;
1967
2226
  /**
1968
2227
  * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`.
1969
2228
  *
@@ -3331,6 +3590,12 @@ declare module "fs" {
3331
3590
  persistent?: boolean | undefined;
3332
3591
  recursive?: boolean | undefined;
3333
3592
  }
3593
+ export interface WatchOptionsWithBufferEncoding extends WatchOptions {
3594
+ encoding: "buffer";
3595
+ }
3596
+ export interface WatchOptionsWithStringEncoding extends WatchOptions {
3597
+ encoding?: BufferEncoding | undefined;
3598
+ }
3334
3599
  export type WatchEventType = "rename" | "change";
3335
3600
  export type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
3336
3601
  export type StatsListener = (curr: Stats, prev: Stats) => void;
@@ -3357,44 +3622,20 @@ declare module "fs" {
3357
3622
  */
3358
3623
  export function watch(
3359
3624
  filename: PathLike,
3360
- options:
3361
- | (WatchOptions & {
3362
- encoding: "buffer";
3363
- })
3364
- | "buffer",
3365
- listener?: WatchListener<Buffer>,
3625
+ options?: WatchOptionsWithStringEncoding | BufferEncoding | null,
3626
+ listener?: WatchListener<string>,
3366
3627
  ): FSWatcher;
3367
- /**
3368
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
3369
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3370
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
3371
- * If `encoding` is not supplied, the default of `'utf8'` is used.
3372
- * If `persistent` is not supplied, the default of `true` is used.
3373
- * If `recursive` is not supplied, the default of `false` is used.
3374
- */
3375
3628
  export function watch(
3376
3629
  filename: PathLike,
3377
- options?: WatchOptions | BufferEncoding | null,
3378
- listener?: WatchListener<string>,
3630
+ options: WatchOptionsWithBufferEncoding | "buffer",
3631
+ listener: WatchListener<Buffer>,
3379
3632
  ): FSWatcher;
3380
- /**
3381
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
3382
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3383
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
3384
- * If `encoding` is not supplied, the default of `'utf8'` is used.
3385
- * If `persistent` is not supplied, the default of `true` is used.
3386
- * If `recursive` is not supplied, the default of `false` is used.
3387
- */
3388
3633
  export function watch(
3389
3634
  filename: PathLike,
3390
- options: WatchOptions | string,
3391
- listener?: WatchListener<string | Buffer>,
3635
+ options: WatchOptions | BufferEncoding | "buffer" | null,
3636
+ listener: WatchListener<string | Buffer>,
3392
3637
  ): FSWatcher;
3393
- /**
3394
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
3395
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3396
- */
3397
- export function watch(filename: PathLike, listener?: WatchListener<string>): FSWatcher;
3638
+ export function watch(filename: PathLike, listener: WatchListener<string>): FSWatcher;
3398
3639
  /**
3399
3640
  * Test whether or not the given path exists by checking with the file system.
3400
3641
  * Then call the `callback` argument with either true or false: