@bemoje/fs 0.2.11 → 0.2.13

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 (418) hide show
  1. package/README.md +2 -2
  2. package/cjs/index.d.ts +80 -0
  3. package/cjs/index.d.ts.map +1 -0
  4. package/cjs/index.js +83 -0
  5. package/cjs/index.js.map +1 -0
  6. package/cjs/lib/appendFile.d.ts +10 -0
  7. package/cjs/lib/appendFile.d.ts.map +1 -0
  8. package/cjs/lib/appendFile.js +23 -0
  9. package/cjs/lib/appendFile.js.map +1 -0
  10. package/cjs/lib/appendFileLine.d.ts +7 -0
  11. package/cjs/lib/appendFileLine.d.ts.map +1 -0
  12. package/cjs/lib/appendFileLine.js +16 -0
  13. package/cjs/lib/appendFileLine.js.map +1 -0
  14. package/cjs/lib/appendFileLineSync.d.ts +7 -0
  15. package/cjs/lib/appendFileLineSync.d.ts.map +1 -0
  16. package/cjs/lib/appendFileLineSync.js +16 -0
  17. package/cjs/lib/appendFileLineSync.js.map +1 -0
  18. package/cjs/lib/appendFileSync.d.ts +10 -0
  19. package/cjs/lib/appendFileSync.d.ts.map +1 -0
  20. package/cjs/lib/appendFileSync.js +23 -0
  21. package/cjs/lib/appendFileSync.js.map +1 -0
  22. package/{src → cjs}/lib/createDirectory.d.ts +1 -5
  23. package/cjs/lib/createDirectory.d.ts.map +1 -0
  24. package/cjs/lib/createDirectory.js +18 -0
  25. package/cjs/lib/createDirectory.js.map +1 -0
  26. package/{src → cjs}/lib/createDirectorySync.d.ts +1 -3
  27. package/cjs/lib/createDirectorySync.d.ts.map +1 -0
  28. package/{src → cjs}/lib/createDirectorySync.js +2 -5
  29. package/cjs/lib/createDirectorySync.js.map +1 -0
  30. package/cjs/lib/emptyDirectory.d.ts +17 -0
  31. package/cjs/lib/emptyDirectory.d.ts.map +1 -0
  32. package/cjs/lib/emptyDirectory.js +26 -0
  33. package/cjs/lib/emptyDirectory.js.map +1 -0
  34. package/cjs/lib/emptyDirectorySync.d.ts +17 -0
  35. package/cjs/lib/emptyDirectorySync.d.ts.map +1 -0
  36. package/cjs/lib/emptyDirectorySync.js +29 -0
  37. package/cjs/lib/emptyDirectorySync.js.map +1 -0
  38. package/{src → cjs}/lib/getJsonIndentation.d.ts +1 -0
  39. package/cjs/lib/getJsonIndentation.d.ts.map +1 -0
  40. package/{src → cjs}/lib/getJsonIndentation.js +2 -2
  41. package/{src → cjs}/lib/getJsonIndentation.js.map +1 -1
  42. package/{src → cjs}/lib/getLastMofifiedFileIn.d.ts +1 -0
  43. package/cjs/lib/getLastMofifiedFileIn.d.ts.map +1 -0
  44. package/cjs/lib/getLastMofifiedFileIn.js +20 -0
  45. package/cjs/lib/getLastMofifiedFileIn.js.map +1 -0
  46. package/cjs/lib/promptUserEditInTextEditor.d.ts +10 -0
  47. package/cjs/lib/promptUserEditInTextEditor.d.ts.map +1 -0
  48. package/cjs/lib/promptUserEditInTextEditor.js +29 -0
  49. package/cjs/lib/promptUserEditInTextEditor.js.map +1 -0
  50. package/cjs/lib/promptUserEditInTextEditorSync.d.ts +10 -0
  51. package/cjs/lib/promptUserEditInTextEditorSync.d.ts.map +1 -0
  52. package/cjs/lib/promptUserEditInTextEditorSync.js +27 -0
  53. package/cjs/lib/promptUserEditInTextEditorSync.js.map +1 -0
  54. package/cjs/lib/promptUserEditJsonInTextEditor.d.ts +13 -0
  55. package/cjs/lib/promptUserEditJsonInTextEditor.d.ts.map +1 -0
  56. package/cjs/lib/promptUserEditJsonInTextEditor.js +25 -0
  57. package/cjs/lib/promptUserEditJsonInTextEditor.js.map +1 -0
  58. package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts +13 -0
  59. package/cjs/lib/promptUserEditJsonInTextEditorSync.d.ts.map +1 -0
  60. package/cjs/lib/promptUserEditJsonInTextEditorSync.js +25 -0
  61. package/cjs/lib/promptUserEditJsonInTextEditorSync.js.map +1 -0
  62. package/cjs/lib/readDirectoryDirents.d.ts +11 -0
  63. package/cjs/lib/readDirectoryDirents.d.ts.map +1 -0
  64. package/cjs/lib/readDirectoryDirents.js +17 -0
  65. package/cjs/lib/readDirectoryDirents.js.map +1 -0
  66. package/cjs/lib/readDirectoryDirentsPaths.d.ts +14 -0
  67. package/cjs/lib/readDirectoryDirentsPaths.d.ts.map +1 -0
  68. package/cjs/lib/readDirectoryDirentsPaths.js +27 -0
  69. package/cjs/lib/readDirectoryDirentsPaths.js.map +1 -0
  70. package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts +15 -0
  71. package/cjs/lib/readDirectoryDirentsPathsSafe.d.ts.map +1 -0
  72. package/cjs/lib/readDirectoryDirentsPathsSafe.js +22 -0
  73. package/cjs/lib/readDirectoryDirentsPathsSafe.js.map +1 -0
  74. package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts +15 -0
  75. package/cjs/lib/readDirectoryDirentsPathsSafeSync.d.ts.map +1 -0
  76. package/cjs/lib/readDirectoryDirentsPathsSafeSync.js +22 -0
  77. package/cjs/lib/readDirectoryDirentsPathsSafeSync.js.map +1 -0
  78. package/cjs/lib/readDirectoryDirentsPathsSync.d.ts +14 -0
  79. package/cjs/lib/readDirectoryDirentsPathsSync.d.ts.map +1 -0
  80. package/cjs/lib/readDirectoryDirentsPathsSync.js +27 -0
  81. package/cjs/lib/readDirectoryDirentsPathsSync.js.map +1 -0
  82. package/cjs/lib/readDirectoryDirentsSafe.d.ts +12 -0
  83. package/cjs/lib/readDirectoryDirentsSafe.d.ts.map +1 -0
  84. package/cjs/lib/readDirectoryDirentsSafe.js +20 -0
  85. package/cjs/lib/readDirectoryDirentsSafe.js.map +1 -0
  86. package/cjs/lib/readDirectoryDirentsSafeSync.d.ts +12 -0
  87. package/cjs/lib/readDirectoryDirentsSafeSync.d.ts.map +1 -0
  88. package/cjs/lib/readDirectoryDirentsSafeSync.js +20 -0
  89. package/cjs/lib/readDirectoryDirentsSafeSync.js.map +1 -0
  90. package/cjs/lib/readDirectoryDirentsSync.d.ts +11 -0
  91. package/cjs/lib/readDirectoryDirentsSync.d.ts.map +1 -0
  92. package/cjs/lib/readDirectoryDirentsSync.js +17 -0
  93. package/cjs/lib/readDirectoryDirentsSync.js.map +1 -0
  94. package/cjs/lib/readDirectoryNames.d.ts +7 -0
  95. package/cjs/lib/readDirectoryNames.d.ts.map +1 -0
  96. package/cjs/lib/readDirectoryNames.js +15 -0
  97. package/cjs/lib/readDirectoryNames.js.map +1 -0
  98. package/cjs/lib/readDirectoryNamesPaths.d.ts +11 -0
  99. package/cjs/lib/readDirectoryNamesPaths.d.ts.map +1 -0
  100. package/cjs/lib/readDirectoryNamesPaths.js +24 -0
  101. package/cjs/lib/readDirectoryNamesPaths.js.map +1 -0
  102. package/cjs/lib/readDirectoryNamesPathsSafe.d.ts +12 -0
  103. package/cjs/lib/readDirectoryNamesPathsSafe.d.ts.map +1 -0
  104. package/cjs/lib/readDirectoryNamesPathsSafe.js +20 -0
  105. package/cjs/lib/readDirectoryNamesPathsSafe.js.map +1 -0
  106. package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts +12 -0
  107. package/cjs/lib/readDirectoryNamesPathsSafeSync.d.ts.map +1 -0
  108. package/cjs/lib/readDirectoryNamesPathsSafeSync.js +20 -0
  109. package/cjs/lib/readDirectoryNamesPathsSafeSync.js.map +1 -0
  110. package/cjs/lib/readDirectoryNamesPathsSync.d.ts +11 -0
  111. package/cjs/lib/readDirectoryNamesPathsSync.d.ts.map +1 -0
  112. package/cjs/lib/readDirectoryNamesPathsSync.js +24 -0
  113. package/cjs/lib/readDirectoryNamesPathsSync.js.map +1 -0
  114. package/cjs/lib/readDirectoryNamesSafe.d.ts +8 -0
  115. package/cjs/lib/readDirectoryNamesSafe.d.ts.map +1 -0
  116. package/cjs/lib/readDirectoryNamesSafe.js +18 -0
  117. package/cjs/lib/readDirectoryNamesSafe.js.map +1 -0
  118. package/cjs/lib/readDirectoryNamesSafeSync.d.ts +8 -0
  119. package/cjs/lib/readDirectoryNamesSafeSync.d.ts.map +1 -0
  120. package/cjs/lib/readDirectoryNamesSafeSync.js +18 -0
  121. package/cjs/lib/readDirectoryNamesSafeSync.js.map +1 -0
  122. package/cjs/lib/readDirectoryNamesSync.d.ts +7 -0
  123. package/cjs/lib/readDirectoryNamesSync.d.ts.map +1 -0
  124. package/cjs/lib/readDirectoryNamesSync.js +15 -0
  125. package/cjs/lib/readDirectoryNamesSync.js.map +1 -0
  126. package/cjs/lib/readDirectoryPaths.d.ts +7 -0
  127. package/cjs/lib/readDirectoryPaths.d.ts.map +1 -0
  128. package/cjs/lib/readDirectoryPaths.js +18 -0
  129. package/cjs/lib/readDirectoryPaths.js.map +1 -0
  130. package/cjs/lib/readDirectoryPathsSafe.d.ts +8 -0
  131. package/cjs/lib/readDirectoryPathsSafe.d.ts.map +1 -0
  132. package/cjs/lib/readDirectoryPathsSafe.js +19 -0
  133. package/cjs/lib/readDirectoryPathsSafe.js.map +1 -0
  134. package/cjs/lib/readDirectoryPathsSafeSync.d.ts +8 -0
  135. package/cjs/lib/readDirectoryPathsSafeSync.d.ts.map +1 -0
  136. package/cjs/lib/readDirectoryPathsSafeSync.js +19 -0
  137. package/cjs/lib/readDirectoryPathsSafeSync.js.map +1 -0
  138. package/cjs/lib/readDirectoryPathsSync.d.ts +7 -0
  139. package/cjs/lib/readDirectoryPathsSync.d.ts.map +1 -0
  140. package/cjs/lib/readDirectoryPathsSync.js +18 -0
  141. package/cjs/lib/readDirectoryPathsSync.js.map +1 -0
  142. package/cjs/lib/readDirectoryStats.d.ts +13 -0
  143. package/cjs/lib/readDirectoryStats.d.ts.map +1 -0
  144. package/cjs/lib/readDirectoryStats.js +33 -0
  145. package/cjs/lib/readDirectoryStats.js.map +1 -0
  146. package/cjs/lib/readDirectoryStatsSafe.d.ts +14 -0
  147. package/cjs/lib/readDirectoryStatsSafe.d.ts.map +1 -0
  148. package/cjs/lib/readDirectoryStatsSafe.js +20 -0
  149. package/cjs/lib/readDirectoryStatsSafe.js.map +1 -0
  150. package/cjs/lib/readDirectoryStatsSafeSync.d.ts +14 -0
  151. package/cjs/lib/readDirectoryStatsSafeSync.d.ts.map +1 -0
  152. package/cjs/lib/readDirectoryStatsSafeSync.js +20 -0
  153. package/cjs/lib/readDirectoryStatsSafeSync.js.map +1 -0
  154. package/cjs/lib/readDirectoryStatsSync.d.ts +13 -0
  155. package/cjs/lib/readDirectoryStatsSync.d.ts.map +1 -0
  156. package/cjs/lib/readDirectoryStatsSync.js +32 -0
  157. package/cjs/lib/readDirectoryStatsSync.js.map +1 -0
  158. package/cjs/lib/readFile.d.ts +22 -0
  159. package/cjs/lib/readFile.d.ts.map +1 -0
  160. package/cjs/lib/readFile.js +21 -0
  161. package/cjs/lib/readFile.js.map +1 -0
  162. package/cjs/lib/readFileBuffer.d.ts +20 -0
  163. package/cjs/lib/readFileBuffer.d.ts.map +1 -0
  164. package/cjs/lib/readFileBuffer.js +20 -0
  165. package/cjs/lib/readFileBuffer.js.map +1 -0
  166. package/cjs/lib/readFileBufferSafe.d.ts +12 -0
  167. package/cjs/lib/readFileBufferSafe.d.ts.map +1 -0
  168. package/cjs/lib/readFileBufferSafe.js +24 -0
  169. package/cjs/lib/readFileBufferSafe.js.map +1 -0
  170. package/cjs/lib/readFileBufferSafeSync.d.ts +12 -0
  171. package/cjs/lib/readFileBufferSafeSync.d.ts.map +1 -0
  172. package/cjs/lib/readFileBufferSafeSync.js +24 -0
  173. package/cjs/lib/readFileBufferSafeSync.js.map +1 -0
  174. package/cjs/lib/readFileBufferSync.d.ts +10 -0
  175. package/cjs/lib/readFileBufferSync.d.ts.map +1 -0
  176. package/cjs/lib/readFileBufferSync.js +17 -0
  177. package/cjs/lib/readFileBufferSync.js.map +1 -0
  178. package/cjs/lib/readFileSafe.d.ts +14 -0
  179. package/cjs/lib/readFileSafe.d.ts.map +1 -0
  180. package/cjs/lib/readFileSafe.js +26 -0
  181. package/cjs/lib/readFileSafe.js.map +1 -0
  182. package/cjs/lib/readFileSafeSync.d.ts +14 -0
  183. package/cjs/lib/readFileSafeSync.d.ts.map +1 -0
  184. package/cjs/lib/readFileSafeSync.js +26 -0
  185. package/cjs/lib/readFileSafeSync.js.map +1 -0
  186. package/cjs/lib/readFileSync.d.ts +11 -0
  187. package/cjs/lib/readFileSync.d.ts.map +1 -0
  188. package/cjs/lib/readFileSync.js +18 -0
  189. package/cjs/lib/readFileSync.js.map +1 -0
  190. package/cjs/lib/readJsonFile.d.ts +2 -0
  191. package/cjs/lib/readJsonFile.d.ts.map +1 -0
  192. package/cjs/lib/readJsonFile.js +6 -0
  193. package/cjs/lib/readJsonFile.js.map +1 -0
  194. package/cjs/lib/readJsonFileSafe.d.ts +10 -0
  195. package/cjs/lib/readJsonFileSafe.d.ts.map +1 -0
  196. package/cjs/lib/readJsonFileSafe.js +22 -0
  197. package/cjs/lib/readJsonFileSafe.js.map +1 -0
  198. package/cjs/lib/readJsonFileSafeSync.d.ts +10 -0
  199. package/cjs/lib/readJsonFileSafeSync.d.ts.map +1 -0
  200. package/cjs/lib/readJsonFileSafeSync.js +22 -0
  201. package/cjs/lib/readJsonFileSafeSync.js.map +1 -0
  202. package/cjs/lib/readJsonFileSync.d.ts +2 -0
  203. package/cjs/lib/readJsonFileSync.d.ts.map +1 -0
  204. package/cjs/lib/readJsonFileSync.js +6 -0
  205. package/cjs/lib/readJsonFileSync.js.map +1 -0
  206. package/cjs/lib/removeDirectory.d.ts +2 -0
  207. package/cjs/lib/removeDirectory.d.ts.map +1 -0
  208. package/cjs/lib/removeDirectory.js +6 -0
  209. package/cjs/lib/removeDirectory.js.map +1 -0
  210. package/cjs/lib/removeDirectorySync.d.ts +2 -0
  211. package/cjs/lib/removeDirectorySync.d.ts.map +1 -0
  212. package/cjs/lib/removeDirectorySync.js +6 -0
  213. package/cjs/lib/removeDirectorySync.js.map +1 -0
  214. package/cjs/lib/removeFile.d.ts +2 -0
  215. package/cjs/lib/removeFile.d.ts.map +1 -0
  216. package/cjs/lib/removeFile.js +6 -0
  217. package/cjs/lib/removeFile.js.map +1 -0
  218. package/cjs/lib/removeFileSync.d.ts +2 -0
  219. package/cjs/lib/removeFileSync.d.ts.map +1 -0
  220. package/cjs/lib/removeFileSync.js +6 -0
  221. package/cjs/lib/removeFileSync.js.map +1 -0
  222. package/{src → cjs}/lib/tempFile.d.ts +3 -2
  223. package/cjs/lib/tempFile.d.ts.map +1 -0
  224. package/cjs/lib/tempFile.js +27 -0
  225. package/cjs/lib/tempFile.js.map +1 -0
  226. package/cjs/lib/tempFileSync.d.ts +7 -0
  227. package/cjs/lib/tempFileSync.d.ts.map +1 -0
  228. package/cjs/lib/tempFileSync.js +27 -0
  229. package/cjs/lib/tempFileSync.js.map +1 -0
  230. package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts +16 -0
  231. package/cjs/lib/types/IGetUserInputFromEditorOptions.d.ts.map +1 -0
  232. package/{src/lib/types/IEnsureValidWindowsPathOptions.js → cjs/lib/types/IGetUserInputFromEditorOptions.js} +1 -1
  233. package/cjs/lib/types/IGetUserInputFromEditorOptions.js.map +1 -0
  234. package/cjs/lib/types/IJFReadOptions.d.ts +2 -0
  235. package/cjs/lib/types/IJFReadOptions.d.ts.map +1 -0
  236. package/cjs/lib/types/IJFReadOptions.js +3 -0
  237. package/cjs/lib/types/IJFReadOptions.js.map +1 -0
  238. package/cjs/lib/types/IJFWriteOptions.d.ts +2 -0
  239. package/cjs/lib/types/IJFWriteOptions.d.ts.map +1 -0
  240. package/cjs/lib/types/IJFWriteOptions.js +3 -0
  241. package/cjs/lib/types/IJFWriteOptions.js.map +1 -0
  242. package/cjs/lib/types/IJsonOutputOptions.d.ts +2 -0
  243. package/cjs/lib/types/IJsonOutputOptions.d.ts.map +1 -0
  244. package/cjs/lib/types/IJsonOutputOptions.js +3 -0
  245. package/cjs/lib/types/IJsonOutputOptions.js.map +1 -0
  246. package/{src → cjs}/lib/types/ILogFileData.d.ts +1 -0
  247. package/cjs/lib/types/ILogFileData.d.ts.map +1 -0
  248. package/cjs/lib/types/IReadJsonFileOptions.d.ts +2 -0
  249. package/cjs/lib/types/IReadJsonFileOptions.d.ts.map +1 -0
  250. package/cjs/lib/types/IReadJsonFileOptions.js +3 -0
  251. package/cjs/lib/types/IReadJsonFileOptions.js.map +1 -0
  252. package/cjs/lib/types/JsonReplacerReviver.d.ts +2 -0
  253. package/cjs/lib/types/JsonReplacerReviver.d.ts.map +1 -0
  254. package/cjs/lib/types/JsonReplacerReviver.js +3 -0
  255. package/cjs/lib/types/JsonReplacerReviver.js.map +1 -0
  256. package/cjs/lib/updateFile.d.ts +11 -0
  257. package/cjs/lib/updateFile.d.ts.map +1 -0
  258. package/cjs/lib/updateFile.js +20 -0
  259. package/cjs/lib/updateFile.js.map +1 -0
  260. package/cjs/lib/updateFileSafe.d.ts +13 -0
  261. package/cjs/lib/updateFileSafe.d.ts.map +1 -0
  262. package/cjs/lib/updateFileSafe.js +28 -0
  263. package/cjs/lib/updateFileSafe.js.map +1 -0
  264. package/cjs/lib/updateFileSafeSync.d.ts +13 -0
  265. package/cjs/lib/updateFileSafeSync.d.ts.map +1 -0
  266. package/cjs/lib/updateFileSafeSync.js +28 -0
  267. package/cjs/lib/updateFileSafeSync.js.map +1 -0
  268. package/cjs/lib/updateFileSync.d.ts +11 -0
  269. package/cjs/lib/updateFileSync.d.ts.map +1 -0
  270. package/cjs/lib/updateFileSync.js +20 -0
  271. package/cjs/lib/updateFileSync.js.map +1 -0
  272. package/cjs/lib/updateJsonFile.d.ts +15 -0
  273. package/cjs/lib/updateJsonFile.d.ts.map +1 -0
  274. package/cjs/lib/updateJsonFile.js +20 -0
  275. package/cjs/lib/updateJsonFile.js.map +1 -0
  276. package/cjs/lib/updateJsonFileSafe.d.ts +17 -0
  277. package/cjs/lib/updateJsonFileSafe.d.ts.map +1 -0
  278. package/cjs/lib/updateJsonFileSafe.js +28 -0
  279. package/cjs/lib/updateJsonFileSafe.js.map +1 -0
  280. package/cjs/lib/updateJsonFileSafeSync.d.ts +17 -0
  281. package/cjs/lib/updateJsonFileSafeSync.d.ts.map +1 -0
  282. package/cjs/lib/updateJsonFileSafeSync.js +28 -0
  283. package/cjs/lib/updateJsonFileSafeSync.js.map +1 -0
  284. package/cjs/lib/updateJsonFileSync.d.ts +15 -0
  285. package/cjs/lib/updateJsonFileSync.d.ts.map +1 -0
  286. package/cjs/lib/updateJsonFileSync.js +20 -0
  287. package/cjs/lib/updateJsonFileSync.js.map +1 -0
  288. package/cjs/lib/writeFile.d.ts +2 -0
  289. package/cjs/lib/writeFile.d.ts.map +1 -0
  290. package/cjs/lib/writeFile.js +6 -0
  291. package/cjs/lib/writeFile.js.map +1 -0
  292. package/cjs/lib/writeFileSafe.d.ts +2 -0
  293. package/cjs/lib/writeFileSafe.d.ts.map +1 -0
  294. package/cjs/lib/writeFileSafe.js +6 -0
  295. package/cjs/lib/writeFileSafe.js.map +1 -0
  296. package/cjs/lib/writeFileSafeSync.d.ts +2 -0
  297. package/cjs/lib/writeFileSafeSync.d.ts.map +1 -0
  298. package/cjs/lib/writeFileSafeSync.js +6 -0
  299. package/cjs/lib/writeFileSafeSync.js.map +1 -0
  300. package/cjs/lib/writeFileSync.d.ts +2 -0
  301. package/cjs/lib/writeFileSync.d.ts.map +1 -0
  302. package/cjs/lib/writeFileSync.js +6 -0
  303. package/cjs/lib/writeFileSync.js.map +1 -0
  304. package/cjs/lib/writeJsonFile.d.ts +2 -0
  305. package/cjs/lib/writeJsonFile.d.ts.map +1 -0
  306. package/cjs/lib/writeJsonFile.js +6 -0
  307. package/cjs/lib/writeJsonFile.js.map +1 -0
  308. package/cjs/lib/writeJsonFileSafe.d.ts +2 -0
  309. package/cjs/lib/writeJsonFileSafe.d.ts.map +1 -0
  310. package/cjs/lib/writeJsonFileSafe.js +6 -0
  311. package/cjs/lib/writeJsonFileSafe.js.map +1 -0
  312. package/cjs/lib/writeJsonFileSafeSync.d.ts +2 -0
  313. package/cjs/lib/writeJsonFileSafeSync.d.ts.map +1 -0
  314. package/cjs/lib/writeJsonFileSafeSync.js +6 -0
  315. package/cjs/lib/writeJsonFileSafeSync.js.map +1 -0
  316. package/cjs/lib/writeJsonFileSync.d.ts +2 -0
  317. package/cjs/lib/writeJsonFileSync.d.ts.map +1 -0
  318. package/cjs/lib/writeJsonFileSync.js +6 -0
  319. package/cjs/lib/writeJsonFileSync.js.map +1 -0
  320. package/package.json +11 -16
  321. package/src/index.d.ts +0 -35
  322. package/src/index.js +0 -39
  323. package/src/index.js.map +0 -1
  324. package/src/lib/AppData.d.ts +0 -10
  325. package/src/lib/AppData.js +0 -24
  326. package/src/lib/AppData.js.map +0 -1
  327. package/src/lib/JsonFile.d.ts +0 -78
  328. package/src/lib/JsonFile.js +0 -158
  329. package/src/lib/JsonFile.js.map +0 -1
  330. package/src/lib/LogFile.d.ts +0 -50
  331. package/src/lib/LogFile.js +0 -158
  332. package/src/lib/LogFile.js.map +0 -1
  333. package/src/lib/absoluteToRelativePath.d.ts +0 -13
  334. package/src/lib/absoluteToRelativePath.js +0 -25
  335. package/src/lib/absoluteToRelativePath.js.map +0 -1
  336. package/src/lib/appendLineToFile.d.ts +0 -11
  337. package/src/lib/appendLineToFile.js +0 -28
  338. package/src/lib/appendLineToFile.js.map +0 -1
  339. package/src/lib/cleanDirectorySync.d.ts +0 -16
  340. package/src/lib/cleanDirectorySync.js +0 -29
  341. package/src/lib/cleanDirectorySync.js.map +0 -1
  342. package/src/lib/createDirectory.js +0 -25
  343. package/src/lib/createDirectory.js.map +0 -1
  344. package/src/lib/createDirectorySync.js.map +0 -1
  345. package/src/lib/createFileExtensionFilter.d.ts +0 -13
  346. package/src/lib/createFileExtensionFilter.js +0 -32
  347. package/src/lib/createFileExtensionFilter.js.map +0 -1
  348. package/src/lib/cwdpath.d.ts +0 -12
  349. package/src/lib/cwdpath.js +0 -21
  350. package/src/lib/cwdpath.js.map +0 -1
  351. package/src/lib/deleteDirectory.d.ts +0 -12
  352. package/src/lib/deleteDirectory.js +0 -23
  353. package/src/lib/deleteDirectory.js.map +0 -1
  354. package/src/lib/deleteDirectorySafe.d.ts +0 -13
  355. package/src/lib/deleteDirectorySafe.js +0 -25
  356. package/src/lib/deleteDirectorySafe.js.map +0 -1
  357. package/src/lib/deleteDirectorySafeSync.d.ts +0 -11
  358. package/src/lib/deleteDirectorySafeSync.js +0 -23
  359. package/src/lib/deleteDirectorySafeSync.js.map +0 -1
  360. package/src/lib/deleteDirectorySync.d.ts +0 -12
  361. package/src/lib/deleteDirectorySync.js +0 -22
  362. package/src/lib/deleteDirectorySync.js.map +0 -1
  363. package/src/lib/ensureValidWindowsPath.d.ts +0 -22
  364. package/src/lib/ensureValidWindowsPath.js +0 -54
  365. package/src/lib/ensureValidWindowsPath.js.map +0 -1
  366. package/src/lib/getDiskDrivesWindows.d.ts +0 -1
  367. package/src/lib/getDiskDrivesWindows.js +0 -19
  368. package/src/lib/getDiskDrivesWindows.js.map +0 -1
  369. package/src/lib/getDownloadsDirectory.d.ts +0 -1
  370. package/src/lib/getDownloadsDirectory.js +0 -11
  371. package/src/lib/getDownloadsDirectory.js.map +0 -1
  372. package/src/lib/getHomeDirectory.d.ts +0 -1
  373. package/src/lib/getHomeDirectory.js +0 -13
  374. package/src/lib/getHomeDirectory.js.map +0 -1
  375. package/src/lib/getLastMofifiedFileIn.js +0 -22
  376. package/src/lib/getLastMofifiedFileIn.js.map +0 -1
  377. package/src/lib/getRootDir.d.ts +0 -1
  378. package/src/lib/getRootDir.js +0 -10
  379. package/src/lib/getRootDir.js.map +0 -1
  380. package/src/lib/normalizeFileExtension.d.ts +0 -22
  381. package/src/lib/normalizeFileExtension.js +0 -36
  382. package/src/lib/normalizeFileExtension.js.map +0 -1
  383. package/src/lib/readFileLastLines.d.ts +0 -7
  384. package/src/lib/readFileLastLines.js +0 -18
  385. package/src/lib/readFileLastLines.js.map +0 -1
  386. package/src/lib/readJsonFile.d.ts +0 -12
  387. package/src/lib/readJsonFile.js +0 -23
  388. package/src/lib/readJsonFile.js.map +0 -1
  389. package/src/lib/readJsonFileSync.d.ts +0 -12
  390. package/src/lib/readJsonFileSync.js +0 -21
  391. package/src/lib/readJsonFileSync.js.map +0 -1
  392. package/src/lib/readPackageJson.d.ts +0 -1
  393. package/src/lib/readPackageJson.js +0 -15
  394. package/src/lib/readPackageJson.js.map +0 -1
  395. package/src/lib/removeIllegalFilenameCharacters.d.ts +0 -1
  396. package/src/lib/removeIllegalFilenameCharacters.js +0 -8
  397. package/src/lib/removeIllegalFilenameCharacters.js.map +0 -1
  398. package/src/lib/tempFile.js +0 -26
  399. package/src/lib/tempFile.js.map +0 -1
  400. package/src/lib/types/IEnsureValidWindowsPathOptions.d.ts +0 -10
  401. package/src/lib/types/IEnsureValidWindowsPathOptions.js.map +0 -1
  402. package/src/lib/updateJsonFile.d.ts +0 -18
  403. package/src/lib/updateJsonFile.js +0 -44
  404. package/src/lib/updateJsonFile.js.map +0 -1
  405. package/src/lib/updateJsonFileSync.d.ts +0 -18
  406. package/src/lib/updateJsonFileSync.js +0 -42
  407. package/src/lib/updateJsonFileSync.js.map +0 -1
  408. package/src/lib/wipeDirectorySafe.d.ts +0 -1
  409. package/src/lib/wipeDirectorySafe.js +0 -14
  410. package/src/lib/wipeDirectorySafe.js.map +0 -1
  411. package/src/lib/writeJsonFile.d.ts +0 -14
  412. package/src/lib/writeJsonFile.js +0 -25
  413. package/src/lib/writeJsonFile.js.map +0 -1
  414. package/src/lib/writeJsonFileSync.d.ts +0 -13
  415. package/src/lib/writeJsonFileSync.js +0 -22
  416. package/src/lib/writeJsonFileSync.js.map +0 -1
  417. /package/{src → cjs}/lib/types/ILogFileData.js +0 -0
  418. /package/{src → cjs}/lib/types/ILogFileData.js.map +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bemoje/fs
