cdk-ecr-deployment 2.5.6 → 2.5.22

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 (376) hide show
  1. package/.gitattributes +5 -4
  2. package/.jsii +673 -21
  3. package/.jsii.tabl.json +1 -0
  4. package/.projenrc.ts +100 -0
  5. package/API.md +4 -4
  6. package/README.md +4 -4
  7. package/lambda/go.mod +2 -5
  8. package/lambda/go.sum +39 -14
  9. package/lib/index.d.ts +7 -65
  10. package/lib/index.js +7 -45
  11. package/node_modules/@sindresorhus/is/dist/index.d.ts +12 -7
  12. package/node_modules/@sindresorhus/is/dist/index.js +9 -4
  13. package/node_modules/@sindresorhus/is/dist/types.d.ts +1 -0
  14. package/node_modules/@sindresorhus/is/package.json +1 -1
  15. package/node_modules/@sindresorhus/is/readme.md +25 -7
  16. package/node_modules/@types/cacheable-request/README.md +2 -2
  17. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  18. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +135 -75
  19. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +67 -38
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +226 -104
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +87 -58
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +29 -29
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -5
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +888 -256
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +16 -16
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +52 -8
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +27 -18
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +126 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +6 -5
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +166 -93
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +169 -70
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +301 -126
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +22 -13
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +453 -125
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +74 -46
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +103 -53
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +6 -2
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +20 -16
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +6 -4
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +114 -22
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +36 -14
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +15 -3
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +37 -26
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +96 -15
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +95 -82
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +1 -1
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +6 -6
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +145 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +51 -175
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +21 -21
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +2 -14
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +983 -824
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +6 -6
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +1154 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +26 -1
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +127 -6
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +149 -50
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +30 -9
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +116 -0
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  93. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  94. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  95. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  96. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  97. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  98. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  99. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  100. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  101. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +1154 -0
  102. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  103. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  104. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
  105. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  106. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  107. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  108. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
  109. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  110. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  111. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  112. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  113. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  114. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +11 -7
  115. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +66 -56
  116. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +528 -70
  117. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +271 -14
  118. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +421 -34
  119. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +15 -21
  120. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +81 -37
  121. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +11 -11
  122. package/node_modules/@types/cacheable-request/package.json +5 -5
  123. package/node_modules/@types/keyv/README.md +1 -1
  124. package/node_modules/@types/keyv/index.d.ts +16 -3
  125. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  126. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +135 -75
  127. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +67 -38
  128. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +226 -104
  129. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +87 -58
  130. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +29 -29
  131. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -5
  132. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +888 -256
  133. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +16 -16
  134. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
  135. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +52 -8
  136. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +27 -18
  137. package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +126 -0
  138. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +6 -5
  139. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +166 -93
  140. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +169 -70
  141. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +301 -126
  142. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +22 -13
  143. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +453 -125
  144. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +74 -46
  145. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +103 -53
  146. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +6 -2
  147. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +20 -16
  148. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +6 -4
  149. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +114 -22
  150. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +36 -14
  151. package/node_modules/@types/keyv/node_modules/@types/node/package.json +15 -3
  152. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +37 -26
  153. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +96 -15
  154. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +95 -82
  155. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +1 -1
  156. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +6 -6
  157. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +145 -0
  158. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +51 -175
  159. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +21 -21
  160. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +2 -14
  161. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +983 -824
  162. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +6 -6
  163. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +1154 -0
  164. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +26 -1
  165. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +127 -6
  166. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +149 -50
  167. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +30 -9
  168. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  169. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  170. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  171. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  172. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  173. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  174. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  175. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  176. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
  177. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  178. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  179. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  180. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  181. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  182. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  183. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  184. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  185. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  186. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  187. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  188. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  189. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  190. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  191. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  192. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  193. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +116 -0
  194. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  195. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  196. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  197. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  198. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  199. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  200. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  201. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  202. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  203. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  204. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  205. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  206. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  207. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  208. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  209. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +1154 -0
  210. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  211. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  212. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
  213. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  214. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  215. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  216. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
  217. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  218. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  219. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  220. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  221. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  222. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +11 -7
  223. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +66 -56
  224. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +528 -70
  225. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +271 -14
  226. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +421 -34
  227. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +15 -21
  228. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +81 -37
  229. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +11 -11
  230. package/node_modules/@types/keyv/package.json +3 -3
  231. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  232. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +135 -75
  233. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +67 -38
  234. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +226 -104
  235. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +87 -58
  236. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +29 -29
  237. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -5
  238. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +888 -256
  239. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +16 -16
  240. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +60 -21
  241. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +52 -8
  242. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +27 -18
  243. package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +126 -0
  244. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +6 -5
  245. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +166 -93
  246. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +169 -70
  247. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +301 -126
  248. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +22 -13
  249. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +453 -125
  250. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +74 -46
  251. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +103 -53
  252. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +6 -2
  253. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +20 -16
  254. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +6 -4
  255. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +114 -22
  256. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +36 -14
  257. package/node_modules/@types/responselike/node_modules/@types/node/package.json +15 -3
  258. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +37 -26
  259. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +96 -15
  260. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +95 -82
  261. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +1 -1
  262. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +6 -6
  263. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +145 -0
  264. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +51 -175
  265. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +21 -21
  266. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +2 -14
  267. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +983 -824
  268. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +6 -6
  269. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +1154 -0
  270. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +26 -1
  271. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +127 -6
  272. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +149 -50
  273. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +30 -9
  274. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  275. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
  276. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
  277. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/buffer.d.ts +2354 -0
  278. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
  279. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
  280. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  281. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  282. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +3969 -0
  283. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  284. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
  285. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
  286. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
  287. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  288. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  289. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +724 -0
  290. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
  291. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs.d.ts +4044 -0
  292. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
  293. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  294. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
  295. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
  296. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/https.d.ts +441 -0
  297. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  298. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
  299. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +116 -0
  300. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +888 -0
  301. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/os.d.ts +477 -0
  302. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  303. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
  304. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +1494 -0
  305. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  306. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  307. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
  308. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
  309. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  310. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  311. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  312. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  313. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
  314. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  315. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +1154 -0
  316. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
  317. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
  318. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
  319. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
  320. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tty.d.ts +208 -0
  321. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +901 -0
  322. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
  323. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
  324. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
  325. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
  326. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
  327. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  328. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +11 -7
  329. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +66 -56
  330. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +528 -70
  331. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +271 -14
  332. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +421 -34
  333. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +15 -21
  334. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +81 -37
  335. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +11 -11
  336. package/node_modules/cacheable-request/package.json +1 -1
  337. package/node_modules/clone-response/node_modules/mimic-response/index.js +32 -0
  338. package/node_modules/{get-stream → clone-response/node_modules/mimic-response}/license +1 -1
  339. package/node_modules/clone-response/node_modules/mimic-response/package.json +37 -0
  340. package/node_modules/clone-response/node_modules/mimic-response/readme.md +54 -0
  341. package/node_modules/clone-response/package.json +3 -6
  342. package/node_modules/got/dist/source/as-promise/index.js +1 -0
  343. package/node_modules/got/package.json +2 -1
  344. package/node_modules/http-cache-semantics/index.js +4 -3
  345. package/node_modules/http-cache-semantics/package.json +2 -8
  346. package/node_modules/keyv/README.md +141 -5
  347. package/node_modules/keyv/package.json +56 -50
  348. package/node_modules/keyv/src/index.d.ts +116 -0
  349. package/node_modules/keyv/src/index.js +179 -24
  350. package/node_modules/mimic-response/index.js +58 -13
  351. package/node_modules/mimic-response/license +1 -1
  352. package/node_modules/mimic-response/package.json +40 -35
  353. package/node_modules/mimic-response/readme.md +33 -9
  354. package/node_modules/responselike/package.json +3 -2
  355. package/package.json +54 -25
  356. package/rosetta/default.ts-fixture +17 -0
  357. package/changelog.md +0 -2
  358. package/node_modules/decompress-response/node_modules/mimic-response/index.js +0 -77
  359. package/node_modules/decompress-response/node_modules/mimic-response/package.json +0 -42
  360. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +0 -78
  361. package/node_modules/keyv/.nyc_output/37411020-4142-4b08-b825-343ba2427bf7.json +0 -1
  362. package/node_modules/keyv/.nyc_output/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +0 -1
  363. package/node_modules/keyv/.nyc_output/processinfo/37411020-4142-4b08-b825-343ba2427bf7.json +0 -1
  364. package/node_modules/keyv/.nyc_output/processinfo/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +0 -1
  365. package/node_modules/keyv/.nyc_output/processinfo/index.json +0 -1
  366. package/node_modules/keyv/test/test.js +0 -132
  367. package/node_modules/keyv/test/testdb.sqlite +0 -0
  368. package/releasetag.txt +0 -1
  369. package/version.txt +0 -1
  370. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/buffer-stream.js +0 -0
  371. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.d.ts +0 -0
  372. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/index.js +0 -0
  373. /package/node_modules/{decompress-response/node_modules/mimic-response → cacheable-request/node_modules/get-stream}/license +0 -0
  374. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/package.json +0 -0
  375. /package/node_modules/{get-stream → cacheable-request/node_modules/get-stream}/readme.md +0 -0
  376. /package/node_modules/{decompress-response/node_modules/mimic-response → mimic-response}/index.d.ts +0 -0
