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

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 (238) hide show
  1. package/dist/types/cli/alias.d.ts +2 -2
  2. package/dist/types/cli/get/data.d.ts +1 -1
  3. package/dist/types/cli/prettyInstructions.d.ts +1 -4
  4. package/dist/types/cli/watch.d.ts +1 -1
  5. package/package.json +3 -3
  6. package/dist/compiled/address/index.js +0 -171
  7. package/dist/compiled/address/lib/address.d.ts +0 -28
  8. package/dist/compiled/address/package.json +0 -1
  9. package/dist/compiled/browserslist/index.d.ts +0 -178
  10. package/dist/compiled/browserslist/index.js +0 -1329
  11. package/dist/compiled/browserslist/license +0 -20
  12. package/dist/compiled/browserslist/package.json +0 -1
  13. package/dist/compiled/chalk/index.d.ts +0 -415
  14. package/dist/compiled/chalk/index.js +0 -2368
  15. package/dist/compiled/chalk/license +0 -9
  16. package/dist/compiled/chalk/package.json +0 -1
  17. package/dist/compiled/chokidar/anymatch/index.d.ts +0 -19
  18. package/dist/compiled/chokidar/fsevents.node +0 -0
  19. package/dist/compiled/chokidar/index.js +0 -4162
  20. package/dist/compiled/chokidar/index.js.LICENSE.txt +0 -41
  21. package/dist/compiled/chokidar/license +0 -21
  22. package/dist/compiled/chokidar/package.json +0 -1
  23. package/dist/compiled/chokidar/types/index.d.ts +0 -188
  24. package/dist/compiled/commander/index.js +0 -1540
  25. package/dist/compiled/commander/index.mjs +0 -2
  26. package/dist/compiled/commander/license +0 -22
  27. package/dist/compiled/commander/package.json +0 -1
  28. package/dist/compiled/commander/typings/index.d.ts +0 -890
  29. package/dist/compiled/debug/index.d.ts +0 -54
  30. package/dist/compiled/debug/index.js +0 -621
  31. package/dist/compiled/debug/license +0 -20
  32. package/dist/compiled/debug/ms/index.d.ts +0 -25
  33. package/dist/compiled/debug/package.json +0 -1
  34. package/dist/compiled/dotenv/index.js +0 -101
  35. package/dist/compiled/dotenv/license +0 -23
  36. package/dist/compiled/dotenv/package.json +0 -1
  37. package/dist/compiled/dotenv/types/index.d.ts +0 -59
  38. package/dist/compiled/dotenv-expand/index.d.ts +0 -15
  39. package/dist/compiled/dotenv-expand/index.js +0 -54
  40. package/dist/compiled/dotenv-expand/license +0 -24
  41. package/dist/compiled/dotenv-expand/package.json +0 -1
  42. package/dist/compiled/execa/index.d.ts +0 -564
  43. package/dist/compiled/execa/index.js +0 -1738
  44. package/dist/compiled/execa/license +0 -9
  45. package/dist/compiled/execa/package.json +0 -1
  46. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +0 -20
  47. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +0 -12
  48. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +0 -7
  49. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +0 -20
  50. package/dist/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +0 -20
  51. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +0 -13
  52. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +0 -12
  53. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +0 -4
  54. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +0 -16
  55. package/dist/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +0 -4
  56. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +0 -14
  57. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +0 -12
  58. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +0 -30
  59. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +0 -6
  60. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +0 -30
  61. package/dist/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +0 -8
  62. package/dist/compiled/fast-glob/index.js +0 -4665
  63. package/dist/compiled/fast-glob/index.js.LICENSE.txt +0 -38
  64. package/dist/compiled/fast-glob/license +0 -21
  65. package/dist/compiled/fast-glob/out/index.d.ts +0 -27
  66. package/dist/compiled/fast-glob/out/managers/tasks.d.ts +0 -22
  67. package/dist/compiled/fast-glob/out/settings.d.ts +0 -164
  68. package/dist/compiled/fast-glob/out/types/index.d.ts +0 -31
  69. package/dist/compiled/fast-glob/package.json +0 -1
  70. package/dist/compiled/filesize/filesize.d.ts +0 -131
  71. package/dist/compiled/filesize/index.js +0 -198
  72. package/dist/compiled/filesize/index.js.LICENSE.txt +0 -7
  73. package/dist/compiled/filesize/license +0 -28
  74. package/dist/compiled/filesize/package.json +0 -1
  75. package/dist/compiled/fs-extra/index.d.ts +0 -563
  76. package/dist/compiled/fs-extra/index.js +0 -2222
  77. package/dist/compiled/fs-extra/license +0 -15
  78. package/dist/compiled/fs-extra/package.json +0 -1
  79. package/dist/compiled/glob/index.d.ts +0 -91
  80. package/dist/compiled/glob/index.js +0 -2011
  81. package/dist/compiled/glob/license +0 -21
  82. package/dist/compiled/glob/minimatch/index.d.ts +0 -204
  83. package/dist/compiled/glob/package.json +0 -1
  84. package/dist/compiled/globby/index.d.ts +0 -186
  85. package/dist/compiled/globby/index.js +0 -690
  86. package/dist/compiled/globby/license +0 -9
  87. package/dist/compiled/globby/package.json +0 -1
  88. package/dist/compiled/gzip-size/index.d.ts +0 -96
  89. package/dist/compiled/gzip-size/index.js +0 -157
  90. package/dist/compiled/gzip-size/license +0 -9
  91. package/dist/compiled/gzip-size/package.json +0 -1
  92. package/dist/compiled/import-lazy/index.d.ts +0 -26
  93. package/dist/compiled/import-lazy/index.js +0 -45
  94. package/dist/compiled/import-lazy/license +0 -9
  95. package/dist/compiled/import-lazy/package.json +0 -1
  96. package/dist/compiled/inquirer/index.d.ts +0 -997
  97. package/dist/compiled/inquirer/index.js +0 -20167
  98. package/dist/compiled/inquirer/index.js.LICENSE.txt +0 -7
  99. package/dist/compiled/inquirer/lib/objects/choice.d.ts +0 -65
  100. package/dist/compiled/inquirer/lib/objects/choices.d.ts +0 -206
  101. package/dist/compiled/inquirer/lib/objects/separator.d.ts +0 -37
  102. package/dist/compiled/inquirer/lib/ui/baseUI.d.ts +0 -37
  103. package/dist/compiled/inquirer/lib/ui/bottom-bar.d.ts +0 -65
  104. package/dist/compiled/inquirer/lib/ui/prompt.d.ts +0 -104
  105. package/dist/compiled/inquirer/license +0 -22
  106. package/dist/compiled/inquirer/package.json +0 -1
  107. package/dist/compiled/inquirer/through/index.d.ts +0 -25
  108. package/dist/compiled/js-yaml/index.d.ts +0 -154
  109. package/dist/compiled/js-yaml/index.js +0 -2191
  110. package/dist/compiled/js-yaml/index.mjs +0 -2167
  111. package/dist/compiled/js-yaml/index.mjs.LICENSE.txt +0 -1
  112. package/dist/compiled/js-yaml/license +0 -21
  113. package/dist/compiled/js-yaml/package.json +0 -1
  114. package/dist/compiled/json5/index.js +0 -983
  115. package/dist/compiled/json5/lib/index.d.ts +0 -4
  116. package/dist/compiled/json5/lib/parse.d.ts +0 -15
  117. package/dist/compiled/json5/lib/stringify.d.ts +0 -89
  118. package/dist/compiled/json5/package.json +0 -1
  119. package/dist/compiled/lodash/common/array.d.ts +0 -2126
  120. package/dist/compiled/lodash/common/collection.d.ts +0 -1930
  121. package/dist/compiled/lodash/common/common.d.ts +0 -280
  122. package/dist/compiled/lodash/common/date.d.ts +0 -23
  123. package/dist/compiled/lodash/common/function.d.ts +0 -1446
  124. package/dist/compiled/lodash/common/lang.d.ts +0 -1693
  125. package/dist/compiled/lodash/common/math.d.ts +0 -405
  126. package/dist/compiled/lodash/common/number.d.ts +0 -131
  127. package/dist/compiled/lodash/common/object.d.ts +0 -2519
  128. package/dist/compiled/lodash/common/seq.d.ts +0 -210
  129. package/dist/compiled/lodash/common/string.d.ts +0 -788
  130. package/dist/compiled/lodash/common/util.d.ts +0 -1220
  131. package/dist/compiled/lodash/index.d.ts +0 -46
  132. package/dist/compiled/lodash/index.js +0 -1
  133. package/dist/compiled/lodash/index.mjs +0 -1
  134. package/dist/compiled/lodash/license +0 -47
  135. package/dist/compiled/lodash/package.json +0 -1
  136. package/dist/compiled/mime-types/index.d.ts +0 -14
  137. package/dist/compiled/mime-types/index.js +0 -116
  138. package/dist/compiled/mime-types/index.js.LICENSE.txt +0 -13
  139. package/dist/compiled/mime-types/license +0 -23
  140. package/dist/compiled/mime-types/package.json +0 -1
  141. package/dist/compiled/minimist/index.d.ts +0 -95
  142. package/dist/compiled/minimist/index.js +0 -202
  143. package/dist/compiled/minimist/license +0 -18
  144. package/dist/compiled/minimist/package.json +0 -1
  145. package/dist/compiled/nanoid/index.d.ts +0 -91
  146. package/dist/compiled/nanoid/index.js +0 -83
  147. package/dist/compiled/nanoid/index.mjs +0 -69
  148. package/dist/compiled/nanoid/license +0 -20
  149. package/dist/compiled/nanoid/package.json +0 -1
  150. package/dist/compiled/ora/cli-spinners/index.d.ts +0 -125
  151. package/dist/compiled/ora/index.d.ts +0 -277
  152. package/dist/compiled/ora/index.js +0 -3936
  153. package/dist/compiled/ora/index.js.LICENSE.txt +0 -1
  154. package/dist/compiled/ora/license +0 -9
  155. package/dist/compiled/ora/package.json +0 -1
  156. package/dist/compiled/pkg-up/index.d.ts +0 -48
  157. package/dist/compiled/pkg-up/index.js +0 -15
  158. package/dist/compiled/pkg-up/license +0 -9
  159. package/dist/compiled/pkg-up/package.json +0 -1
  160. package/dist/compiled/semver/classes/comparator.d.ts +0 -17
  161. package/dist/compiled/semver/classes/range.d.ts +0 -21
  162. package/dist/compiled/semver/classes/semver.d.ts +0 -62
  163. package/dist/compiled/semver/functions/clean.d.ts +0 -8
  164. package/dist/compiled/semver/functions/cmp.d.ts +0 -16
  165. package/dist/compiled/semver/functions/coerce.d.ts +0 -12
  166. package/dist/compiled/semver/functions/compare-build.d.ts +0 -16
  167. package/dist/compiled/semver/functions/compare-loose.d.ts +0 -5
  168. package/dist/compiled/semver/functions/compare.d.ts +0 -20
  169. package/dist/compiled/semver/functions/diff.d.ts +0 -13
  170. package/dist/compiled/semver/functions/eq.d.ts +0 -9
  171. package/dist/compiled/semver/functions/gt.d.ts +0 -9
  172. package/dist/compiled/semver/functions/gte.d.ts +0 -9
  173. package/dist/compiled/semver/functions/inc.d.ts +0 -15
  174. package/dist/compiled/semver/functions/lt.d.ts +0 -9
  175. package/dist/compiled/semver/functions/lte.d.ts +0 -8
  176. package/dist/compiled/semver/functions/major.d.ts +0 -9
  177. package/dist/compiled/semver/functions/minor.d.ts +0 -9
  178. package/dist/compiled/semver/functions/neq.d.ts +0 -9
  179. package/dist/compiled/semver/functions/parse.d.ts +0 -12
  180. package/dist/compiled/semver/functions/patch.d.ts +0 -9
  181. package/dist/compiled/semver/functions/prerelease.d.ts +0 -12
  182. package/dist/compiled/semver/functions/rcompare.d.ts +0 -15
  183. package/dist/compiled/semver/functions/rsort.d.ts +0 -9
  184. package/dist/compiled/semver/functions/satisfies.d.ts +0 -14
  185. package/dist/compiled/semver/functions/sort.d.ts +0 -9
  186. package/dist/compiled/semver/functions/valid.d.ts +0 -11
  187. package/dist/compiled/semver/index.d.ts +0 -133
  188. package/dist/compiled/semver/index.js +0 -1779
  189. package/dist/compiled/semver/internals/identifiers.d.ts +0 -13
  190. package/dist/compiled/semver/license +0 -15
  191. package/dist/compiled/semver/package.json +0 -1
  192. package/dist/compiled/semver/ranges/gtr.d.ts +0 -14
  193. package/dist/compiled/semver/ranges/intersects.d.ts +0 -13
  194. package/dist/compiled/semver/ranges/ltr.d.ts +0 -14
  195. package/dist/compiled/semver/ranges/max-satisfying.d.ts +0 -14
  196. package/dist/compiled/semver/ranges/min-satisfying.d.ts +0 -14
  197. package/dist/compiled/semver/ranges/min-version.d.ts +0 -10
  198. package/dist/compiled/semver/ranges/outside.d.ts +0 -15
  199. package/dist/compiled/semver/ranges/simplify.d.ts +0 -14
  200. package/dist/compiled/semver/ranges/subset.d.ts +0 -13
  201. package/dist/compiled/semver/ranges/to-comparators.d.ts +0 -9
  202. package/dist/compiled/semver/ranges/valid.d.ts +0 -12
  203. package/dist/compiled/signale/index.d.ts +0 -162
  204. package/dist/compiled/signale/index.js +0 -1704
  205. package/dist/compiled/signale/package.json +0 -1
  206. package/dist/compiled/slash/index.d.ts +0 -25
  207. package/dist/compiled/slash/index.js +0 -32
  208. package/dist/compiled/slash/license +0 -9
  209. package/dist/compiled/slash/package.json +0 -1
  210. package/dist/compiled/strip-ansi/index.d.ts +0 -17
  211. package/dist/compiled/strip-ansi/index.js +0 -34
  212. package/dist/compiled/strip-ansi/license +0 -9
  213. package/dist/compiled/strip-ansi/package.json +0 -1
  214. package/dist/compiled/tsconfig-paths/index.js +0 -629
  215. package/dist/compiled/tsconfig-paths/index.mjs +0 -2
  216. package/dist/compiled/tsconfig-paths/lib/config-loader.d.ts +0 -33
  217. package/dist/compiled/tsconfig-paths/lib/filesystem.d.ts +0 -34
  218. package/dist/compiled/tsconfig-paths/lib/index.d.ts +0 -5
  219. package/dist/compiled/tsconfig-paths/lib/mapping-entry.d.ts +0 -18
  220. package/dist/compiled/tsconfig-paths/lib/match-path-async.d.ts +0 -21
  221. package/dist/compiled/tsconfig-paths/lib/match-path-sync.d.ts +0 -32
  222. package/dist/compiled/tsconfig-paths/lib/register.d.ts +0 -12
  223. package/dist/compiled/tsconfig-paths/lib/try-path.d.ts +0 -15
  224. package/dist/compiled/tsconfig-paths/lib/tsconfig-loader.d.ts +0 -28
  225. package/dist/compiled/tsconfig-paths/license +0 -21
  226. package/dist/compiled/tsconfig-paths/package.json +0 -1
  227. package/dist/compiled/upath/index.js +0 -135
  228. package/dist/compiled/upath/license +0 -22
  229. package/dist/compiled/upath/package.json +0 -1
  230. package/dist/compiled/upath/upath.d.ts +0 -241
  231. package/dist/compiled/url-join/index.d.ts +0 -17
  232. package/dist/compiled/url-join/index.js +0 -61
  233. package/dist/compiled/url-join/license +0 -21
  234. package/dist/compiled/url-join/package.json +0 -1
  235. package/dist/compiled/webpack-chain/index.js +0 -1475
  236. package/dist/compiled/webpack-chain/license +0 -373
  237. package/dist/compiled/webpack-chain/package.json +0 -1
  238. package/dist/compiled/webpack-chain/types/index.d.ts +0 -599
@@ -1,563 +0,0 @@
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
- }