cdk-ecr-deployment 0.0.75 → 0.0.81

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 (357) hide show
  1. package/.gitattributes +20 -21
  2. package/.jsii +43 -35
  3. package/lambda/Dockerfile +25 -0
  4. package/lambda/install.js +64 -0
  5. package/lib/index.js +40 -23
  6. package/node_modules/@sindresorhus/is/dist/index.d.ts +225 -0
  7. package/node_modules/@sindresorhus/is/dist/index.js +427 -0
  8. package/node_modules/@sindresorhus/is/dist/types.d.ts +24 -0
  9. package/node_modules/@sindresorhus/is/dist/types.js +3 -0
  10. package/node_modules/@sindresorhus/is/license +9 -0
  11. package/node_modules/@sindresorhus/is/package.json +96 -0
  12. package/node_modules/@sindresorhus/is/readme.md +628 -0
  13. package/node_modules/@szmarczak/http-timer/LICENSE +21 -0
  14. package/node_modules/@szmarczak/http-timer/README.md +93 -0
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
  16. package/node_modules/@szmarczak/http-timer/dist/source/index.js +126 -0
  17. package/node_modules/@szmarczak/http-timer/package.json +72 -0
  18. package/node_modules/@types/cacheable-request/LICENSE +21 -0
  19. package/node_modules/@types/cacheable-request/README.md +16 -0
  20. package/node_modules/@types/cacheable-request/index.d.ts +137 -0
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +21 -0
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +16 -0
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +8 -0
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +912 -0
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +497 -0
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2142 -0
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1366 -0
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +414 -0
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +412 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +18 -0
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3307 -0
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +545 -0
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +368 -0
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +654 -0
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +169 -0
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +623 -0
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1091 -0
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3784 -0
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +284 -0
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +1 -0
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1369 -0
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2100 -0
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +391 -0
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +131 -0
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2745 -0
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +114 -0
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +783 -0
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +455 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +230 -0
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +172 -0
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +555 -0
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1481 -0
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +117 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +131 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +543 -0
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +424 -0
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +42 -0
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +1249 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +67 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +68 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +94 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1019 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +161 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +204 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +821 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1594 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +378 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +507 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +158 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +649 -0
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +517 -0
  75. package/node_modules/@types/cacheable-request/package.json +35 -0
  76. package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
  77. package/node_modules/@types/http-cache-semantics/README.md +16 -0
  78. package/node_modules/@types/http-cache-semantics/index.d.ts +170 -0
  79. package/node_modules/@types/http-cache-semantics/package.json +25 -0
  80. package/node_modules/@types/keyv/LICENSE +21 -0
  81. package/node_modules/@types/keyv/README.md +16 -0
  82. package/node_modules/@types/keyv/index.d.ts +77 -0
  83. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +21 -0
  84. package/node_modules/@types/keyv/node_modules/@types/node/README.md +16 -0
  85. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +8 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +912 -0
  87. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +497 -0
  88. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2142 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1366 -0
  90. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +414 -0
  91. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +412 -0
  92. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +18 -0
  93. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3307 -0
  94. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +545 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +368 -0
  97. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +654 -0
  98. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +169 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +623 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1091 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3784 -0
  102. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +284 -0
  103. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +1 -0
  104. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1369 -0
  105. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2100 -0
  106. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +391 -0
  107. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +131 -0
  108. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2745 -0
  109. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +114 -0
  110. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +783 -0
  111. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +455 -0
  112. package/node_modules/@types/keyv/node_modules/@types/node/package.json +230 -0
  113. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +172 -0
  114. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +555 -0
  115. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1481 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +117 -0
  117. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +131 -0
  118. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +543 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +424 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +42 -0
  122. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
  123. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +1249 -0
  124. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +67 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +68 -0
  126. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +94 -0
  127. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1019 -0
  128. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +161 -0
  129. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +204 -0
  130. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +821 -0
  131. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1594 -0
  132. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +378 -0
  133. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +507 -0
  134. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +158 -0
  135. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +649 -0
  136. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +517 -0
  137. package/node_modules/@types/keyv/package.json +32 -0
  138. package/node_modules/@types/responselike/LICENSE +21 -0
  139. package/node_modules/@types/responselike/README.md +16 -0
  140. package/node_modules/@types/responselike/index.d.ts +34 -0
  141. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +21 -0
  142. package/node_modules/@types/responselike/node_modules/@types/node/README.md +16 -0
  143. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +8 -0
  144. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +912 -0
  145. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +497 -0
  146. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2142 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1366 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +414 -0
  149. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +412 -0
  150. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +18 -0
  151. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3307 -0
  152. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +545 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +134 -0
  154. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +368 -0
  155. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +654 -0
  156. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +169 -0
  157. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +623 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1091 -0
  159. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3784 -0
  160. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +284 -0
  161. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +1 -0
  162. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1369 -0
  163. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2100 -0
  164. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +391 -0
  165. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +131 -0
  166. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2745 -0
  167. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +114 -0
  168. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +783 -0
  169. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +455 -0
  170. package/node_modules/@types/responselike/node_modules/@types/node/package.json +230 -0
  171. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +172 -0
  172. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +555 -0
  173. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1481 -0
  174. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +117 -0
  175. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +131 -0
  176. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +543 -0
  177. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +424 -0
  178. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
  179. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +42 -0
  180. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
  181. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +1249 -0
  182. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +67 -0
  183. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +68 -0
  184. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +94 -0
  185. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1019 -0
  186. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +161 -0
  187. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +204 -0
  188. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +821 -0
  189. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1594 -0
  190. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +378 -0
  191. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +507 -0
  192. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +158 -0
  193. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +649 -0
  194. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +517 -0
  195. package/node_modules/@types/responselike/package.json +25 -0
  196. package/node_modules/cacheable-lookup/LICENSE +21 -0
  197. package/node_modules/cacheable-lookup/README.md +240 -0
  198. package/node_modules/cacheable-lookup/index.d.ts +139 -0
  199. package/node_modules/cacheable-lookup/package.json +45 -0
  200. package/node_modules/cacheable-lookup/source/index.js +436 -0
  201. package/node_modules/cacheable-request/LICENSE +21 -0
  202. package/node_modules/cacheable-request/README.md +206 -0
  203. package/node_modules/cacheable-request/package.json +56 -0
  204. package/node_modules/cacheable-request/src/index.js +251 -0
  205. package/node_modules/clone-response/LICENSE +21 -0
  206. package/node_modules/clone-response/README.md +62 -0
  207. package/node_modules/clone-response/package.json +44 -0
  208. package/node_modules/clone-response/src/index.js +17 -0
  209. package/node_modules/decompress-response/index.d.ts +22 -0
  210. package/node_modules/decompress-response/index.js +58 -0
  211. package/node_modules/decompress-response/license +9 -0
  212. package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
  213. package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
  214. package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
  215. package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
  216. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
  217. package/node_modules/decompress-response/package.json +56 -0
  218. package/node_modules/decompress-response/readme.md +48 -0
  219. package/node_modules/defer-to-connect/LICENSE +21 -0
  220. package/node_modules/defer-to-connect/README.md +38 -0
  221. package/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
  222. package/node_modules/defer-to-connect/dist/source/index.js +47 -0
  223. package/node_modules/defer-to-connect/package.json +71 -0
  224. package/node_modules/end-of-stream/LICENSE +21 -0
  225. package/node_modules/end-of-stream/README.md +54 -0
  226. package/node_modules/end-of-stream/index.js +94 -0
  227. package/node_modules/end-of-stream/package.json +37 -0
  228. package/node_modules/get-stream/buffer-stream.js +52 -0
  229. package/node_modules/get-stream/index.d.ts +108 -0
  230. package/node_modules/get-stream/index.js +60 -0
  231. package/node_modules/get-stream/license +9 -0
  232. package/node_modules/get-stream/package.json +50 -0
  233. package/node_modules/get-stream/readme.md +124 -0
  234. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +2 -0
  235. package/node_modules/got/dist/source/as-promise/create-rejection.js +30 -0
  236. package/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
  237. package/node_modules/got/dist/source/as-promise/index.js +175 -0
  238. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +3 -0
  239. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +78 -0
  240. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +3 -0
  241. package/node_modules/got/dist/source/as-promise/parse-body.js +25 -0
  242. package/node_modules/got/dist/source/as-promise/types.d.ts +256 -0
  243. package/node_modules/got/dist/source/as-promise/types.js +40 -0
  244. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +5 -0
  245. package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
  246. package/node_modules/got/dist/source/core/index.d.ts +1124 -0
  247. package/node_modules/got/dist/source/core/index.js +1491 -0
  248. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
  249. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +17 -0
  250. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
  251. package/node_modules/got/dist/source/core/utils/get-body-size.js +32 -0
  252. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +4 -0
  253. package/node_modules/got/dist/source/core/utils/get-buffer.js +16 -0
  254. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
  255. package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
  256. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +2 -0
  257. package/node_modules/got/dist/source/core/utils/is-response-ok.js +8 -0
  258. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +14 -0
  259. package/node_modules/got/dist/source/core/utils/options-to-url.js +53 -0
  260. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
  261. package/node_modules/got/dist/source/core/utils/proxy-events.js +17 -0
  262. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +29 -0
  263. package/node_modules/got/dist/source/core/utils/timed-out.js +121 -0
  264. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
  265. package/node_modules/got/dist/source/core/utils/unhandle.js +22 -0
  266. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
  267. package/node_modules/got/dist/source/core/utils/url-to-options.js +24 -0
  268. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
  269. package/node_modules/got/dist/source/core/utils/weakable-map.js +29 -0
  270. package/node_modules/got/dist/source/create.d.ts +5 -0
  271. package/node_modules/got/dist/source/create.js +240 -0
  272. package/node_modules/got/dist/source/index.d.ts +4 -0
  273. package/node_modules/got/dist/source/index.js +132 -0
  274. package/node_modules/got/dist/source/types.d.ts +342 -0
  275. package/node_modules/got/dist/source/types.js +2 -0
  276. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +1 -0
  277. package/node_modules/got/dist/source/utils/deep-freeze.js +12 -0
  278. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +2 -0
  279. package/node_modules/got/dist/source/utils/deprecation-warning.js +13 -0
  280. package/node_modules/got/license +9 -0
  281. package/node_modules/got/package.json +130 -0
  282. package/node_modules/got/readme.md +2476 -0
  283. package/node_modules/http-cache-semantics/LICENSE +9 -0
  284. package/node_modules/http-cache-semantics/README.md +203 -0
  285. package/node_modules/http-cache-semantics/index.js +673 -0
  286. package/node_modules/http-cache-semantics/package.json +24 -0
  287. package/node_modules/http2-wrapper/LICENSE +21 -0
  288. package/node_modules/http2-wrapper/README.md +470 -0
  289. package/node_modules/http2-wrapper/package.json +54 -0
  290. package/node_modules/http2-wrapper/source/agent.js +670 -0
  291. package/node_modules/http2-wrapper/source/auto.js +149 -0
  292. package/node_modules/http2-wrapper/source/client-request.js +445 -0
  293. package/node_modules/http2-wrapper/source/incoming-message.js +58 -0
  294. package/node_modules/http2-wrapper/source/index.js +28 -0
  295. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +27 -0
  296. package/node_modules/http2-wrapper/source/utils/errors.js +45 -0
  297. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
  298. package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
  299. package/node_modules/http2-wrapper/source/utils/url-to-options.js +25 -0
  300. package/node_modules/json-buffer/.travis.yml +3 -0
  301. package/node_modules/json-buffer/LICENSE +22 -0
  302. package/node_modules/json-buffer/README.md +24 -0
  303. package/node_modules/json-buffer/index.js +58 -0
  304. package/node_modules/json-buffer/package.json +34 -0
  305. package/node_modules/json-buffer/test/index.js +63 -0
  306. package/node_modules/keyv/LICENSE +21 -0
  307. package/node_modules/keyv/README.md +288 -0
  308. package/node_modules/keyv/package.json +49 -0
  309. package/node_modules/keyv/src/index.js +111 -0
  310. package/node_modules/lowercase-keys/index.d.ts +16 -0
  311. package/node_modules/lowercase-keys/index.js +10 -0
  312. package/node_modules/lowercase-keys/license +9 -0
  313. package/node_modules/lowercase-keys/package.json +38 -0
  314. package/node_modules/lowercase-keys/readme.md +32 -0
  315. package/node_modules/mimic-response/index.js +32 -0
  316. package/node_modules/mimic-response/license +9 -0
  317. package/node_modules/mimic-response/package.json +37 -0
  318. package/node_modules/mimic-response/readme.md +54 -0
  319. package/node_modules/normalize-url/index.d.ts +267 -0
  320. package/node_modules/normalize-url/index.js +216 -0
  321. package/node_modules/normalize-url/license +9 -0
  322. package/node_modules/normalize-url/package.json +50 -0
  323. package/node_modules/normalize-url/readme.md +286 -0
  324. package/node_modules/once/LICENSE +15 -0
  325. package/node_modules/once/README.md +79 -0
  326. package/node_modules/once/once.js +42 -0
  327. package/node_modules/once/package.json +33 -0
  328. package/node_modules/p-cancelable/index.d.ts +176 -0
  329. package/node_modules/p-cancelable/index.js +111 -0
  330. package/node_modules/p-cancelable/license +9 -0
  331. package/node_modules/p-cancelable/package.json +49 -0
  332. package/node_modules/p-cancelable/readme.md +153 -0
  333. package/node_modules/pump/.travis.yml +5 -0
  334. package/node_modules/pump/LICENSE +21 -0
  335. package/node_modules/pump/README.md +65 -0
  336. package/node_modules/pump/index.js +82 -0
  337. package/node_modules/pump/package.json +24 -0
  338. package/node_modules/pump/test-browser.js +66 -0
  339. package/node_modules/pump/test-node.js +53 -0
  340. package/node_modules/quick-lru/index.d.ts +97 -0
  341. package/node_modules/quick-lru/index.js +123 -0
  342. package/node_modules/quick-lru/license +9 -0
  343. package/node_modules/quick-lru/package.json +43 -0
  344. package/node_modules/quick-lru/readme.md +111 -0
  345. package/node_modules/resolve-alpn/LICENSE +22 -0
  346. package/node_modules/resolve-alpn/README.md +60 -0
  347. package/node_modules/resolve-alpn/index.js +43 -0
  348. package/node_modules/resolve-alpn/package.json +34 -0
  349. package/node_modules/responselike/LICENSE +19 -0
  350. package/node_modules/responselike/README.md +77 -0
  351. package/node_modules/responselike/package.json +38 -0
  352. package/node_modules/responselike/src/index.js +34 -0
  353. package/node_modules/wrappy/LICENSE +15 -0
  354. package/node_modules/wrappy/README.md +36 -0
  355. package/node_modules/wrappy/package.json +29 -0
  356. package/node_modules/wrappy/wrappy.js +33 -0
  357. package/package.json +41 -38