@@ -1,7 +1,9 @@
1
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.**
2
+ * The `node:vm` module enables compiling and running code within V8 Virtual
3
+ * Machine contexts.
4
+ *
5
+ * **The `node:vm` module is not a security**
6
+ * **mechanism. Do not use it to run untrusted code.**
5
7
  *
6
8
  * JavaScript code can be compiled and run immediately or
7
9
  * compiled, saved, and run later.
@@ -15,7 +17,7 @@
15
17
  * code are reflected in the context object.
16
18
  *
17
19
  * ```js
18
- * const vm = require('vm');
20
+ * const vm = require('node:vm');
19
21
  *
20
22
  * const x = 1;
21
23
  *
@@ -32,7 +34,7 @@
32
34
  *
33
35
  * console.log(x); // 1; y is not defined.
34
36
  * ```
35
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/vm.js)
37
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
36
38
  */
37
39
  declare module 'vm' {
38
40
  interface Context extends NodeJS.Dict<any> {}
@@ -54,11 +56,17 @@ declare module 'vm' {
54
56
  columnOffset?: number | undefined;
55
57
  }
56
58
  interface ScriptOptions extends BaseOptions {
57
- displayErrors?: boolean | undefined;
58
- timeout?: number | undefined;
59
- cachedData?: Buffer | undefined;
59
+ /**
60
+ * V8's code cache data for the supplied source.
61
+ */
62
+ cachedData?: Buffer | NodeJS.ArrayBufferView | undefined;
60
63
  /** @deprecated in favor of `script.createCachedData()` */
61
64
  produceCachedData?: boolean | undefined;
65
+ /**
66
+ * Called during evaluation of this module when `import()` is called.
67
+ * If this option is not specified, calls to `import()` will reject with `ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`.
68
+ */
69
+ importModuleDynamically?: ((specifier: string, script: Script, importAssertions: Object) => Module) | undefined;
62
70
  }
63
71
  interface RunningScriptOptions extends BaseOptions {
64
72
  /**
@@ -78,10 +86,31 @@ declare module 'vm' {
78
86
  * Default: `false`.
79
87
  */
80
88
  breakOnSigint?: boolean | undefined;
89
+ }
90
+ interface RunningScriptInNewContextOptions extends RunningScriptOptions {
91
+ /**
92
+ * Human-readable name of the newly created context.
93
+ */
94
+ contextName?: CreateContextOptions['name'];
95
+ /**
96
+ * Origin corresponding to the newly created context for display purposes. The origin should be formatted like a URL,
97
+ * but with only the scheme, host, and port (if necessary), like the value of the `url.origin` property of a `URL` object.
98
+ * Most notably, this string should omit the trailing slash, as that denotes a path.
99
+ */
100
+ contextOrigin?: CreateContextOptions['origin'];
101
+ contextCodeGeneration?: CreateContextOptions['codeGeneration'];
81
102
  /**
82
103
  * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
83
104
  */
84
- microtaskMode?: 'afterEvaluate' | undefined;
105
+ microtaskMode?: CreateContextOptions['microtaskMode'];
106
+ }
107
+ interface RunningCodeOptions extends RunningScriptOptions {
108
+ cachedData?: ScriptOptions['cachedData'];
109
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
110
+ }
111
+ interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
112
+ cachedData?: ScriptOptions['cachedData'];
113
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'];
85
114
  }