2
2
 
3
- Tools for working with the local filesystem in nodejs.
3
+
4
4
 
5
5
  ![npm (scoped)](https://img.shields.io/npm/v/%40bemoje/trie-map)
6
6
  ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/%40bemoje/fs)
@@ -31,4 +31,4 @@ Please let me know of any bugs or [issues](https://github.com/bemoje/tsmono/issu
31
31
  Contributors are welcome to open a [pull request](https://github.com/bemoje/tsmono/pulls).
32
32
 
33
33
  ## License
34
- Released under the [MIT License](./LICENSE).
34
+ Released under the [undefined License](./LICENSE).
package/cjs/index.d.ts ADDED
@@ -0,0 +1,80 @@
1
+ export * from './lib/appendFile';
2
+ export * from './lib/appendFileLine';
3
+ export * from './lib/appendFileLineSync';
4
+ export * from './lib/appendFileSync';
5
+ export * from './lib/createDirectory';
6
+ export * from './lib/createDirectorySync';
7
+ export * from './lib/emptyDirectory';
8
+ export * from './lib/emptyDirectorySync';
9
+ export * from './lib/getJsonIndentation';
10
+ export * from './lib/getLastMofifiedFileIn';
11
+ export * from './lib/promptUserEditInTextEditor';
12
+ export * from './lib/promptUserEditInTextEditorSync';
13
+ export * from './lib/promptUserEditJsonInTextEditor';
14
+ export * from './lib/promptUserEditJsonInTextEditorSync';
15
+ export * from './lib/readDirectoryDirents';
16
+ export * from './lib/readDirectoryDirentsPaths';
17
+ export * from './lib/readDirectoryDirentsPathsSafe';
18
+ export * from './lib/readDirectoryDirentsPathsSafeSync';
19
+ export * from './lib/readDirectoryDirentsPathsSync';
20
+ export * from './lib/readDirectoryDirentsSafe';
21
+ export * from './lib/readDirectoryDirentsSafeSync';
22
+ export * from './lib/readDirectoryDirentsSync';
23
+ export * from './lib/readDirectoryNames';
24
+ export * from './lib/readDirectoryNamesPaths';
25
+ export * from './lib/readDirectoryNamesPathsSafe';
26
+ export * from './lib/readDirectoryNamesPathsSafeSync';
27
+ export * from './lib/readDirectoryNamesPathsSync';
28
+ export * from './lib/readDirectoryNamesSafe';
29
+ export * from './lib/readDirectoryNamesSafeSync';
30
+ export * from './lib/readDirectoryNamesSync';
31
+ export * from './lib/readDirectoryPaths';
32
+ export * from './lib/readDirectoryPathsSafe';
33
+ export * from './lib/readDirectoryPathsSafeSync';
34
+ export * from './lib/readDirectoryPathsSync';
35
+ export * from './lib/readDirectoryStats';
36
+ export * from './lib/readDirectoryStatsSafe';
37
+ export * from './lib/readDirectoryStatsSafeSync';
38
+ export * from './lib/readDirectoryStatsSync';
39
+ export * from './lib/readFile';
40
+ export * from './lib/readFileBuffer';
41
+ export * from './lib/readFileBufferSafe';
42
+ export * from './lib/readFileBufferSafeSync';
43
+ export * from './lib/readFileBufferSync';
44
+ export * from './lib/readFileSafe';
45
+ export * from './lib/readFileSafeSync';
46
+ export * from './lib/readFileSync';
47
+ export * from './lib/readJsonFile';
48
+ export * from './lib/readJsonFileSafe';
49
+ export * from './lib/readJsonFileSafeSync';
50
+ export * from './lib/readJsonFileSync';
51
+ export * from './lib/removeDirectory';
52
+ export * from './lib/removeDirectorySync';
53
+ export * from './lib/removeFile';
54
+ export * from './lib/removeFileSync';
55
+ export * from './lib/tempFile';
56
+ export * from './lib/tempFileSync';
57
+ export * from './lib/types/IGetUserInputFromEditorOptions';
58
+ export * from './lib/types/IJFReadOptions';
59
+ export * from './lib/types/IJFWriteOptions';
60
+ export * from './lib/types/IJsonOutputOptions';
61
+ export * from './lib/types/ILogFileData';
62
+ export * from './lib/types/IReadJsonFileOptions';
63
+ export * from './lib/types/JsonReplacerReviver';
64
+ export * from './lib/updateFile';
65
+ export * from './lib/updateFileSafe';
66
+ export * from './lib/updateFileSafeSync';
67
+ export * from './lib/updateFileSync';
68
+ export * from './lib/updateJsonFile';
69
+ export * from './lib/updateJsonFileSafe';
70
+ export * from './lib/updateJsonFileSafeSync';
71
+ export * from './lib/updateJsonFileSync';
72
+ export * from './lib/writeFile';
73
+ export * from './lib/writeFileSafe';
74
+ export * from './lib/writeFileSafeSync';
75
+ export * from './lib/writeFileSync';
76
+ export * from './lib/writeJsonFile';
77
+ export * from './lib/writeJsonFileSafe';
78
+ export * from './lib/writeJsonFileSafeSync';
79
+ export * from './lib/writeJsonFileSync';
80
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/fs/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,sCAAsC,CAAA;AACpD,cAAc,sCAAsC,CAAA;AACpD,cAAc,0CAA0C,CAAA;AACxD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA;AACnD,cAAc,yCAAyC,CAAA;AACvD,cAAc,qCAAqC,CAAA;AACnD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,mCAAmC,CAAA;AACjD,cAAc,uCAAuC,CAAA;AACrD,cAAc,mCAAmC,CAAA;AACjD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,4CAA4C,CAAA;AAC1D,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAChD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA"}
package/cjs/index.js ADDED
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/appendFile"), exports);
5
+ tslib_1.__exportStar(require("./lib/appendFileLine"), exports);
6
+ tslib_1.__exportStar(require("./lib/appendFileLineSync"), exports);
7
+ tslib_1.__exportStar(require("./lib/appendFileSync"), exports);
8
+ tslib_1.__exportStar(require("./lib/createDirectory"), exports);
9
+ tslib_1.__exportStar(require("./lib/createDirectorySync"), exports);
10
+ tslib_1.__exportStar(require("./lib/emptyDirectory"), exports);
11
+ tslib_1.__exportStar(require("./lib/emptyDirectorySync"), exports);
12
+ tslib_1.__exportStar(require("./lib/getJsonIndentation"), exports);
13
+ tslib_1.__exportStar(require("./lib/getLastMofifiedFileIn"), exports);
14
+ tslib_1.__exportStar(require("./lib/promptUserEditInTextEditor"), exports);
15
+ tslib_1.__exportStar(require("./lib/promptUserEditInTextEditorSync"), exports);
16
+ tslib_1.__exportStar(require("./lib/promptUserEditJsonInTextEditor"), exports);
17
+ tslib_1.__exportStar(require("./lib/promptUserEditJsonInTextEditorSync"), exports);
18
+ tslib_1.__exportStar(require("./lib/readDirectoryDirents"), exports);
19
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsPaths"), exports);
20
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsPathsSafe"), exports);
21
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsPathsSafeSync"), exports);
22
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsPathsSync"), exports);
23
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsSafe"), exports);
24
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsSafeSync"), exports);
25
+ tslib_1.__exportStar(require("./lib/readDirectoryDirentsSync"), exports);
26
+ tslib_1.__exportStar(require("./lib/readDirectoryNames"), exports);
27
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesPaths"), exports);
28
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesPathsSafe"), exports);
29
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesPathsSafeSync"), exports);
30
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesPathsSync"), exports);
31
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesSafe"), exports);
32
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesSafeSync"), exports);
33
+ tslib_1.__exportStar(require("./lib/readDirectoryNamesSync"), exports);
34
+ tslib_1.__exportStar(require("./lib/readDirectoryPaths"), exports);
35
+ tslib_1.__exportStar(require("./lib/readDirectoryPathsSafe"), exports);
36
+ tslib_1.__exportStar(require("./lib/readDirectoryPathsSafeSync"), exports);
37
+ tslib_1.__exportStar(require("./lib/readDirectoryPathsSync"), exports);
38
+ tslib_1.__exportStar(require("./lib/readDirectoryStats"), exports);
39
+ tslib_1.__exportStar(require("./lib/readDirectoryStatsSafe"), exports);
40
+ tslib_1.__exportStar(require("./lib/readDirectoryStatsSafeSync"), exports);
41
+ tslib_1.__exportStar(require("./lib/readDirectoryStatsSync"), exports);
42
+ tslib_1.__exportStar(require("./lib/readFile"), exports);
43
+ tslib_1.__exportStar(require("./lib/readFileBuffer"), exports);
44
+ tslib_1.__exportStar(require("./lib/readFileBufferSafe"), exports);
45
+ tslib_1.__exportStar(require("./lib/readFileBufferSafeSync"), exports);
46
+ tslib_1.__exportStar(require("./lib/readFileBufferSync"), exports);
47
+ tslib_1.__exportStar(require("./lib/readFileSafe"), exports);
48
+ tslib_1.__exportStar(require("./lib/readFileSafeSync"), exports);
49
+ tslib_1.__exportStar(require("./lib/readFileSync"), exports);
50
+ tslib_1.__exportStar(require("./lib/readJsonFile"), exports);
51
+ tslib_1.__exportStar(require("./lib/readJsonFileSafe"), exports);
52
+ tslib_1.__exportStar(require("./lib/readJsonFileSafeSync"), exports);
53
+ tslib_1.__exportStar(require("./lib/readJsonFileSync"), exports);
54
+ tslib_1.__exportStar(require("./lib/removeDirectory"), exports);
55
+ tslib_1.__exportStar(require("./lib/removeDirectorySync"), exports);
56
+ tslib_1.__exportStar(require("./lib/removeFile"), exports);
57
+ tslib_1.__exportStar(require("./lib/removeFileSync"), exports);
58
+ tslib_1.__exportStar(require("./lib/tempFile"), exports);
59
+ tslib_1.__exportStar(require("./lib/tempFileSync"), exports);
60
+ tslib_1.__exportStar(require("./lib/types/IGetUserInputFromEditorOptions"), exports);
61
+ tslib_1.__exportStar(require("./lib/types/IJFReadOptions"), exports);
62
+ tslib_1.__exportStar(require("./lib/types/IJFWriteOptions"), exports);
63
+ tslib_1.__exportStar(require("./lib/types/IJsonOutputOptions"), exports);
64
+ tslib_1.__exportStar(require("./lib/types/ILogFileData"), exports);
65
+ tslib_1.__exportStar(require("./lib/types/IReadJsonFileOptions"), exports);
66
+ tslib_1.__exportStar(require("./lib/types/JsonReplacerReviver"), exports);
67
+ tslib_1.__exportStar(require("./lib/updateFile"), exports);
68
+ tslib_1.__exportStar(require("./lib/updateFileSafe"), exports);
69
+ tslib_1.__exportStar(require("./lib/updateFileSafeSync"), exports);
70
+ tslib_1.__exportStar(require("./lib/updateFileSync"), exports);
71
+ tslib_1.__exportStar(require("./lib/updateJsonFile"), exports);
72
+ tslib_1.__exportStar(require("./lib/updateJsonFileSafe"), exports);
73
+ tslib_1.__exportStar(require("./lib/updateJsonFileSafeSync"), exports);
74
+ tslib_1.__exportStar(require("./lib/updateJsonFileSync"), exports);
75
+ tslib_1.__exportStar(require("./lib/writeFile"), exports);
76
+ tslib_1.__exportStar(require("./lib/writeFileSafe"), exports);
77
+ tslib_1.__exportStar(require("./lib/writeFileSafeSync"), exports);
78
+ tslib_1.__exportStar(require("./lib/writeFileSync"), exports);
79
+ tslib_1.__exportStar(require("./lib/writeJsonFile"), exports);
80
+ tslib_1.__exportStar(require("./lib/writeJsonFileSafe"), exports);
81
+ tslib_1.__exportStar(require("./lib/writeJsonFileSafeSync"), exports);
82
+ tslib_1.__exportStar(require("./lib/writeJsonFileSync"), exports);
83
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/fs/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAgC;AAChC,+DAAoC;AACpC,mEAAwC;AACxC,+DAAoC;AACpC,gEAAqC;AACrC,oEAAyC;AACzC,+DAAoC;AACpC,mEAAwC;AACxC,mEAAwC;AACxC,sEAA2C;AAC3C,2EAAgD;AAChD,+EAAoD;AACpD,+EAAoD;AACpD,mFAAwD;AACxD,qEAA0C;AAC1C,0EAA+C;AAC/C,8EAAmD;AACnD,kFAAuD;AACvD,8EAAmD;AACnD,yEAA8C;AAC9C,6EAAkD;AAClD,yEAA8C;AAC9C,mEAAwC;AACxC,wEAA6C;AAC7C,4EAAiD;AACjD,gFAAqD;AACrD,4EAAiD;AACjD,uEAA4C;AAC5C,2EAAgD;AAChD,uEAA4C;AAC5C,mEAAwC;AACxC,uEAA4C;AAC5C,2EAAgD;AAChD,uEAA4C;AAC5C,mEAAwC;AACxC,uEAA4C;AAC5C,2EAAgD;AAChD,uEAA4C;AAC5C,yDAA8B;AAC9B,+DAAoC;AACpC,mEAAwC;AACxC,uEAA4C;AAC5C,mEAAwC;AACxC,6DAAkC;AAClC,iEAAsC;AACtC,6DAAkC;AAClC,6DAAkC;AAClC,iEAAsC;AACtC,qEAA0C;AAC1C,iEAAsC;AACtC,gEAAqC;AACrC,oEAAyC;AACzC,2DAAgC;AAChC,+DAAoC;AACpC,yDAA8B;AAC9B,6DAAkC;AAClC,qFAA0D;AAC1D,qEAA0C;AAC1C,sEAA2C;AAC3C,yEAA8C;AAC9C,mEAAwC;AACxC,2EAAgD;AAChD,0EAA+C;AAC/C,2DAAgC;AAChC,+DAAoC;AACpC,mEAAwC;AACxC,+DAAoC;AACpC,+DAAoC;AACpC,mEAAwC;AACxC,uEAA4C;AAC5C,mEAAwC;AACxC,0DAA+B;AAC/B,8DAAmC;AACnC,kEAAuC;AACvC,8DAAmC;AACnC,8DAAmC;AACnC,kEAAuC;AACvC,sEAA2C;AAC3C,kEAAuC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Append a string to a file. Creates the file and dirpath if they do not exist.
3
+ * @param filepath The path of the file.
4
+ * @param string The string data to append.
5
+ * @param options - Options for including a linebreak (EOL) to the string.
6
+ */
7
+ export declare function appendFile(filepath: string, string: string, options?: {
8
+ eol: 'prepend' | 'append';
9
+ }): Promise<void>;
10
+ //# sourceMappingURL=appendFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFile.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFile.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GACtC,OAAO,CAAC,IAAI,CAAC,CAOf"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appendFile = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ /**
7
+ * Append a string to a file. Creates the file and dirpath if they do not exist.
8
+ * @param filepath The path of the file.
9
+ * @param string The string data to append.
10
+ * @param options - Options for including a linebreak (EOL) to the string.
11
+ */
12
+ async function appendFile(filepath, string, options) {
13
+ if (options) {
14
+ if (options.eol === 'append')
15
+ string = string + '\n';
16
+ else if (options.eol === 'prepend')
17
+ string = '\n' + string;
18
+ }
19
+ await fs_extra_1.default.ensureFile(filepath);
20
+ await fs_extra_1.default.appendFile(filepath, string);
21
+ }
22
+ exports.appendFile = appendFile;
23
+ //# sourceMappingURL=appendFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFile.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFile.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AACI,KAAK,UAAU,UAAU,CAC9B,QAAgB,EAChB,MAAc,EACd,OAAuC;IAEvC,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,GAAG,KAAK,QAAQ;YAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;aAC/C,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;YAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;KAC3D;IACD,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC7B,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC;AAXD,gCAWC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Append a line to a file. Creates the file and dirpath if they do not exist.
3
+ * @param filepath The path of the file.
4
+ * @param line The string data to append.
5
+ */
6
+ export declare function appendFileLine(filepath: string, line: string): Promise<void>;
7
+ //# sourceMappingURL=appendFileLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFileLine.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLine.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlF"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appendFileLine = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ /**
7
+ * Append a line to a file. Creates the file and dirpath if they do not exist.
8
+ * @param filepath The path of the file.
9
+ * @param line The string data to append.
10
+ */
11
+ async function appendFileLine(filepath, line) {
12
+ await fs_extra_1.default.ensureFile(filepath);
13
+ await fs_extra_1.default.appendFile(filepath, line + '\n');
14
+ }
15
+ exports.appendFileLine = appendFileLine;
16
+ //# sourceMappingURL=appendFileLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFileLine.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLine.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,QAAgB,EAAE,IAAY;IACjE,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAC7B,MAAM,kBAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC,CAAA;AAC5C,CAAC;AAHD,wCAGC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Append a line to a file. Creates the file and path if they do not exist.
3
+ * @param filepath The path of the file.
4
+ * @param line The string data to append.
5
+ */
6
+ export declare function appendFileLineSync(filepath: string, line: string): void;
7
+ //# sourceMappingURL=appendFileLineSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFileLineSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLineSync.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGvE"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appendFileLineSync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ /**
7
+ * Append a line to a file. Creates the file and path if they do not exist.
8
+ * @param filepath The path of the file.
9
+ * @param line The string data to append.
10
+ */
11
+ function appendFileLineSync(filepath, line) {
12
+ fs_extra_1.default.ensureFileSync(filepath);
13
+ fs_extra_1.default.appendFileSync(filepath, line + '\n');
14
+ }
15
+ exports.appendFileLineSync = appendFileLineSync;
16
+ //# sourceMappingURL=appendFileLineSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFileLineSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileLineSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,QAAgB,EAAE,IAAY;IAC/D,kBAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;IAC3B,kBAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC,CAAA;AAC1C,CAAC;AAHD,gDAGC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Append a string to a file. Creates the file and dirpath if they do not exist.
3
+ * @param filepath The path of the file.
4
+ * @param string The string data to append.
5
+ * @param options - Options for including a linebreak (EOL) to the string.
6
+ */
7
+ export declare function appendFileSync(filepath: string, string: string, options?: {
8
+ eol: 'prepend' | 'append';
9
+ }): void;
10
+ //# sourceMappingURL=appendFileSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFileSync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileSync.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,GAAG,EAAE,SAAS,GAAG,QAAQ,CAAA;CAAE,GAAG,IAAI,CAO9G"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.appendFileSync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ /**
7
+ * Append a string to a file. Creates the file and dirpath if they do not exist.
8
+ * @param filepath The path of the file.
9
+ * @param string The string data to append.
10
+ * @param options - Options for including a linebreak (EOL) to the string.
11
+ */
12
+ function appendFileSync(filepath, string, options) {
13
+ if (options) {
14
+ if (options.eol === 'append')
15
+ string = string + '\n';
16
+ else if (options.eol === 'prepend')
17
+ string = '\n' + string;
18
+ }
19
+ fs_extra_1.default.ensureFileSync(filepath);
20
+ fs_extra_1.default.appendFileSync(filepath, string);
21
+ }
22
+ exports.appendFileSync = appendFileSync;
23
+ //# sourceMappingURL=appendFileSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appendFileSync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/appendFileSync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,MAAc,EAAE,OAAuC;IACtG,IAAI,OAAO,EAAE;QACX,IAAI,OAAO,CAAC,GAAG,KAAK,QAAQ;YAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;aAC/C,IAAI,OAAO,CAAC,GAAG,KAAK,SAAS;YAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAA;KAC3D;IACD,kBAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;IAC3B,kBAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AACrC,CAAC;AAPD,wCAOC"}
@@ -3,11 +3,7 @@
3
3
  * Automatically creates parent directories if they do not exist.
4
4
  * @param dirpath The path where the directory should be created.
5
5
  * @returns The path of the directory.
6
- * @throws Will throw an error if the directory cannot be created.
7
- * @example ```ts
8
- * createDirectory('/path/to/directory').then((dirpath) => {
9
- * //=> `Directory created at ${dirpath}`
10
- * });
11
6
  * ```
12
7
  */
13
8
  export declare function createDirectory(dirpath: string): Promise<string>;
9
+ //# sourceMappingURL=createDirectory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDirectory.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectory.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGtE"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createDirectory = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ /**
7
+ * Create a directory at a given path if it does not exist.
8
+ * Automatically creates parent directories if they do not exist.
9
+ * @param dirpath The path where the directory should be created.
10
+ * @returns The path of the directory.
11
+ * ```
12
+ */
13
+ async function createDirectory(dirpath) {
14
+ await fs_extra_1.default.ensureDir(dirpath);
15
+ return dirpath;
16
+ }
17
+ exports.createDirectory = createDirectory;
18
+ //# sourceMappingURL=createDirectory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDirectory.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectory.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB;;;;;;GAMG;AACI,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,MAAM,kBAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IAC3B,OAAO,OAAO,CAAA;AAChB,CAAC;AAHD,0CAGC"}
@@ -3,8 +3,6 @@
3
3
  * Automatically creates parent directories if they do not exist.
4
4
  * @param dirpath The path where the directory should be created.
5
5
  * @returns The path of the directory.
6
- * @example ```ts
7
- * createDirectorySync('/path/to/directory')
8
- * ```
9
6
  */
10
7
  export declare function createDirectorySync(dirpath: string): string;
8
+ //# sourceMappingURL=createDirectorySync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDirectorySync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectorySync.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAG3D"}
@@ -2,18 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createDirectorySync = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const fs_1 = tslib_1.__importDefault(require("fs"));
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
6
  /**
7
7
  * Create a directory at a given path if it does not exist.
8
8
  * Automatically creates parent directories if they do not exist.
9
9
  * @param dirpath The path where the directory should be created.
10
10
  * @returns The path of the directory.
11
- * @example ```ts
12
- * createDirectorySync('/path/to/directory')
13
- * ```
14
11
  */
15
12
  function createDirectorySync(dirpath) {
16
- fs_1.default.mkdirSync(dirpath, { recursive: true });
13
+ fs_extra_1.default.ensureDirSync(dirpath);
17
14
  return dirpath;
18
15
  }
19
16
  exports.createDirectorySync = createDirectorySync;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDirectorySync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/createDirectorySync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AAEzB;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,OAAe;IACjD,kBAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IACzB,OAAO,OAAO,CAAA;AAChB,CAAC;AAHD,kDAGC"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="node" />
2
+ import fs from 'fs-extra';
3
+ /**
4
+ * Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
5
+ * If the directory does not exist, it is created.
6
+ * The directory itself is not deleted.
7
+ *
8
+ * Pass a predicate function to remove only certain files from the directory.
9
+ *
10
+ * @param dirpath - The path of the directory to wipe.
11
+ * @param predicate - If the function returns true for a file, that file is removed from the directory.
12
+ */
13
+ export declare function emptyDirectory(dirpath: string, predicate?: (stats: fs.Stats & {
14
+ name: string;
15
+ get path(): string;
16
+ }) => boolean | Promise<boolean>): Promise<void>;
17
+ //# sourceMappingURL=emptyDirectory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emptyDirectory.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectory.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,IAAI,IAAI,MAAM,CAAA;CAAE,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GACjG,OAAO,CAAC,IAAI,CAAC,CAKf"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyDirectory = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ const readDirectoryStats_1 = require("./readDirectoryStats");
7
+ /**
8
+ * Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
9
+ * If the directory does not exist, it is created.
10
+ * The directory itself is not deleted.
11
+ *
12
+ * Pass a predicate function to remove only certain files from the directory.
13
+ *
14
+ * @param dirpath - The path of the directory to wipe.
15
+ * @param predicate - If the function returns true for a file, that file is removed from the directory.
16
+ */
17
+ async function emptyDirectory(dirpath, predicate) {
18
+ if (!predicate)
19
+ return await fs_extra_1.default.emptyDir(dirpath);
20
+ for (const stats of await (0, readDirectoryStats_1.readDirectoryStats)(dirpath)) {
21
+ if (await predicate(stats))
22
+ await fs_extra_1.default.remove(stats.path);
23
+ }
24
+ }
25
+ exports.emptyDirectory = emptyDirectory;
26
+ //# sourceMappingURL=emptyDirectory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emptyDirectory.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectory.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,6DAAyD;AAEzD;;;;;;;;;GASG;AACI,KAAK,UAAU,cAAc,CAClC,OAAe,EACf,SAAkG;IAElG,IAAI,CAAC,SAAS;QAAE,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACjD,KAAK,MAAM,KAAK,IAAI,MAAM,IAAA,uCAAkB,EAAC,OAAO,CAAC,EAAE;QACrD,IAAI,MAAM,SAAS,CAAC,KAAK,CAAC;YAAE,MAAM,kBAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;KACxD;AACH,CAAC;AARD,wCAQC"}
@@ -0,0 +1,17 @@
1
+ /// <reference types="node" />
2
+ import fs from 'fs-extra';
3
+ /**
4
+ * Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
5
+ * If the directory does not exist, it is created.
6
+ * The directory itself is not deleted.
7
+ *
8
+ * Pass a predicate function to remove only certain files from the directory.
9
+ *
10
+ * @param dirpath - The path of the directory to wipe.
11
+ * @param predicate - If the function returns true for a file, that file is removed from the directory.
12
+ */
13
+ export declare function emptyDirectorySync(dirpath: string, predicate?: (stats: fs.Stats & {
14
+ name: string;
15
+ path: string;
16
+ }) => boolean): void;
17
+ //# sourceMappingURL=emptyDirectorySync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emptyDirectorySync.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectorySync.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,UAAU,CAAA;AAGzB;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,GACxE,IAAI,CASN"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emptyDirectorySync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ const path_1 = tslib_1.__importDefault(require("path"));
7
+ /**
8
+ * Ensures that a directory is empty. Deletes directory contents if the directory is not empty.
9
+ * If the directory does not exist, it is created.
10
+ * The directory itself is not deleted.
11
+ *
12
+ * Pass a predicate function to remove only certain files from the directory.
13
+ *
14
+ * @param dirpath - The path of the directory to wipe.
15
+ * @param predicate - If the function returns true for a file, that file is removed from the directory.
16
+ */
17
+ function emptyDirectorySync(dirpath, predicate) {
18
+ if (!predicate)
19
+ return fs_extra_1.default.emptyDirSync(dirpath);
20
+ for (const name of fs_extra_1.default.readdirSync(dirpath)) {
21
+ const fspath = path_1.default.join(dirpath, name);
22
+ const stats = fs_extra_1.default.statSync(fspath);
23
+ if (predicate(Object.assign(stats, { name, path: fspath }))) {
24
+ fs_extra_1.default.removeSync(fspath);
25
+ }
26
+ }
27
+ }
28
+ exports.emptyDirectorySync = emptyDirectorySync;
29
+ //# sourceMappingURL=emptyDirectorySync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emptyDirectorySync.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/emptyDirectorySync.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEvB;;;;;;;;;GASG;AACH,SAAgB,kBAAkB,CAChC,OAAe,EACf,SAAyE;IAEzE,IAAI,CAAC,SAAS;QAAE,OAAO,kBAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IAC/C,KAAK,MAAM,IAAI,IAAI,kBAAE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QAC1C,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACvC,MAAM,KAAK,GAAG,kBAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACjC,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE;YAC3D,kBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;SACtB;KACF;AACH,CAAC;AAZD,gDAYC"}
@@ -4,3 +4,4 @@
4
4
  * @returns The number of leading spaces on the second line of the JSON string, or 0 if the JSON string has less than two lines or if the second line does not start with any spaces.
5
5
  */
6
6
  export declare function getJsonIndentation(json: string): number;
7
+ //# sourceMappingURL=getJsonIndentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getJsonIndentation.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getJsonIndentation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getJsonIndentation = void 0;
2
4
  /**
3
5
  * This function calculates the indentation level of a JSON string.
4
6
  * @param json - The JSON string whose indentation level is to be calculated.
5
7
  * @returns The number of leading spaces on the second line of the JSON string, or 0 if the JSON string has less than two lines or if the second line does not start with any spaces.
6
8
  */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.getJsonIndentation = void 0;
9
9
  function getJsonIndentation(json) {
10
10
  const lines = json.split('\n');
11
11
  if (lines.length < 2)
@@ -1 +1 @@
1
- {"version":3,"file":"getJsonIndentation.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getJsonIndentation.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC9C,OAAO,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpD,CAAC;AALD,gDAKC"}
1
+ {"version":3,"file":"getJsonIndentation.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getJsonIndentation.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC9B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC9C,OAAO,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;AACpD,CAAC;AALD,gDAKC"}
@@ -1 +1,2 @@
1
1
  export declare function getLastMofifiedFileIn(dirpath: string): Promise<string>;
2
+ //# sourceMappingURL=getLastMofifiedFileIn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLastMofifiedFileIn.d.ts","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getLastMofifiedFileIn.ts"],"names":[],"mappings":"AAGA,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW5E"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLastMofifiedFileIn = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
6
+ const path_1 = tslib_1.__importDefault(require("path"));
7
+ async function getLastMofifiedFileIn(dirpath) {
8
+ const children = await fs_extra_1.default.readdir(dirpath);
9
+ const filtered = children
10
+ .map((fname) => {
11
+ const fpath = path_1.default.join(dirpath, fname);
12
+ const stat = fs_extra_1.default.statSync(fpath);
13
+ return [fpath, stat.mtimeMs, stat.isFile()];
14
+ })
15
+ .filter((a) => a[2]);
16
+ const sorted = filtered.sort((a, b) => b[1] - a[1]);
17
+ return sorted[0][0];
18
+ }
19
+ exports.getLastMofifiedFileIn = getLastMofifiedFileIn;
20
+ //# sourceMappingURL=getLastMofifiedFileIn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLastMofifiedFileIn.js","sourceRoot":"","sources":["../../../../../packages/fs/src/lib/getLastMofifiedFileIn.ts"],"names":[],"mappings":";;;;AAAA,gEAAyB;AACzB,wDAAuB;AAEhB,KAAK,UAAU,qBAAqB,CAAC,OAAe;IACzD,MAAM,QAAQ,GAAG,MAAM,kBAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAC1C,MAAM,QAAQ,GAAG,QAAQ;SACtB,GAAG,CAAC,CAAC,KAAa,EAAE,EAAE;QACrB,MAAM,KAAK,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACvC,MAAM,IAAI,GAAG,kBAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC/B,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAC7C,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAgC,CAAA;IACrD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACrB,CAAC;AAXD,sDAWC"}
@@ -0,0 +1,10 @@
1
+ import { IGetUserInputFromEditorOptions } from './types/IGetUserInputFromEditorOptions';
2
+ /**
3
+ * Prompts the user to edit a string in the user's text editor.
4
+ *
5
+ * @example ```ts
6
+ * promptUserEditInTextEditor({ editor: 'notepad' }).then(console.log)
7
+ * ```
8
+ */
9
+ export declare function promptUserEditInTextEditor(options?: IGetUserInputFromEditorOptions): Promise<string>;
10
+ //# sourceMappingURL=promptUserEditInTextEditor.d.ts.map