cdk-ecr-deployment 3.3.0 → 3.3.1

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 (539) hide show
  1. package/.jsii +2 -6
  2. package/lib/index.js +3 -3
  3. package/package.json +1 -13
  4. package/build-lambda.sh +0 -12
  5. package/node_modules/@sindresorhus/is/dist/index.d.ts +0 -232
  6. package/node_modules/@sindresorhus/is/dist/index.js +0 -434
  7. package/node_modules/@sindresorhus/is/dist/types.d.ts +0 -25
  8. package/node_modules/@sindresorhus/is/dist/types.js +0 -3
  9. package/node_modules/@sindresorhus/is/license +0 -9
  10. package/node_modules/@sindresorhus/is/package.json +0 -96
  11. package/node_modules/@sindresorhus/is/readme.md +0 -669
  12. package/node_modules/@szmarczak/http-timer/LICENSE +0 -21
  13. package/node_modules/@szmarczak/http-timer/README.md +0 -93
  14. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +0 -32
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.js +0 -126
  16. package/node_modules/@szmarczak/http-timer/package.json +0 -72
  17. package/node_modules/@types/cacheable-request/LICENSE +0 -21
  18. package/node_modules/@types/cacheable-request/README.md +0 -16
  19. package/node_modules/@types/cacheable-request/index.d.ts +0 -137
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -21
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +0 -15
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +0 -8
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +0 -1095
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +0 -541
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +0 -1926
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +0 -1549
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +0 -579
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +0 -9
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +0 -452
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +0 -21
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +0 -4510
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +0 -599
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +0 -476
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +0 -865
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +0 -124
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +0 -170
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +0 -931
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +0 -1275
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +0 -4343
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +0 -511
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +0 -1959
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +0 -2558
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +0 -543
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -92
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +0 -3966
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +0 -702
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +0 -1029
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +0 -495
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +0 -220
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +0 -200
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +0 -970
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +0 -2013
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +0 -117
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +0 -153
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +0 -162
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +0 -589
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +0 -430
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +0 -153
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +0 -439
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +0 -12
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +0 -90
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +0 -614
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +0 -1662
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +0 -67
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -2150
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +0 -97
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +0 -240
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +0 -1226
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +0 -197
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +0 -208
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +0 -972
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +0 -2439
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +0 -808
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +0 -976
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +0 -181
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +0 -745
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +0 -539
  87. package/node_modules/@types/cacheable-request/node_modules/undici-types/LICENSE +0 -21
  88. package/node_modules/@types/cacheable-request/node_modules/undici-types/README.md +0 -6
  89. package/node_modules/@types/cacheable-request/node_modules/undici-types/agent.d.ts +0 -31
  90. package/node_modules/@types/cacheable-request/node_modules/undici-types/api.d.ts +0 -43
  91. package/node_modules/@types/cacheable-request/node_modules/undici-types/balanced-pool.d.ts +0 -29
  92. package/node_modules/@types/cacheable-request/node_modules/undici-types/cache.d.ts +0 -36
  93. package/node_modules/@types/cacheable-request/node_modules/undici-types/client.d.ts +0 -108
  94. package/node_modules/@types/cacheable-request/node_modules/undici-types/connector.d.ts +0 -34
  95. package/node_modules/@types/cacheable-request/node_modules/undici-types/content-type.d.ts +0 -21
  96. package/node_modules/@types/cacheable-request/node_modules/undici-types/cookies.d.ts +0 -28
  97. package/node_modules/@types/cacheable-request/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  98. package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +0 -255
  99. package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  100. package/node_modules/@types/cacheable-request/node_modules/undici-types/errors.d.ts +0 -149
  101. package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +0 -61
  102. package/node_modules/@types/cacheable-request/node_modules/undici-types/fetch.d.ts +0 -209
  103. package/node_modules/@types/cacheable-request/node_modules/undici-types/file.d.ts +0 -39
  104. package/node_modules/@types/cacheable-request/node_modules/undici-types/filereader.d.ts +0 -54
  105. package/node_modules/@types/cacheable-request/node_modules/undici-types/formdata.d.ts +0 -108
  106. package/node_modules/@types/cacheable-request/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  107. package/node_modules/@types/cacheable-request/node_modules/undici-types/global-origin.d.ts +0 -7
  108. package/node_modules/@types/cacheable-request/node_modules/undici-types/handlers.d.ts +0 -15
  109. package/node_modules/@types/cacheable-request/node_modules/undici-types/header.d.ts +0 -4
  110. package/node_modules/@types/cacheable-request/node_modules/undici-types/index.d.ts +0 -71
  111. package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +0 -17
  112. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-agent.d.ts +0 -50
  113. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-client.d.ts +0 -25
  114. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-errors.d.ts +0 -12
  115. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  116. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-pool.d.ts +0 -25
  117. package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +0 -55
  118. package/node_modules/@types/cacheable-request/node_modules/undici-types/patch.d.ts +0 -33
  119. package/node_modules/@types/cacheable-request/node_modules/undici-types/pool-stats.d.ts +0 -19
  120. package/node_modules/@types/cacheable-request/node_modules/undici-types/pool.d.ts +0 -39
  121. package/node_modules/@types/cacheable-request/node_modules/undici-types/proxy-agent.d.ts +0 -28
  122. package/node_modules/@types/cacheable-request/node_modules/undici-types/readable.d.ts +0 -60
  123. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-agent.d.ts +0 -8
  124. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-handler.d.ts +0 -116
  125. package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +0 -18
  126. package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +0 -222
  127. package/node_modules/@types/cacheable-request/node_modules/undici-types/websocket.d.ts +0 -150
  128. package/node_modules/@types/cacheable-request/package.json +0 -35
  129. package/node_modules/@types/http-cache-semantics/LICENSE +0 -21
  130. package/node_modules/@types/http-cache-semantics/README.md +0 -15
  131. package/node_modules/@types/http-cache-semantics/index.d.ts +0 -165
  132. package/node_modules/@types/http-cache-semantics/package.json +0 -25
  133. package/node_modules/@types/keyv/LICENSE +0 -21
  134. package/node_modules/@types/keyv/README.md +0 -16
  135. package/node_modules/@types/keyv/index.d.ts +0 -90
  136. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -21
  137. package/node_modules/@types/keyv/node_modules/@types/node/README.md +0 -15
  138. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +0 -8
  139. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +0 -1095
  140. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +0 -541
  141. package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  142. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +0 -1926
  143. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +0 -1549
  144. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +0 -579
  145. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  146. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +0 -9
  147. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  148. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  149. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +0 -452
  150. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +0 -21
  151. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +0 -4510
  152. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +0 -599
  153. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  154. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +0 -476
  155. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +0 -865
  156. package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +0 -124
  157. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +0 -170
  158. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +0 -931
  159. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +0 -1275
  160. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +0 -4343
  161. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +0 -511
  162. package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  163. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +0 -1959
  164. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +0 -2558
  165. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +0 -543
  166. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -92
  167. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +0 -3966
  168. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +0 -702
  169. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +0 -1029
  170. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +0 -495
  171. package/node_modules/@types/keyv/node_modules/@types/node/package.json +0 -220
  172. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +0 -200
  173. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +0 -970
  174. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +0 -2013
  175. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +0 -117
  176. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +0 -153
  177. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +0 -162
  178. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +0 -589
  179. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +0 -430
  180. package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +0 -153
  181. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +0 -439
  182. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +0 -12
  183. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +0 -90
  184. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +0 -614
  185. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +0 -1662
  186. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +0 -67
  187. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -2150
  188. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +0 -97
  189. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +0 -240
  190. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +0 -1226
  191. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +0 -197
  192. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  193. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  194. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  195. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +0 -208
  196. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +0 -972
  197. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +0 -2439
  198. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +0 -808
  199. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +0 -976
  200. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +0 -181
  201. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +0 -745
  202. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +0 -539
  203. package/node_modules/@types/keyv/node_modules/undici-types/LICENSE +0 -21
  204. package/node_modules/@types/keyv/node_modules/undici-types/README.md +0 -6
  205. package/node_modules/@types/keyv/node_modules/undici-types/agent.d.ts +0 -31
  206. package/node_modules/@types/keyv/node_modules/undici-types/api.d.ts +0 -43
  207. package/node_modules/@types/keyv/node_modules/undici-types/balanced-pool.d.ts +0 -29
  208. package/node_modules/@types/keyv/node_modules/undici-types/cache.d.ts +0 -36
  209. package/node_modules/@types/keyv/node_modules/undici-types/client.d.ts +0 -108
  210. package/node_modules/@types/keyv/node_modules/undici-types/connector.d.ts +0 -34
  211. package/node_modules/@types/keyv/node_modules/undici-types/content-type.d.ts +0 -21
  212. package/node_modules/@types/keyv/node_modules/undici-types/cookies.d.ts +0 -28
  213. package/node_modules/@types/keyv/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  214. package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +0 -255
  215. package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  216. package/node_modules/@types/keyv/node_modules/undici-types/errors.d.ts +0 -149
  217. package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +0 -61
  218. package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +0 -209
  219. package/node_modules/@types/keyv/node_modules/undici-types/file.d.ts +0 -39
  220. package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +0 -54
  221. package/node_modules/@types/keyv/node_modules/undici-types/formdata.d.ts +0 -108
  222. package/node_modules/@types/keyv/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  223. package/node_modules/@types/keyv/node_modules/undici-types/global-origin.d.ts +0 -7
  224. package/node_modules/@types/keyv/node_modules/undici-types/handlers.d.ts +0 -15
  225. package/node_modules/@types/keyv/node_modules/undici-types/header.d.ts +0 -4
  226. package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +0 -71
  227. package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +0 -17
  228. package/node_modules/@types/keyv/node_modules/undici-types/mock-agent.d.ts +0 -50
  229. package/node_modules/@types/keyv/node_modules/undici-types/mock-client.d.ts +0 -25
  230. package/node_modules/@types/keyv/node_modules/undici-types/mock-errors.d.ts +0 -12
  231. package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  232. package/node_modules/@types/keyv/node_modules/undici-types/mock-pool.d.ts +0 -25
  233. package/node_modules/@types/keyv/node_modules/undici-types/package.json +0 -55
  234. package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +0 -33
  235. package/node_modules/@types/keyv/node_modules/undici-types/pool-stats.d.ts +0 -19
  236. package/node_modules/@types/keyv/node_modules/undici-types/pool.d.ts +0 -39
  237. package/node_modules/@types/keyv/node_modules/undici-types/proxy-agent.d.ts +0 -28
  238. package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +0 -60
  239. package/node_modules/@types/keyv/node_modules/undici-types/retry-agent.d.ts +0 -8
  240. package/node_modules/@types/keyv/node_modules/undici-types/retry-handler.d.ts +0 -116
  241. package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +0 -18
  242. package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +0 -222
  243. package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +0 -150
  244. package/node_modules/@types/keyv/package.json +0 -32
  245. package/node_modules/@types/responselike/LICENSE +0 -21
  246. package/node_modules/@types/responselike/README.md +0 -48
  247. package/node_modules/@types/responselike/index.d.ts +0 -29
  248. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -21
  249. package/node_modules/@types/responselike/node_modules/@types/node/README.md +0 -15
  250. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +0 -8
  251. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +0 -1095
  252. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +0 -541
  253. package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  254. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +0 -1926
  255. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +0 -1549
  256. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +0 -579
  257. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  258. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +0 -9
  259. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  260. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  261. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +0 -452
  262. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +0 -21
  263. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +0 -4510
  264. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +0 -599
  265. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  266. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +0 -476
  267. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +0 -865
  268. package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +0 -124
  269. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +0 -170
  270. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +0 -931
  271. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +0 -1275
  272. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +0 -4343
  273. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +0 -511
  274. package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  275. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +0 -1959
  276. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +0 -2558
  277. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +0 -543
  278. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -92
  279. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +0 -3966
  280. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +0 -702
  281. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +0 -1029
  282. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +0 -495
  283. package/node_modules/@types/responselike/node_modules/@types/node/package.json +0 -220
  284. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +0 -200
  285. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +0 -970
  286. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +0 -2013
  287. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +0 -117
  288. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +0 -153
  289. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +0 -162
  290. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +0 -589
  291. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +0 -430
  292. package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +0 -153
  293. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +0 -439
  294. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +0 -12
  295. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +0 -90
  296. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +0 -614
  297. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +0 -1662
  298. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +0 -67
  299. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -2150
  300. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +0 -97
  301. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +0 -240
  302. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +0 -1226
  303. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +0 -197
  304. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  305. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  306. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  307. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +0 -208
  308. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +0 -972
  309. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +0 -2439
  310. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +0 -808
  311. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +0 -976
  312. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +0 -181
  313. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +0 -745
  314. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +0 -539
  315. package/node_modules/@types/responselike/node_modules/undici-types/LICENSE +0 -21
  316. package/node_modules/@types/responselike/node_modules/undici-types/README.md +0 -6
  317. package/node_modules/@types/responselike/node_modules/undici-types/agent.d.ts +0 -31
  318. package/node_modules/@types/responselike/node_modules/undici-types/api.d.ts +0 -43
  319. package/node_modules/@types/responselike/node_modules/undici-types/balanced-pool.d.ts +0 -29
  320. package/node_modules/@types/responselike/node_modules/undici-types/cache.d.ts +0 -36
  321. package/node_modules/@types/responselike/node_modules/undici-types/client.d.ts +0 -108
  322. package/node_modules/@types/responselike/node_modules/undici-types/connector.d.ts +0 -34
  323. package/node_modules/@types/responselike/node_modules/undici-types/content-type.d.ts +0 -21
  324. package/node_modules/@types/responselike/node_modules/undici-types/cookies.d.ts +0 -28
  325. package/node_modules/@types/responselike/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  326. package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +0 -255
  327. package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  328. package/node_modules/@types/responselike/node_modules/undici-types/errors.d.ts +0 -149
  329. package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +0 -61
  330. package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +0 -209
  331. package/node_modules/@types/responselike/node_modules/undici-types/file.d.ts +0 -39
  332. package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +0 -54
  333. package/node_modules/@types/responselike/node_modules/undici-types/formdata.d.ts +0 -108
  334. package/node_modules/@types/responselike/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  335. package/node_modules/@types/responselike/node_modules/undici-types/global-origin.d.ts +0 -7
  336. package/node_modules/@types/responselike/node_modules/undici-types/handlers.d.ts +0 -15
  337. package/node_modules/@types/responselike/node_modules/undici-types/header.d.ts +0 -4
  338. package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +0 -71
  339. package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +0 -17
  340. package/node_modules/@types/responselike/node_modules/undici-types/mock-agent.d.ts +0 -50
  341. package/node_modules/@types/responselike/node_modules/undici-types/mock-client.d.ts +0 -25
  342. package/node_modules/@types/responselike/node_modules/undici-types/mock-errors.d.ts +0 -12
  343. package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  344. package/node_modules/@types/responselike/node_modules/undici-types/mock-pool.d.ts +0 -25
  345. package/node_modules/@types/responselike/node_modules/undici-types/package.json +0 -55
  346. package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +0 -33
  347. package/node_modules/@types/responselike/node_modules/undici-types/pool-stats.d.ts +0 -19
  348. package/node_modules/@types/responselike/node_modules/undici-types/pool.d.ts +0 -39
  349. package/node_modules/@types/responselike/node_modules/undici-types/proxy-agent.d.ts +0 -28
  350. package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +0 -60
  351. package/node_modules/@types/responselike/node_modules/undici-types/retry-agent.d.ts +0 -8
  352. package/node_modules/@types/responselike/node_modules/undici-types/retry-handler.d.ts +0 -116
  353. package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +0 -18
  354. package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +0 -222
  355. package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +0 -150
  356. package/node_modules/@types/responselike/package.json +0 -27
  357. package/node_modules/cacheable-lookup/LICENSE +0 -21
  358. package/node_modules/cacheable-lookup/README.md +0 -240
  359. package/node_modules/cacheable-lookup/index.d.ts +0 -139
  360. package/node_modules/cacheable-lookup/package.json +0 -45
  361. package/node_modules/cacheable-lookup/source/index.js +0 -436
  362. package/node_modules/cacheable-request/LICENSE +0 -21
  363. package/node_modules/cacheable-request/README.md +0 -206
  364. package/node_modules/cacheable-request/package.json +0 -56
  365. package/node_modules/cacheable-request/src/index.js +0 -251
  366. package/node_modules/clone-response/LICENSE +0 -21
  367. package/node_modules/clone-response/README.md +0 -62
  368. package/node_modules/clone-response/node_modules/mimic-response/index.js +0 -32
  369. package/node_modules/clone-response/node_modules/mimic-response/license +0 -9
  370. package/node_modules/clone-response/node_modules/mimic-response/package.json +0 -37
  371. package/node_modules/clone-response/node_modules/mimic-response/readme.md +0 -54
  372. package/node_modules/clone-response/package.json +0 -41
  373. package/node_modules/clone-response/src/index.js +0 -17
  374. package/node_modules/decompress-response/index.d.ts +0 -22
  375. package/node_modules/decompress-response/index.js +0 -58
  376. package/node_modules/decompress-response/license +0 -9
  377. package/node_modules/decompress-response/package.json +0 -56
  378. package/node_modules/decompress-response/readme.md +0 -48
  379. package/node_modules/defer-to-connect/LICENSE +0 -21
  380. package/node_modules/defer-to-connect/README.md +0 -38
  381. package/node_modules/defer-to-connect/dist/source/index.d.ts +0 -10
  382. package/node_modules/defer-to-connect/dist/source/index.js +0 -47
  383. package/node_modules/defer-to-connect/package.json +0 -71
  384. package/node_modules/end-of-stream/LICENSE +0 -21
  385. package/node_modules/end-of-stream/README.md +0 -54
  386. package/node_modules/end-of-stream/index.js +0 -94
  387. package/node_modules/end-of-stream/package.json +0 -37
  388. package/node_modules/get-stream/buffer-stream.js +0 -52
  389. package/node_modules/get-stream/index.d.ts +0 -108
  390. package/node_modules/get-stream/index.js +0 -60
  391. package/node_modules/get-stream/license +0 -9
  392. package/node_modules/get-stream/package.json +0 -50
  393. package/node_modules/get-stream/readme.md +0 -124
  394. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +0 -2
  395. package/node_modules/got/dist/source/as-promise/create-rejection.js +0 -30
  396. package/node_modules/got/dist/source/as-promise/index.d.ts +0 -3
  397. package/node_modules/got/dist/source/as-promise/index.js +0 -176
  398. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +0 -3
  399. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +0 -78
  400. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +0 -3
  401. package/node_modules/got/dist/source/as-promise/parse-body.js +0 -25
  402. package/node_modules/got/dist/source/as-promise/types.d.ts +0 -256
  403. package/node_modules/got/dist/source/as-promise/types.js +0 -42
  404. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +0 -5
  405. package/node_modules/got/dist/source/core/calculate-retry-delay.js +0 -29
  406. package/node_modules/got/dist/source/core/index.d.ts +0 -1124
  407. package/node_modules/got/dist/source/core/index.js +0 -1505
  408. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +0 -5
  409. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +0 -17
  410. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +0 -3
  411. package/node_modules/got/dist/source/core/utils/get-body-size.js +0 -32
  412. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +0 -4
  413. package/node_modules/got/dist/source/core/utils/get-buffer.js +0 -16
  414. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +0 -8
  415. package/node_modules/got/dist/source/core/utils/is-form-data.js +0 -4
  416. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +0 -2
  417. package/node_modules/got/dist/source/core/utils/is-response-ok.js +0 -8
  418. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +0 -14
  419. package/node_modules/got/dist/source/core/utils/options-to-url.js +0 -53
  420. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +0 -3
  421. package/node_modules/got/dist/source/core/utils/proxy-events.js +0 -17
  422. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +0 -29
  423. package/node_modules/got/dist/source/core/utils/timed-out.js +0 -121
  424. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +0 -11
  425. package/node_modules/got/dist/source/core/utils/unhandle.js +0 -22
  426. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +0 -15
  427. package/node_modules/got/dist/source/core/utils/url-to-options.js +0 -24
  428. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +0 -8
  429. package/node_modules/got/dist/source/core/utils/weakable-map.js +0 -29
  430. package/node_modules/got/dist/source/create.d.ts +0 -5
  431. package/node_modules/got/dist/source/create.js +0 -240
  432. package/node_modules/got/dist/source/index.d.ts +0 -4
  433. package/node_modules/got/dist/source/index.js +0 -132
  434. package/node_modules/got/dist/source/types.d.ts +0 -344
  435. package/node_modules/got/dist/source/types.js +0 -2
  436. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +0 -1
  437. package/node_modules/got/dist/source/utils/deep-freeze.js +0 -12
  438. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +0 -2
  439. package/node_modules/got/dist/source/utils/deprecation-warning.js +0 -13
  440. package/node_modules/got/license +0 -9
  441. package/node_modules/got/package.json +0 -131
  442. package/node_modules/got/readme.md +0 -2477
  443. package/node_modules/hpagent/.github/dependabot.yml +0 -8
  444. package/node_modules/hpagent/.github/workflows/build.yml +0 -29
  445. package/node_modules/hpagent/LICENSE +0 -21
  446. package/node_modules/hpagent/README.md +0 -138
  447. package/node_modules/hpagent/index.d.ts +0 -26
  448. package/node_modules/hpagent/index.js +0 -101
  449. package/node_modules/hpagent/index.mjs +0 -5
  450. package/node_modules/hpagent/package.json +0 -49
  451. package/node_modules/hpagent/test/got.test.js +0 -111
  452. package/node_modules/hpagent/test/http-http.test.js +0 -351
  453. package/node_modules/hpagent/test/http-https.test.js +0 -313
  454. package/node_modules/hpagent/test/https-http.test.js +0 -313
  455. package/node_modules/hpagent/test/https-https.test.js +0 -313
  456. package/node_modules/hpagent/test/index.test-d.ts +0 -45
  457. package/node_modules/hpagent/test/needle.test.js +0 -103
  458. package/node_modules/hpagent/test/node-fetch.test.js +0 -103
  459. package/node_modules/hpagent/test/simple-get.test.js +0 -139
  460. package/node_modules/hpagent/test/ssl.cert +0 -19
  461. package/node_modules/hpagent/test/ssl.key +0 -27
  462. package/node_modules/hpagent/test/utils.js +0 -59
  463. package/node_modules/http-cache-semantics/LICENSE +0 -9
  464. package/node_modules/http-cache-semantics/README.md +0 -203
  465. package/node_modules/http-cache-semantics/index.js +0 -674
  466. package/node_modules/http-cache-semantics/package.json +0 -18
  467. package/node_modules/http2-wrapper/LICENSE +0 -21
  468. package/node_modules/http2-wrapper/README.md +0 -470
  469. package/node_modules/http2-wrapper/package.json +0 -54
  470. package/node_modules/http2-wrapper/source/agent.js +0 -670
  471. package/node_modules/http2-wrapper/source/auto.js +0 -149
  472. package/node_modules/http2-wrapper/source/client-request.js +0 -445
  473. package/node_modules/http2-wrapper/source/incoming-message.js +0 -58
  474. package/node_modules/http2-wrapper/source/index.js +0 -28
  475. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +0 -27
  476. package/node_modules/http2-wrapper/source/utils/errors.js +0 -45
  477. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +0 -13
  478. package/node_modules/http2-wrapper/source/utils/proxy-events.js +0 -7
  479. package/node_modules/http2-wrapper/source/utils/url-to-options.js +0 -25
  480. package/node_modules/json-buffer/.travis.yml +0 -3
  481. package/node_modules/json-buffer/LICENSE +0 -22
  482. package/node_modules/json-buffer/README.md +0 -24
  483. package/node_modules/json-buffer/index.js +0 -58
  484. package/node_modules/json-buffer/package.json +0 -34
  485. package/node_modules/json-buffer/test/index.js +0 -63
  486. package/node_modules/keyv/README.md +0 -429
  487. package/node_modules/keyv/package.json +0 -57
  488. package/node_modules/keyv/src/index.d.ts +0 -112
  489. package/node_modules/keyv/src/index.js +0 -259
  490. package/node_modules/lowercase-keys/index.d.ts +0 -16
  491. package/node_modules/lowercase-keys/index.js +0 -10
  492. package/node_modules/lowercase-keys/license +0 -9
  493. package/node_modules/lowercase-keys/package.json +0 -38
  494. package/node_modules/lowercase-keys/readme.md +0 -32
  495. package/node_modules/mimic-response/index.d.ts +0 -17
  496. package/node_modules/mimic-response/index.js +0 -77
  497. package/node_modules/mimic-response/license +0 -9
  498. package/node_modules/mimic-response/package.json +0 -42
  499. package/node_modules/mimic-response/readme.md +0 -78
  500. package/node_modules/normalize-url/index.d.ts +0 -267
  501. package/node_modules/normalize-url/index.js +0 -216
  502. package/node_modules/normalize-url/license +0 -9
  503. package/node_modules/normalize-url/package.json +0 -50
  504. package/node_modules/normalize-url/readme.md +0 -286
  505. package/node_modules/once/LICENSE +0 -15
  506. package/node_modules/once/README.md +0 -79
  507. package/node_modules/once/once.js +0 -42
  508. package/node_modules/once/package.json +0 -33
  509. package/node_modules/p-cancelable/index.d.ts +0 -176
  510. package/node_modules/p-cancelable/index.js +0 -111
  511. package/node_modules/p-cancelable/license +0 -9
  512. package/node_modules/p-cancelable/package.json +0 -49
  513. package/node_modules/p-cancelable/readme.md +0 -153
  514. package/node_modules/pump/.github/FUNDING.yml +0 -2
  515. package/node_modules/pump/.travis.yml +0 -5
  516. package/node_modules/pump/LICENSE +0 -21
  517. package/node_modules/pump/README.md +0 -74
  518. package/node_modules/pump/SECURITY.md +0 -5
  519. package/node_modules/pump/index.js +0 -86
  520. package/node_modules/pump/package.json +0 -24
  521. package/node_modules/pump/test-browser.js +0 -66
  522. package/node_modules/pump/test-node.js +0 -53
  523. package/node_modules/quick-lru/index.d.ts +0 -97
  524. package/node_modules/quick-lru/index.js +0 -123
  525. package/node_modules/quick-lru/license +0 -9
  526. package/node_modules/quick-lru/package.json +0 -43
  527. package/node_modules/quick-lru/readme.md +0 -111
  528. package/node_modules/resolve-alpn/LICENSE +0 -22
  529. package/node_modules/resolve-alpn/README.md +0 -60
  530. package/node_modules/resolve-alpn/index.js +0 -43
  531. package/node_modules/resolve-alpn/package.json +0 -34
  532. package/node_modules/responselike/LICENSE +0 -19
  533. package/node_modules/responselike/README.md +0 -77
  534. package/node_modules/responselike/package.json +0 -39
  535. package/node_modules/responselike/src/index.js +0 -34
  536. package/node_modules/wrappy/LICENSE +0 -15
  537. package/node_modules/wrappy/README.md +0 -36
  538. package/node_modules/wrappy/package.json +0 -29
  539. package/node_modules/wrappy/wrappy.js +0 -33
