@visulima/fs 3.1.7 → 3.1.8

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 (219) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +153 -153
  3. package/dist/eol.cjs +3 -28
  4. package/dist/eol.mjs +3 -20
  5. package/dist/error.cjs +1 -21
  6. package/dist/error.mjs +1 -7
  7. package/dist/index.cjs +1 -80
  8. package/dist/index.mjs +1 -31
  9. package/dist/packem_shared/AlreadyExistsError-CEu6_Tjb.mjs +1 -0
  10. package/dist/packem_shared/AlreadyExistsError-GC2XUgzJ.cjs +1 -0
  11. package/dist/packem_shared/DirectoryError-aGtmQVph.cjs +1 -0
  12. package/dist/packem_shared/DirectoryError-ddlbUV8C.mjs +1 -0
  13. package/dist/packem_shared/F_OK-7T91O6Oz.cjs +1 -0
  14. package/dist/packem_shared/F_OK-B71i3mUa.mjs +1 -0
  15. package/dist/packem_shared/JSONError-CVkb3xZ3.mjs +4 -0
  16. package/dist/packem_shared/JSONError-CWuiGmNc.cjs +4 -0
  17. package/dist/packem_shared/NotEmptyError-BWGfec5K.cjs +1 -0
  18. package/dist/packem_shared/NotEmptyError-DMh1o7UL.mjs +1 -0
  19. package/dist/packem_shared/NotFoundError-BPiW0icm.mjs +1 -0
  20. package/dist/packem_shared/NotFoundError-Diij7oqe.cjs +1 -0
  21. package/dist/packem_shared/PermissionError-B1Emi5a9.mjs +1 -0
  22. package/dist/packem_shared/PermissionError-Ck1Es7al.cjs +1 -0
  23. package/dist/packem_shared/WalkError-BsngoIKJ.mjs +1 -0
  24. package/dist/packem_shared/WalkError-gKgp0TWD.cjs +1 -0
  25. package/dist/packem_shared/assertValidFileContents-BZFnXa7K.mjs +1 -0
  26. package/dist/packem_shared/assertValidFileContents-CrbDz09d.cjs +1 -0
  27. package/dist/packem_shared/assertValidFileOrDirectoryPath-DgPIPmZT.mjs +1 -0
  28. package/dist/packem_shared/assertValidFileOrDirectoryPath-HOUs73Jk.cjs +1 -0
  29. package/dist/packem_shared/collect-Bl2Oc1qs.cjs +1 -0
  30. package/dist/packem_shared/collect-CyYPQFMs.mjs +1 -0
  31. package/dist/packem_shared/collectSync-BHjyXWq4.cjs +1 -0
  32. package/dist/packem_shared/collectSync-CD9cXw2g.mjs +1 -0
  33. package/dist/packem_shared/emptyDir-BdjO-6Gu.mjs +1 -0
  34. package/dist/packem_shared/emptyDir-DGRw4yE9.cjs +1 -0
  35. package/dist/packem_shared/emptyDirSync-C1vsMEp-.mjs +1 -0
  36. package/dist/packem_shared/emptyDirSync-DzjDZxOx.cjs +1 -0
  37. package/dist/packem_shared/ensureDir-BuIFF_6B.mjs +1 -0
  38. package/dist/packem_shared/ensureDir-DtQzyA70.cjs +1 -0
  39. package/dist/packem_shared/ensureDirSync-BuPHxdP4.mjs +1 -0
  40. package/dist/packem_shared/ensureDirSync-C8hIoS3o.cjs +1 -0
  41. package/dist/packem_shared/ensureFile-DcAODM6a.mjs +1 -0
  42. package/dist/packem_shared/ensureFile-wR8zBfXh.cjs +1 -0
  43. package/dist/packem_shared/ensureFileSync-BI1fIdNf.cjs +1 -0
  44. package/dist/packem_shared/ensureFileSync-CzPN6ucX.mjs +1 -0
  45. package/dist/packem_shared/ensureLink-BaZLXxgx.mjs +1 -0
  46. package/dist/packem_shared/ensureLink-DCPuU0Za.cjs +1 -0
  47. package/dist/packem_shared/ensureLinkSync-9C2JL-Sl.mjs +1 -0
  48. package/dist/packem_shared/ensureLinkSync-CuRZmQlV.cjs +1 -0
  49. package/dist/packem_shared/ensureSymlink-BH6wbylb.mjs +1 -0
  50. package/dist/packem_shared/ensureSymlink-J83jhdfA.cjs +1 -0
  51. package/dist/packem_shared/ensureSymlinkSync-CZSPodAm.mjs +1 -0
  52. package/dist/packem_shared/ensureSymlinkSync-VNtMTaV8.cjs +1 -0
  53. package/dist/packem_shared/findUp-C5aWsLuD.cjs +1 -0
  54. package/dist/packem_shared/findUp-CMGMYNty.mjs +1 -0
  55. package/dist/packem_shared/findUpSync-QP_ZEsJN.mjs +1 -0
  56. package/dist/packem_shared/findUpSync-U1lTgv4y.cjs +1 -0
  57. package/dist/packem_shared/get-file-info-type-CaWGXRjY.mjs +1 -0
  58. package/dist/packem_shared/get-file-info-type-DDbpRlDl.cjs +1 -0
  59. package/dist/packem_shared/index-BSjF-5vj.mjs +1 -0
  60. package/dist/packem_shared/index-DPla58ce.cjs +1 -0
  61. package/dist/packem_shared/is-stats-identical-Bti7K05l.cjs +1 -0
  62. package/dist/packem_shared/is-stats-identical-CohsLtWy.mjs +1 -0
  63. package/dist/packem_shared/isAccessible-BQZd1_xn.cjs +1 -0
  64. package/dist/packem_shared/isAccessible-CL4eE5VL.mjs +1 -0
  65. package/dist/packem_shared/isAccessibleSync-BP5N8k_-.cjs +1 -0
  66. package/dist/packem_shared/isAccessibleSync-_HU_ppdG.mjs +1 -0
  67. package/dist/packem_shared/move--o4NZLpD.mjs +1 -0
  68. package/dist/packem_shared/move-DwG6APiG.cjs +1 -0
  69. package/dist/packem_shared/parseJson-B_GwHpKj.cjs +6 -0
  70. package/dist/packem_shared/parseJson-Bqic0nN8.mjs +6 -0
  71. package/dist/packem_shared/readFile-BvefDyr_.cjs +1 -0
  72. package/dist/packem_shared/readFile-Cix_ijtX.mjs +1 -0
  73. package/dist/packem_shared/readFileSync-B0O-8BH0.mjs +1 -0
  74. package/dist/packem_shared/readFileSync-Ct8Ql4Vs.cjs +1 -0
  75. package/dist/packem_shared/readJson-BLvd2Bsj.mjs +1 -0
  76. package/dist/packem_shared/readJson-cP5ArpPg.cjs +1 -0
  77. package/dist/packem_shared/readJsonSync-B6h6A3Un.cjs +1 -0
  78. package/dist/packem_shared/readJsonSync-Br5dHGAI.mjs +1 -0
  79. package/dist/packem_shared/readYaml-BOYTR5D1.mjs +1 -0
  80. package/dist/packem_shared/readYaml-BzMFDsYe.cjs +1 -0
  81. package/dist/packem_shared/readYamlSync-BbK0khJu.cjs +1 -0
  82. package/dist/packem_shared/readYamlSync-md9g88k7.mjs +1 -0
  83. package/dist/packem_shared/remove-CtnFqEpd.mjs +1 -0
  84. package/dist/packem_shared/remove-DPCf2Qdb.cjs +1 -0
  85. package/dist/packem_shared/removeSync-Cyriz7r8.cjs +1 -0
  86. package/dist/packem_shared/removeSync-DI-IjqVp.mjs +1 -0
  87. package/dist/packem_shared/resolve-symlink-target-BofZSDIc.mjs +1 -0
  88. package/dist/packem_shared/resolve-symlink-target-zilkQ_AU.cjs +1 -0
  89. package/dist/packem_shared/stripJsonComments-Cp5SNAB7.mjs +1 -0
  90. package/dist/packem_shared/stripJsonComments-CvZSDnYT.cjs +1 -0
  91. package/dist/packem_shared/to-uint-8-array-2-3EvGd7.cjs +1 -0
  92. package/dist/packem_shared/to-uint-8-array-DwgaTasY.mjs +1 -0
  93. package/dist/packem_shared/walk-BZTXbT87.mjs +1 -0
  94. package/dist/packem_shared/walk-DyN_HVFW.cjs +1 -0
  95. package/dist/packem_shared/walk-include-C9pVST87.mjs +1 -0
  96. package/dist/packem_shared/walk-include-DkK-WJl4.cjs +1 -0
  97. package/dist/packem_shared/walkSync-BHlEzV_m.mjs +1 -0
  98. package/dist/packem_shared/walkSync-Bqi7L2yG.cjs +1 -0
  99. package/dist/packem_shared/writeFile-COOAkvOE.mjs +1 -0
  100. package/dist/packem_shared/writeFile-CjgQEfur.cjs +1 -0
  101. package/dist/packem_shared/writeFileSync-CQuRHo9n.cjs +1 -0
  102. package/dist/packem_shared/writeFileSync-rhu-y_zx.mjs +1 -0
  103. package/dist/packem_shared/writeJson-BYT4WInm.mjs +4 -0
  104. package/dist/packem_shared/writeJson-CJIciZ_Q.cjs +4 -0
  105. package/dist/packem_shared/writeJsonSync-BIsrhRbV.cjs +4 -0
  106. package/dist/packem_shared/writeJsonSync-CLlXOFDm.mjs +4 -0
  107. package/dist/packem_shared/writeYaml-CjzVd0K-.mjs +1 -0
  108. package/dist/packem_shared/writeYaml-VmX1VKhN.cjs +1 -0
  109. package/dist/packem_shared/writeYamlSync-D9A9Ixe1.mjs +1 -0
  110. package/dist/packem_shared/writeYamlSync-DYsM6XBi.cjs +1 -0
  111. package/dist/size.cjs +1 -118
  112. package/dist/size.mjs +1 -109
  113. package/dist/utils.cjs +1 -19
  114. package/dist/utils.mjs +1 -6
  115. package/dist/yaml.cjs +1 -15
  116. package/dist/yaml.mjs +1 -4
  117. package/package.json +1 -1
  118. package/dist/packem_shared/AlreadyExistsError-DpxtwQot.cjs +0 -34
  119. package/dist/packem_shared/AlreadyExistsError-GK7J9fVA.mjs +0 -32
  120. package/dist/packem_shared/DirectoryError-D8FHcAqu.cjs +0 -34
  121. package/dist/packem_shared/DirectoryError-DByTWE7t.mjs +0 -32
  122. package/dist/packem_shared/F_OK-CWSqQIdF.cjs +0 -17
  123. package/dist/packem_shared/F_OK-JER1LjUr.mjs +0 -8
  124. package/dist/packem_shared/JSONError-5-wHnrxX.cjs +0 -34
  125. package/dist/packem_shared/JSONError-CaKt7MhC.mjs +0 -32
  126. package/dist/packem_shared/NotEmptyError-BCS_5pPt.cjs +0 -34
  127. package/dist/packem_shared/NotEmptyError-DCXooh5l.mjs +0 -32
  128. package/dist/packem_shared/NotFoundError-B_1nPl3K.cjs +0 -34
  129. package/dist/packem_shared/NotFoundError-CUdcC61I.mjs +0 -32
  130. package/dist/packem_shared/PermissionError-CqGMI9qC.mjs +0 -32
  131. package/dist/packem_shared/PermissionError-QFMKgk2l.cjs +0 -34
  132. package/dist/packem_shared/WalkError-B4-yr8Kk.cjs +0 -31
  133. package/dist/packem_shared/WalkError-DvEBTTaj.mjs +0 -29
  134. package/dist/packem_shared/assertValidFileContents-CRVvyM6b.cjs +0 -11
  135. package/dist/packem_shared/assertValidFileContents-Ox-ScfeK.mjs +0 -9
  136. package/dist/packem_shared/assertValidFileOrDirectoryPath-BMbgA-eI.cjs +0 -11
  137. package/dist/packem_shared/assertValidFileOrDirectoryPath-BWWgA1wj.mjs +0 -9
  138. package/dist/packem_shared/collect-3Paj1Vqw.mjs +0 -16
  139. package/dist/packem_shared/collect-DnfQeSOL.cjs +0 -18
  140. package/dist/packem_shared/collectSync-D4vym4QD.cjs +0 -18
  141. package/dist/packem_shared/collectSync-DwJLL8SD.mjs +0 -16
  142. package/dist/packem_shared/emptyDir-DcCfiNcf.cjs +0 -22
  143. package/dist/packem_shared/emptyDir-Dw5xSBox.mjs +0 -20
  144. package/dist/packem_shared/emptyDirSync-BWA4n6TB.cjs +0 -21
  145. package/dist/packem_shared/emptyDirSync-DMAaCiC_.mjs +0 -19
  146. package/dist/packem_shared/ensureDir-BOfUZlxG.cjs +0 -35
  147. package/dist/packem_shared/ensureDir-BnA_fY1A.mjs +0 -33
  148. package/dist/packem_shared/ensureDirSync-DHmWi3CF.cjs +0 -35
  149. package/dist/packem_shared/ensureDirSync-Dm4az3YF.mjs +0 -33
  150. package/dist/packem_shared/ensureFile-BKrJMHfr.mjs +0 -27
  151. package/dist/packem_shared/ensureFile-CeGryLJI.cjs +0 -29
  152. package/dist/packem_shared/ensureFileSync-B7THM1sN.cjs +0 -29
  153. package/dist/packem_shared/ensureFileSync-BnhFBXaR.mjs +0 -27
  154. package/dist/packem_shared/ensureLink-ChsWDTK5.mjs +0 -34
  155. package/dist/packem_shared/ensureLink-CrxLNmHE.cjs +0 -36
  156. package/dist/packem_shared/ensureLinkSync-CG-DTUoV.mjs +0 -34
  157. package/dist/packem_shared/ensureLinkSync-D8uMqLh4.cjs +0 -36
  158. package/dist/packem_shared/ensureSymlink-BwJ_QhzJ.mjs +0 -52
  159. package/dist/packem_shared/ensureSymlink-D_ieOVYa.cjs +0 -54
  160. package/dist/packem_shared/ensureSymlinkSync-BamG29QK.mjs +0 -56
  161. package/dist/packem_shared/ensureSymlinkSync-DTMvUYZD.cjs +0 -58
  162. package/dist/packem_shared/findUp-D5W-MTpT.mjs +0 -63
  163. package/dist/packem_shared/findUp-DVIYN2wV.cjs +0 -65
  164. package/dist/packem_shared/findUpSync-BOiVyUOx.cjs +0 -65
  165. package/dist/packem_shared/findUpSync-DL3NPCYg.mjs +0 -63
  166. package/dist/packem_shared/get-file-info-type-BlryFnpp.cjs +0 -18
  167. package/dist/packem_shared/get-file-info-type-ButUVD6d.mjs +0 -16
  168. package/dist/packem_shared/index-BVZL6YMm.cjs +0 -110
  169. package/dist/packem_shared/index-r9Pk9gBe.mjs +0 -108
  170. package/dist/packem_shared/is-stats-identical-BfdEfO6i.cjs +0 -7
  171. package/dist/packem_shared/is-stats-identical-ByTYZ2Aw.mjs +0 -5
  172. package/dist/packem_shared/isAccessible-Bonsm1Ez.mjs +0 -20
  173. package/dist/packem_shared/isAccessible-ZNVGsSb7.cjs +0 -22
  174. package/dist/packem_shared/isAccessibleSync-3gnUWUwX.mjs +0 -20
  175. package/dist/packem_shared/isAccessibleSync-VWjQa-US.cjs +0 -22
  176. package/dist/packem_shared/move-DgF7Ul9L.mjs +0 -114
  177. package/dist/packem_shared/move-Dh925GL9.cjs +0 -121
  178. package/dist/packem_shared/parseJson-BA7Xrggq.mjs +0 -248
  179. package/dist/packem_shared/parseJson-LgPGI5ic.cjs +0 -250
  180. package/dist/packem_shared/readFile-b7UBVv17.mjs +0 -46
  181. package/dist/packem_shared/readFile-iFUhZHnh.cjs +0 -48
  182. package/dist/packem_shared/readFileSync-B3NTOR-W.cjs +0 -33
  183. package/dist/packem_shared/readFileSync-CkEJBqZB.mjs +0 -31
  184. package/dist/packem_shared/readJson-CEBHyuYq.cjs +0 -27
  185. package/dist/packem_shared/readJson-Ce9b06cu.mjs +0 -25
  186. package/dist/packem_shared/readJsonSync-B22hej0y.cjs +0 -27
  187. package/dist/packem_shared/readJsonSync-CkUI9_z5.mjs +0 -25
  188. package/dist/packem_shared/readYaml-C5MSs2GE.mjs +0 -13
  189. package/dist/packem_shared/readYaml-sR4bqUel.cjs +0 -15
  190. package/dist/packem_shared/readYamlSync-C3oOzxiN.cjs +0 -15
  191. package/dist/packem_shared/readYamlSync-CPjA-DLv.mjs +0 -13
  192. package/dist/packem_shared/remove-B2nxUObP.mjs +0 -18
  193. package/dist/packem_shared/remove-BpDiVPns.cjs +0 -20
  194. package/dist/packem_shared/removeSync-BosXW624.cjs +0 -20
  195. package/dist/packem_shared/removeSync-C87yepDI.mjs +0 -18
  196. package/dist/packem_shared/resolve-symlink-target-BbpEHdU2.mjs +0 -18
  197. package/dist/packem_shared/resolve-symlink-target-DImIddt6.cjs +0 -20
  198. package/dist/packem_shared/stripJsonComments-B66nRaTZ.mjs +0 -21
  199. package/dist/packem_shared/stripJsonComments-eDrcJvBT.cjs +0 -23
  200. package/dist/packem_shared/to-uint-8-array-B4CjMOD3.mjs +0 -21
  201. package/dist/packem_shared/to-uint-8-array-BaTEyX3D.cjs +0 -23
  202. package/dist/packem_shared/walk-CI3ygmrw.cjs +0 -100
  203. package/dist/packem_shared/walk-D7YA43g8.mjs +0 -98
  204. package/dist/packem_shared/walk-include-CMUSRa86.mjs +0 -20
  205. package/dist/packem_shared/walk-include-yUdRrF16.cjs +0 -23
  206. package/dist/packem_shared/walkSync-DLTsnwuJ.mjs +0 -103
  207. package/dist/packem_shared/walkSync-oXkmn9ZA.cjs +0 -105
  208. package/dist/packem_shared/writeFile-BZ4JBQxc.mjs +0 -58
  209. package/dist/packem_shared/writeFile-DgCFRCe5.cjs +0 -60
  210. package/dist/packem_shared/writeFileSync-Ctw5pNQH.mjs +0 -58
  211. package/dist/packem_shared/writeFileSync-DzXhx1pF.cjs +0 -60
  212. package/dist/packem_shared/writeJson-Bh4sU1Ly.cjs +0 -33
  213. package/dist/packem_shared/writeJson-axO_14yL.mjs +0 -31
  214. package/dist/packem_shared/writeJsonSync-CzngmuKb.mjs +0 -31
  215. package/dist/packem_shared/writeJsonSync-HFdHjunl.cjs +0 -33
  216. package/dist/packem_shared/writeYaml-3XQT2qtb.cjs +0 -29
  217. package/dist/packem_shared/writeYaml-BSFEuWp2.mjs +0 -27
  218. package/dist/packem_shared/writeYamlSync-B6VcXXIb.mjs +0 -27
  219. package/dist/packem_shared/writeYamlSync-BZR3If9v.cjs +0 -29
