cloudstructs 0.1.37 → 0.1.41

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 (396) hide show
  1. package/.jsii +3 -3
  2. package/lib/codecommit-mirror/index.js +2 -2
  3. package/lib/ecs-service-roller/index.js +2 -2
  4. package/lib/email-receiver/receiver.js +1 -1
  5. package/lib/saml-identity-provider/index.js +2 -2
  6. package/lib/slack-events/index.js +1 -1
  7. package/lib/slack-textract/index.js +1 -1
  8. package/lib/state-machine-cr-provider/index.js +1 -1
  9. package/lib/static-website/index.js +1 -1
  10. package/lib/url-shortener/index.handler.js +2 -1
  11. package/lib/url-shortener/index.js +1 -1
  12. package/node_modules/@sindresorhus/is/dist/index.d.ts +9 -4
  13. package/node_modules/@sindresorhus/is/dist/index.js +9 -0
  14. package/node_modules/@sindresorhus/is/package.json +1 -1
  15. package/node_modules/@sindresorhus/is/readme.md +26 -0
  16. package/node_modules/@slack/logger/node_modules/@types/node/README.md +3 -3
  17. package/node_modules/@slack/logger/node_modules/@types/node/assert/strict.d.ts +3 -4
  18. package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +823 -40
  19. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +359 -90
  20. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1895 -113
  21. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +1070 -240
  22. package/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +331 -104
  23. package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +310 -37
  24. package/node_modules/@slack/logger/node_modules/@types/node/constants.d.ts +3 -3
  25. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +2406 -742
  26. package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +458 -58
  27. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  28. package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +292 -36
  29. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +414 -97
  30. package/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +153 -9
  31. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +560 -35
  32. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +735 -279
  33. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +2351 -870
  34. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +24 -14
  35. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +1020 -98
  36. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +1586 -466
  37. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +366 -15
  38. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +87 -13
  39. package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +577 -562
  40. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +53 -12
  41. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +558 -143
  42. package/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +236 -26
  43. package/node_modules/@slack/logger/node_modules/@types/node/package.json +18 -15
  44. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +9 -5
  45. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +290 -92
  46. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +1170 -156
  47. package/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +64 -26
  48. package/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +107 -8
  49. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +426 -80
  50. package/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +138 -113
  51. package/node_modules/@slack/logger/node_modules/@types/node/stream/consumers.d.ts +24 -0
  52. package/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +15 -44
  53. package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +6 -0
  54. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +979 -226
  55. package/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +57 -1
  56. package/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +53 -10
  57. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +32 -39
  58. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +449 -227
  59. package/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +107 -11
  60. package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +160 -24
  61. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +703 -32
  62. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +1375 -76
  63. package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +255 -79
  64. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +384 -33
  65. package/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +92 -24
  66. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +501 -138
  67. package/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +216 -64
  68. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +3 -3
  69. package/node_modules/@slack/web-api/node_modules/@types/node/assert/strict.d.ts +3 -4
  70. package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +823 -40
  71. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +359 -90
  72. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +1895 -113
  73. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +1070 -240
  74. package/node_modules/@slack/web-api/node_modules/@types/node/cluster.d.ts +331 -104
  75. package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +310 -37
  76. package/node_modules/@slack/web-api/node_modules/@types/node/constants.d.ts +3 -3
  77. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +2406 -742
  78. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +458 -58
  79. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  80. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +292 -36
  81. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +414 -97
  82. package/node_modules/@slack/web-api/node_modules/@types/node/domain.d.ts +153 -9
  83. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +560 -35
  84. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +735 -279
  85. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +2351 -870
  86. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +24 -14
  87. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +1020 -98
  88. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +1586 -466
  89. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +366 -15
  90. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +87 -13
  91. package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +577 -562
  92. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +53 -12
  93. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +558 -143
  94. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +236 -26
  95. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +18 -15
  96. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +9 -5
  97. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +290 -92
  98. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +1170 -156
  99. package/node_modules/@slack/web-api/node_modules/@types/node/punycode.d.ts +64 -26
  100. package/node_modules/@slack/web-api/node_modules/@types/node/querystring.d.ts +107 -8
  101. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +426 -80
  102. package/node_modules/@slack/web-api/node_modules/@types/node/repl.d.ts +138 -113
  103. package/node_modules/@slack/web-api/node_modules/@types/node/stream/consumers.d.ts +24 -0
  104. package/node_modules/@slack/web-api/node_modules/@types/node/stream/promises.d.ts +15 -44
  105. package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +6 -0
  106. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +979 -226
  107. package/node_modules/@slack/web-api/node_modules/@types/node/string_decoder.d.ts +57 -1
  108. package/node_modules/@slack/web-api/node_modules/@types/node/timers/promises.d.ts +53 -10
  109. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +32 -39
  110. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +449 -227
  111. package/node_modules/@slack/web-api/node_modules/@types/node/trace_events.d.ts +107 -11
  112. package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +160 -24
  113. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +703 -32
  114. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +1375 -76
  115. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +255 -79
  116. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +384 -33
  117. package/node_modules/@slack/web-api/node_modules/@types/node/wasi.d.ts +92 -24
  118. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +501 -138
  119. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +216 -64
  120. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +3 -3
  121. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +3 -4
  122. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +823 -40
  123. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +359 -90
  124. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +1895 -113
  125. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1070 -240
  126. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +331 -104
  127. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +310 -37
  128. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +3 -3
  129. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +2406 -742
  130. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +458 -58
  131. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  132. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +292 -36
  133. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +414 -97
  134. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +153 -9
  135. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +560 -35
  136. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +735 -279
  137. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +2351 -870
  138. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +24 -14
  139. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1020 -98
  140. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +1586 -466
  141. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +366 -15
  142. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +87 -13
  143. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +577 -562
  144. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +53 -12
  145. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +558 -143
  146. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +236 -26
  147. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +18 -15
  148. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +9 -5
  149. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +290 -92
  150. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1170 -156
  151. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +64 -26
  152. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +107 -8
  153. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +426 -80
  154. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +138 -113
  155. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
  156. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +15 -44
  157. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
  158. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +979 -226
  159. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +57 -1
  160. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +53 -10
  161. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +32 -39
  162. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +449 -227
  163. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +107 -11
  164. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +160 -24
  165. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +703 -32
  166. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1375 -76
  167. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +255 -79
  168. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +384 -33
  169. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +92 -24
  170. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +501 -138
  171. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +216 -64
  172. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +3 -3
  173. package/node_modules/@types/is-stream/node_modules/@types/node/assert/strict.d.ts +3 -4
  174. package/node_modules/@types/is-stream/node_modules/@types/node/assert.d.ts +823 -40
  175. package/node_modules/@types/is-stream/node_modules/@types/node/async_hooks.d.ts +359 -90
  176. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +1895 -113
  177. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +1070 -240
  178. package/node_modules/@types/is-stream/node_modules/@types/node/cluster.d.ts +331 -104
  179. package/node_modules/@types/is-stream/node_modules/@types/node/console.d.ts +310 -37
  180. package/node_modules/@types/is-stream/node_modules/@types/node/constants.d.ts +3 -3
  181. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +2406 -742
  182. package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +458 -58
  183. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  184. package/node_modules/@types/is-stream/node_modules/@types/node/dns/promises.d.ts +292 -36
  185. package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +414 -97
  186. package/node_modules/@types/is-stream/node_modules/@types/node/domain.d.ts +153 -9
  187. package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +560 -35
  188. package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +735 -279
  189. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +2351 -870
  190. package/node_modules/@types/is-stream/node_modules/@types/node/globals.d.ts +24 -14
  191. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +1020 -98
  192. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +1586 -466
  193. package/node_modules/@types/is-stream/node_modules/@types/node/https.d.ts +366 -15
  194. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +87 -13
  195. package/node_modules/@types/is-stream/node_modules/@types/node/inspector.d.ts +577 -562
  196. package/node_modules/@types/is-stream/node_modules/@types/node/module.d.ts +53 -12
  197. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +558 -143
  198. package/node_modules/@types/is-stream/node_modules/@types/node/os.d.ts +236 -26
  199. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +18 -15
  200. package/node_modules/@types/is-stream/node_modules/@types/node/path.d.ts +9 -5
  201. package/node_modules/@types/is-stream/node_modules/@types/node/perf_hooks.d.ts +290 -92
  202. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +1170 -156
  203. package/node_modules/@types/is-stream/node_modules/@types/node/punycode.d.ts +64 -26
  204. package/node_modules/@types/is-stream/node_modules/@types/node/querystring.d.ts +107 -8
  205. package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +426 -80
  206. package/node_modules/@types/is-stream/node_modules/@types/node/repl.d.ts +138 -113
  207. package/node_modules/@types/is-stream/node_modules/@types/node/stream/consumers.d.ts +24 -0
  208. package/node_modules/@types/is-stream/node_modules/@types/node/stream/promises.d.ts +15 -44
  209. package/node_modules/@types/is-stream/node_modules/@types/node/stream/web.d.ts +6 -0
  210. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +979 -226
  211. package/node_modules/@types/is-stream/node_modules/@types/node/string_decoder.d.ts +57 -1
  212. package/node_modules/@types/is-stream/node_modules/@types/node/timers/promises.d.ts +53 -10
  213. package/node_modules/@types/is-stream/node_modules/@types/node/timers.d.ts +32 -39
  214. package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +449 -227
  215. package/node_modules/@types/is-stream/node_modules/@types/node/trace_events.d.ts +107 -11
  216. package/node_modules/@types/is-stream/node_modules/@types/node/tty.d.ts +160 -24
  217. package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +703 -32
  218. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +1375 -76
  219. package/node_modules/@types/is-stream/node_modules/@types/node/v8.d.ts +255 -79
  220. package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +384 -33
  221. package/node_modules/@types/is-stream/node_modules/@types/node/wasi.d.ts +92 -24
  222. package/node_modules/@types/is-stream/node_modules/@types/node/worker_threads.d.ts +501 -138
  223. package/node_modules/@types/is-stream/node_modules/@types/node/zlib.d.ts +216 -64
  224. package/node_modules/@types/keyv/README.md +1 -1
  225. package/node_modules/@types/keyv/index.d.ts +10 -3
  226. package/node_modules/@types/keyv/node_modules/@types/node/README.md +3 -3
  227. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +3 -4
  228. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +823 -40
  229. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +359 -90
  230. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +1895 -113
  231. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1070 -240
  232. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +331 -104
  233. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +310 -37
  234. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +3 -3
  235. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +2406 -742
  236. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +458 -58
  237. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  238. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +292 -36
  239. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +414 -97
  240. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +153 -9
  241. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +560 -35
  242. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +735 -279
  243. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +2351 -870
  244. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +24 -14
  245. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1020 -98
  246. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +1586 -466
  247. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +366 -15
  248. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +87 -13
  249. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +577 -562
  250. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +53 -12
  251. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +558 -143
  252. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +236 -26
  253. package/node_modules/@types/keyv/node_modules/@types/node/package.json +18 -15
  254. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +9 -5
  255. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +290 -92
  256. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1170 -156
  257. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +64 -26
  258. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +107 -8
  259. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +426 -80
  260. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +138 -113
  261. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
  262. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +15 -44
  263. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
  264. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +979 -226
  265. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +57 -1
  266. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +53 -10
  267. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +32 -39
  268. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +449 -227
  269. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +107 -11
  270. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +160 -24
  271. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +703 -32
  272. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1375 -76
  273. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +255 -79
  274. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +384 -33
  275. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +92 -24
  276. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +501 -138
  277. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +216 -64
  278. package/node_modules/@types/keyv/package.json +3 -3
  279. package/node_modules/@types/responselike/node_modules/@types/node/README.md +3 -3
  280. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +3 -4
  281. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +823 -40
  282. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +359 -90
  283. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +1895 -113
  284. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1070 -240
  285. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +331 -104
  286. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +310 -37
  287. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +3 -3
  288. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +2406 -742
  289. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +458 -58
  290. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  291. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +292 -36
  292. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +414 -97
  293. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +153 -9
  294. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +560 -35
  295. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +735 -279
  296. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +2351 -870
  297. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +24 -14
  298. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1020 -98
  299. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +1586 -466
  300. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +366 -15
  301. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +87 -13
  302. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +577 -562
  303. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +53 -12
  304. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +558 -143
  305. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +236 -26
  306. package/node_modules/@types/responselike/node_modules/@types/node/package.json +18 -15
  307. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +9 -5
  308. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +290 -92
  309. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1170 -156
  310. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +64 -26
  311. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +107 -8
  312. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +426 -80
  313. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +138 -113
  314. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
  315. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +15 -44
  316. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
  317. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +979 -226
  318. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +57 -1
  319. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +53 -10
  320. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +32 -39
  321. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +449 -227
  322. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +107 -11
  323. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +160 -24
  324. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +703 -32
  325. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1375 -76
  326. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +255 -79
  327. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +384 -33
  328. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +92 -24
  329. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +501 -138
  330. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +216 -64
  331. package/node_modules/axios/CHANGELOG.md +98 -8
  332. package/node_modules/axios/README.md +74 -6
  333. package/node_modules/axios/SECURITY.md +5 -0
  334. package/node_modules/axios/dist/axios.js +2028 -1591
  335. package/node_modules/axios/dist/axios.map +1 -1
  336. package/node_modules/axios/dist/axios.min.js +2 -2
  337. package/node_modules/axios/dist/axios.min.map +1 -1
  338. package/node_modules/axios/index.d.ts +8 -1
  339. package/node_modules/axios/lib/adapters/http.js +33 -5
  340. package/node_modules/axios/lib/adapters/xhr.js +35 -25
  341. package/node_modules/axios/lib/core/Axios.js +60 -7
  342. package/node_modules/axios/lib/core/InterceptorManager.js +4 -2
  343. package/node_modules/axios/lib/core/README.md +1 -0
  344. package/node_modules/axios/lib/core/dispatchRequest.js +6 -3
  345. package/node_modules/axios/lib/core/transformData.js +3 -1
  346. package/node_modules/axios/lib/defaults.js +43 -7
  347. package/node_modules/axios/lib/helpers/validator.js +105 -0
  348. package/node_modules/axios/lib/utils.js +1 -3
  349. package/node_modules/axios/package.json +19 -21
  350. package/node_modules/follow-redirects/debug.js +2 -1
  351. package/node_modules/follow-redirects/index.js +14 -7
  352. package/node_modules/follow-redirects/package.json +1 -1
  353. package/node_modules/mime-db/HISTORY.md +6 -0
  354. package/node_modules/mime-db/db.json +39 -1
  355. package/node_modules/mime-db/package.json +4 -4
  356. package/node_modules/mime-types/HISTORY.md +7 -0
  357. package/node_modules/mime-types/package.json +4 -4
  358. package/node_modules/{http2-wrapper/node_modules/quick-lru → quick-lru}/index.d.ts +0 -0
  359. package/node_modules/{http2-wrapper/node_modules/quick-lru → quick-lru}/index.js +0 -0
  360. package/node_modules/{http2-wrapper/node_modules/quick-lru → quick-lru}/license +0 -0
  361. package/node_modules/{http2-wrapper/node_modules/quick-lru → quick-lru}/package.json +0 -0
  362. package/node_modules/{http2-wrapper/node_modules/quick-lru → quick-lru}/readme.md +0 -0
  363. package/node_modules/resolve-alpn/README.md +8 -1
  364. package/node_modules/resolve-alpn/index.js +14 -4
  365. package/node_modules/resolve-alpn/package.json +1 -1
  366. package/package.json +15 -15
  367. package/node_modules/@slack/logger/node_modules/@types/node/base.d.ts +0 -19
  368. package/node_modules/@slack/logger/node_modules/@types/node/diagnostic_channel.d.ts +0 -38
  369. package/node_modules/@slack/logger/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  370. package/node_modules/@slack/logger/node_modules/@types/node/ts3.6/base.d.ts +0 -67
  371. package/node_modules/@slack/logger/node_modules/@types/node/ts3.6/index.d.ts +0 -7
  372. package/node_modules/@slack/web-api/node_modules/@types/node/base.d.ts +0 -19
  373. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostic_channel.d.ts +0 -38
  374. package/node_modules/@slack/web-api/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  375. package/node_modules/@slack/web-api/node_modules/@types/node/ts3.6/base.d.ts +0 -67
  376. package/node_modules/@slack/web-api/node_modules/@types/node/ts3.6/index.d.ts +0 -7
  377. package/node_modules/@types/cacheable-request/node_modules/@types/node/base.d.ts +0 -19
  378. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostic_channel.d.ts +0 -38
  379. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  380. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts3.6/base.d.ts +0 -67
  381. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts3.6/index.d.ts +0 -7
  382. package/node_modules/@types/is-stream/node_modules/@types/node/base.d.ts +0 -19
  383. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostic_channel.d.ts +0 -38
  384. package/node_modules/@types/is-stream/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  385. package/node_modules/@types/is-stream/node_modules/@types/node/ts3.6/base.d.ts +0 -67
  386. package/node_modules/@types/is-stream/node_modules/@types/node/ts3.6/index.d.ts +0 -7
  387. package/node_modules/@types/keyv/node_modules/@types/node/base.d.ts +0 -19
  388. package/node_modules/@types/keyv/node_modules/@types/node/diagnostic_channel.d.ts +0 -38
  389. package/node_modules/@types/keyv/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  390. package/node_modules/@types/keyv/node_modules/@types/node/ts3.6/base.d.ts +0 -67
  391. package/node_modules/@types/keyv/node_modules/@types/node/ts3.6/index.d.ts +0 -7
  392. package/node_modules/@types/responselike/node_modules/@types/node/base.d.ts +0 -19
  393. package/node_modules/@types/responselike/node_modules/@types/node/diagnostic_channel.d.ts +0 -38
  394. package/node_modules/@types/responselike/node_modules/@types/node/ts3.6/assert.d.ts +0 -98
  395. package/node_modules/@types/responselike/node_modules/@types/node/ts3.6/base.d.ts +0 -67
  396. package/node_modules/@types/responselike/node_modules/@types/node/ts3.6/index.d.ts +0 -7
