cdk-ecr-deployment 0.0.76 → 0.0.79

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 (356) hide show
  1. package/.jsii +28 -25
  2. package/lambda/Dockerfile +25 -0
  3. package/lambda/install.js +64 -0
  4. package/lib/index.js +40 -23
  5. package/node_modules/@sindresorhus/is/dist/index.d.ts +225 -0
  6. package/node_modules/@sindresorhus/is/dist/index.js +427 -0
  7. package/node_modules/@sindresorhus/is/dist/types.d.ts +24 -0
  8. package/node_modules/@sindresorhus/is/dist/types.js +3 -0
  9. package/node_modules/@sindresorhus/is/license +9 -0
  10. package/node_modules/@sindresorhus/is/package.json +96 -0
  11. package/node_modules/@sindresorhus/is/readme.md +628 -0
  12. package/node_modules/@szmarczak/http-timer/LICENSE +21 -0
  13. package/node_modules/@szmarczak/http-timer/README.md +93 -0
  14. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.js +126 -0
  16. package/node_modules/@szmarczak/http-timer/package.json +72 -0
  17. package/node_modules/@types/cacheable-request/LICENSE +21 -0
  18. package/node_modules/@types/cacheable-request/README.md +16 -0
  19. package/node_modules/@types/cacheable-request/index.d.ts +137 -0
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +21 -0
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +16 -0
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +8 -0
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +912 -0
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +497 -0
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2142 -0
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1365 -0
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +414 -0
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +412 -0
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +18 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3307 -0
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +545 -0
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +357 -0
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +643 -0
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +169 -0
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +623 -0
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1004 -0
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3748 -0
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +284 -0
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +1 -0
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1368 -0
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2100 -0
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +391 -0
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +131 -0
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2738 -0
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +114 -0
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +783 -0
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +455 -0
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +230 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +172 -0
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +555 -0
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1477 -0
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +117 -0
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +131 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +542 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +424 -0
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +42 -0
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +1249 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +67 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +68 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +94 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1019 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +161 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +204 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +798 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1563 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +378 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +507 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +158 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +649 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +517 -0
  74. package/node_modules/@types/cacheable-request/package.json +35 -0
  75. package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
  76. package/node_modules/@types/http-cache-semantics/README.md +16 -0
  77. package/node_modules/@types/http-cache-semantics/index.d.ts +170 -0
  78. package/node_modules/@types/http-cache-semantics/package.json +25 -0
  79. package/node_modules/@types/keyv/LICENSE +21 -0
  80. package/node_modules/@types/keyv/README.md +16 -0
  81. package/node_modules/@types/keyv/index.d.ts +77 -0
  82. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +21 -0
  83. package/node_modules/@types/keyv/node_modules/@types/node/README.md +16 -0
  84. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +8 -0
  85. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +912 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +497 -0
  87. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2142 -0
  88. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1365 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +414 -0
  90. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +412 -0
  91. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +18 -0
  92. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3307 -0
  93. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +545 -0
  94. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +357 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +643 -0
  97. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +169 -0
  98. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +623 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1004 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3748 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +284 -0
  102. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +1 -0
  103. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1368 -0
  104. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2100 -0
  105. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +391 -0
  106. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +131 -0
  107. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2738 -0
  108. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +114 -0
  109. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +783 -0
  110. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +455 -0
  111. package/node_modules/@types/keyv/node_modules/@types/node/package.json +230 -0
  112. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +172 -0
  113. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +555 -0
  114. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1477 -0
  115. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +117 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +131 -0
  117. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +542 -0
  118. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +424 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +42 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
  122. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +1249 -0
  123. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +67 -0
  124. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +68 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +94 -0
  126. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1019 -0
  127. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +161 -0
  128. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +204 -0
  129. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +798 -0
  130. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1563 -0
  131. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +378 -0
  132. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +507 -0
  133. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +158 -0
  134. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +649 -0
  135. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +517 -0
  136. package/node_modules/@types/keyv/package.json +32 -0
  137. package/node_modules/@types/responselike/LICENSE +21 -0
  138. package/node_modules/@types/responselike/README.md +16 -0
  139. package/node_modules/@types/responselike/index.d.ts +34 -0
  140. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +21 -0
  141. package/node_modules/@types/responselike/node_modules/@types/node/README.md +16 -0
  142. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +8 -0
  143. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +912 -0
  144. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +497 -0
  145. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2142 -0
  146. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1365 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +414 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +412 -0
  149. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +18 -0
  150. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3307 -0
  151. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +545 -0
  152. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +357 -0
  154. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +643 -0
  155. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +169 -0
  156. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +623 -0
  157. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1004 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3748 -0
  159. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +284 -0
  160. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +1 -0
  161. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1368 -0
  162. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2100 -0
  163. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +391 -0
  164. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +131 -0
  165. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2738 -0
  166. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +114 -0
  167. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +783 -0
  168. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +455 -0
  169. package/node_modules/@types/responselike/node_modules/@types/node/package.json +230 -0
  170. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +172 -0
  171. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +555 -0
  172. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1477 -0
  173. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +117 -0
  174. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +131 -0
  175. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +542 -0
  176. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +424 -0
  177. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
  178. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +42 -0
  179. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
  180. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +1249 -0
  181. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +67 -0
  182. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +68 -0
  183. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +94 -0
  184. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1019 -0
  185. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +161 -0
  186. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +204 -0
  187. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +798 -0
  188. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1563 -0
  189. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +378 -0
  190. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +507 -0
  191. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +158 -0
  192. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +649 -0
  193. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +517 -0
  194. package/node_modules/@types/responselike/package.json +25 -0
  195. package/node_modules/cacheable-lookup/LICENSE +21 -0
  196. package/node_modules/cacheable-lookup/README.md +240 -0
  197. package/node_modules/cacheable-lookup/index.d.ts +139 -0
  198. package/node_modules/cacheable-lookup/package.json +45 -0
  199. package/node_modules/cacheable-lookup/source/index.js +436 -0
  200. package/node_modules/cacheable-request/LICENSE +21 -0
  201. package/node_modules/cacheable-request/README.md +206 -0
  202. package/node_modules/cacheable-request/package.json +56 -0
  203. package/node_modules/cacheable-request/src/index.js +251 -0
  204. package/node_modules/clone-response/LICENSE +21 -0
  205. package/node_modules/clone-response/README.md +62 -0
  206. package/node_modules/clone-response/package.json +44 -0
  207. package/node_modules/clone-response/src/index.js +17 -0
  208. package/node_modules/decompress-response/index.d.ts +22 -0
  209. package/node_modules/decompress-response/index.js +58 -0
  210. package/node_modules/decompress-response/license +9 -0
  211. package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
  212. package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
  213. package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
  214. package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
  215. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
  216. package/node_modules/decompress-response/package.json +56 -0
  217. package/node_modules/decompress-response/readme.md +48 -0
  218. package/node_modules/defer-to-connect/LICENSE +21 -0
  219. package/node_modules/defer-to-connect/README.md +38 -0
  220. package/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
  221. package/node_modules/defer-to-connect/dist/source/index.js +47 -0
  222. package/node_modules/defer-to-connect/package.json +71 -0
  223. package/node_modules/end-of-stream/LICENSE +21 -0
  224. package/node_modules/end-of-stream/README.md +54 -0
  225. package/node_modules/end-of-stream/index.js +94 -0
  226. package/node_modules/end-of-stream/package.json +37 -0
  227. package/node_modules/get-stream/buffer-stream.js +52 -0
  228. package/node_modules/get-stream/index.d.ts +108 -0
  229. package/node_modules/get-stream/index.js +60 -0
  230. package/node_modules/get-stream/license +9 -0
  231. package/node_modules/get-stream/package.json +50 -0
  232. package/node_modules/get-stream/readme.md +124 -0
  233. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +2 -0
  234. package/node_modules/got/dist/source/as-promise/create-rejection.js +30 -0
  235. package/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
  236. package/node_modules/got/dist/source/as-promise/index.js +175 -0
  237. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +3 -0
  238. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +78 -0
  239. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +3 -0
  240. package/node_modules/got/dist/source/as-promise/parse-body.js +25 -0
  241. package/node_modules/got/dist/source/as-promise/types.d.ts +256 -0
  242. package/node_modules/got/dist/source/as-promise/types.js +40 -0
  243. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +5 -0
  244. package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
  245. package/node_modules/got/dist/source/core/index.d.ts +1124 -0
  246. package/node_modules/got/dist/source/core/index.js +1491 -0
  247. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
  248. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +17 -0
  249. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
  250. package/node_modules/got/dist/source/core/utils/get-body-size.js +32 -0
  251. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +4 -0
  252. package/node_modules/got/dist/source/core/utils/get-buffer.js +16 -0
  253. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
  254. package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
  255. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +2 -0
  256. package/node_modules/got/dist/source/core/utils/is-response-ok.js +8 -0
  257. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +14 -0
  258. package/node_modules/got/dist/source/core/utils/options-to-url.js +53 -0
  259. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
  260. package/node_modules/got/dist/source/core/utils/proxy-events.js +17 -0
  261. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +29 -0
  262. package/node_modules/got/dist/source/core/utils/timed-out.js +121 -0
  263. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
  264. package/node_modules/got/dist/source/core/utils/unhandle.js +22 -0
  265. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
  266. package/node_modules/got/dist/source/core/utils/url-to-options.js +24 -0
  267. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
  268. package/node_modules/got/dist/source/core/utils/weakable-map.js +29 -0
  269. package/node_modules/got/dist/source/create.d.ts +5 -0
  270. package/node_modules/got/dist/source/create.js +240 -0
  271. package/node_modules/got/dist/source/index.d.ts +4 -0
  272. package/node_modules/got/dist/source/index.js +132 -0
  273. package/node_modules/got/dist/source/types.d.ts +342 -0
  274. package/node_modules/got/dist/source/types.js +2 -0
  275. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +1 -0
  276. package/node_modules/got/dist/source/utils/deep-freeze.js +12 -0
  277. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +2 -0
  278. package/node_modules/got/dist/source/utils/deprecation-warning.js +13 -0
  279. package/node_modules/got/license +9 -0
  280. package/node_modules/got/package.json +130 -0
  281. package/node_modules/got/readme.md +2476 -0
  282. package/node_modules/http-cache-semantics/LICENSE +9 -0
  283. package/node_modules/http-cache-semantics/README.md +203 -0
  284. package/node_modules/http-cache-semantics/index.js +673 -0
  285. package/node_modules/http-cache-semantics/package.json +24 -0
  286. package/node_modules/http2-wrapper/LICENSE +21 -0
  287. package/node_modules/http2-wrapper/README.md +470 -0
  288. package/node_modules/http2-wrapper/package.json +54 -0
  289. package/node_modules/http2-wrapper/source/agent.js +670 -0
  290. package/node_modules/http2-wrapper/source/auto.js +149 -0
  291. package/node_modules/http2-wrapper/source/client-request.js +445 -0
  292. package/node_modules/http2-wrapper/source/incoming-message.js +58 -0
  293. package/node_modules/http2-wrapper/source/index.js +28 -0
  294. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +27 -0
  295. package/node_modules/http2-wrapper/source/utils/errors.js +45 -0
  296. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
  297. package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
  298. package/node_modules/http2-wrapper/source/utils/url-to-options.js +25 -0
  299. package/node_modules/json-buffer/.travis.yml +3 -0
  300. package/node_modules/json-buffer/LICENSE +22 -0
  301. package/node_modules/json-buffer/README.md +24 -0
  302. package/node_modules/json-buffer/index.js +58 -0
  303. package/node_modules/json-buffer/package.json +34 -0
  304. package/node_modules/json-buffer/test/index.js +63 -0
  305. package/node_modules/keyv/LICENSE +21 -0
  306. package/node_modules/keyv/README.md +288 -0
  307. package/node_modules/keyv/package.json +49 -0
  308. package/node_modules/keyv/src/index.js +111 -0
  309. package/node_modules/lowercase-keys/index.d.ts +16 -0
  310. package/node_modules/lowercase-keys/index.js +10 -0
  311. package/node_modules/lowercase-keys/license +9 -0
  312. package/node_modules/lowercase-keys/package.json +38 -0
  313. package/node_modules/lowercase-keys/readme.md +32 -0
  314. package/node_modules/mimic-response/index.js +32 -0
  315. package/node_modules/mimic-response/license +9 -0
  316. package/node_modules/mimic-response/package.json +37 -0
  317. package/node_modules/mimic-response/readme.md +54 -0
  318. package/node_modules/normalize-url/index.d.ts +267 -0
  319. package/node_modules/normalize-url/index.js +216 -0
  320. package/node_modules/normalize-url/license +9 -0
  321. package/node_modules/normalize-url/package.json +50 -0
  322. package/node_modules/normalize-url/readme.md +286 -0
  323. package/node_modules/once/LICENSE +15 -0
  324. package/node_modules/once/README.md +79 -0
  325. package/node_modules/once/once.js +42 -0
  326. package/node_modules/once/package.json +33 -0
  327. package/node_modules/p-cancelable/index.d.ts +176 -0
  328. package/node_modules/p-cancelable/index.js +111 -0
  329. package/node_modules/p-cancelable/license +9 -0
  330. package/node_modules/p-cancelable/package.json +49 -0
  331. package/node_modules/p-cancelable/readme.md +153 -0
  332. package/node_modules/pump/.travis.yml +5 -0
  333. package/node_modules/pump/LICENSE +21 -0
  334. package/node_modules/pump/README.md +65 -0
  335. package/node_modules/pump/index.js +82 -0
  336. package/node_modules/pump/package.json +24 -0
  337. package/node_modules/pump/test-browser.js +66 -0
  338. package/node_modules/pump/test-node.js +53 -0
  339. package/node_modules/quick-lru/index.d.ts +97 -0
  340. package/node_modules/quick-lru/index.js +123 -0
  341. package/node_modules/quick-lru/license +9 -0
  342. package/node_modules/quick-lru/package.json +43 -0
  343. package/node_modules/quick-lru/readme.md +111 -0
  344. package/node_modules/resolve-alpn/LICENSE +22 -0
  345. package/node_modules/resolve-alpn/README.md +60 -0
  346. package/node_modules/resolve-alpn/index.js +43 -0
  347. package/node_modules/resolve-alpn/package.json +34 -0
  348. package/node_modules/responselike/LICENSE +19 -0
  349. package/node_modules/responselike/README.md +77 -0
  350. package/node_modules/responselike/package.json +38 -0
  351. package/node_modules/responselike/src/index.js +34 -0
  352. package/node_modules/wrappy/LICENSE +15 -0
  353. package/node_modules/wrappy/README.md +36 -0
  354. package/node_modules/wrappy/package.json +29 -0
  355. package/node_modules/wrappy/wrappy.js +33 -0
  356. package/package.json +7 -4
