@visulima/fs 2.3.5 → 2.3.7

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 +20 -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-DcUo4Rpt.cjs +251 -0
  70. package/dist/packem_shared/parseJson-n9THWOFI.mjs +249 -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-DIHRleEE.mjs +25 -0
  76. package/dist/packem_shared/readJson-JrCHMN3m.cjs +27 -0
  77. package/dist/packem_shared/readJsonSync-BPfxTuQL.mjs +25 -0
  78. package/dist/packem_shared/readJsonSync-o_MAOlUv.cjs +27 -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
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var w=(i,a)=>u(i,"name",{value:a,configurable:!0});const e=require("node:fs/promises"),l=require("@visulima/path"),m=require("@visulima/path/utils"),d=require("./F_OK-6WAweffB.cjs"),c=require("./isAccessible-Be3NKjOk.cjs"),h=require("./assertValidFileContents-CrbDz09d.cjs"),f=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),g=require("./to-uint-8-array-2-3EvGd7.cjs");var v=Object.defineProperty,p=w((i,a)=>v(i,"name",{value:a,configurable:!0}),"d");const q=p(async(i,a,t)=>{t={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},f(i),h(a),i=m.toPath(i);try{const r=await c(i,d.F_OK);if(!r&&t.recursive){const s=l.dirname(i);await c(s,d.F_OK)||await e.mkdir(s,{recursive:!0})}let n;await e.writeFile(`${i}.tmp`,g.a(a),{encoding:t.encoding,flag:t.flag}),r&&!t.overwrite&&(n=await e.stat(i),t.chown===void 0&&(t.chown={gid:n.gid,uid:n.uid}),await e.rename(i,`${i}.bak`));const o=`${i}.tmp`;if(t.chown)try{await e.chown(o,t.chown.uid,t.chown.gid)}catch{}await e.chmod(o,n&&!t.mode?n.mode:t.mode??438),await e.rename(o,i)}catch(r){throw new Error(`Failed to write file at: ${i} - ${r.message}`,{cause:r})}finally{await c(`${i}.tmp`)&&await e.unlink(`${i}.tmp`)}},"writeFile");module.exports=q;
@@ -1 +0,0 @@
1
- var s=Object.defineProperty;var a=(o,t)=>s(o,"name",{value:t,configurable:!0});import{mkdirSync as l,writeFileSync as p,statSync as w,renameSync as f,chownSync as u,chmodSync as y,unlinkSync as g}from"node:fs";import{dirname as h}from"@visulima/path";import{toPath as $}from"@visulima/path/utils";import{F_OK as d}from"./F_OK-B71i3mUa.mjs";import r from"./isAccessibleSync-D5Vc2GTD.mjs";import v from"./assertValidFileContents-BLhwm7u2.mjs";import S from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{a as k}from"./to-uint-8-array-DwgaTasY.mjs";var F=Object.defineProperty,b=a((o,t)=>F(o,"name",{value:t,configurable:!0}),"f");const A=b((o,t,i)=>{i={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...i},S(o),v(t),o=$(o);try{const n=r(o,d);if(!n&&i.recursive){const e=h(o);r(e,d)||l(e,{recursive:!0})}let c;p(`${o}.tmp`,k(t),{encoding:i.encoding,flag:i.flag}),n&&!i.overwrite&&(c=w(o),i.chown===void 0&&(i.chown={gid:c.gid,uid:c.uid}),f(o,`${o}.bak`));const m=`${o}.tmp`;if(i.chown)try{u(m,i.chown.uid,i.chown.gid)}catch{}y(m,c&&!i.mode?c.mode:i.mode??438),f(m,o)}catch(n){throw new Error(`Failed to write file at: ${o} - ${n.message}`,{cause:n})}finally{r(`${o}.tmp`)&&g(`${o}.tmp`)}},"writeFileSync");export{A as default};
@@ -1 +0,0 @@
1
- "use strict";var l=Object.defineProperty;var d=(e,n)=>l(e,"name",{value:n,configurable:!0});const t=require("node:fs"),y=require("@visulima/path"),m=require("@visulima/path/utils"),u=require("./F_OK-6WAweffB.cjs"),s=require("./isAccessibleSync-WOSgkAy2.cjs"),w=require("./assertValidFileContents-CrbDz09d.cjs"),h=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),f=require("./to-uint-8-array-2-3EvGd7.cjs");var g=Object.defineProperty,S=d((e,n)=>g(e,"name",{value:n,configurable:!0}),"f");const v=S((e,n,i)=>{i={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...i},h(e),w(n),e=m.toPath(e);try{const c=s(e,u.F_OK);if(!c&&i.recursive){const a=y.dirname(e);s(a,u.F_OK)||t.mkdirSync(a,{recursive:!0})}let o;t.writeFileSync(`${e}.tmp`,f.a(n),{encoding:i.encoding,flag:i.flag}),c&&!i.overwrite&&(o=t.statSync(e),i.chown===void 0&&(i.chown={gid:o.gid,uid:o.uid}),t.renameSync(e,`${e}.bak`));const r=`${e}.tmp`;if(i.chown)try{t.chownSync(r,i.chown.uid,i.chown.gid)}catch{}t.chmodSync(r,o&&!i.mode?o.mode:i.mode??438),t.renameSync(r,e)}catch(c){throw new Error(`Failed to write file at: ${e} - ${c.message}`,{cause:c})}finally{s(`${e}.tmp`)&&t.unlinkSync(`${e}.tmp`)}},"writeFileSync");module.exports=v;
@@ -1,4 +0,0 @@
1
- "use strict";var p=Object.defineProperty;var c=(e,t)=>p(e,"name",{value:t,configurable:!0});const q=require("node:fs/promises"),y=require("./index-Cms6lU4T.cjs"),O=require("./F_OK-6WAweffB.cjs"),b=require("./isAccessible-Be3NKjOk.cjs"),g=require("./writeFile-WCuWZNRy.cjs");var h=Object.defineProperty,m=c((e,t)=>h(e,"name",{value:t,configurable:!0}),"r");const v=m(async(e,t,s={})=>{const{detectIndent:o,indent:a,replacer:d,stringify:u=JSON.stringify,...f}={indent:" ",...s};let i=a,r=`
2
- `;if(await b(e,O.R_OK))try{const n=await q.readFile(e,"utf8");if(o){const{indent:w}=y.detectIndent(n);i=w}r=n.endsWith(`
3
- `)?`
4
- `:""}catch(n){if(n.code!=="ENOENT")throw n}const l=u(t,d,i);await g(e,`${l}${r}`,f)},"writeJson");module.exports=v;
@@ -1,4 +0,0 @@
1
- var w=Object.defineProperty;var o=(t,e)=>w(t,"name",{value:e,configurable:!0});import{readFile as u}from"node:fs/promises";import{d as y}from"./index-VcQXVcaq.mjs";import{R_OK as O}from"./F_OK-B71i3mUa.mjs";import g from"./isAccessible-cO53WedI.mjs";import h from"./writeFile-DaHzc_FW.mjs";var v=Object.defineProperty,N=o((t,e)=>v(t,"name",{value:e,configurable:!0}),"r");const k=N(async(t,e,a={})=>{const{detectIndent:c,indent:f,replacer:d,stringify:m=JSON.stringify,...s}={indent:" ",...a};let r=f,i=`
2
- `;if(await g(t,O))try{const n=await u(t,"utf8");if(c){const{indent:l}=y(n);r=l}i=n.endsWith(`
3
- `)?`
4
- `:""}catch(n){if(n.code!=="ENOENT")throw n}const p=m(e,d,r);await h(t,`${p}${i}`,s)},"writeJson");export{k as default};
@@ -1,4 +0,0 @@
1
- var y=Object.defineProperty;var i=(t,e)=>y(t,"name",{value:e,configurable:!0});import{readFileSync as O}from"node:fs";import{d as u}from"./index-VcQXVcaq.mjs";import{R_OK as N}from"./F_OK-B71i3mUa.mjs";import g from"./isAccessibleSync-D5Vc2GTD.mjs";import h from"./writeFileSync-D9HGh6J-.mjs";var v=Object.defineProperty,S=i((t,e)=>v(t,"name",{value:e,configurable:!0}),"r");const j=S((t,e,c={})=>{const{detectIndent:f,indent:d,replacer:m,stringify:a=JSON.stringify,...s}={indent:" ",...c};let n=d,o=`
2
- `;if(g(t,N))try{const r=O(t,"utf8");if(f){const{indent:l}=u(r);n=l}o=r.endsWith(`
3
- `)?`
4
- `:""}catch(r){if(r.code!=="ENOENT")throw r}const p=a(e,m,n);h(t,`${p}${o}`,s)},"writeJsonSync");export{j as default};
@@ -1,4 +0,0 @@
1
- "use strict";var O=Object.defineProperty;var i=(e,t)=>O(e,"name",{value:t,configurable:!0});const q=require("node:fs"),S=require("./index-Cms6lU4T.cjs"),p=require("./F_OK-6WAweffB.cjs"),N=require("./isAccessibleSync-WOSgkAy2.cjs"),b=require("./writeFileSync-Ds49_ORi.cjs");var g=Object.defineProperty,h=i((e,t)=>g(e,"name",{value:t,configurable:!0}),"r");const v=h((e,t,s={})=>{const{detectIndent:o,indent:d,replacer:f,stringify:u=JSON.stringify,...y}={indent:" ",...s};let r=d,c=`
2
- `;if(N(e,p.R_OK))try{const n=q.readFileSync(e,"utf8");if(o){const{indent:l}=S.detectIndent(n);r=l}c=n.endsWith(`
3
- `)?`
4
- `:""}catch(n){if(n.code!=="ENOENT")throw n}const a=u(t,f,r);b(e,`${a}${c}`,y)},"writeJsonSync");module.exports=v;
@@ -1 +0,0 @@
1
- "use strict";var o=Object.defineProperty;var n=(e,r)=>o(e,"name",{value:r,configurable:!0});const a=require("yaml"),y=require("./writeFile-WCuWZNRy.cjs");var f=Object.defineProperty,u=n((e,r)=>f(e,"name",{value:r,configurable:!0}),"n");async function i(e,r,t,s){const c=typeof t=="function"||Array.isArray(t)?a.stringify(r,t,s):a.stringify(r,t);await y(e,c)}n(i,"m");u(i,"writeYaml");module.exports=i;
@@ -1 +0,0 @@
1
- var i=Object.defineProperty;var e=(a,r)=>i(a,"name",{value:r,configurable:!0});import{stringify as n}from"yaml";import m from"./writeFile-DaHzc_FW.mjs";var c=Object.defineProperty,y=e((a,r)=>c(a,"name",{value:r,configurable:!0}),"n");async function p(a,r,t,o){const f=typeof t=="function"||Array.isArray(t)?n(r,t,o):n(r,t);await m(a,f)}e(p,"m");y(p,"writeYaml");export{p as default};
@@ -1 +0,0 @@
1
- "use strict";var o=Object.defineProperty;var t=(e,r)=>o(e,"name",{value:r,configurable:!0});const n=require("yaml"),y=require("./writeFileSync-Ds49_ORi.cjs");var f=Object.defineProperty,u=t((e,r)=>f(e,"name",{value:r,configurable:!0}),"i");function c(e,r,i,s){const a=typeof i=="function"||Array.isArray(i)?n.stringify(r,i,s):n.stringify(r,i);y(e,a)}t(c,"m");u(c,"writeYamlSync");module.exports=c;
@@ -1 +0,0 @@
1
- var m=Object.defineProperty;var o=(e,r)=>m(e,"name",{value:r,configurable:!0});import{stringify as t}from"yaml";import n from"./writeFileSync-D9HGh6J-.mjs";var c=Object.defineProperty,y=o((e,r)=>c(e,"name",{value:r,configurable:!0}),"i");function p(e,r,i,a){const f=typeof i=="function"||Array.isArray(i)?t(r,i,a):t(r,i);n(e,f)}o(p,"m");y(p,"writeYamlSync");export{p as default};