@@ -1,1275 +0,0 @@
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 { ReadableStream } from "node:stream/web";
15
- import {
16
- BigIntStats,
17
- BigIntStatsFs,
18
- BufferEncodingOption,
19
- constants as fsConstants,
20
- CopyOptions,
21
- Dir,
22
- Dirent,
23
- GlobOptions,
24
- GlobOptionsWithFileTypes,
25
- GlobOptionsWithoutFileTypes,
26
- MakeDirectoryOptions,
27
- Mode,
28
- ObjectEncodingOptions,
29
- OpenDirOptions,
30
- OpenMode,
31
- PathLike,
32
- ReadStream,
33
- ReadVResult,
34
- RmDirOptions,
35
- RmOptions,
36
- StatFsOptions,
37
- StatOptions,
38
- Stats,
39
- StatsFs,
40
- TimeLike,
41
- WatchEventType,
42
- WatchOptions,
43
- WriteStream,
44
- WriteVResult,
45
- } from "node:fs";
46
- import { Interface as ReadlineInterface } from "node:readline";
47
- interface FileChangeInfo<T extends string | Buffer> {
48
- eventType: WatchEventType;
49
- filename: T | null;
50
- }
51
- interface FlagAndOpenMode {
52
- mode?: Mode | undefined;
53
- flag?: OpenMode | undefined;
54
- }
55
- interface FileReadResult<T extends NodeJS.ArrayBufferView> {
56
- bytesRead: number;
57
- buffer: T;
58
- }
59
- interface FileReadOptions<T extends NodeJS.ArrayBufferView = Buffer> {
60
- /**
61
- * @default `Buffer.alloc(0xffff)`
62
- */
63
- buffer?: T;
64
- /**
65
- * @default 0
66
- */
67
- offset?: number | null;
68
- /**
69
- * @default `buffer.byteLength`
70
- */
71
- length?: number | null;
72
- position?: number | null;
73
- }
74
- interface CreateReadStreamOptions extends Abortable {
75
- encoding?: BufferEncoding | null | undefined;
76
- autoClose?: boolean | undefined;
77
- emitClose?: boolean | undefined;
78
- start?: number | undefined;
79
- end?: number | undefined;
80
- highWaterMark?: number | undefined;
81
- }
82
- interface CreateWriteStreamOptions {
83
- encoding?: BufferEncoding | null | undefined;
84
- autoClose?: boolean | undefined;
85
- emitClose?: boolean | undefined;
86
- start?: number | undefined;
87
- highWaterMark?: number | undefined;
88
- flush?: boolean | undefined;
89
- }
90
- interface ReadableWebStreamOptions {
91
- /**
92
- * Whether to open a normal or a `'bytes'` stream.
93
- * @since v20.0.0
94
- */
95
- type?: "bytes" | undefined;
96
- }
97
- // TODO: Add `EventEmitter` close
98
- interface FileHandle {
99
- /**
100
- * The numeric file descriptor managed by the {FileHandle} object.
101
- * @since v10.0.0
102
- */
103
- readonly fd: number;
104
- /**
105
- * Alias of `filehandle.writeFile()`.
106
- *
107
- * When operating on file handles, the mode cannot be changed from what it was set
108
- * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`.
109
- * @since v10.0.0
110
- * @return Fulfills with `undefined` upon success.
111
- */
112
- appendFile(
113
- data: string | Uint8Array,
114
- options?:
115
- | (ObjectEncodingOptions & Abortable)
116
- | BufferEncoding
117
- | null,
118
- ): Promise<void>;
119
- /**
120
- * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
121
- * @since v10.0.0
122
- * @param uid The file's new owner's user id.
123
- * @param gid The file's new group's group id.
124
- * @return Fulfills with `undefined` upon success.
125
- */
126
- chown(uid: number, gid: number): Promise<void>;
127
- /**
128
- * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html).
129
- * @since v10.0.0
130
- * @param mode the file mode bit mask.
131
- * @return Fulfills with `undefined` upon success.
132
- */
133
- chmod(mode: Mode): Promise<void>;
134
- /**
135
- * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
136
- * returned by this method has a default `highWaterMark` of 64 KiB.
137
- *
138
- * `options` can include `start` and `end` values to read a range of bytes from
139
- * the file instead of the entire file. Both `start` and `end` are inclusive and
140
- * start counting at 0, allowed values are in the
141
- * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
142
- * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
143
- * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
144
- *
145
- * If the `FileHandle` points to a character device that only supports blocking
146
- * reads (such as keyboard or sound card), read operations do not finish until data
147
- * is available. This can prevent the process from exiting and the stream from
148
- * closing naturally.
149
- *
150
- * By default, the stream will emit a `'close'` event after it has been
151
- * destroyed. Set the `emitClose` option to `false` to change this behavior.
152
- *
153
- * ```js
154
- * import { open } from 'node:fs/promises';
155
- *
156
- * const fd = await open('/dev/input/event0');
157
- * // Create a stream from some character device.
158
- * const stream = fd.createReadStream();
159
- * setTimeout(() => {
160
- * stream.close(); // This may not close the stream.
161
- * // Artificially marking end-of-stream, as if the underlying resource had
162
- * // indicated end-of-file by itself, allows the stream to close.
163
- * // This does not cancel pending read operations, and if there is such an
164
- * // operation, the process may still not be able to exit successfully
165
- * // until it finishes.
166
- * stream.push(null);
167
- * stream.read(0);
168
- * }, 100);
169
- * ```
170
- *
171
- * If `autoClose` is false, then the file descriptor won't be closed, even if
172
- * there's an error. It is the application's responsibility to close it and make
173
- * sure there's no file descriptor leak. If `autoClose` is set to true (default
174
- * behavior), on `'error'` or `'end'` the file descriptor will be closed
175
- * automatically.
176
- *
177
- * An example to read the last 10 bytes of a file which is 100 bytes long:
178
- *
179
- * ```js
180
- * import { open } from 'node:fs/promises';
181
- *
182
- * const fd = await open('sample.txt');
183
- * fd.createReadStream({ start: 90, end: 99 });
184
- * ```
185
- * @since v16.11.0
186
- */
187
- createReadStream(options?: CreateReadStreamOptions): ReadStream;
188
- /**
189
- * `options` may also include a `start` option to allow writing data at some
190
- * position past the beginning of the file, allowed values are in the
191
- * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than
192
- * replacing it may require the `flags` `open` option to be set to `r+` rather than
193
- * the default `r`. The `encoding` can be any one of those accepted by `Buffer`.
194
- *
195
- * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false,
196
- * then the file descriptor won't be closed, even if there's an error.
197
- * It is the application's responsibility to close it and make sure there's no
198
- * file descriptor leak.
199
- *
200
- * By default, the stream will emit a `'close'` event after it has been
201
- * destroyed. Set the `emitClose` option to `false` to change this behavior.
202
- * @since v16.11.0
203
- */
204
- createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
205
- /**
206
- * Forces all currently queued I/O operations associated with the file to the
207
- * 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.
208
- *
209
- * Unlike `filehandle.sync` this method does not flush modified metadata.
210
- * @since v10.0.0
211
- * @return Fulfills with `undefined` upon success.
212
- */
213
- datasync(): Promise<void>;
214
- /**
215
- * Request that all data for the open file descriptor is flushed to the storage
216
- * device. The specific implementation is operating system and device specific.
217
- * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail.
218
- * @since v10.0.0
219
- * @return Fulfills with `undefined` upon success.
220
- */
221
- sync(): Promise<void>;
222
- /**
223
- * Reads data from the file and stores that in the given buffer.
224
- *
225
- * If the file is not modified concurrently, the end-of-file is reached when the
226
- * number of bytes read is zero.
227
- * @since v10.0.0
228
- * @param buffer A buffer that will be filled with the file data read.
229
- * @param offset The location in the buffer at which to start filling.
230
- * @param length The number of bytes to read.
231
- * @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
232
- * integer, the current file position will remain unchanged.
233
- * @return Fulfills upon success with an object with two properties:
234
- */
235
- read<T extends NodeJS.ArrayBufferView>(
236
- buffer: T,
237
- offset?: number | null,
238
- length?: number | null,
239
- position?: number | null,
240
- ): Promise<FileReadResult<T>>;
241
- read<T extends NodeJS.ArrayBufferView = Buffer>(
242
- buffer: T,
243
- options?: FileReadOptions<T>,
244
- ): Promise<FileReadResult<T>>;
245
- read<T extends NodeJS.ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
246
- /**
247
- * Returns a `ReadableStream` that may be used to read the files data.
248
- *
249
- * An error will be thrown if this method is called more than once or is called
250
- * after the `FileHandle` is closed or closing.
251
- *
252
- * ```js
253
- * import {
254
- * open,
255
- * } from 'node:fs/promises';
256
- *
257
- * const file = await open('./some/file/to/read');
258
- *
259
- * for await (const chunk of file.readableWebStream())
260
- * console.log(chunk);
261
- *
262
- * await file.close();
263
- * ```
264
- *
265
- * While the `ReadableStream` will read the file to completion, it will not
266
- * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
267
- * @since v17.0.0
268
- * @experimental
269
- */
270
- readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
271
- /**
272
- * Asynchronously reads the entire contents of a file.
273
- *
274
- * If `options` is a string, then it specifies the `encoding`.
275
- *
276
- * The `FileHandle` has to support reading.
277
- *
278
- * 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
279
- * position till the end of the file. It doesn't always read from the beginning
280
- * of the file.
281
- * @since v10.0.0
282
- * @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
283
- * data will be a string.
284
- */
285
- readFile(
286
- options?: {
287
- encoding?: null | undefined;
288
- flag?: OpenMode | undefined;
289
- } | null,
290
- ): Promise<Buffer>;
291
- /**
292
- * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
293
- * The `FileHandle` must have been opened for reading.
294
- * @param options An object that may contain an optional flag.
295
- * If a flag is not provided, it defaults to `'r'`.
296
- */
297
- readFile(
298
- options:
299
- | {
300
- encoding: BufferEncoding;
301
- flag?: OpenMode | undefined;
302
- }
303
- | BufferEncoding,
304
- ): Promise<string>;
305
- /**
306
- * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
307
- * The `FileHandle` must have been opened for reading.
308
- * @param options An object that may contain an optional flag.
309
- * If a flag is not provided, it defaults to `'r'`.
310
- */
311
- readFile(
312
- options?:
313
- | (ObjectEncodingOptions & {
314
- flag?: OpenMode | undefined;
315
- })
316
- | BufferEncoding
317
- | null,
318
- ): Promise<string | Buffer>;
319
- /**
320
- * Convenience method to create a `readline` interface and stream over the file.
321
- * See `filehandle.createReadStream()` for the options.
322
- *
323
- * ```js
324
- * import { open } from 'node:fs/promises';
325
- *
326
- * const file = await open('./some/file/to/read');
327
- *
328
- * for await (const line of file.readLines()) {
329
- * console.log(line);
330
- * }
331
- * ```
332
- * @since v18.11.0
333
- */
334
- readLines(options?: CreateReadStreamOptions): ReadlineInterface;
335
- /**
336
- * @since v10.0.0
337
- * @return Fulfills with an {fs.Stats} for the file.
338
- */
339
- stat(
340
- opts?: StatOptions & {
341
- bigint?: false | undefined;
342
- },
343
- ): Promise<Stats>;
344
- stat(
345
- opts: StatOptions & {
346
- bigint: true;
347
- },
348
- ): Promise<BigIntStats>;
349
- stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
350
- /**
351
- * Truncates the file.
352
- *
353
- * If the file was larger than `len` bytes, only the first `len` bytes will be
354
- * retained in the file.
355
- *
356
- * The following example retains only the first four bytes of the file:
357
- *
358
- * ```js
359
- * import { open } from 'node:fs/promises';
360
- *
361
- * let filehandle = null;
362
- * try {
363
- * filehandle = await open('temp.txt', 'r+');
364
- * await filehandle.truncate(4);
365
- * } finally {
366
- * await filehandle?.close();
367
- * }
368
- * ```
369
- *
370
- * If the file previously was shorter than `len` bytes, it is extended, and the
371
- * extended part is filled with null bytes (`'\0'`):
372
- *
373
- * If `len` is negative then `0` will be used.
374
- * @since v10.0.0
375
- * @param [len=0]
376
- * @return Fulfills with `undefined` upon success.
377
- */
378
- truncate(len?: number): Promise<void>;
379
- /**
380
- * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success.
381
- * @since v10.0.0
382
- */
383
- utimes(atime: TimeLike, mtime: TimeLike): Promise<void>;
384
- /**
385
- * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
386
- * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
387
- * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
388
- * The promise is fulfilled with no arguments upon success.
389
- *
390
- * If `options` is a string, then it specifies the `encoding`.
391
- *
392
- * The `FileHandle` has to support writing.
393
- *
394
- * It is unsafe to use `filehandle.writeFile()` multiple times on the same file
395
- * without waiting for the promise to be fulfilled (or rejected).
396
- *
397
- * 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
398
- * current position till the end of the file. It doesn't always write from the
399
- * beginning of the file.
400
- * @since v10.0.0
401
- */
402
- writeFile(
403
- data: string | Uint8Array,
404
- options?:
405
- | (ObjectEncodingOptions & Abortable)
406
- | BufferEncoding
407
- | null,
408
- ): Promise<void>;
409
- /**
410
- * Write `buffer` to the file.
411
- *
412
- * The promise is fulfilled with an object containing two properties:
413
- *
414
- * It is unsafe to use `filehandle.write()` multiple times on the same file
415
- * without waiting for the promise to be fulfilled (or rejected). For this
416
- * scenario, use `filehandle.createWriteStream()`.
417
- *
418
- * On Linux, positional writes do not work when the file is opened in append mode.
419
- * The kernel ignores the position argument and always appends the data to
420
- * the end of the file.
421
- * @since v10.0.0
422
- * @param offset The start position from within `buffer` where the data to write begins.
423
- * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
424
- * @param [position='null'] 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
425
- * position. See the POSIX pwrite(2) documentation for more detail.
426
- */
427
- write<TBuffer extends Uint8Array>(
428
- buffer: TBuffer,
429
- offset?: number | null,
430
- length?: number | null,
431
- position?: number | null,
432
- ): Promise<{
433
- bytesWritten: number;
434
- buffer: TBuffer;
435
- }>;
436
- write<TBuffer extends Uint8Array>(
437
- buffer: TBuffer,
438
- options?: { offset?: number; length?: number; position?: number },
439
- ): Promise<{
440
- bytesWritten: number;
441
- buffer: TBuffer;
442
- }>;
443
- write(
444
- data: string,
445
- position?: number | null,
446
- encoding?: BufferEncoding | null,
447
- ): Promise<{
448
- bytesWritten: number;
449
- buffer: string;
450
- }>;
451
- /**
452
- * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
453
- *
454
- * The promise is fulfilled with an object containing a two properties:
455
- *
456
- * It is unsafe to call `writev()` multiple times on the same file without waiting
457
- * for the promise to be fulfilled (or rejected).
458
- *
459
- * On Linux, positional writes don't work when the file is opened in append mode.
460
- * The kernel ignores the position argument and always appends the data to
461
- * the end of the file.
462
- * @since v12.9.0
463
- * @param [position='null'] 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
464
- * position.
465
- */
466
- writev(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
467
- /**
468
- * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
469
- * @since v13.13.0, v12.17.0
470
- * @param [position='null'] 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.
471
- * @return Fulfills upon success an object containing two properties:
472
- */
473
- readv(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<ReadVResult>;
474
- /**
475
- * Closes the file handle after waiting for any pending operation on the handle to
476
- * complete.
477
- *
478
- * ```js
479
- * import { open } from 'node:fs/promises';
480
- *
481
- * let filehandle;
482
- * try {
483
- * filehandle = await open('thefile.txt', 'r');
484
- * } finally {
485
- * await filehandle?.close();
486
- * }
487
- * ```
488
- * @since v10.0.0
489
- * @return Fulfills with `undefined` upon success.
490
- */
491
- close(): Promise<void>;
492
- /**
493
- * An alias for {@link FileHandle.close()}.
494
- * @since v20.4.0
495
- */
496
- [Symbol.asyncDispose](): Promise<void>;
497
- }
498
- const constants: typeof fsConstants;
499
- /**
500
- * Tests a user's permissions for the file or directory specified by `path`.
501
- * The `mode` argument is an optional integer that specifies the accessibility
502
- * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK`
503
- * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for
504
- * possible values of `mode`.
505
- *
506
- * If the accessibility check is successful, the promise is fulfilled with no
507
- * value. If any of the accessibility checks fail, the promise is rejected
508
- * 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
509
- * written by the current process.
510
- *
511
- * ```js
512
- * import { access, constants } from 'node:fs/promises';
513
- *
514
- * try {
515
- * await access('/etc/passwd', constants.R_OK | constants.W_OK);
516
- * console.log('can access');
517
- * } catch {
518
- * console.error('cannot access');
519
- * }
520
- * ```
521
- *
522
- * Using `fsPromises.access()` to check for the accessibility of a file before
523
- * calling `fsPromises.open()` is not recommended. Doing so introduces a race
524
- * condition, since other processes may change the file's state between the two
525
- * calls. Instead, user code should open/read/write the file directly and handle
526
- * the error raised if the file is not accessible.
527
- * @since v10.0.0
528
- * @param [mode=fs.constants.F_OK]
529
- * @return Fulfills with `undefined` upon success.
530
- */
531
- function access(path: PathLike, mode?: number): Promise<void>;
532
- /**
533
- * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
534
- * already exists.
535
- *
536
- * No guarantees are made about the atomicity of the copy operation. If an
537
- * error occurs after the destination file has been opened for writing, an attempt
538
- * will be made to remove the destination.
539
- *
540
- * ```js
541
- * import { copyFile, constants } from 'node:fs/promises';
542
- *
543
- * try {
544
- * await copyFile('source.txt', 'destination.txt');
545
- * console.log('source.txt was copied to destination.txt');
546
- * } catch {
547
- * console.error('The file could not be copied');
548
- * }
549
- *
550
- * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
551
- * try {
552
- * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL);
553
- * console.log('source.txt was copied to destination.txt');
554
- * } catch {
555
- * console.error('The file could not be copied');
556
- * }
557
- * ```
558
- * @since v10.0.0
559
- * @param src source filename to copy
560
- * @param dest destination filename of the copy operation
561
- * @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.
562
- * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
563
- * @return Fulfills with `undefined` upon success.
564
- */
565
- function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
566
- /**
567
- * Opens a `FileHandle`.
568
- *
569
- * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail.
570
- *
571
- * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
572
- * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
573
- * 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).
574
- * @since v10.0.0
575
- * @param [flags='r'] See `support of file system `flags``.
576
- * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
577
- * @return Fulfills with a {FileHandle} object.
578
- */
579
- function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
580
- /**
581
- * Renames `oldPath` to `newPath`.
582
- * @since v10.0.0
583
- * @return Fulfills with `undefined` upon success.
584
- */
585
- function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
586
- /**
587
- * Truncates (shortens or extends the length) of the content at `path` to `len` bytes.
588
- * @since v10.0.0
589
- * @param [len=0]
590
- * @return Fulfills with `undefined` upon success.
591
- */
592
- function truncate(path: PathLike, len?: number): Promise<void>;
593
- /**
594
- * Removes the directory identified by `path`.
595
- *
596
- * Using `fsPromises.rmdir()` on a file (not a directory) results in the
597
- * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX.
598
- *
599
- * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`.
600
- * @since v10.0.0
601
- * @return Fulfills with `undefined` upon success.
602
- */
603
- function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
604
- /**
605
- * Removes files and directories (modeled on the standard POSIX `rm` utility).
606
- * @since v14.14.0
607
- * @return Fulfills with `undefined` upon success.
608
- */
609
- function rm(path: PathLike, options?: RmOptions): Promise<void>;
610
- /**
611
- * Asynchronously creates a directory.
612
- *
613
- * The optional `options` argument can be an integer specifying `mode` (permission
614
- * 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
615
- * that exists results in a
616
- * rejection only when `recursive` is false.
617
- *
618
- * ```js
619
- * import { mkdir } from 'node:fs/promises';
620
- *
621
- * try {
622
- * const projectFolder = new URL('./test/project/', import.meta.url);
623
- * const createDir = await mkdir(projectFolder, { recursive: true });
624
- *
625
- * console.log(`created ${createDir}`);
626
- * } catch (err) {
627
- * console.error(err.message);
628
- * }
629
- * ```
630
- * @since v10.0.0
631
- * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.
632
- */
633
- function mkdir(
634
- path: PathLike,
635
- options: MakeDirectoryOptions & {
636
- recursive: true;
637
- },
638
- ): Promise<string | undefined>;
639
- /**
640
- * Asynchronous mkdir(2) - create a directory.
641
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
642
- * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
643
- * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
644
- */
645
- function mkdir(
646
- path: PathLike,
647
- options?:
648
- | Mode
649
- | (MakeDirectoryOptions & {
650
- recursive?: false | undefined;
651
- })
652
- | null,
653
- ): Promise<void>;
654
- /**
655
- * Asynchronous mkdir(2) - create a directory.
656
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
657
- * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
658
- * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
659
- */
660
- function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
661
- /**
662
- * Reads the contents of a directory.
663
- *
664
- * The optional `options` argument can be a string specifying an encoding, or an
665
- * object with an `encoding` property specifying the character encoding to use for
666
- * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned
667
- * will be passed as `Buffer` objects.
668
- *
669
- * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects.
670
- *
671
- * ```js
672
- * import { readdir } from 'node:fs/promises';
673
- *
674
- * try {
675
- * const files = await readdir(path);
676
- * for (const file of files)
677
- * console.log(file);
678
- * } catch (err) {
679
- * console.error(err);
680
- * }
681
- * ```
682
- * @since v10.0.0
683
- * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`.
684
- */
685
- function readdir(
686
- path: PathLike,
687
- options?:
688
- | (ObjectEncodingOptions & {
689
- withFileTypes?: false | undefined;
690
- recursive?: boolean | undefined;
691
- })
692
- | BufferEncoding
693
- | null,
694
- ): Promise<string[]>;
695
- /**
696
- * Asynchronous readdir(3) - read a directory.
697
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
698
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
699
- */
700
- function readdir(
701
- path: PathLike,
702
- options:
703
- | {
704
- encoding: "buffer";
705
- withFileTypes?: false | undefined;
706
- recursive?: boolean | undefined;
707
- }
708
- | "buffer",
709
- ): Promise<Buffer[]>;
710
- /**
711
- * Asynchronous readdir(3) - read a directory.
712
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
713
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
714
- */
715
- function readdir(
716
- path: PathLike,
717
- options?:
718
- | (ObjectEncodingOptions & {
719
- withFileTypes?: false | undefined;
720
- recursive?: boolean | undefined;
721
- })
722
- | BufferEncoding
723
- | null,
724
- ): Promise<string[] | Buffer[]>;
725
- /**
726
- * Asynchronous readdir(3) - read a directory.
727
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
728
- * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
729
- */
730
- function readdir(
731
- path: PathLike,
732
- options: ObjectEncodingOptions & {
733
- withFileTypes: true;
734
- recursive?: boolean | undefined;
735
- },
736
- ): Promise<Dirent[]>;
737
- /**
738
- * 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
739
- * fulfilled with the`linkString` upon success.
740
- *
741
- * The optional `options` argument can be a string specifying an encoding, or an
742
- * object with an `encoding` property specifying the character encoding to use for
743
- * the link path returned. If the `encoding` is set to `'buffer'`, the link path
744
- * returned will be passed as a `Buffer` object.
745
- * @since v10.0.0
746
- * @return Fulfills with the `linkString` upon success.
747
- */
748
- function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
749
- /**
750
- * Asynchronous readlink(2) - read value of a symbolic link.
751
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
752
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
753
- */
754
- function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
755
- /**
756
- * Asynchronous readlink(2) - read value of a symbolic link.
757
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
758
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
759
- */
760
- function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
761
- /**
762
- * Creates a symbolic link.
763
- *
764
- * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will
765
- * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
766
- * exist, `'file'` will be used. Windows junction points require the destination
767
- * path to be absolute. When using `'junction'`, the `target` argument will
768
- * automatically be normalized to absolute path. Junction points on NTFS volumes
769
- * can only point to directories.
770
- * @since v10.0.0
771
- * @param [type='null']
772
- * @return Fulfills with `undefined` upon success.
773
- */
774
- function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
775
- /**
776
- * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link,
777
- * in which case the link itself is stat-ed, not the file that it refers to.
778
- * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail.
779
- * @since v10.0.0
780
- * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`.
781
- */
782
- function lstat(
783
- path: PathLike,
784
- opts?: StatOptions & {
785
- bigint?: false | undefined;
786
- },
787
- ): Promise<Stats>;
788
- function lstat(
789
- path: PathLike,
790
- opts: StatOptions & {
791
- bigint: true;
792
- },
793
- ): Promise<BigIntStats>;
794
- function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
795
- /**
796
- * @since v10.0.0
797
- * @return Fulfills with the {fs.Stats} object for the given `path`.
798
- */
799
- function stat(
800
- path: PathLike,
801
- opts?: StatOptions & {
802
- bigint?: false | undefined;
803
- },
804
- ): Promise<Stats>;
805
- function stat(
806
- path: PathLike,
807
- opts: StatOptions & {
808
- bigint: true;
809
- },
810
- ): Promise<BigIntStats>;
811
- function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
812
- /**
813
- * @since v19.6.0, v18.15.0
814
- * @return Fulfills with the {fs.StatFs} object for the given `path`.
815
- */
816
- function statfs(
817
- path: PathLike,
818
- opts?: StatFsOptions & {
819
- bigint?: false | undefined;
820
- },
821
- ): Promise<StatsFs>;
822
- function statfs(
823
- path: PathLike,
824
- opts: StatFsOptions & {
825
- bigint: true;
826
- },
827
- ): Promise<BigIntStatsFs>;
828
- function statfs(path: PathLike, opts?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
829
- /**
830
- * 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.
831
- * @since v10.0.0
832
- * @return Fulfills with `undefined` upon success.
833
- */
834
- function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
835
- /**
836
- * If `path` refers to a symbolic link, then the link is removed without affecting
837
- * the file or directory to which that link refers. If the `path` refers to a file
838
- * 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.
839
- * @since v10.0.0
840
- * @return Fulfills with `undefined` upon success.
841
- */
842
- function unlink(path: PathLike): Promise<void>;
843
- /**
844
- * Changes the permissions of a file.
845
- * @since v10.0.0
846
- * @return Fulfills with `undefined` upon success.
847
- */
848
- function chmod(path: PathLike, mode: Mode): Promise<void>;
849
- /**
850
- * Changes the permissions on a symbolic link.
851
- *
852
- * This method is only implemented on macOS.
853
- * @deprecated Since v10.0.0
854
- * @return Fulfills with `undefined` upon success.
855
- */
856
- function lchmod(path: PathLike, mode: Mode): Promise<void>;
857
- /**
858
- * Changes the ownership on a symbolic link.
859
- * @since v10.0.0
860
- * @return Fulfills with `undefined` upon success.
861
- */
862
- function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
863
- /**
864
- * 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
865
- * symbolic link, then the link is not dereferenced: instead, the timestamps of
866
- * the symbolic link itself are changed.
867
- * @since v14.5.0, v12.19.0
868
- * @return Fulfills with `undefined` upon success.
869
- */
870
- function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
871
- /**
872
- * Changes the ownership of a file.
873
- * @since v10.0.0
874
- * @return Fulfills with `undefined` upon success.
875
- */
876
- function chown(path: PathLike, uid: number, gid: number): Promise<void>;
877
- /**
878
- * Change the file system timestamps of the object referenced by `path`.
879
- *
880
- * The `atime` and `mtime` arguments follow these rules:
881
- *
882
- * * Values can be either numbers representing Unix epoch time, `Date`s, or a
883
- * numeric string like `'123456789.0'`.
884
- * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown.
885
- * @since v10.0.0
886
- * @return Fulfills with `undefined` upon success.
887
- */
888
- function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise<void>;
889
- /**
890
- * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function.
891
- *
892
- * Only paths that can be converted to UTF8 strings are supported.
893
- *
894
- * The optional `options` argument can be a string specifying an encoding, or an
895
- * object with an `encoding` property specifying the character encoding to use for
896
- * the path. If the `encoding` is set to `'buffer'`, the path returned will be
897
- * passed as a `Buffer` object.
898
- *
899
- * On Linux, when Node.js is linked against musl libc, the procfs file system must
900
- * be mounted on `/proc` in order for this function to work. Glibc does not have
901
- * this restriction.
902
- * @since v10.0.0
903
- * @return Fulfills with the resolved path upon success.
904
- */
905
- function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
906
- /**
907
- * Asynchronous realpath(3) - return the canonicalized absolute pathname.
908
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
909
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
910
- */
911
- function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
912
- /**
913
- * Asynchronous realpath(3) - return the canonicalized absolute pathname.
914
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
915
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
916
- */
917
- function realpath(
918
- path: PathLike,
919
- options?: ObjectEncodingOptions | BufferEncoding | null,
920
- ): Promise<string | Buffer>;
921
- /**
922
- * Creates a unique temporary directory. A unique directory name is generated by
923
- * appending six random characters to the end of the provided `prefix`. Due to
924
- * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some
925
- * platforms, notably the BSDs, can return more than six random characters, and
926
- * replace trailing `X` characters in `prefix` with random characters.
927
- *
928
- * The optional `options` argument can be a string specifying an encoding, or an
929
- * object with an `encoding` property specifying the character encoding to use.
930
- *
931
- * ```js
932
- * import { mkdtemp } from 'node:fs/promises';
933
- * import { join } from 'node:path';
934
- * import { tmpdir } from 'node:os';
935
- *
936
- * try {
937
- * await mkdtemp(join(tmpdir(), 'foo-'));
938
- * } catch (err) {
939
- * console.error(err);
940
- * }
941
- * ```
942
- *
943
- * The `fsPromises.mkdtemp()` method will append the six randomly selected
944
- * 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
945
- * platform-specific path separator
946
- * (`import { sep } from 'node:path'`).
947
- * @since v10.0.0
948
- * @return Fulfills with a string containing the file system path of the newly created temporary directory.
949
- */
950
- function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
951
- /**
952
- * Asynchronously creates a unique temporary directory.
953
- * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
954
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
955
- */
956
- function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
957
- /**
958
- * Asynchronously creates a unique temporary directory.
959
- * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
960
- * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
961
- */
962
- function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
963
- /**
964
- * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an
965
- * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
966
- * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
967
- *
968
- * The `encoding` option is ignored if `data` is a buffer.
969
- *
970
- * If `options` is a string, then it specifies the encoding.
971
- *
972
- * The `mode` option only affects the newly created file. See `fs.open()` for more details.
973
- *
974
- * Any specified `FileHandle` has to support writing.
975
- *
976
- * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
977
- * without waiting for the promise to be settled.
978
- *
979
- * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience
980
- * method that performs multiple `write` calls internally to write the buffer
981
- * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`.
982
- *
983
- * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`.
984
- * Cancelation is "best effort", and some amount of data is likely still
985
- * to be written.
986
- *
987
- * ```js
988
- * import { writeFile } from 'node:fs/promises';
989
- * import { Buffer } from 'node:buffer';
990
- *
991
- * try {
992
- * const controller = new AbortController();
993
- * const { signal } = controller;
994
- * const data = new Uint8Array(Buffer.from('Hello Node.js'));
995
- * const promise = writeFile('message.txt', data, { signal });
996
- *
997
- * // Abort the request before the promise settles.
998
- * controller.abort();
999
- *
1000
- * await promise;
1001
- * } catch (err) {
1002
- * // When a request is aborted - err is an AbortError
1003
- * console.error(err);
1004
- * }
1005
- * ```
1006
- *
1007
- * Aborting an ongoing request does not abort individual operating
1008
- * system requests but rather the internal buffering `fs.writeFile` performs.
1009
- * @since v10.0.0
1010
- * @param file filename or `FileHandle`
1011
- * @return Fulfills with `undefined` upon success.
1012
- */
1013
- function writeFile(
1014
- file: PathLike | FileHandle,
1015
- data:
1016
- | string
1017
- | NodeJS.ArrayBufferView
1018
- | Iterable<string | NodeJS.ArrayBufferView>
1019
- | AsyncIterable<string | NodeJS.ArrayBufferView>
1020
- | Stream,
1021
- options?:
1022
- | (ObjectEncodingOptions & {
1023
- mode?: Mode | undefined;
1024
- flag?: OpenMode | undefined;
1025
- /**
1026
- * If all data is successfully written to the file, and `flush`
1027
- * is `true`, `filehandle.sync()` is used to flush the data.
1028
- * @default false
1029
- */
1030
- flush?: boolean | undefined;
1031
- } & Abortable)
1032
- | BufferEncoding
1033
- | null,
1034
- ): Promise<void>;
1035
- /**
1036
- * Asynchronously append data to a file, creating the file if it does not yet
1037
- * exist. `data` can be a string or a `Buffer`.
1038
- *
1039
- * If `options` is a string, then it specifies the `encoding`.
1040
- *
1041
- * The `mode` option only affects the newly created file. See `fs.open()` for more details.
1042
- *
1043
- * The `path` may be specified as a `FileHandle` that has been opened
1044
- * for appending (using `fsPromises.open()`).
1045
- * @since v10.0.0
1046
- * @param path filename or {FileHandle}
1047
- * @return Fulfills with `undefined` upon success.
1048
- */
1049
- function appendFile(
1050
- path: PathLike | FileHandle,
1051
- data: string | Uint8Array,
1052
- options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null,
1053
- ): Promise<void>;
1054
- /**
1055
- * Asynchronously reads the entire contents of a file.
1056
- *
1057
- * If no encoding is specified (using `options.encoding`), the data is returned
1058
- * as a `Buffer` object. Otherwise, the data will be a string.
1059
- *
1060
- * If `options` is a string, then it specifies the encoding.
1061
- *
1062
- * When the `path` is a directory, the behavior of `fsPromises.readFile()` is
1063
- * platform-specific. On macOS, Linux, and Windows, the promise will be rejected
1064
- * with an error. On FreeBSD, a representation of the directory's contents will be
1065
- * returned.
1066
- *
1067
- * An example of reading a `package.json` file located in the same directory of the
1068
- * running code:
1069
- *
1070
- * ```js
1071
- * import { readFile } from 'node:fs/promises';
1072
- * try {
1073
- * const filePath = new URL('./package.json', import.meta.url);
1074
- * const contents = await readFile(filePath, { encoding: 'utf8' });
1075
- * console.log(contents);
1076
- * } catch (err) {
1077
- * console.error(err.message);
1078
- * }
1079
- * ```
1080
- *
1081
- * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a
1082
- * request is aborted the promise returned is rejected with an `AbortError`:
1083
- *
1084
- * ```js
1085
- * import { readFile } from 'node:fs/promises';
1086
- *
1087
- * try {
1088
- * const controller = new AbortController();
1089
- * const { signal } = controller;
1090
- * const promise = readFile(fileName, { signal });
1091
- *
1092
- * // Abort the request before the promise settles.
1093
- * controller.abort();
1094
- *
1095
- * await promise;
1096
- * } catch (err) {
1097
- * // When a request is aborted - err is an AbortError
1098
- * console.error(err);
1099
- * }
1100
- * ```
1101
- *
1102
- * Aborting an ongoing request does not abort individual operating
1103
- * system requests but rather the internal buffering `fs.readFile` performs.
1104
- *
1105
- * Any specified `FileHandle` has to support reading.
1106
- * @since v10.0.0
1107
- * @param path filename or `FileHandle`
1108
- * @return Fulfills with the contents of the file.
1109
- */
1110
- function readFile(
1111
- path: PathLike | FileHandle,
1112
- options?:
1113
- | ({
1114
- encoding?: null | undefined;
1115
- flag?: OpenMode | undefined;
1116
- } & Abortable)
1117
- | null,
1118
- ): Promise<Buffer>;
1119
- /**
1120
- * Asynchronously reads the entire contents of a file.
1121
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1122
- * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
1123
- * @param options An object that may contain an optional flag.
1124
- * If a flag is not provided, it defaults to `'r'`.
1125
- */
1126
- function readFile(
1127
- path: PathLike | FileHandle,
1128
- options:
1129
- | ({
1130
- encoding: BufferEncoding;
1131
- flag?: OpenMode | undefined;
1132
- } & Abortable)
1133
- | BufferEncoding,
1134
- ): Promise<string>;
1135
- /**
1136
- * Asynchronously reads the entire contents of a file.
1137
- * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1138
- * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
1139
- * @param options An object that may contain an optional flag.
1140
- * If a flag is not provided, it defaults to `'r'`.
1141
- */
1142
- function readFile(
1143
- path: PathLike | FileHandle,
1144
- options?:
1145
- | (
1146
- & ObjectEncodingOptions
1147
- & Abortable
1148
- & {
1149
- flag?: OpenMode | undefined;
1150
- }
1151
- )
1152
- | BufferEncoding
1153
- | null,
1154
- ): Promise<string | Buffer>;
1155
- /**
1156
- * 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.
1157
- *
1158
- * Creates an `fs.Dir`, which contains all further functions for reading from
1159
- * and cleaning up the directory.
1160
- *
1161
- * The `encoding` option sets the encoding for the `path` while opening the
1162
- * directory and subsequent read operations.
1163
- *
1164
- * Example using async iteration:
1165
- *
1166
- * ```js
1167
- * import { opendir } from 'node:fs/promises';
1168
- *
1169
- * try {
1170
- * const dir = await opendir('./');
1171
- * for await (const dirent of dir)
1172
- * console.log(dirent.name);
1173
- * } catch (err) {
1174
- * console.error(err);
1175
- * }
1176
- * ```
1177
- *
1178
- * When using the async iterator, the `fs.Dir` object will be automatically
1179
- * closed after the iterator exits.
1180
- * @since v12.12.0
1181
- * @return Fulfills with an {fs.Dir}.
1182
- */
1183
- function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
1184
- /**
1185
- * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
1186
- *
1187
- * ```js
1188
- * import { watch } from 'node:fs/promises';
1189
- *
1190
- * const ac = new AbortController();
1191
- * const { signal } = ac;
1192
- * setTimeout(() => ac.abort(), 10000);
1193
- *
1194
- * (async () => {
1195
- * try {
1196
- * const watcher = watch(__filename, { signal });
1197
- * for await (const event of watcher)
1198
- * console.log(event);
1199
- * } catch (err) {
1200
- * if (err.name === 'AbortError')
1201
- * return;
1202
- * throw err;
1203
- * }
1204
- * })();
1205
- * ```
1206
- *
1207
- * On most platforms, `'rename'` is emitted whenever a filename appears or
1208
- * disappears in the directory.
1209
- *
1210
- * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`.
1211
- * @since v15.9.0, v14.18.0
1212
- * @return of objects with the properties:
1213
- */
1214
- function watch(
1215
- filename: PathLike,
1216
- options:
1217
- | (WatchOptions & {
1218
- encoding: "buffer";
1219
- })
1220
- | "buffer",
1221
- ): AsyncIterable<FileChangeInfo<Buffer>>;
1222
- /**
1223
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1224
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1225
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1226
- * If `encoding` is not supplied, the default of `'utf8'` is used.
1227
- * If `persistent` is not supplied, the default of `true` is used.
1228
- * If `recursive` is not supplied, the default of `false` is used.
1229
- */
1230
- function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
1231
- /**
1232
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1233
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1234
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1235
- * If `encoding` is not supplied, the default of `'utf8'` is used.
1236
- * If `persistent` is not supplied, the default of `true` is used.
1237
- * If `recursive` is not supplied, the default of `false` is used.
1238
- */
1239
- function watch(
1240
- filename: PathLike,
1241
- options: WatchOptions | string,
1242
- ): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
1243
- /**
1244
- * Asynchronously copies the entire directory structure from `src` to `dest`,
1245
- * including subdirectories and files.
1246
- *
1247
- * When copying a directory to another directory, globs are not supported and
1248
- * behavior is similar to `cp dir1/ dir2/`.
1249
- * @since v16.7.0
1250
- * @experimental
1251
- * @param src source path to copy.
1252
- * @param dest destination path to copy to.
1253
- * @return Fulfills with `undefined` upon success.
1254
- */
1255
- function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
1256
- /**
1257
- * Retrieves the files matching the specified pattern.
1258
- */
1259
- function glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
1260
- function glob(
1261
- pattern: string | string[],
1262
- opt: GlobOptionsWithFileTypes,
1263
- ): NodeJS.AsyncIterator<Dirent>;
1264
- function glob(
1265
- pattern: string | string[],
1266
- opt: GlobOptionsWithoutFileTypes,
1267
- ): NodeJS.AsyncIterator<string>;
1268
- function glob(
1269
- pattern: string | string[],
1270
- opt: GlobOptions,
1271
- ): NodeJS.AsyncIterator<Dirent | string>;
1272
- }
1273
- declare module "node:fs/promises" {
1274
- export * from "fs/promises";
1275
- }