@@ -0,0 +1,1004 @@
1
+ /**
2
+ * The `fs/promises` API provides asynchronous file system methods that return
3
+ * promises.
4
+ *
5
+ * The promise APIs use the underlying Node.js threadpool to perform file
6
+ * system operations off the event loop thread. These operations are not
7
+ * synchronized or threadsafe. Care must be taken when performing multiple
8
+ * concurrent modifications on the same file or data corruption may occur.
9
+ * @since v10.0.0
10
+ */
11
+ declare module 'fs/promises' {
12
+ import { Abortable } from 'node:events';
13
+ import { Stream } from 'node:stream';
14
+ import {
15
+ Stats,
16
+ BigIntStats,
17
+ StatOptions,
18
+ WriteVResult,
19
+ ReadVResult,
20
+ PathLike,
21
+ RmDirOptions,
22
+ RmOptions,
23
+ MakeDirectoryOptions,
24
+ Dirent,
25
+ OpenDirOptions,
26
+ Dir,
27
+ ObjectEncodingOptions,
28
+ BufferEncodingOption,
29
+ OpenMode,
30
+ Mode,
31
+ WatchOptions,
32
+ WatchEventType,
33
+ CopyOptions,
34
+ } from 'node:fs';
35
+ interface FileChangeInfo<T extends string | Buffer> {
36
+ eventType: WatchEventType;
37
+ filename: T;
38
+ }
39
+ interface FlagAndOpenMode {
40
+ mode?: Mode | undefined;
41
+ flag?: OpenMode | undefined;
42
+ }
43
+ interface FileReadResult<T extends ArrayBufferView> {
44
+ bytesRead: number;
45
+ buffer: T;
46
+ }
47
+ interface FileReadOptions<T extends ArrayBufferView = Buffer> {
48
+ /**
49
+ * @default `Buffer.alloc(0xffff)`
50
+ */
51
+ buffer?: T;
52
+ /**
53
+ * @default 0
54
+ */
55
+ offset?: number | null;
56
+ /**
57
+ * @default `buffer.byteLength`
58
+ */
59
+ length?: number | null;
60
+ position?: number | null;
61
+ }
62
+ // TODO: Add `EventEmitter` close
63
+ interface FileHandle {
64
+ /**
65
+ * The numeric file descriptor managed by the {FileHandle} object.
66
+ * @since v10.0.0
67
+ */
68
+ readonly fd: number;
69
+ /**
70
+ * Alias of `filehandle.writeFile()`.
71
+ *
72
+ * When operating on file handles, the mode cannot be changed from what it was set
73
+ * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
74
+ * @since v10.0.0
75
+ * @return Fulfills with `undefined` upon success.
76
+ */
77
+ appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
78
+ /**
79
+ * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
80
+ * @since v10.0.0
81
+ * @param uid The file's new owner's user id.
82
+ * @param gid The file's new group's group id.
83
+ * @return Fulfills with `undefined` upon success.
84
+ */
85
+ chown(uid: number, gid: number): Promise<void>;
86
+ /**
87
+ * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
88
+ * @since v10.0.0
89
+ * @param mode the file mode bit mask.
90
+ * @return Fulfills with `undefined` upon success.
91
+ */
92
+ chmod(mode: Mode): Promise<void>;
93
+ /**
94
+ * Forces all currently queued I/O operations associated with the file to the
95
+ * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
96
+ *
97
+ * Unlike `filehandle.sync` this method does not flush modified metadata.
98
+ * @since v10.0.0
99
+ * @return Fulfills with `undefined` upon success.
100
+ */
101
+ datasync(): Promise<void>;
102
+ /**
103
+ * Request that all data for the open file descriptor is flushed to the storage
104
+ * device. The specific implementation is operating system and device specific.
105
+ * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
106
+ * @since v10.0.0
107
+ * @return Fufills with `undefined` upon success.
108
+ */
109
+ sync(): Promise<void>;
110
+ /**
111
+ * Reads data from the file and stores that in the given buffer.
112
+ *
113
+ * If the file is not modified concurrently, the end-of-file is reached when the
114
+ * number of bytes read is zero.
115
+ * @since v10.0.0
116
+ * @param buffer A buffer that will be filled with the file data read.
117
+ * @param offset The location in the buffer at which to start filling.
118
+ * @param length The number of bytes to read.
119
+ * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
120
+ * integer, the current file position will remain unchanged.
121
+ * @return Fulfills upon success with an object with two properties:
122
+ */
123
+ read<T extends ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
124
+ read<T extends ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
125
+ /**
126
+ * Asynchronously reads the entire contents of a file.
127
+ *
128
+ * If `options` is a string, then it specifies the `encoding`.
129
+ *
130
+ * The `FileHandle` has to support reading.
131
+ *
132
+ * If one or more `filehandle.read()` calls are made on a file handle and then a`filehandle.readFile()` call is made, the data will be read from the current
133
+ * position till the end of the file. It doesn't always read from the beginning
134
+ * of the file.
135
+ * @since v10.0.0
136
+ * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the
137
+ * data will be a string.
138
+ */
139
+ readFile(
140
+ options?: {
141
+ encoding?: null | undefined;
142
+ flag?: OpenMode | undefined;
143
+ } | null
144
+ ): Promise<Buffer>;
145
+ /**
146
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
147
+ * The `FileHandle` must have been opened for reading.
148
+ * @param options An object that may contain an optional flag.
149
+ * If a flag is not provided, it defaults to `'r'`.
150
+ */
151
+ readFile(
152
+ options:
153
+ | {
154
+ encoding: BufferEncoding;
155
+ flag?: OpenMode | undefined;
156
+ }
157
+ | BufferEncoding
158
+ ): Promise<string>;
159
+ /**
160
+ * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
161
+ * The `FileHandle` must have been opened for reading.
162
+ * @param options An object that may contain an optional flag.
163
+ * If a flag is not provided, it defaults to `'r'`.
164
+ */
165
+ readFile(
166
+ options?:
167
+ | (ObjectEncodingOptions & {
168
+ flag?: OpenMode | undefined;
169
+ })
170
+ | BufferEncoding
171
+ | null
172
+ ): Promise<string | Buffer>;
173
+ /**
174
+ * @since v10.0.0
175
+ * @return Fulfills with an {fs.Stats} for the file.
176
+ */
177
+ stat(
178
+ opts?: StatOptions & {
179
+ bigint?: false | undefined;
180
+ }
181
+ ): Promise<Stats>;
182
+ stat(
183
+ opts: StatOptions & {
184
+ bigint: true;
185
+ }
186
+ ): Promise<BigIntStats>;
187
+ stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
188
+ /**
189
+ * Truncates the file.
190
+ *
191
+ * If the file was larger than `len` bytes, only the first `len` bytes will be
192
+ * retained in the file.
193
+ *
194
+ * The following example retains only the first four bytes of the file:
195
+ *
196
+ * ```js
197
+ * import { open } from 'fs/promises';
198
+ *
199
+ * let filehandle = null;
200
+ * try {
201
+ * filehandle = await open('temp.txt', 'r+');
202
+ * await filehandle.truncate(4);
203
+ * } finally {
204
+ * await filehandle?.close();
205
+ * }
206
+ * ```
207
+ *
208
+ * If the file previously was shorter than `len` bytes, it is extended, and the
209
+ * extended part is filled with null bytes (`'\0'`):
210
+ *
211
+ * If `len` is negative then `0` will be used.
212
+ * @since v10.0.0
213
+ * @param [len=0]
214
+ * @return Fulfills with `undefined` upon success.
215
+ */
216
+ truncate(len?: number): Promise<void>;
217
+ /**
218
+ * Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
219
+ * @since v10.0.0
220
+ */
221
+ utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
222
+ /**
223
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
224
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
225
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object, or an
226
+ * object with an own `toString` function
227
+ * property. The promise is resolved with no arguments upon success.
228
+ *
229
+ * If `options` is a string, then it specifies the `encoding`.
230
+ *
231
+ * The `FileHandle` has to support writing.
232
+ *
233
+ * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
234
+ * without waiting for the promise to be resolved (or rejected).
235
+ *
236
+ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the
237
+ * current position till the end of the file. It doesn't always write from the
238
+ * beginning of the file.
239
+ * @since v10.0.0
240
+ */
241
+ writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
242
+ /**
243
+ * Write `buffer` to the file.
244
+ *
245
+ * If `buffer` is a plain object, it must have an own (not inherited) `toString`function property.
246
+ *
247
+ * The promise is resolved with an object containing two properties:
248
+ *
249
+ * It is unsafe to use `filehandle.write()` multiple times on the same file
250
+ * without waiting for the promise to be resolved (or rejected). For this
251
+ * scenario, use `fs.createWriteStream()`.
252
+ *
253
+ * On Linux, positional writes do not work when the file is opened in append mode.
254
+ * The kernel ignores the position argument and always appends the data to
255
+ * the end of the file.
256
+ * @since v10.0.0
257
+ * @param [offset=0] The start position from within `buffer` where the data to write begins.
258
+ * @param [length=buffer.byteLength] The number of bytes from `buffer` to write.
259
+ * @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
260
+ * See the POSIX pwrite(2) documentation for more detail.
261
+ */
262
+ write<TBuffer extends Uint8Array>(
263
+ buffer: TBuffer,
264
+ offset?: number | null,
265
+ length?: number | null,
266
+ position?: number | null
267
+ ): Promise<{
268
+ bytesWritten: number;
269
+ buffer: TBuffer;
270
+ }>;
271
+ write(
272
+ data: string,
273
+ position?: number | null,
274
+ encoding?: BufferEncoding | null
275
+ ): Promise<{
276
+ bytesWritten: number;
277
+ buffer: string;
278
+ }>;
279
+ /**
280
+ * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
281
+ *
282
+ * The promise is resolved with an object containing a two properties:
283
+ *
284
+ * It is unsafe to call `writev()` multiple times on the same file without waiting
285
+ * for the promise to be resolved (or rejected).
286
+ *
287
+ * On Linux, positional writes don't work when the file is opened in append mode.
288
+ * The kernel ignores the position argument and always appends the data to
289
+ * the end of the file.
290
+ * @since v12.9.0
291
+ * @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
292
+ * position.
293
+ */
294
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
295
+ /**
296
+ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
297
+ * @since v13.13.0, v12.17.0
298
+ * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
299
+ * @return Fulfills upon success an object containing two properties:
300
+ */
301
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
302
+ /**
303
+ * Closes the file handle after waiting for any pending operation on the handle to
304
+ * complete.
305
+ *
306
+ * ```js
307
+ * import { open } from 'fs/promises';
308
+ *
309
+ * let filehandle;
310
+ * try {
311
+ * filehandle = await open('thefile.txt', 'r');
312
+ * } finally {
313
+ * await filehandle?.close();
314
+ * }
315
+ * ```
316
+ * @since v10.0.0
317
+ * @return Fulfills with `undefined` upon success.
318
+ */
319
+ close(): Promise<void>;
320
+ }
321
+ /**
322
+ * Tests a user's permissions for the file or directory specified by `path`.
323
+ * The `mode` argument is an optional integer that specifies the accessibility
324
+ * checks to be performed. Check `File access constants` for possible values
325
+ * of `mode`. It is possible to create a mask consisting of the bitwise OR of
326
+ * two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).
327
+ *
328
+ * If the accessibility check is successful, the promise is resolved with no
329
+ * value. If any of the accessibility checks fail, the promise is rejected
330
+ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
331
+ * written by the current process.
332
+ *
333
+ * ```js
334
+ * import { access } from 'fs/promises';
335
+ * import { constants } from 'fs';
336
+ *
337
+ * try {
338
+ * await access('/etc/passwd', constants.R_OK | constants.W_OK);
339
+ * console.log('can access');
340
+ * } catch {
341
+ * console.error('cannot access');
342
+ * }
343
+ * ```
344
+ *
345
+ * Using `fsPromises.access()` to check for the accessibility of a file before
346
+ * calling `fsPromises.open()` is not recommended. Doing so introduces a race
347
+ * condition, since other processes may change the file's state between the two
348
+ * calls. Instead, user code should open/read/write the file directly and handle
349
+ * the error raised if the file is not accessible.
350
+ * @since v10.0.0
351
+ * @param [mode=fs.constants.F_OK]
352
+ * @return Fulfills with `undefined` upon success.
353
+ */
354
+ function access(path: PathLike, mode?: number): Promise<void>;
355
+ /**
356
+ * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
357
+ * already exists.
358
+ *
359
+ * No guarantees are made about the atomicity of the copy operation. If an
360
+ * error occurs after the destination file has been opened for writing, an attempt
361
+ * will be made to remove the destination.
362
+ *
363
+ * ```js
364
+ * import { constants } from 'fs';
365
+ * import { copyFile } from 'fs/promises';
366
+ *
367
+ * try {
368
+ * await copyFile('source.txt', 'destination.txt');
369
+ * console.log('source.txt was copied to destination.txt');
370
+ * } catch {
371
+ * console.log('The file could not be copied');
372
+ * }
373
+ *
374
+ * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
375
+ * try {
376
+ * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
377
+ * console.log('source.txt was copied to destination.txt');
378
+ * } catch {
379
+ * console.log('The file could not be copied');
380
+ * }
381
+ * ```
382
+ * @since v10.0.0
383
+ * @param src source filename to copy
384
+ * @param dest destination filename of the copy operation
385
+ * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g.
386
+ * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
387
+ * @return Fulfills with `undefined` upon success.
388
+ */
389
+ function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
390
+ /**
391
+ * Opens a `FileHandle`.
392
+ *
393
+ * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
394
+ *
395
+ * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
396
+ * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
397
+ * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
398
+ * @since v10.0.0
399
+ * @param [flags='r'] See `support of file system `flags``.
400
+ * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
401
+ * @return Fulfills with a {FileHandle} object.
402
+ */
403
+ function open(path: PathLike, flags: string | number, mode?: Mode): Promise<FileHandle>;
404
+ /**
405
+ * Renames `oldPath` to `newPath`.
406
+ * @since v10.0.0
407
+ * @return Fulfills with `undefined` upon success.
408
+ */
409
+ function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
410
+ /**
411
+ * Truncates (shortens or extends the length) of the content at `path` to `len`bytes.
412
+ * @since v10.0.0
413
+ * @param [len=0]
414
+ * @return Fulfills with `undefined` upon success.
415
+ */
416
+ function truncate(path: PathLike, len?: number): Promise<void>;
417
+ /**
418
+ * Removes the directory identified by `path`.
419
+ *
420
+ * Using `fsPromises.rmdir()` on a file (not a directory) results in the
421
+ * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR`error on POSIX.
422
+ *
423
+ * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
424
+ * @since v10.0.0
425
+ * @return Fulfills with `undefined` upon success.
426
+ */
427
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
428
+ /**
429
+ * Removes files and directories (modeled on the standard POSIX `rm` utility).
430
+ * @since v14.14.0
431
+ * @return Fulfills with `undefined` upon success.
432
+ */
433
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
434
+ /**
435
+ * Asynchronously creates a directory.
436
+ *
437
+ * The optional `options` argument can be an integer specifying `mode` (permission
438
+ * and sticky bits), or an object with a `mode` property and a `recursive`property indicating whether parent directories should be created. Calling`fsPromises.mkdir()` when `path` is a directory
439
+ * that exists results in a
440
+ * rejection only when `recursive` is false.
441
+ * @since v10.0.0
442
+ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
443
+ */
444
+ function mkdir(
445
+ path: PathLike,
446
+ options: MakeDirectoryOptions & {
447
+ recursive: true;
448
+ }
449
+ ): Promise<string | undefined>;
450
+ /**
451
+ * Asynchronous mkdir(2) - create a directory.
452
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
453
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
454
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
455
+ */
456
+ function mkdir(
457
+ path: PathLike,
458
+ options?:
459
+ | Mode
460
+ | (MakeDirectoryOptions & {
461
+ recursive?: false | undefined;
462
+ })
463
+ | null
464
+ ): Promise<void>;
465
+ /**
466
+ * Asynchronous mkdir(2) - create a directory.
467
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
468
+ * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
469
+ * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
470
+ */
471
+ function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
472
+ /**
473
+ * Reads the contents of a directory.
474
+ *
475
+ * The optional `options` argument can be a string specifying an encoding, or an
476
+ * object with an `encoding` property specifying the character encoding to use for
477
+ * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
478
+ * will be passed as `Buffer` objects.
479
+ *
480
+ * If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
481
+ *
482
+ * ```js
483
+ * import { readdir } from 'fs/promises';
484
+ *
485
+ * try {
486
+ * const files = await readdir(path);
487
+ * for (const file of files)
488
+ * console.log(file);
489
+ * } catch (err) {
490
+ * console.error(err);
491
+ * }
492
+ * ```
493
+ * @since v10.0.0
494
+ * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
495
+ */
496
+ function readdir(
497
+ path: PathLike,
498
+ options?:
499
+ | (ObjectEncodingOptions & {
500
+ withFileTypes?: false | undefined;
501
+ })
502
+ | BufferEncoding
503
+ | null
504
+ ): Promise<string[]>;
505
+ /**
506
+ * Asynchronous readdir(3) - read a directory.
507
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
508
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
509
+ */
510
+ function readdir(
511
+ path: PathLike,
512
+ options:
513
+ | {
514
+ encoding: 'buffer';
515
+ withFileTypes?: false | undefined;
516
+ }
517
+ | 'buffer'
518
+ ): Promise<Buffer[]>;
519
+ /**
520
+ * Asynchronous readdir(3) - read a directory.
521
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
522
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
523
+ */
524
+ function readdir(
525
+ path: PathLike,
526
+ options?:
527
+ | (ObjectEncodingOptions & {
528
+ withFileTypes?: false | undefined;
529
+ })
530
+ | BufferEncoding
531
+ | null
532
+ ): Promise<string[] | Buffer[]>;
533
+ /**
534
+ * Asynchronous readdir(3) - read a directory.
535
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
536
+ * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
537
+ */
538
+ function readdir(
539
+ path: PathLike,
540
+ options: ObjectEncodingOptions & {
541
+ withFileTypes: true;
542
+ }
543
+ ): Promise<Dirent[]>;
544
+ /**
545
+ * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
546
+ * resolved with the`linkString` upon success.
547
+ *
548
+ * The optional `options` argument can be a string specifying an encoding, or an
549
+ * object with an `encoding` property specifying the character encoding to use for
550
+ * the link path returned. If the `encoding` is set to `'buffer'`, the link path
551
+ * returned will be passed as a `Buffer` object.
552
+ * @since v10.0.0
553
+ * @return Fulfills with the `linkString` upon success.
554
+ */
555
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
556
+ /**
557
+ * Asynchronous readlink(2) - read value of a symbolic link.
558
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
559
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
560
+ */
561
+ function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
562
+ /**
563
+ * Asynchronous readlink(2) - read value of a symbolic link.
564
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
565
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
566
+ */
567
+ function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
568
+ /**
569
+ * Creates a symbolic link.
570
+ *
571
+ * The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path
572
+ * to be absolute. When using `'junction'`, the `target` argument will
573
+ * automatically be normalized to absolute path.
574
+ * @since v10.0.0
575
+ * @param [type='file']
576
+ * @return Fulfills with `undefined` upon success.
577
+ */
578
+ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
579
+ /**
580
+ * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
581
+ * in which case the link itself is stat-ed, not the file that it refers to.
582
+ * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
583
+ * @since v10.0.0
584
+ * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
585
+ */
586
+ function lstat(
587
+ path: PathLike,
588
+ opts?: StatOptions & {
589
+ bigint?: false | undefined;
590
+ }
591
+ ): Promise<Stats>;
592
+ function lstat(
593
+ path: PathLike,
594
+ opts: StatOptions & {
595
+ bigint: true;
596
+ }
597
+ ): Promise<BigIntStats>;
598
+ function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
599
+ /**
600
+ * @since v10.0.0
601
+ * @return Fulfills with the {fs.Stats} object for the given `path`.
602
+ */
603
+ function stat(
604
+ path: PathLike,
605
+ opts?: StatOptions & {
606
+ bigint?: false | undefined;
607
+ }
608
+ ): Promise<Stats>;
609
+ function stat(
610
+ path: PathLike,
611
+ opts: StatOptions & {
612
+ bigint: true;
613
+ }
614
+ ): Promise<BigIntStats>;
615
+ function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
616
+ /**
617
+ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.
618
+ * @since v10.0.0
619
+ * @return Fulfills with `undefined` upon success.
620
+ */
621
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
622
+ /**
623
+ * If `path` refers to a symbolic link, then the link is removed without affecting
624
+ * the file or directory to which that link refers. If the `path` refers to a file
625
+ * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
626
+ * @since v10.0.0
627
+ * @return Fulfills with `undefined` upon success.
628
+ */
629
+ function unlink(path: PathLike): Promise<void>;
630
+ /**
631
+ * Changes the permissions of a file.
632
+ * @since v10.0.0
633
+ * @return Fulfills with `undefined` upon success.
634
+ */
635
+ function chmod(path: PathLike, mode: Mode): Promise<void>;
636
+ /**
637
+ * Changes the permissions on a symbolic link.
638
+ *
639
+ * This method is only implemented on macOS.
640
+ * @deprecated Since v10.0.0
641
+ * @return Fulfills with `undefined` upon success.
642
+ */
643
+ function lchmod(path: PathLike, mode: Mode): Promise<void>;
644
+ /**
645
+ * Changes the ownership on a symbolic link.
646
+ * @since v10.0.0
647
+ * @return Fulfills with `undefined` upon success.
648
+ */
649
+ function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
650
+ /**
651
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a
652
+ * symbolic link, then the link is not dereferenced: instead, the timestamps of
653
+ * the symbolic link itself are changed.
654
+ * @since v14.5.0, v12.19.0
655
+ * @return Fulfills with `undefined` upon success.
656
+ */
657
+ function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
658
+ /**
659
+ * Changes the ownership of a file.
660
+ * @since v10.0.0
661
+ * @return Fulfills with `undefined` upon success.
662
+ */
663
+ function chown(path: PathLike, uid: number, gid: number): Promise<void>;
664
+ /**
665
+ * Change the file system timestamps of the object referenced by `path`.
666
+ *
667
+ * The `atime` and `mtime` arguments follow these rules:
668
+ *
669
+ * * Values can be either numbers representing Unix epoch time, `Date`s, or a
670
+ * numeric string like `'123456789.0'`.
671
+ * * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
672
+ * @since v10.0.0
673
+ * @return Fulfills with `undefined` upon success.
674
+ */
675
+ function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
676
+ /**
677
+ * Determines the actual location of `path` using the same semantics as the`fs.realpath.native()` function.
678
+ *
679
+ * Only paths that can be converted to UTF8 strings are supported.
680
+ *
681
+ * The optional `options` argument can be a string specifying an encoding, or an
682
+ * object with an `encoding` property specifying the character encoding to use for
683
+ * the path. If the `encoding` is set to `'buffer'`, the path returned will be
684
+ * passed as a `Buffer` object.
685
+ *
686
+ * On Linux, when Node.js is linked against musl libc, the procfs file system must
687
+ * be mounted on `/proc` in order for this function to work. Glibc does not have
688
+ * this restriction.
689
+ * @since v10.0.0
690
+ * @return Fulfills with the resolved path upon success.
691
+ */
692
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
693
+ /**
694
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
695
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
696
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
697
+ */
698
+ function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
699
+ /**
700
+ * Asynchronous realpath(3) - return the canonicalized absolute pathname.
701
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
702
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
703
+ */
704
+ function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
705
+ /**
706
+ * Creates a unique temporary directory. A unique directory name is generated by
707
+ * appending six random characters to the end of the provided `prefix`. Due to
708
+ * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
709
+ * platforms, notably the BSDs, can return more than six random characters, and
710
+ * replace trailing `X` characters in `prefix` with random characters.
711
+ *
712
+ * The optional `options` argument can be a string specifying an encoding, or an
713
+ * object with an `encoding` property specifying the character encoding to use.
714
+ *
715
+ * ```js
716
+ * import { mkdtemp } from 'fs/promises';
717
+ *
718
+ * try {
719
+ * await mkdtemp(path.join(os.tmpdir(), 'foo-'));
720
+ * } catch (err) {
721
+ * console.error(err);
722
+ * }
723
+ * ```
724
+ *
725
+ * The `fsPromises.mkdtemp()` method will append the six randomly selected
726
+ * characters directly to the `prefix` string. For instance, given a directory`/tmp`, if the intention is to create a temporary directory _within_`/tmp`, the`prefix` must end with a trailing
727
+ * platform-specific path separator
728
+ * (`require('path').sep`).
729
+ * @since v10.0.0
730
+ * @return Fulfills with a string containing the filesystem path of the newly created temporary directory.
731
+ */
732
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
733
+ /**
734
+ * Asynchronously creates a unique temporary directory.
735
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
736
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
737
+ */
738
+ function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
739
+ /**
740
+ * Asynchronously creates a unique temporary directory.
741
+ * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
742
+ * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
743
+ */
744
+ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
745
+ /**
746
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a `Buffer`, or, an object with an own (not inherited)`toString` function property.
747
+ *
748
+ * The `encoding` option is ignored if `data` is a buffer.
749
+ *
750
+ * If `options` is a string, then it specifies the encoding.
751
+ *
752
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
753
+ *
754
+ * Any specified `FileHandle` has to support writing.
755
+ *
756
+ * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
757
+ * without waiting for the promise to be settled.
758
+ *
759
+ * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
760
+ * method that performs multiple `write` calls internally to write the buffer
761
+ * passed to it. For performance sensitive code consider using `fs.createWriteStream()`.
762
+ *
763
+ * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
764
+ * Cancelation is "best effort", and some amount of data is likely still
765
+ * to be written.
766
+ *
767
+ * ```js
768
+ * import { writeFile } from 'fs/promises';
769
+ * import { Buffer } from 'buffer';
770
+ *
771
+ * try {
772
+ * const controller = new AbortController();
773
+ * const { signal } = controller;
774
+ * const data = new Uint8Array(Buffer.from('Hello Node.js'));
775
+ * const promise = writeFile('message.txt', data, { signal });
776
+ *
777
+ * // Abort the request before the promise settles.
778
+ * controller.abort();
779
+ *
780
+ * await promise;
781
+ * } catch (err) {
782
+ * // When a request is aborted - err is an AbortError
783
+ * console.error(err);
784
+ * }
785
+ * ```
786
+ *
787
+ * Aborting an ongoing request does not abort individual operating
788
+ * system requests but rather the internal buffering `fs.writeFile` performs.
789
+ * @since v10.0.0
790
+ * @param file filename or `FileHandle`
791
+ * @return Fulfills with `undefined` upon success.
792
+ */
793
+ function writeFile(
794
+ file: PathLike | FileHandle,
795
+ data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
796
+ options?:
797
+ | (ObjectEncodingOptions & {
798
+ mode?: Mode | undefined;
799
+ flag?: OpenMode | undefined;
800
+ } & Abortable)
801
+ | BufferEncoding
802
+ | null
803
+ ): Promise<void>;
804
+ /**
805
+ * Asynchronously append data to a file, creating the file if it does not yet
806
+ * exist. `data` can be a string or a `Buffer`.
807
+ *
808
+ * If `options` is a string, then it specifies the `encoding`.
809
+ *
810
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
811
+ *
812
+ * The `path` may be specified as a `FileHandle` that has been opened
813
+ * for appending (using `fsPromises.open()`).
814
+ * @since v10.0.0
815
+ * @param path filename or {FileHandle}
816
+ * @return Fulfills with `undefined` upon success.
817
+ */
818
+ function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
819
+ /**
820
+ * Asynchronously reads the entire contents of a file.
821
+ *
822
+ * If no encoding is specified (using `options.encoding`), the data is returned
823
+ * as a `Buffer` object. Otherwise, the data will be a string.
824
+ *
825
+ * If `options` is a string, then it specifies the encoding.
826
+ *
827
+ * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
828
+ * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
829
+ * with an error. On FreeBSD, a representation of the directory's contents will be
830
+ * returned.
831
+ *
832
+ * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
833
+ * request is aborted the promise returned is rejected with an `AbortError`:
834
+ *
835
+ * ```js
836
+ * import { readFile } from 'fs/promises';
837
+ *
838
+ * try {
839
+ * const controller = new AbortController();
840
+ * const { signal } = controller;
841
+ * const promise = readFile(fileName, { signal });
842
+ *
843
+ * // Abort the request before the promise settles.
844
+ * controller.abort();
845
+ *
846
+ * await promise;
847
+ * } catch (err) {
848
+ * // When a request is aborted - err is an AbortError
849
+ * console.error(err);
850
+ * }
851
+ * ```
852
+ *
853
+ * Aborting an ongoing request does not abort individual operating
854
+ * system requests but rather the internal buffering `fs.readFile` performs.
855
+ *
856
+ * Any specified `FileHandle` has to support reading.
857
+ * @since v10.0.0
858
+ * @param path filename or `FileHandle`
859
+ * @return Fulfills with the contents of the file.
860
+ */
861
+ function readFile(
862
+ path: PathLike | FileHandle,
863
+ options?:
864
+ | ({
865
+ encoding?: null | undefined;
866
+ flag?: OpenMode | undefined;
867
+ } & Abortable)
868
+ | null
869
+ ): Promise<Buffer>;
870
+ /**
871
+ * Asynchronously reads the entire contents of a file.
872
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
873
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
874
+ * @param options An object that may contain an optional flag.
875
+ * If a flag is not provided, it defaults to `'r'`.
876
+ */
877
+ function readFile(
878
+ path: PathLike | FileHandle,
879
+ options:
880
+ | ({
881
+ encoding: BufferEncoding;
882
+ flag?: OpenMode | undefined;
883
+ } & Abortable)
884
+ | BufferEncoding
885
+ ): Promise<string>;
886
+ /**
887
+ * Asynchronously reads the entire contents of a file.
888
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
889
+ * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
890
+ * @param options An object that may contain an optional flag.
891
+ * If a flag is not provided, it defaults to `'r'`.
892
+ */
893
+ function readFile(
894
+ path: PathLike | FileHandle,
895
+ options?:
896
+ | (ObjectEncodingOptions &
897
+ Abortable & {
898
+ flag?: OpenMode | undefined;
899
+ })
900
+ | BufferEncoding
901
+ | null
902
+ ): Promise<string | Buffer>;
903
+ /**
904
+ * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
905
+ *
906
+ * Creates an `fs.Dir`, which contains all further functions for reading from
907
+ * and cleaning up the directory.
908
+ *
909
+ * The `encoding` option sets the encoding for the `path` while opening the
910
+ * directory and subsequent read operations.
911
+ *
912
+ * Example using async iteration:
913
+ *
914
+ * ```js
915
+ * import { opendir } from 'fs/promises';
916
+ *
917
+ * try {
918
+ * const dir = await opendir('./');
919
+ * for await (const dirent of dir)
920
+ * console.log(dirent.name);
921
+ * } catch (err) {
922
+ * console.error(err);
923
+ * }
924
+ * ```
925
+ *
926
+ * When using the async iterator, the `fs.Dir` object will be automatically
927
+ * closed after the iterator exits.
928
+ * @since v12.12.0
929
+ * @return Fulfills with an {fs.Dir}.
930
+ */
931
+ function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
932
+ /**
933
+ * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
934
+ *
935
+ * ```js
936
+ * const { watch } = require('fs/promises');
937
+ *
938
+ * const ac = new AbortController();
939
+ * const { signal } = ac;
940
+ * setTimeout(() => ac.abort(), 10000);
941
+ *
942
+ * (async () => {
943
+ * try {
944
+ * const watcher = watch(__filename, { signal });
945
+ * for await (const event of watcher)
946
+ * console.log(event);
947
+ * } catch (err) {
948
+ * if (err.name === 'AbortError')
949
+ * return;
950
+ * throw err;
951
+ * }
952
+ * })();
953
+ * ```
954
+ *
955
+ * On most platforms, `'rename'` is emitted whenever a filename appears or
956
+ * disappears in the directory.
957
+ *
958
+ * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
959
+ * @since v15.9.0
960
+ * @return of objects with the properties:
961
+ */
962
+ function watch(
963
+ filename: PathLike,
964
+ options:
965
+ | (WatchOptions & {
966
+ encoding: 'buffer';
967
+ })
968
+ | 'buffer'
969
+ ): AsyncIterable<FileChangeInfo<Buffer>>;
970
+ /**
971
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
972
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
973
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
974
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
975
+ * If `persistent` is not supplied, the default of `true` is used.
976
+ * If `recursive` is not supplied, the default of `false` is used.
977
+ */
978
+ function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
979
+ /**
980
+ * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
981
+ * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
982
+ * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
983
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
984
+ * If `persistent` is not supplied, the default of `true` is used.
985
+ * If `recursive` is not supplied, the default of `false` is used.
986
+ */
987
+ function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
988
+ /**
989
+ * Asynchronously copies the entire directory structure from `src` to `dest`,
990
+ * including subdirectories and files.
991
+ *
992
+ * When copying a directory to another directory, globs are not supported and
993
+ * behavior is similar to `cp dir1/ dir2/`.
994
+ * @since v16.7.0
995
+ * @experimental
996
+ * @param src source path to copy.
997
+ * @param dest destination path to copy to.
998
+ * @return Fulfills with `undefined` upon success.
999
+ */
1000
+ function cp(source: string, destination: string, opts?: CopyOptions): Promise<void>;
1001
+ }
1002
+ declare module 'node:fs/promises' {
1003
+ export * from 'fs/promises';
1004
+ }