@visulima/fs 2.3.5 → 2.3.6

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 (217) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +318 -362
  3. package/dist/error.cjs +21 -1
  4. package/dist/error.mjs +7 -1
  5. package/dist/index.cjs +88 -1
  6. package/dist/index.mjs +35 -1
  7. package/dist/packem_shared/AlreadyExistsError-DpxtwQot.cjs +34 -0
  8. package/dist/packem_shared/AlreadyExistsError-GK7J9fVA.mjs +32 -0
  9. package/dist/packem_shared/DirectoryError-D8FHcAqu.cjs +34 -0
  10. package/dist/packem_shared/DirectoryError-DByTWE7t.mjs +32 -0
  11. package/dist/packem_shared/F_OK-CWSqQIdF.cjs +17 -0
  12. package/dist/packem_shared/F_OK-JER1LjUr.mjs +8 -0
  13. package/dist/packem_shared/JSONError-BCIIHvzq.mjs +28 -0
  14. package/dist/packem_shared/JSONError-gkXvBSar.cjs +30 -0
  15. package/dist/packem_shared/LF-CU3KsvZC.mjs +20 -0
  16. package/dist/packem_shared/LF-bB2qO80j.cjs +28 -0
  17. package/dist/packem_shared/NotEmptyError-BCS_5pPt.cjs +34 -0
  18. package/dist/packem_shared/NotEmptyError-DCXooh5l.mjs +32 -0
  19. package/dist/packem_shared/NotFoundError-B_1nPl3K.cjs +34 -0
  20. package/dist/packem_shared/NotFoundError-CUdcC61I.mjs +32 -0
  21. package/dist/packem_shared/PermissionError-CqGMI9qC.mjs +32 -0
  22. package/dist/packem_shared/PermissionError-QFMKgk2l.cjs +34 -0
  23. package/dist/packem_shared/WalkError-B7_AVs7d.cjs +27 -0
  24. package/dist/packem_shared/WalkError-H9EuRv7O.mjs +25 -0
  25. package/dist/packem_shared/assertValidFileContents-CRVvyM6b.cjs +11 -0
  26. package/dist/packem_shared/assertValidFileContents-Ox-ScfeK.mjs +9 -0
  27. package/dist/packem_shared/assertValidFileOrDirectoryPath-BMbgA-eI.cjs +11 -0
  28. package/dist/packem_shared/assertValidFileOrDirectoryPath-BWWgA1wj.mjs +9 -0
  29. package/dist/packem_shared/collect-BtDVJEOm.mjs +16 -0
  30. package/dist/packem_shared/collect-DxUriHCH.cjs +18 -0
  31. package/dist/packem_shared/collectSync-BaA0s001.cjs +18 -0
  32. package/dist/packem_shared/collectSync-CGjdb50I.mjs +16 -0
  33. package/dist/packem_shared/emptyDir-DcCfiNcf.cjs +22 -0
  34. package/dist/packem_shared/emptyDir-Dw5xSBox.mjs +20 -0
  35. package/dist/packem_shared/emptyDirSync-BoknkGUe.cjs +21 -0
  36. package/dist/packem_shared/emptyDirSync-DTGPXQ3v.mjs +19 -0
  37. package/dist/packem_shared/ensureDir-XiBlkOLR.mjs +33 -0
  38. package/dist/packem_shared/ensureDir-iUK2ga5M.cjs +35 -0
  39. package/dist/packem_shared/ensureDirSync-2IFUHFK2.mjs +33 -0
  40. package/dist/packem_shared/ensureDirSync-CXdMkg0Y.cjs +35 -0
  41. package/dist/packem_shared/ensureFile-Br8tFUJ7.cjs +29 -0
  42. package/dist/packem_shared/ensureFile-C2bWlBEa.mjs +27 -0
  43. package/dist/packem_shared/ensureFileSync-CZzSkNGC.cjs +29 -0
  44. package/dist/packem_shared/ensureFileSync-DkFfhOEs.mjs +27 -0
  45. package/dist/packem_shared/ensureLink-CFiabAD3.mjs +34 -0
  46. package/dist/packem_shared/ensureLink-Dqw5GBDq.cjs +36 -0
  47. package/dist/packem_shared/ensureLinkSync-BVw3h6sK.cjs +36 -0
  48. package/dist/packem_shared/ensureLinkSync-Dk-YeRg6.mjs +34 -0
  49. package/dist/packem_shared/ensureSymlink-CFSfreco.cjs +54 -0
  50. package/dist/packem_shared/ensureSymlink-CSqngPoI.mjs +52 -0
  51. package/dist/packem_shared/ensureSymlinkSync-BCd9bzsx.cjs +58 -0
  52. package/dist/packem_shared/ensureSymlinkSync-QRaNZX2E.mjs +56 -0
  53. package/dist/packem_shared/findUp-C8_QpAtD.mjs +63 -0
  54. package/dist/packem_shared/findUp-DA511Swp.cjs +65 -0
  55. package/dist/packem_shared/findUpSync-DVOd3V-q.mjs +63 -0
  56. package/dist/packem_shared/findUpSync-u1rGibzw.cjs +65 -0
  57. package/dist/packem_shared/get-file-info-type-BpRzQHvd.cjs +18 -0
  58. package/dist/packem_shared/get-file-info-type-CeiZ6n6g.mjs +16 -0
  59. package/dist/packem_shared/index-ajT9ecry.mjs +108 -0
  60. package/dist/packem_shared/index-ngvEMjBI.cjs +110 -0
  61. package/dist/packem_shared/is-stats-identical-BfdEfO6i.cjs +7 -0
  62. package/dist/packem_shared/is-stats-identical-ByTYZ2Aw.mjs +5 -0
  63. package/dist/packem_shared/isAccessible-Bonsm1Ez.mjs +20 -0
  64. package/dist/packem_shared/isAccessible-ZNVGsSb7.cjs +22 -0
  65. package/dist/packem_shared/isAccessibleSync-3gnUWUwX.mjs +20 -0
  66. package/dist/packem_shared/isAccessibleSync-VWjQa-US.cjs +22 -0
  67. package/dist/packem_shared/move-DgF7Ul9L.mjs +114 -0
  68. package/dist/packem_shared/move-Dh925GL9.cjs +121 -0
  69. package/dist/packem_shared/parseJson-B_q4905N.mjs +160 -0
  70. package/dist/packem_shared/parseJson-P3C7DMaS.cjs +162 -0
  71. package/dist/packem_shared/readFile-DUM-xNoB.mjs +46 -0
  72. package/dist/packem_shared/readFile-iFUhZHnh.cjs +48 -0
  73. package/dist/packem_shared/readFileSync-B3NTOR-W.cjs +33 -0
  74. package/dist/packem_shared/readFileSync-Cck96_o0.mjs +31 -0
  75. package/dist/packem_shared/readJson-Bqr9Oi3I.mjs +25 -0
  76. package/dist/packem_shared/readJson-D7rMdkkq.cjs +27 -0
  77. package/dist/packem_shared/readJsonSync-D3s2y651.cjs +27 -0
  78. package/dist/packem_shared/readJsonSync-Don8Jw5D.mjs +25 -0
  79. package/dist/packem_shared/readYaml-sR4bqUel.cjs +15 -0
  80. package/dist/packem_shared/readYaml-vVKK8ZzY.mjs +13 -0
  81. package/dist/packem_shared/readYamlSync-C3oOzxiN.cjs +15 -0
  82. package/dist/packem_shared/readYamlSync-MOLH4gXB.mjs +13 -0
  83. package/dist/packem_shared/remove-B2nxUObP.mjs +18 -0
  84. package/dist/packem_shared/remove-BpDiVPns.cjs +20 -0
  85. package/dist/packem_shared/removeSync-BosXW624.cjs +20 -0
  86. package/dist/packem_shared/removeSync-C87yepDI.mjs +18 -0
  87. package/dist/packem_shared/resolve-symlink-target-BbpEHdU2.mjs +18 -0
  88. package/dist/packem_shared/resolve-symlink-target-DImIddt6.cjs +20 -0
  89. package/dist/packem_shared/stripJsonComments-B66nRaTZ.mjs +21 -0
  90. package/dist/packem_shared/stripJsonComments-eDrcJvBT.cjs +23 -0
  91. package/dist/packem_shared/to-uint-8-array-B4CjMOD3.mjs +21 -0
  92. package/dist/packem_shared/to-uint-8-array-BaTEyX3D.cjs +23 -0
  93. package/dist/packem_shared/walk-BW7b4GXI.cjs +106 -0
  94. package/dist/packem_shared/walk-CNcSYQVq.mjs +104 -0
  95. package/dist/packem_shared/walk-include-CMUSRa86.mjs +20 -0
  96. package/dist/packem_shared/walk-include-yUdRrF16.cjs +23 -0
  97. package/dist/packem_shared/walkSync-BzxdFWLU.mjs +103 -0
  98. package/dist/packem_shared/walkSync-DgPj93NL.cjs +105 -0
  99. package/dist/packem_shared/writeFile-B7dhfseN.mjs +58 -0
  100. package/dist/packem_shared/writeFile-DKu5-M8x.cjs +60 -0
  101. package/dist/packem_shared/writeFileSync-Db6pmY0q.cjs +60 -0
  102. package/dist/packem_shared/writeFileSync-mMGYqOc8.mjs +58 -0
  103. package/dist/packem_shared/writeJson-BSQE2uFN.mjs +31 -0
  104. package/dist/packem_shared/writeJson-DtnnjTix.cjs +33 -0
  105. package/dist/packem_shared/writeJsonSync-C_i6LsGT.mjs +31 -0
  106. package/dist/packem_shared/writeJsonSync-Dz5-B2PD.cjs +33 -0
  107. package/dist/packem_shared/writeYaml-B-KoZN0E.cjs +14 -0
  108. package/dist/packem_shared/writeYaml-DSTzKc0_.mjs +12 -0
  109. package/dist/packem_shared/writeYamlSync-D6borSP1.cjs +14 -0
  110. package/dist/packem_shared/writeYamlSync-agxYIea0.mjs +12 -0
  111. package/dist/utils.cjs +19 -1
  112. package/dist/utils.mjs +6 -1
  113. package/package.json +15 -16
  114. package/dist/packem_shared/AlreadyExistsError-CEu6_Tjb.mjs +0 -1
  115. package/dist/packem_shared/AlreadyExistsError-GC2XUgzJ.cjs +0 -1
  116. package/dist/packem_shared/DirectoryError-B8wqer68.cjs +0 -1
  117. package/dist/packem_shared/DirectoryError-ddlbUV8C.mjs +0 -1
  118. package/dist/packem_shared/F_OK-6WAweffB.cjs +0 -1
  119. package/dist/packem_shared/F_OK-B71i3mUa.mjs +0 -1
  120. package/dist/packem_shared/JSONError-CVkb3xZ3.mjs +0 -4
  121. package/dist/packem_shared/JSONError-CWuiGmNc.cjs +0 -4
  122. package/dist/packem_shared/LF-D4BqIfQm.cjs +0 -3
  123. package/dist/packem_shared/LF-Dbx0i6a7.mjs +0 -3
  124. package/dist/packem_shared/NotEmptyError-BWGfec5K.cjs +0 -1
  125. package/dist/packem_shared/NotEmptyError-DMh1o7UL.mjs +0 -1
  126. package/dist/packem_shared/NotFoundError-Diij7oqe.cjs +0 -1
  127. package/dist/packem_shared/NotFoundError-T95YsWYl.mjs +0 -1
  128. package/dist/packem_shared/PermissionError-B8oi38Bx.mjs +0 -1
  129. package/dist/packem_shared/PermissionError-Ck1Es7al.cjs +0 -1
  130. package/dist/packem_shared/WalkError-BsngoIKJ.mjs +0 -1
  131. package/dist/packem_shared/WalkError-gKgp0TWD.cjs +0 -1
  132. package/dist/packem_shared/assertValidFileContents-BLhwm7u2.mjs +0 -1
  133. package/dist/packem_shared/assertValidFileContents-CrbDz09d.cjs +0 -1
  134. package/dist/packem_shared/assertValidFileOrDirectoryPath-DgPIPmZT.mjs +0 -1
  135. package/dist/packem_shared/assertValidFileOrDirectoryPath-HOUs73Jk.cjs +0 -1
  136. package/dist/packem_shared/collect-4au76gDu.cjs +0 -1
  137. package/dist/packem_shared/collect-CRzGiRGg.mjs +0 -1
  138. package/dist/packem_shared/collectSync-BE8DAOke.mjs +0 -1
  139. package/dist/packem_shared/collectSync-CbKwt8rz.cjs +0 -1
  140. package/dist/packem_shared/emptyDir-D2m8OP8u.mjs +0 -1
  141. package/dist/packem_shared/emptyDir-DKxQHQQb.cjs +0 -1
  142. package/dist/packem_shared/emptyDirSync-CLM_zyIb.cjs +0 -1
  143. package/dist/packem_shared/emptyDirSync-CZNcW4wc.mjs +0 -1
  144. package/dist/packem_shared/ensureDir-BtvxsJiS.mjs +0 -1
  145. package/dist/packem_shared/ensureDir-DVHj-_yp.cjs +0 -1
  146. package/dist/packem_shared/ensureDirSync-CvjJ3bGq.cjs +0 -1
  147. package/dist/packem_shared/ensureDirSync-bGe0QB7d.mjs +0 -1
  148. package/dist/packem_shared/ensureFile-C46R6-4l.mjs +0 -1
  149. package/dist/packem_shared/ensureFile-CcJ5XIZm.cjs +0 -1
  150. package/dist/packem_shared/ensureFileSync-CwYTIP4G.mjs +0 -1
  151. package/dist/packem_shared/ensureFileSync-v-PhMLTr.cjs +0 -1
  152. package/dist/packem_shared/ensureLink-63XWiA3I.mjs +0 -1
  153. package/dist/packem_shared/ensureLink-C-v4AxzH.cjs +0 -1
  154. package/dist/packem_shared/ensureLinkSync-C4S-zdVb.cjs +0 -1
  155. package/dist/packem_shared/ensureLinkSync-D2LVObKd.mjs +0 -1
  156. package/dist/packem_shared/ensureSymlink-C5cy9585.cjs +0 -1
  157. package/dist/packem_shared/ensureSymlink-D36fS4KE.mjs +0 -1
  158. package/dist/packem_shared/ensureSymlinkSync-PvWVgeXc.mjs +0 -1
  159. package/dist/packem_shared/ensureSymlinkSync-YDRbg9hX.cjs +0 -1
  160. package/dist/packem_shared/findUp-CMGMYNty.mjs +0 -1
  161. package/dist/packem_shared/findUp-VKPTLmQQ.cjs +0 -1
  162. package/dist/packem_shared/findUpSync-BFwDGxkV.cjs +0 -1
  163. package/dist/packem_shared/findUpSync-QP_ZEsJN.mjs +0 -1
  164. package/dist/packem_shared/get-file-info-type-BXcpoWEM.cjs +0 -1
  165. package/dist/packem_shared/get-file-info-type-CaWGXRjY.mjs +0 -1
  166. package/dist/packem_shared/index-Cms6lU4T.cjs +0 -1
  167. package/dist/packem_shared/index-VcQXVcaq.mjs +0 -1
  168. package/dist/packem_shared/is-stats-identical-CPCumzsC.cjs +0 -1
  169. package/dist/packem_shared/is-stats-identical-CS5Y91zW.mjs +0 -1
  170. package/dist/packem_shared/isAccessible-Be3NKjOk.cjs +0 -1
  171. package/dist/packem_shared/isAccessible-cO53WedI.mjs +0 -1
  172. package/dist/packem_shared/isAccessibleSync-D5Vc2GTD.mjs +0 -1
  173. package/dist/packem_shared/isAccessibleSync-WOSgkAy2.cjs +0 -1
  174. package/dist/packem_shared/move-MZ9F6paN.mjs +0 -1
  175. package/dist/packem_shared/move-j3mzcWrG.cjs +0 -1
  176. package/dist/packem_shared/parseJson-BIYrZWHm.mjs +0 -6
  177. package/dist/packem_shared/parseJson-CXe73j5t.cjs +0 -6
  178. package/dist/packem_shared/readFile-CFus1Rym.mjs +0 -1
  179. package/dist/packem_shared/readFile-fzYtUKuW.cjs +0 -1
  180. package/dist/packem_shared/readFileSync-Dz4jLcWc.cjs +0 -1
  181. package/dist/packem_shared/readFileSync-Ulz6QzOz.mjs +0 -1
  182. package/dist/packem_shared/readJson-C6RN16Rf.mjs +0 -1
  183. package/dist/packem_shared/readJson-D7_CYUJX.cjs +0 -1
  184. package/dist/packem_shared/readJsonSync-QziPGqW_.cjs +0 -1
  185. package/dist/packem_shared/readJsonSync-ztZXpE8z.mjs +0 -1
  186. package/dist/packem_shared/readYaml-C-ui8qXw.cjs +0 -1
  187. package/dist/packem_shared/readYaml-aFHfT-4e.mjs +0 -1
  188. package/dist/packem_shared/readYamlSync-CeJ6RnoJ.mjs +0 -1
  189. package/dist/packem_shared/readYamlSync-DUYMSemC.cjs +0 -1
  190. package/dist/packem_shared/remove-B-9MI2l5.cjs +0 -1
  191. package/dist/packem_shared/remove-DzfvbZOm.mjs +0 -1
  192. package/dist/packem_shared/removeSync-CJPR6M7V.cjs +0 -1
  193. package/dist/packem_shared/removeSync-D165rXSn.mjs +0 -1
  194. package/dist/packem_shared/resolve-symlink-target-BofZSDIc.mjs +0 -1
  195. package/dist/packem_shared/resolve-symlink-target-HnbdXA1S.cjs +0 -1
  196. package/dist/packem_shared/stripJsonComments-CKgR4nW4.mjs +0 -1
  197. package/dist/packem_shared/stripJsonComments-Cw7UCxI3.cjs +0 -1
  198. package/dist/packem_shared/to-uint-8-array-2-3EvGd7.cjs +0 -1
  199. package/dist/packem_shared/to-uint-8-array-DwgaTasY.mjs +0 -1
  200. package/dist/packem_shared/walk-BJgnJy5d.cjs +0 -1
  201. package/dist/packem_shared/walk-DH-95i_B.mjs +0 -1
  202. package/dist/packem_shared/walk-include-B-MbUqMt.mjs +0 -1
  203. package/dist/packem_shared/walk-include-CFIYniQi.cjs +0 -1
  204. package/dist/packem_shared/walkSync-D4zvt_kM.mjs +0 -1
  205. package/dist/packem_shared/walkSync-DYawhxUA.cjs +0 -1
  206. package/dist/packem_shared/writeFile-DaHzc_FW.mjs +0 -1
  207. package/dist/packem_shared/writeFile-WCuWZNRy.cjs +0 -1
  208. package/dist/packem_shared/writeFileSync-D9HGh6J-.mjs +0 -1
  209. package/dist/packem_shared/writeFileSync-Ds49_ORi.cjs +0 -1
  210. package/dist/packem_shared/writeJson-BdjtBy1t.cjs +0 -4
  211. package/dist/packem_shared/writeJson-Bu7Dw4Uu.mjs +0 -4
  212. package/dist/packem_shared/writeJsonSync-7CjNn7oo.mjs +0 -4
  213. package/dist/packem_shared/writeJsonSync-CdC3ahaO.cjs +0 -4
  214. package/dist/packem_shared/writeYaml-COWffUNm.cjs +0 -1
  215. package/dist/packem_shared/writeYaml-bi1dx696.mjs +0 -1
  216. package/dist/packem_shared/writeYamlSync-BpIN1tTP.cjs +0 -1
  217. package/dist/packem_shared/writeYamlSync-D2VPlEws.mjs +0 -1