@@ -1,32 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class DirectoryError extends Error {
4
- static {
5
- __name(this, "DirectoryError");
6
- }
7
- /**
8
- * Creates a new instance.
9
- * @param {string} message The error message.
10
- */
11
- constructor(message) {
12
- super(`EISDIR: Illegal operation on a directory, ${message}`);
13
- }
14
- // eslint-disable-next-line class-methods-use-this
15
- get code() {
16
- return "EISDIR";
17
- }
18
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
19
- set code(_name) {
20
- throw new Error("Cannot overwrite code EISDIR");
21
- }
22
- // eslint-disable-next-line class-methods-use-this
23
- get name() {
24
- return "DirectoryError";
25
- }
26
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
27
- set name(_name) {
28
- throw new Error("Cannot overwrite name of DirectoryError");
29
- }
30
- }
31
-
32
- export { DirectoryError as default };
@@ -1,17 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
-
5
- const F_OK = 0;
6
- const R_OK = 4;
7
- const W_OK = 2;
8
- const X_OK = 1;
9
- const FIND_UP_STOP = Symbol("findUpStop");
10
- const INTERNAL_STRIP_JSON_REGEX = /"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*(?:[^*]|\*[^/])*\*\//g;
11
-
12
- exports.FIND_UP_STOP = FIND_UP_STOP;
13
- exports.F_OK = F_OK;
14
- exports.INTERNAL_STRIP_JSON_REGEX = INTERNAL_STRIP_JSON_REGEX;
15
- exports.R_OK = R_OK;
16
- exports.W_OK = W_OK;
17
- exports.X_OK = X_OK;
@@ -1,8 +0,0 @@
1
- const F_OK = 0;
2
- const R_OK = 4;
3
- const W_OK = 2;
4
- const X_OK = 1;
5
- const FIND_UP_STOP = Symbol("findUpStop");
6
- const INTERNAL_STRIP_JSON_REGEX = /"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*(?:[^*]|\*[^/])*\*\//g;
7
-
8
- export { FIND_UP_STOP, F_OK, INTERNAL_STRIP_JSON_REGEX, R_OK, W_OK, X_OK };
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- class JSONError extends Error {
6
- static {
7
- __name(this, "JSONError");
8
- }
9
- fileName;
10
- codeFrame;
11
- // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
12
- name = "JSONError";
13
- #message;
14
- /**
15
- * Creates a new JSONError instance.
16
- * @param message The primary error message.
17
- */
18
- constructor(message) {
19
- super();
20
- this.#message = message;
21
- Error.captureStackTrace(this, JSONError);
22
- }
23
- get message() {
24
- return `${this.#message}${this.fileName ? ` in ${this.fileName}` : ""}${this.codeFrame ? `
25
-
26
- ${this.codeFrame}
27
- ` : ""}`;
28
- }
29
- set message(message) {
30
- this.#message = message;
31
- }
32
- }
33
-
34
- module.exports = JSONError;
@@ -1,32 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class JSONError extends Error {
4
- static {
5
- __name(this, "JSONError");
6
- }
7
- fileName;
8
- codeFrame;
9
- // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility
10
- name = "JSONError";
11
- #message;
12
- /**
13
- * Creates a new JSONError instance.
14
- * @param message The primary error message.
15
- */
16
- constructor(message) {
17
- super();
18
- this.#message = message;
19
- Error.captureStackTrace(this, JSONError);
20
- }
21
- get message() {
22
- return `${this.#message}${this.fileName ? ` in ${this.fileName}` : ""}${this.codeFrame ? `
23
-
24
- ${this.codeFrame}
25
- ` : ""}`;
26
- }
27
- set message(message) {
28
- this.#message = message;
29
- }
30
- }
31
-
32
- export { JSONError as default };
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- class NotEmptyError extends Error {
6
- static {
7
- __name(this, "NotEmptyError");
8
- }
9
- /**
10
- * Creates a new instance.
11
- * @param {string} message The error message.
12
- */
13
- constructor(message) {
14
- super(`ENOTEMPTY: Directory not empty, ${message}`);
15
- }
16
- // eslint-disable-next-line class-methods-use-this
17
- get code() {
18
- return "ENOTEMPTY";
19
- }
20
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
21
- set code(_name) {
22
- throw new Error("Cannot overwrite code ENOTEMPTY");
23
- }
24
- // eslint-disable-next-line class-methods-use-this
25
- get name() {
26
- return "NotEmptyError";
27
- }
28
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
29
- set name(_name) {
30
- throw new Error("Cannot overwrite name of NotEmptyError");
31
- }
32
- }
33
-
34
- module.exports = NotEmptyError;
@@ -1,32 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class NotEmptyError extends Error {
4
- static {
5
- __name(this, "NotEmptyError");
6
- }
7
- /**
8
- * Creates a new instance.
9
- * @param {string} message The error message.
10
- */
11
- constructor(message) {
12
- super(`ENOTEMPTY: Directory not empty, ${message}`);
13
- }
14
- // eslint-disable-next-line class-methods-use-this
15
- get code() {
16
- return "ENOTEMPTY";
17
- }
18
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
19
- set code(_name) {
20
- throw new Error("Cannot overwrite code ENOTEMPTY");
21
- }
22
- // eslint-disable-next-line class-methods-use-this
23
- get name() {
24
- return "NotEmptyError";
25
- }
26
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
27
- set name(_name) {
28
- throw new Error("Cannot overwrite name of NotEmptyError");
29
- }
30
- }
31
-
32
- export { NotEmptyError as default };
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- class NotFoundError extends Error {
6
- static {
7
- __name(this, "NotFoundError");
8
- }
9
- /**
10
- * Creates a new instance.
11
- * @param {string} message The error message.
12
- */
13
- constructor(message) {
14
- super(`ENOENT: ${message}`);
15
- }
16
- // eslint-disable-next-line class-methods-use-this
17
- get code() {
18
- return "ENOENT";
19
- }
20
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
21
- set code(_name) {
22
- throw new Error("Cannot overwrite code ENOENT");
23
- }
24
- // eslint-disable-next-line class-methods-use-this
25
- get name() {
26
- return "NotFoundError";
27
- }
28
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
29
- set name(_name) {
30
- throw new Error("Cannot overwrite name of NotFoundError");
31
- }
32
- }
33
-
34
- module.exports = NotFoundError;
@@ -1,32 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class NotFoundError extends Error {
4
- static {
5
- __name(this, "NotFoundError");
6
- }
7
- /**
8
- * Creates a new instance.
9
- * @param {string} message The error message.
10
- */
11
- constructor(message) {
12
- super(`ENOENT: ${message}`);
13
- }
14
- // eslint-disable-next-line class-methods-use-this
15
- get code() {
16
- return "ENOENT";
17
- }
18
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
19
- set code(_name) {
20
- throw new Error("Cannot overwrite code ENOENT");
21
- }
22
- // eslint-disable-next-line class-methods-use-this
23
- get name() {
24
- return "NotFoundError";
25
- }
26
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
27
- set name(_name) {
28
- throw new Error("Cannot overwrite name of NotFoundError");
29
- }
30
- }
31
-
32
- export { NotFoundError as default };
@@ -1,32 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class PermissionError extends Error {
4
- static {
5
- __name(this, "PermissionError");
6
- }
7
- /**
8
- * Creates a new instance.
9
- * @param {string} message The error message.
10
- */
11
- constructor(message) {
12
- super(`EPERM: Operation not permitted, ${message}`);
13
- }
14
- // eslint-disable-next-line class-methods-use-this
15
- get code() {
16
- return "EPERM";
17
- }
18
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
19
- set code(_name) {
20
- throw new Error("Cannot overwrite code EPERM");
21
- }
22
- // eslint-disable-next-line class-methods-use-this
23
- get name() {
24
- return "PermissionError";
25
- }
26
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
27
- set name(_name) {
28
- throw new Error("Cannot overwrite name of PermissionError");
29
- }
30
- }
31
-
32
- export { PermissionError as default };
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- class PermissionError extends Error {
6
- static {
7
- __name(this, "PermissionError");
8
- }
9
- /**
10
- * Creates a new instance.
11
- * @param {string} message The error message.
12
- */
13
- constructor(message) {
14
- super(`EPERM: Operation not permitted, ${message}`);
15
- }
16
- // eslint-disable-next-line class-methods-use-this
17
- get code() {
18
- return "EPERM";
19
- }
20
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
21
- set code(_name) {
22
- throw new Error("Cannot overwrite code EPERM");
23
- }
24
- // eslint-disable-next-line class-methods-use-this
25
- get name() {
26
- return "PermissionError";
27
- }
28
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
29
- set name(_name) {
30
- throw new Error("Cannot overwrite name of PermissionError");
31
- }
32
- }
33
-
34
- module.exports = PermissionError;
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- class WalkError extends Error {
6
- static {
7
- __name(this, "WalkError");
8
- }
9
- /** File path of the root that's being walked. */
10
- root;
11
- /**
12
- * Constructs a new instance.
13
- * @param cause The underlying error or reason for the walk failure.
14
- * @param root The root directory path where the walk operation started or encountered the error.
15
- */
16
- constructor(cause, root) {
17
- super(`${cause instanceof Error ? cause.message : cause} for path "${root}"`);
18
- this.cause = cause;
19
- this.root = root;
20
- }
21
- // eslint-disable-next-line class-methods-use-this
22
- get name() {
23
- return "WalkError";
24
- }
25
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
26
- set name(_name) {
27
- throw new Error("Cannot overwrite name of WalkError");
28
- }
29
- }
30
-
31
- module.exports = WalkError;
@@ -1,29 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class WalkError extends Error {
4
- static {
5
- __name(this, "WalkError");
6
- }
7
- /** File path of the root that's being walked. */
8
- root;
9
- /**
10
- * Constructs a new instance.
11
- * @param cause The underlying error or reason for the walk failure.
12
- * @param root The root directory path where the walk operation started or encountered the error.
13
- */
14
- constructor(cause, root) {
15
- super(`${cause instanceof Error ? cause.message : cause} for path "${root}"`);
16
- this.cause = cause;
17
- this.root = root;
18
- }
19
- // eslint-disable-next-line class-methods-use-this
20
- get name() {
21
- return "WalkError";
22
- }
23
- // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
24
- set name(_name) {
25
- throw new Error("Cannot overwrite name of WalkError");
26
- }
27
- }
28
-
29
- export { WalkError as default };
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const assertValidFileContents = /* @__PURE__ */ __name((contents) => {
6
- if (typeof contents !== "string" && !(contents instanceof ArrayBuffer) && !ArrayBuffer.isView(contents)) {
7
- throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.");
8
- }
9
- }, "assertValidFileContents");
10
-
11
- module.exports = assertValidFileContents;
@@ -1,9 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const assertValidFileContents = /* @__PURE__ */ __name((contents) => {
4
- if (typeof contents !== "string" && !(contents instanceof ArrayBuffer) && !ArrayBuffer.isView(contents)) {
5
- throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.");
6
- }
7
- }, "assertValidFileContents");
8
-
9
- export { assertValidFileContents as default };
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const assertValidFileOrDirectoryPath = /* @__PURE__ */ __name((fileOrDirectoryPath) => {
6
- if (!fileOrDirectoryPath || !(fileOrDirectoryPath instanceof URL) && typeof fileOrDirectoryPath !== "string") {
7
- throw new TypeError("Path must be a non-empty string or URL.");
8
- }
9
- }, "assertValidFileOrDirectoryPath");
10
-
11
- module.exports = assertValidFileOrDirectoryPath;
@@ -1,9 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const assertValidFileOrDirectoryPath = /* @__PURE__ */ __name((fileOrDirectoryPath) => {
4
- if (!fileOrDirectoryPath || !(fileOrDirectoryPath instanceof URL) && typeof fileOrDirectoryPath !== "string") {
5
- throw new TypeError("Path must be a non-empty string or URL.");
6
- }
7
- }, "assertValidFileOrDirectoryPath");
8
-
9
- export { assertValidFileOrDirectoryPath as default };
@@ -1,16 +0,0 @@
1
- import walk from './walk-D7YA43g8.mjs';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const collect = /* @__PURE__ */ __name(async (directory, options = {}) => {
6
- if (!Array.isArray(options.extensions)) {
7
- options.extensions = ["js", "mjs", "cjs", "ts"];
8
- }
9
- const entries = [];
10
- for await (const entry of walk(directory, options)) {
11
- entries.push(entry.path);
12
- }
13
- return entries;
14
- }, "collect");
15
-
16
- export { collect as default };
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- const walk = require('./walk-CI3ygmrw.cjs');
4
-
5
- var __defProp = Object.defineProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- const collect = /* @__PURE__ */ __name(async (directory, options = {}) => {
8
- if (!Array.isArray(options.extensions)) {
9
- options.extensions = ["js", "mjs", "cjs", "ts"];
10
- }
11
- const entries = [];
12
- for await (const entry of walk(directory, options)) {
13
- entries.push(entry.path);
14
- }
15
- return entries;
16
- }, "collect");
17
-
18
- module.exports = collect;
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- const walkSync = require('./walkSync-oXkmn9ZA.cjs');
4
-
5
- var __defProp = Object.defineProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- const collectSync = /* @__PURE__ */ __name((directory, options = {}) => {
8
- if (!Array.isArray(options.extensions)) {
9
- options.extensions = ["js", "mjs", "cjs", "ts"];
10
- }
11
- const entries = [];
12
- for (const entry of walkSync(directory, options)) {
13
- entries.push(entry.path);
14
- }
15
- return entries;
16
- }, "collectSync");
17
-
18
- module.exports = collectSync;
@@ -1,16 +0,0 @@
1
- import walkSync from './walkSync-DLTsnwuJ.mjs';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
- const collectSync = /* @__PURE__ */ __name((directory, options = {}) => {
6
- if (!Array.isArray(options.extensions)) {
7
- options.extensions = ["js", "mjs", "cjs", "ts"];
8
- }
9
- const entries = [];
10
- for (const entry of walkSync(directory, options)) {
11
- entries.push(entry.path);
12
- }
13
- return entries;
14
- }, "collectSync");
15
-
16
- export { collectSync as default };
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- const node_fs = require('node:fs');
4
- const promises = require('node:fs/promises');
5
- const path = require('@visulima/path');
6
- const utils = require('@visulima/path/utils');
7
- const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
8
-
9
- var __defProp = Object.defineProperty;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- const emptyDir = /* @__PURE__ */ __name(async (dir, options) => {
12
- assertValidFileOrDirectoryPath(dir);
13
- if (!node_fs.existsSync(dir)) {
14
- await promises.mkdir(dir, { recursive: true });
15
- return;
16
- }
17
- for await (const item of await promises.readdir(dir)) {
18
- await promises.rm(path.join(utils.toPath(dir), item), { ...options, force: true, recursive: true });
19
- }
20
- }, "emptyDir");
21
-
22
- module.exports = emptyDir;
@@ -1,20 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import { mkdir, readdir, rm } from 'node:fs/promises';
3
- import { join } from '@visulima/path';
4
- import { toPath } from '@visulima/path/utils';
5
- import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
6
-
7
- var __defProp = Object.defineProperty;
8
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- const emptyDir = /* @__PURE__ */ __name(async (dir, options) => {
10
- assertValidFileOrDirectoryPath(dir);
11
- if (!existsSync(dir)) {
12
- await mkdir(dir, { recursive: true });
13
- return;
14
- }
15
- for await (const item of await readdir(dir)) {
16
- await rm(join(toPath(dir), item), { ...options, force: true, recursive: true });
17
- }
18
- }, "emptyDir");
19
-
20
- export { emptyDir as default };
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- const node_fs = require('node:fs');
4
- const path = require('@visulima/path');
5
- const utils = require('@visulima/path/utils');
6
- const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
7
-
8
- var __defProp = Object.defineProperty;
9
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
- const emptyDirSync = /* @__PURE__ */ __name((dir, options) => {
11
- assertValidFileOrDirectoryPath(dir);
12
- if (!node_fs.existsSync(dir)) {
13
- node_fs.mkdirSync(dir, { recursive: true });
14
- return;
15
- }
16
- for (const item of node_fs.readdirSync(dir)) {
17
- node_fs.rmSync(path.join(utils.toPath(dir), item), { ...options, force: true, recursive: true });
18
- }
19
- }, "emptyDirSync");
20
-
21
- module.exports = emptyDirSync;
@@ -1,19 +0,0 @@
1
- import { existsSync, mkdirSync, readdirSync, rmSync } from 'node:fs';
2
- import { join } from '@visulima/path';
3
- import { toPath } from '@visulima/path/utils';
4
- import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
5
-
6
- var __defProp = Object.defineProperty;
7
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
- const emptyDirSync = /* @__PURE__ */ __name((dir, options) => {
9
- assertValidFileOrDirectoryPath(dir);
10
- if (!existsSync(dir)) {
11
- mkdirSync(dir, { recursive: true });
12
- return;
13
- }
14
- for (const item of readdirSync(dir)) {
15
- rmSync(join(toPath(dir), item), { ...options, force: true, recursive: true });
16
- }
17
- }, "emptyDirSync");
18
-
19
- export { emptyDirSync as default };
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- const promises = require('node:fs/promises');
4
- const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
5
- const getFileInfoType = require('./get-file-info-type-BlryFnpp.cjs');
6
-
7
- var __defProp = Object.defineProperty;
8
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- const ensureDir = /* @__PURE__ */ __name(async (directory) => {
10
- assertValidFileOrDirectoryPath(directory);
11
- try {
12
- const fileInfo = await promises.lstat(directory);
13
- if (!fileInfo.isDirectory()) {
14
- throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType.getFileInfoType(fileInfo)}'`);
15
- }
16
- return;
17
- } catch (error) {
18
- if (error.code !== "ENOENT") {
19
- throw error;
20
- }
21
- }
22
- try {
23
- await promises.mkdir(directory, { recursive: true });
24
- } catch (error) {
25
- if (error.code !== "EEXIST") {
26
- throw error;
27
- }
28
- const fileInfo = await promises.lstat(directory);
29
- if (!fileInfo.isDirectory()) {
30
- throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType.getFileInfoType(fileInfo)}'`);
31
- }
32
- }
33
- }, "ensureDir");
34
-
35
- module.exports = ensureDir;