86
115
  interface CompileFunctionOptions extends BaseOptions {
87
116
  /**
@@ -142,7 +171,10 @@ declare module 'vm' {
142
171
  * @default 'summary'
143
172
  */
144
173
  mode?: MeasureMemoryMode | undefined;
145
- context?: Context | undefined;
174
+ /**
175
+ * @default 'default'
176
+ */
177
+ execution?: 'default' | 'eager' | undefined;
146
178
  }
147
179
  interface MemoryMeasurement {
148
180
  total: {
@@ -156,7 +188,7 @@ declare module 'vm' {
156
188
  * @since v0.3.1
157
189
  */
158
190
  class Script {
159
- constructor(code: string, options?: ScriptOptions);
191
+ constructor(code: string, options?: ScriptOptions | string);
160
192
  /**
161
193
  * 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
194
  * to local scope.
@@ -166,11 +198,11 @@ declare module 'vm' {
166
198
  * The globals are contained in the `context` object.
167
199
  *
168
200
  * ```js
169
- * const vm = require('vm');
201
+ * const vm = require('node:vm');
170
202
  *
171
203
  * const context = {
172
204
  * animal: 'cat',
173
- * count: 2
205
+ * count: 2,
174
206
  * };
175
207
  *
176
208
  * const script = new vm.Script('count += 1; name = "kitty";');
@@ -202,7 +234,7 @@ declare module 'vm' {
202
234
  * contained within each individual `context`.
203
235
  *
204
236
  * ```js
205
- * const vm = require('vm');
237
+ * const vm = require('node:vm');
206
238
  *
207
239
  * const script = new vm.Script('globalVar = "set"');
208
240
  *
@@ -218,16 +250,16 @@ declare module 'vm' {
218
250
  * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
219
251
  * @return the result of the very last statement executed in the script.
220
252
  */
221
- runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
253
+ runInNewContext(contextObject?: Context, options?: RunningScriptInNewContextOptions): any;
222
254
  /**
223
255
  * 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.
256
+ * current `global` object. Running code does not have access to local scope, but _does_ have access to the current `global` object.
225
257
  *
226
258
  * The following example compiles code that increments a `global` variable then
227
259
  * executes that code multiple times:
228
260
  *
229
261
  * ```js
230
- * const vm = require('vm');
262
+ * const vm = require('node:vm');
231
263
  *
232
264
  * global.globalVar = 0;
233
265
  *
@@ -249,6 +281,16 @@ declare module 'vm' {
249
281
  * 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
282
  * time and any number of times.
251
283
  *
284
+ * The code cache of the `Script` doesn't contain any JavaScript observable
285
+ * states. The code cache is safe to be saved along side the script source and
286
+ * used to construct new `Script` instances multiple times.
287
+ *
288
+ * Functions in the `Script` source can be marked as lazily compiled and they are
289
+ * not compiled at construction of the `Script`. These functions are going to be
290
+ * compiled when they are invoked the first time. The code cache serializes the
291
+ * metadata that V8 currently knows about the `Script` that it can use to speed up
292
+ * future compilations.
293
+ *
252
294
  * ```js
253
295
  * const script = new vm.Script(`
254
296
  * function add(a, b) {
@@ -258,19 +300,46 @@ declare module 'vm' {
258
300
  * const x = add(1, 2);
259
301
  * `);
260
302
  *
261
- * const cacheWithoutX = script.createCachedData();
303
+ * const cacheWithoutAdd = script.createCachedData();
304
+ * // In `cacheWithoutAdd` the function `add()` is marked for full compilation
305
+ * // upon invocation.
262
306
  *
263
307
  * script.runInThisContext();
264
308
  *
265
- * const cacheWithX = script.createCachedData();
309
+ * const cacheWithAdd = script.createCachedData();
310
+ * // `cacheWithAdd` contains fully compiled function `add()`.
266
311
  * ```
267
312
  * @since v10.6.0
268
313
  */
269
314
  createCachedData(): Buffer;
270
315
  /** @deprecated in favor of `script.createCachedData()` */
271
316
  cachedDataProduced?: boolean | undefined;
317
+ /**
318
+ * When `cachedData` is supplied to create the `vm.Script`, this value will be set
319
+ * to either `true` or `false` depending on acceptance of the data by V8\.
320
+ * Otherwise the value is `undefined`.
321
+ * @since v5.7.0
322
+ */
272
323
  cachedDataRejected?: boolean | undefined;
273
324
  cachedData?: Buffer | undefined;
325
+ /**
326
+ * When the script is compiled from a source that contains a source map magic
327
+ * comment, this property will be set to the URL of the source map.
328
+ *
329
+ * ```js
330
+ * import vm from 'node:vm';
331
+ *
332
+ * const script = new vm.Script(`
333
+ * function myFunc() {}
334
+ * //# sourceMappingURL=sourcemap.json
335
+ * `);
336
+ *
337
+ * console.log(script.sourceMapURL);
338
+ * // Prints: sourcemap.json
339
+ * ```
340
+ * @since v19.1.0, v18.13.0
341
+ */
342
+ sourceMapURL?: string | undefined;
274
343
  }
275
344
  /**
276
345
  * If given a `contextObject`, the `vm.createContext()` method will `prepare
@@ -280,7 +349,7 @@ declare module 'vm' {
280
349
  * will remain unchanged.
281
350
  *
282
351
  * ```js
283
- * const vm = require('vm');
352
+ * const vm = require('node:vm');
284
353
  *
285
354
  * global.globalVar = 3;
286
355
  *
@@ -327,7 +396,7 @@ declare module 'vm' {
327
396
  * The following example compiles and executes different scripts using a single `contextified` object:
328
397
  *
329
398
  * ```js
330
- * const vm = require('vm');
399
+ * const vm = require('node:vm');
331
400
  *
332
401
  * const contextObject = { globalVar: 1 };
333
402
  * vm.createContext(contextObject);
@@ -343,7 +412,7 @@ declare module 'vm' {
343
412
  * @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
344
413
  * @return the result of the very last statement executed in the script.
345
414
  */
346
- function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
415
+ function runInContext(code: string, contextifiedObject: Context, options?: RunningCodeOptions | string): any;
347
416
  /**
348
417
  * The `vm.runInNewContext()` first contextifies the given `contextObject` (or
349
418
  * creates a new `contextObject` if passed as `undefined`), compiles the `code`,
@@ -356,11 +425,11 @@ declare module 'vm' {
356
425
  * variable and sets a new one. These globals are contained in the `contextObject`.
357
426
  *
358
427
  * ```js
359
- * const vm = require('vm');
428
+ * const vm = require('node:vm');
360
429
  *
361
430
  * const contextObject = {
362
431
  * animal: 'cat',
363
- * count: 2
432
+ * count: 2,
364
433
  * };
365
434
  *
366
435
  * vm.runInNewContext('count += 1; name = "kitty"', contextObject);
@@ -372,7 +441,7 @@ declare module 'vm' {
372
441
  * @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
373
442
  * @return the result of the very last statement executed in the script.
374
443
  */
375
- function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
444
+ function runInNewContext(code: string, contextObject?: Context, options?: RunningCodeInNewContextOptions | string): any;
376
445
  /**
377
446
  * `vm.runInThisContext()` compiles `code`, runs it within the context of the
378
447
  * current `global` and returns the result. Running code does not have access to
@@ -384,7 +453,7 @@ declare module 'vm' {
384
453
  * the JavaScript [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) function to run the same code:
385
454
  *
386
455
  * ```js
387
- * const vm = require('vm');
456
+ * const vm = require('node:vm');
388
457
  * let localVar = 'initial value';
389
458
  *
390
459
  * const vmResult = vm.runInThisContext('localVar = "vm";');
@@ -405,17 +474,17 @@ declare module 'vm' {
405
474
  * When using either `script.runInThisContext()` or {@link runInThisContext}, the code is executed within the current V8 global
406
475
  * context. The code passed to this VM context will have its own isolated scope.
407
476
  *
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:
477
+ * In order to run a simple web server using the `node:http` module the code passed
478
+ * to the context must either call `require('node:http')` on its own, or have a
479
+ * reference to the `node:http` module passed to it. For instance:
411
480
  *
412
481
  * ```js
413
482
  * 'use strict';
414
- * const vm = require('vm');
483
+ * const vm = require('node:vm');
415
484
  *
416
485
  * const code = `
417
486
  * ((require) => {
418
- * const http = require('http');
487
+ * const http = require('node:http');
419
488
  *
420
489
  * http.createServer((request, response) => {
421
490
  * response.writeHead(200, { 'Content-Type': 'text/plain' });
@@ -435,7 +504,7 @@ declare module 'vm' {
435
504
  * @param code The JavaScript code to compile and run.
436
505
  * @return the result of the very last statement executed in the script.
437
506
  */
438
- function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
507
+ function runInThisContext(code: string, options?: RunningCodeOptions | string): any;
439
508
  /**
440
509
  * Compiles the given code into the provided context (if no context is
441
510
  * supplied, the current context is used), and returns it wrapped inside a
@@ -444,7 +513,15 @@ declare module 'vm' {
444
513
  * @param code The body of the function to compile.
445
514
  * @param params An array of strings containing all parameters for the function.
446
515
  */
447
- function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
516
+ function compileFunction(
517
+ code: string,
518
+ params?: ReadonlyArray<string>,
519
+ options?: CompileFunctionOptions
520
+ ): Function & {
521
+ cachedData?: Script['cachedData'] | undefined;
522
+ cachedDataProduced?: Script['cachedDataProduced'] | undefined;
523
+ cachedDataRejected?: Script['cachedDataRejected'] | undefined;
524
+ };
448
525
  /**
449
526
  * Measure the memory known to V8 and used by all contexts known to the
450
527
  * current V8 isolate, or the main context.
@@ -458,7 +535,7 @@ declare module 'vm' {
458
535
  * the memory occupied by each heap space in the current V8 instance.
459
536
  *
460
537
  * ```js
461
- * const vm = require('vm');
538
+ * const vm = require('node:vm');
462
539
  * // Measure the memory used by the main context.
463
540
  * vm.measureMemory({ mode: 'summary' })
464
541
  * // This is the same as vm.measureMemory()
@@ -501,6 +578,316 @@ declare module 'vm' {
501
578
  * @experimental
502
579
  */
503
580
  function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
581
+ interface ModuleEvaluateOptions {
582
+ timeout?: RunningScriptOptions['timeout'] | undefined;
583
+ breakOnSigint?: RunningScriptOptions['breakOnSigint'] | undefined;
584
+ }
585
+ type ModuleLinker = (
586
+ specifier: string,
587
+ referencingModule: Module,
588
+ extra: {
589
+ assert: Object;
590
+ }
591
+ ) => Module | Promise<Module>;
592
+ type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
593
+ /**
594
+ * This feature is only available with the `--experimental-vm-modules` command
595
+ * flag enabled.
596
+ *
597
+ * The `vm.Module` class provides a low-level interface for using
598
+ * ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
599
+ * s as defined in the ECMAScript
600
+ * specification.
601
+ *
602
+ * Unlike `vm.Script` however, every `vm.Module` object is bound to a context from
603
+ * its creation. Operations on `vm.Module` objects are intrinsically asynchronous,
604
+ * in contrast with the synchronous nature of `vm.Script` objects. The use of
605
+ * 'async' functions can help with manipulating `vm.Module` objects.
606
+ *
607
+ * Using a `vm.Module` object requires three distinct steps: creation/parsing,
608
+ * linking, and evaluation. These three steps are illustrated in the following
609
+ * example.
610
+ *
611
+ * This implementation lies at a lower level than the `ECMAScript Module
612
+ * loader`. There is also no way to interact with the Loader yet, though
613
+ * support is planned.
614
+ *
615
+ * ```js
616
+ * import vm from 'node:vm';
617
+ *
618
+ * const contextifiedObject = vm.createContext({
619
+ * secret: 42,
620
+ * print: console.log,
621
+ * });
622
+ *
623
+ * // Step 1
624
+ * //
625
+ * // Create a Module by constructing a new `vm.SourceTextModule` object. This
626
+ * // parses the provided source text, throwing a `SyntaxError` if anything goes
627
+ * // wrong. By default, a Module is created in the top context. But here, we
628
+ * // specify `contextifiedObject` as the context this Module belongs to.
629
+ * //
630
+ * // Here, we attempt to obtain the default export from the module "foo", and
631
+ * // put it into local binding "secret".
632
+ *
633
+ * const bar = new vm.SourceTextModule(`
634
+ * import s from 'foo';
635
+ * s;
636
+ * print(s);
637
+ * `, { context: contextifiedObject });
638
+ *
639
+ * // Step 2
640
+ * //
641
+ * // "Link" the imported dependencies of this Module to it.
642
+ * //
643
+ * // The provided linking callback (the "linker") accepts two arguments: the
644
+ * // parent module (`bar` in this case) and the string that is the specifier of
645
+ * // the imported module. The callback is expected to return a Module that
646
+ * // corresponds to the provided specifier, with certain requirements documented
647
+ * // in `module.link()`.
648
+ * //
649
+ * // If linking has not started for the returned Module, the same linker
650
+ * // callback will be called on the returned Module.
651
+ * //
652
+ * // Even top-level Modules without dependencies must be explicitly linked. The
653
+ * // callback provided would never be called, however.
654
+ * //
655
+ * // The link() method returns a Promise that will be resolved when all the
656
+ * // Promises returned by the linker resolve.
657
+ * //
658
+ * // Note: This is a contrived example in that the linker function creates a new
659
+ * // "foo" module every time it is called. In a full-fledged module system, a
660
+ * // cache would probably be used to avoid duplicated modules.
661
+ *
662
+ * async function linker(specifier, referencingModule) {
663
+ * if (specifier === 'foo') {
664
+ * return new vm.SourceTextModule(`
665
+ * // The "secret" variable refers to the global variable we added to
666
+ * // "contextifiedObject" when creating the context.
667
+ * export default secret;
668
+ * `, { context: referencingModule.context });
669
+ *
670
+ * // Using `contextifiedObject` instead of `referencingModule.context`
671
+ * // here would work as well.
672
+ * }
673
+ * throw new Error(`Unable to resolve dependency: ${specifier}`);
674
+ * }
675
+ * await bar.link(linker);
676
+ *
677
+ * // Step 3
678
+ * //
679
+ * // Evaluate the Module. The evaluate() method returns a promise which will
680
+ * // resolve after the module has finished evaluating.
681
+ *
682
+ * // Prints 42.
683
+ * await bar.evaluate();
684
+ * ```
685
+ * @since v13.0.0, v12.16.0
686
+ * @experimental
687
+ */
688
+ class Module {
689
+ /**
690
+ * The specifiers of all dependencies of this module. The returned array is frozen
691
+ * to disallow any changes to it.
692
+ *
693
+ * Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
694
+ * the ECMAScript specification.
695
+ */
696
+ dependencySpecifiers: readonly string[];
697
+ /**
698
+ * If the `module.status` is `'errored'`, this property contains the exception
699
+ * thrown by the module during evaluation. If the status is anything else,
700
+ * accessing this property will result in a thrown exception.
701
+ *
702
+ * The value `undefined` cannot be used for cases where there is not a thrown
703
+ * exception due to possible ambiguity with `throw undefined;`.
704
+ *
705
+ * Corresponds to the `[[EvaluationError]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s
706
+ * in the ECMAScript specification.
707
+ */
708
+ error: any;
709
+ /**
710
+ * The identifier of the current module, as set in the constructor.
711
+ */
712
+ identifier: string;
713
+ context: Context;
714
+ /**
715
+ * The namespace object of the module. This is only available after linking
716
+ * (`module.link()`) has completed.
717
+ *
718
+ * Corresponds to the [GetModuleNamespace](https://tc39.es/ecma262/#sec-getmodulenamespace) abstract operation in the ECMAScript
719
+ * specification.
720
+ */
721
+ namespace: Object;
722
+ /**
723
+ * The current status of the module. Will be one of:
724
+ *
725
+ * * `'unlinked'`: `module.link()` has not yet been called.
726
+ * * `'linking'`: `module.link()` has been called, but not all Promises returned
727
+ * by the linker function have been resolved yet.
728
+ * * `'linked'`: The module has been linked successfully, and all of its
729
+ * dependencies are linked, but `module.evaluate()` has not yet been called.
730
+ * * `'evaluating'`: The module is being evaluated through a `module.evaluate()` on
731
+ * itself or a parent module.
732
+ * * `'evaluated'`: The module has been successfully evaluated.
733
+ * * `'errored'`: The module has been evaluated, but an exception was thrown.
734
+ *
735
+ * Other than `'errored'`, this status string corresponds to the specification's [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)'s `[[Status]]` field. `'errored'`
736
+ * corresponds to`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
737
+ * value that is not `undefined`.
738
+ */
739
+ status: ModuleStatus;
740
+ /**
741
+ * Evaluate the module.
742
+ *
743
+ * This must be called after the module has been linked; otherwise it will reject.
744
+ * It could be called also when the module has already been evaluated, in which
745
+ * case it will either do nothing if the initial evaluation ended in success
746
+ * (`module.status` is `'evaluated'`) or it will re-throw the exception that the
747
+ * initial evaluation resulted in (`module.status` is `'errored'`).
748
+ *
749
+ * This method cannot be called while the module is being evaluated
750
+ * (`module.status` is `'evaluating'`).
751
+ *
752
+ * Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the
753
+ * ECMAScript specification.
754
+ * @return Fulfills with `undefined` upon success.
755
+ */
756
+ evaluate(options?: ModuleEvaluateOptions): Promise<void>;
757
+ /**
758
+ * Link module dependencies. This method must be called before evaluation, and
759
+ * can only be called once per module.
760
+ *
761
+ * The function is expected to return a `Module` object or a `Promise` that
762
+ * eventually resolves to a `Module` object. The returned `Module` must satisfy the
763
+ * following two invariants:
764
+ *
765
+ * * It must belong to the same context as the parent `Module`.
766
+ * * Its `status` must not be `'errored'`.
767
+ *
768
+ * If the returned `Module`'s `status` is `'unlinked'`, this method will be
769
+ * recursively called on the returned `Module` with the same provided `linker`function.
770
+ *
771
+ * `link()` returns a `Promise` that will either get resolved when all linking
772
+ * instances resolve to a valid `Module`, or rejected if the linker function either
773
+ * throws an exception or returns an invalid `Module`.
774
+ *
775
+ * The linker function roughly corresponds to the implementation-defined [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) abstract operation in the
776
+ * ECMAScript
777
+ * specification, with a few key differences:
778
+ *
779
+ * * The linker function is allowed to be asynchronous while [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) is synchronous.
780
+ *
781
+ * The actual [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation used during module
782
+ * linking is one that returns the modules linked during linking. Since at
783
+ * that point all modules would have been fully linked already, the [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation is fully synchronous per
784
+ * specification.
785
+ *
786
+ * Corresponds to the [Link() concrete method](https://tc39.es/ecma262/#sec-moduledeclarationlinking) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
787
+ * the ECMAScript specification.
788
+ */
789
+ link(linker: ModuleLinker): Promise<void>;
790
+ }
791
+ interface SourceTextModuleOptions {
792
+ /**
793
+ * String used in stack traces.
794
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
795
+ */
796
+ identifier?: string | undefined;
797
+ cachedData?: ScriptOptions['cachedData'] | undefined;
798
+ context?: Context | undefined;
799
+ lineOffset?: BaseOptions['lineOffset'] | undefined;
800
+ columnOffset?: BaseOptions['columnOffset'] | undefined;
801
+ /**
802
+ * Called during evaluation of this module to initialize the `import.meta`.
803
+ */
804
+ initializeImportMeta?: ((meta: ImportMeta, module: SourceTextModule) => void) | undefined;
805
+ importModuleDynamically?: ScriptOptions['importModuleDynamically'] | undefined;
806
+ }
807
+ /**
808
+ * This feature is only available with the `--experimental-vm-modules` command
809
+ * flag enabled.
810
+ *
811
+ *
812
+ *
813
+ * The `vm.SourceTextModule` class provides the [Source Text Module Record](https://tc39.es/ecma262/#sec-source-text-module-records) as
814
+ * defined in the ECMAScript specification.
815
+ * @since v9.6.0
816
+ * @experimental
817
+ */
818
+ class SourceTextModule extends Module {
819
+ /**
820
+ * Creates a new `SourceTextModule` instance.
821
+ * @param code JavaScript Module code to parse
822
+ */
823
+ constructor(code: string, options?: SourceTextModuleOptions);
824
+ }
825
+ interface SyntheticModuleOptions {
826
+ /**
827
+ * String used in stack traces.
828
+ * @default 'vm:module(i)' where i is a context-specific ascending index.
829
+ */
830
+ identifier?: string | undefined;
831
+ /**
832
+ * The contextified object as returned by the `vm.createContext()` method, to compile and evaluate this module in.
833
+ */
834
+ context?: Context | undefined;
835
+ }
836
+ /**
837
+ * This feature is only available with the `--experimental-vm-modules` command
838
+ * flag enabled.
839
+ *
840
+ *
841
+ *
842
+ * The `vm.SyntheticModule` class provides the [Synthetic Module Record](https://heycam.github.io/webidl/#synthetic-module-records) as
843
+ * defined in the WebIDL specification. The purpose of synthetic modules is to
844
+ * provide a generic interface for exposing non-JavaScript sources to ECMAScript
845
+ * module graphs.
846
+ *
847
+ * ```js
848
+ * const vm = require('node:vm');
849
+ *
850
+ * const source = '{ "a": 1 }';
851
+ * const module = new vm.SyntheticModule(['default'], function() {
852
+ * const obj = JSON.parse(source);
853
+ * this.setExport('default', obj);
854
+ * });
855
+ *
856
+ * // Use `module` in linking...
857
+ * ```
858
+ * @since v13.0.0, v12.16.0
859
+ * @experimental
860
+ */
861
+ class SyntheticModule extends Module {
862
+ /**
863
+ * Creates a new `SyntheticModule` instance.
864
+ * @param exportNames Array of names that will be exported from the module.
865
+ * @param evaluateCallback Called when the module is evaluated.
866
+ */
867
+ constructor(exportNames: string[], evaluateCallback: (this: SyntheticModule) => void, options?: SyntheticModuleOptions);
868
+ /**
869
+ * This method is used after the module is linked to set the values of exports. If
870
+ * it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error
871
+ * will be thrown.
872
+ *
873
+ * ```js
874
+ * import vm from 'node:vm';
875
+ *
876
+ * const m = new vm.SyntheticModule(['x'], () => {
877
+ * m.setExport('x', 1);
878
+ * });
879
+ *
880
+ * await m.link(() => {});
881
+ * await m.evaluate();
882
+ *
883
+ * assert.strictEqual(m.namespace.x, 1);
884
+ * ```
885
+ * @since v13.0.0, v12.16.0
886
+ * @param name Name of the export to set.
887
+ * @param value The value to set the export to.
888
+ */
889
+ setExport(name: string, value: any): void;
890
+ }
504
891
  }
505
892
  declare module 'node:vm' {
506
893
  export * from 'vm';