@@ -0,0 +1,507 @@
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
+ */
37
+ declare module 'vm' {
38
+ interface Context extends NodeJS.Dict<any> {}
39
+ interface BaseOptions {
40
+ /**
41
+ * Specifies the filename used in stack traces produced by this script.
42
+ * Default: `''`.
43
+ */
44
+ filename?: string | undefined;
45
+ /**
46
+ * Specifies the line number offset that is displayed in stack traces produced by this script.
47
+ * Default: `0`.
48
+ */
49
+ lineOffset?: number | undefined;
50
+ /**
51
+ * Specifies the column number offset that is displayed in stack traces produced by this script.
52
+ * @default 0
53
+ */
54
+ columnOffset?: number | undefined;
55
+ }
56
+ interface ScriptOptions extends BaseOptions {
57
+ displayErrors?: boolean | undefined;
58
+ timeout?: number | undefined;
59
+ cachedData?: Buffer | undefined;
60
+ /** @deprecated in favor of `script.createCachedData()` */
61
+ produceCachedData?: boolean | undefined;
62
+ }
63
+ interface RunningScriptOptions extends BaseOptions {
64
+ /**
65
+ * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
66
+ * Default: `true`.
67
+ */
68
+ displayErrors?: boolean | undefined;
69
+ /**
70
+ * Specifies the number of milliseconds to execute code before terminating execution.
71
+ * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
72
+ */
73
+ timeout?: number | undefined;
74
+ /**
75
+ * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
76
+ * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
77
+ * If execution is terminated, an `Error` will be thrown.
78
+ * Default: `false`.
79
+ */
80
+ breakOnSigint?: boolean | undefined;
81
+ /**
82
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
83
+ */
84
+ microtaskMode?: 'afterEvaluate' | undefined;
85
+ }
86
+ interface CompileFunctionOptions extends BaseOptions {
87
+ /**
88
+ * Provides an optional data with V8's code cache data for the supplied source.
89
+ */
90
+ cachedData?: Buffer | undefined;
91
+ /**
92
+ * Specifies whether to produce new cache data.
93
+ * Default: `false`,
94
+ */
95
+ produceCachedData?: boolean | undefined;
96
+ /**
97
+ * The sandbox/context in which the said function should be compiled in.
98
+ */
99
+ parsingContext?: Context | undefined;
100
+ /**
101
+ * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
102
+ */
103
+ contextExtensions?: Object[] | undefined;
104
+ }
105
+ interface CreateContextOptions {
106
+ /**
107
+ * Human-readable name of the newly created context.
108
+ * @default 'VM Context i' Where i is an ascending numerical index of the created context.
109
+ */
110
+ name?: string | undefined;
111
+ /**
112
+ * Corresponds to the newly created context for display purposes.
113
+ * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
114
+ * like the value of the `url.origin` property of a URL object.
115
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
116
+ * @default ''
117
+ */
118
+ origin?: string | 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;
134
+ /**
135
+ * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
136
+ */
137
+ microtaskMode?: 'afterEvaluate' | undefined;
138
+ }
139
+ type MeasureMemoryMode = 'summary' | 'detailed';
140
+ interface MeasureMemoryOptions {
141
+ /**
142
+ * @default 'summary'
143
+ */
144
+ mode?: MeasureMemoryMode | undefined;
145
+ context?: Context | undefined;
146
+ }
147
+ interface MemoryMeasurement {
148
+ total: {
149
+ jsMemoryEstimate: number;
150
+ jsMemoryRange: [number, number];
151
+ };
152
+ }
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
+ */
158
+ class Script {
159
+ constructor(code: string, options?: ScriptOptions);
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
+ */
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
+ */
269
+ createCachedData(): Buffer;
270
+ /** @deprecated in favor of `script.createCachedData()` */
271
+ cachedDataProduced?: boolean | undefined;
272
+ cachedDataRejected?: boolean | undefined;
273
+ cachedData?: Buffer | undefined;
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
+ */
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
+ */
318
+ function isContext(sandbox: Context): boolean;
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
+ */
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
+ */
447
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
448
+ /**
449
+ * Measure the memory known to V8 and used by all contexts known to the
450
+ * current V8 isolate, or the main context.
451
+ *
452
+ * The format of the object that the returned Promise may resolve with is
453
+ * specific to the V8 engine and may change from one version of V8 to the next.
454
+ *
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
+ * });
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
501
+ * @experimental
502
+ */
503
+ function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
504
+ }
505
+ declare module 'node:vm' {
506
+ export * from 'vm';
507
+ }
@@ -0,0 +1,158 @@
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
+ */
73
+ declare module 'wasi' {
74
+ interface WASIOptions {
75
+ /**
76
+ * An array of strings that the WebAssembly application will
77
+ * see as command line arguments. The first argument is the virtual path to the
78
+ * WASI command itself.
79
+ */
80
+ args?: string[] | undefined;
81
+ /**
82
+ * An object similar to `process.env` that the WebAssembly
83
+ * application will see as its environment.
84
+ */
85
+ env?: object | undefined;
86
+ /**
87
+ * This object represents the WebAssembly application's
88
+ * sandbox directory structure. The string keys of `preopens` are treated as
89
+ * directories within the sandbox. The corresponding values in `preopens` are
90
+ * the real paths to those directories on the host machine.
91
+ */
92
+ preopens?: NodeJS.Dict<string> | undefined;
93
+ /**
94
+ * By default, WASI applications terminate the Node.js
95
+ * process via the `__wasi_proc_exit()` function. Setting this option to `true`
96
+ * causes `wasi.start()` to return the exit code rather than terminate the
97
+ * process.
98
+ * @default false
99
+ */
100
+ returnOnExit?: boolean | undefined;
101
+ /**
102
+ * The file descriptor used as standard input in the WebAssembly application.
103
+ * @default 0
104
+ */
105
+ stdin?: number | undefined;
106
+ /**
107
+ * The file descriptor used as standard output in the WebAssembly application.
108
+ * @default 1
109
+ */
110
+ stdout?: number | undefined;
111
+ /**
112
+ * The file descriptor used as standard error in the WebAssembly application.
113
+ * @default 2
114
+ */
115
+ stderr?: number | undefined;
116
+ }
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
+ */
124
+ class WASI {
125
+ constructor(options?: WASIOptions);
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.
129
+ *
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.
132
+ *
133
+ * If `start()` is called more than once, an exception is thrown.
134
+ * @since v13.3.0, v12.16.0
135
+ */
136
+ start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
137
+ /**
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.
139
+ *
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.
142
+ *
143
+ * If `initialize()` is called more than once, an exception is thrown.
144
+ * @since v14.6.0, v12.19.0
145
+ */
146
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
147
+ /**
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
152
+ */
153
+ readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
154
+ }
155
+ }
156
+ declare module 'node:wasi' {
157
+ export * from 'wasi';
158
+ }