@@ -0,0 +1,27 @@
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
+ /** Constructs a new instance. */
12
+ constructor(cause, root) {
13
+ super(`${cause instanceof Error ? cause.message : cause} for path "${root}"`);
14
+ this.cause = cause;
15
+ this.root = root;
16
+ }
17
+ // eslint-disable-next-line class-methods-use-this
18
+ get name() {
19
+ return "WalkError";
20
+ }
21
+ // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
22
+ set name(_name) {
23
+ throw new Error("Cannot overwrite name of WalkError");
24
+ }
25
+ }
26
+
27
+ module.exports = WalkError;
@@ -0,0 +1,25 @@
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
+ /** Constructs a new instance. */
10
+ constructor(cause, root) {
11
+ super(`${cause instanceof Error ? cause.message : cause} for path "${root}"`);
12
+ this.cause = cause;
13
+ this.root = root;
14
+ }
15
+ // eslint-disable-next-line class-methods-use-this
16
+ get name() {
17
+ return "WalkError";
18
+ }
19
+ // eslint-disable-next-line class-methods-use-this,@typescript-eslint/explicit-module-boundary-types
20
+ set name(_name) {
21
+ throw new Error("Cannot overwrite name of WalkError");
22
+ }
23
+ }
24
+
25
+ export { WalkError as default };
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,9 @@
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 };
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,9 @@
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 };
@@ -0,0 +1,16 @@
1
+ import walk from './walk-CNcSYQVq.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 };
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ const walk = require('./walk-BW7b4GXI.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;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ const walkSync = require('./walkSync-DgPj93NL.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;
@@ -0,0 +1,16 @@
1
+ import walkSync from './walkSync-BzxdFWLU.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 };
@@ -0,0 +1,22 @@
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;
@@ -0,0 +1,20 @@
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 };
@@ -0,0 +1,21 @@
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 emptyDir = /* @__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
+ }, "emptyDir");
20
+
21
+ module.exports = emptyDir;
@@ -0,0 +1,19 @@
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 emptyDir = /* @__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
+ }, "emptyDir");
18
+
19
+ export { emptyDir as default };
@@ -0,0 +1,33 @@
1
+ import { lstat, mkdir } from 'node:fs/promises';
2
+ import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
3
+ import { g as getFileInfoType } from './get-file-info-type-CeiZ6n6g.mjs';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ const ensureDir = /* @__PURE__ */ __name(async (directory) => {
8
+ assertValidFileOrDirectoryPath(directory);
9
+ try {
10
+ const fileInfo = await lstat(directory);
11
+ if (!fileInfo.isDirectory()) {
12
+ throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType(fileInfo)}'`);
13
+ }
14
+ return;
15
+ } catch (error) {
16
+ if (error.code !== "ENOENT") {
17
+ throw error;
18
+ }
19
+ }
20
+ try {
21
+ await mkdir(directory, { recursive: true });
22
+ } catch (error) {
23
+ if (error.code !== "EEXIST") {
24
+ throw error;
25
+ }
26
+ const fileInfo = await lstat(directory);
27
+ if (!fileInfo.isDirectory()) {
28
+ throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType(fileInfo)}'`);
29
+ }
30
+ }
31
+ }, "ensureDir");
32
+
33
+ export { ensureDir as default };
@@ -0,0 +1,35 @@
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-BpRzQHvd.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;
@@ -0,0 +1,33 @@
1
+ import { lstatSync, mkdirSync } from 'node:fs';
2
+ import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
3
+ import { g as getFileInfoType } from './get-file-info-type-CeiZ6n6g.mjs';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ const ensureDirSync = /* @__PURE__ */ __name((directory) => {
8
+ assertValidFileOrDirectoryPath(directory);
9
+ try {
10
+ const fileInfo = lstatSync(directory);
11
+ if (!fileInfo.isDirectory()) {
12
+ throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType(fileInfo)}'`);
13
+ }
14
+ return;
15
+ } catch (error) {
16
+ if (error.code !== "ENOENT") {
17
+ throw error;
18
+ }
19
+ }
20
+ try {
21
+ mkdirSync(directory, { recursive: true });
22
+ } catch (error) {
23
+ if (error.code !== "EEXIST") {
24
+ throw error;
25
+ }
26
+ const fileInfo = lstatSync(directory);
27
+ if (!fileInfo.isDirectory()) {
28
+ throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType(fileInfo)}'`);
29
+ }
30
+ }
31
+ }, "ensureDirSync");
32
+
33
+ export { ensureDirSync as default };
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ const node_fs = require('node:fs');
4
+ const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
5
+ const getFileInfoType = require('./get-file-info-type-BpRzQHvd.cjs');
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ const ensureDirSync = /* @__PURE__ */ __name((directory) => {
10
+ assertValidFileOrDirectoryPath(directory);
11
+ try {
12
+ const fileInfo = node_fs.lstatSync(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
+ node_fs.mkdirSync(directory, { recursive: true });
24
+ } catch (error) {
25
+ if (error.code !== "EEXIST") {
26
+ throw error;
27
+ }
28
+ const fileInfo = node_fs.lstatSync(directory);
29
+ if (!fileInfo.isDirectory()) {
30
+ throw new Error(`Ensure path exists, expected 'dir', got '${getFileInfoType.getFileInfoType(fileInfo)}'`);
31
+ }
32
+ }
33
+ }, "ensureDirSync");
34
+
35
+ module.exports = ensureDirSync;
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ const promises = require('node:fs/promises');
4
+ const path = require('@visulima/path');
5
+ const utils = require('@visulima/path/utils');
6
+ const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
7
+ const getFileInfoType = require('./get-file-info-type-BpRzQHvd.cjs');
8
+ const ensureDir = require('./ensureDir-iUK2ga5M.cjs');
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
+ const ensureFile = /* @__PURE__ */ __name(async (filePath) => {
13
+ assertValidFileOrDirectoryPath(filePath);
14
+ try {
15
+ const stat = await promises.lstat(filePath);
16
+ if (!stat.isFile()) {
17
+ throw new Error(`Ensure path exists, expected 'file', got '${getFileInfoType.getFileInfoType(stat)}'`);
18
+ }
19
+ } catch (error) {
20
+ if (error.code === "ENOENT") {
21
+ await ensureDir(path.dirname(utils.toPath(filePath)));
22
+ await promises.writeFile(filePath, new Uint8Array());
23
+ return;
24
+ }
25
+ throw error;
26
+ }
27
+ }, "ensureFile");
28
+
29
+ module.exports = ensureFile;
@@ -0,0 +1,27 @@
1
+ import { lstat, writeFile } from 'node:fs/promises';
2
+ import { dirname } from '@visulima/path';
3
+ import { toPath } from '@visulima/path/utils';
4
+ import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
5
+ import { g as getFileInfoType } from './get-file-info-type-CeiZ6n6g.mjs';
6
+ import ensureDir from './ensureDir-XiBlkOLR.mjs';
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
+ const ensureFile = /* @__PURE__ */ __name(async (filePath) => {
11
+ assertValidFileOrDirectoryPath(filePath);
12
+ try {
13
+ const stat = await lstat(filePath);
14
+ if (!stat.isFile()) {
15
+ throw new Error(`Ensure path exists, expected 'file', got '${getFileInfoType(stat)}'`);
16
+ }
17
+ } catch (error) {
18
+ if (error.code === "ENOENT") {
19
+ await ensureDir(dirname(toPath(filePath)));
20
+ await writeFile(filePath, new Uint8Array());
21
+ return;
22
+ }
23
+ throw error;
24
+ }
25
+ }, "ensureFile");
26
+
27
+ export { ensureFile as default };
@@ -0,0 +1,29 @@
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
+ const getFileInfoType = require('./get-file-info-type-BpRzQHvd.cjs');
8
+ const ensureDirSync = require('./ensureDirSync-CXdMkg0Y.cjs');
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
+ const ensureFileSync = /* @__PURE__ */ __name((filePath) => {
13
+ assertValidFileOrDirectoryPath(filePath);
14
+ try {
15
+ const stat = node_fs.lstatSync(filePath);
16
+ if (!stat.isFile()) {
17
+ throw new Error(`Ensure path exists, expected 'file', got '${getFileInfoType.getFileInfoType(stat)}'`);
18
+ }
19
+ } catch (error) {
20
+ if (error.code === "ENOENT") {
21
+ ensureDirSync(path.dirname(utils.toPath(filePath)));
22
+ node_fs.writeFileSync(filePath, new Uint8Array());
23
+ return;
24
+ }
25
+ throw error;
26
+ }
27
+ }, "ensureFileSync");
28
+
29
+ module.exports = ensureFileSync;
@@ -0,0 +1,27 @@
1
+ import { lstatSync, writeFileSync } from 'node:fs';
2
+ import { dirname } from '@visulima/path';
3
+ import { toPath } from '@visulima/path/utils';
4
+ import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
5
+ import { g as getFileInfoType } from './get-file-info-type-CeiZ6n6g.mjs';
6
+ import ensureDirSync from './ensureDirSync-2IFUHFK2.mjs';
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
+ const ensureFileSync = /* @__PURE__ */ __name((filePath) => {
11
+ assertValidFileOrDirectoryPath(filePath);
12
+ try {
13
+ const stat = lstatSync(filePath);
14
+ if (!stat.isFile()) {
15
+ throw new Error(`Ensure path exists, expected 'file', got '${getFileInfoType(stat)}'`);
16
+ }
17
+ } catch (error) {
18
+ if (error.code === "ENOENT") {
19
+ ensureDirSync(dirname(toPath(filePath)));
20
+ writeFileSync(filePath, new Uint8Array());
21
+ return;
22
+ }
23
+ throw error;
24
+ }
25
+ }, "ensureFileSync");
26
+
27
+ export { ensureFileSync as default };
@@ -0,0 +1,34 @@
1
+ import { lstat, link } from 'node:fs/promises';
2
+ import { toNamespacedPath, dirname } from '@visulima/path';
3
+ import { toPath } from '@visulima/path/utils';
4
+ import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
5
+ import { i as isStatsIdentical } from './is-stats-identical-ByTYZ2Aw.mjs';
6
+ import ensureDir from './ensureDir-XiBlkOLR.mjs';
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
+ const ensureLink = /* @__PURE__ */ __name(async (source, destination) => {
11
+ assertValidFileOrDirectoryPath(source);
12
+ assertValidFileOrDirectoryPath(destination);
13
+ source = toNamespacedPath(toPath(source));
14
+ destination = toNamespacedPath(toPath(destination));
15
+ let destinationStat;
16
+ try {
17
+ destinationStat = await lstat(destination);
18
+ } catch {
19
+ }
20
+ let sourceStat;
21
+ try {
22
+ sourceStat = await lstat(source);
23
+ } catch (error) {
24
+ error.message = error.message.replace("lstat", "ensureLink");
25
+ throw error;
26
+ }
27
+ if (destinationStat && isStatsIdentical(sourceStat, destinationStat)) {
28
+ return;
29
+ }
30
+ await ensureDir(dirname(destination));
31
+ await link(source, destination);
32
+ }, "ensureLink");
33
+
34
+ export { ensureLink as default };
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ const promises = require('node:fs/promises');
4
+ const path = require('@visulima/path');
5
+ const utils = require('@visulima/path/utils');
6
+ const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
7
+ const isStatsIdentical = require('./is-stats-identical-BfdEfO6i.cjs');
8
+ const ensureDir = require('./ensureDir-iUK2ga5M.cjs');
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
+ const ensureLink = /* @__PURE__ */ __name(async (source, destination) => {
13
+ assertValidFileOrDirectoryPath(source);
14
+ assertValidFileOrDirectoryPath(destination);
15
+ source = path.toNamespacedPath(utils.toPath(source));
16
+ destination = path.toNamespacedPath(utils.toPath(destination));
17
+ let destinationStat;
18
+ try {
19
+ destinationStat = await promises.lstat(destination);
20
+ } catch {
21
+ }
22
+ let sourceStat;
23
+ try {
24
+ sourceStat = await promises.lstat(source);
25
+ } catch (error) {
26
+ error.message = error.message.replace("lstat", "ensureLink");
27
+ throw error;
28
+ }
29
+ if (destinationStat && isStatsIdentical.isStatsIdentical(sourceStat, destinationStat)) {
30
+ return;
31
+ }
32
+ await ensureDir(path.dirname(destination));
33
+ await promises.link(source, destination);
34
+ }, "ensureLink");
35
+
36
+ module.exports = ensureLink;
@@ -0,0 +1,36 @@
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
+ const isStatsIdentical = require('./is-stats-identical-BfdEfO6i.cjs');
8
+ const ensureDirSync = require('./ensureDirSync-CXdMkg0Y.cjs');
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
12
+ const ensureLinkSync = /* @__PURE__ */ __name((source, destination) => {
13
+ assertValidFileOrDirectoryPath(source);
14
+ assertValidFileOrDirectoryPath(destination);
15
+ source = path.toNamespacedPath(utils.toPath(source));
16
+ destination = path.toNamespacedPath(utils.toPath(destination));
17
+ let destinationStat;
18
+ try {
19
+ destinationStat = node_fs.lstatSync(destination);
20
+ } catch {
21
+ }
22
+ let sourceStat;
23
+ try {
24
+ sourceStat = node_fs.lstatSync(source);
25
+ } catch (error) {
26
+ error.message = error.message.replace("lstat", "ensureLink");
27
+ throw error;
28
+ }
29
+ if (destinationStat && isStatsIdentical.isStatsIdentical(sourceStat, destinationStat)) {
30
+ return;
31
+ }
32
+ ensureDirSync(path.dirname(destination));
33
+ node_fs.linkSync(source, destination);
34
+ }, "ensureLinkSync");
35
+
36
+ module.exports = ensureLinkSync;
@@ -0,0 +1,34 @@
1
+ import { lstatSync, linkSync } from 'node:fs';
2
+ import { toNamespacedPath, dirname } from '@visulima/path';
3
+ import { toPath } from '@visulima/path/utils';
4
+ import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
5
+ import { i as isStatsIdentical } from './is-stats-identical-ByTYZ2Aw.mjs';
6
+ import ensureDirSync from './ensureDirSync-2IFUHFK2.mjs';
7
+
8
+ var __defProp = Object.defineProperty;
9
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
+ const ensureLinkSync = /* @__PURE__ */ __name((source, destination) => {
11
+ assertValidFileOrDirectoryPath(source);
12
+ assertValidFileOrDirectoryPath(destination);
13
+ source = toNamespacedPath(toPath(source));
14
+ destination = toNamespacedPath(toPath(destination));
15
+ let destinationStat;
16
+ try {
17
+ destinationStat = lstatSync(destination);
18
+ } catch {
19
+ }
20
+ let sourceStat;
21
+ try {
22
+ sourceStat = lstatSync(source);
23
+ } catch (error) {
24
+ error.message = error.message.replace("lstat", "ensureLink");
25
+ throw error;
26
+ }
27
+ if (destinationStat && isStatsIdentical(sourceStat, destinationStat)) {
28
+ return;
29
+ }
30
+ ensureDirSync(dirname(destination));
31
+ linkSync(source, destination);
32
+ }, "ensureLinkSync");
33
+
34
+ export { ensureLinkSync as default };