@bleedingdev/modern-js-utils 3.2.0-ultramodern.0

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 (387) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -0
  3. package/dist/cjs/cli/alias.js +82 -0
  4. package/dist/cjs/cli/applyOptionsChain.js +50 -0
  5. package/dist/cjs/cli/commands.js +69 -0
  6. package/dist/cjs/cli/common.js +59 -0
  7. package/dist/cjs/cli/config.js +39 -0
  8. package/dist/cjs/cli/constants.js +136 -0
  9. package/dist/cjs/cli/ensure.js +56 -0
  10. package/dist/cjs/cli/fs.js +46 -0
  11. package/dist/cjs/cli/get/config.js +48 -0
  12. package/dist/cjs/cli/get/data.js +106 -0
  13. package/dist/cjs/cli/get/index.js +112 -0
  14. package/dist/cjs/cli/index.js +212 -0
  15. package/dist/cjs/cli/is/config.js +86 -0
  16. package/dist/cjs/cli/is/env.js +52 -0
  17. package/dist/cjs/cli/is/index.js +79 -0
  18. package/dist/cjs/cli/is/project.js +147 -0
  19. package/dist/cjs/cli/is/type.js +84 -0
  20. package/dist/cjs/cli/logger.js +39 -0
  21. package/dist/cjs/cli/modulePath.js +87 -0
  22. package/dist/cjs/cli/monorepo.js +110 -0
  23. package/dist/cjs/cli/package.js +97 -0
  24. package/dist/cjs/cli/path.js +111 -0
  25. package/dist/cjs/cli/port.js +79 -0
  26. package/dist/cjs/cli/prettyInstructions.js +117 -0
  27. package/dist/cjs/cli/require.js +127 -0
  28. package/dist/cjs/cli/route.js +76 -0
  29. package/dist/cjs/cli/runtimeExports.js +86 -0
  30. package/dist/cjs/cli/tsconfig.js +51 -0
  31. package/dist/cjs/cli/version.js +67 -0
  32. package/dist/cjs/cli/watch.js +87 -0
  33. package/dist/cjs/compiled.js +209 -0
  34. package/dist/cjs/import.js +56 -0
  35. package/dist/cjs/index.js +72 -0
  36. package/dist/cjs/universal/constants.js +84 -0
  37. package/dist/cjs/universal/index.js +36 -0
  38. package/dist/cjs/universal/path.js +36 -0
  39. package/dist/cjs/universal/pluginDagSort.js +75 -0
  40. package/dist/compiled/address/index.js +171 -0
  41. package/dist/compiled/address/lib/address.d.ts +28 -0
  42. package/dist/compiled/address/package.json +1 -0
  43. package/dist/compiled/browserslist/index.d.ts +178 -0
  44. package/dist/compiled/browserslist/index.js +1329 -0
  45. package/dist/compiled/browserslist/license +20 -0
  46. package/dist/compiled/browserslist/package.json +1 -0
  47. package/dist/compiled/chalk/index.d.ts +415 -0
  48. package/dist/compiled/chalk/index.js +2368 -0
  49. package/dist/compiled/chalk/license +9 -0
  50. package/dist/compiled/chalk/package.json +1 -0
  51. package/dist/compiled/chokidar/anymatch/index.d.ts +19 -0
  52. package/dist/compiled/chokidar/fsevents.node +0 -0
  53. package/dist/compiled/chokidar/index.js +4162 -0
  54. package/dist/compiled/chokidar/index.js.LICENSE.txt +41 -0
  55. package/dist/compiled/chokidar/license +21 -0
  56. package/dist/compiled/chokidar/package.json +1 -0
  57. package/dist/compiled/chokidar/types/index.d.ts +188 -0
  58. package/dist/compiled/commander/index.js +1540 -0
  59. package/dist/compiled/commander/index.mjs +2 -0
  60. package/dist/compiled/commander/license +22 -0
  61. package/dist/compiled/commander/package.json +1 -0
  62. package/dist/compiled/commander/typings/index.d.ts +890 -0
  63. package/dist/compiled/debug/index.d.ts +54 -0
  64. package/dist/compiled/debug/index.js +621 -0
  65. package/dist/compiled/debug/license +20 -0
  66. package/dist/compiled/debug/ms/index.d.ts +25 -0
  67. package/dist/compiled/debug/package.json +1 -0
  68. package/dist/compiled/dotenv/index.js +101 -0
  69. package/dist/compiled/dotenv/license +23 -0
  70. package/dist/compiled/dotenv/package.json +1 -0
  71. package/dist/compiled/dotenv/types/index.d.ts +59 -0
  72. package/dist/compiled/dotenv-expand/index.d.ts +15 -0
  73. package/dist/compiled/dotenv-expand/index.js +54 -0
  74. package/dist/compiled/dotenv-expand/license +24 -0
  75. package/dist/compiled/dotenv-expand/package.json +1 -0
  76. package/dist/compiled/execa/index.d.ts +564 -0
  77. package/dist/compiled/execa/index.js +1738 -0
  78. package/dist/compiled/execa/license +9 -0
  79. package/dist/compiled/execa/package.json +1 -0
  80. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
  81. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +12 -0
  82. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
  83. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +20 -0
  84. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
  85. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
  86. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +12 -0
  87. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
  88. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +16 -0
  89. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +4 -0
  90. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +14 -0
  91. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
  92. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
  93. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
  94. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +30 -0
  95. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +8 -0
  96. package/dist/compiled/fast-glob/index.js +4665 -0
  97. package/dist/compiled/fast-glob/index.js.LICENSE.txt +38 -0
  98. package/dist/compiled/fast-glob/license +21 -0
  99. package/dist/compiled/fast-glob/out/index.d.ts +27 -0
  100. package/dist/compiled/fast-glob/out/managers/tasks.d.ts +22 -0
  101. package/dist/compiled/fast-glob/out/settings.d.ts +164 -0
  102. package/dist/compiled/fast-glob/out/types/index.d.ts +31 -0
  103. package/dist/compiled/fast-glob/package.json +1 -0
  104. package/dist/compiled/filesize/filesize.d.ts +131 -0
  105. package/dist/compiled/filesize/index.js +198 -0
  106. package/dist/compiled/filesize/index.js.LICENSE.txt +7 -0
  107. package/dist/compiled/filesize/license +28 -0
  108. package/dist/compiled/filesize/package.json +1 -0
  109. package/dist/compiled/fs-extra/index.d.ts +563 -0
  110. package/dist/compiled/fs-extra/index.js +2222 -0
  111. package/dist/compiled/fs-extra/license +15 -0
  112. package/dist/compiled/fs-extra/package.json +1 -0
  113. package/dist/compiled/glob/index.d.ts +91 -0
  114. package/dist/compiled/glob/index.js +2011 -0
  115. package/dist/compiled/glob/license +21 -0
  116. package/dist/compiled/glob/minimatch/index.d.ts +204 -0
  117. package/dist/compiled/glob/package.json +1 -0
  118. package/dist/compiled/globby/index.d.ts +186 -0
  119. package/dist/compiled/globby/index.js +690 -0
  120. package/dist/compiled/globby/license +9 -0
  121. package/dist/compiled/globby/package.json +1 -0
  122. package/dist/compiled/gzip-size/index.d.ts +96 -0
  123. package/dist/compiled/gzip-size/index.js +157 -0
  124. package/dist/compiled/gzip-size/license +9 -0
  125. package/dist/compiled/gzip-size/package.json +1 -0
  126. package/dist/compiled/import-lazy/index.d.ts +26 -0
  127. package/dist/compiled/import-lazy/index.js +45 -0
  128. package/dist/compiled/import-lazy/license +9 -0
  129. package/dist/compiled/import-lazy/package.json +1 -0
  130. package/dist/compiled/inquirer/index.d.ts +997 -0
  131. package/dist/compiled/inquirer/index.js +20167 -0
  132. package/dist/compiled/inquirer/index.js.LICENSE.txt +7 -0
  133. package/dist/compiled/inquirer/lib/objects/choice.d.ts +65 -0
  134. package/dist/compiled/inquirer/lib/objects/choices.d.ts +206 -0
  135. package/dist/compiled/inquirer/lib/objects/separator.d.ts +37 -0
  136. package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +37 -0
  137. package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +65 -0
  138. package/dist/compiled/inquirer/lib/ui/prompt.d.ts +104 -0
  139. package/dist/compiled/inquirer/license +22 -0
  140. package/dist/compiled/inquirer/package.json +1 -0
  141. package/dist/compiled/inquirer/through/index.d.ts +25 -0
  142. package/dist/compiled/js-yaml/index.d.ts +154 -0
  143. package/dist/compiled/js-yaml/index.js +2191 -0
  144. package/dist/compiled/js-yaml/index.mjs +2167 -0
  145. package/dist/compiled/js-yaml/index.mjs.LICENSE.txt +1 -0
  146. package/dist/compiled/js-yaml/license +21 -0
  147. package/dist/compiled/js-yaml/package.json +1 -0
  148. package/dist/compiled/json5/index.js +983 -0
  149. package/dist/compiled/json5/lib/index.d.ts +4 -0
  150. package/dist/compiled/json5/lib/parse.d.ts +15 -0
  151. package/dist/compiled/json5/lib/stringify.d.ts +89 -0
  152. package/dist/compiled/json5/package.json +1 -0
  153. package/dist/compiled/lodash/common/array.d.ts +2126 -0
  154. package/dist/compiled/lodash/common/collection.d.ts +1930 -0
  155. package/dist/compiled/lodash/common/common.d.ts +280 -0
  156. package/dist/compiled/lodash/common/date.d.ts +23 -0
  157. package/dist/compiled/lodash/common/function.d.ts +1446 -0
  158. package/dist/compiled/lodash/common/lang.d.ts +1693 -0
  159. package/dist/compiled/lodash/common/math.d.ts +405 -0
  160. package/dist/compiled/lodash/common/number.d.ts +131 -0
  161. package/dist/compiled/lodash/common/object.d.ts +2519 -0
  162. package/dist/compiled/lodash/common/seq.d.ts +210 -0
  163. package/dist/compiled/lodash/common/string.d.ts +788 -0
  164. package/dist/compiled/lodash/common/util.d.ts +1220 -0
  165. package/dist/compiled/lodash/index.d.ts +46 -0
  166. package/dist/compiled/lodash/index.js +1 -0
  167. package/dist/compiled/lodash/index.mjs +1 -0
  168. package/dist/compiled/lodash/license +47 -0
  169. package/dist/compiled/lodash/package.json +1 -0
  170. package/dist/compiled/mime-types/index.d.ts +14 -0
  171. package/dist/compiled/mime-types/index.js +116 -0
  172. package/dist/compiled/mime-types/index.js.LICENSE.txt +13 -0
  173. package/dist/compiled/mime-types/license +23 -0
  174. package/dist/compiled/mime-types/package.json +1 -0
  175. package/dist/compiled/minimist/index.d.ts +95 -0
  176. package/dist/compiled/minimist/index.js +202 -0
  177. package/dist/compiled/minimist/license +18 -0
  178. package/dist/compiled/minimist/package.json +1 -0
  179. package/dist/compiled/nanoid/index.d.ts +91 -0
  180. package/dist/compiled/nanoid/index.js +83 -0
  181. package/dist/compiled/nanoid/index.mjs +69 -0
  182. package/dist/compiled/nanoid/license +20 -0
  183. package/dist/compiled/nanoid/package.json +1 -0
  184. package/dist/compiled/ora/cli-spinners/index.d.ts +125 -0
  185. package/dist/compiled/ora/index.d.ts +277 -0
  186. package/dist/compiled/ora/index.js +3936 -0
  187. package/dist/compiled/ora/index.js.LICENSE.txt +1 -0
  188. package/dist/compiled/ora/license +9 -0
  189. package/dist/compiled/ora/package.json +1 -0
  190. package/dist/compiled/pkg-up/index.d.ts +48 -0
  191. package/dist/compiled/pkg-up/index.js +15 -0
  192. package/dist/compiled/pkg-up/license +9 -0
  193. package/dist/compiled/pkg-up/package.json +1 -0
  194. package/dist/compiled/semver/classes/comparator.d.ts +17 -0
  195. package/dist/compiled/semver/classes/range.d.ts +21 -0
  196. package/dist/compiled/semver/classes/semver.d.ts +62 -0
  197. package/dist/compiled/semver/functions/clean.d.ts +8 -0
  198. package/dist/compiled/semver/functions/cmp.d.ts +16 -0
  199. package/dist/compiled/semver/functions/coerce.d.ts +12 -0
  200. package/dist/compiled/semver/functions/compare-build.d.ts +16 -0
  201. package/dist/compiled/semver/functions/compare-loose.d.ts +5 -0
  202. package/dist/compiled/semver/functions/compare.d.ts +20 -0
  203. package/dist/compiled/semver/functions/diff.d.ts +13 -0
  204. package/dist/compiled/semver/functions/eq.d.ts +9 -0
  205. package/dist/compiled/semver/functions/gt.d.ts +9 -0
  206. package/dist/compiled/semver/functions/gte.d.ts +9 -0
  207. package/dist/compiled/semver/functions/inc.d.ts +15 -0
  208. package/dist/compiled/semver/functions/lt.d.ts +9 -0
  209. package/dist/compiled/semver/functions/lte.d.ts +8 -0
  210. package/dist/compiled/semver/functions/major.d.ts +9 -0
  211. package/dist/compiled/semver/functions/minor.d.ts +9 -0
  212. package/dist/compiled/semver/functions/neq.d.ts +9 -0
  213. package/dist/compiled/semver/functions/parse.d.ts +12 -0
  214. package/dist/compiled/semver/functions/patch.d.ts +9 -0
  215. package/dist/compiled/semver/functions/prerelease.d.ts +12 -0
  216. package/dist/compiled/semver/functions/rcompare.d.ts +15 -0
  217. package/dist/compiled/semver/functions/rsort.d.ts +9 -0
  218. package/dist/compiled/semver/functions/satisfies.d.ts +14 -0
  219. package/dist/compiled/semver/functions/sort.d.ts +9 -0
  220. package/dist/compiled/semver/functions/valid.d.ts +11 -0
  221. package/dist/compiled/semver/index.d.ts +133 -0
  222. package/dist/compiled/semver/index.js +1779 -0
  223. package/dist/compiled/semver/internals/identifiers.d.ts +13 -0
  224. package/dist/compiled/semver/license +15 -0
  225. package/dist/compiled/semver/package.json +1 -0
  226. package/dist/compiled/semver/ranges/gtr.d.ts +14 -0
  227. package/dist/compiled/semver/ranges/intersects.d.ts +13 -0
  228. package/dist/compiled/semver/ranges/ltr.d.ts +14 -0
  229. package/dist/compiled/semver/ranges/max-satisfying.d.ts +14 -0
  230. package/dist/compiled/semver/ranges/min-satisfying.d.ts +14 -0
  231. package/dist/compiled/semver/ranges/min-version.d.ts +10 -0
  232. package/dist/compiled/semver/ranges/outside.d.ts +15 -0
  233. package/dist/compiled/semver/ranges/simplify.d.ts +14 -0
  234. package/dist/compiled/semver/ranges/subset.d.ts +13 -0
  235. package/dist/compiled/semver/ranges/to-comparators.d.ts +9 -0
  236. package/dist/compiled/semver/ranges/valid.d.ts +12 -0
  237. package/dist/compiled/signale/index.d.ts +162 -0
  238. package/dist/compiled/signale/index.js +1704 -0
  239. package/dist/compiled/signale/package.json +1 -0
  240. package/dist/compiled/slash/index.d.ts +25 -0
  241. package/dist/compiled/slash/index.js +32 -0
  242. package/dist/compiled/slash/license +9 -0
  243. package/dist/compiled/slash/package.json +1 -0
  244. package/dist/compiled/strip-ansi/index.d.ts +17 -0
  245. package/dist/compiled/strip-ansi/index.js +34 -0
  246. package/dist/compiled/strip-ansi/license +9 -0
  247. package/dist/compiled/strip-ansi/package.json +1 -0
  248. package/dist/compiled/tsconfig-paths/index.js +629 -0
  249. package/dist/compiled/tsconfig-paths/index.mjs +2 -0
  250. package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +33 -0
  251. package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +34 -0
  252. package/dist/compiled/tsconfig-paths/lib/index.d.ts +5 -0
  253. package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +18 -0
  254. package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +21 -0
  255. package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +32 -0
  256. package/dist/compiled/tsconfig-paths/lib/register.d.ts +12 -0
  257. package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +15 -0
  258. package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +28 -0
  259. package/dist/compiled/tsconfig-paths/license +21 -0
  260. package/dist/compiled/tsconfig-paths/package.json +1 -0
  261. package/dist/compiled/upath/index.js +135 -0
  262. package/dist/compiled/upath/license +22 -0
  263. package/dist/compiled/upath/package.json +1 -0
  264. package/dist/compiled/upath/upath.d.ts +241 -0
  265. package/dist/compiled/url-join/index.d.ts +17 -0
  266. package/dist/compiled/url-join/index.js +61 -0
  267. package/dist/compiled/url-join/license +21 -0
  268. package/dist/compiled/url-join/package.json +1 -0
  269. package/dist/compiled/webpack-chain/index.js +1475 -0
  270. package/dist/compiled/webpack-chain/license +373 -0
  271. package/dist/compiled/webpack-chain/package.json +1 -0
  272. package/dist/compiled/webpack-chain/types/index.d.ts +599 -0
  273. package/dist/esm/cli/alias.mjs +31 -0
  274. package/dist/esm/cli/applyOptionsChain.mjs +16 -0
  275. package/dist/esm/cli/commands.mjs +23 -0
  276. package/dist/esm/cli/common.mjs +9 -0
  277. package/dist/esm/cli/config.mjs +5 -0
  278. package/dist/esm/cli/constants.mjs +30 -0
  279. package/dist/esm/cli/ensure.mjs +9 -0
  280. package/dist/esm/cli/fs.mjs +9 -0
  281. package/dist/esm/cli/get/config.mjs +14 -0
  282. package/dist/esm/cli/get/data.mjs +49 -0
  283. package/dist/esm/cli/get/index.mjs +18 -0
  284. package/dist/esm/cli/index.mjs +23 -0
  285. package/dist/esm/cli/is/config.mjs +37 -0
  286. package/dist/esm/cli/is/env.mjs +6 -0
  287. package/dist/esm/cli/is/index.mjs +4 -0
  288. package/dist/esm/cli/is/project.mjs +75 -0
  289. package/dist/esm/cli/is/type.mjs +26 -0
  290. package/dist/esm/cli/logger.mjs +1 -0
  291. package/dist/esm/cli/modulePath.mjs +33 -0
  292. package/dist/esm/cli/monorepo.mjs +50 -0
  293. package/dist/esm/cli/package.mjs +51 -0
  294. package/dist/esm/cli/path.mjs +35 -0
  295. package/dist/esm/cli/port.mjs +35 -0
  296. package/dist/esm/cli/prettyInstructions.mjs +70 -0
  297. package/dist/esm/cli/require.mjs +79 -0
  298. package/dist/esm/cli/route.mjs +36 -0
  299. package/dist/esm/cli/runtimeExports.mjs +42 -0
  300. package/dist/esm/cli/tsconfig.mjs +7 -0
  301. package/dist/esm/cli/version.mjs +24 -0
  302. package/dist/esm/cli/watch.mjs +40 -0
  303. package/dist/esm/compiled.mjs +45 -0
  304. package/dist/esm/import.mjs +9 -0
  305. package/dist/esm/index.mjs +3 -0
  306. package/dist/esm/rslib-runtime.mjs +12 -0
  307. package/dist/esm/universal/constants.mjs +14 -0
  308. package/dist/esm/universal/index.mjs +1 -0
  309. package/dist/esm/universal/path.mjs +2 -0
  310. package/dist/esm/universal/pluginDagSort.mjs +41 -0
  311. package/dist/esm-node/cli/alias.mjs +32 -0
  312. package/dist/esm-node/cli/applyOptionsChain.mjs +17 -0
  313. package/dist/esm-node/cli/commands.mjs +24 -0
  314. package/dist/esm-node/cli/common.mjs +10 -0
  315. package/dist/esm-node/cli/config.mjs +6 -0
  316. package/dist/esm-node/cli/constants.mjs +31 -0
  317. package/dist/esm-node/cli/ensure.mjs +10 -0
  318. package/dist/esm-node/cli/fs.mjs +10 -0
  319. package/dist/esm-node/cli/get/config.mjs +15 -0
  320. package/dist/esm-node/cli/get/data.mjs +50 -0
  321. package/dist/esm-node/cli/get/index.mjs +19 -0
  322. package/dist/esm-node/cli/index.mjs +24 -0
  323. package/dist/esm-node/cli/is/config.mjs +38 -0
  324. package/dist/esm-node/cli/is/env.mjs +7 -0
  325. package/dist/esm-node/cli/is/index.mjs +5 -0
  326. package/dist/esm-node/cli/is/project.mjs +76 -0
  327. package/dist/esm-node/cli/is/type.mjs +27 -0
  328. package/dist/esm-node/cli/logger.mjs +2 -0
  329. package/dist/esm-node/cli/modulePath.mjs +34 -0
  330. package/dist/esm-node/cli/monorepo.mjs +51 -0
  331. package/dist/esm-node/cli/package.mjs +52 -0
  332. package/dist/esm-node/cli/path.mjs +36 -0
  333. package/dist/esm-node/cli/port.mjs +36 -0
  334. package/dist/esm-node/cli/prettyInstructions.mjs +71 -0
  335. package/dist/esm-node/cli/require.mjs +80 -0
  336. package/dist/esm-node/cli/route.mjs +37 -0
  337. package/dist/esm-node/cli/runtimeExports.mjs +43 -0
  338. package/dist/esm-node/cli/tsconfig.mjs +8 -0
  339. package/dist/esm-node/cli/version.mjs +25 -0
  340. package/dist/esm-node/cli/watch.mjs +41 -0
  341. package/dist/esm-node/compiled.mjs +45 -0
  342. package/dist/esm-node/import.mjs +10 -0
  343. package/dist/esm-node/index.mjs +4 -0
  344. package/dist/esm-node/universal/constants.mjs +15 -0
  345. package/dist/esm-node/universal/index.mjs +2 -0
  346. package/dist/esm-node/universal/path.mjs +3 -0
  347. package/dist/esm-node/universal/pluginDagSort.mjs +42 -0
  348. package/dist/types/cli/alias.d.ts +20 -0
  349. package/dist/types/cli/applyOptionsChain.d.ts +3 -0
  350. package/dist/types/cli/commands.d.ts +8 -0
  351. package/dist/types/cli/common.d.ts +9 -0
  352. package/dist/types/cli/config.d.ts +4 -0
  353. package/dist/types/cli/constants.d.ts +55 -0
  354. package/dist/types/cli/ensure.d.ts +8 -0
  355. package/dist/types/cli/fs.d.ts +7 -0
  356. package/dist/types/cli/get/config.d.ts +1 -0
  357. package/dist/types/cli/get/data.d.ts +6 -0
  358. package/dist/types/cli/get/index.d.ts +11 -0
  359. package/dist/types/cli/index.d.ts +23 -0
  360. package/dist/types/cli/is/config.d.ts +22 -0
  361. package/dist/types/cli/is/env.d.ts +8 -0
  362. package/dist/types/cli/is/index.d.ts +4 -0
  363. package/dist/types/cli/is/project.d.ts +39 -0
  364. package/dist/types/cli/is/type.d.ts +15 -0
  365. package/dist/types/cli/logger.d.ts +1 -0
  366. package/dist/types/cli/modulePath.d.ts +5 -0
  367. package/dist/types/cli/monorepo.d.ts +9 -0
  368. package/dist/types/cli/package.d.ts +5 -0
  369. package/dist/types/cli/path.d.ts +11 -0
  370. package/dist/types/cli/port.d.ts +12 -0
  371. package/dist/types/cli/prettyInstructions.d.ts +9 -0
  372. package/dist/types/cli/require.d.ts +9 -0
  373. package/dist/types/cli/route.d.ts +4 -0
  374. package/dist/types/cli/runtimeExports.d.ts +5 -0
  375. package/dist/types/cli/tsconfig.d.ts +1 -0
  376. package/dist/types/cli/version.d.ts +4 -0
  377. package/dist/types/cli/watch.d.ts +8 -0
  378. package/dist/types/compiled.d.ts +37 -0
  379. package/dist/types/import.d.ts +5 -0
  380. package/dist/types/index.d.ts +3 -0
  381. package/dist/types/universal/constants.d.ts +47 -0
  382. package/dist/types/universal/index.d.ts +1 -0
  383. package/dist/types/universal/path.d.ts +1 -0
  384. package/dist/types/universal/pluginDagSort.d.ts +1 -0
  385. package/package.json +174 -0
  386. package/rslib.config.mts +162 -0
  387. package/rstest.config.mts +8 -0