@@ -1,5 +1,41 @@
1
+ /**
2
+ * The `vm` module enables compiling and running code within V8 Virtual
3
+ * Machine contexts. **The `vm` module is not a security mechanism. Do**
4
+ * **not use it to run untrusted code.**
5
+ *
6
+ * JavaScript code can be compiled and run immediately or
7
+ * compiled, saved, and run later.
8
+ *
9
+ * A common use case is to run the code in a different V8 Context. This means
10
+ * invoked code has a different global object than the invoking code.
11
+ *
12
+ * One can provide the context by `contextifying` an
13
+ * object. The invoked code treats any property in the context like a
14
+ * global variable. Any changes to global variables caused by the invoked
15
+ * code are reflected in the context object.
16
+ *
17
+ * ```js
18
+ * const vm = require('vm');
19
+ *
20
+ * const x = 1;
21
+ *
22
+ * const context = { x: 2 };
23
+ * vm.createContext(context); // Contextify the object.
24
+ *
25
+ * const code = 'x += 40; var y = 17;';
26
+ * // `x` and `y` are global variables in the context.
27
+ * // Initially, x has the value 2 because that is the value of context.x.
28
+ * vm.runInContext(code, context);
29
+ *
30
+ * console.log(context.x); // 42
31
+ * console.log(context.y); // 17
32
+ *
33
+ * console.log(x); // 1; y is not defined.
34
+ * ```
35
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/vm.js)
36
+ */
1
37
  declare module 'vm' {
2
- interface Context extends NodeJS.Dict<any> { }
38
+ interface Context extends NodeJS.Dict<any> {}
3
39
  interface BaseOptions {
4
40
  /**
5
41
  * Specifies the filename used in stack traces produced by this script.
@@ -61,13 +97,11 @@ declare module 'vm' {
61
97
  * The sandbox/context in which the said function should be compiled in.
62
98
  */
63
99
  parsingContext?: Context | undefined;
64
-
65
100
  /**
66
101
  * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
67
102
  */
68
103
  contextExtensions?: Object[] | undefined;
69
104
  }
70
-
71
105
  interface CreateContextOptions {
72
106
  /**
73
107
  * Human-readable name of the newly created context.
@@ -82,27 +116,27 @@ declare module 'vm' {
82
116
  * @default ''
83
117
  */
84
118
  origin?: string | undefined;
85
- codeGeneration?: {
86
- /**
87
- * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
88
- * will throw an EvalError.
89
- * @default true
90
- */
91
- strings?: boolean | undefined;
92
- /**
93
- * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
94
- * @default true
95
- */
96
- wasm?: boolean | undefined;
97
- } | undefined;
119
+ codeGeneration?:
120
+ | {
121
+ /**
122
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
123
+ * will throw an EvalError.
124
+ * @default true
125
+ */
126
+ strings?: boolean | undefined;
127
+ /**
128
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
129
+ * @default true
130
+ */
131
+ wasm?: boolean | undefined;
132
+ }
133
+ | undefined;
98
134
  /**
99
135
  * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
100
136
  */
101
137
  microtaskMode?: 'afterEvaluate' | undefined;
102
138
  }
103
-
104
139
  type MeasureMemoryMode = 'summary' | 'detailed';
105
-
106
140
  interface MeasureMemoryOptions {
107
141
  /**
108
142
  * @default 'summary'
@@ -110,47 +144,364 @@ declare module 'vm' {
110
144
  mode?: MeasureMemoryMode | undefined;
111
145
  context?: Context | undefined;
112
146
  }
113
-
114
147
  interface MemoryMeasurement {
115
148
  total: {
116
149
  jsMemoryEstimate: number;
117
150
  jsMemoryRange: [number, number];
118
151
  };
119
152
  }
120
-
153
+ /**
154
+ * Instances of the `vm.Script` class contain precompiled scripts that can be
155
+ * executed in specific contexts.
156
+ * @since v0.3.1
157
+ */
121
158
  class Script {
122
159
  constructor(code: string, options?: ScriptOptions);
123
- runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
124
- runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
160
+ /**
161
+ * Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
162
+ * to local scope.
163
+ *
164
+ * The following example compiles code that increments a global variable, sets
165
+ * the value of another global variable, then execute the code multiple times.
166
+ * The globals are contained in the `context` object.
167
+ *
168
+ * ```js
169
+ * const vm = require('vm');
170
+ *
171
+ * const context = {
172
+ * animal: 'cat',
173
+ * count: 2
174
+ * };
175
+ *
176
+ * const script = new vm.Script('count += 1; name = "kitty";');
177
+ *
178
+ * vm.createContext(context);
179
+ * for (let i = 0; i < 10; ++i) {
180
+ * script.runInContext(context);
181
+ * }
182
+ *
183
+ * console.log(context);
184
+ * // Prints: { animal: 'cat', count: 12, name: 'kitty' }
185
+ * ```
186
+ *
187
+ * Using the `timeout` or `breakOnSigint` options will result in new event loops
188
+ * and corresponding threads being started, which have a non-zero performance
189
+ * overhead.
190
+ * @since v0.3.1
191
+ * @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method.
192
+ * @return the result of the very last statement executed in the script.
193
+ */
194
+ runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
195
+ /**
196
+ * First contextifies the given `contextObject`, runs the compiled code contained
197
+ * by the `vm.Script` object within the created context, and returns the result.
198
+ * Running code does not have access to local scope.
199
+ *
200
+ * The following example compiles code that sets a global variable, then executes
201
+ * the code multiple times in different contexts. The globals are set on and
202
+ * contained within each individual `context`.
203
+ *
204
+ * ```js
205
+ * const vm = require('vm');
206
+ *
207
+ * const script = new vm.Script('globalVar = "set"');
208
+ *
209
+ * const contexts = [{}, {}, {}];
210
+ * contexts.forEach((context) => {
211
+ * script.runInNewContext(context);
212
+ * });
213
+ *
214
+ * console.log(contexts);
215
+ * // Prints: [{ globalVar: 'set' }, { globalVar: 'set' }, { globalVar: 'set' }]
216
+ * ```
217
+ * @since v0.3.1
218
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
219
+ * @return the result of the very last statement executed in the script.
220
+ */
221
+ runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
222
+ /**
223
+ * Runs the compiled code contained by the `vm.Script` within the context of the
224
+ * current `global` object. Running code does not have access to local scope, but_does_ have access to the current `global` object.
225
+ *
226
+ * The following example compiles code that increments a `global` variable then
227
+ * executes that code multiple times:
228
+ *
229
+ * ```js
230
+ * const vm = require('vm');
231
+ *
232
+ * global.globalVar = 0;
233
+ *
234
+ * const script = new vm.Script('globalVar += 1', { filename: 'myfile.vm' });
235
+ *
236
+ * for (let i = 0; i < 1000; ++i) {
237
+ * script.runInThisContext();
238
+ * }
239
+ *
240
+ * console.log(globalVar);
241
+ *
242
+ * // 1000
243
+ * ```
244
+ * @since v0.3.1
245
+ * @return the result of the very last statement executed in the script.
246
+ */
125
247
  runInThisContext(options?: RunningScriptOptions): any;
248
+ /**
249
+ * Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any
250
+ * time and any number of times.
251
+ *
252
+ * ```js
253
+ * const script = new vm.Script(`
254
+ * function add(a, b) {
255
+ * return a + b;
256
+ * }
257
+ *
258
+ * const x = add(1, 2);
259
+ * `);
260
+ *
261
+ * const cacheWithoutX = script.createCachedData();
262
+ *
263
+ * script.runInThisContext();
264
+ *
265
+ * const cacheWithX = script.createCachedData();
266
+ * ```
267
+ * @since v10.6.0
268
+ */
126
269
  createCachedData(): Buffer;
270
+ /** @deprecated in favor of `script.createCachedData()` */
271
+ cachedDataProduced?: boolean | undefined;
127
272
  cachedDataRejected?: boolean | undefined;
273
+ cachedData?: Buffer | undefined;
128
274
  }
275
+ /**
276
+ * If given a `contextObject`, the `vm.createContext()` method will `prepare
277
+ * that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts,
278
+ * the `contextObject` will be the global object, retaining all of its existing
279
+ * properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables
280
+ * will remain unchanged.
281
+ *
282
+ * ```js
283
+ * const vm = require('vm');
284
+ *
285
+ * global.globalVar = 3;
286
+ *
287
+ * const context = { globalVar: 1 };
288
+ * vm.createContext(context);
289
+ *
290
+ * vm.runInContext('globalVar *= 2;', context);
291
+ *
292
+ * console.log(context);
293
+ * // Prints: { globalVar: 2 }
294
+ *
295
+ * console.log(global.globalVar);
296
+ * // Prints: 3
297
+ * ```
298
+ *
299
+ * If `contextObject` is omitted (or passed explicitly as `undefined`), a new,
300
+ * empty `contextified` object will be returned.
301
+ *
302
+ * The `vm.createContext()` method is primarily useful for creating a single
303
+ * context that can be used to run multiple scripts. For instance, if emulating a
304
+ * web browser, the method can be used to create a single context representing a
305
+ * window's global object, then run all `<script>` tags together within that
306
+ * context.
307
+ *
308
+ * The provided `name` and `origin` of the context are made visible through the
309
+ * Inspector API.
310
+ * @since v0.3.1
311
+ * @return contextified object.
312
+ */
129
313
  function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
314
+ /**
315
+ * Returns `true` if the given `object` object has been `contextified` using {@link createContext}.
316
+ * @since v0.11.7
317
+ */
130
318
  function isContext(sandbox: Context): boolean;
131
- function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
132
- function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
319
+ /**
320
+ * The `vm.runInContext()` method compiles `code`, runs it within the context of
321
+ * the `contextifiedObject`, then returns the result. Running code does not have
322
+ * access to the local scope. The `contextifiedObject` object _must_ have been
323
+ * previously `contextified` using the {@link createContext} method.
324
+ *
325
+ * If `options` is a string, then it specifies the filename.
326
+ *
327
+ * The following example compiles and executes different scripts using a single `contextified` object:
328
+ *
329
+ * ```js
330
+ * const vm = require('vm');
331
+ *
332
+ * const contextObject = { globalVar: 1 };
333
+ * vm.createContext(contextObject);
334
+ *
335
+ * for (let i = 0; i < 10; ++i) {
336
+ * vm.runInContext('globalVar *= 2;', contextObject);
337
+ * }
338
+ * console.log(contextObject);
339
+ * // Prints: { globalVar: 1024 }
340
+ * ```
341
+ * @since v0.3.1
342
+ * @param code The JavaScript code to compile and run.
343
+ * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
344
+ * @return the result of the very last statement executed in the script.
345
+ */
346
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
347
+ /**
348
+ * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
349
+ * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
350
+ * runs it within the created context, then returns the result. Running code
351
+ * does not have access to the local scope.
352
+ *
353
+ * If `options` is a string, then it specifies the filename.
354
+ *
355
+ * The following example compiles and executes code that increments a global
356
+ * variable and sets a new one. These globals are contained in the `contextObject`.
357
+ *
358
+ * ```js
359
+ * const vm = require('vm');
360
+ *
361
+ * const contextObject = {
362
+ * animal: 'cat',
363
+ * count: 2
364
+ * };
365
+ *
366
+ * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
367
+ * console.log(contextObject);
368
+ * // Prints: { animal: 'cat', count: 3, name: 'kitty' }
369
+ * ```
370
+ * @since v0.3.1
371
+ * @param code The JavaScript code to compile and run.
372
+ * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
373
+ * @return the result of the very last statement executed in the script.
374
+ */
375
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
376
+ /**
377
+ * `vm.runInThisContext()` compiles `code`, runs it within the context of the
378
+ * current `global` and returns the result. Running code does not have access to
379
+ * local scope, but does have access to the current `global` object.
380
+ *
381
+ * If `options` is a string, then it specifies the filename.
382
+ *
383
+ * The following example illustrates using both `vm.runInThisContext()` and
384
+ * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
385
+ *
386
+ * ```js
387
+ * const vm = require('vm');
388
+ * let localVar = 'initial value';
389
+ *
390
+ * const vmResult = vm.runInThisContext('localVar = "vm";');
391
+ * console.log(`vmResult: '${vmResult}', localVar: '${localVar}'`);
392
+ * // Prints: vmResult: 'vm', localVar: 'initial value'
393
+ *
394
+ * const evalResult = eval('localVar = "eval";');
395
+ * console.log(`evalResult: '${evalResult}', localVar: '${localVar}'`);
396
+ * // Prints: evalResult: 'eval', localVar: 'eval'
397
+ * ```
398
+ *
399
+ * Because `vm.runInThisContext()` does not have access to the local scope,`localVar` is unchanged. In contrast,
400
+ * [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
401
+ * local scope, so the value `localVar` is changed. In this way`vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
402
+ *
403
+ * ## Example: Running an HTTP server within a VM
404
+ *
405
+ * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
406
+ * context. The code passed to this VM context will have its own isolated scope.
407
+ *
408
+ * In order to run a simple web server using the `http` module the code passed to
409
+ * the context must either call `require('http')` on its own, or have a reference
410
+ * to the `http` module passed to it. For instance:
411
+ *
412
+ * ```js
413
+ * 'use strict';
414
+ * const vm = require('vm');
415
+ *
416
+ * const code = `
417
+ * ((require) => {
418
+ * const http = require('http');
419
+ *
420
+ * http.createServer((request, response) => {
421
+ * response.writeHead(200, { 'Content-Type': 'text/plain' });
422
+ * response.end('Hello World\\n');
423
+ * }).listen(8124);
424
+ *
425
+ * console.log('Server running at http://127.0.0.1:8124/');
426
+ * })`;
427
+ *
428
+ * vm.runInThisContext(code)(require);
429
+ * ```
430
+ *
431
+ * The `require()` in the above case shares the state with the context it is
432
+ * passed from. This may introduce risks when untrusted code is executed, e.g.
433
+ * altering objects in the context in unwanted ways.
434
+ * @since v0.3.1
435
+ * @param code The JavaScript code to compile and run.
436
+ * @return the result of the very last statement executed in the script.
437
+ */
133
438
  function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
439
+ /**
440
+ * Compiles the given code into the provided context (if no context is
441
+ * supplied, the current context is used), and returns it wrapped inside a
442
+ * function with the given `params`.
443
+ * @since v10.10.0
444
+ * @param code The body of the function to compile.
445
+ * @param params An array of strings containing all parameters for the function.
446
+ */
134
447
  function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
135
-
136
448
  /**
137
- * Measure the memory known to V8 and used by the current execution context or a specified context.
449
+ * Measure the memory known to V8 and used by all contexts known to the
450
+ * current V8 isolate, or the main context.
138
451
  *
139
452
  * The format of the object that the returned Promise may resolve with is
140
453
  * specific to the V8 engine and may change from one version of V8 to the next.
141
454
  *
142
- * The returned result is different from the statistics returned by
143
- * `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measures
144
- * the memory reachable by V8 from a specific context, while
145
- * `v8.getHeapSpaceStatistics()` measures the memory used by an instance
146
- * of V8 engine, which can switch among multiple contexts that reference
147
- * objects in the heap of one engine.
455
+ * The returned result is different from the statistics returned by`v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
456
+ * memory reachable by each V8 specific contexts in the current instance of
457
+ * the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure
458
+ * the memory occupied by each heap space in the current V8 instance.
459
+ *
460
+ * ```js
461
+ * const vm = require('vm');
462
+ * // Measure the memory used by the main context.
463
+ * vm.measureMemory({ mode: 'summary' })
464
+ * // This is the same as vm.measureMemory()
465
+ * .then((result) => {
466
+ * // The current format is:
467
+ * // {
468
+ * // total: {
469
+ * // jsMemoryEstimate: 2418479, jsMemoryRange: [ 2418479, 2745799 ]
470
+ * // }
471
+ * // }
472
+ * console.log(result);
473
+ * });
148
474
  *
475
+ * const context = vm.createContext({ a: 1 });
476
+ * vm.measureMemory({ mode: 'detailed', execution: 'eager' })
477
+ * .then((result) => {
478
+ * // Reference the context here so that it won't be GC'ed
479
+ * // until the measurement is complete.
480
+ * console.log(context.a);
481
+ * // {
482
+ * // total: {
483
+ * // jsMemoryEstimate: 2574732,
484
+ * // jsMemoryRange: [ 2574732, 2904372 ]
485
+ * // },
486
+ * // current: {
487
+ * // jsMemoryEstimate: 2438996,
488
+ * // jsMemoryRange: [ 2438996, 2768636 ]
489
+ * // },
490
+ * // other: [
491
+ * // {
492
+ * // jsMemoryEstimate: 135736,
493
+ * // jsMemoryRange: [ 135736, 465376 ]
494
+ * // }
495
+ * // ]
496
+ * // }
497
+ * console.log(result);
498
+ * });
499
+ * ```
500
+ * @since v13.10.0
149
501
  * @experimental
150
502
  */
151
503
  function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
152
504
  }
153
-
154
505
  declare module 'node:vm' {
155
506
  export * from 'vm';
156
507
  }
@@ -1,3 +1,75 @@
1
+ /**
2
+ * The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives sandboxed WebAssembly applications access to the
3
+ * underlying operating system via a collection of POSIX-like functions.
4
+ *
5
+ * ```js
6
+ * import { readFile } from 'fs/promises';
7
+ * import { WASI } from 'wasi';
8
+ * import { argv, env } from 'process';
9
+ *
10
+ * const wasi = new WASI({
11
+ * args: argv,
12
+ * env,
13
+ * preopens: {
14
+ * '/sandbox': '/some/real/path/that/wasm/can/access'
15
+ * }
16
+ * });
17
+ *
18
+ * // Some WASI binaries require:
19
+ * // const importObject = { wasi_unstable: wasi.wasiImport };
20
+ * const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
21
+ *
22
+ * const wasm = await WebAssembly.compile(
23
+ * await readFile(new URL('./demo.wasm', import.meta.url))
24
+ * );
25
+ * const instance = await WebAssembly.instantiate(wasm, importObject);
26
+ *
27
+ * wasi.start(instance);
28
+ * ```
29
+ *
30
+ * To run the above example, create a new WebAssembly text format file named`demo.wat`:
31
+ *
32
+ * ```text
33
+ * (module
34
+ * ;; Import the required fd_write WASI function which will write the given io vectors to stdout
35
+ * ;; The function signature for fd_write is:
36
+ * ;; (File Descriptor, *iovs, iovs_len, nwritten) -> Returns number of bytes written
37
+ * (import "wasi_snapshot_preview1" "fd_write" (func $fd_write (param i32 i32 i32 i32) (result i32)))
38
+ *
39
+ * (memory 1)
40
+ * (export "memory" (memory 0))
41
+ *
42
+ * ;; Write 'hello world\n' to memory at an offset of 8 bytes
43
+ * ;; Note the trailing newline which is required for the text to appear
44
+ * (data (i32.const 8) "hello world\n")
45
+ *
46
+ * (func $main (export "_start")
47
+ * ;; Creating a new io vector within linear memory
48
+ * (i32.store (i32.const 0) (i32.const 8)) ;; iov.iov_base - This is a pointer to the start of the 'hello world\n' string
49
+ * (i32.store (i32.const 4) (i32.const 12)) ;; iov.iov_len - The length of the 'hello world\n' string
50
+ *
51
+ * (call $fd_write
52
+ * (i32.const 1) ;; file_descriptor - 1 for stdout
53
+ * (i32.const 0) ;; *iovs - The pointer to the iov array, which is stored at memory location 0
54
+ * (i32.const 1) ;; iovs_len - We're printing 1 string stored in an iov - so one.
55
+ * (i32.const 20) ;; nwritten - A place in memory to store the number of bytes written
56
+ * )
57
+ * drop ;; Discard the number of bytes written from the top of the stack
58
+ * )
59
+ * )
60
+ * ```
61
+ *
62
+ * Use [wabt](https://github.com/WebAssembly/wabt) to compile `.wat` to `.wasm`
63
+ *
64
+ * ```console
65
+ * $ wat2wasm demo.wat
66
+ * ```
67
+ *
68
+ * The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
69
+ * example to run.
70
+ * @experimental
71
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/wasi.js)
72
+ */
1
73
  declare module 'wasi' {
2
74
  interface WASIOptions {
3
75
  /**
@@ -6,13 +78,11 @@ declare module 'wasi' {
6
78
  * WASI command itself.
7
79
  */
8
80
  args?: string[] | undefined;
9
-
10
81
  /**
11
82
  * An object similar to `process.env` that the WebAssembly
12
83
  * application will see as its environment.
13
84
  */
14
85
  env?: object | undefined;
15
-
16
86
  /**
17
87
  * This object represents the WebAssembly application's
18
88
  * sandbox directory structure. The string keys of `preopens` are treated as
@@ -20,7 +90,6 @@ declare module 'wasi' {
20
90
  * the real paths to those directories on the host machine.
21
91
  */
22
92
  preopens?: NodeJS.Dict<string> | undefined;
23
-
24
93
  /**
25
94
  * By default, WASI applications terminate the Node.js
26
95
  * process via the `__wasi_proc_exit()` function. Setting this option to `true`
@@ -29,62 +98,61 @@ declare module 'wasi' {
29
98
  * @default false
30
99
  */
31
100
  returnOnExit?: boolean | undefined;
32
-
33
101
  /**
34
102
  * The file descriptor used as standard input in the WebAssembly application.
35
103
  * @default 0
36
104
  */
37
105
  stdin?: number | undefined;
38
-
39
106
  /**
40
107
  * The file descriptor used as standard output in the WebAssembly application.
41
108
  * @default 1
42
109
  */
43
110
  stdout?: number | undefined;
44
-
45
111
  /**
46
112
  * The file descriptor used as standard error in the WebAssembly application.
47
113
  * @default 2
48
114
  */
49
115
  stderr?: number | undefined;
50
116
  }
51
-
117
+ /**
118
+ * The `WASI` class provides the WASI system call API and additional convenience
119
+ * methods for working with WASI-based applications. Each `WASI` instance
120
+ * represents a distinct sandbox environment. For security purposes, each `WASI`instance must have its command-line arguments, environment variables, and
121
+ * sandbox directory structure configured explicitly.
122
+ * @since v13.3.0, v12.16.0
123
+ */
52
124
  class WASI {
53
125
  constructor(options?: WASIOptions);
54
126
  /**
127
+ * Attempt to begin execution of `instance` as a WASI command by invoking its`_start()` export. If `instance` does not contain a `_start()` export, or if`instance` contains an `_initialize()`
128
+ * export, then an exception is thrown.
55
129
  *
56
- * Attempt to begin execution of `instance` by invoking its `_start()` export.
57
- * If `instance` does not contain a `_start()` export, then `start()` attempts to
58
- * invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
59
- * is present on `instance`, then `start()` does nothing.
60
- *
61
- * `start()` requires that `instance` exports a `WebAssembly.Memory` named
62
- * `memory`. If `instance` does not have a `memory` export an exception is thrown.
130
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
131
+ * `instance` does not have a `memory` export an exception is thrown.
63
132
  *
64
133
  * If `start()` is called more than once, an exception is thrown.
134
+ * @since v13.3.0, v12.16.0
65
135
  */
66
136
  start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
67
-
68
137
  /**
69
- * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
70
- * If `instance` contains a `_start()` export, then an exception is thrown.
138
+ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
71
139
  *
72
- * `start()` requires that `instance` exports a `WebAssembly.Memory` named
73
- * `memory`. If `instance` does not have a `memory` export an exception is thrown.
140
+ * `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
141
+ * If `instance` does not have a `memory` export an exception is thrown.
74
142
  *
75
143
  * If `initialize()` is called more than once, an exception is thrown.
144
+ * @since v14.6.0, v12.19.0
76
145
  */
77
146
  initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
78
-
79
147
  /**
80
- * Is an object that implements the WASI system call API. This object
81
- * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
82
- * `WebAssembly.Instance`.
148
+ * `wasiImport` is an object that implements the WASI system call API. This object
149
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation
150
+ * of a [`WebAssembly.Instance`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance).
151
+ * @since v13.3.0, v12.16.0
83
152
  */
84
153
  readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
85
154
  }
86
155
  }
87
-
88
156
  declare module 'node:wasi' {
89
157
  export * from 'wasi';
90
158
  }