@@ -0,0 +1,563 @@
1
+ // Type definitions for fs-extra 9.0
2
+ // Project: https://github.com/jprichardson/node-fs-extra
3
+ // Definitions by: Alan Agius <https://github.com/alan-agius4>,
4
+ // midknight41 <https://github.com/midknight41>,
5
+ // Brendan Forster <https://github.com/shiftkey>,
6
+ // Mees van Dijk <https://github.com/mees->,
7
+ // Justin Rockwood <https://github.com/jrockwood>,
8
+ // Sang Dang <https://github.com/sangdth>,
9
+ // Florian Keller <https://github.com/ffflorian>
10
+ // Piotr Błażejewicz <https://github.com/peterblazejewicz>
11
+ // Tiger Oakes <https://github.com/NotWoods>
12
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
13
+ // Minimum TypeScript Version: 3.9
14
+
15
+ /// <reference types="node" />
16
+
17
+ import * as fs from 'fs';
18
+ import Stats = fs.Stats;
19
+ import PathLike = fs.PathLike;
20
+
21
+ export * from 'fs';
22
+
23
+ export function copy(src: string, dest: string, options?: CopyOptions): Promise<void>;
24
+ export function copy(src: string, dest: string, callback: (err: Error) => void): void;
25
+ export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void;
26
+ export function copySync(src: string, dest: string, options?: CopyOptionsSync): void;
27
+
28
+ export function copyFile(src: string, dest: string, flags?: number): Promise<void>;
29
+ export function copyFile(src: string, dest: string, callback: (err: Error) => void): void;
30
+ export function copyFile(src: string, dest: string, flags: number, callback: (err: Error) => void): void;
31
+
32
+ export function move(src: string, dest: string, options?: MoveOptions): Promise<void>;
33
+ export function move(src: string, dest: string, callback: (err: Error) => void): void;
34
+ export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error) => void): void;
35
+ export function moveSync(src: string, dest: string, options?: MoveOptions): void;
36
+
37
+ export function createFile(file: string): Promise<void>;
38
+ export function createFile(file: string, callback: (err: Error) => void): void;
39
+ export function createFileSync(file: string): void;
40
+
41
+ export function createSymlink(src: string, dest: string, type: SymlinkType): Promise<void>;
42
+ export function createSymlink(src: string, dest: string, type: SymlinkType, callback?: (err: Error) => void): void;
43
+ export function createSymlinkSync(src: string, dest: string, type: SymlinkType): void;
44
+
45
+ export function ensureDir(path: string, options?: EnsureOptions | number): Promise<void>;
46
+ export function ensureDir(path: string, callback?: (err: Error) => void): void;
47
+ export function ensureDir(path: string, options?: EnsureOptions | number, callback?: (err: Error) => void): void;
48
+ export function ensureDirSync(path: string, options?: EnsureOptions | number): void;
49
+
50
+ export function mkdirs(dir: string): Promise<void>;
51
+ export function mkdirs(dir: string, callback: (err: Error) => void): void;
52
+ export function mkdirp(dir: string): Promise<void>;
53
+ export function mkdirp(dir: string, callback: (err: Error) => void): void;
54
+ export function mkdirsSync(dir: string): void;
55
+ export function mkdirpSync(dir: string): void;
56
+
57
+ export function outputFile(
58
+ file: string,
59
+ data: any,
60
+ options?: WriteFileOptions | BufferEncoding | string,
61
+ ): Promise<void>;
62
+ export function outputFile(file: string, data: any, callback: (err: Error) => void): void;
63
+ export function outputFile(
64
+ file: string,
65
+ data: any,
66
+ options: WriteFileOptions | string,
67
+ callback: (err: Error) => void,
68
+ ): void;
69
+ export function outputFileSync(file: string, data: any, options?: WriteFileOptions | BufferEncoding | string): void;
70
+
71
+ export function readJson(file: string, options?: ReadOptions | BufferEncoding | string): Promise<any>;
72
+ export function readJson(file: string, callback: (err: Error, jsonObject: any) => void): void;
73
+ export function readJson(
74
+ file: string,
75
+ options: ReadOptions | BufferEncoding | string,
76
+ callback: (err: Error, jsonObject: any) => void,
77
+ ): void;
78
+ export function readJSON(file: string, options?: ReadOptions | BufferEncoding | string): Promise<any>;
79
+ export function readJSON(file: string, callback: (err: Error, jsonObject: any) => void): void;
80
+ export function readJSON(
81
+ file: string,
82
+ options: ReadOptions | BufferEncoding | string,
83
+ callback: (err: Error, jsonObject: any) => void,
84
+ ): void;
85
+
86
+ export function readJsonSync(file: string, options?: ReadOptions | BufferEncoding | string): any;
87
+ export function readJSONSync(file: string, options?: ReadOptions | BufferEncoding | string): any;
88
+
89
+ export function remove(dir: string, callback: (err: Error) => void): void;
90
+ export function remove(dir: string, callback?: (err: Error) => void): Promise<void>;
91
+ export function removeSync(dir: string): void;
92
+
93
+ export function outputJSON(file: string, data: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
94
+ export function outputJSON(
95
+ file: string,
96
+ data: any,
97
+ options: WriteOptions | BufferEncoding | string,
98
+ callback: (err: Error) => void,
99
+ ): void;
100
+ export function outputJSON(file: string, data: any, callback: (err: Error) => void): void;
101
+ export function outputJson(file: string, data: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
102
+ export function outputJson(
103
+ file: string,
104
+ data: any,
105
+ options: WriteOptions | BufferEncoding | string,
106
+ callback: (err: Error) => void,
107
+ ): void;
108
+ export function outputJson(file: string, data: any, callback: (err: Error) => void): void;
109
+ export function outputJsonSync(file: string, data: any, options?: WriteOptions | BufferEncoding | string): void;
110
+ export function outputJSONSync(file: string, data: any, options?: WriteOptions | BufferEncoding | string): void;
111
+
112
+ export function writeJSON(file: string, object: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
113
+ export function writeJSON(file: string, object: any, callback: (err: Error) => void): void;
114
+ export function writeJSON(
115
+ file: string,
116
+ object: any,
117
+ options: WriteOptions | BufferEncoding | string,
118
+ callback: (err: Error) => void,
119
+ ): void;
120
+ export function writeJson(file: string, object: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
121
+ export function writeJson(file: string, object: any, callback: (err: Error) => void): void;
122
+ export function writeJson(
123
+ file: string,
124
+ object: any,
125
+ options: WriteOptions | BufferEncoding | string,
126
+ callback: (err: Error) => void,
127
+ ): void;
128
+
129
+ export function writeJsonSync(file: string, object: any, options?: WriteOptions | BufferEncoding | string): void;
130
+ export function writeJSONSync(file: string, object: any, options?: WriteOptions | BufferEncoding | string): void;
131
+
132
+ export function ensureFile(path: string): Promise<void>;
133
+ export function ensureFile(path: string, callback: (err: Error) => void): void;
134
+ export function ensureFileSync(path: string): void;
135
+
136
+ export function ensureLink(src: string, dest: string): Promise<void>;
137
+ export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void;
138
+ // alias for ensureLink
139
+ export const createLink: typeof ensureLink;
140
+ export function ensureLinkSync(src: string, dest: string): void;
141
+ // aliased as
142
+ export const createLinkSync: typeof ensureLinkSync;
143
+
144
+ export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise<void>;
145
+ export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void;
146
+ export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void;
147
+ export function ensureSymlinkSync(src: string, dest: string, type?: SymlinkType): void;
148
+
149
+ export function emptyDir(path: string): Promise<void>;
150
+ export function emptyDir(path: string, callback: (err: Error) => void): void;
151
+ export const emptydir: typeof emptyDir;
152
+
153
+ export function emptyDirSync(path: string): void;
154
+ export const emptydirSync: typeof emptyDirSync;
155
+
156
+ export function pathExists(path: string): Promise<boolean>;
157
+ export function pathExists(path: string, callback: (err: Error, exists: boolean) => void): void;
158
+ export function pathExistsSync(path: string): boolean;
159
+
160
+ // fs async methods
161
+ // copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v6/index.d.ts
162
+
163
+ export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
164
+ export function access(path: PathLike, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
165
+ export function access(path: PathLike, mode?: number): Promise<void>;
166
+
167
+ export function appendFile(
168
+ file: PathLike | number,
169
+ data: any,
170
+ options: {
171
+ encoding?: BufferEncoding | string | undefined;
172
+ mode?: number | string | undefined;
173
+ flag?: string | undefined;
174
+ },
175
+ callback: (err: NodeJS.ErrnoException) => void,
176
+ ): void;
177
+ export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
178
+ export function appendFile(
179
+ file: PathLike | number,
180
+ data: any,
181
+ options?:
182
+ | {
183
+ encoding?: BufferEncoding | string | undefined;
184
+ mode?: number | string | undefined;
185
+ flag?: string | undefined;
186
+ }
187
+ | BufferEncoding
188
+ | string,
189
+ ): Promise<void>;
190
+
191
+ export function chmod(path: PathLike, mode: Mode, callback: (err: NodeJS.ErrnoException) => void): void;
192
+ export function chmod(path: PathLike, mode: Mode): Promise<void>;
193
+
194
+ export function chown(path: PathLike, uid: number, gid: number): Promise<void>;
195
+ export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
196
+
197
+ export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
198
+ export function close(fd: number): Promise<void>;
199
+
200
+ export function fchmod(fd: number, mode: Mode, callback: (err: NodeJS.ErrnoException) => void): void;
201
+ export function fchmod(fd: number, mode: Mode): Promise<void>;
202
+
203
+ export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
204
+ export function fchown(fd: number, uid: number, gid: number): Promise<void>;
205
+
206
+ export function fdatasync(fd: number, callback: () => void): void;
207
+ export function fdatasync(fd: number): Promise<void>;
208
+
209
+ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
210
+ export function fstat(fd: number): Promise<Stats>;
211
+
212
+ export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
213
+ export function fsync(fd: number): Promise<void>;
214
+
215
+ export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
216
+ export function ftruncate(fd: number, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
217
+ export function ftruncate(fd: number, len?: number): Promise<void>;
218
+
219
+ export function futimes(fd: number, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void;
220
+ export function futimes(fd: number, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
221
+ export function futimes(fd: number, atime: number, mtime: number): Promise<void>;
222
+ export function futimes(fd: number, atime: Date, mtime: Date): Promise<void>;
223
+
224
+ export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
225
+ export function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
226
+
227
+ export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
228
+ export function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
229
+
230
+ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
231
+ export function lstat(path: PathLike): Promise<Stats>;
232
+
233
+ /**
234
+ * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
235
+ *
236
+ * @param callback No arguments other than a possible exception are given to the completion callback.
237
+ */
238
+ export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
239
+ /**
240
+ * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
241
+ *
242
+ * @param callback No arguments other than a possible exception are given to the completion callback.
243
+ */
244
+ export function mkdir(
245
+ path: PathLike,
246
+ options: Mode | fs.MakeDirectoryOptions | null,
247
+ callback: (err: NodeJS.ErrnoException) => void,
248
+ ): void;
249
+ export function mkdir(path: PathLike, options?: Mode | fs.MakeDirectoryOptions | null): Promise<void>;
250
+ export function mkdirSync(path: PathLike, options?: Mode | fs.MakeDirectoryOptions | null): void;
251
+
252
+ export function open(
253
+ path: PathLike,
254
+ flags: string | number,
255
+ callback: (err: NodeJS.ErrnoException, fd: number) => void,
256
+ ): void;
257
+ export function open(
258
+ path: PathLike,
259
+ flags: string | number,
260
+ mode: Mode,
261
+ callback: (err: NodeJS.ErrnoException, fd: number) => void,
262
+ ): void;
263
+ export function open(path: PathLike, flags: string | number, mode?: Mode | null): Promise<number>;
264
+
265
+ export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void): void;
266
+ export function opendir(
267
+ path: string,
268
+ options: fs.OpenDirOptions,
269
+ cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void,
270
+ ): void;
271
+ export function opendir(path: string, options?: fs.OpenDirOptions): Promise<fs.Dir>;
272
+
273
+ export function read<TBuffer extends ArrayBufferView>(
274
+ fd: number,
275
+ buffer: TBuffer,
276
+ offset: number,
277
+ length: number,
278
+ position: number | null,
279
+ callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void,
280
+ ): void;
281
+ export function read<TBuffer extends ArrayBufferView>(
282
+ fd: number,
283
+ buffer: TBuffer,
284
+ offset: number,
285
+ length: number,
286
+ position: number | null,
287
+ ): Promise<{ bytesRead: number; buffer: TBuffer }>;
288
+
289
+ export function readFile(file: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
290
+ export function readFile(
291
+ file: PathLike | number,
292
+ encoding: BufferEncoding | string,
293
+ callback: (err: NodeJS.ErrnoException, data: string) => void,
294
+ ): void;
295
+ export function readFile(
296
+ file: PathLike | number,
297
+ options: { flag?: string | undefined } | { encoding: BufferEncoding | string; flag?: string | undefined },
298
+ callback: (err: NodeJS.ErrnoException, data: Buffer) => void,
299
+ ): void;
300
+ export function readFile(
301
+ file: PathLike | number,
302
+ options: { flag?: string | undefined } | { encoding: BufferEncoding | string; flag?: string | undefined },
303
+ ): Promise<string>;
304
+ // tslint:disable-next-line:unified-signatures
305
+ export function readFile(file: PathLike | number, encoding: BufferEncoding | string): Promise<string>;
306
+ export function readFile(file: PathLike | number): Promise<Buffer>;
307
+
308
+ export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
309
+ export function readdir(
310
+ path: PathLike,
311
+ options: 'buffer' | { encoding: 'buffer'; withFileTypes?: false | undefined },
312
+ ): Promise<Buffer[]>;
313
+ export function readdir(
314
+ path: PathLike,
315
+ options?:
316
+ | { encoding: BufferEncoding | string | null; withFileTypes?: false | undefined }
317
+ | BufferEncoding
318
+ | string
319
+ | null,
320
+ ): Promise<string[]>;
321
+ export function readdir(
322
+ path: PathLike,
323
+ options?: { encoding?: BufferEncoding | string | null | undefined; withFileTypes?: false | undefined },
324
+ ): Promise<string[] | Buffer[]>;
325
+ export function readdir(
326
+ path: PathLike,
327
+ options: { encoding?: BufferEncoding | string | null | undefined; withFileTypes: true },
328
+ ): Promise<fs.Dirent[]>;
329
+
330
+ export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void;
331
+ export function readlink(path: PathLike): Promise<string>;
332
+
333
+ export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
334
+ export function realpath(
335
+ path: PathLike,
336
+ cache: { [path: string]: string },
337
+ callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any,
338
+ ): void;
339
+ export function realpath(path: PathLike, cache?: { [path: string]: string }): Promise<string>;
340
+
341
+ /* tslint:disable:unified-signatures */
342
+ export namespace realpath {
343
+ const native: {
344
+ (path: PathLike, options: { encoding: 'buffer' } | 'buffer'): Promise<Buffer>;
345
+ (
346
+ path: PathLike,
347
+ options: { encoding: BufferEncoding | string | null } | BufferEncoding | string | undefined | null,
348
+ ): Promise<string>;
349
+ (path: PathLike, options: { encoding: BufferEncoding | string | null } | string | undefined | null): Promise<
350
+ string | Buffer
351
+ >;
352
+ (path: PathLike): Promise<string>;
353
+ } & typeof fs.realpath.native;
354
+ }
355
+ /* tslint:enable:unified-signatures */
356
+
357
+ export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
358
+ export function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
359
+
360
+ /**
361
+ * Asynchronously removes files and directories (modeled on the standard POSIX
362
+ * `rm` utility).
363
+ *
364
+ * Only available in node >= v14.14.0
365
+ */
366
+ export function rm(
367
+ path: PathLike,
368
+ options?: {
369
+ force?: boolean | undefined;
370
+ maxRetries?: number | undefined;
371
+ recursive?: boolean | undefined;
372
+ retryDelay?: number | undefined;
373
+ },
374
+ ): Promise<void>;
375
+
376
+ /**
377
+ * Asynchronous rmdir - removes the directory specified in {path}
378
+ *
379
+ * @param callback No arguments other than a possible exception are given to the completion callback.
380
+ */
381
+ export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
382
+ export function rmdir(path: PathLike, options?: fs.RmDirOptions): Promise<void>;
383
+
384
+ export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
385
+ export function stat(path: PathLike): Promise<Stats>;
386
+
387
+ export function symlink(
388
+ target: PathLike,
389
+ path: PathLike,
390
+ type: SymlinkType | undefined,
391
+ callback: (err: NodeJS.ErrnoException) => void,
392
+ ): void;
393
+ export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
394
+ export function symlink(target: PathLike, path: PathLike, type?: SymlinkType): Promise<void>;
395
+
396
+ export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
397
+ export function truncate(path: PathLike, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
398
+ export function truncate(path: PathLike, len?: number): Promise<void>;
399
+
400
+ /**
401
+ * Asynchronous unlink - deletes the file specified in {path}
402
+ *
403
+ * @param callback No arguments other than a possible exception are given to the completion callback.
404
+ */
405
+ export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
406
+ export function unlink(path: PathLike): Promise<void>;
407
+
408
+ export function utimes(
409
+ path: PathLike,
410
+ atime: number,
411
+ mtime: number,
412
+ callback: (err: NodeJS.ErrnoException) => void,
413
+ ): void;
414
+ export function utimes(path: PathLike, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
415
+ export function utimes(path: PathLike, atime: number, mtime: number): Promise<void>;
416
+ export function utimes(path: PathLike, atime: Date, mtime: Date): Promise<void>;
417
+
418
+ export function write<TBuffer extends ArrayBufferView>(
419
+ fd: number,
420
+ buffer: TBuffer,
421
+ offset: number,
422
+ length: number,
423
+ position: number | null,
424
+ callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void,
425
+ ): void;
426
+ export function write<TBuffer extends ArrayBufferView>(
427
+ fd: number,
428
+ buffer: TBuffer,
429
+ offset: number,
430
+ length: number,
431
+ callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void,
432
+ ): void;
433
+ export function write(
434
+ fd: number,
435
+ data: any,
436
+ callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
437
+ ): void;
438
+ export function write(
439
+ fd: number,
440
+ data: any,
441
+ offset: number,
442
+ callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
443
+ ): void;
444
+ export function write(
445
+ fd: number,
446
+ data: any,
447
+ offset: number,
448
+ encoding: BufferEncoding | string,
449
+ callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
450
+ ): void;
451
+ export function write<TBuffer extends ArrayBufferView>(
452
+ fd: number,
453
+ buffer: TBuffer,
454
+ offset?: number,
455
+ length?: number,
456
+ position?: number | null,
457
+ ): Promise<{ bytesWritten: number; buffer: TBuffer }>;
458
+ export function write(
459
+ fd: number,
460
+ data: any,
461
+ offset?: number,
462
+ encoding?: BufferEncoding | string,
463
+ ): Promise<{ bytesWritten: number; buffer: string }>;
464
+
465
+ export function writeFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
466
+ export function writeFile(
467
+ file: PathLike | number,
468
+ data: any,
469
+ options?: WriteFileOptions | BufferEncoding | string,
470
+ ): Promise<void>;
471
+ export function writeFile(
472
+ file: PathLike | number,
473
+ data: any,
474
+ options: WriteFileOptions | BufferEncoding | string,
475
+ callback: (err: NodeJS.ErrnoException) => void,
476
+ ): void;
477
+
478
+ export function writev(
479
+ fd: number,
480
+ buffers: NodeJS.ArrayBufferView[],
481
+ position: number,
482
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void,
483
+ ): void;
484
+ export function writev(
485
+ fd: number,
486
+ buffers: NodeJS.ArrayBufferView[],
487
+ cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void,
488
+ ): void;
489
+ export function writev(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WritevResult>;
490
+
491
+ /**
492
+ * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
493
+ *
494
+ * @param callback The created folder path is passed as a string to the callback's second parameter.
495
+ */
496
+ export function mkdtemp(prefix: string): Promise<string>;
497
+ export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
498
+
499
+ export interface PathEntry {
500
+ path: string;
501
+ stats: Stats;
502
+ }
503
+
504
+ export interface PathEntryStream {
505
+ read(): PathEntry | null;
506
+ }
507
+
508
+ export type CopyFilterSync = (src: string, dest: string) => boolean;
509
+ export type CopyFilterAsync = (src: string, dest: string) => Promise<boolean>;
510
+
511
+ export type SymlinkType = 'dir' | 'file' | 'junction';
512
+
513
+ export type Mode = string | number;
514
+
515
+ export type ArrayBufferView = NodeJS.TypedArray | DataView;
516
+
517
+ export interface CopyOptions {
518
+ dereference?: boolean | undefined;
519
+ overwrite?: boolean | undefined;
520
+ preserveTimestamps?: boolean | undefined;
521
+ errorOnExist?: boolean | undefined;
522
+ filter?: CopyFilterSync | CopyFilterAsync | undefined;
523
+ recursive?: boolean | undefined;
524
+ }
525
+
526
+ export interface CopyOptionsSync extends CopyOptions {
527
+ filter?: CopyFilterSync | undefined;
528
+ }
529
+
530
+ export interface EnsureOptions {
531
+ mode?: number | undefined;
532
+ }
533
+
534
+ export interface MoveOptions {
535
+ overwrite?: boolean | undefined;
536
+ limit?: number | undefined;
537
+ }
538
+
539
+ export interface ReadOptions {
540
+ throws?: boolean | undefined;
541
+ fs?: object | undefined;
542
+ reviver?: any;
543
+ encoding?: BufferEncoding | string | undefined;
544
+ flag?: string | undefined;
545
+ }
546
+
547
+ export interface WriteFileOptions {
548
+ encoding?: BufferEncoding | string | null | undefined;
549
+ flag?: string | undefined;
550
+ mode?: number | undefined;
551
+ }
552
+
553
+ export interface WriteOptions extends WriteFileOptions {
554
+ fs?: object | undefined;
555
+ replacer?: any;
556
+ spaces?: number | string | undefined;
557
+ EOL?: string | undefined;
558
+ }
559
+
560
+ export interface WritevResult {
561
+ bytesWritten: number;
562
+ buffers: ArrayBufferView[];
563
+ }